@ponchia/ui 0.12.0 → 0.14.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +4 -4
  3. package/behaviors/command.d.ts +34 -13
  4. package/behaviors/command.d.ts.map +1 -1
  5. package/behaviors/command.js +195 -129
  6. package/classes/classes.json +17 -2
  7. package/classes/index.d.ts +12 -0
  8. package/classes/index.js +14 -2
  9. package/classes/vscode.css-custom-data.json +64 -0
  10. package/css/base.css +2 -2
  11. package/css/blocknote.css +61 -0
  12. package/css/clamp.css +2 -2
  13. package/css/content.css +160 -1
  14. package/css/disclosure.css +10 -10
  15. package/css/feedback.css +95 -3
  16. package/css/fonts-inter.css +35 -0
  17. package/css/fonts-jetbrains-mono.css +49 -0
  18. package/css/forms.css +8 -8
  19. package/css/primitives.css +5 -6
  20. package/css/row.css +2 -2
  21. package/css/site.css +0 -31
  22. package/css/term.css +2 -2
  23. package/css/textref.css +2 -2
  24. package/css/toc.css +2 -2
  25. package/css/tokens.css +43 -0
  26. package/css/tool.css +29 -0
  27. package/css/workbench.css +2 -2
  28. package/dist/bronto.css +1 -1
  29. package/dist/css/base.css +1 -1
  30. package/dist/css/blocknote.css +1 -0
  31. package/dist/css/clamp.css +1 -1
  32. package/dist/css/content.css +1 -1
  33. package/dist/css/disclosure.css +1 -1
  34. package/dist/css/feedback.css +1 -1
  35. package/dist/css/fonts-inter.css +1 -0
  36. package/dist/css/fonts-jetbrains-mono.css +1 -0
  37. package/dist/css/forms.css +1 -1
  38. package/dist/css/report-kit.css +1 -1
  39. package/dist/css/row.css +1 -1
  40. package/dist/css/site.css +1 -1
  41. package/dist/css/term.css +1 -1
  42. package/dist/css/textref.css +1 -1
  43. package/dist/css/toc.css +1 -1
  44. package/dist/css/tokens.css +1 -1
  45. package/dist/css/tool.css +1 -0
  46. package/dist/css/workbench.css +1 -1
  47. package/docs/command.md +47 -7
  48. package/docs/compositions.md +2 -2
  49. package/docs/interop/blocknote.md +60 -0
  50. package/docs/package-contract.md +11 -2
  51. package/docs/reference.md +27 -1
  52. package/docs/reporting.md +8 -8
  53. package/docs/stability.md +5 -2
  54. package/docs/theming.md +56 -2
  55. package/docs/usage.md +55 -0
  56. package/fonts/OFL-Inter.txt +92 -0
  57. package/fonts/OFL-JetBrainsMono.txt +93 -0
  58. package/fonts/inter-variable-italic.woff2 +0 -0
  59. package/fonts/inter-variable.woff2 +0 -0
  60. package/fonts/jetbrains-mono-400-italic.woff2 +0 -0
  61. package/fonts/jetbrains-mono-400.woff2 +0 -0
  62. package/fonts/jetbrains-mono-700-italic.woff2 +0 -0
  63. package/fonts/jetbrains-mono-700.woff2 +0 -0
  64. package/llms.txt +1 -1
  65. package/package.json +18 -10
  66. package/tokens/figma.variables.json +240 -0
  67. package/tokens/index.d.ts +2 -2
  68. package/tokens/index.js +30 -2
  69. package/tokens/index.json +32 -0
  70. package/tokens/resolved.json +17 -1
  71. package/tokens/tokens.dtcg.json +190 -0
@@ -1817,6 +1817,51 @@
1817
1817
  }
1818
1818
  }
1819
1819
  },
1820
+ {
1821
+ "name": "focus/ring/offset",
1822
+ "type": "FLOAT",
1823
+ "sourceCssVariable": "--focus-ring-offset",
1824
+ "valuesByMode": {
1825
+ "global": 2
1826
+ },
1827
+ "$extensions": {
1828
+ "com.ponchia.css": {
1829
+ "variable": "--focus-ring-offset",
1830
+ "value": "2px"
1831
+ }
1832
+ },
1833
+ "unit": "px"
1834
+ },
1835
+ {
1836
+ "name": "focus/ring/width",
1837
+ "type": "FLOAT",
1838
+ "sourceCssVariable": "--focus-ring-width",
1839
+ "valuesByMode": {
1840
+ "global": 2
1841
+ },
1842
+ "$extensions": {
1843
+ "com.ponchia.css": {
1844
+ "variable": "--focus-ring-width",
1845
+ "value": "2px"
1846
+ }
1847
+ },
1848
+ "unit": "px"
1849
+ },
1850
+ {
1851
+ "name": "hairline",
1852
+ "type": "FLOAT",
1853
+ "sourceCssVariable": "--hairline",
1854
+ "valuesByMode": {
1855
+ "global": 1
1856
+ },
1857
+ "$extensions": {
1858
+ "com.ponchia.css": {
1859
+ "variable": "--hairline",
1860
+ "value": "1px"
1861
+ }
1862
+ },
1863
+ "unit": "px"
1864
+ },
1820
1865
  {
1821
1866
  "name": "mono",
1822
1867
  "type": "STRING",
@@ -1976,6 +2021,66 @@
1976
2021
  }
1977
2022
  }
1978
2023
  },
2024
+ {
2025
+ "name": "space/0/5",
2026
+ "type": "FLOAT",
2027
+ "sourceCssVariable": "--space-0-5",
2028
+ "valuesByMode": {
2029
+ "global": 0.125
2030
+ },
2031
+ "$extensions": {
2032
+ "com.ponchia.css": {
2033
+ "variable": "--space-0-5",
2034
+ "value": "0.125rem"
2035
+ }
2036
+ },
2037
+ "unit": "rem"
2038
+ },
2039
+ {
2040
+ "name": "space/0/75",
2041
+ "type": "FLOAT",
2042
+ "sourceCssVariable": "--space-0-75",
2043
+ "valuesByMode": {
2044
+ "global": 0.1875
2045
+ },
2046
+ "$extensions": {
2047
+ "com.ponchia.css": {
2048
+ "variable": "--space-0-75",
2049
+ "value": "0.1875rem"
2050
+ }
2051
+ },
2052
+ "unit": "rem"
2053
+ },
2054
+ {
2055
+ "name": "space/1/5",
2056
+ "type": "FLOAT",
2057
+ "sourceCssVariable": "--space-1-5",
2058
+ "valuesByMode": {
2059
+ "global": 0.375
2060
+ },
2061
+ "$extensions": {
2062
+ "com.ponchia.css": {
2063
+ "variable": "--space-1-5",
2064
+ "value": "0.375rem"
2065
+ }
2066
+ },
2067
+ "unit": "rem"
2068
+ },
2069
+ {
2070
+ "name": "space/2/5",
2071
+ "type": "FLOAT",
2072
+ "sourceCssVariable": "--space-2-5",
2073
+ "valuesByMode": {
2074
+ "global": 0.625
2075
+ },
2076
+ "$extensions": {
2077
+ "com.ponchia.css": {
2078
+ "variable": "--space-2-5",
2079
+ "value": "0.625rem"
2080
+ }
2081
+ },
2082
+ "unit": "rem"
2083
+ },
1979
2084
  {
1980
2085
  "name": "space/2xl",
1981
2086
  "type": "FLOAT",
@@ -2229,6 +2334,36 @@
2229
2334
  },
2230
2335
  "unit": "em"
2231
2336
  },
2337
+ {
2338
+ "name": "ui/px",
2339
+ "type": "FLOAT",
2340
+ "sourceCssVariable": "--ui-px",
2341
+ "valuesByMode": {
2342
+ "global": 1
2343
+ },
2344
+ "$extensions": {
2345
+ "com.ponchia.css": {
2346
+ "variable": "--ui-px",
2347
+ "value": "1px"
2348
+ }
2349
+ },
2350
+ "unit": "px"
2351
+ },
2352
+ {
2353
+ "name": "ui/zoom",
2354
+ "type": "FLOAT",
2355
+ "sourceCssVariable": "--ui-zoom",
2356
+ "valuesByMode": {
2357
+ "global": 1
2358
+ },
2359
+ "$extensions": {
2360
+ "com.ponchia.css": {
2361
+ "variable": "--ui-zoom",
2362
+ "value": "1"
2363
+ }
2364
+ },
2365
+ "unit": "number"
2366
+ },
2232
2367
  {
2233
2368
  "name": "z/base",
2234
2369
  "type": "FLOAT",
@@ -2244,6 +2379,81 @@
2244
2379
  },
2245
2380
  "unit": "number"
2246
2381
  },
2382
+ {
2383
+ "name": "z/canvas",
2384
+ "type": "FLOAT",
2385
+ "sourceCssVariable": "--z-canvas",
2386
+ "valuesByMode": {
2387
+ "global": 0
2388
+ },
2389
+ "$extensions": {
2390
+ "com.ponchia.css": {
2391
+ "variable": "--z-canvas",
2392
+ "value": "0"
2393
+ }
2394
+ },
2395
+ "unit": "number"
2396
+ },
2397
+ {
2398
+ "name": "z/chrome",
2399
+ "type": "FLOAT",
2400
+ "sourceCssVariable": "--z-chrome",
2401
+ "valuesByMode": {
2402
+ "global": 20
2403
+ },
2404
+ "$extensions": {
2405
+ "com.ponchia.css": {
2406
+ "variable": "--z-chrome",
2407
+ "value": "20"
2408
+ }
2409
+ },
2410
+ "unit": "number"
2411
+ },
2412
+ {
2413
+ "name": "z/menu",
2414
+ "type": "FLOAT",
2415
+ "sourceCssVariable": "--z-menu",
2416
+ "valuesByMode": {
2417
+ "global": 50
2418
+ },
2419
+ "$extensions": {
2420
+ "com.ponchia.css": {
2421
+ "variable": "--z-menu",
2422
+ "value": "50"
2423
+ }
2424
+ },
2425
+ "unit": "number"
2426
+ },
2427
+ {
2428
+ "name": "z/modal",
2429
+ "type": "FLOAT",
2430
+ "sourceCssVariable": "--z-modal",
2431
+ "valuesByMode": {
2432
+ "global": 30
2433
+ },
2434
+ "$extensions": {
2435
+ "com.ponchia.css": {
2436
+ "variable": "--z-modal",
2437
+ "value": "30"
2438
+ }
2439
+ },
2440
+ "unit": "number"
2441
+ },
2442
+ {
2443
+ "name": "z/navigation",
2444
+ "type": "FLOAT",
2445
+ "sourceCssVariable": "--z-navigation",
2446
+ "valuesByMode": {
2447
+ "global": 80
2448
+ },
2449
+ "$extensions": {
2450
+ "com.ponchia.css": {
2451
+ "variable": "--z-navigation",
2452
+ "value": "80"
2453
+ }
2454
+ },
2455
+ "unit": "number"
2456
+ },
2247
2457
  {
2248
2458
  "name": "z/overlay",
2249
2459
  "type": "FLOAT",
@@ -2259,6 +2469,21 @@
2259
2469
  },
2260
2470
  "unit": "number"
2261
2471
  },
2472
+ {
2473
+ "name": "z/panel",
2474
+ "type": "FLOAT",
2475
+ "sourceCssVariable": "--z-panel",
2476
+ "valuesByMode": {
2477
+ "global": 25
2478
+ },
2479
+ "$extensions": {
2480
+ "com.ponchia.css": {
2481
+ "variable": "--z-panel",
2482
+ "value": "25"
2483
+ }
2484
+ },
2485
+ "unit": "number"
2486
+ },
2262
2487
  {
2263
2488
  "name": "z/popover",
2264
2489
  "type": "FLOAT",
@@ -2318,6 +2543,21 @@
2318
2543
  }
2319
2544
  },
2320
2545
  "unit": "number"
2546
+ },
2547
+ {
2548
+ "name": "z/tooltip",
2549
+ "type": "FLOAT",
2550
+ "sourceCssVariable": "--z-tooltip",
2551
+ "valuesByMode": {
2552
+ "global": 70
2553
+ },
2554
+ "$extensions": {
2555
+ "com.ponchia.css": {
2556
+ "variable": "--z-tooltip",
2557
+ "value": "70"
2558
+ }
2559
+ },
2560
+ "unit": "number"
2321
2561
  }
2322
2562
  ]
2323
2563
  }
package/tokens/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  export type ThemeName = 'light' | 'dark';
5
5
 
6
- export type GlobalTokenName = '--radius-xl' | '--radius-lg' | '--radius-md' | '--radius-sm' | '--radius-pill' | '--space-2xs' | '--space-xs' | '--space-sm' | '--space-md' | '--space-lg' | '--space-xl' | '--space-2xl' | '--tap-target' | '--tap-target-min' | '--safe-area-top' | '--safe-area-right' | '--safe-area-bottom' | '--safe-area-left' | '--mono' | '--sans' | '--dot-font' | '--display' | '--display-weight' | '--display-weight-strong' | '--text-2xs' | '--text-xs' | '--text-sm' | '--text-base' | '--text-lg' | '--text-xl' | '--tracking-wide' | '--tracking-wider' | '--ease-standard' | '--ease-spring' | '--ease-out' | '--duration-fast' | '--duration-base' | '--duration-slow' | '--dot-size' | '--dot-gap' | '--z-base' | '--z-raised' | '--z-sticky' | '--z-overlay' | '--z-popover' | '--z-toast' | '--accent-1' | '--accent-2' | '--accent-3' | '--accent-4' | '--accent-5' | '--accent-6' | '--surface-1' | '--surface-2' | '--surface-3' | '--surface-4' | '--surface-5' | '--surface-6' | '--bronto-color-bg' | '--bronto-color-surface' | '--bronto-color-surface-raised' | '--bronto-color-border' | '--bronto-color-border-strong' | '--bronto-color-text' | '--bronto-color-text-muted' | '--bronto-color-action' | '--bronto-color-on-action' | '--bronto-color-focus' | '--bronto-color-success' | '--bronto-color-warning' | '--bronto-color-danger' | '--bronto-color-info' | '--surface' | '--surface-raised' | '--surface-muted' | '--border' | '--border-strong';
6
+ export type GlobalTokenName = '--radius-xl' | '--radius-lg' | '--radius-md' | '--radius-sm' | '--radius-pill' | '--space-2xs' | '--space-xs' | '--space-sm' | '--space-md' | '--space-lg' | '--space-xl' | '--space-2xl' | '--space-0-5' | '--space-0-75' | '--space-1-5' | '--space-2-5' | '--tap-target' | '--tap-target-min' | '--safe-area-top' | '--safe-area-right' | '--safe-area-bottom' | '--safe-area-left' | '--mono' | '--sans' | '--dot-font' | '--display' | '--display-weight' | '--display-weight-strong' | '--text-2xs' | '--text-xs' | '--text-sm' | '--text-base' | '--text-lg' | '--text-xl' | '--tracking-wide' | '--tracking-wider' | '--ease-standard' | '--ease-spring' | '--ease-out' | '--duration-fast' | '--duration-base' | '--duration-slow' | '--dot-size' | '--dot-gap' | '--z-base' | '--z-raised' | '--z-sticky' | '--z-overlay' | '--z-popover' | '--z-toast' | '--z-canvas' | '--z-chrome' | '--z-panel' | '--z-modal' | '--z-menu' | '--z-tooltip' | '--z-navigation' | '--ui-zoom' | '--ui-px' | '--hairline' | '--focus-ring-width' | '--focus-ring-offset' | '--accent-1' | '--accent-2' | '--accent-3' | '--accent-4' | '--accent-5' | '--accent-6' | '--surface-1' | '--surface-2' | '--surface-3' | '--surface-4' | '--surface-5' | '--surface-6' | '--bronto-color-bg' | '--bronto-color-surface' | '--bronto-color-surface-raised' | '--bronto-color-border' | '--bronto-color-border-strong' | '--bronto-color-text' | '--bronto-color-text-muted' | '--bronto-color-action' | '--bronto-color-on-action' | '--bronto-color-focus' | '--bronto-color-success' | '--bronto-color-warning' | '--bronto-color-danger' | '--bronto-color-info' | '--surface' | '--surface-raised' | '--surface-muted' | '--border' | '--border-strong';
7
7
  export type LightTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--on-accent' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
8
8
  export type DarkTokenName = '--bg' | '--bg-elevated' | '--bg-accent' | '--panel' | '--panel-strong' | '--panel-soft' | '--line' | '--line-strong' | '--text' | '--text-soft' | '--text-dim' | '--accent' | '--accent-ramp-end' | '--accent-strong' | '--accent-text' | '--on-accent' | '--accent-soft' | '--success' | '--success-soft' | '--warning' | '--warning-soft' | '--danger' | '--danger-soft' | '--info' | '--info-soft' | '--code-bg' | '--button-text' | '--field-dot' | '--field-dot-hot' | '--field-dot-accent' | '--focus-ring' | '--shadow' | '--shadow-raised';
9
9
 
@@ -14,7 +14,7 @@ export declare const cssVars: {
14
14
  dark: Record<DarkTokenName, string>;
15
15
  };
16
16
 
17
- export type ScaleKey = 'radius-xl' | 'radius-lg' | 'radius-md' | 'radius-sm' | 'radius-pill' | 'space-2xs' | 'space-xs' | 'space-sm' | 'space-md' | 'space-lg' | 'space-xl' | 'space-2xl' | 'tap-target' | 'tap-target-min' | 'safe-area-top' | 'safe-area-right' | 'safe-area-bottom' | 'safe-area-left' | 'mono' | 'sans' | 'dot-font' | 'display' | 'display-weight' | 'display-weight-strong' | 'text-2xs' | 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'tracking-wide' | 'tracking-wider' | 'ease-standard' | 'ease-spring' | 'ease-out' | 'duration-fast' | 'duration-base' | 'duration-slow' | 'dot-size' | 'dot-gap' | 'z-base' | 'z-raised' | 'z-sticky' | 'z-overlay' | 'z-popover' | 'z-toast' | 'accent-1' | 'accent-2' | 'accent-3' | 'accent-4' | 'accent-5' | 'accent-6' | 'surface-1' | 'surface-2' | 'surface-3' | 'surface-4' | 'surface-5' | 'surface-6' | 'bronto-color-bg' | 'bronto-color-surface' | 'bronto-color-surface-raised' | 'bronto-color-border' | 'bronto-color-border-strong' | 'bronto-color-text' | 'bronto-color-text-muted' | 'bronto-color-action' | 'bronto-color-on-action' | 'bronto-color-focus' | 'bronto-color-success' | 'bronto-color-warning' | 'bronto-color-danger' | 'bronto-color-info' | 'surface' | 'surface-raised' | 'surface-muted' | 'border' | 'border-strong';
17
+ export type ScaleKey = 'radius-xl' | 'radius-lg' | 'radius-md' | 'radius-sm' | 'radius-pill' | 'space-2xs' | 'space-xs' | 'space-sm' | 'space-md' | 'space-lg' | 'space-xl' | 'space-2xl' | 'space-0-5' | 'space-0-75' | 'space-1-5' | 'space-2-5' | 'tap-target' | 'tap-target-min' | 'safe-area-top' | 'safe-area-right' | 'safe-area-bottom' | 'safe-area-left' | 'mono' | 'sans' | 'dot-font' | 'display' | 'display-weight' | 'display-weight-strong' | 'text-2xs' | 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'tracking-wide' | 'tracking-wider' | 'ease-standard' | 'ease-spring' | 'ease-out' | 'duration-fast' | 'duration-base' | 'duration-slow' | 'dot-size' | 'dot-gap' | 'z-base' | 'z-raised' | 'z-sticky' | 'z-overlay' | 'z-popover' | 'z-toast' | 'z-canvas' | 'z-chrome' | 'z-panel' | 'z-modal' | 'z-menu' | 'z-tooltip' | 'z-navigation' | 'ui-zoom' | 'ui-px' | 'hairline' | 'focus-ring-width' | 'focus-ring-offset' | 'accent-1' | 'accent-2' | 'accent-3' | 'accent-4' | 'accent-5' | 'accent-6' | 'surface-1' | 'surface-2' | 'surface-3' | 'surface-4' | 'surface-5' | 'surface-6' | 'bronto-color-bg' | 'bronto-color-surface' | 'bronto-color-surface-raised' | 'bronto-color-border' | 'bronto-color-border-strong' | 'bronto-color-text' | 'bronto-color-text-muted' | 'bronto-color-action' | 'bronto-color-on-action' | 'bronto-color-focus' | 'bronto-color-success' | 'bronto-color-warning' | 'bronto-color-danger' | 'bronto-color-info' | 'surface' | 'surface-raised' | 'surface-muted' | 'border' | 'border-strong';
18
18
  export type ColorKey = 'bg' | 'bg-elevated' | 'bg-accent' | 'panel' | 'panel-strong' | 'panel-soft' | 'line' | 'line-strong' | 'text' | 'text-soft' | 'text-dim' | 'accent' | 'accent-ramp-end' | 'accent-strong' | 'accent-text' | 'on-accent' | 'accent-soft' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft' | 'info' | 'info-soft' | 'code-bg' | 'button-text' | 'field-dot' | 'field-dot-hot' | 'field-dot-accent' | 'focus-ring' | 'shadow' | 'shadow-raised';
19
19
 
20
20
  /** Ergonomic view derived from {@link cssVars} (`--` prefix stripped). */
package/tokens/index.js CHANGED
@@ -33,10 +33,17 @@ export const cssVars = {
33
33
  '--space-lg': '1.35rem',
34
34
  '--space-xl': '1.75rem',
35
35
  '--space-2xl': '2.5rem',
36
+ // Half steps on the 0.25rem unit, for dense tool chrome: 2, 3, 6 and 10px
37
+ // at a 16px root, the gaps a toolbar, a row or a node header needs and the
38
+ // t-shirt scale skips. Named by units, so --space-1-5 is 1.5 x --space-2xs.
39
+ '--space-0-5': '0.125rem',
40
+ '--space-0-75': '0.1875rem',
41
+ '--space-1-5': '0.375rem',
42
+ '--space-2-5': '0.625rem',
36
43
  // Tap targets. Both floors are clamped in px against the rem so they cannot
37
44
  // shrink below the standard when a host re-points the root font size —
38
- // Bronto's own base sets `html { font-size: 0.9375rem }`, under which a bare
39
- // 2.9rem is 43.5px, half a pixel short of the target floor.
45
+ // under a 15px root a bare 2.9rem is 43.5px, half a pixel short of the
46
+ // target floor.
40
47
  // `--tap-target` is the WCAG 2.5.5 (AAA) / iOS-HIG / Material 44px target
41
48
  // every coarse-pointer control floats to. `--tap-target-min` is the WCAG
42
49
  // 2.5.8 (AA) 24px minimum, for controls that only have to clear the smaller
@@ -85,6 +92,27 @@ export const cssVars = {
85
92
  '--z-overlay': '30',
86
93
  '--z-popover': '50',
87
94
  '--z-toast': '60',
95
+ // A workspace's named layers: a tool drawn over a canvas stacks chrome,
96
+ // panels, dialogs, menus, toasts, tooltips and presentation chrome. Where a
97
+ // page layer already means the same thing the workspace name aliases it,
98
+ // so the two scales cannot disagree. A menu sits above a dialog because a
99
+ // dialog opens menus; presentation chrome sits above everything it drives.
100
+ '--z-canvas': 'var(--z-base)',
101
+ '--z-chrome': 'var(--z-sticky)',
102
+ '--z-panel': '25',
103
+ '--z-modal': 'var(--z-overlay)',
104
+ '--z-menu': 'var(--z-popover)',
105
+ '--z-tooltip': '70',
106
+ '--z-navigation': '80',
107
+ // Zoom. --ui-px is one screen pixel. On a page these are plain px; inside
108
+ // a scaled surface marked [data-ui-zoom] (css/tokens.css) they are
109
+ // re-declared in --ui-px, 1px divided by the host's --ui-zoom, so hairlines
110
+ // and focus rings stay visible zoomed out and crisp zoomed in.
111
+ '--ui-zoom': '1',
112
+ '--ui-px': '1px',
113
+ '--hairline': '1px',
114
+ '--focus-ring-width': '2px',
115
+ '--focus-ring-offset': '2px',
88
116
  '--accent-1': 'color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))',
89
117
  '--accent-2': 'color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))',
90
118
  '--accent-3': 'color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))',
package/tokens/index.json CHANGED
@@ -14,6 +14,10 @@
14
14
  "--space-lg": "1.35rem",
15
15
  "--space-xl": "1.75rem",
16
16
  "--space-2xl": "2.5rem",
17
+ "--space-0-5": "0.125rem",
18
+ "--space-0-75": "0.1875rem",
19
+ "--space-1-5": "0.375rem",
20
+ "--space-2-5": "0.625rem",
17
21
  "--tap-target": "max(44px, 2.9rem)",
18
22
  "--tap-target-min": "max(24px, 1.6rem)",
19
23
  "--safe-area-top": "env(safe-area-inset-top, 0px)",
@@ -48,6 +52,18 @@
48
52
  "--z-overlay": "30",
49
53
  "--z-popover": "50",
50
54
  "--z-toast": "60",
55
+ "--z-canvas": "var(--z-base)",
56
+ "--z-chrome": "var(--z-sticky)",
57
+ "--z-panel": "25",
58
+ "--z-modal": "var(--z-overlay)",
59
+ "--z-menu": "var(--z-popover)",
60
+ "--z-tooltip": "70",
61
+ "--z-navigation": "80",
62
+ "--ui-zoom": "1",
63
+ "--ui-px": "1px",
64
+ "--hairline": "1px",
65
+ "--focus-ring-width": "2px",
66
+ "--focus-ring-offset": "2px",
51
67
  "--accent-1": "color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))",
52
68
  "--accent-2": "color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))",
53
69
  "--accent-3": "color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))",
@@ -165,6 +181,10 @@
165
181
  "space-lg": "1.35rem",
166
182
  "space-xl": "1.75rem",
167
183
  "space-2xl": "2.5rem",
184
+ "space-0-5": "0.125rem",
185
+ "space-0-75": "0.1875rem",
186
+ "space-1-5": "0.375rem",
187
+ "space-2-5": "0.625rem",
168
188
  "tap-target": "max(44px, 2.9rem)",
169
189
  "tap-target-min": "max(24px, 1.6rem)",
170
190
  "safe-area-top": "env(safe-area-inset-top, 0px)",
@@ -199,6 +219,18 @@
199
219
  "z-overlay": "30",
200
220
  "z-popover": "50",
201
221
  "z-toast": "60",
222
+ "z-canvas": "var(--z-base)",
223
+ "z-chrome": "var(--z-sticky)",
224
+ "z-panel": "25",
225
+ "z-modal": "var(--z-overlay)",
226
+ "z-menu": "var(--z-popover)",
227
+ "z-tooltip": "70",
228
+ "z-navigation": "80",
229
+ "ui-zoom": "1",
230
+ "ui-px": "1px",
231
+ "hairline": "1px",
232
+ "focus-ring-width": "2px",
233
+ "focus-ring-offset": "2px",
202
234
  "accent-1": "color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))",
203
235
  "accent-2": "color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))",
204
236
  "accent-3": "color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))",
@@ -141,6 +141,10 @@
141
141
  "--space-lg": "1.35rem",
142
142
  "--space-xl": "1.75rem",
143
143
  "--space-2xl": "2.5rem",
144
+ "--space-0-5": "0.125rem",
145
+ "--space-0-75": "0.1875rem",
146
+ "--space-1-5": "0.375rem",
147
+ "--space-2-5": "0.625rem",
144
148
  "--tap-target": "max(44px, 2.9rem)",
145
149
  "--tap-target-min": "max(24px, 1.6rem)",
146
150
  "--safe-area-top": "env(safe-area-inset-top, 0px)",
@@ -174,6 +178,18 @@
174
178
  "--z-sticky": "20",
175
179
  "--z-overlay": "30",
176
180
  "--z-popover": "50",
177
- "--z-toast": "60"
181
+ "--z-toast": "60",
182
+ "--z-canvas": "0",
183
+ "--z-chrome": "20",
184
+ "--z-panel": "25",
185
+ "--z-modal": "30",
186
+ "--z-menu": "50",
187
+ "--z-tooltip": "70",
188
+ "--z-navigation": "80",
189
+ "--ui-zoom": "1",
190
+ "--ui-px": "1px",
191
+ "--hairline": "1px",
192
+ "--focus-ring-width": "2px",
193
+ "--focus-ring-offset": "2px"
178
194
  }
179
195
  }
@@ -179,6 +179,58 @@
179
179
  "authoredValue": "2.5rem"
180
180
  }
181
181
  }
182
+ },
183
+ "0-5": {
184
+ "$type": "dimension",
185
+ "$value": {
186
+ "value": 0.125,
187
+ "unit": "rem"
188
+ },
189
+ "$extensions": {
190
+ "com.ponchia.css": {
191
+ "variable": "--space-0-5",
192
+ "authoredValue": "0.125rem"
193
+ }
194
+ }
195
+ },
196
+ "0-75": {
197
+ "$type": "dimension",
198
+ "$value": {
199
+ "value": 0.1875,
200
+ "unit": "rem"
201
+ },
202
+ "$extensions": {
203
+ "com.ponchia.css": {
204
+ "variable": "--space-0-75",
205
+ "authoredValue": "0.1875rem"
206
+ }
207
+ }
208
+ },
209
+ "1-5": {
210
+ "$type": "dimension",
211
+ "$value": {
212
+ "value": 0.375,
213
+ "unit": "rem"
214
+ },
215
+ "$extensions": {
216
+ "com.ponchia.css": {
217
+ "variable": "--space-1-5",
218
+ "authoredValue": "0.375rem"
219
+ }
220
+ }
221
+ },
222
+ "2-5": {
223
+ "$type": "dimension",
224
+ "$value": {
225
+ "value": 0.625,
226
+ "unit": "rem"
227
+ },
228
+ "$extensions": {
229
+ "com.ponchia.css": {
230
+ "variable": "--space-2-5",
231
+ "authoredValue": "0.625rem"
232
+ }
233
+ }
182
234
  }
183
235
  },
184
236
  "mono": {
@@ -534,6 +586,144 @@
534
586
  "authoredValue": "60"
535
587
  }
536
588
  }
589
+ },
590
+ "canvas": {
591
+ "$type": "number",
592
+ "$value": 0,
593
+ "$extensions": {
594
+ "com.ponchia.css": {
595
+ "variable": "--z-canvas",
596
+ "authoredValue": "var(--z-base)"
597
+ }
598
+ }
599
+ },
600
+ "chrome": {
601
+ "$type": "number",
602
+ "$value": 20,
603
+ "$extensions": {
604
+ "com.ponchia.css": {
605
+ "variable": "--z-chrome",
606
+ "authoredValue": "var(--z-sticky)"
607
+ }
608
+ }
609
+ },
610
+ "panel": {
611
+ "$type": "number",
612
+ "$value": 25,
613
+ "$extensions": {
614
+ "com.ponchia.css": {
615
+ "variable": "--z-panel",
616
+ "authoredValue": "25"
617
+ }
618
+ }
619
+ },
620
+ "modal": {
621
+ "$type": "number",
622
+ "$value": 30,
623
+ "$extensions": {
624
+ "com.ponchia.css": {
625
+ "variable": "--z-modal",
626
+ "authoredValue": "var(--z-overlay)"
627
+ }
628
+ }
629
+ },
630
+ "menu": {
631
+ "$type": "number",
632
+ "$value": 50,
633
+ "$extensions": {
634
+ "com.ponchia.css": {
635
+ "variable": "--z-menu",
636
+ "authoredValue": "var(--z-popover)"
637
+ }
638
+ }
639
+ },
640
+ "tooltip": {
641
+ "$type": "number",
642
+ "$value": 70,
643
+ "$extensions": {
644
+ "com.ponchia.css": {
645
+ "variable": "--z-tooltip",
646
+ "authoredValue": "70"
647
+ }
648
+ }
649
+ },
650
+ "navigation": {
651
+ "$type": "number",
652
+ "$value": 80,
653
+ "$extensions": {
654
+ "com.ponchia.css": {
655
+ "variable": "--z-navigation",
656
+ "authoredValue": "80"
657
+ }
658
+ }
659
+ }
660
+ },
661
+ "ui": {
662
+ "zoom": {
663
+ "$type": "number",
664
+ "$value": 1,
665
+ "$extensions": {
666
+ "com.ponchia.css": {
667
+ "variable": "--ui-zoom",
668
+ "authoredValue": "1"
669
+ }
670
+ }
671
+ },
672
+ "px": {
673
+ "$type": "dimension",
674
+ "$value": {
675
+ "value": 1,
676
+ "unit": "px"
677
+ },
678
+ "$extensions": {
679
+ "com.ponchia.css": {
680
+ "variable": "--ui-px",
681
+ "authoredValue": "1px"
682
+ }
683
+ }
684
+ }
685
+ },
686
+ "hairline": {
687
+ "DEFAULT": {
688
+ "$type": "dimension",
689
+ "$value": {
690
+ "value": 1,
691
+ "unit": "px"
692
+ },
693
+ "$extensions": {
694
+ "com.ponchia.css": {
695
+ "variable": "--hairline",
696
+ "authoredValue": "1px"
697
+ }
698
+ }
699
+ }
700
+ },
701
+ "focus": {
702
+ "ring-width": {
703
+ "$type": "dimension",
704
+ "$value": {
705
+ "value": 2,
706
+ "unit": "px"
707
+ },
708
+ "$extensions": {
709
+ "com.ponchia.css": {
710
+ "variable": "--focus-ring-width",
711
+ "authoredValue": "2px"
712
+ }
713
+ }
714
+ },
715
+ "ring-offset": {
716
+ "$type": "dimension",
717
+ "$value": {
718
+ "value": 2,
719
+ "unit": "px"
720
+ },
721
+ "$extensions": {
722
+ "com.ponchia.css": {
723
+ "variable": "--focus-ring-offset",
724
+ "authoredValue": "2px"
725
+ }
726
+ }
537
727
  }
538
728
  }
539
729
  },