@nuvio/shared 0.5.5 → 1.1.0

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.
@@ -0,0 +1,3088 @@
1
+ import { z } from 'zod';
2
+
3
+ /** Bump when wire payloads change incompatibly. */
4
+ declare const PROTOCOL_VERSION: 8;
5
+ declare const riskLevelSchema: z.ZodEnum<["safe", "caution", "unsupported"]>;
6
+ type RiskLevel = z.infer<typeof riskLevelSchema>;
7
+ /** Index v3: editable text node under an instrumented host (Step 1). */
8
+ declare const textTargetSchema: z.ZodObject<{
9
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
10
+ key: z.ZodString;
11
+ label: z.ZodString;
12
+ file: z.ZodString;
13
+ line: z.ZodNumber;
14
+ column: z.ZodNumber;
15
+ tagName: z.ZodString;
16
+ textEditable: z.ZodBoolean;
17
+ textPreview: z.ZodOptional<z.ZodString>;
18
+ /** Present when the text node has its own `data-nuvio-id`. */
19
+ nuvioId: z.ZodOptional<z.ZodString>;
20
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
21
+ patchHostId: z.ZodString;
22
+ insideMap: z.ZodOptional<z.ZodBoolean>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ key: string;
25
+ label: string;
26
+ file: string;
27
+ line: number;
28
+ column: number;
29
+ tagName: string;
30
+ textEditable: boolean;
31
+ patchHostId: string;
32
+ textPreview?: string | undefined;
33
+ nuvioId?: string | undefined;
34
+ insideMap?: boolean | undefined;
35
+ }, {
36
+ key: string;
37
+ label: string;
38
+ file: string;
39
+ line: number;
40
+ column: number;
41
+ tagName: string;
42
+ textEditable: boolean;
43
+ patchHostId: string;
44
+ textPreview?: string | undefined;
45
+ nuvioId?: string | undefined;
46
+ insideMap?: boolean | undefined;
47
+ }>;
48
+ type TextWireTarget = z.infer<typeof textTargetSchema>;
49
+ /** Index v3: explicit style patch target under an instrumented host. */
50
+ declare const styleTargetSchema: z.ZodObject<{
51
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
52
+ key: z.ZodString;
53
+ label: z.ZodString;
54
+ file: z.ZodString;
55
+ line: z.ZodNumber;
56
+ column: z.ZodNumber;
57
+ tagName: z.ZodString;
58
+ nuvioId: z.ZodString;
59
+ patchHostId: z.ZodString;
60
+ classNamePatchable: z.ZodBoolean;
61
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ key: string;
64
+ label: string;
65
+ file: string;
66
+ line: number;
67
+ column: number;
68
+ tagName: string;
69
+ nuvioId: string;
70
+ patchHostId: string;
71
+ classNamePatchable: boolean;
72
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
73
+ }, {
74
+ key: string;
75
+ label: string;
76
+ file: string;
77
+ line: number;
78
+ column: number;
79
+ tagName: string;
80
+ nuvioId: string;
81
+ patchHostId: string;
82
+ classNamePatchable: boolean;
83
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
84
+ }>;
85
+ type StyleWireTarget = z.infer<typeof styleTargetSchema>;
86
+ declare const hierarchyRoleSchema: z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>;
87
+ /** Index v4: row host under a table section (`orders.row.{key}`). */
88
+ declare const rowTargetSchema: z.ZodObject<{
89
+ rowKey: z.ZodString;
90
+ nuvioId: z.ZodString;
91
+ label: z.ZodString;
92
+ file: z.ZodString;
93
+ line: z.ZodNumber;
94
+ }, "strip", z.ZodTypeAny, {
95
+ label: string;
96
+ file: string;
97
+ line: number;
98
+ nuvioId: string;
99
+ rowKey: string;
100
+ }, {
101
+ label: string;
102
+ file: string;
103
+ line: number;
104
+ nuvioId: string;
105
+ rowKey: string;
106
+ }>;
107
+ type RowWireTarget = z.infer<typeof rowTargetSchema>;
108
+ /** Index v4: static `tableData` binding for Tier C cell edits. */
109
+ declare const tableMetaSchema: z.ZodObject<{
110
+ dataBinding: z.ZodString;
111
+ file: z.ZodString;
112
+ line: z.ZodNumber;
113
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ file: string;
116
+ line: number;
117
+ dataBinding: string;
118
+ columns?: string[] | undefined;
119
+ }, {
120
+ file: string;
121
+ line: number;
122
+ dataBinding: string;
123
+ columns?: string[] | undefined;
124
+ }>;
125
+ type TableMeta = z.infer<typeof tableMetaSchema>;
126
+ /** Index v4: patch cell copy via local array literal. */
127
+ declare const tableDataFieldSchema: z.ZodObject<{
128
+ arrayName: z.ZodString;
129
+ rowKey: z.ZodString;
130
+ field: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ rowKey: string;
133
+ arrayName: string;
134
+ field: string;
135
+ }, {
136
+ rowKey: string;
137
+ arrayName: string;
138
+ field: string;
139
+ }>;
140
+ type TableDataFieldBinding = z.infer<typeof tableDataFieldSchema>;
141
+ type HierarchyRole = z.infer<typeof hierarchyRoleSchema>;
142
+ /** Per-host className patch strategy (index v5 / v0.7). */
143
+ declare const classNameModeSchema: z.ZodEnum<["literal-only", "cn-basic", "cn-conditional", "classnames-static", "unsupported"]>;
144
+ type WireClassNameMode = z.infer<typeof classNameModeSchema>;
145
+ /** Detected UI library profile (v0.8). */
146
+ declare const libraryIdSchema: z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>;
147
+ type LibraryId = z.infer<typeof libraryIdSchema>;
148
+ declare const indexEntrySchema: z.ZodObject<{
149
+ id: z.ZodString;
150
+ file: z.ZodString;
151
+ line: z.ZodNumber;
152
+ column: z.ZodNumber;
153
+ /** Source index v2 metadata */
154
+ tagName: z.ZodOptional<z.ZodString>;
155
+ componentName: z.ZodOptional<z.ZodString>;
156
+ hasLiteralClassName: z.ZodOptional<z.ZodBoolean>;
157
+ classNameValue: z.ZodOptional<z.ZodString>;
158
+ textEditable: z.ZodOptional<z.ZodBoolean>;
159
+ structuralEditable: z.ZodOptional<z.ZodBoolean>;
160
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
161
+ unsupportedReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ insideMap: z.ZodOptional<z.ZodBoolean>;
163
+ /** Index v3: default id for className patches on this host. */
164
+ patchHostId: z.ZodOptional<z.ZodString>;
165
+ /** Index v3: preferred text target key in `textTargets`. */
166
+ primaryTextTargetKey: z.ZodOptional<z.ZodString>;
167
+ /** Index v3: descendant (and host) text edit targets. */
168
+ textTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
169
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
170
+ key: z.ZodString;
171
+ label: z.ZodString;
172
+ file: z.ZodString;
173
+ line: z.ZodNumber;
174
+ column: z.ZodNumber;
175
+ tagName: z.ZodString;
176
+ textEditable: z.ZodBoolean;
177
+ textPreview: z.ZodOptional<z.ZodString>;
178
+ /** Present when the text node has its own `data-nuvio-id`. */
179
+ nuvioId: z.ZodOptional<z.ZodString>;
180
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
181
+ patchHostId: z.ZodString;
182
+ insideMap: z.ZodOptional<z.ZodBoolean>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ key: string;
185
+ label: string;
186
+ file: string;
187
+ line: number;
188
+ column: number;
189
+ tagName: string;
190
+ textEditable: boolean;
191
+ patchHostId: string;
192
+ textPreview?: string | undefined;
193
+ nuvioId?: string | undefined;
194
+ insideMap?: boolean | undefined;
195
+ }, {
196
+ key: string;
197
+ label: string;
198
+ file: string;
199
+ line: number;
200
+ column: number;
201
+ tagName: string;
202
+ textEditable: boolean;
203
+ patchHostId: string;
204
+ textPreview?: string | undefined;
205
+ nuvioId?: string | undefined;
206
+ insideMap?: boolean | undefined;
207
+ }>, "many">>;
208
+ /** Index v3: explicit style patch targets for this selected host. */
209
+ styleTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
210
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
211
+ key: z.ZodString;
212
+ label: z.ZodString;
213
+ file: z.ZodString;
214
+ line: z.ZodNumber;
215
+ column: z.ZodNumber;
216
+ tagName: z.ZodString;
217
+ nuvioId: z.ZodString;
218
+ patchHostId: z.ZodString;
219
+ classNamePatchable: z.ZodBoolean;
220
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ key: string;
223
+ label: string;
224
+ file: string;
225
+ line: number;
226
+ column: number;
227
+ tagName: string;
228
+ nuvioId: string;
229
+ patchHostId: string;
230
+ classNamePatchable: boolean;
231
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
232
+ }, {
233
+ key: string;
234
+ label: string;
235
+ file: string;
236
+ line: number;
237
+ column: number;
238
+ tagName: string;
239
+ nuvioId: string;
240
+ patchHostId: string;
241
+ classNamePatchable: boolean;
242
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
243
+ }>, "many">>;
244
+ /** Index v3: coarse host role, used for defaults/hints only. */
245
+ hierarchyRole: z.ZodOptional<z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>>;
246
+ /** Index v3: nearest ancestor host id in JSX ownership hierarchy. */
247
+ parentHostId: z.ZodOptional<z.ZodString>;
248
+ /** Index v3: descendant host ids under this host (if any). */
249
+ childTargetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
250
+ /** Index v4: row hosts when this entry is a table section. */
251
+ rowTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ rowKey: z.ZodString;
253
+ nuvioId: z.ZodString;
254
+ label: z.ZodString;
255
+ file: z.ZodString;
256
+ line: z.ZodNumber;
257
+ }, "strip", z.ZodTypeAny, {
258
+ label: string;
259
+ file: string;
260
+ line: number;
261
+ nuvioId: string;
262
+ rowKey: string;
263
+ }, {
264
+ label: string;
265
+ file: string;
266
+ line: number;
267
+ nuvioId: string;
268
+ rowKey: string;
269
+ }>, "many">>;
270
+ /** Index v4: static table data binding for Tier C. */
271
+ tableMeta: z.ZodOptional<z.ZodObject<{
272
+ dataBinding: z.ZodString;
273
+ file: z.ZodString;
274
+ line: z.ZodNumber;
275
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ file: string;
278
+ line: number;
279
+ dataBinding: string;
280
+ columns?: string[] | undefined;
281
+ }, {
282
+ file: string;
283
+ line: number;
284
+ dataBinding: string;
285
+ columns?: string[] | undefined;
286
+ }>>;
287
+ /** Index v4: when this host maps to a `tableData` field edit. */
288
+ tableDataField: z.ZodOptional<z.ZodObject<{
289
+ arrayName: z.ZodString;
290
+ rowKey: z.ZodString;
291
+ field: z.ZodString;
292
+ }, "strip", z.ZodTypeAny, {
293
+ rowKey: string;
294
+ arrayName: string;
295
+ field: string;
296
+ }, {
297
+ rowKey: string;
298
+ arrayName: string;
299
+ field: string;
300
+ }>>;
301
+ /** Index v5: detected className expression mode for patch routing. */
302
+ classNameMode: z.ZodOptional<z.ZodEnum<["literal-only", "cn-basic", "cn-conditional", "classnames-static", "unsupported"]>>;
303
+ /** Index v6: shadcn / TailAdmin / DaisyUI hint for this host. */
304
+ libraryHint: z.ZodOptional<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ file: string;
307
+ line: number;
308
+ column: number;
309
+ id: string;
310
+ tagName?: string | undefined;
311
+ textEditable?: boolean | undefined;
312
+ patchHostId?: string | undefined;
313
+ insideMap?: boolean | undefined;
314
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
315
+ componentName?: string | undefined;
316
+ hasLiteralClassName?: boolean | undefined;
317
+ classNameValue?: string | undefined;
318
+ structuralEditable?: boolean | undefined;
319
+ unsupportedReasons?: string[] | undefined;
320
+ primaryTextTargetKey?: string | undefined;
321
+ textTargets?: {
322
+ key: string;
323
+ label: string;
324
+ file: string;
325
+ line: number;
326
+ column: number;
327
+ tagName: string;
328
+ textEditable: boolean;
329
+ patchHostId: string;
330
+ textPreview?: string | undefined;
331
+ nuvioId?: string | undefined;
332
+ insideMap?: boolean | undefined;
333
+ }[] | undefined;
334
+ styleTargets?: {
335
+ key: string;
336
+ label: string;
337
+ file: string;
338
+ line: number;
339
+ column: number;
340
+ tagName: string;
341
+ nuvioId: string;
342
+ patchHostId: string;
343
+ classNamePatchable: boolean;
344
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
345
+ }[] | undefined;
346
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
347
+ parentHostId?: string | undefined;
348
+ childTargetIds?: string[] | undefined;
349
+ rowTargets?: {
350
+ label: string;
351
+ file: string;
352
+ line: number;
353
+ nuvioId: string;
354
+ rowKey: string;
355
+ }[] | undefined;
356
+ tableMeta?: {
357
+ file: string;
358
+ line: number;
359
+ dataBinding: string;
360
+ columns?: string[] | undefined;
361
+ } | undefined;
362
+ tableDataField?: {
363
+ rowKey: string;
364
+ arrayName: string;
365
+ field: string;
366
+ } | undefined;
367
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
368
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
369
+ }, {
370
+ file: string;
371
+ line: number;
372
+ column: number;
373
+ id: string;
374
+ tagName?: string | undefined;
375
+ textEditable?: boolean | undefined;
376
+ patchHostId?: string | undefined;
377
+ insideMap?: boolean | undefined;
378
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
379
+ componentName?: string | undefined;
380
+ hasLiteralClassName?: boolean | undefined;
381
+ classNameValue?: string | undefined;
382
+ structuralEditable?: boolean | undefined;
383
+ unsupportedReasons?: string[] | undefined;
384
+ primaryTextTargetKey?: string | undefined;
385
+ textTargets?: {
386
+ key: string;
387
+ label: string;
388
+ file: string;
389
+ line: number;
390
+ column: number;
391
+ tagName: string;
392
+ textEditable: boolean;
393
+ patchHostId: string;
394
+ textPreview?: string | undefined;
395
+ nuvioId?: string | undefined;
396
+ insideMap?: boolean | undefined;
397
+ }[] | undefined;
398
+ styleTargets?: {
399
+ key: string;
400
+ label: string;
401
+ file: string;
402
+ line: number;
403
+ column: number;
404
+ tagName: string;
405
+ nuvioId: string;
406
+ patchHostId: string;
407
+ classNamePatchable: boolean;
408
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
409
+ }[] | undefined;
410
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
411
+ parentHostId?: string | undefined;
412
+ childTargetIds?: string[] | undefined;
413
+ rowTargets?: {
414
+ label: string;
415
+ file: string;
416
+ line: number;
417
+ nuvioId: string;
418
+ rowKey: string;
419
+ }[] | undefined;
420
+ tableMeta?: {
421
+ file: string;
422
+ line: number;
423
+ dataBinding: string;
424
+ columns?: string[] | undefined;
425
+ } | undefined;
426
+ tableDataField?: {
427
+ rowKey: string;
428
+ arrayName: string;
429
+ field: string;
430
+ } | undefined;
431
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
432
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
433
+ }>;
434
+ type IndexWireEntry = z.infer<typeof indexEntrySchema>;
435
+ declare const runtimeDiagnosticsSchema: z.ZodObject<{
436
+ viteVersion: z.ZodOptional<z.ZodString>;
437
+ reactVersion: z.ZodOptional<z.ZodString>;
438
+ tailwindVersion: z.ZodOptional<z.ZodString>;
439
+ overlayCssMode: z.ZodOptional<z.ZodLiteral<"self-contained">>;
440
+ /** Project-level library detection (v0.8). */
441
+ detectedLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>, "many">>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ viteVersion?: string | undefined;
444
+ reactVersion?: string | undefined;
445
+ tailwindVersion?: string | undefined;
446
+ overlayCssMode?: "self-contained" | undefined;
447
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
448
+ }, {
449
+ viteVersion?: string | undefined;
450
+ reactVersion?: string | undefined;
451
+ tailwindVersion?: string | undefined;
452
+ overlayCssMode?: "self-contained" | undefined;
453
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
454
+ }>;
455
+ type RuntimeDiagnostics = z.infer<typeof runtimeDiagnosticsSchema>;
456
+ declare const duplicateIdOccurrenceSchema: z.ZodObject<{
457
+ file: z.ZodString;
458
+ line: z.ZodNumber;
459
+ column: z.ZodNumber;
460
+ }, "strip", z.ZodTypeAny, {
461
+ file: string;
462
+ line: number;
463
+ column: number;
464
+ }, {
465
+ file: string;
466
+ line: number;
467
+ column: number;
468
+ }>;
469
+ declare const duplicateIdErrorSchema: z.ZodObject<{
470
+ id: z.ZodString;
471
+ occurrences: z.ZodArray<z.ZodObject<{
472
+ file: z.ZodString;
473
+ line: z.ZodNumber;
474
+ column: z.ZodNumber;
475
+ }, "strip", z.ZodTypeAny, {
476
+ file: string;
477
+ line: number;
478
+ column: number;
479
+ }, {
480
+ file: string;
481
+ line: number;
482
+ column: number;
483
+ }>, "many">;
484
+ }, "strip", z.ZodTypeAny, {
485
+ id: string;
486
+ occurrences: {
487
+ file: string;
488
+ line: number;
489
+ column: number;
490
+ }[];
491
+ }, {
492
+ id: string;
493
+ occurrences: {
494
+ file: string;
495
+ line: number;
496
+ column: number;
497
+ }[];
498
+ }>;
499
+ type DuplicateIdError = z.infer<typeof duplicateIdErrorSchema>;
500
+ declare const clientPingSchema: z.ZodObject<{
501
+ type: z.ZodLiteral<"ping">;
502
+ protocolVersion: z.ZodNumber;
503
+ requestId: z.ZodString;
504
+ }, "strip", z.ZodTypeAny, {
505
+ type: "ping";
506
+ protocolVersion: number;
507
+ requestId: string;
508
+ }, {
509
+ type: "ping";
510
+ protocolVersion: number;
511
+ requestId: string;
512
+ }>;
513
+ type ClientPing = z.infer<typeof clientPingSchema>;
514
+ declare const clientSelectSchema: z.ZodObject<{
515
+ type: z.ZodLiteral<"select">;
516
+ protocolVersion: z.ZodNumber;
517
+ requestId: z.ZodString;
518
+ id: z.ZodString;
519
+ }, "strip", z.ZodTypeAny, {
520
+ type: "select";
521
+ id: string;
522
+ protocolVersion: number;
523
+ requestId: string;
524
+ }, {
525
+ type: "select";
526
+ id: string;
527
+ protocolVersion: number;
528
+ requestId: string;
529
+ }>;
530
+ type ClientSelect = z.infer<typeof clientSelectSchema>;
531
+ declare const patchOpSetTextSchema: z.ZodObject<{
532
+ kind: z.ZodLiteral<"setText">;
533
+ text: z.ZodString;
534
+ }, "strip", z.ZodTypeAny, {
535
+ text: string;
536
+ kind: "setText";
537
+ }, {
538
+ text: string;
539
+ kind: "setText";
540
+ }>;
541
+ declare const patchOpMergeTailwindSchema: z.ZodObject<{
542
+ kind: z.ZodLiteral<"mergeTailwindClassName">;
543
+ classNameFragment: z.ZodString;
544
+ }, "strip", z.ZodTypeAny, {
545
+ kind: "mergeTailwindClassName";
546
+ classNameFragment: string;
547
+ }, {
548
+ kind: "mergeTailwindClassName";
549
+ classNameFragment: string;
550
+ }>;
551
+ /** Reorder host among JSX element siblings under a flex/grid parent (Phase 4). */
552
+ declare const patchOpMoveSiblingSchema: z.ZodObject<{
553
+ kind: z.ZodLiteral<"moveSibling">;
554
+ direction: z.ZodEnum<["up", "down"]>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ kind: "moveSibling";
557
+ direction: "up" | "down";
558
+ }, {
559
+ kind: "moveSibling";
560
+ direction: "up" | "down";
561
+ }>;
562
+ /** Toggle `hidden` on a string-literal className (Phase 4 toolbar). */
563
+ declare const patchOpSetHiddenSchema: z.ZodObject<{
564
+ kind: z.ZodLiteral<"setHidden">;
565
+ hidden: z.ZodBoolean;
566
+ }, "strip", z.ZodTypeAny, {
567
+ kind: "setHidden";
568
+ hidden: boolean;
569
+ }, {
570
+ kind: "setHidden";
571
+ hidden: boolean;
572
+ }>;
573
+ /** Clone the host JSX element with a new unique `data-nuvio-id` (Phase 4 toolbar). */
574
+ declare const patchOpDuplicateHostSchema: z.ZodObject<{
575
+ kind: z.ZodLiteral<"duplicateHost">;
576
+ }, "strip", z.ZodTypeAny, {
577
+ kind: "duplicateHost";
578
+ }, {
579
+ kind: "duplicateHost";
580
+ }>;
581
+ /** Index v4: update a string field in a local `const` array (Tier C table cells). */
582
+ declare const patchOpSetTableDataFieldSchema: z.ZodObject<{
583
+ kind: z.ZodLiteral<"setTableDataField">;
584
+ arrayName: z.ZodString;
585
+ rowKey: z.ZodString;
586
+ field: z.ZodString;
587
+ value: z.ZodString;
588
+ }, "strip", z.ZodTypeAny, {
589
+ value: string;
590
+ rowKey: string;
591
+ arrayName: string;
592
+ field: string;
593
+ kind: "setTableDataField";
594
+ }, {
595
+ value: string;
596
+ rowKey: string;
597
+ arrayName: string;
598
+ field: string;
599
+ kind: "setTableDataField";
600
+ }>;
601
+ declare const patchOpSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
602
+ kind: z.ZodLiteral<"setText">;
603
+ text: z.ZodString;
604
+ }, "strip", z.ZodTypeAny, {
605
+ text: string;
606
+ kind: "setText";
607
+ }, {
608
+ text: string;
609
+ kind: "setText";
610
+ }>, z.ZodObject<{
611
+ kind: z.ZodLiteral<"mergeTailwindClassName">;
612
+ classNameFragment: z.ZodString;
613
+ }, "strip", z.ZodTypeAny, {
614
+ kind: "mergeTailwindClassName";
615
+ classNameFragment: string;
616
+ }, {
617
+ kind: "mergeTailwindClassName";
618
+ classNameFragment: string;
619
+ }>, z.ZodObject<{
620
+ kind: z.ZodLiteral<"removeTailwindClassName">;
621
+ classNameFragment: z.ZodString;
622
+ }, "strip", z.ZodTypeAny, {
623
+ kind: "removeTailwindClassName";
624
+ classNameFragment: string;
625
+ }, {
626
+ kind: "removeTailwindClassName";
627
+ classNameFragment: string;
628
+ }>, z.ZodObject<{
629
+ kind: z.ZodLiteral<"moveSibling">;
630
+ direction: z.ZodEnum<["up", "down"]>;
631
+ }, "strip", z.ZodTypeAny, {
632
+ kind: "moveSibling";
633
+ direction: "up" | "down";
634
+ }, {
635
+ kind: "moveSibling";
636
+ direction: "up" | "down";
637
+ }>, z.ZodObject<{
638
+ kind: z.ZodLiteral<"setHidden">;
639
+ hidden: z.ZodBoolean;
640
+ }, "strip", z.ZodTypeAny, {
641
+ kind: "setHidden";
642
+ hidden: boolean;
643
+ }, {
644
+ kind: "setHidden";
645
+ hidden: boolean;
646
+ }>, z.ZodObject<{
647
+ kind: z.ZodLiteral<"duplicateHost">;
648
+ }, "strip", z.ZodTypeAny, {
649
+ kind: "duplicateHost";
650
+ }, {
651
+ kind: "duplicateHost";
652
+ }>, z.ZodObject<{
653
+ kind: z.ZodLiteral<"setTableDataField">;
654
+ arrayName: z.ZodString;
655
+ rowKey: z.ZodString;
656
+ field: z.ZodString;
657
+ value: z.ZodString;
658
+ }, "strip", z.ZodTypeAny, {
659
+ value: string;
660
+ rowKey: string;
661
+ arrayName: string;
662
+ field: string;
663
+ kind: "setTableDataField";
664
+ }, {
665
+ value: string;
666
+ rowKey: string;
667
+ arrayName: string;
668
+ field: string;
669
+ kind: "setTableDataField";
670
+ }>]>;
671
+ type PatchOp = z.infer<typeof patchOpSchema>;
672
+ declare const breakpointSchema: z.ZodEnum<["base", "sm", "md", "lg", "xl"]>;
673
+ type Breakpoint = z.infer<typeof breakpointSchema>;
674
+ declare const clientPatchApplySchema: z.ZodObject<{
675
+ type: z.ZodLiteral<"patchApply">;
676
+ protocolVersion: z.ZodNumber;
677
+ requestId: z.ZodString;
678
+ id: z.ZodString;
679
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
680
+ kind: z.ZodLiteral<"setText">;
681
+ text: z.ZodString;
682
+ }, "strip", z.ZodTypeAny, {
683
+ text: string;
684
+ kind: "setText";
685
+ }, {
686
+ text: string;
687
+ kind: "setText";
688
+ }>, z.ZodObject<{
689
+ kind: z.ZodLiteral<"mergeTailwindClassName">;
690
+ classNameFragment: z.ZodString;
691
+ }, "strip", z.ZodTypeAny, {
692
+ kind: "mergeTailwindClassName";
693
+ classNameFragment: string;
694
+ }, {
695
+ kind: "mergeTailwindClassName";
696
+ classNameFragment: string;
697
+ }>, z.ZodObject<{
698
+ kind: z.ZodLiteral<"removeTailwindClassName">;
699
+ classNameFragment: z.ZodString;
700
+ }, "strip", z.ZodTypeAny, {
701
+ kind: "removeTailwindClassName";
702
+ classNameFragment: string;
703
+ }, {
704
+ kind: "removeTailwindClassName";
705
+ classNameFragment: string;
706
+ }>, z.ZodObject<{
707
+ kind: z.ZodLiteral<"moveSibling">;
708
+ direction: z.ZodEnum<["up", "down"]>;
709
+ }, "strip", z.ZodTypeAny, {
710
+ kind: "moveSibling";
711
+ direction: "up" | "down";
712
+ }, {
713
+ kind: "moveSibling";
714
+ direction: "up" | "down";
715
+ }>, z.ZodObject<{
716
+ kind: z.ZodLiteral<"setHidden">;
717
+ hidden: z.ZodBoolean;
718
+ }, "strip", z.ZodTypeAny, {
719
+ kind: "setHidden";
720
+ hidden: boolean;
721
+ }, {
722
+ kind: "setHidden";
723
+ hidden: boolean;
724
+ }>, z.ZodObject<{
725
+ kind: z.ZodLiteral<"duplicateHost">;
726
+ }, "strip", z.ZodTypeAny, {
727
+ kind: "duplicateHost";
728
+ }, {
729
+ kind: "duplicateHost";
730
+ }>, z.ZodObject<{
731
+ kind: z.ZodLiteral<"setTableDataField">;
732
+ arrayName: z.ZodString;
733
+ rowKey: z.ZodString;
734
+ field: z.ZodString;
735
+ value: z.ZodString;
736
+ }, "strip", z.ZodTypeAny, {
737
+ value: string;
738
+ rowKey: string;
739
+ arrayName: string;
740
+ field: string;
741
+ kind: "setTableDataField";
742
+ }, {
743
+ value: string;
744
+ rowKey: string;
745
+ arrayName: string;
746
+ field: string;
747
+ kind: "setTableDataField";
748
+ }>]>, "many">;
749
+ /** Optional responsive context for className merges. */
750
+ activeBreakpoint: z.ZodOptional<z.ZodEnum<["base", "sm", "md", "lg", "xl"]>>;
751
+ /** When true, server validates and returns `patchAck` with `diffSummary` but does not write disk or push undo. */
752
+ dryRun: z.ZodOptional<z.ZodBoolean>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ type: "patchApply";
755
+ id: string;
756
+ protocolVersion: number;
757
+ requestId: string;
758
+ ops: ({
759
+ text: string;
760
+ kind: "setText";
761
+ } | {
762
+ kind: "mergeTailwindClassName";
763
+ classNameFragment: string;
764
+ } | {
765
+ kind: "removeTailwindClassName";
766
+ classNameFragment: string;
767
+ } | {
768
+ kind: "moveSibling";
769
+ direction: "up" | "down";
770
+ } | {
771
+ kind: "setHidden";
772
+ hidden: boolean;
773
+ } | {
774
+ kind: "duplicateHost";
775
+ } | {
776
+ value: string;
777
+ rowKey: string;
778
+ arrayName: string;
779
+ field: string;
780
+ kind: "setTableDataField";
781
+ })[];
782
+ activeBreakpoint?: "base" | "sm" | "md" | "lg" | "xl" | undefined;
783
+ dryRun?: boolean | undefined;
784
+ }, {
785
+ type: "patchApply";
786
+ id: string;
787
+ protocolVersion: number;
788
+ requestId: string;
789
+ ops: ({
790
+ text: string;
791
+ kind: "setText";
792
+ } | {
793
+ kind: "mergeTailwindClassName";
794
+ classNameFragment: string;
795
+ } | {
796
+ kind: "removeTailwindClassName";
797
+ classNameFragment: string;
798
+ } | {
799
+ kind: "moveSibling";
800
+ direction: "up" | "down";
801
+ } | {
802
+ kind: "setHidden";
803
+ hidden: boolean;
804
+ } | {
805
+ kind: "duplicateHost";
806
+ } | {
807
+ value: string;
808
+ rowKey: string;
809
+ arrayName: string;
810
+ field: string;
811
+ kind: "setTableDataField";
812
+ })[];
813
+ activeBreakpoint?: "base" | "sm" | "md" | "lg" | "xl" | undefined;
814
+ dryRun?: boolean | undefined;
815
+ }>;
816
+ type ClientPatchApply = z.infer<typeof clientPatchApplySchema>;
817
+ declare const clientPatchUndoSchema: z.ZodObject<{
818
+ type: z.ZodLiteral<"patchUndo">;
819
+ protocolVersion: z.ZodNumber;
820
+ requestId: z.ZodString;
821
+ }, "strip", z.ZodTypeAny, {
822
+ type: "patchUndo";
823
+ protocolVersion: number;
824
+ requestId: string;
825
+ }, {
826
+ type: "patchUndo";
827
+ protocolVersion: number;
828
+ requestId: string;
829
+ }>;
830
+ type ClientPatchUndo = z.infer<typeof clientPatchUndoSchema>;
831
+ /** v0.6: insert data-nuvio-id at a dev-time source location (click-to-tag). */
832
+ declare const clientTagElementSchema: z.ZodObject<{
833
+ type: z.ZodLiteral<"tagElement">;
834
+ protocolVersion: z.ZodNumber;
835
+ requestId: z.ZodString;
836
+ file: z.ZodString;
837
+ line: z.ZodNumber;
838
+ column: z.ZodNumber;
839
+ nuvioId: z.ZodString;
840
+ }, "strip", z.ZodTypeAny, {
841
+ type: "tagElement";
842
+ file: string;
843
+ line: number;
844
+ column: number;
845
+ nuvioId: string;
846
+ protocolVersion: number;
847
+ requestId: string;
848
+ }, {
849
+ type: "tagElement";
850
+ file: string;
851
+ line: number;
852
+ column: number;
853
+ nuvioId: string;
854
+ protocolVersion: number;
855
+ requestId: string;
856
+ }>;
857
+ type ClientTagElement = z.infer<typeof clientTagElementSchema>;
858
+ declare const clientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
859
+ type: z.ZodLiteral<"ping">;
860
+ protocolVersion: z.ZodNumber;
861
+ requestId: z.ZodString;
862
+ }, "strip", z.ZodTypeAny, {
863
+ type: "ping";
864
+ protocolVersion: number;
865
+ requestId: string;
866
+ }, {
867
+ type: "ping";
868
+ protocolVersion: number;
869
+ requestId: string;
870
+ }>, z.ZodObject<{
871
+ type: z.ZodLiteral<"select">;
872
+ protocolVersion: z.ZodNumber;
873
+ requestId: z.ZodString;
874
+ id: z.ZodString;
875
+ }, "strip", z.ZodTypeAny, {
876
+ type: "select";
877
+ id: string;
878
+ protocolVersion: number;
879
+ requestId: string;
880
+ }, {
881
+ type: "select";
882
+ id: string;
883
+ protocolVersion: number;
884
+ requestId: string;
885
+ }>, z.ZodObject<{
886
+ type: z.ZodLiteral<"patchApply">;
887
+ protocolVersion: z.ZodNumber;
888
+ requestId: z.ZodString;
889
+ id: z.ZodString;
890
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
891
+ kind: z.ZodLiteral<"setText">;
892
+ text: z.ZodString;
893
+ }, "strip", z.ZodTypeAny, {
894
+ text: string;
895
+ kind: "setText";
896
+ }, {
897
+ text: string;
898
+ kind: "setText";
899
+ }>, z.ZodObject<{
900
+ kind: z.ZodLiteral<"mergeTailwindClassName">;
901
+ classNameFragment: z.ZodString;
902
+ }, "strip", z.ZodTypeAny, {
903
+ kind: "mergeTailwindClassName";
904
+ classNameFragment: string;
905
+ }, {
906
+ kind: "mergeTailwindClassName";
907
+ classNameFragment: string;
908
+ }>, z.ZodObject<{
909
+ kind: z.ZodLiteral<"removeTailwindClassName">;
910
+ classNameFragment: z.ZodString;
911
+ }, "strip", z.ZodTypeAny, {
912
+ kind: "removeTailwindClassName";
913
+ classNameFragment: string;
914
+ }, {
915
+ kind: "removeTailwindClassName";
916
+ classNameFragment: string;
917
+ }>, z.ZodObject<{
918
+ kind: z.ZodLiteral<"moveSibling">;
919
+ direction: z.ZodEnum<["up", "down"]>;
920
+ }, "strip", z.ZodTypeAny, {
921
+ kind: "moveSibling";
922
+ direction: "up" | "down";
923
+ }, {
924
+ kind: "moveSibling";
925
+ direction: "up" | "down";
926
+ }>, z.ZodObject<{
927
+ kind: z.ZodLiteral<"setHidden">;
928
+ hidden: z.ZodBoolean;
929
+ }, "strip", z.ZodTypeAny, {
930
+ kind: "setHidden";
931
+ hidden: boolean;
932
+ }, {
933
+ kind: "setHidden";
934
+ hidden: boolean;
935
+ }>, z.ZodObject<{
936
+ kind: z.ZodLiteral<"duplicateHost">;
937
+ }, "strip", z.ZodTypeAny, {
938
+ kind: "duplicateHost";
939
+ }, {
940
+ kind: "duplicateHost";
941
+ }>, z.ZodObject<{
942
+ kind: z.ZodLiteral<"setTableDataField">;
943
+ arrayName: z.ZodString;
944
+ rowKey: z.ZodString;
945
+ field: z.ZodString;
946
+ value: z.ZodString;
947
+ }, "strip", z.ZodTypeAny, {
948
+ value: string;
949
+ rowKey: string;
950
+ arrayName: string;
951
+ field: string;
952
+ kind: "setTableDataField";
953
+ }, {
954
+ value: string;
955
+ rowKey: string;
956
+ arrayName: string;
957
+ field: string;
958
+ kind: "setTableDataField";
959
+ }>]>, "many">;
960
+ /** Optional responsive context for className merges. */
961
+ activeBreakpoint: z.ZodOptional<z.ZodEnum<["base", "sm", "md", "lg", "xl"]>>;
962
+ /** When true, server validates and returns `patchAck` with `diffSummary` but does not write disk or push undo. */
963
+ dryRun: z.ZodOptional<z.ZodBoolean>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ type: "patchApply";
966
+ id: string;
967
+ protocolVersion: number;
968
+ requestId: string;
969
+ ops: ({
970
+ text: string;
971
+ kind: "setText";
972
+ } | {
973
+ kind: "mergeTailwindClassName";
974
+ classNameFragment: string;
975
+ } | {
976
+ kind: "removeTailwindClassName";
977
+ classNameFragment: string;
978
+ } | {
979
+ kind: "moveSibling";
980
+ direction: "up" | "down";
981
+ } | {
982
+ kind: "setHidden";
983
+ hidden: boolean;
984
+ } | {
985
+ kind: "duplicateHost";
986
+ } | {
987
+ value: string;
988
+ rowKey: string;
989
+ arrayName: string;
990
+ field: string;
991
+ kind: "setTableDataField";
992
+ })[];
993
+ activeBreakpoint?: "base" | "sm" | "md" | "lg" | "xl" | undefined;
994
+ dryRun?: boolean | undefined;
995
+ }, {
996
+ type: "patchApply";
997
+ id: string;
998
+ protocolVersion: number;
999
+ requestId: string;
1000
+ ops: ({
1001
+ text: string;
1002
+ kind: "setText";
1003
+ } | {
1004
+ kind: "mergeTailwindClassName";
1005
+ classNameFragment: string;
1006
+ } | {
1007
+ kind: "removeTailwindClassName";
1008
+ classNameFragment: string;
1009
+ } | {
1010
+ kind: "moveSibling";
1011
+ direction: "up" | "down";
1012
+ } | {
1013
+ kind: "setHidden";
1014
+ hidden: boolean;
1015
+ } | {
1016
+ kind: "duplicateHost";
1017
+ } | {
1018
+ value: string;
1019
+ rowKey: string;
1020
+ arrayName: string;
1021
+ field: string;
1022
+ kind: "setTableDataField";
1023
+ })[];
1024
+ activeBreakpoint?: "base" | "sm" | "md" | "lg" | "xl" | undefined;
1025
+ dryRun?: boolean | undefined;
1026
+ }>, z.ZodObject<{
1027
+ type: z.ZodLiteral<"patchUndo">;
1028
+ protocolVersion: z.ZodNumber;
1029
+ requestId: z.ZodString;
1030
+ }, "strip", z.ZodTypeAny, {
1031
+ type: "patchUndo";
1032
+ protocolVersion: number;
1033
+ requestId: string;
1034
+ }, {
1035
+ type: "patchUndo";
1036
+ protocolVersion: number;
1037
+ requestId: string;
1038
+ }>, z.ZodObject<{
1039
+ type: z.ZodLiteral<"tagElement">;
1040
+ protocolVersion: z.ZodNumber;
1041
+ requestId: z.ZodString;
1042
+ file: z.ZodString;
1043
+ line: z.ZodNumber;
1044
+ column: z.ZodNumber;
1045
+ nuvioId: z.ZodString;
1046
+ }, "strip", z.ZodTypeAny, {
1047
+ type: "tagElement";
1048
+ file: string;
1049
+ line: number;
1050
+ column: number;
1051
+ nuvioId: string;
1052
+ protocolVersion: number;
1053
+ requestId: string;
1054
+ }, {
1055
+ type: "tagElement";
1056
+ file: string;
1057
+ line: number;
1058
+ column: number;
1059
+ nuvioId: string;
1060
+ protocolVersion: number;
1061
+ requestId: string;
1062
+ }>]>;
1063
+ type ClientMessage = z.infer<typeof clientMessageSchema>;
1064
+ declare const serverPongSchema: z.ZodObject<{
1065
+ type: z.ZodLiteral<"pong">;
1066
+ protocolVersion: z.ZodNumber;
1067
+ requestId: z.ZodString;
1068
+ diagnostics: z.ZodOptional<z.ZodObject<{
1069
+ viteVersion: z.ZodOptional<z.ZodString>;
1070
+ reactVersion: z.ZodOptional<z.ZodString>;
1071
+ tailwindVersion: z.ZodOptional<z.ZodString>;
1072
+ overlayCssMode: z.ZodOptional<z.ZodLiteral<"self-contained">>;
1073
+ /** Project-level library detection (v0.8). */
1074
+ detectedLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>, "many">>;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ viteVersion?: string | undefined;
1077
+ reactVersion?: string | undefined;
1078
+ tailwindVersion?: string | undefined;
1079
+ overlayCssMode?: "self-contained" | undefined;
1080
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1081
+ }, {
1082
+ viteVersion?: string | undefined;
1083
+ reactVersion?: string | undefined;
1084
+ tailwindVersion?: string | undefined;
1085
+ overlayCssMode?: "self-contained" | undefined;
1086
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1087
+ }>>;
1088
+ }, "strip", z.ZodTypeAny, {
1089
+ type: "pong";
1090
+ protocolVersion: number;
1091
+ requestId: string;
1092
+ diagnostics?: {
1093
+ viteVersion?: string | undefined;
1094
+ reactVersion?: string | undefined;
1095
+ tailwindVersion?: string | undefined;
1096
+ overlayCssMode?: "self-contained" | undefined;
1097
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1098
+ } | undefined;
1099
+ }, {
1100
+ type: "pong";
1101
+ protocolVersion: number;
1102
+ requestId: string;
1103
+ diagnostics?: {
1104
+ viteVersion?: string | undefined;
1105
+ reactVersion?: string | undefined;
1106
+ tailwindVersion?: string | undefined;
1107
+ overlayCssMode?: "self-contained" | undefined;
1108
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1109
+ } | undefined;
1110
+ }>;
1111
+ declare const serverErrorSchema: z.ZodObject<{
1112
+ type: z.ZodLiteral<"error">;
1113
+ code: z.ZodString;
1114
+ message: z.ZodString;
1115
+ requestId: z.ZodOptional<z.ZodString>;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ code: string;
1118
+ message: string;
1119
+ type: "error";
1120
+ requestId?: string | undefined;
1121
+ }, {
1122
+ code: string;
1123
+ message: string;
1124
+ type: "error";
1125
+ requestId?: string | undefined;
1126
+ }>;
1127
+ declare const serverIndexReadySchema: z.ZodObject<{
1128
+ type: z.ZodLiteral<"indexReady">;
1129
+ protocolVersion: z.ZodNumber;
1130
+ indexVersion: z.ZodNumber;
1131
+ entries: z.ZodArray<z.ZodObject<{
1132
+ id: z.ZodString;
1133
+ file: z.ZodString;
1134
+ line: z.ZodNumber;
1135
+ column: z.ZodNumber;
1136
+ /** Source index v2 metadata */
1137
+ tagName: z.ZodOptional<z.ZodString>;
1138
+ componentName: z.ZodOptional<z.ZodString>;
1139
+ hasLiteralClassName: z.ZodOptional<z.ZodBoolean>;
1140
+ classNameValue: z.ZodOptional<z.ZodString>;
1141
+ textEditable: z.ZodOptional<z.ZodBoolean>;
1142
+ structuralEditable: z.ZodOptional<z.ZodBoolean>;
1143
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
1144
+ unsupportedReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1145
+ insideMap: z.ZodOptional<z.ZodBoolean>;
1146
+ /** Index v3: default id for className patches on this host. */
1147
+ patchHostId: z.ZodOptional<z.ZodString>;
1148
+ /** Index v3: preferred text target key in `textTargets`. */
1149
+ primaryTextTargetKey: z.ZodOptional<z.ZodString>;
1150
+ /** Index v3: descendant (and host) text edit targets. */
1151
+ textTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1152
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
1153
+ key: z.ZodString;
1154
+ label: z.ZodString;
1155
+ file: z.ZodString;
1156
+ line: z.ZodNumber;
1157
+ column: z.ZodNumber;
1158
+ tagName: z.ZodString;
1159
+ textEditable: z.ZodBoolean;
1160
+ textPreview: z.ZodOptional<z.ZodString>;
1161
+ /** Present when the text node has its own `data-nuvio-id`. */
1162
+ nuvioId: z.ZodOptional<z.ZodString>;
1163
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
1164
+ patchHostId: z.ZodString;
1165
+ insideMap: z.ZodOptional<z.ZodBoolean>;
1166
+ }, "strip", z.ZodTypeAny, {
1167
+ key: string;
1168
+ label: string;
1169
+ file: string;
1170
+ line: number;
1171
+ column: number;
1172
+ tagName: string;
1173
+ textEditable: boolean;
1174
+ patchHostId: string;
1175
+ textPreview?: string | undefined;
1176
+ nuvioId?: string | undefined;
1177
+ insideMap?: boolean | undefined;
1178
+ }, {
1179
+ key: string;
1180
+ label: string;
1181
+ file: string;
1182
+ line: number;
1183
+ column: number;
1184
+ tagName: string;
1185
+ textEditable: boolean;
1186
+ patchHostId: string;
1187
+ textPreview?: string | undefined;
1188
+ nuvioId?: string | undefined;
1189
+ insideMap?: boolean | undefined;
1190
+ }>, "many">>;
1191
+ /** Index v3: explicit style patch targets for this selected host. */
1192
+ styleTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1193
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
1194
+ key: z.ZodString;
1195
+ label: z.ZodString;
1196
+ file: z.ZodString;
1197
+ line: z.ZodNumber;
1198
+ column: z.ZodNumber;
1199
+ tagName: z.ZodString;
1200
+ nuvioId: z.ZodString;
1201
+ patchHostId: z.ZodString;
1202
+ classNamePatchable: z.ZodBoolean;
1203
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
1204
+ }, "strip", z.ZodTypeAny, {
1205
+ key: string;
1206
+ label: string;
1207
+ file: string;
1208
+ line: number;
1209
+ column: number;
1210
+ tagName: string;
1211
+ nuvioId: string;
1212
+ patchHostId: string;
1213
+ classNamePatchable: boolean;
1214
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1215
+ }, {
1216
+ key: string;
1217
+ label: string;
1218
+ file: string;
1219
+ line: number;
1220
+ column: number;
1221
+ tagName: string;
1222
+ nuvioId: string;
1223
+ patchHostId: string;
1224
+ classNamePatchable: boolean;
1225
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1226
+ }>, "many">>;
1227
+ /** Index v3: coarse host role, used for defaults/hints only. */
1228
+ hierarchyRole: z.ZodOptional<z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>>;
1229
+ /** Index v3: nearest ancestor host id in JSX ownership hierarchy. */
1230
+ parentHostId: z.ZodOptional<z.ZodString>;
1231
+ /** Index v3: descendant host ids under this host (if any). */
1232
+ childTargetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1233
+ /** Index v4: row hosts when this entry is a table section. */
1234
+ rowTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1235
+ rowKey: z.ZodString;
1236
+ nuvioId: z.ZodString;
1237
+ label: z.ZodString;
1238
+ file: z.ZodString;
1239
+ line: z.ZodNumber;
1240
+ }, "strip", z.ZodTypeAny, {
1241
+ label: string;
1242
+ file: string;
1243
+ line: number;
1244
+ nuvioId: string;
1245
+ rowKey: string;
1246
+ }, {
1247
+ label: string;
1248
+ file: string;
1249
+ line: number;
1250
+ nuvioId: string;
1251
+ rowKey: string;
1252
+ }>, "many">>;
1253
+ /** Index v4: static table data binding for Tier C. */
1254
+ tableMeta: z.ZodOptional<z.ZodObject<{
1255
+ dataBinding: z.ZodString;
1256
+ file: z.ZodString;
1257
+ line: z.ZodNumber;
1258
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1259
+ }, "strip", z.ZodTypeAny, {
1260
+ file: string;
1261
+ line: number;
1262
+ dataBinding: string;
1263
+ columns?: string[] | undefined;
1264
+ }, {
1265
+ file: string;
1266
+ line: number;
1267
+ dataBinding: string;
1268
+ columns?: string[] | undefined;
1269
+ }>>;
1270
+ /** Index v4: when this host maps to a `tableData` field edit. */
1271
+ tableDataField: z.ZodOptional<z.ZodObject<{
1272
+ arrayName: z.ZodString;
1273
+ rowKey: z.ZodString;
1274
+ field: z.ZodString;
1275
+ }, "strip", z.ZodTypeAny, {
1276
+ rowKey: string;
1277
+ arrayName: string;
1278
+ field: string;
1279
+ }, {
1280
+ rowKey: string;
1281
+ arrayName: string;
1282
+ field: string;
1283
+ }>>;
1284
+ /** Index v5: detected className expression mode for patch routing. */
1285
+ classNameMode: z.ZodOptional<z.ZodEnum<["literal-only", "cn-basic", "cn-conditional", "classnames-static", "unsupported"]>>;
1286
+ /** Index v6: shadcn / TailAdmin / DaisyUI hint for this host. */
1287
+ libraryHint: z.ZodOptional<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>>;
1288
+ }, "strip", z.ZodTypeAny, {
1289
+ file: string;
1290
+ line: number;
1291
+ column: number;
1292
+ id: string;
1293
+ tagName?: string | undefined;
1294
+ textEditable?: boolean | undefined;
1295
+ patchHostId?: string | undefined;
1296
+ insideMap?: boolean | undefined;
1297
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1298
+ componentName?: string | undefined;
1299
+ hasLiteralClassName?: boolean | undefined;
1300
+ classNameValue?: string | undefined;
1301
+ structuralEditable?: boolean | undefined;
1302
+ unsupportedReasons?: string[] | undefined;
1303
+ primaryTextTargetKey?: string | undefined;
1304
+ textTargets?: {
1305
+ key: string;
1306
+ label: string;
1307
+ file: string;
1308
+ line: number;
1309
+ column: number;
1310
+ tagName: string;
1311
+ textEditable: boolean;
1312
+ patchHostId: string;
1313
+ textPreview?: string | undefined;
1314
+ nuvioId?: string | undefined;
1315
+ insideMap?: boolean | undefined;
1316
+ }[] | undefined;
1317
+ styleTargets?: {
1318
+ key: string;
1319
+ label: string;
1320
+ file: string;
1321
+ line: number;
1322
+ column: number;
1323
+ tagName: string;
1324
+ nuvioId: string;
1325
+ patchHostId: string;
1326
+ classNamePatchable: boolean;
1327
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1328
+ }[] | undefined;
1329
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1330
+ parentHostId?: string | undefined;
1331
+ childTargetIds?: string[] | undefined;
1332
+ rowTargets?: {
1333
+ label: string;
1334
+ file: string;
1335
+ line: number;
1336
+ nuvioId: string;
1337
+ rowKey: string;
1338
+ }[] | undefined;
1339
+ tableMeta?: {
1340
+ file: string;
1341
+ line: number;
1342
+ dataBinding: string;
1343
+ columns?: string[] | undefined;
1344
+ } | undefined;
1345
+ tableDataField?: {
1346
+ rowKey: string;
1347
+ arrayName: string;
1348
+ field: string;
1349
+ } | undefined;
1350
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
1351
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
1352
+ }, {
1353
+ file: string;
1354
+ line: number;
1355
+ column: number;
1356
+ id: string;
1357
+ tagName?: string | undefined;
1358
+ textEditable?: boolean | undefined;
1359
+ patchHostId?: string | undefined;
1360
+ insideMap?: boolean | undefined;
1361
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1362
+ componentName?: string | undefined;
1363
+ hasLiteralClassName?: boolean | undefined;
1364
+ classNameValue?: string | undefined;
1365
+ structuralEditable?: boolean | undefined;
1366
+ unsupportedReasons?: string[] | undefined;
1367
+ primaryTextTargetKey?: string | undefined;
1368
+ textTargets?: {
1369
+ key: string;
1370
+ label: string;
1371
+ file: string;
1372
+ line: number;
1373
+ column: number;
1374
+ tagName: string;
1375
+ textEditable: boolean;
1376
+ patchHostId: string;
1377
+ textPreview?: string | undefined;
1378
+ nuvioId?: string | undefined;
1379
+ insideMap?: boolean | undefined;
1380
+ }[] | undefined;
1381
+ styleTargets?: {
1382
+ key: string;
1383
+ label: string;
1384
+ file: string;
1385
+ line: number;
1386
+ column: number;
1387
+ tagName: string;
1388
+ nuvioId: string;
1389
+ patchHostId: string;
1390
+ classNamePatchable: boolean;
1391
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1392
+ }[] | undefined;
1393
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1394
+ parentHostId?: string | undefined;
1395
+ childTargetIds?: string[] | undefined;
1396
+ rowTargets?: {
1397
+ label: string;
1398
+ file: string;
1399
+ line: number;
1400
+ nuvioId: string;
1401
+ rowKey: string;
1402
+ }[] | undefined;
1403
+ tableMeta?: {
1404
+ file: string;
1405
+ line: number;
1406
+ dataBinding: string;
1407
+ columns?: string[] | undefined;
1408
+ } | undefined;
1409
+ tableDataField?: {
1410
+ rowKey: string;
1411
+ arrayName: string;
1412
+ field: string;
1413
+ } | undefined;
1414
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
1415
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
1416
+ }>, "many">;
1417
+ duplicateErrors: z.ZodArray<z.ZodObject<{
1418
+ id: z.ZodString;
1419
+ occurrences: z.ZodArray<z.ZodObject<{
1420
+ file: z.ZodString;
1421
+ line: z.ZodNumber;
1422
+ column: z.ZodNumber;
1423
+ }, "strip", z.ZodTypeAny, {
1424
+ file: string;
1425
+ line: number;
1426
+ column: number;
1427
+ }, {
1428
+ file: string;
1429
+ line: number;
1430
+ column: number;
1431
+ }>, "many">;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ id: string;
1434
+ occurrences: {
1435
+ file: string;
1436
+ line: number;
1437
+ column: number;
1438
+ }[];
1439
+ }, {
1440
+ id: string;
1441
+ occurrences: {
1442
+ file: string;
1443
+ line: number;
1444
+ column: number;
1445
+ }[];
1446
+ }>, "many">;
1447
+ diagnostics: z.ZodOptional<z.ZodObject<{
1448
+ viteVersion: z.ZodOptional<z.ZodString>;
1449
+ reactVersion: z.ZodOptional<z.ZodString>;
1450
+ tailwindVersion: z.ZodOptional<z.ZodString>;
1451
+ overlayCssMode: z.ZodOptional<z.ZodLiteral<"self-contained">>;
1452
+ /** Project-level library detection (v0.8). */
1453
+ detectedLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>, "many">>;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ viteVersion?: string | undefined;
1456
+ reactVersion?: string | undefined;
1457
+ tailwindVersion?: string | undefined;
1458
+ overlayCssMode?: "self-contained" | undefined;
1459
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1460
+ }, {
1461
+ viteVersion?: string | undefined;
1462
+ reactVersion?: string | undefined;
1463
+ tailwindVersion?: string | undefined;
1464
+ overlayCssMode?: "self-contained" | undefined;
1465
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1466
+ }>>;
1467
+ }, "strip", z.ZodTypeAny, {
1468
+ entries: {
1469
+ file: string;
1470
+ line: number;
1471
+ column: number;
1472
+ id: string;
1473
+ tagName?: string | undefined;
1474
+ textEditable?: boolean | undefined;
1475
+ patchHostId?: string | undefined;
1476
+ insideMap?: boolean | undefined;
1477
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1478
+ componentName?: string | undefined;
1479
+ hasLiteralClassName?: boolean | undefined;
1480
+ classNameValue?: string | undefined;
1481
+ structuralEditable?: boolean | undefined;
1482
+ unsupportedReasons?: string[] | undefined;
1483
+ primaryTextTargetKey?: string | undefined;
1484
+ textTargets?: {
1485
+ key: string;
1486
+ label: string;
1487
+ file: string;
1488
+ line: number;
1489
+ column: number;
1490
+ tagName: string;
1491
+ textEditable: boolean;
1492
+ patchHostId: string;
1493
+ textPreview?: string | undefined;
1494
+ nuvioId?: string | undefined;
1495
+ insideMap?: boolean | undefined;
1496
+ }[] | undefined;
1497
+ styleTargets?: {
1498
+ key: string;
1499
+ label: string;
1500
+ file: string;
1501
+ line: number;
1502
+ column: number;
1503
+ tagName: string;
1504
+ nuvioId: string;
1505
+ patchHostId: string;
1506
+ classNamePatchable: boolean;
1507
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1508
+ }[] | undefined;
1509
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1510
+ parentHostId?: string | undefined;
1511
+ childTargetIds?: string[] | undefined;
1512
+ rowTargets?: {
1513
+ label: string;
1514
+ file: string;
1515
+ line: number;
1516
+ nuvioId: string;
1517
+ rowKey: string;
1518
+ }[] | undefined;
1519
+ tableMeta?: {
1520
+ file: string;
1521
+ line: number;
1522
+ dataBinding: string;
1523
+ columns?: string[] | undefined;
1524
+ } | undefined;
1525
+ tableDataField?: {
1526
+ rowKey: string;
1527
+ arrayName: string;
1528
+ field: string;
1529
+ } | undefined;
1530
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
1531
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
1532
+ }[];
1533
+ type: "indexReady";
1534
+ protocolVersion: number;
1535
+ indexVersion: number;
1536
+ duplicateErrors: {
1537
+ id: string;
1538
+ occurrences: {
1539
+ file: string;
1540
+ line: number;
1541
+ column: number;
1542
+ }[];
1543
+ }[];
1544
+ diagnostics?: {
1545
+ viteVersion?: string | undefined;
1546
+ reactVersion?: string | undefined;
1547
+ tailwindVersion?: string | undefined;
1548
+ overlayCssMode?: "self-contained" | undefined;
1549
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1550
+ } | undefined;
1551
+ }, {
1552
+ entries: {
1553
+ file: string;
1554
+ line: number;
1555
+ column: number;
1556
+ id: string;
1557
+ tagName?: string | undefined;
1558
+ textEditable?: boolean | undefined;
1559
+ patchHostId?: string | undefined;
1560
+ insideMap?: boolean | undefined;
1561
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1562
+ componentName?: string | undefined;
1563
+ hasLiteralClassName?: boolean | undefined;
1564
+ classNameValue?: string | undefined;
1565
+ structuralEditable?: boolean | undefined;
1566
+ unsupportedReasons?: string[] | undefined;
1567
+ primaryTextTargetKey?: string | undefined;
1568
+ textTargets?: {
1569
+ key: string;
1570
+ label: string;
1571
+ file: string;
1572
+ line: number;
1573
+ column: number;
1574
+ tagName: string;
1575
+ textEditable: boolean;
1576
+ patchHostId: string;
1577
+ textPreview?: string | undefined;
1578
+ nuvioId?: string | undefined;
1579
+ insideMap?: boolean | undefined;
1580
+ }[] | undefined;
1581
+ styleTargets?: {
1582
+ key: string;
1583
+ label: string;
1584
+ file: string;
1585
+ line: number;
1586
+ column: number;
1587
+ tagName: string;
1588
+ nuvioId: string;
1589
+ patchHostId: string;
1590
+ classNamePatchable: boolean;
1591
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1592
+ }[] | undefined;
1593
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1594
+ parentHostId?: string | undefined;
1595
+ childTargetIds?: string[] | undefined;
1596
+ rowTargets?: {
1597
+ label: string;
1598
+ file: string;
1599
+ line: number;
1600
+ nuvioId: string;
1601
+ rowKey: string;
1602
+ }[] | undefined;
1603
+ tableMeta?: {
1604
+ file: string;
1605
+ line: number;
1606
+ dataBinding: string;
1607
+ columns?: string[] | undefined;
1608
+ } | undefined;
1609
+ tableDataField?: {
1610
+ rowKey: string;
1611
+ arrayName: string;
1612
+ field: string;
1613
+ } | undefined;
1614
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
1615
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
1616
+ }[];
1617
+ type: "indexReady";
1618
+ protocolVersion: number;
1619
+ indexVersion: number;
1620
+ duplicateErrors: {
1621
+ id: string;
1622
+ occurrences: {
1623
+ file: string;
1624
+ line: number;
1625
+ column: number;
1626
+ }[];
1627
+ }[];
1628
+ diagnostics?: {
1629
+ viteVersion?: string | undefined;
1630
+ reactVersion?: string | undefined;
1631
+ tailwindVersion?: string | undefined;
1632
+ overlayCssMode?: "self-contained" | undefined;
1633
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
1634
+ } | undefined;
1635
+ }>;
1636
+ type ServerIndexReady = z.infer<typeof serverIndexReadySchema>;
1637
+ declare const serverSelectAckSchema: z.ZodObject<{
1638
+ type: z.ZodLiteral<"selectAck">;
1639
+ protocolVersion: z.ZodNumber;
1640
+ requestId: z.ZodString;
1641
+ id: z.ZodString;
1642
+ ok: z.ZodBoolean;
1643
+ file: z.ZodOptional<z.ZodString>;
1644
+ line: z.ZodOptional<z.ZodNumber>;
1645
+ column: z.ZodOptional<z.ZodNumber>;
1646
+ /** Index v3 snapshot for the selected host (also on `indexReady` entries). */
1647
+ patchHostId: z.ZodOptional<z.ZodString>;
1648
+ primaryTextTargetKey: z.ZodOptional<z.ZodString>;
1649
+ textTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1650
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
1651
+ key: z.ZodString;
1652
+ label: z.ZodString;
1653
+ file: z.ZodString;
1654
+ line: z.ZodNumber;
1655
+ column: z.ZodNumber;
1656
+ tagName: z.ZodString;
1657
+ textEditable: z.ZodBoolean;
1658
+ textPreview: z.ZodOptional<z.ZodString>;
1659
+ /** Present when the text node has its own `data-nuvio-id`. */
1660
+ nuvioId: z.ZodOptional<z.ZodString>;
1661
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
1662
+ patchHostId: z.ZodString;
1663
+ insideMap: z.ZodOptional<z.ZodBoolean>;
1664
+ }, "strip", z.ZodTypeAny, {
1665
+ key: string;
1666
+ label: string;
1667
+ file: string;
1668
+ line: number;
1669
+ column: number;
1670
+ tagName: string;
1671
+ textEditable: boolean;
1672
+ patchHostId: string;
1673
+ textPreview?: string | undefined;
1674
+ nuvioId?: string | undefined;
1675
+ insideMap?: boolean | undefined;
1676
+ }, {
1677
+ key: string;
1678
+ label: string;
1679
+ file: string;
1680
+ line: number;
1681
+ column: number;
1682
+ tagName: string;
1683
+ textEditable: boolean;
1684
+ patchHostId: string;
1685
+ textPreview?: string | undefined;
1686
+ nuvioId?: string | undefined;
1687
+ insideMap?: boolean | undefined;
1688
+ }>, "many">>;
1689
+ styleTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1690
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
1691
+ key: z.ZodString;
1692
+ label: z.ZodString;
1693
+ file: z.ZodString;
1694
+ line: z.ZodNumber;
1695
+ column: z.ZodNumber;
1696
+ tagName: z.ZodString;
1697
+ nuvioId: z.ZodString;
1698
+ patchHostId: z.ZodString;
1699
+ classNamePatchable: z.ZodBoolean;
1700
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
1701
+ }, "strip", z.ZodTypeAny, {
1702
+ key: string;
1703
+ label: string;
1704
+ file: string;
1705
+ line: number;
1706
+ column: number;
1707
+ tagName: string;
1708
+ nuvioId: string;
1709
+ patchHostId: string;
1710
+ classNamePatchable: boolean;
1711
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1712
+ }, {
1713
+ key: string;
1714
+ label: string;
1715
+ file: string;
1716
+ line: number;
1717
+ column: number;
1718
+ tagName: string;
1719
+ nuvioId: string;
1720
+ patchHostId: string;
1721
+ classNamePatchable: boolean;
1722
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1723
+ }>, "many">>;
1724
+ hierarchyRole: z.ZodOptional<z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>>;
1725
+ parentHostId: z.ZodOptional<z.ZodString>;
1726
+ childTargetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1727
+ rowTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1728
+ rowKey: z.ZodString;
1729
+ nuvioId: z.ZodString;
1730
+ label: z.ZodString;
1731
+ file: z.ZodString;
1732
+ line: z.ZodNumber;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ label: string;
1735
+ file: string;
1736
+ line: number;
1737
+ nuvioId: string;
1738
+ rowKey: string;
1739
+ }, {
1740
+ label: string;
1741
+ file: string;
1742
+ line: number;
1743
+ nuvioId: string;
1744
+ rowKey: string;
1745
+ }>, "many">>;
1746
+ tableMeta: z.ZodOptional<z.ZodObject<{
1747
+ dataBinding: z.ZodString;
1748
+ file: z.ZodString;
1749
+ line: z.ZodNumber;
1750
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1751
+ }, "strip", z.ZodTypeAny, {
1752
+ file: string;
1753
+ line: number;
1754
+ dataBinding: string;
1755
+ columns?: string[] | undefined;
1756
+ }, {
1757
+ file: string;
1758
+ line: number;
1759
+ dataBinding: string;
1760
+ columns?: string[] | undefined;
1761
+ }>>;
1762
+ tableDataField: z.ZodOptional<z.ZodObject<{
1763
+ arrayName: z.ZodString;
1764
+ rowKey: z.ZodString;
1765
+ field: z.ZodString;
1766
+ }, "strip", z.ZodTypeAny, {
1767
+ rowKey: string;
1768
+ arrayName: string;
1769
+ field: string;
1770
+ }, {
1771
+ rowKey: string;
1772
+ arrayName: string;
1773
+ field: string;
1774
+ }>>;
1775
+ errorCode: z.ZodOptional<z.ZodString>;
1776
+ errorMessage: z.ZodOptional<z.ZodString>;
1777
+ }, "strip", z.ZodTypeAny, {
1778
+ type: "selectAck";
1779
+ id: string;
1780
+ protocolVersion: number;
1781
+ requestId: string;
1782
+ ok: boolean;
1783
+ file?: string | undefined;
1784
+ line?: number | undefined;
1785
+ column?: number | undefined;
1786
+ patchHostId?: string | undefined;
1787
+ primaryTextTargetKey?: string | undefined;
1788
+ textTargets?: {
1789
+ key: string;
1790
+ label: string;
1791
+ file: string;
1792
+ line: number;
1793
+ column: number;
1794
+ tagName: string;
1795
+ textEditable: boolean;
1796
+ patchHostId: string;
1797
+ textPreview?: string | undefined;
1798
+ nuvioId?: string | undefined;
1799
+ insideMap?: boolean | undefined;
1800
+ }[] | undefined;
1801
+ styleTargets?: {
1802
+ key: string;
1803
+ label: string;
1804
+ file: string;
1805
+ line: number;
1806
+ column: number;
1807
+ tagName: string;
1808
+ nuvioId: string;
1809
+ patchHostId: string;
1810
+ classNamePatchable: boolean;
1811
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1812
+ }[] | undefined;
1813
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1814
+ parentHostId?: string | undefined;
1815
+ childTargetIds?: string[] | undefined;
1816
+ rowTargets?: {
1817
+ label: string;
1818
+ file: string;
1819
+ line: number;
1820
+ nuvioId: string;
1821
+ rowKey: string;
1822
+ }[] | undefined;
1823
+ tableMeta?: {
1824
+ file: string;
1825
+ line: number;
1826
+ dataBinding: string;
1827
+ columns?: string[] | undefined;
1828
+ } | undefined;
1829
+ tableDataField?: {
1830
+ rowKey: string;
1831
+ arrayName: string;
1832
+ field: string;
1833
+ } | undefined;
1834
+ errorCode?: string | undefined;
1835
+ errorMessage?: string | undefined;
1836
+ }, {
1837
+ type: "selectAck";
1838
+ id: string;
1839
+ protocolVersion: number;
1840
+ requestId: string;
1841
+ ok: boolean;
1842
+ file?: string | undefined;
1843
+ line?: number | undefined;
1844
+ column?: number | undefined;
1845
+ patchHostId?: string | undefined;
1846
+ primaryTextTargetKey?: string | undefined;
1847
+ textTargets?: {
1848
+ key: string;
1849
+ label: string;
1850
+ file: string;
1851
+ line: number;
1852
+ column: number;
1853
+ tagName: string;
1854
+ textEditable: boolean;
1855
+ patchHostId: string;
1856
+ textPreview?: string | undefined;
1857
+ nuvioId?: string | undefined;
1858
+ insideMap?: boolean | undefined;
1859
+ }[] | undefined;
1860
+ styleTargets?: {
1861
+ key: string;
1862
+ label: string;
1863
+ file: string;
1864
+ line: number;
1865
+ column: number;
1866
+ tagName: string;
1867
+ nuvioId: string;
1868
+ patchHostId: string;
1869
+ classNamePatchable: boolean;
1870
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
1871
+ }[] | undefined;
1872
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
1873
+ parentHostId?: string | undefined;
1874
+ childTargetIds?: string[] | undefined;
1875
+ rowTargets?: {
1876
+ label: string;
1877
+ file: string;
1878
+ line: number;
1879
+ nuvioId: string;
1880
+ rowKey: string;
1881
+ }[] | undefined;
1882
+ tableMeta?: {
1883
+ file: string;
1884
+ line: number;
1885
+ dataBinding: string;
1886
+ columns?: string[] | undefined;
1887
+ } | undefined;
1888
+ tableDataField?: {
1889
+ rowKey: string;
1890
+ arrayName: string;
1891
+ field: string;
1892
+ } | undefined;
1893
+ errorCode?: string | undefined;
1894
+ errorMessage?: string | undefined;
1895
+ }>;
1896
+ type ServerSelectAck = z.infer<typeof serverSelectAckSchema>;
1897
+ declare const serverPatchAckSchema: z.ZodObject<{
1898
+ type: z.ZodLiteral<"patchAck">;
1899
+ protocolVersion: z.ZodNumber;
1900
+ requestId: z.ZodString;
1901
+ id: z.ZodString;
1902
+ ok: z.ZodBoolean;
1903
+ diffSummary: z.ZodOptional<z.ZodString>;
1904
+ /** Present when this ack is for a `patchApply` with `dryRun: true`. */
1905
+ dryRun: z.ZodOptional<z.ZodBoolean>;
1906
+ /** Absolute path written on successful non-dry apply (for touched-file log). */
1907
+ writtenFile: z.ZodOptional<z.ZodString>;
1908
+ /** Server undo stack size after this apply (non-dry success only). */
1909
+ undoStackDepth: z.ZodOptional<z.ZodNumber>;
1910
+ errorCode: z.ZodOptional<z.ZodString>;
1911
+ errorMessage: z.ZodOptional<z.ZodString>;
1912
+ }, "strip", z.ZodTypeAny, {
1913
+ type: "patchAck";
1914
+ id: string;
1915
+ protocolVersion: number;
1916
+ requestId: string;
1917
+ ok: boolean;
1918
+ dryRun?: boolean | undefined;
1919
+ errorCode?: string | undefined;
1920
+ errorMessage?: string | undefined;
1921
+ diffSummary?: string | undefined;
1922
+ writtenFile?: string | undefined;
1923
+ undoStackDepth?: number | undefined;
1924
+ }, {
1925
+ type: "patchAck";
1926
+ id: string;
1927
+ protocolVersion: number;
1928
+ requestId: string;
1929
+ ok: boolean;
1930
+ dryRun?: boolean | undefined;
1931
+ errorCode?: string | undefined;
1932
+ errorMessage?: string | undefined;
1933
+ diffSummary?: string | undefined;
1934
+ writtenFile?: string | undefined;
1935
+ undoStackDepth?: number | undefined;
1936
+ }>;
1937
+ type ServerPatchAck = z.infer<typeof serverPatchAckSchema>;
1938
+ declare const serverPatchUndoAckSchema: z.ZodObject<{
1939
+ type: z.ZodLiteral<"patchUndoAck">;
1940
+ protocolVersion: z.ZodNumber;
1941
+ requestId: z.ZodString;
1942
+ ok: z.ZodBoolean;
1943
+ file: z.ZodOptional<z.ZodString>;
1944
+ /** Remaining in-memory undo snapshots after this undo (success only). */
1945
+ undoStackDepth: z.ZodOptional<z.ZodNumber>;
1946
+ errorCode: z.ZodOptional<z.ZodString>;
1947
+ errorMessage: z.ZodOptional<z.ZodString>;
1948
+ }, "strip", z.ZodTypeAny, {
1949
+ type: "patchUndoAck";
1950
+ protocolVersion: number;
1951
+ requestId: string;
1952
+ ok: boolean;
1953
+ file?: string | undefined;
1954
+ errorCode?: string | undefined;
1955
+ errorMessage?: string | undefined;
1956
+ undoStackDepth?: number | undefined;
1957
+ }, {
1958
+ type: "patchUndoAck";
1959
+ protocolVersion: number;
1960
+ requestId: string;
1961
+ ok: boolean;
1962
+ file?: string | undefined;
1963
+ errorCode?: string | undefined;
1964
+ errorMessage?: string | undefined;
1965
+ undoStackDepth?: number | undefined;
1966
+ }>;
1967
+ type ServerPatchUndoAck = z.infer<typeof serverPatchUndoAckSchema>;
1968
+ declare const serverTagElementAckSchema: z.ZodObject<{
1969
+ type: z.ZodLiteral<"tagElementAck">;
1970
+ protocolVersion: z.ZodNumber;
1971
+ requestId: z.ZodString;
1972
+ ok: z.ZodBoolean;
1973
+ id: z.ZodOptional<z.ZodString>;
1974
+ errorCode: z.ZodOptional<z.ZodString>;
1975
+ errorMessage: z.ZodOptional<z.ZodString>;
1976
+ }, "strip", z.ZodTypeAny, {
1977
+ type: "tagElementAck";
1978
+ protocolVersion: number;
1979
+ requestId: string;
1980
+ ok: boolean;
1981
+ id?: string | undefined;
1982
+ errorCode?: string | undefined;
1983
+ errorMessage?: string | undefined;
1984
+ }, {
1985
+ type: "tagElementAck";
1986
+ protocolVersion: number;
1987
+ requestId: string;
1988
+ ok: boolean;
1989
+ id?: string | undefined;
1990
+ errorCode?: string | undefined;
1991
+ errorMessage?: string | undefined;
1992
+ }>;
1993
+ type ServerTagElementAck = z.infer<typeof serverTagElementAckSchema>;
1994
+ declare const serverMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1995
+ type: z.ZodLiteral<"pong">;
1996
+ protocolVersion: z.ZodNumber;
1997
+ requestId: z.ZodString;
1998
+ diagnostics: z.ZodOptional<z.ZodObject<{
1999
+ viteVersion: z.ZodOptional<z.ZodString>;
2000
+ reactVersion: z.ZodOptional<z.ZodString>;
2001
+ tailwindVersion: z.ZodOptional<z.ZodString>;
2002
+ overlayCssMode: z.ZodOptional<z.ZodLiteral<"self-contained">>;
2003
+ /** Project-level library detection (v0.8). */
2004
+ detectedLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>, "many">>;
2005
+ }, "strip", z.ZodTypeAny, {
2006
+ viteVersion?: string | undefined;
2007
+ reactVersion?: string | undefined;
2008
+ tailwindVersion?: string | undefined;
2009
+ overlayCssMode?: "self-contained" | undefined;
2010
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2011
+ }, {
2012
+ viteVersion?: string | undefined;
2013
+ reactVersion?: string | undefined;
2014
+ tailwindVersion?: string | undefined;
2015
+ overlayCssMode?: "self-contained" | undefined;
2016
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2017
+ }>>;
2018
+ }, "strip", z.ZodTypeAny, {
2019
+ type: "pong";
2020
+ protocolVersion: number;
2021
+ requestId: string;
2022
+ diagnostics?: {
2023
+ viteVersion?: string | undefined;
2024
+ reactVersion?: string | undefined;
2025
+ tailwindVersion?: string | undefined;
2026
+ overlayCssMode?: "self-contained" | undefined;
2027
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2028
+ } | undefined;
2029
+ }, {
2030
+ type: "pong";
2031
+ protocolVersion: number;
2032
+ requestId: string;
2033
+ diagnostics?: {
2034
+ viteVersion?: string | undefined;
2035
+ reactVersion?: string | undefined;
2036
+ tailwindVersion?: string | undefined;
2037
+ overlayCssMode?: "self-contained" | undefined;
2038
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2039
+ } | undefined;
2040
+ }>, z.ZodObject<{
2041
+ type: z.ZodLiteral<"error">;
2042
+ code: z.ZodString;
2043
+ message: z.ZodString;
2044
+ requestId: z.ZodOptional<z.ZodString>;
2045
+ }, "strip", z.ZodTypeAny, {
2046
+ code: string;
2047
+ message: string;
2048
+ type: "error";
2049
+ requestId?: string | undefined;
2050
+ }, {
2051
+ code: string;
2052
+ message: string;
2053
+ type: "error";
2054
+ requestId?: string | undefined;
2055
+ }>, z.ZodObject<{
2056
+ type: z.ZodLiteral<"indexReady">;
2057
+ protocolVersion: z.ZodNumber;
2058
+ indexVersion: z.ZodNumber;
2059
+ entries: z.ZodArray<z.ZodObject<{
2060
+ id: z.ZodString;
2061
+ file: z.ZodString;
2062
+ line: z.ZodNumber;
2063
+ column: z.ZodNumber;
2064
+ /** Source index v2 metadata */
2065
+ tagName: z.ZodOptional<z.ZodString>;
2066
+ componentName: z.ZodOptional<z.ZodString>;
2067
+ hasLiteralClassName: z.ZodOptional<z.ZodBoolean>;
2068
+ classNameValue: z.ZodOptional<z.ZodString>;
2069
+ textEditable: z.ZodOptional<z.ZodBoolean>;
2070
+ structuralEditable: z.ZodOptional<z.ZodBoolean>;
2071
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
2072
+ unsupportedReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2073
+ insideMap: z.ZodOptional<z.ZodBoolean>;
2074
+ /** Index v3: default id for className patches on this host. */
2075
+ patchHostId: z.ZodOptional<z.ZodString>;
2076
+ /** Index v3: preferred text target key in `textTargets`. */
2077
+ primaryTextTargetKey: z.ZodOptional<z.ZodString>;
2078
+ /** Index v3: descendant (and host) text edit targets. */
2079
+ textTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2080
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
2081
+ key: z.ZodString;
2082
+ label: z.ZodString;
2083
+ file: z.ZodString;
2084
+ line: z.ZodNumber;
2085
+ column: z.ZodNumber;
2086
+ tagName: z.ZodString;
2087
+ textEditable: z.ZodBoolean;
2088
+ textPreview: z.ZodOptional<z.ZodString>;
2089
+ /** Present when the text node has its own `data-nuvio-id`. */
2090
+ nuvioId: z.ZodOptional<z.ZodString>;
2091
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
2092
+ patchHostId: z.ZodString;
2093
+ insideMap: z.ZodOptional<z.ZodBoolean>;
2094
+ }, "strip", z.ZodTypeAny, {
2095
+ key: string;
2096
+ label: string;
2097
+ file: string;
2098
+ line: number;
2099
+ column: number;
2100
+ tagName: string;
2101
+ textEditable: boolean;
2102
+ patchHostId: string;
2103
+ textPreview?: string | undefined;
2104
+ nuvioId?: string | undefined;
2105
+ insideMap?: boolean | undefined;
2106
+ }, {
2107
+ key: string;
2108
+ label: string;
2109
+ file: string;
2110
+ line: number;
2111
+ column: number;
2112
+ tagName: string;
2113
+ textEditable: boolean;
2114
+ patchHostId: string;
2115
+ textPreview?: string | undefined;
2116
+ nuvioId?: string | undefined;
2117
+ insideMap?: boolean | undefined;
2118
+ }>, "many">>;
2119
+ /** Index v3: explicit style patch targets for this selected host. */
2120
+ styleTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2121
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
2122
+ key: z.ZodString;
2123
+ label: z.ZodString;
2124
+ file: z.ZodString;
2125
+ line: z.ZodNumber;
2126
+ column: z.ZodNumber;
2127
+ tagName: z.ZodString;
2128
+ nuvioId: z.ZodString;
2129
+ patchHostId: z.ZodString;
2130
+ classNamePatchable: z.ZodBoolean;
2131
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
2132
+ }, "strip", z.ZodTypeAny, {
2133
+ key: string;
2134
+ label: string;
2135
+ file: string;
2136
+ line: number;
2137
+ column: number;
2138
+ tagName: string;
2139
+ nuvioId: string;
2140
+ patchHostId: string;
2141
+ classNamePatchable: boolean;
2142
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2143
+ }, {
2144
+ key: string;
2145
+ label: string;
2146
+ file: string;
2147
+ line: number;
2148
+ column: number;
2149
+ tagName: string;
2150
+ nuvioId: string;
2151
+ patchHostId: string;
2152
+ classNamePatchable: boolean;
2153
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2154
+ }>, "many">>;
2155
+ /** Index v3: coarse host role, used for defaults/hints only. */
2156
+ hierarchyRole: z.ZodOptional<z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>>;
2157
+ /** Index v3: nearest ancestor host id in JSX ownership hierarchy. */
2158
+ parentHostId: z.ZodOptional<z.ZodString>;
2159
+ /** Index v3: descendant host ids under this host (if any). */
2160
+ childTargetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2161
+ /** Index v4: row hosts when this entry is a table section. */
2162
+ rowTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2163
+ rowKey: z.ZodString;
2164
+ nuvioId: z.ZodString;
2165
+ label: z.ZodString;
2166
+ file: z.ZodString;
2167
+ line: z.ZodNumber;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ label: string;
2170
+ file: string;
2171
+ line: number;
2172
+ nuvioId: string;
2173
+ rowKey: string;
2174
+ }, {
2175
+ label: string;
2176
+ file: string;
2177
+ line: number;
2178
+ nuvioId: string;
2179
+ rowKey: string;
2180
+ }>, "many">>;
2181
+ /** Index v4: static table data binding for Tier C. */
2182
+ tableMeta: z.ZodOptional<z.ZodObject<{
2183
+ dataBinding: z.ZodString;
2184
+ file: z.ZodString;
2185
+ line: z.ZodNumber;
2186
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2187
+ }, "strip", z.ZodTypeAny, {
2188
+ file: string;
2189
+ line: number;
2190
+ dataBinding: string;
2191
+ columns?: string[] | undefined;
2192
+ }, {
2193
+ file: string;
2194
+ line: number;
2195
+ dataBinding: string;
2196
+ columns?: string[] | undefined;
2197
+ }>>;
2198
+ /** Index v4: when this host maps to a `tableData` field edit. */
2199
+ tableDataField: z.ZodOptional<z.ZodObject<{
2200
+ arrayName: z.ZodString;
2201
+ rowKey: z.ZodString;
2202
+ field: z.ZodString;
2203
+ }, "strip", z.ZodTypeAny, {
2204
+ rowKey: string;
2205
+ arrayName: string;
2206
+ field: string;
2207
+ }, {
2208
+ rowKey: string;
2209
+ arrayName: string;
2210
+ field: string;
2211
+ }>>;
2212
+ /** Index v5: detected className expression mode for patch routing. */
2213
+ classNameMode: z.ZodOptional<z.ZodEnum<["literal-only", "cn-basic", "cn-conditional", "classnames-static", "unsupported"]>>;
2214
+ /** Index v6: shadcn / TailAdmin / DaisyUI hint for this host. */
2215
+ libraryHint: z.ZodOptional<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>>;
2216
+ }, "strip", z.ZodTypeAny, {
2217
+ file: string;
2218
+ line: number;
2219
+ column: number;
2220
+ id: string;
2221
+ tagName?: string | undefined;
2222
+ textEditable?: boolean | undefined;
2223
+ patchHostId?: string | undefined;
2224
+ insideMap?: boolean | undefined;
2225
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2226
+ componentName?: string | undefined;
2227
+ hasLiteralClassName?: boolean | undefined;
2228
+ classNameValue?: string | undefined;
2229
+ structuralEditable?: boolean | undefined;
2230
+ unsupportedReasons?: string[] | undefined;
2231
+ primaryTextTargetKey?: string | undefined;
2232
+ textTargets?: {
2233
+ key: string;
2234
+ label: string;
2235
+ file: string;
2236
+ line: number;
2237
+ column: number;
2238
+ tagName: string;
2239
+ textEditable: boolean;
2240
+ patchHostId: string;
2241
+ textPreview?: string | undefined;
2242
+ nuvioId?: string | undefined;
2243
+ insideMap?: boolean | undefined;
2244
+ }[] | undefined;
2245
+ styleTargets?: {
2246
+ key: string;
2247
+ label: string;
2248
+ file: string;
2249
+ line: number;
2250
+ column: number;
2251
+ tagName: string;
2252
+ nuvioId: string;
2253
+ patchHostId: string;
2254
+ classNamePatchable: boolean;
2255
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2256
+ }[] | undefined;
2257
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2258
+ parentHostId?: string | undefined;
2259
+ childTargetIds?: string[] | undefined;
2260
+ rowTargets?: {
2261
+ label: string;
2262
+ file: string;
2263
+ line: number;
2264
+ nuvioId: string;
2265
+ rowKey: string;
2266
+ }[] | undefined;
2267
+ tableMeta?: {
2268
+ file: string;
2269
+ line: number;
2270
+ dataBinding: string;
2271
+ columns?: string[] | undefined;
2272
+ } | undefined;
2273
+ tableDataField?: {
2274
+ rowKey: string;
2275
+ arrayName: string;
2276
+ field: string;
2277
+ } | undefined;
2278
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
2279
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
2280
+ }, {
2281
+ file: string;
2282
+ line: number;
2283
+ column: number;
2284
+ id: string;
2285
+ tagName?: string | undefined;
2286
+ textEditable?: boolean | undefined;
2287
+ patchHostId?: string | undefined;
2288
+ insideMap?: boolean | undefined;
2289
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2290
+ componentName?: string | undefined;
2291
+ hasLiteralClassName?: boolean | undefined;
2292
+ classNameValue?: string | undefined;
2293
+ structuralEditable?: boolean | undefined;
2294
+ unsupportedReasons?: string[] | undefined;
2295
+ primaryTextTargetKey?: string | undefined;
2296
+ textTargets?: {
2297
+ key: string;
2298
+ label: string;
2299
+ file: string;
2300
+ line: number;
2301
+ column: number;
2302
+ tagName: string;
2303
+ textEditable: boolean;
2304
+ patchHostId: string;
2305
+ textPreview?: string | undefined;
2306
+ nuvioId?: string | undefined;
2307
+ insideMap?: boolean | undefined;
2308
+ }[] | undefined;
2309
+ styleTargets?: {
2310
+ key: string;
2311
+ label: string;
2312
+ file: string;
2313
+ line: number;
2314
+ column: number;
2315
+ tagName: string;
2316
+ nuvioId: string;
2317
+ patchHostId: string;
2318
+ classNamePatchable: boolean;
2319
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2320
+ }[] | undefined;
2321
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2322
+ parentHostId?: string | undefined;
2323
+ childTargetIds?: string[] | undefined;
2324
+ rowTargets?: {
2325
+ label: string;
2326
+ file: string;
2327
+ line: number;
2328
+ nuvioId: string;
2329
+ rowKey: string;
2330
+ }[] | undefined;
2331
+ tableMeta?: {
2332
+ file: string;
2333
+ line: number;
2334
+ dataBinding: string;
2335
+ columns?: string[] | undefined;
2336
+ } | undefined;
2337
+ tableDataField?: {
2338
+ rowKey: string;
2339
+ arrayName: string;
2340
+ field: string;
2341
+ } | undefined;
2342
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
2343
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
2344
+ }>, "many">;
2345
+ duplicateErrors: z.ZodArray<z.ZodObject<{
2346
+ id: z.ZodString;
2347
+ occurrences: z.ZodArray<z.ZodObject<{
2348
+ file: z.ZodString;
2349
+ line: z.ZodNumber;
2350
+ column: z.ZodNumber;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ file: string;
2353
+ line: number;
2354
+ column: number;
2355
+ }, {
2356
+ file: string;
2357
+ line: number;
2358
+ column: number;
2359
+ }>, "many">;
2360
+ }, "strip", z.ZodTypeAny, {
2361
+ id: string;
2362
+ occurrences: {
2363
+ file: string;
2364
+ line: number;
2365
+ column: number;
2366
+ }[];
2367
+ }, {
2368
+ id: string;
2369
+ occurrences: {
2370
+ file: string;
2371
+ line: number;
2372
+ column: number;
2373
+ }[];
2374
+ }>, "many">;
2375
+ diagnostics: z.ZodOptional<z.ZodObject<{
2376
+ viteVersion: z.ZodOptional<z.ZodString>;
2377
+ reactVersion: z.ZodOptional<z.ZodString>;
2378
+ tailwindVersion: z.ZodOptional<z.ZodString>;
2379
+ overlayCssMode: z.ZodOptional<z.ZodLiteral<"self-contained">>;
2380
+ /** Project-level library detection (v0.8). */
2381
+ detectedLibraries: z.ZodOptional<z.ZodArray<z.ZodEnum<["shadcn", "tailadmin", "daisyui"]>, "many">>;
2382
+ }, "strip", z.ZodTypeAny, {
2383
+ viteVersion?: string | undefined;
2384
+ reactVersion?: string | undefined;
2385
+ tailwindVersion?: string | undefined;
2386
+ overlayCssMode?: "self-contained" | undefined;
2387
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2388
+ }, {
2389
+ viteVersion?: string | undefined;
2390
+ reactVersion?: string | undefined;
2391
+ tailwindVersion?: string | undefined;
2392
+ overlayCssMode?: "self-contained" | undefined;
2393
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2394
+ }>>;
2395
+ }, "strip", z.ZodTypeAny, {
2396
+ entries: {
2397
+ file: string;
2398
+ line: number;
2399
+ column: number;
2400
+ id: string;
2401
+ tagName?: string | undefined;
2402
+ textEditable?: boolean | undefined;
2403
+ patchHostId?: string | undefined;
2404
+ insideMap?: boolean | undefined;
2405
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2406
+ componentName?: string | undefined;
2407
+ hasLiteralClassName?: boolean | undefined;
2408
+ classNameValue?: string | undefined;
2409
+ structuralEditable?: boolean | undefined;
2410
+ unsupportedReasons?: string[] | undefined;
2411
+ primaryTextTargetKey?: string | undefined;
2412
+ textTargets?: {
2413
+ key: string;
2414
+ label: string;
2415
+ file: string;
2416
+ line: number;
2417
+ column: number;
2418
+ tagName: string;
2419
+ textEditable: boolean;
2420
+ patchHostId: string;
2421
+ textPreview?: string | undefined;
2422
+ nuvioId?: string | undefined;
2423
+ insideMap?: boolean | undefined;
2424
+ }[] | undefined;
2425
+ styleTargets?: {
2426
+ key: string;
2427
+ label: string;
2428
+ file: string;
2429
+ line: number;
2430
+ column: number;
2431
+ tagName: string;
2432
+ nuvioId: string;
2433
+ patchHostId: string;
2434
+ classNamePatchable: boolean;
2435
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2436
+ }[] | undefined;
2437
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2438
+ parentHostId?: string | undefined;
2439
+ childTargetIds?: string[] | undefined;
2440
+ rowTargets?: {
2441
+ label: string;
2442
+ file: string;
2443
+ line: number;
2444
+ nuvioId: string;
2445
+ rowKey: string;
2446
+ }[] | undefined;
2447
+ tableMeta?: {
2448
+ file: string;
2449
+ line: number;
2450
+ dataBinding: string;
2451
+ columns?: string[] | undefined;
2452
+ } | undefined;
2453
+ tableDataField?: {
2454
+ rowKey: string;
2455
+ arrayName: string;
2456
+ field: string;
2457
+ } | undefined;
2458
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
2459
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
2460
+ }[];
2461
+ type: "indexReady";
2462
+ protocolVersion: number;
2463
+ indexVersion: number;
2464
+ duplicateErrors: {
2465
+ id: string;
2466
+ occurrences: {
2467
+ file: string;
2468
+ line: number;
2469
+ column: number;
2470
+ }[];
2471
+ }[];
2472
+ diagnostics?: {
2473
+ viteVersion?: string | undefined;
2474
+ reactVersion?: string | undefined;
2475
+ tailwindVersion?: string | undefined;
2476
+ overlayCssMode?: "self-contained" | undefined;
2477
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2478
+ } | undefined;
2479
+ }, {
2480
+ entries: {
2481
+ file: string;
2482
+ line: number;
2483
+ column: number;
2484
+ id: string;
2485
+ tagName?: string | undefined;
2486
+ textEditable?: boolean | undefined;
2487
+ patchHostId?: string | undefined;
2488
+ insideMap?: boolean | undefined;
2489
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2490
+ componentName?: string | undefined;
2491
+ hasLiteralClassName?: boolean | undefined;
2492
+ classNameValue?: string | undefined;
2493
+ structuralEditable?: boolean | undefined;
2494
+ unsupportedReasons?: string[] | undefined;
2495
+ primaryTextTargetKey?: string | undefined;
2496
+ textTargets?: {
2497
+ key: string;
2498
+ label: string;
2499
+ file: string;
2500
+ line: number;
2501
+ column: number;
2502
+ tagName: string;
2503
+ textEditable: boolean;
2504
+ patchHostId: string;
2505
+ textPreview?: string | undefined;
2506
+ nuvioId?: string | undefined;
2507
+ insideMap?: boolean | undefined;
2508
+ }[] | undefined;
2509
+ styleTargets?: {
2510
+ key: string;
2511
+ label: string;
2512
+ file: string;
2513
+ line: number;
2514
+ column: number;
2515
+ tagName: string;
2516
+ nuvioId: string;
2517
+ patchHostId: string;
2518
+ classNamePatchable: boolean;
2519
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2520
+ }[] | undefined;
2521
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2522
+ parentHostId?: string | undefined;
2523
+ childTargetIds?: string[] | undefined;
2524
+ rowTargets?: {
2525
+ label: string;
2526
+ file: string;
2527
+ line: number;
2528
+ nuvioId: string;
2529
+ rowKey: string;
2530
+ }[] | undefined;
2531
+ tableMeta?: {
2532
+ file: string;
2533
+ line: number;
2534
+ dataBinding: string;
2535
+ columns?: string[] | undefined;
2536
+ } | undefined;
2537
+ tableDataField?: {
2538
+ rowKey: string;
2539
+ arrayName: string;
2540
+ field: string;
2541
+ } | undefined;
2542
+ classNameMode?: "unsupported" | "literal-only" | "cn-basic" | "cn-conditional" | "classnames-static" | undefined;
2543
+ libraryHint?: "shadcn" | "tailadmin" | "daisyui" | undefined;
2544
+ }[];
2545
+ type: "indexReady";
2546
+ protocolVersion: number;
2547
+ indexVersion: number;
2548
+ duplicateErrors: {
2549
+ id: string;
2550
+ occurrences: {
2551
+ file: string;
2552
+ line: number;
2553
+ column: number;
2554
+ }[];
2555
+ }[];
2556
+ diagnostics?: {
2557
+ viteVersion?: string | undefined;
2558
+ reactVersion?: string | undefined;
2559
+ tailwindVersion?: string | undefined;
2560
+ overlayCssMode?: "self-contained" | undefined;
2561
+ detectedLibraries?: ("shadcn" | "tailadmin" | "daisyui")[] | undefined;
2562
+ } | undefined;
2563
+ }>, z.ZodObject<{
2564
+ type: z.ZodLiteral<"selectAck">;
2565
+ protocolVersion: z.ZodNumber;
2566
+ requestId: z.ZodString;
2567
+ id: z.ZodString;
2568
+ ok: z.ZodBoolean;
2569
+ file: z.ZodOptional<z.ZodString>;
2570
+ line: z.ZodOptional<z.ZodNumber>;
2571
+ column: z.ZodOptional<z.ZodNumber>;
2572
+ /** Index v3 snapshot for the selected host (also on `indexReady` entries). */
2573
+ patchHostId: z.ZodOptional<z.ZodString>;
2574
+ primaryTextTargetKey: z.ZodOptional<z.ZodString>;
2575
+ textTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2576
+ /** Stable within host: `data-nuvio-id` or `loc:line:column`. */
2577
+ key: z.ZodString;
2578
+ label: z.ZodString;
2579
+ file: z.ZodString;
2580
+ line: z.ZodNumber;
2581
+ column: z.ZodNumber;
2582
+ tagName: z.ZodString;
2583
+ textEditable: z.ZodBoolean;
2584
+ textPreview: z.ZodOptional<z.ZodString>;
2585
+ /** Present when the text node has its own `data-nuvio-id`. */
2586
+ nuvioId: z.ZodOptional<z.ZodString>;
2587
+ /** Host id used for `mergeTailwindClassName` when patching styles for this target. */
2588
+ patchHostId: z.ZodString;
2589
+ insideMap: z.ZodOptional<z.ZodBoolean>;
2590
+ }, "strip", z.ZodTypeAny, {
2591
+ key: string;
2592
+ label: string;
2593
+ file: string;
2594
+ line: number;
2595
+ column: number;
2596
+ tagName: string;
2597
+ textEditable: boolean;
2598
+ patchHostId: string;
2599
+ textPreview?: string | undefined;
2600
+ nuvioId?: string | undefined;
2601
+ insideMap?: boolean | undefined;
2602
+ }, {
2603
+ key: string;
2604
+ label: string;
2605
+ file: string;
2606
+ line: number;
2607
+ column: number;
2608
+ tagName: string;
2609
+ textEditable: boolean;
2610
+ patchHostId: string;
2611
+ textPreview?: string | undefined;
2612
+ nuvioId?: string | undefined;
2613
+ insideMap?: boolean | undefined;
2614
+ }>, "many">>;
2615
+ styleTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2616
+ /** Stable key within host: `data-nuvio-id` or `host` for selected container. */
2617
+ key: z.ZodString;
2618
+ label: z.ZodString;
2619
+ file: z.ZodString;
2620
+ line: z.ZodNumber;
2621
+ column: z.ZodNumber;
2622
+ tagName: z.ZodString;
2623
+ nuvioId: z.ZodString;
2624
+ patchHostId: z.ZodString;
2625
+ classNamePatchable: z.ZodBoolean;
2626
+ riskLevel: z.ZodOptional<z.ZodEnum<["safe", "caution", "unsupported"]>>;
2627
+ }, "strip", z.ZodTypeAny, {
2628
+ key: string;
2629
+ label: string;
2630
+ file: string;
2631
+ line: number;
2632
+ column: number;
2633
+ tagName: string;
2634
+ nuvioId: string;
2635
+ patchHostId: string;
2636
+ classNamePatchable: boolean;
2637
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2638
+ }, {
2639
+ key: string;
2640
+ label: string;
2641
+ file: string;
2642
+ line: number;
2643
+ column: number;
2644
+ tagName: string;
2645
+ nuvioId: string;
2646
+ patchHostId: string;
2647
+ classNamePatchable: boolean;
2648
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2649
+ }>, "many">>;
2650
+ hierarchyRole: z.ZodOptional<z.ZodEnum<["section", "card", "table", "form", "group", "layout", "text", "button", "input", "media", "unknown"]>>;
2651
+ parentHostId: z.ZodOptional<z.ZodString>;
2652
+ childTargetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2653
+ rowTargets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2654
+ rowKey: z.ZodString;
2655
+ nuvioId: z.ZodString;
2656
+ label: z.ZodString;
2657
+ file: z.ZodString;
2658
+ line: z.ZodNumber;
2659
+ }, "strip", z.ZodTypeAny, {
2660
+ label: string;
2661
+ file: string;
2662
+ line: number;
2663
+ nuvioId: string;
2664
+ rowKey: string;
2665
+ }, {
2666
+ label: string;
2667
+ file: string;
2668
+ line: number;
2669
+ nuvioId: string;
2670
+ rowKey: string;
2671
+ }>, "many">>;
2672
+ tableMeta: z.ZodOptional<z.ZodObject<{
2673
+ dataBinding: z.ZodString;
2674
+ file: z.ZodString;
2675
+ line: z.ZodNumber;
2676
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2677
+ }, "strip", z.ZodTypeAny, {
2678
+ file: string;
2679
+ line: number;
2680
+ dataBinding: string;
2681
+ columns?: string[] | undefined;
2682
+ }, {
2683
+ file: string;
2684
+ line: number;
2685
+ dataBinding: string;
2686
+ columns?: string[] | undefined;
2687
+ }>>;
2688
+ tableDataField: z.ZodOptional<z.ZodObject<{
2689
+ arrayName: z.ZodString;
2690
+ rowKey: z.ZodString;
2691
+ field: z.ZodString;
2692
+ }, "strip", z.ZodTypeAny, {
2693
+ rowKey: string;
2694
+ arrayName: string;
2695
+ field: string;
2696
+ }, {
2697
+ rowKey: string;
2698
+ arrayName: string;
2699
+ field: string;
2700
+ }>>;
2701
+ errorCode: z.ZodOptional<z.ZodString>;
2702
+ errorMessage: z.ZodOptional<z.ZodString>;
2703
+ }, "strip", z.ZodTypeAny, {
2704
+ type: "selectAck";
2705
+ id: string;
2706
+ protocolVersion: number;
2707
+ requestId: string;
2708
+ ok: boolean;
2709
+ file?: string | undefined;
2710
+ line?: number | undefined;
2711
+ column?: number | undefined;
2712
+ patchHostId?: string | undefined;
2713
+ primaryTextTargetKey?: string | undefined;
2714
+ textTargets?: {
2715
+ key: string;
2716
+ label: string;
2717
+ file: string;
2718
+ line: number;
2719
+ column: number;
2720
+ tagName: string;
2721
+ textEditable: boolean;
2722
+ patchHostId: string;
2723
+ textPreview?: string | undefined;
2724
+ nuvioId?: string | undefined;
2725
+ insideMap?: boolean | undefined;
2726
+ }[] | undefined;
2727
+ styleTargets?: {
2728
+ key: string;
2729
+ label: string;
2730
+ file: string;
2731
+ line: number;
2732
+ column: number;
2733
+ tagName: string;
2734
+ nuvioId: string;
2735
+ patchHostId: string;
2736
+ classNamePatchable: boolean;
2737
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2738
+ }[] | undefined;
2739
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2740
+ parentHostId?: string | undefined;
2741
+ childTargetIds?: string[] | undefined;
2742
+ rowTargets?: {
2743
+ label: string;
2744
+ file: string;
2745
+ line: number;
2746
+ nuvioId: string;
2747
+ rowKey: string;
2748
+ }[] | undefined;
2749
+ tableMeta?: {
2750
+ file: string;
2751
+ line: number;
2752
+ dataBinding: string;
2753
+ columns?: string[] | undefined;
2754
+ } | undefined;
2755
+ tableDataField?: {
2756
+ rowKey: string;
2757
+ arrayName: string;
2758
+ field: string;
2759
+ } | undefined;
2760
+ errorCode?: string | undefined;
2761
+ errorMessage?: string | undefined;
2762
+ }, {
2763
+ type: "selectAck";
2764
+ id: string;
2765
+ protocolVersion: number;
2766
+ requestId: string;
2767
+ ok: boolean;
2768
+ file?: string | undefined;
2769
+ line?: number | undefined;
2770
+ column?: number | undefined;
2771
+ patchHostId?: string | undefined;
2772
+ primaryTextTargetKey?: string | undefined;
2773
+ textTargets?: {
2774
+ key: string;
2775
+ label: string;
2776
+ file: string;
2777
+ line: number;
2778
+ column: number;
2779
+ tagName: string;
2780
+ textEditable: boolean;
2781
+ patchHostId: string;
2782
+ textPreview?: string | undefined;
2783
+ nuvioId?: string | undefined;
2784
+ insideMap?: boolean | undefined;
2785
+ }[] | undefined;
2786
+ styleTargets?: {
2787
+ key: string;
2788
+ label: string;
2789
+ file: string;
2790
+ line: number;
2791
+ column: number;
2792
+ tagName: string;
2793
+ nuvioId: string;
2794
+ patchHostId: string;
2795
+ classNamePatchable: boolean;
2796
+ riskLevel?: "safe" | "caution" | "unsupported" | undefined;
2797
+ }[] | undefined;
2798
+ hierarchyRole?: "section" | "card" | "table" | "form" | "group" | "layout" | "text" | "button" | "input" | "media" | "unknown" | undefined;
2799
+ parentHostId?: string | undefined;
2800
+ childTargetIds?: string[] | undefined;
2801
+ rowTargets?: {
2802
+ label: string;
2803
+ file: string;
2804
+ line: number;
2805
+ nuvioId: string;
2806
+ rowKey: string;
2807
+ }[] | undefined;
2808
+ tableMeta?: {
2809
+ file: string;
2810
+ line: number;
2811
+ dataBinding: string;
2812
+ columns?: string[] | undefined;
2813
+ } | undefined;
2814
+ tableDataField?: {
2815
+ rowKey: string;
2816
+ arrayName: string;
2817
+ field: string;
2818
+ } | undefined;
2819
+ errorCode?: string | undefined;
2820
+ errorMessage?: string | undefined;
2821
+ }>, z.ZodObject<{
2822
+ type: z.ZodLiteral<"patchAck">;
2823
+ protocolVersion: z.ZodNumber;
2824
+ requestId: z.ZodString;
2825
+ id: z.ZodString;
2826
+ ok: z.ZodBoolean;
2827
+ diffSummary: z.ZodOptional<z.ZodString>;
2828
+ /** Present when this ack is for a `patchApply` with `dryRun: true`. */
2829
+ dryRun: z.ZodOptional<z.ZodBoolean>;
2830
+ /** Absolute path written on successful non-dry apply (for touched-file log). */
2831
+ writtenFile: z.ZodOptional<z.ZodString>;
2832
+ /** Server undo stack size after this apply (non-dry success only). */
2833
+ undoStackDepth: z.ZodOptional<z.ZodNumber>;
2834
+ errorCode: z.ZodOptional<z.ZodString>;
2835
+ errorMessage: z.ZodOptional<z.ZodString>;
2836
+ }, "strip", z.ZodTypeAny, {
2837
+ type: "patchAck";
2838
+ id: string;
2839
+ protocolVersion: number;
2840
+ requestId: string;
2841
+ ok: boolean;
2842
+ dryRun?: boolean | undefined;
2843
+ errorCode?: string | undefined;
2844
+ errorMessage?: string | undefined;
2845
+ diffSummary?: string | undefined;
2846
+ writtenFile?: string | undefined;
2847
+ undoStackDepth?: number | undefined;
2848
+ }, {
2849
+ type: "patchAck";
2850
+ id: string;
2851
+ protocolVersion: number;
2852
+ requestId: string;
2853
+ ok: boolean;
2854
+ dryRun?: boolean | undefined;
2855
+ errorCode?: string | undefined;
2856
+ errorMessage?: string | undefined;
2857
+ diffSummary?: string | undefined;
2858
+ writtenFile?: string | undefined;
2859
+ undoStackDepth?: number | undefined;
2860
+ }>, z.ZodObject<{
2861
+ type: z.ZodLiteral<"patchUndoAck">;
2862
+ protocolVersion: z.ZodNumber;
2863
+ requestId: z.ZodString;
2864
+ ok: z.ZodBoolean;
2865
+ file: z.ZodOptional<z.ZodString>;
2866
+ /** Remaining in-memory undo snapshots after this undo (success only). */
2867
+ undoStackDepth: z.ZodOptional<z.ZodNumber>;
2868
+ errorCode: z.ZodOptional<z.ZodString>;
2869
+ errorMessage: z.ZodOptional<z.ZodString>;
2870
+ }, "strip", z.ZodTypeAny, {
2871
+ type: "patchUndoAck";
2872
+ protocolVersion: number;
2873
+ requestId: string;
2874
+ ok: boolean;
2875
+ file?: string | undefined;
2876
+ errorCode?: string | undefined;
2877
+ errorMessage?: string | undefined;
2878
+ undoStackDepth?: number | undefined;
2879
+ }, {
2880
+ type: "patchUndoAck";
2881
+ protocolVersion: number;
2882
+ requestId: string;
2883
+ ok: boolean;
2884
+ file?: string | undefined;
2885
+ errorCode?: string | undefined;
2886
+ errorMessage?: string | undefined;
2887
+ undoStackDepth?: number | undefined;
2888
+ }>, z.ZodObject<{
2889
+ type: z.ZodLiteral<"tagElementAck">;
2890
+ protocolVersion: z.ZodNumber;
2891
+ requestId: z.ZodString;
2892
+ ok: z.ZodBoolean;
2893
+ id: z.ZodOptional<z.ZodString>;
2894
+ errorCode: z.ZodOptional<z.ZodString>;
2895
+ errorMessage: z.ZodOptional<z.ZodString>;
2896
+ }, "strip", z.ZodTypeAny, {
2897
+ type: "tagElementAck";
2898
+ protocolVersion: number;
2899
+ requestId: string;
2900
+ ok: boolean;
2901
+ id?: string | undefined;
2902
+ errorCode?: string | undefined;
2903
+ errorMessage?: string | undefined;
2904
+ }, {
2905
+ type: "tagElementAck";
2906
+ protocolVersion: number;
2907
+ requestId: string;
2908
+ ok: boolean;
2909
+ id?: string | undefined;
2910
+ errorCode?: string | undefined;
2911
+ errorMessage?: string | undefined;
2912
+ }>]>;
2913
+ type ServerMessage = z.infer<typeof serverMessageSchema>;
2914
+ declare function parseClientMessage(raw: string): ClientMessage | null;
2915
+ declare function parseServerMessage(raw: string): ServerMessage | null;
2916
+ declare function serializeServerMessage(msg: ServerMessage): string;
2917
+
2918
+ declare const BRAND_ACCENT_COLORS: readonly ["blue", "purple", "green", "slate", "rose"];
2919
+ declare const BRAND_COLORS: readonly ["none", "neutral", "blue", "purple", "green", "slate", "rose"];
2920
+ declare const BRAND_RADIUS: readonly ["sharp", "soft", "rounded", "pill"];
2921
+ declare const BRAND_DENSITY: readonly ["compact", "balanced", "spacious"];
2922
+ declare const BRAND_TYPOGRAPHY: readonly ["clean", "bold", "soft"];
2923
+ declare const BRAND_SURFACES: readonly ["white", "muted"];
2924
+ declare const BRAND_BUTTON_VARIANTS: readonly ["solid", "outline"];
2925
+ declare const BRAND_BUTTON_HOVERS: readonly ["none", "darken"];
2926
+ declare const BRAND_CARD_SHADOWS: readonly ["none", "sm", "md"];
2927
+ declare const BRAND_CARD_HOVERS: readonly ["none", "border"];
2928
+ type BrandColor = (typeof BRAND_COLORS)[number];
2929
+ type BrandAccentColor = (typeof BRAND_ACCENT_COLORS)[number];
2930
+ type BrandRadius = (typeof BRAND_RADIUS)[number];
2931
+ type BrandDensity = (typeof BRAND_DENSITY)[number];
2932
+ type BrandTypography = (typeof BRAND_TYPOGRAPHY)[number];
2933
+ type BrandSurface = (typeof BRAND_SURFACES)[number];
2934
+ type BrandButtonVariant = (typeof BRAND_BUTTON_VARIANTS)[number];
2935
+ type BrandButtonHover = (typeof BRAND_BUTTON_HOVERS)[number];
2936
+ type BrandCardShadow = (typeof BRAND_CARD_SHADOWS)[number];
2937
+ type BrandCardHover = (typeof BRAND_CARD_HOVERS)[number];
2938
+ declare const BRAND_APPLY_ACTIONS: readonly ["button", "card", "heading", "text", "table", "form", "badge"];
2939
+ type BrandApplyAction = (typeof BRAND_APPLY_ACTIONS)[number];
2940
+ /** Preset axes shown in category-first Brand Kit UI. */
2941
+ type BrandPresetDimension = "color" | "radius" | "density" | "typography" | "surface" | "buttonVariant" | "buttonHover" | "cardShadow" | "cardHover";
2942
+ /**
2943
+ * Which brand presets apply per category (drives Brand Kit chips + samples).
2944
+ * Form/badge use fragment audit in inspector; UI still exposes recipe-driving presets.
2945
+ */
2946
+ declare const BRAND_PRESET_DIMENSIONS_BY_ACTION: Record<BrandApplyAction, readonly BrandPresetDimension[]>;
2947
+ declare function brandPresetDimensionsForAction(action: BrandApplyAction): readonly BrandPresetDimension[];
2948
+ /** Which Tailwind prefix consumes the project accent for each category (v1.6 slot model). */
2949
+ type BrandAccentSlot = "fill" | "border" | "text" | "tint";
2950
+ declare const BRAND_ACCENT_SLOT_BY_ACTION: Record<BrandApplyAction, BrandAccentSlot | null>;
2951
+ /** User-facing title for the accent swatch row in Brand Kit (replaces generic "Color"). */
2952
+ declare function getBrandColorSlotLabel(action: BrandApplyAction): string;
2953
+ /** Curated accent swatches shown per category (border-slot categories include none/neutral). */
2954
+ declare function brandColorsForAction(action: BrandApplyAction): readonly BrandColor[];
2955
+ declare function isBrandAccentColor(color: BrandColor): color is BrandAccentColor;
2956
+ declare const BRAND_RADIUS_FIELD_LABEL = "Corners";
2957
+ declare const BRAND_DENSITY_FIELD_LABEL = "Spacing";
2958
+ declare function getBrandTypographyFieldLabel(action: BrandApplyAction): string;
2959
+ declare const BRAND_SURFACE_FIELD_LABEL = "Surface";
2960
+ declare const BRAND_BUTTON_VARIANT_FIELD_LABEL = "Style";
2961
+ declare const BRAND_BUTTON_HOVER_FIELD_LABEL = "Hover";
2962
+ declare const BRAND_CARD_SHADOW_FIELD_LABEL = "Shadow";
2963
+ declare const BRAND_CARD_HOVER_FIELD_LABEL = "Hover";
2964
+ type BrandFragmentHostHint = {
2965
+ tagName?: string;
2966
+ hierarchyRole?: string;
2967
+ hostId?: string;
2968
+ };
2969
+ type BrandConfig = {
2970
+ color: BrandColor;
2971
+ surface: BrandSurface;
2972
+ buttonVariant: BrandButtonVariant;
2973
+ buttonHover: BrandButtonHover;
2974
+ cardShadow: BrandCardShadow;
2975
+ cardHover: BrandCardHover;
2976
+ radius: BrandRadius;
2977
+ density: BrandDensity;
2978
+ typography: BrandTypography;
2979
+ };
2980
+ type BrandTokens = {
2981
+ accent: BrandColor;
2982
+ surface: BrandSurface;
2983
+ radius: BrandRadius;
2984
+ density: BrandDensity;
2985
+ typography: BrandTypography;
2986
+ buttonVariant: BrandButtonVariant;
2987
+ buttonHover: BrandButtonHover;
2988
+ cardShadow: BrandCardShadow;
2989
+ cardHover: BrandCardHover;
2990
+ };
2991
+ type BrandConfigFileV2 = {
2992
+ version: 2;
2993
+ tokens: BrandTokens;
2994
+ };
2995
+ declare const DEFAULT_BRAND_CONFIG: BrandConfig;
2996
+ declare const brandConfigSchema: z.ZodObject<{
2997
+ color: z.ZodEnum<["none", "neutral", "blue", "purple", "green", "slate", "rose"]>;
2998
+ surface: z.ZodEnum<["white", "muted"]>;
2999
+ buttonVariant: z.ZodEnum<["solid", "outline"]>;
3000
+ buttonHover: z.ZodEnum<["none", "darken"]>;
3001
+ cardShadow: z.ZodEnum<["none", "sm", "md"]>;
3002
+ cardHover: z.ZodEnum<["none", "border"]>;
3003
+ radius: z.ZodEnum<["sharp", "soft", "rounded", "pill"]>;
3004
+ density: z.ZodEnum<["compact", "balanced", "spacious"]>;
3005
+ typography: z.ZodEnum<["clean", "bold", "soft"]>;
3006
+ }, "strip", z.ZodTypeAny, {
3007
+ color: "blue" | "purple" | "green" | "slate" | "rose" | "none" | "neutral";
3008
+ radius: "sharp" | "soft" | "rounded" | "pill";
3009
+ density: "compact" | "balanced" | "spacious";
3010
+ typography: "soft" | "clean" | "bold";
3011
+ surface: "white" | "muted";
3012
+ buttonVariant: "solid" | "outline";
3013
+ buttonHover: "none" | "darken";
3014
+ cardShadow: "sm" | "md" | "none";
3015
+ cardHover: "none" | "border";
3016
+ }, {
3017
+ color: "blue" | "purple" | "green" | "slate" | "rose" | "none" | "neutral";
3018
+ radius: "sharp" | "soft" | "rounded" | "pill";
3019
+ density: "compact" | "balanced" | "spacious";
3020
+ typography: "soft" | "clean" | "bold";
3021
+ surface: "white" | "muted";
3022
+ buttonVariant: "solid" | "outline";
3023
+ buttonHover: "none" | "darken";
3024
+ cardShadow: "sm" | "md" | "none";
3025
+ cardHover: "none" | "border";
3026
+ }>;
3027
+ declare function brandFragmentHostHint(entry: {
3028
+ id: string;
3029
+ tagName?: string;
3030
+ hierarchyRole?: string;
3031
+ }): BrandFragmentHostHint;
3032
+ declare function normalizeBrandConfig(input: unknown): BrandConfig;
3033
+ /** On-disk `nuvio/brand.json` shape (v2). */
3034
+ declare function serializeBrandConfig(config: BrandConfig): BrandConfigFileV2;
3035
+ declare function brandConfigsEqual(a: BrandConfig, b: BrandConfig): boolean;
3036
+ /** Single builder for Brand Preview UI and patch payloads (allowlist-safe v1.1). */
3037
+ declare function buildBrandClassFragment(action: BrandApplyAction, config: BrandConfig, hint?: BrandFragmentHostHint): string;
3038
+ declare function buildBrandPatchOps(action: BrandApplyAction, config: BrandConfig, hint?: BrandFragmentHostHint): PatchOp[];
3039
+ /** Plain-language summary for Simple Mode (no Tailwind tokens). */
3040
+ declare function buildBrandPreviewSummary(action: BrandApplyAction, config: BrandConfig): string;
3041
+ declare function getBrandColorLabel(color: BrandColor): string;
3042
+ declare function getBrandRadiusLabel(radius: BrandRadius): string;
3043
+ declare function getBrandDensityLabel(density: BrandDensity): string;
3044
+ declare function getBrandTypographyLabel(typography: BrandTypography): string;
3045
+ declare function getBrandSurfaceLabel(surface: BrandSurface): string;
3046
+ declare function getBrandButtonVariantLabel(variant: BrandButtonVariant): string;
3047
+ declare function getBrandButtonHoverLabel(hover: BrandButtonHover): string;
3048
+ declare function getBrandCardShadowLabel(shadow: BrandCardShadow): string;
3049
+ declare function getBrandCardHoverLabel(hover: BrandCardHover): string;
3050
+
3051
+ /** MVP semantic categories supported in PCC manifests. */
3052
+ declare const PCC_SUPPORTED_CATEGORIES: readonly ["card", "button", "heading", "text", "table", "form", "badge", "nav"];
3053
+ type PccCategory = (typeof PCC_SUPPORTED_CATEGORIES)[number];
3054
+ /** Categories that must not appear in PCC manifests (v1.4). */
3055
+ declare const PCC_REJECTED_CATEGORIES: readonly ["media", "layout"];
3056
+ type PccRejectedCategory = (typeof PCC_REJECTED_CATEGORIES)[number];
3057
+ /** Categories with Brand Kit bulk recipes (v1.3 + v1.5 table/form/badge). */
3058
+ declare const PCC_BRANDABLE_CATEGORIES: readonly BrandApplyAction[];
3059
+ type PccCategoryConfig = {
3060
+ required: boolean;
3061
+ hosts: string[];
3062
+ };
3063
+ type PccManifest = {
3064
+ page: string;
3065
+ route: string;
3066
+ description?: string;
3067
+ categories: Partial<Record<PccCategory, PccCategoryConfig>>;
3068
+ };
3069
+ type PccManifestParseError = {
3070
+ code: "invalid_manifest";
3071
+ message: string;
3072
+ };
3073
+ declare function isPccSupportedCategory(key: string): key is PccCategory;
3074
+ declare function isPccRejectedCategory(key: string): key is PccRejectedCategory;
3075
+ declare function isPccBrandableCategory(category: PccCategory): boolean;
3076
+ /** Parse and validate a PCC manifest object (from YAML/JSON). */
3077
+ declare function parsePccManifest(input: unknown): {
3078
+ ok: true;
3079
+ manifest: PccManifest;
3080
+ } | {
3081
+ ok: false;
3082
+ error: PccManifestParseError;
3083
+ };
3084
+ declare function defaultPccManifestPath(projectRoot: string, page: string): string;
3085
+ declare function pccHostsForCategory(manifest: PccManifest, category: PccCategory): readonly string[];
3086
+ declare function pccCategoryLabel(category: PccCategory): string;
3087
+
3088
+ export { PCC_REJECTED_CATEGORIES as $, type BrandButtonHover as A, type BrandApplyAction as B, type BrandButtonVariant as C, type DuplicateIdError as D, type BrandCardHover as E, type BrandCardShadow as F, type BrandColor as G, type BrandConfigFileV2 as H, type IndexWireEntry as I, type BrandDensity as J, type BrandPresetDimension as K, type LibraryId as L, type BrandRadius as M, type BrandSurface as N, type BrandTokens as O, type PatchOp as P, type BrandTypography as Q, type Breakpoint as R, type ClientMessage as S, type ClientPatchApply as T, type ClientPatchUndo as U, type ClientPing as V, type ClientSelect as W, type ClientTagElement as X, DEFAULT_BRAND_CONFIG as Y, type HierarchyRole as Z, PCC_BRANDABLE_CATEGORIES as _, type BrandConfig as a, patchOpSchema as a$, PCC_SUPPORTED_CATEGORIES as a0, PROTOCOL_VERSION as a1, type PccCategoryConfig as a2, type PccManifestParseError as a3, type PccRejectedCategory as a4, type RiskLevel as a5, type RowWireTarget as a6, type RuntimeDiagnostics as a7, type ServerIndexReady as a8, type ServerMessage as a9, duplicateIdErrorSchema as aA, duplicateIdOccurrenceSchema as aB, getBrandButtonHoverLabel as aC, getBrandButtonVariantLabel as aD, getBrandCardHoverLabel as aE, getBrandCardShadowLabel as aF, getBrandColorLabel as aG, getBrandColorSlotLabel as aH, getBrandDensityLabel as aI, getBrandRadiusLabel as aJ, getBrandSurfaceLabel as aK, getBrandTypographyFieldLabel as aL, getBrandTypographyLabel as aM, hierarchyRoleSchema as aN, indexEntrySchema as aO, isBrandAccentColor as aP, isPccBrandableCategory as aQ, isPccRejectedCategory as aR, isPccSupportedCategory as aS, libraryIdSchema as aT, normalizeBrandConfig as aU, parseClientMessage as aV, parsePccManifest as aW, parseServerMessage as aX, patchOpDuplicateHostSchema as aY, patchOpMergeTailwindSchema as aZ, patchOpMoveSiblingSchema as a_, type ServerPatchAck as aa, type ServerPatchUndoAck as ab, type ServerSelectAck as ac, type ServerTagElementAck as ad, type StyleWireTarget as ae, type TableDataFieldBinding as af, type TableMeta as ag, type TextWireTarget as ah, type WireClassNameMode as ai, brandColorsForAction as aj, brandConfigSchema as ak, brandConfigsEqual as al, brandFragmentHostHint as am, brandPresetDimensionsForAction as an, breakpointSchema as ao, buildBrandClassFragment as ap, buildBrandPatchOps as aq, buildBrandPreviewSummary as ar, classNameModeSchema as as, clientMessageSchema as at, clientPatchApplySchema as au, clientPatchUndoSchema as av, clientPingSchema as aw, clientSelectSchema as ax, clientTagElementSchema as ay, defaultPccManifestPath as az, type BrandFragmentHostHint as b, patchOpSetHiddenSchema as b0, patchOpSetTableDataFieldSchema as b1, patchOpSetTextSchema as b2, pccCategoryLabel as b3, pccHostsForCategory as b4, riskLevelSchema as b5, rowTargetSchema as b6, runtimeDiagnosticsSchema as b7, serializeBrandConfig as b8, serializeServerMessage as b9, serverErrorSchema as ba, serverIndexReadySchema as bb, serverMessageSchema as bc, serverPatchAckSchema as bd, serverPatchUndoAckSchema as be, serverPongSchema as bf, serverSelectAckSchema as bg, serverTagElementAckSchema as bh, styleTargetSchema as bi, tableDataFieldSchema as bj, tableMetaSchema as bk, textTargetSchema as bl, type PccCategory as c, type PccManifest as d, BRAND_ACCENT_COLORS as e, BRAND_ACCENT_SLOT_BY_ACTION as f, BRAND_APPLY_ACTIONS as g, BRAND_BUTTON_HOVERS as h, BRAND_BUTTON_HOVER_FIELD_LABEL as i, BRAND_BUTTON_VARIANTS as j, BRAND_BUTTON_VARIANT_FIELD_LABEL as k, BRAND_CARD_HOVERS as l, BRAND_CARD_HOVER_FIELD_LABEL as m, BRAND_CARD_SHADOWS as n, BRAND_CARD_SHADOW_FIELD_LABEL as o, BRAND_COLORS as p, BRAND_DENSITY as q, BRAND_DENSITY_FIELD_LABEL as r, BRAND_PRESET_DIMENSIONS_BY_ACTION as s, BRAND_RADIUS as t, BRAND_RADIUS_FIELD_LABEL as u, BRAND_SURFACES as v, BRAND_SURFACE_FIELD_LABEL as w, BRAND_TYPOGRAPHY as x, type BrandAccentColor as y, type BrandAccentSlot as z };