@usevyre/ai-context 1.2.1 → 1.3.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.
package/dist/schema.json CHANGED
@@ -1,14 +1,34 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "version": "1.2.0",
4
- "generatedAt": "2026-05-16",
3
+ "version": "1.6.0",
4
+ "generatedAt": "2026-05-18",
5
5
  "package": "@usevyre/react",
6
- "packageVersion": "1.1.0",
6
+ "packageVersion": "1.6.0",
7
7
  "validFor": [
8
8
  "@usevyre/react@1.1.0+",
9
9
  "@usevyre/vue@1.1.0+"
10
10
  ],
11
11
  "changelog": {
12
+ "1.6.0": {
13
+ "date": "2026-05-18",
14
+ "breaking": false,
15
+ "summary": "Documented the spacing model as an explicit anti-pattern on representative components (Button, Card, Input): useVyre components take no padding/margin props — use Stack/Grid gap or a Box wrapper. No API change."
16
+ },
17
+ "1.5.0": {
18
+ "date": "2026-05-18",
19
+ "breaking": false,
20
+ "summary": "Stack, Grid and Box gain token-locked width / height props (keywords auto/full/fit/screen + fixed-rem token sizes xs–2xl), removing the need for an inline width/height style for common layout sizing."
21
+ },
22
+ "1.4.0": {
23
+ "date": "2026-05-18",
24
+ "breaking": false,
25
+ "summary": "Layout primitives expanded: Stack now covers the full CSS flexbox surface (reverse directions, wrap modes, alignContent/alignSelf, grow/shrink/basis, per-axis gap); Grid gains rows/flow/justify + a new GridItem subcomponent for span/placement; Box gains per-axis (X/Y) and per-side (Top/Right/Bottom/Left) token padding/margin. Fixes Grid columns being overwritten when a user style prop was passed."
26
+ },
27
+ "1.3.0": {
28
+ "date": "2026-05-18",
29
+ "breaking": false,
30
+ "summary": "Added Stack, Grid and Box layout primitives. Token-locked spacing (no raw px/rem) to eliminate hallucinated inline flex/grid styles; Box exposes a documented style escape hatch flagged as an anti-pattern."
31
+ },
12
32
  "1.2.0": {
13
33
  "date": "2026-05-16",
14
34
  "breaking": false,
@@ -106,6 +126,79 @@
106
126
  }
107
127
  ]
108
128
  },
129
+ "AlertDialog": {
130
+ "description": "Blocking confirmation modal (focus-trapped). Controlled via open + onOpenChange (React) / v-model (Vue). Use for destructive or irreversible actions that need explicit confirm/cancel. For non-blocking inline feedback use Alert; for general dialogs use Modal.",
131
+ "import": "import { AlertDialog } from \"@usevyre/react\"",
132
+ "props": {
133
+ "open": {
134
+ "type": "boolean",
135
+ "description": "Controlled visibility. Vue: v-model."
136
+ },
137
+ "onOpenChange": {
138
+ "type": "function",
139
+ "description": "(open: boolean) => void — called when the dialog requests to close (backdrop, Esc, cancel). Vue: update:modelValue / v-model."
140
+ },
141
+ "title": {
142
+ "type": "string",
143
+ "description": "Dialog heading (required)."
144
+ },
145
+ "description": {
146
+ "type": "string",
147
+ "description": "Supporting body text."
148
+ },
149
+ "variant": {
150
+ "type": "enum",
151
+ "values": [
152
+ "danger",
153
+ "warning",
154
+ "info"
155
+ ],
156
+ "default": "info",
157
+ "description": "Visual tone of the confirm action / icon."
158
+ },
159
+ "confirmLabel": {
160
+ "type": "string",
161
+ "default": "Confirm",
162
+ "description": "Confirm button text."
163
+ },
164
+ "cancelLabel": {
165
+ "type": "string",
166
+ "default": "Cancel",
167
+ "description": "Cancel button text."
168
+ },
169
+ "onConfirm": {
170
+ "type": "function",
171
+ "description": "Called when the confirm button is pressed."
172
+ },
173
+ "onCancel": {
174
+ "type": "function",
175
+ "description": "Called when cancelled (button, Esc, backdrop)."
176
+ }
177
+ },
178
+ "antiPatterns": [
179
+ {
180
+ "pattern": "AlertDialog without open/onOpenChange (React) or v-model (Vue)",
181
+ "reason": "It is controlled; it never shows/closes without state",
182
+ "fix": "Drive open from state; close in onOpenChange / via v-model"
183
+ },
184
+ {
185
+ "pattern": "Using Alert (inline banner) for a confirm/cancel decision",
186
+ "reason": "Alert is non-blocking inline feedback, has no confirm flow",
187
+ "fix": "Use AlertDialog for blocking confirmation; Alert for passive messages"
188
+ },
189
+ {
190
+ "pattern": "variant=\"success\" or \"error\"",
191
+ "reason": "AlertDialog variant is \"danger\" | \"warning\" | \"info\" only",
192
+ "fix": "Use \"danger\" for destructive, \"warning\" to caution, \"info\" otherwise"
193
+ }
194
+ ],
195
+ "examples": [
196
+ {
197
+ "description": "Destructive confirmation",
198
+ "code": "const [open, setOpen] = useState(false);\n<Button variant=\"danger\" onClick={() => setOpen(true)}>Delete</Button>\n<AlertDialog\n open={open}\n onOpenChange={setOpen}\n variant=\"danger\"\n title=\"Delete project?\"\n description=\"This cannot be undone.\"\n confirmLabel=\"Delete\"\n onConfirm={() => deleteProject()}\n/>"
199
+ }
200
+ ]
201
+ },
109
202
  "Avatar": {
110
203
  "description": "User profile image with fallback initials or icon.",
111
204
  "import": "import { Avatar } from \"@usevyre/react\"",
@@ -328,6 +421,11 @@
328
421
  "pattern": "size=\"icon\" without aria-label",
329
422
  "reason": "Icon-only buttons have no visible text — screen readers need aria-label",
330
423
  "fix": "Add aria-label describing the action"
424
+ },
425
+ {
426
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
427
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
428
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it"
331
429
  }
332
430
  ],
333
431
  "examples": [
@@ -511,6 +609,11 @@
511
609
  "pattern": "variant=\"primary\"",
512
610
  "reason": "Card has no 'primary' variant",
513
611
  "fix": "Use variant=\"elevated\" | \"outlined\" | \"ghost\" | \"accent\""
612
+ },
613
+ {
614
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
615
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
616
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it"
514
617
  }
515
618
  ],
516
619
  "examples": [
@@ -881,6 +984,11 @@
881
984
  "pattern": "Vue: binding Input/Textarea value without v-model",
882
985
  "reason": "Vue Input & Textarea support v-model (modelValue); manual :value alone won't update",
883
986
  "fix": "Use v-model on <Input>/<Textarea> in Vue; in React use value + onChange"
987
+ },
988
+ {
989
+ "pattern": "padding / margin / marginTop (any spacing prop) on a useVyre component",
990
+ "reason": "Components have NO spacing props by design — internal spacing is fixed by tokens for visual consistency",
991
+ "fix": "Space BETWEEN components with <Stack gap> / <Grid gap>; space AROUND a block with <Box padding/margin> wrapping it"
884
992
  }
885
993
  ],
886
994
  "examples": [
@@ -2137,6 +2245,676 @@
2137
2245
  }
2138
2246
  ]
2139
2247
  },
2248
+ "Stack": {
2249
+ "description": "Full one-dimensional flex layout primitive. USE INSTEAD OF <div style={{display:'flex'}}>. Covers the whole CSS flexbox surface (direction incl. reverse, wrap, align/justify/alignContent/alignSelf, grow/shrink/basis, per-axis gap) with token-locked spacing. Renders a plain <div> (or `as`).",
2250
+ "import": "import { Stack } from \"@usevyre/react\"",
2251
+ "props": {
2252
+ "direction": {
2253
+ "type": "enum",
2254
+ "values": [
2255
+ "row",
2256
+ "column",
2257
+ "row-reverse",
2258
+ "column-reverse"
2259
+ ],
2260
+ "default": "row",
2261
+ "description": "flex-direction"
2262
+ },
2263
+ "inline": {
2264
+ "type": "boolean",
2265
+ "default": false,
2266
+ "description": "Render as inline-flex instead of flex"
2267
+ },
2268
+ "gap": {
2269
+ "type": "enum",
2270
+ "values": [
2271
+ "none",
2272
+ "xs",
2273
+ "sm",
2274
+ "md",
2275
+ "lg",
2276
+ "xl",
2277
+ "2xl"
2278
+ ],
2279
+ "default": "md",
2280
+ "description": "Space between children. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2281
+ },
2282
+ "rowGap": {
2283
+ "type": "enum",
2284
+ "values": [
2285
+ "none",
2286
+ "xs",
2287
+ "sm",
2288
+ "md",
2289
+ "lg",
2290
+ "xl",
2291
+ "2xl"
2292
+ ],
2293
+ "description": "Row-gap override. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2294
+ },
2295
+ "columnGap": {
2296
+ "type": "enum",
2297
+ "values": [
2298
+ "none",
2299
+ "xs",
2300
+ "sm",
2301
+ "md",
2302
+ "lg",
2303
+ "xl",
2304
+ "2xl"
2305
+ ],
2306
+ "description": "Column-gap override. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2307
+ },
2308
+ "align": {
2309
+ "type": "enum",
2310
+ "values": [
2311
+ "start",
2312
+ "center",
2313
+ "end",
2314
+ "stretch",
2315
+ "baseline"
2316
+ ],
2317
+ "default": "stretch",
2318
+ "description": "align-items (cross axis)"
2319
+ },
2320
+ "justify": {
2321
+ "type": "enum",
2322
+ "values": [
2323
+ "start",
2324
+ "center",
2325
+ "end",
2326
+ "between",
2327
+ "around",
2328
+ "evenly"
2329
+ ],
2330
+ "default": "start",
2331
+ "description": "justify-content (main axis)"
2332
+ },
2333
+ "alignContent": {
2334
+ "type": "enum",
2335
+ "values": [
2336
+ "start",
2337
+ "center",
2338
+ "end",
2339
+ "stretch",
2340
+ "between",
2341
+ "around",
2342
+ "evenly"
2343
+ ],
2344
+ "description": "align-content (multi-line cross axis)"
2345
+ },
2346
+ "alignSelf": {
2347
+ "type": "enum",
2348
+ "values": [
2349
+ "auto",
2350
+ "start",
2351
+ "center",
2352
+ "end",
2353
+ "stretch",
2354
+ "baseline"
2355
+ ],
2356
+ "description": "align-self for this element"
2357
+ },
2358
+ "wrap": {
2359
+ "type": "enum",
2360
+ "values": [
2361
+ "nowrap",
2362
+ "wrap",
2363
+ "wrap-reverse"
2364
+ ],
2365
+ "default": "nowrap",
2366
+ "description": "flex-wrap"
2367
+ },
2368
+ "grow": {
2369
+ "type": "number",
2370
+ "description": "flex-grow"
2371
+ },
2372
+ "shrink": {
2373
+ "type": "number",
2374
+ "description": "flex-shrink"
2375
+ },
2376
+ "basis": {
2377
+ "type": "enum",
2378
+ "values": [
2379
+ "none",
2380
+ "xs",
2381
+ "sm",
2382
+ "md",
2383
+ "lg",
2384
+ "xl",
2385
+ "2xl",
2386
+ "auto",
2387
+ "content",
2388
+ "0"
2389
+ ],
2390
+ "description": "flex-basis — token, 'auto', 'content', or '0'"
2391
+ },
2392
+ "width": {
2393
+ "type": "enum",
2394
+ "values": [
2395
+ "auto",
2396
+ "full",
2397
+ "fit",
2398
+ "screen",
2399
+ "xs",
2400
+ "sm",
2401
+ "md",
2402
+ "lg",
2403
+ "xl",
2404
+ "2xl"
2405
+ ],
2406
+ "description": "Width — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline width style."
2407
+ },
2408
+ "height": {
2409
+ "type": "enum",
2410
+ "values": [
2411
+ "auto",
2412
+ "full",
2413
+ "fit",
2414
+ "screen",
2415
+ "xs",
2416
+ "sm",
2417
+ "md",
2418
+ "lg",
2419
+ "xl",
2420
+ "2xl"
2421
+ ],
2422
+ "description": "Height — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline height style."
2423
+ },
2424
+ "as": {
2425
+ "type": "string",
2426
+ "default": "div",
2427
+ "description": "HTML tag to render"
2428
+ }
2429
+ },
2430
+ "antiPatterns": [
2431
+ {
2432
+ "pattern": "<div style={{ display: 'flex', gap: 12 }}>",
2433
+ "reason": "Inline flex styles bypass the design system and use magic-number spacing",
2434
+ "fix": "Use <Stack gap=\"md\"> — gap is a token"
2435
+ },
2436
+ {
2437
+ "pattern": "gap={12} or gap=\"12px\"",
2438
+ "reason": "Stack gap is a closed token enum",
2439
+ "fix": "Use gap=\"none|xs|sm|md|lg|xl|2xl\""
2440
+ },
2441
+ {
2442
+ "pattern": "direction=\"vertical\" / \"horizontal\"",
2443
+ "reason": "Stack mirrors CSS flex-direction names",
2444
+ "fix": "Use direction=\"row\" or \"column\" (also row-reverse / column-reverse)"
2445
+ },
2446
+ {
2447
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
2448
+ "reason": "Inline width/height bypass the design system and use magic numbers",
2449
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc."
2450
+ }
2451
+ ],
2452
+ "examples": [
2453
+ {
2454
+ "description": "Row, vertically centered, spaced apart",
2455
+ "code": "<Stack direction=\"row\" gap=\"md\" align=\"center\" justify=\"between\">\n <Avatar src={user.avatar} />\n <Text>{user.name}</Text>\n <Button>Edit</Button>\n</Stack>"
2456
+ },
2457
+ {
2458
+ "description": "Wrapping grid-ish gallery with per-axis gap",
2459
+ "code": "<Stack wrap=\"wrap\" rowGap=\"lg\" columnGap=\"md\">\n {tags.map((t) => <Tag key={t}>{t}</Tag>)}\n</Stack>"
2460
+ }
2461
+ ]
2462
+ },
2463
+ "Grid": {
2464
+ "description": "Two-dimensional CSS grid primitive. Explicit column/row counts (or auto-fit), auto-flow control, token gap. Pair with GridItem for cell spanning/placement. Renders a plain <div> (or `as`).",
2465
+ "import": "import { Grid, GridItem } from \"@usevyre/react\"",
2466
+ "subcomponents": [
2467
+ "GridItem"
2468
+ ],
2469
+ "props": {
2470
+ "columns": {
2471
+ "type": "number | \"auto-fit\"",
2472
+ "default": 1,
2473
+ "description": "Equal-width column count (1-12), or 'auto-fit' for responsive wrapping"
2474
+ },
2475
+ "rows": {
2476
+ "type": "number | \"auto\"",
2477
+ "description": "Explicit row count, or 'auto'"
2478
+ },
2479
+ "flow": {
2480
+ "type": "enum",
2481
+ "values": [
2482
+ "row",
2483
+ "column",
2484
+ "dense",
2485
+ "row-dense",
2486
+ "column-dense"
2487
+ ],
2488
+ "description": "grid-auto-flow"
2489
+ },
2490
+ "gap": {
2491
+ "type": "enum",
2492
+ "values": [
2493
+ "none",
2494
+ "xs",
2495
+ "sm",
2496
+ "md",
2497
+ "lg",
2498
+ "xl",
2499
+ "2xl"
2500
+ ],
2501
+ "default": "md",
2502
+ "description": "Space between cells. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2503
+ },
2504
+ "rowGap": {
2505
+ "type": "enum",
2506
+ "values": [
2507
+ "none",
2508
+ "xs",
2509
+ "sm",
2510
+ "md",
2511
+ "lg",
2512
+ "xl",
2513
+ "2xl"
2514
+ ],
2515
+ "description": "Row-gap override. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2516
+ },
2517
+ "columnGap": {
2518
+ "type": "enum",
2519
+ "values": [
2520
+ "none",
2521
+ "xs",
2522
+ "sm",
2523
+ "md",
2524
+ "lg",
2525
+ "xl",
2526
+ "2xl"
2527
+ ],
2528
+ "description": "Column-gap override. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2529
+ },
2530
+ "align": {
2531
+ "type": "enum",
2532
+ "values": [
2533
+ "start",
2534
+ "center",
2535
+ "end",
2536
+ "stretch"
2537
+ ],
2538
+ "default": "stretch",
2539
+ "description": "align-items"
2540
+ },
2541
+ "justify": {
2542
+ "type": "enum",
2543
+ "values": [
2544
+ "start",
2545
+ "center",
2546
+ "end",
2547
+ "stretch"
2548
+ ],
2549
+ "description": "justify-items"
2550
+ },
2551
+ "width": {
2552
+ "type": "enum",
2553
+ "values": [
2554
+ "auto",
2555
+ "full",
2556
+ "fit",
2557
+ "screen",
2558
+ "xs",
2559
+ "sm",
2560
+ "md",
2561
+ "lg",
2562
+ "xl",
2563
+ "2xl"
2564
+ ],
2565
+ "description": "Width — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline width style."
2566
+ },
2567
+ "height": {
2568
+ "type": "enum",
2569
+ "values": [
2570
+ "auto",
2571
+ "full",
2572
+ "fit",
2573
+ "screen",
2574
+ "xs",
2575
+ "sm",
2576
+ "md",
2577
+ "lg",
2578
+ "xl",
2579
+ "2xl"
2580
+ ],
2581
+ "description": "Height — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline height style."
2582
+ },
2583
+ "as": {
2584
+ "type": "string",
2585
+ "default": "div",
2586
+ "description": "HTML tag to render"
2587
+ }
2588
+ },
2589
+ "antiPatterns": [
2590
+ {
2591
+ "pattern": "<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr 1fr' }}>",
2592
+ "reason": "Inline grid styles bypass the design system",
2593
+ "fix": "Use <Grid columns={3} gap=\"md\">"
2594
+ },
2595
+ {
2596
+ "pattern": "columns=\"3\" (string)",
2597
+ "reason": "columns is a number or the literal 'auto-fit'",
2598
+ "fix": "Use columns={3} or columns=\"auto-fit\""
2599
+ },
2600
+ {
2601
+ "pattern": "Nested div with inline grid-column for spanning",
2602
+ "reason": "Spanning has a dedicated primitive",
2603
+ "fix": "Wrap the cell in <GridItem colSpan={2}>"
2604
+ },
2605
+ {
2606
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
2607
+ "reason": "Inline width/height bypass the design system and use magic numbers",
2608
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc."
2609
+ }
2610
+ ],
2611
+ "examples": [
2612
+ {
2613
+ "description": "Three-column grid with a wide first cell",
2614
+ "code": "<Grid columns={3} gap=\"lg\">\n <GridItem colSpan={2}><Card>Wide</Card></GridItem>\n <Card>Two</Card>\n <Card>Three</Card>\n</Grid>"
2615
+ },
2616
+ {
2617
+ "description": "Responsive auto-fit grid",
2618
+ "code": "<Grid columns=\"auto-fit\" gap=\"md\">\n {items.map((i) => <Card key={i.id}>{i.title}</Card>)}\n</Grid>"
2619
+ }
2620
+ ]
2621
+ },
2622
+ "GridItem": {
2623
+ "description": "Child placement inside <Grid>. Sets column/row span and start lines. Renders a plain <div> (or `as`).",
2624
+ "import": "import { GridItem } from \"@usevyre/react\"",
2625
+ "props": {
2626
+ "colSpan": {
2627
+ "type": "number",
2628
+ "description": "Number of columns this item spans"
2629
+ },
2630
+ "rowSpan": {
2631
+ "type": "number",
2632
+ "description": "Number of rows this item spans"
2633
+ },
2634
+ "colStart": {
2635
+ "type": "number",
2636
+ "description": "1-based column line to start at"
2637
+ },
2638
+ "rowStart": {
2639
+ "type": "number",
2640
+ "description": "1-based row line to start at"
2641
+ },
2642
+ "as": {
2643
+ "type": "string",
2644
+ "default": "div",
2645
+ "description": "HTML tag to render"
2646
+ }
2647
+ },
2648
+ "antiPatterns": [
2649
+ {
2650
+ "pattern": "GridItem outside a Grid",
2651
+ "reason": "GridItem only has effect as a direct child of Grid",
2652
+ "fix": "Place <GridItem> directly inside <Grid>"
2653
+ }
2654
+ ],
2655
+ "examples": [
2656
+ {
2657
+ "description": "Span two columns",
2658
+ "code": "<Grid columns={4} gap=\"md\">\n <GridItem colSpan={2}>Featured</GridItem>\n <div>a</div>\n <div>b</div>\n</Grid>"
2659
+ }
2660
+ ]
2661
+ },
2662
+ "Box": {
2663
+ "description": "Spacing-only container plus a controlled escape hatch. Token padding/margin with shorthand, per-axis (X/Y) and per-side (Top/Right/Bottom/Left) overrides. The `style` prop is an explicit anti-pattern escape hatch. Renders a plain <div> (or `as`).",
2664
+ "import": "import { Box } from \"@usevyre/react\"",
2665
+ "props": {
2666
+ "padding": {
2667
+ "type": "enum",
2668
+ "values": [
2669
+ "none",
2670
+ "xs",
2671
+ "sm",
2672
+ "md",
2673
+ "lg",
2674
+ "xl",
2675
+ "2xl"
2676
+ ],
2677
+ "description": "Inner spacing, all sides. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2678
+ },
2679
+ "paddingX": {
2680
+ "type": "enum",
2681
+ "values": [
2682
+ "none",
2683
+ "xs",
2684
+ "sm",
2685
+ "md",
2686
+ "lg",
2687
+ "xl",
2688
+ "2xl"
2689
+ ],
2690
+ "description": "Inner spacing, left + right. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2691
+ },
2692
+ "paddingY": {
2693
+ "type": "enum",
2694
+ "values": [
2695
+ "none",
2696
+ "xs",
2697
+ "sm",
2698
+ "md",
2699
+ "lg",
2700
+ "xl",
2701
+ "2xl"
2702
+ ],
2703
+ "description": "Inner spacing, top + bottom. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2704
+ },
2705
+ "paddingTop": {
2706
+ "type": "enum",
2707
+ "values": [
2708
+ "none",
2709
+ "xs",
2710
+ "sm",
2711
+ "md",
2712
+ "lg",
2713
+ "xl",
2714
+ "2xl"
2715
+ ],
2716
+ "description": "Inner spacing, top. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2717
+ },
2718
+ "paddingRight": {
2719
+ "type": "enum",
2720
+ "values": [
2721
+ "none",
2722
+ "xs",
2723
+ "sm",
2724
+ "md",
2725
+ "lg",
2726
+ "xl",
2727
+ "2xl"
2728
+ ],
2729
+ "description": "Inner spacing, right. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2730
+ },
2731
+ "paddingBottom": {
2732
+ "type": "enum",
2733
+ "values": [
2734
+ "none",
2735
+ "xs",
2736
+ "sm",
2737
+ "md",
2738
+ "lg",
2739
+ "xl",
2740
+ "2xl"
2741
+ ],
2742
+ "description": "Inner spacing, bottom. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2743
+ },
2744
+ "paddingLeft": {
2745
+ "type": "enum",
2746
+ "values": [
2747
+ "none",
2748
+ "xs",
2749
+ "sm",
2750
+ "md",
2751
+ "lg",
2752
+ "xl",
2753
+ "2xl"
2754
+ ],
2755
+ "description": "Inner spacing, left. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2756
+ },
2757
+ "margin": {
2758
+ "type": "enum",
2759
+ "values": [
2760
+ "none",
2761
+ "xs",
2762
+ "sm",
2763
+ "md",
2764
+ "lg",
2765
+ "xl",
2766
+ "2xl"
2767
+ ],
2768
+ "description": "Outer spacing, all sides. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2769
+ },
2770
+ "marginX": {
2771
+ "type": "enum",
2772
+ "values": [
2773
+ "none",
2774
+ "xs",
2775
+ "sm",
2776
+ "md",
2777
+ "lg",
2778
+ "xl",
2779
+ "2xl"
2780
+ ],
2781
+ "description": "Outer spacing, left + right. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2782
+ },
2783
+ "marginY": {
2784
+ "type": "enum",
2785
+ "values": [
2786
+ "none",
2787
+ "xs",
2788
+ "sm",
2789
+ "md",
2790
+ "lg",
2791
+ "xl",
2792
+ "2xl"
2793
+ ],
2794
+ "description": "Outer spacing, top + bottom. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2795
+ },
2796
+ "marginTop": {
2797
+ "type": "enum",
2798
+ "values": [
2799
+ "none",
2800
+ "xs",
2801
+ "sm",
2802
+ "md",
2803
+ "lg",
2804
+ "xl",
2805
+ "2xl"
2806
+ ],
2807
+ "description": "Outer spacing, top. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2808
+ },
2809
+ "marginRight": {
2810
+ "type": "enum",
2811
+ "values": [
2812
+ "none",
2813
+ "xs",
2814
+ "sm",
2815
+ "md",
2816
+ "lg",
2817
+ "xl",
2818
+ "2xl"
2819
+ ],
2820
+ "description": "Outer spacing, right. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2821
+ },
2822
+ "marginBottom": {
2823
+ "type": "enum",
2824
+ "values": [
2825
+ "none",
2826
+ "xs",
2827
+ "sm",
2828
+ "md",
2829
+ "lg",
2830
+ "xl",
2831
+ "2xl"
2832
+ ],
2833
+ "description": "Outer spacing, bottom. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2834
+ },
2835
+ "marginLeft": {
2836
+ "type": "enum",
2837
+ "values": [
2838
+ "none",
2839
+ "xs",
2840
+ "sm",
2841
+ "md",
2842
+ "lg",
2843
+ "xl",
2844
+ "2xl"
2845
+ ],
2846
+ "description": "Outer spacing, left. Maps to --vyre-spacing tokens. NEVER a raw px/rem value."
2847
+ },
2848
+ "width": {
2849
+ "type": "enum",
2850
+ "values": [
2851
+ "auto",
2852
+ "full",
2853
+ "fit",
2854
+ "screen",
2855
+ "xs",
2856
+ "sm",
2857
+ "md",
2858
+ "lg",
2859
+ "xl",
2860
+ "2xl"
2861
+ ],
2862
+ "description": "Width — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline width style."
2863
+ },
2864
+ "height": {
2865
+ "type": "enum",
2866
+ "values": [
2867
+ "auto",
2868
+ "full",
2869
+ "fit",
2870
+ "screen",
2871
+ "xs",
2872
+ "sm",
2873
+ "md",
2874
+ "lg",
2875
+ "xl",
2876
+ "2xl"
2877
+ ],
2878
+ "description": "Height — keyword (auto/full=100%/fit=fit-content/screen) or a fixed-rem token size (xs 8 · sm 12 · md 16 · lg 24 · xl 32 · 2xl 42). Avoids an inline height style."
2879
+ },
2880
+ "as": {
2881
+ "type": "string",
2882
+ "default": "div",
2883
+ "description": "HTML tag to render"
2884
+ },
2885
+ "style": {
2886
+ "type": "React.CSSProperties",
2887
+ "description": "ANTI-PATTERN escape hatch. Only for values the design system cannot express. Flagged by @usevyre/eslint-plugin."
2888
+ }
2889
+ },
2890
+ "antiPatterns": [
2891
+ {
2892
+ "pattern": "<Box style={{ padding: 16 }}>",
2893
+ "reason": "padding is a token prop; style is a last resort",
2894
+ "fix": "Use <Box padding=\"md\"> (or paddingX/paddingTop/...)"
2895
+ },
2896
+ {
2897
+ "pattern": "Using Box for flex/grid layout",
2898
+ "reason": "Box is spacing-only and has no layout props",
2899
+ "fix": "Use <Stack> or <Grid>"
2900
+ },
2901
+ {
2902
+ "pattern": "style={{ width: \"100%\" }} / style={{ height: 320 }}",
2903
+ "reason": "Inline width/height bypass the design system and use magic numbers",
2904
+ "fix": "Use the width / height prop: width=\"full\", width=\"md\", height=\"screen\", etc."
2905
+ }
2906
+ ],
2907
+ "examples": [
2908
+ {
2909
+ "description": "Asymmetric padding",
2910
+ "code": "<Box as=\"section\" paddingX=\"lg\" paddingY=\"md\">\n <Heading>Settings</Heading>\n</Box>"
2911
+ },
2912
+ {
2913
+ "description": "Vertical rhythm via margin-top",
2914
+ "code": "<Box marginTop=\"xl\"><Separator /></Box>"
2915
+ }
2916
+ ]
2917
+ },
2140
2918
  "DateRangePicker": {
2141
2919
  "description": "Start/end date range picker. Built on Calendar (mode=range) with a friendlier { from, to } object API, a two-month side-by-side view, and preset shortcuts. Use this for report/filter date ranges; use DatePicker for a single date.",
2142
2920
  "import": "import { DateRangePicker } from \"@usevyre/react\"",