@luci-dev/format 0.0.0-stage → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +21 -0
  2. package/dist/agents.d.ts +25 -0
  3. package/dist/agents.d.ts.map +1 -0
  4. package/dist/agents.js +36 -0
  5. package/dist/agents.js.map +1 -0
  6. package/dist/capture/baseline.d.ts +53 -0
  7. package/dist/capture/baseline.d.ts.map +1 -0
  8. package/dist/capture/baseline.js +400 -0
  9. package/dist/capture/baseline.js.map +1 -0
  10. package/dist/capture/check.d.ts +111 -0
  11. package/dist/capture/check.d.ts.map +1 -0
  12. package/dist/capture/check.js +327 -0
  13. package/dist/capture/check.js.map +1 -0
  14. package/dist/capture/collection.d.ts +2647 -0
  15. package/dist/capture/collection.d.ts.map +1 -0
  16. package/dist/capture/collection.js +103 -0
  17. package/dist/capture/collection.js.map +1 -0
  18. package/dist/capture/compare.d.ts +50 -0
  19. package/dist/capture/compare.d.ts.map +1 -0
  20. package/dist/capture/compare.js +167 -0
  21. package/dist/capture/compare.js.map +1 -0
  22. package/dist/capture/format.d.ts +59 -0
  23. package/dist/capture/format.d.ts.map +1 -0
  24. package/dist/capture/format.js +540 -0
  25. package/dist/capture/format.js.map +1 -0
  26. package/dist/capture/image.d.ts +42 -0
  27. package/dist/capture/image.d.ts.map +1 -0
  28. package/dist/capture/image.js +103 -0
  29. package/dist/capture/image.js.map +1 -0
  30. package/dist/capture/index.d.ts +18 -0
  31. package/dist/capture/index.d.ts.map +1 -0
  32. package/dist/capture/index.js +18 -0
  33. package/dist/capture/index.js.map +1 -0
  34. package/dist/capture/layout.d.ts +21 -0
  35. package/dist/capture/layout.d.ts.map +1 -0
  36. package/dist/capture/layout.js +131 -0
  37. package/dist/capture/layout.js.map +1 -0
  38. package/dist/capture/merge.d.ts +46 -0
  39. package/dist/capture/merge.d.ts.map +1 -0
  40. package/dist/capture/merge.js +251 -0
  41. package/dist/capture/merge.js.map +1 -0
  42. package/dist/capture/read.d.ts +91 -0
  43. package/dist/capture/read.d.ts.map +1 -0
  44. package/dist/capture/read.js +179 -0
  45. package/dist/capture/read.js.map +1 -0
  46. package/dist/capture/remap.d.ts +34 -0
  47. package/dist/capture/remap.d.ts.map +1 -0
  48. package/dist/capture/remap.js +227 -0
  49. package/dist/capture/remap.js.map +1 -0
  50. package/dist/capture/rule.d.ts +19 -0
  51. package/dist/capture/rule.d.ts.map +1 -0
  52. package/dist/capture/rule.js +39 -0
  53. package/dist/capture/rule.js.map +1 -0
  54. package/dist/capture/schema.d.ts +3020 -0
  55. package/dist/capture/schema.d.ts.map +1 -0
  56. package/dist/capture/schema.js +488 -0
  57. package/dist/capture/schema.js.map +1 -0
  58. package/dist/capture/spacingUnit.d.ts +32 -0
  59. package/dist/capture/spacingUnit.d.ts.map +1 -0
  60. package/dist/capture/spacingUnit.js +49 -0
  61. package/dist/capture/spacingUnit.js.map +1 -0
  62. package/dist/capture/stitch.d.ts +11 -0
  63. package/dist/capture/stitch.d.ts.map +1 -0
  64. package/dist/capture/stitch.js +382 -0
  65. package/dist/capture/stitch.js.map +1 -0
  66. package/dist/capture/tokensExport.d.ts +37 -0
  67. package/dist/capture/tokensExport.d.ts.map +1 -0
  68. package/dist/capture/tokensExport.js +355 -0
  69. package/dist/capture/tokensExport.js.map +1 -0
  70. package/dist/capture/values.d.ts +47 -0
  71. package/dist/capture/values.d.ts.map +1 -0
  72. package/dist/capture/values.js +155 -0
  73. package/dist/capture/values.js.map +1 -0
  74. package/dist/feedback/index.d.ts +7 -0
  75. package/dist/feedback/index.d.ts.map +1 -0
  76. package/dist/feedback/index.js +7 -0
  77. package/dist/feedback/index.js.map +1 -0
  78. package/dist/feedback/layoutPrompt.d.ts +26 -0
  79. package/dist/feedback/layoutPrompt.d.ts.map +1 -0
  80. package/dist/feedback/layoutPrompt.js +38 -0
  81. package/dist/feedback/layoutPrompt.js.map +1 -0
  82. package/dist/feedback/parts.d.ts +17 -0
  83. package/dist/feedback/parts.d.ts.map +1 -0
  84. package/dist/feedback/parts.js +50 -0
  85. package/dist/feedback/parts.js.map +1 -0
  86. package/dist/feedback/prompt.d.ts +13 -0
  87. package/dist/feedback/prompt.d.ts.map +1 -0
  88. package/dist/feedback/prompt.js +114 -0
  89. package/dist/feedback/prompt.js.map +1 -0
  90. package/dist/feedback/schema.d.ts +504 -0
  91. package/dist/feedback/schema.d.ts.map +1 -0
  92. package/dist/feedback/schema.js +236 -0
  93. package/dist/feedback/schema.js.map +1 -0
  94. package/dist/feedback/wireframePrompt.d.ts +9 -0
  95. package/dist/feedback/wireframePrompt.d.ts.map +1 -0
  96. package/dist/feedback/wireframePrompt.js +24 -0
  97. package/dist/feedback/wireframePrompt.js.map +1 -0
  98. package/dist/home.d.ts +13 -0
  99. package/dist/home.d.ts.map +1 -0
  100. package/dist/home.js +19 -0
  101. package/dist/home.js.map +1 -0
  102. package/dist/index.d.ts +13 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +13 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/markdown/sections.d.ts +24 -0
  107. package/dist/markdown/sections.d.ts.map +1 -0
  108. package/dist/markdown/sections.js +58 -0
  109. package/dist/markdown/sections.js.map +1 -0
  110. package/dist/memory/activeTask.d.ts +25 -0
  111. package/dist/memory/activeTask.d.ts.map +1 -0
  112. package/dist/memory/activeTask.js +33 -0
  113. package/dist/memory/activeTask.js.map +1 -0
  114. package/dist/memory/brainJson.d.ts +44 -0
  115. package/dist/memory/brainJson.d.ts.map +1 -0
  116. package/dist/memory/brainJson.js +44 -0
  117. package/dist/memory/brainJson.js.map +1 -0
  118. package/dist/memory/decision.d.ts +30 -0
  119. package/dist/memory/decision.d.ts.map +1 -0
  120. package/dist/memory/decision.js +86 -0
  121. package/dist/memory/decision.js.map +1 -0
  122. package/dist/memory/layout.d.ts +41 -0
  123. package/dist/memory/layout.d.ts.map +1 -0
  124. package/dist/memory/layout.js +76 -0
  125. package/dist/memory/layout.js.map +1 -0
  126. package/dist/memory/proposed.d.ts +29 -0
  127. package/dist/memory/proposed.d.ts.map +1 -0
  128. package/dist/memory/proposed.js +63 -0
  129. package/dist/memory/proposed.js.map +1 -0
  130. package/dist/product.d.ts +17 -0
  131. package/dist/product.d.ts.map +1 -0
  132. package/dist/product.js +17 -0
  133. package/dist/product.js.map +1 -0
  134. package/dist/result.d.ts +17 -0
  135. package/dist/result.d.ts.map +1 -0
  136. package/dist/result.js +20 -0
  137. package/dist/result.js.map +1 -0
  138. package/dist/skills/contract.d.ts +137 -0
  139. package/dist/skills/contract.d.ts.map +1 -0
  140. package/dist/skills/contract.js +131 -0
  141. package/dist/skills/contract.js.map +1 -0
  142. package/dist/skills/frontmatter.d.ts +31 -0
  143. package/dist/skills/frontmatter.d.ts.map +1 -0
  144. package/dist/skills/frontmatter.js +214 -0
  145. package/dist/skills/frontmatter.js.map +1 -0
  146. package/package.json +31 -3
  147. package/README.md +0 -3
@@ -0,0 +1,504 @@
1
+ /**
2
+ * Feedback items (FR23-FR30): notes a person pins on elements of a running app, for an agent to
3
+ * apply. One item per note, stored per project (not per page) so a session spans pages (FR26).
4
+ * Each item keeps a stable ID, `P<page>-A<n>`: the page is numbered in the order its route was
5
+ * first annotated in the session, the item in the order it was added on that page (FR27).
6
+ * See docs/format/feedback.md. Browser-safe: no Node imports.
7
+ */
8
+ import { z } from 'zod';
9
+ /** What the person wants: fix a bug, change a design, ask something, or confirm it is right. */
10
+ export declare const FEEDBACK_INTENTS: readonly ['fix', 'change', 'question', 'approve'];
11
+ export declare const FEEDBACK_PRIORITIES: readonly ['high', 'medium', 'low'];
12
+ /**
13
+ * Where a note is, set by the person (changed 13 Nov 2026: no agent writes statuses any more):
14
+ * `pending` (new), `sent` (copied in a prompt) or `resolved` (the person marked it done).
15
+ * `acknowledged`, `question` and `dismissed` come from the earlier agent sync and are still read
16
+ * (as copied, copied and done) so older notes keep working.
17
+ */
18
+ export declare const FEEDBACK_STATUSES: readonly ['pending', 'sent', 'acknowledged', 'question', 'resolved', 'dismissed'];
19
+ /** The statuses Luci sets now. */
20
+ export declare const PERSON_STATUSES: readonly ['pending', 'sent', 'resolved'];
21
+ /** How much the prompt says about each element: selector and text; + source and components; + styles. */
22
+ export declare const DETAIL_LEVELS: readonly ['compact', 'standard', 'detailed'];
23
+ export type FeedbackIntent = (typeof FEEDBACK_INTENTS)[number];
24
+ export type FeedbackPriority = (typeof FEEDBACK_PRIORITIES)[number];
25
+ export type FeedbackStatus = (typeof FEEDBACK_STATUSES)[number];
26
+ export type DetailLevel = (typeof DETAIL_LEVELS)[number];
27
+ export declare const FEEDBACK_REF: RegExp;
28
+ /** A place in the project's code: a path relative to the project (or as the browser saw it), with line and column when known. */
29
+ export declare const sourceLocationSchema: z.ZodObject<{
30
+ file: z.ZodString;
31
+ line: z.ZodOptional<z.ZodNumber>;
32
+ column: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>;
34
+ export type SourceLocation = z.infer<typeof sourceLocationSchema>;
35
+ /**
36
+ * Properties Layout mode changes: size, spacing (each side), the element as a flex or grid
37
+ * container, and its place in a flex or grid parent. `padding` (all sides) is from the first
38
+ * version and is still read.
39
+ */
40
+ export declare const LAYOUT_PROPERTIES: readonly ['width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', 'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'padding', 'display', 'flex-direction', 'flex-wrap', 'justify-content', 'align-items', 'gap', 'row-gap', 'column-gap', 'grid-template-columns', 'align-self', 'flex-grow', 'flex-shrink'];
41
+ /**
42
+ * Generic blocks Layout mode can insert and sketch a new page with (added 13 Nov 2026): parts most
43
+ * pages are made of, for when the app has no component of that kind yet.
44
+ */
45
+ export declare const LAYOUT_BLOCKS: readonly ['section', 'heading', 'text', 'button', 'image slot', 'card', 'card grid', 'navigation', 'footer', 'form field'];
46
+ export type LayoutBlock = (typeof LAYOUT_BLOCKS)[number];
47
+ /**
48
+ * What a new part is (Layout mode steps 2 and 3): one of the app's own components (by name, with
49
+ * its file and one on the page now), a saved design capture (a reference in .luci/design/), or a
50
+ * generic block.
51
+ */
52
+ export declare const partSchema: z.ZodObject<{
53
+ kind: z.ZodEnum<{
54
+ block: "block";
55
+ capture: "capture";
56
+ component: "component";
57
+ }>;
58
+ name: z.ZodString;
59
+ file: z.ZodOptional<z.ZodString>;
60
+ example: z.ZodOptional<z.ZodObject<{
61
+ selector: z.ZodString;
62
+ element: z.ZodString;
63
+ }, z.core.$strip>>;
64
+ }, z.core.$strip>;
65
+ export type Part = z.infer<typeof partSchema>;
66
+ /**
67
+ * One planned layout change (Layout mode, added 13 Nov 2026): a move among the element's siblings,
68
+ * one property from its current value to the planned one (snapped to the page's spacing scale, with
69
+ * the custom property that has that value when the page has one), or a new part inserted before,
70
+ * after or inside the element.
71
+ */
72
+ export declare const layoutChangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
73
+ op: z.ZodLiteral<"move">;
74
+ position: z.ZodEnum<{
75
+ after: "after";
76
+ before: "before";
77
+ first: "first";
78
+ last: "last";
79
+ }>;
80
+ sibling: z.ZodOptional<z.ZodObject<{
81
+ selector: z.ZodString;
82
+ element: z.ZodString;
83
+ }, z.core.$strip>>;
84
+ from: z.ZodNumber;
85
+ to: z.ZodNumber;
86
+ of: z.ZodNumber;
87
+ }, z.core.$strip>, z.ZodObject<{
88
+ op: z.ZodLiteral<"set">;
89
+ property: z.ZodEnum<{
90
+ "align-items": "align-items";
91
+ "align-self": "align-self";
92
+ "column-gap": "column-gap";
93
+ display: "display";
94
+ "flex-direction": "flex-direction";
95
+ "flex-grow": "flex-grow";
96
+ "flex-shrink": "flex-shrink";
97
+ "flex-wrap": "flex-wrap";
98
+ gap: "gap";
99
+ "grid-template-columns": "grid-template-columns";
100
+ height: "height";
101
+ "justify-content": "justify-content";
102
+ "margin-bottom": "margin-bottom";
103
+ "margin-left": "margin-left";
104
+ "margin-right": "margin-right";
105
+ "margin-top": "margin-top";
106
+ "max-height": "max-height";
107
+ "max-width": "max-width";
108
+ "min-height": "min-height";
109
+ "min-width": "min-width";
110
+ padding: "padding";
111
+ "padding-bottom": "padding-bottom";
112
+ "padding-left": "padding-left";
113
+ "padding-right": "padding-right";
114
+ "padding-top": "padding-top";
115
+ "row-gap": "row-gap";
116
+ width: "width";
117
+ }>;
118
+ from: z.ZodString;
119
+ to: z.ZodString;
120
+ token: z.ZodOptional<z.ZodString>;
121
+ grow: z.ZodOptional<z.ZodEnum<{
122
+ down: "down";
123
+ left: "left";
124
+ right: "right";
125
+ up: "up";
126
+ }>>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ op: z.ZodLiteral<"insert">;
129
+ what: z.ZodObject<{
130
+ kind: z.ZodEnum<{
131
+ block: "block";
132
+ capture: "capture";
133
+ component: "component";
134
+ }>;
135
+ name: z.ZodString;
136
+ file: z.ZodOptional<z.ZodString>;
137
+ example: z.ZodOptional<z.ZodObject<{
138
+ selector: z.ZodString;
139
+ element: z.ZodString;
140
+ }, z.core.$strip>>;
141
+ }, z.core.$strip>;
142
+ position: z.ZodEnum<{
143
+ after: "after";
144
+ before: "before";
145
+ end: "end";
146
+ start: "start";
147
+ }>;
148
+ width: z.ZodOptional<z.ZodString>;
149
+ height: z.ZodOptional<z.ZodString>;
150
+ label: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strip>], "op">;
152
+ export type LayoutChange = z.infer<typeof layoutChangeSchema>;
153
+ export declare const layoutSchema: z.ZodObject<{
154
+ viewport: z.ZodObject<{
155
+ width: z.ZodNumber;
156
+ height: z.ZodNumber;
157
+ }, z.core.$strip>;
158
+ changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
159
+ op: z.ZodLiteral<"move">;
160
+ position: z.ZodEnum<{
161
+ after: "after";
162
+ before: "before";
163
+ first: "first";
164
+ last: "last";
165
+ }>;
166
+ sibling: z.ZodOptional<z.ZodObject<{
167
+ selector: z.ZodString;
168
+ element: z.ZodString;
169
+ }, z.core.$strip>>;
170
+ from: z.ZodNumber;
171
+ to: z.ZodNumber;
172
+ of: z.ZodNumber;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ op: z.ZodLiteral<"set">;
175
+ property: z.ZodEnum<{
176
+ "align-items": "align-items";
177
+ "align-self": "align-self";
178
+ "column-gap": "column-gap";
179
+ display: "display";
180
+ "flex-direction": "flex-direction";
181
+ "flex-grow": "flex-grow";
182
+ "flex-shrink": "flex-shrink";
183
+ "flex-wrap": "flex-wrap";
184
+ gap: "gap";
185
+ "grid-template-columns": "grid-template-columns";
186
+ height: "height";
187
+ "justify-content": "justify-content";
188
+ "margin-bottom": "margin-bottom";
189
+ "margin-left": "margin-left";
190
+ "margin-right": "margin-right";
191
+ "margin-top": "margin-top";
192
+ "max-height": "max-height";
193
+ "max-width": "max-width";
194
+ "min-height": "min-height";
195
+ "min-width": "min-width";
196
+ padding: "padding";
197
+ "padding-bottom": "padding-bottom";
198
+ "padding-left": "padding-left";
199
+ "padding-right": "padding-right";
200
+ "padding-top": "padding-top";
201
+ "row-gap": "row-gap";
202
+ width: "width";
203
+ }>;
204
+ from: z.ZodString;
205
+ to: z.ZodString;
206
+ token: z.ZodOptional<z.ZodString>;
207
+ grow: z.ZodOptional<z.ZodEnum<{
208
+ down: "down";
209
+ left: "left";
210
+ right: "right";
211
+ up: "up";
212
+ }>>;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ op: z.ZodLiteral<"insert">;
215
+ what: z.ZodObject<{
216
+ kind: z.ZodEnum<{
217
+ block: "block";
218
+ capture: "capture";
219
+ component: "component";
220
+ }>;
221
+ name: z.ZodString;
222
+ file: z.ZodOptional<z.ZodString>;
223
+ example: z.ZodOptional<z.ZodObject<{
224
+ selector: z.ZodString;
225
+ element: z.ZodString;
226
+ }, z.core.$strip>>;
227
+ }, z.core.$strip>;
228
+ position: z.ZodEnum<{
229
+ after: "after";
230
+ before: "before";
231
+ end: "end";
232
+ start: "start";
233
+ }>;
234
+ width: z.ZodOptional<z.ZodString>;
235
+ height: z.ZodOptional<z.ZodString>;
236
+ label: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strip>], "op">>;
238
+ }, z.core.$strip>;
239
+ export type LayoutPlan = z.infer<typeof layoutSchema>;
240
+ /**
241
+ * A new page sketched in Layout mode (step 3, added 13 Nov 2026): rows from top to bottom, each
242
+ * split into blocks side by side. A block's share of its row is its span over the row's spans.
243
+ */
244
+ export declare const wireframeSchema: z.ZodObject<{
245
+ route: z.ZodString;
246
+ viewport: z.ZodObject<{
247
+ width: z.ZodNumber;
248
+ height: z.ZodNumber;
249
+ }, z.core.$strip>;
250
+ rows: z.ZodArray<z.ZodObject<{
251
+ height: z.ZodString;
252
+ blocks: z.ZodArray<z.ZodObject<{
253
+ what: z.ZodOptional<z.ZodObject<{
254
+ kind: z.ZodEnum<{
255
+ block: "block";
256
+ capture: "capture";
257
+ component: "component";
258
+ }>;
259
+ name: z.ZodString;
260
+ file: z.ZodOptional<z.ZodString>;
261
+ example: z.ZodOptional<z.ZodObject<{
262
+ selector: z.ZodString;
263
+ element: z.ZodString;
264
+ }, z.core.$strip>>;
265
+ }, z.core.$strip>>;
266
+ label: z.ZodOptional<z.ZodString>;
267
+ span: z.ZodNumber;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>>;
270
+ }, z.core.$strip>;
271
+ export type Wireframe = z.infer<typeof wireframeSchema>;
272
+ /**
273
+ * A difference found by a design check (v0.3, added 14 Nov 2026): the built component compared with
274
+ * its design file. One item per difference; the comment says it in words, this says it exactly.
275
+ */
276
+ export declare const designCheckSchema: z.ZodObject<{
277
+ design: z.ZodString;
278
+ part: z.ZodString;
279
+ state: z.ZodOptional<z.ZodEnum<{
280
+ active: "active";
281
+ disabled: "disabled";
282
+ focus: "focus";
283
+ "focus-visible": "focus-visible";
284
+ hover: "hover";
285
+ }>>;
286
+ property: z.ZodString;
287
+ expected: z.ZodString;
288
+ actual: z.ZodString;
289
+ }, z.core.$strip>;
290
+ export type DesignCheck = z.infer<typeof designCheckSchema>;
291
+ export declare const feedbackItemSchema: z.ZodObject<{
292
+ id: z.ZodString;
293
+ ref: z.ZodString;
294
+ page: z.ZodObject<{
295
+ url: z.ZodString;
296
+ route: z.ZodString;
297
+ title: z.ZodOptional<z.ZodString>;
298
+ source: z.ZodOptional<z.ZodString>;
299
+ }, z.core.$strip>;
300
+ target: z.ZodObject<{
301
+ kind: z.ZodEnum<{
302
+ element: "element";
303
+ text: "text";
304
+ }>;
305
+ selector: z.ZodString;
306
+ element: z.ZodString;
307
+ text: z.ZodOptional<z.ZodString>;
308
+ selectedText: z.ZodOptional<z.ZodString>;
309
+ components: z.ZodOptional<z.ZodArray<z.ZodString>>;
310
+ source: z.ZodOptional<z.ZodObject<{
311
+ file: z.ZodString;
312
+ line: z.ZodOptional<z.ZodNumber>;
313
+ column: z.ZodOptional<z.ZodNumber>;
314
+ }, z.core.$strip>>;
315
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
316
+ rect: z.ZodOptional<z.ZodObject<{
317
+ x: z.ZodNumber;
318
+ y: z.ZodNumber;
319
+ width: z.ZodNumber;
320
+ height: z.ZodNumber;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>;
323
+ comment: z.ZodString;
324
+ layout: z.ZodOptional<z.ZodObject<{
325
+ viewport: z.ZodObject<{
326
+ width: z.ZodNumber;
327
+ height: z.ZodNumber;
328
+ }, z.core.$strip>;
329
+ changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
330
+ op: z.ZodLiteral<"move">;
331
+ position: z.ZodEnum<{
332
+ after: "after";
333
+ before: "before";
334
+ first: "first";
335
+ last: "last";
336
+ }>;
337
+ sibling: z.ZodOptional<z.ZodObject<{
338
+ selector: z.ZodString;
339
+ element: z.ZodString;
340
+ }, z.core.$strip>>;
341
+ from: z.ZodNumber;
342
+ to: z.ZodNumber;
343
+ of: z.ZodNumber;
344
+ }, z.core.$strip>, z.ZodObject<{
345
+ op: z.ZodLiteral<"set">;
346
+ property: z.ZodEnum<{
347
+ "align-items": "align-items";
348
+ "align-self": "align-self";
349
+ "column-gap": "column-gap";
350
+ display: "display";
351
+ "flex-direction": "flex-direction";
352
+ "flex-grow": "flex-grow";
353
+ "flex-shrink": "flex-shrink";
354
+ "flex-wrap": "flex-wrap";
355
+ gap: "gap";
356
+ "grid-template-columns": "grid-template-columns";
357
+ height: "height";
358
+ "justify-content": "justify-content";
359
+ "margin-bottom": "margin-bottom";
360
+ "margin-left": "margin-left";
361
+ "margin-right": "margin-right";
362
+ "margin-top": "margin-top";
363
+ "max-height": "max-height";
364
+ "max-width": "max-width";
365
+ "min-height": "min-height";
366
+ "min-width": "min-width";
367
+ padding: "padding";
368
+ "padding-bottom": "padding-bottom";
369
+ "padding-left": "padding-left";
370
+ "padding-right": "padding-right";
371
+ "padding-top": "padding-top";
372
+ "row-gap": "row-gap";
373
+ width: "width";
374
+ }>;
375
+ from: z.ZodString;
376
+ to: z.ZodString;
377
+ token: z.ZodOptional<z.ZodString>;
378
+ grow: z.ZodOptional<z.ZodEnum<{
379
+ down: "down";
380
+ left: "left";
381
+ right: "right";
382
+ up: "up";
383
+ }>>;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ op: z.ZodLiteral<"insert">;
386
+ what: z.ZodObject<{
387
+ kind: z.ZodEnum<{
388
+ block: "block";
389
+ capture: "capture";
390
+ component: "component";
391
+ }>;
392
+ name: z.ZodString;
393
+ file: z.ZodOptional<z.ZodString>;
394
+ example: z.ZodOptional<z.ZodObject<{
395
+ selector: z.ZodString;
396
+ element: z.ZodString;
397
+ }, z.core.$strip>>;
398
+ }, z.core.$strip>;
399
+ position: z.ZodEnum<{
400
+ after: "after";
401
+ before: "before";
402
+ end: "end";
403
+ start: "start";
404
+ }>;
405
+ width: z.ZodOptional<z.ZodString>;
406
+ height: z.ZodOptional<z.ZodString>;
407
+ label: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>], "op">>;
409
+ }, z.core.$strip>>;
410
+ wireframe: z.ZodOptional<z.ZodObject<{
411
+ route: z.ZodString;
412
+ viewport: z.ZodObject<{
413
+ width: z.ZodNumber;
414
+ height: z.ZodNumber;
415
+ }, z.core.$strip>;
416
+ rows: z.ZodArray<z.ZodObject<{
417
+ height: z.ZodString;
418
+ blocks: z.ZodArray<z.ZodObject<{
419
+ what: z.ZodOptional<z.ZodObject<{
420
+ kind: z.ZodEnum<{
421
+ block: "block";
422
+ capture: "capture";
423
+ component: "component";
424
+ }>;
425
+ name: z.ZodString;
426
+ file: z.ZodOptional<z.ZodString>;
427
+ example: z.ZodOptional<z.ZodObject<{
428
+ selector: z.ZodString;
429
+ element: z.ZodString;
430
+ }, z.core.$strip>>;
431
+ }, z.core.$strip>>;
432
+ label: z.ZodOptional<z.ZodString>;
433
+ span: z.ZodNumber;
434
+ }, z.core.$strip>>;
435
+ }, z.core.$strip>>;
436
+ }, z.core.$strip>>;
437
+ check: z.ZodOptional<z.ZodObject<{
438
+ design: z.ZodString;
439
+ part: z.ZodString;
440
+ state: z.ZodOptional<z.ZodEnum<{
441
+ active: "active";
442
+ disabled: "disabled";
443
+ focus: "focus";
444
+ "focus-visible": "focus-visible";
445
+ hover: "hover";
446
+ }>>;
447
+ property: z.ZodString;
448
+ expected: z.ZodString;
449
+ actual: z.ZodString;
450
+ }, z.core.$strip>>;
451
+ intent: z.ZodEnum<{
452
+ approve: "approve";
453
+ change: "change";
454
+ fix: "fix";
455
+ question: "question";
456
+ }>;
457
+ priority: z.ZodEnum<{
458
+ high: "high";
459
+ low: "low";
460
+ medium: "medium";
461
+ }>;
462
+ status: z.ZodEnum<{
463
+ acknowledged: "acknowledged";
464
+ dismissed: "dismissed";
465
+ pending: "pending";
466
+ question: "question";
467
+ resolved: "resolved";
468
+ sent: "sent";
469
+ }>;
470
+ createdAt: z.ZodString;
471
+ updatedAt: z.ZodString;
472
+ sentAt: z.ZodOptional<z.ZodString>;
473
+ thread: z.ZodDefault<z.ZodArray<z.ZodObject<{
474
+ from: z.ZodEnum<{
475
+ agent: "agent";
476
+ person: "person";
477
+ }>;
478
+ text: z.ZodString;
479
+ at: z.ZodString;
480
+ }, z.core.$strip>>>;
481
+ resolution: z.ZodOptional<z.ZodString>;
482
+ }, z.core.$strip>;
483
+ export type FeedbackItem = z.infer<typeof feedbackItemSchema>;
484
+ export type FeedbackItemInput = z.input<typeof feedbackItemSchema>;
485
+ /** The parts of a ref: P2-A3 -> { page: 2, n: 3 }. */
486
+ export declare function parseRef(ref: string): {
487
+ page: number;
488
+ n: number;
489
+ } | null;
490
+ /**
491
+ * The route of an address: its path, plus the fragment when it holds a route ("#/settings").
492
+ * "http://localhost:5173/pricing?plan=pro" -> "/pricing".
493
+ */
494
+ export declare function routeOf(url: string): string;
495
+ /**
496
+ * The ref for a new item on a route: the route keeps the page number it already has in the
497
+ * session (any item on it), else gets the next one; the item gets the next number on that page.
498
+ */
499
+ export declare function nextRef(items: readonly Pick<FeedbackItem, 'ref' | 'page'>[], route: string): string;
500
+ /** Items in prompt order: by page number, then item number. */
501
+ export declare function byRef<T extends Pick<FeedbackItem, 'ref'>>(items: readonly T[]): T[];
502
+ /** Statuses an agent still has to act on. */
503
+ export declare const OPEN_STATUSES: readonly FeedbackStatus[];
504
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/feedback/schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,YAAI,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAU,CAAC;AAClF,eAAO,MAAM,mBAAmB,YAAI,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AACtE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,YAAI,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,U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