@surreal-ui/catalog 0.14.1 → 0.15.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/README.md CHANGED
@@ -151,6 +151,23 @@ getComponent('gauge'); // { entry: '@surreal-ui/catalog/react/flair', export: 'G
151
151
 
152
152
  `findComponents` takes `group` (`baseline`, `data-visual`, `paradigm`), `category`, `tags`, `implements`, `platform`, `provider` and `text`. Every component reports its `category`, `group`, `runtime` (`engine` for a paradigm drawn by a runtime) and, where it can't run everywhere, a `fallback` type.
153
153
 
154
+ An engine type's provider also maps its data to that fallback, so a host without the engine (no WebGL, reduced motion, no script) shows the same thing as a baseline component. `engineFallback(component, data)` from `@surreal-ui/catalog/node` asks the provider (an optional peer) for it:
155
+
156
+ ```ts
157
+ import { getComponent } from '@surreal-ui/catalog';
158
+ import { engineFallback } from '@surreal-ui/catalog/node';
159
+
160
+ await engineFallback(getComponent('gauge')!, {
161
+ value: 88,
162
+ max: 160,
163
+ unit: ' km/h',
164
+ label: 'Speed'
165
+ });
166
+ // { implements: 'progress', props: { value: 55, label: 'Speed: 88 km/h' } }
167
+ ```
168
+
169
+ Editor charts and diagrams fall back to a `table`; Flair's gauge and loaders to `progress` (a loader whose `value` is `null` gives a `spinner`).
170
+
154
171
  ### Loading components on demand
155
172
 
156
173
  Where the catalog is browsed or offered to an agent and only some components are drawn, import `@surreal-ui/catalog/lazy`: it has the same metadata and queries, and `loadComponent(id)` imports one React component on first use (each component is its own chunk).
@@ -194,7 +211,7 @@ pnpm --filter @surreal-ui/catalog sync # after bumping @pixerate/flair or
194
211
  MIT © Pixerate. Some components follow the structure and documentation of [shadcn/ui](https://ui.shadcn.com) and [Radix UI](https://www.radix-ui.com) (both MIT); see `THIRD_PARTY_NOTICES.md`.
195
212
  An item that implements a type the catalog already has (Flair's toggle implements `switch`) is an
196
213
  **alternative** for that type (`getComponent('switch').alternatives`,
197
- `findComponents({ implements: 'switch' })`); any other item is a new type. After bumping a provider,
214
+ `findComponents({ implements: 'switch' })`); any other item is a new type, and later items implementing that type are its alternatives. A type's `fallback` comes from the descriptor. After bumping a provider,
198
215
  run `pnpm --filter @surreal-ui/catalog sync`: it rewrites the synced folders (never hand-written
199
216
  ones), removes items the provider dropped, and regenerates the catalog. CI fails if the repo is
200
217
  behind its installed providers (`check:sync`).
@@ -237,10 +237,11 @@ var CATALOG = {
237
237
  "source": {
238
238
  "provider": "editor",
239
239
  "itemId": "bar-chart",
240
- "version": "0.336.0",
241
- "contentHash": "h1-76ee0998eaac0913"
240
+ "version": "0.348.0",
241
+ "contentHash": "h1-c4e3f64fe21a4485"
242
242
  },
243
243
  "runtime": "engine",
244
+ "fallback": "table",
244
245
  "implements": "bar-chart",
245
246
  "category": "data-visual",
246
247
  "platforms": [
@@ -248,7 +249,7 @@ var CATALOG = {
248
249
  ],
249
250
  "entry": "@surreal-ui/catalog/react/editor",
250
251
  "export": "BarChart",
251
- "contentHash": "891c1fc309014e6d3fd8aaa7c4f8efae7a81fca7f8d27590eeb2525b3d324417",
252
+ "contentHash": "a9e949d450e1cebcaf782ccddaed791e095f0da675f09516c8ee8f9231c069b3",
252
253
  "path": "components/bar-chart",
253
254
  "alternatives": []
254
255
  },
@@ -398,10 +399,11 @@ var CATALOG = {
398
399
  "source": {
399
400
  "provider": "editor",
400
401
  "itemId": "braid",
401
- "version": "0.336.0",
402
- "contentHash": "h1-32ab36e8632bd353"
402
+ "version": "0.348.0",
403
+ "contentHash": "h1-13622e55a2571680"
403
404
  },
404
405
  "runtime": "engine",
406
+ "fallback": "table",
405
407
  "implements": "braid",
406
408
  "category": "data-visual",
407
409
  "platforms": [
@@ -409,7 +411,7 @@ var CATALOG = {
409
411
  ],
410
412
  "entry": "@surreal-ui/catalog/react/editor",
411
413
  "export": "Braid",
412
- "contentHash": "d0302d8764b3adaf61fca077103d82389919fb89ec6805bc1be523ba12c5b36c",
414
+ "contentHash": "55a1efb4e46736163eef9587ad20fc521371af1d3ea9a8c2915c86bed7168ed4",
413
415
  "path": "components/braid",
414
416
  "alternatives": []
415
417
  },
@@ -882,10 +884,11 @@ var CATALOG = {
882
884
  "source": {
883
885
  "provider": "editor",
884
886
  "itemId": "donut-chart",
885
- "version": "0.336.0",
886
- "contentHash": "h1-50feaa770e686a53"
887
+ "version": "0.348.0",
888
+ "contentHash": "h1-14649ed5299c89e1"
887
889
  },
888
890
  "runtime": "engine",
891
+ "fallback": "table",
889
892
  "implements": "donut-chart",
890
893
  "category": "data-visual",
891
894
  "platforms": [
@@ -893,7 +896,7 @@ var CATALOG = {
893
896
  ],
894
897
  "entry": "@surreal-ui/catalog/react/editor",
895
898
  "export": "DonutChart",
896
- "contentHash": "98d4d2922a808ca8bf515047a8db39e9123e797a69645c4953555ad21b2910e6",
899
+ "contentHash": "b440cb71f71a6babdefee4dae03bcb927b5a9cfe85410571736f4627028a3a35",
897
900
  "path": "components/donut-chart",
898
901
  "alternatives": []
899
902
  },
@@ -1025,10 +1028,11 @@ var CATALOG = {
1025
1028
  "source": {
1026
1029
  "provider": "editor",
1027
1030
  "itemId": "flow",
1028
- "version": "0.336.0",
1029
- "contentHash": "h1-610ee378b54394ed"
1031
+ "version": "0.348.0",
1032
+ "contentHash": "h1-1c51f7aa6c7bc336"
1030
1033
  },
1031
1034
  "runtime": "engine",
1035
+ "fallback": "table",
1032
1036
  "implements": "flow",
1033
1037
  "category": "data-visual",
1034
1038
  "platforms": [
@@ -1036,7 +1040,7 @@ var CATALOG = {
1036
1040
  ],
1037
1041
  "entry": "@surreal-ui/catalog/react/editor",
1038
1042
  "export": "Flow",
1039
- "contentHash": "b661f616251347d38e0293d74a0ab00bce0a507c525c9fb3a1719d3a6776f7e1",
1043
+ "contentHash": "64f45d17bc954144b612c1d48d08b193644c53118646c1a495d569cd9a8036c3",
1040
1044
  "path": "components/flow",
1041
1045
  "alternatives": []
1042
1046
  },
@@ -1113,10 +1117,11 @@ var CATALOG = {
1113
1117
  "source": {
1114
1118
  "provider": "flair",
1115
1119
  "itemId": "gauge",
1116
- "version": "0.121.0",
1117
- "contentHash": "75633984bd4ab14c"
1120
+ "version": "0.143.1",
1121
+ "contentHash": "4363d6f7c5cfda2c"
1118
1122
  },
1119
1123
  "runtime": "engine",
1124
+ "fallback": "progress",
1120
1125
  "implements": "gauge",
1121
1126
  "category": "data-visual",
1122
1127
  "platforms": [
@@ -1124,7 +1129,7 @@ var CATALOG = {
1124
1129
  ],
1125
1130
  "entry": "@surreal-ui/catalog/react/flair",
1126
1131
  "export": "Gauge",
1127
- "contentHash": "ee32b859c602654237041df6afa651b862aa7fa20e1a8523861d98444ef911b5",
1132
+ "contentHash": "26b73472c2dd745964099f443ceaf995d62cf5e2959128d72035e5927f1014dc",
1128
1133
  "path": "components/gauge",
1129
1134
  "alternatives": []
1130
1135
  },
@@ -1496,10 +1501,11 @@ var CATALOG = {
1496
1501
  "source": {
1497
1502
  "provider": "editor",
1498
1503
  "itemId": "line-chart",
1499
- "version": "0.336.0",
1500
- "contentHash": "h1-7a9211007a63771b"
1504
+ "version": "0.348.0",
1505
+ "contentHash": "h1-86cac20e4981874a"
1501
1506
  },
1502
1507
  "runtime": "engine",
1508
+ "fallback": "table",
1503
1509
  "implements": "line-chart",
1504
1510
  "category": "data-visual",
1505
1511
  "platforms": [
@@ -1507,7 +1513,7 @@ var CATALOG = {
1507
1513
  ],
1508
1514
  "entry": "@surreal-ui/catalog/react/editor",
1509
1515
  "export": "LineChart",
1510
- "contentHash": "61e6f1f5b4868c71a501e8c06b0fd8f5165622184fee9c1c0fe17906e43a2806",
1516
+ "contentHash": "352d49a262c1c3929abef2ce3ffdb81e8f623dfd9a4a078291f164f7285d463a",
1511
1517
  "path": "components/line-chart",
1512
1518
  "alternatives": []
1513
1519
  },
@@ -1650,10 +1656,11 @@ var CATALOG = {
1650
1656
  "source": {
1651
1657
  "provider": "editor",
1652
1658
  "itemId": "lineage",
1653
- "version": "0.336.0",
1654
- "contentHash": "h1-80fbdcdee156c4aa"
1659
+ "version": "0.348.0",
1660
+ "contentHash": "h1-dadcd86108f41741"
1655
1661
  },
1656
1662
  "runtime": "engine",
1663
+ "fallback": "table",
1657
1664
  "implements": "lineage",
1658
1665
  "category": "data-visual",
1659
1666
  "platforms": [
@@ -1661,10 +1668,286 @@ var CATALOG = {
1661
1668
  ],
1662
1669
  "entry": "@surreal-ui/catalog/react/editor",
1663
1670
  "export": "Lineage",
1664
- "contentHash": "3bdf12a81d25f518d492c57347596864993268dd040ae81a92ca8c83ed91996f",
1671
+ "contentHash": "b75a563f45c87c188cabf2df73e5d354a9e4c383d98793fd0af7adb4a3d0118f",
1665
1672
  "path": "components/lineage",
1666
1673
  "alternatives": []
1667
1674
  },
1675
+ {
1676
+ "id": "loader",
1677
+ "name": "Liquid loader",
1678
+ "description": "A glass circle filling with sloshing liquid, two waves rolling across its surface and bubbles rising, then draining to fill again.",
1679
+ "tags": [
1680
+ "flair",
1681
+ "paradigm"
1682
+ ],
1683
+ "group": "paradigm",
1684
+ "contract": {
1685
+ "props": {
1686
+ "type": "object",
1687
+ "properties": {
1688
+ "value": {
1689
+ "type": [
1690
+ "number",
1691
+ "null"
1692
+ ],
1693
+ "minimum": 0,
1694
+ "maximum": 1,
1695
+ "description": "How far along the job is, 0\u20131; null (or left out) while it cannot tell, so the loader plays its own loop."
1696
+ }
1697
+ },
1698
+ "additionalProperties": false
1699
+ },
1700
+ "state": [],
1701
+ "events": [],
1702
+ "a11y": {
1703
+ "role": "progressbar",
1704
+ "keyboard": {},
1705
+ "labelFrom": "aria-label",
1706
+ "reducedMotionAt": 1
1707
+ },
1708
+ "colorRoles": [
1709
+ "accent",
1710
+ "track-off",
1711
+ "border"
1712
+ ],
1713
+ "motion": true,
1714
+ "sizing": {
1715
+ "mode": "fill"
1716
+ }
1717
+ },
1718
+ "examples": [
1719
+ {
1720
+ "name": "example",
1721
+ "props": {
1722
+ "value": 0.6
1723
+ }
1724
+ }
1725
+ ],
1726
+ "source": {
1727
+ "provider": "flair",
1728
+ "itemId": "liquid-loader",
1729
+ "version": "0.143.1",
1730
+ "contentHash": "26c4a646fa33e0b0"
1731
+ },
1732
+ "category": "feedback",
1733
+ "runtime": "engine",
1734
+ "fallback": "progress",
1735
+ "implements": "loader",
1736
+ "platforms": [
1737
+ "react"
1738
+ ],
1739
+ "entry": "@surreal-ui/catalog/react/flair",
1740
+ "export": "Loader",
1741
+ "contentHash": "7b255e0179a371bf66c276c7f3654db7dd54b2e4d1597d39f472d47b7ccb1323",
1742
+ "path": "components/loader",
1743
+ "alternatives": [
1744
+ {
1745
+ "id": "flair-flame-loader",
1746
+ "name": "Flame loader",
1747
+ "description": "A progress bar that burns along its length: the filled part glows like embers under flames, tallest at the leading edge, sparks flying off it.",
1748
+ "tags": [
1749
+ "flair",
1750
+ "paradigm"
1751
+ ],
1752
+ "group": "paradigm",
1753
+ "contract": {
1754
+ "props": {
1755
+ "type": "object",
1756
+ "properties": {
1757
+ "value": {
1758
+ "type": [
1759
+ "number",
1760
+ "null"
1761
+ ],
1762
+ "minimum": 0,
1763
+ "maximum": 1,
1764
+ "description": "How far along the job is, 0\u20131; null (or left out) while it cannot tell, so the loader plays its own loop."
1765
+ }
1766
+ },
1767
+ "additionalProperties": false
1768
+ },
1769
+ "state": [],
1770
+ "events": [],
1771
+ "a11y": {
1772
+ "role": "progressbar",
1773
+ "keyboard": {},
1774
+ "labelFrom": "aria-label",
1775
+ "reducedMotionAt": 1
1776
+ },
1777
+ "colorRoles": [
1778
+ "track-off"
1779
+ ],
1780
+ "motion": true,
1781
+ "sizing": {
1782
+ "mode": "fill"
1783
+ }
1784
+ },
1785
+ "examples": [
1786
+ {
1787
+ "name": "example",
1788
+ "props": {
1789
+ "value": 0.65
1790
+ }
1791
+ }
1792
+ ],
1793
+ "source": {
1794
+ "provider": "flair",
1795
+ "itemId": "flame-loader",
1796
+ "version": "0.143.1",
1797
+ "contentHash": "e9901761db206120"
1798
+ },
1799
+ "category": "feedback",
1800
+ "runtime": "engine",
1801
+ "fallback": "progress",
1802
+ "implements": "loader",
1803
+ "platforms": [
1804
+ "react"
1805
+ ],
1806
+ "entry": "@surreal-ui/catalog/react/flair",
1807
+ "export": "FlairFlameLoader",
1808
+ "contentHash": "eaf8db067559e79462435d2dd62927e23261aee0208ef43a67cf6897672dad44",
1809
+ "path": "components/loader/alternatives/flair-flame-loader"
1810
+ },
1811
+ {
1812
+ "id": "flair-generating-field",
1813
+ "name": "Generating field",
1814
+ "description": "A soft field brewing over a card while a job runs, its motion set by what is being made, with a glowing front that sweeps across as the job gets further along.",
1815
+ "tags": [
1816
+ "flair",
1817
+ "paradigm"
1818
+ ],
1819
+ "group": "paradigm",
1820
+ "contract": {
1821
+ "props": {
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "value": {
1825
+ "type": [
1826
+ "number",
1827
+ "null"
1828
+ ],
1829
+ "minimum": 0,
1830
+ "maximum": 1,
1831
+ "description": "How far along the job is, 0\u20131; null (or left out) while it cannot tell, so the loader plays its own loop."
1832
+ }
1833
+ },
1834
+ "additionalProperties": false
1835
+ },
1836
+ "state": [],
1837
+ "events": [],
1838
+ "a11y": {
1839
+ "role": "progressbar",
1840
+ "keyboard": {},
1841
+ "labelFrom": "aria-label",
1842
+ "reducedMotionAt": 1
1843
+ },
1844
+ "colorRoles": [
1845
+ "accent",
1846
+ "accent-ink",
1847
+ "focus"
1848
+ ],
1849
+ "motion": true,
1850
+ "sizing": {
1851
+ "mode": "fill"
1852
+ }
1853
+ },
1854
+ "examples": [
1855
+ {
1856
+ "name": "example",
1857
+ "props": {
1858
+ "value": null
1859
+ }
1860
+ }
1861
+ ],
1862
+ "source": {
1863
+ "provider": "flair",
1864
+ "itemId": "generating-field",
1865
+ "version": "0.143.1",
1866
+ "contentHash": "6f127621885bbaf6"
1867
+ },
1868
+ "category": "feedback",
1869
+ "runtime": "engine",
1870
+ "fallback": "progress",
1871
+ "implements": "loader",
1872
+ "platforms": [
1873
+ "react"
1874
+ ],
1875
+ "entry": "@surreal-ui/catalog/react/flair",
1876
+ "export": "FlairGeneratingField",
1877
+ "contentHash": "6cc070d0a75b205c237d60fff15fc296f32b9048264e7be271ffe06d4b15ce01",
1878
+ "path": "components/loader/alternatives/flair-generating-field"
1879
+ },
1880
+ {
1881
+ "id": "flair-slop-vat",
1882
+ "name": "Slop vat",
1883
+ "description": "A stroked machine vat filling with bubbling slop to how far a job has got, gooey lobes bobbing on the surface and a nozzle dripping into a puddle below.",
1884
+ "tags": [
1885
+ "flair",
1886
+ "paradigm"
1887
+ ],
1888
+ "group": "paradigm",
1889
+ "contract": {
1890
+ "props": {
1891
+ "type": "object",
1892
+ "properties": {
1893
+ "value": {
1894
+ "type": [
1895
+ "number",
1896
+ "null"
1897
+ ],
1898
+ "minimum": 0,
1899
+ "maximum": 1,
1900
+ "description": "How far along the job is, 0\u20131; null (or left out) while it cannot tell, so the loader plays its own loop."
1901
+ }
1902
+ },
1903
+ "additionalProperties": false
1904
+ },
1905
+ "state": [],
1906
+ "events": [],
1907
+ "a11y": {
1908
+ "role": "progressbar",
1909
+ "keyboard": {},
1910
+ "labelFrom": "aria-label",
1911
+ "reducedMotionAt": 1
1912
+ },
1913
+ "colorRoles": [
1914
+ "accent",
1915
+ "surface",
1916
+ "ink"
1917
+ ],
1918
+ "motion": true,
1919
+ "sizing": {
1920
+ "mode": "fill"
1921
+ }
1922
+ },
1923
+ "examples": [
1924
+ {
1925
+ "name": "example",
1926
+ "props": {
1927
+ "value": 0.4
1928
+ }
1929
+ }
1930
+ ],
1931
+ "source": {
1932
+ "provider": "flair",
1933
+ "itemId": "slop-vat",
1934
+ "version": "0.143.1",
1935
+ "contentHash": "c074bdecf6bfa40a"
1936
+ },
1937
+ "category": "feedback",
1938
+ "runtime": "engine",
1939
+ "fallback": "progress",
1940
+ "implements": "loader",
1941
+ "platforms": [
1942
+ "react"
1943
+ ],
1944
+ "entry": "@surreal-ui/catalog/react/flair",
1945
+ "export": "FlairSlopVat",
1946
+ "contentHash": "c70f52e2f3b795b3bedad0d96b5531d257f920aeff4011466fd903c5e0f8e400",
1947
+ "path": "components/loader/alternatives/flair-slop-vat"
1948
+ }
1949
+ ]
1950
+ },
1668
1951
  {
1669
1952
  "id": "mindmap",
1670
1953
  "name": "Mind map",
@@ -1811,10 +2094,11 @@ var CATALOG = {
1811
2094
  "source": {
1812
2095
  "provider": "editor",
1813
2096
  "itemId": "mindmap",
1814
- "version": "0.336.0",
1815
- "contentHash": "h1-8de425038a9756ec"
2097
+ "version": "0.348.0",
2098
+ "contentHash": "h1-f91d84604ea5ee7e"
1816
2099
  },
1817
2100
  "runtime": "engine",
2101
+ "fallback": "table",
1818
2102
  "implements": "mindmap",
1819
2103
  "category": "data-visual",
1820
2104
  "platforms": [
@@ -1822,7 +2106,7 @@ var CATALOG = {
1822
2106
  ],
1823
2107
  "entry": "@surreal-ui/catalog/react/editor",
1824
2108
  "export": "Mindmap",
1825
- "contentHash": "3ffa0c55478a14d63d682aa2a5cad4748edff776880db8295c681f4cfc0f2d39",
2109
+ "contentHash": "17fca158cf6eb9bcb88566b33bc44eb3ae1afbfa25bf399efbc8f83968cd5a47",
1826
2110
  "path": "components/mindmap",
1827
2111
  "alternatives": []
1828
2112
  },
@@ -1961,8 +2245,8 @@ var CATALOG = {
1961
2245
  "source": {
1962
2246
  "provider": "flair",
1963
2247
  "itemId": "progress-bar",
1964
- "version": "0.121.0",
1965
- "contentHash": "123abfb771b8b266"
2248
+ "version": "0.143.1",
2249
+ "contentHash": "4675165ba56f2c26"
1966
2250
  },
1967
2251
  "runtime": "engine",
1968
2252
  "implements": "progress",
@@ -1972,7 +2256,7 @@ var CATALOG = {
1972
2256
  ],
1973
2257
  "entry": "@surreal-ui/catalog/react/flair",
1974
2258
  "export": "FlairProgressBar",
1975
- "contentHash": "c50b25960bdadff092a001b229af2fc07e9620445eb5393ab42dedcc126555a2",
2259
+ "contentHash": "11132e8b963a6a1f25e52e0faa53999ff51da0131e62201a84b33cba9c786e9f",
1976
2260
  "path": "components/progress/alternatives/flair-progress-bar"
1977
2261
  }
1978
2262
  ]
@@ -2216,10 +2500,11 @@ var CATALOG = {
2216
2500
  "source": {
2217
2501
  "provider": "editor",
2218
2502
  "itemId": "sparkline",
2219
- "version": "0.336.0",
2220
- "contentHash": "h1-f5415ff4a27028bf"
2503
+ "version": "0.348.0",
2504
+ "contentHash": "h1-ab15bc9b81e7a188"
2221
2505
  },
2222
2506
  "runtime": "engine",
2507
+ "fallback": "table",
2223
2508
  "implements": "sparkline",
2224
2509
  "category": "data-visual",
2225
2510
  "platforms": [
@@ -2227,7 +2512,7 @@ var CATALOG = {
2227
2512
  ],
2228
2513
  "entry": "@surreal-ui/catalog/react/editor",
2229
2514
  "export": "Sparkline",
2230
- "contentHash": "a2518ab4bd7e82f887f28a066991a2447d8cc483328fa6e667396d7c376b1485",
2515
+ "contentHash": "ad51563ebd1bc0d9879d800d0a1b10ca7f6e2104428b5ad9ad93e9671813fa99",
2231
2516
  "path": "components/sparkline",
2232
2517
  "alternatives": []
2233
2518
  },
@@ -2502,7 +2787,7 @@ var CATALOG = {
2502
2787
  "source": {
2503
2788
  "provider": "flair",
2504
2789
  "itemId": "toggle-switch",
2505
- "version": "0.121.0",
2790
+ "version": "0.143.1",
2506
2791
  "contentHash": "f543742e308ca500"
2507
2792
  },
2508
2793
  "runtime": "engine",
@@ -2513,7 +2798,7 @@ var CATALOG = {
2513
2798
  ],
2514
2799
  "entry": "@surreal-ui/catalog/react/flair",
2515
2800
  "export": "FlairToggleSwitch",
2516
- "contentHash": "e069f8a2e6a2ae4f9d3b95d39b12dd1e5e5c2916a15d9bd493bac5cf4485ad5b",
2801
+ "contentHash": "e7a9999e5d4df7f73abc230de48195ce256f382d7a94e079178cd5628f2ebc3d",
2517
2802
  "path": "components/switch/alternatives/flair-toggle-switch"
2518
2803
  }
2519
2804
  ]
@@ -2635,7 +2920,7 @@ var CATALOG = {
2635
2920
  ],
2636
2921
  "entry": "@surreal-ui/catalog/react",
2637
2922
  "export": "Table",
2638
- "contentHash": "a03aa01420e3c6b9925bcf8286364b10bd396c4323909ab328e1baa383a32231",
2923
+ "contentHash": "c61cc3cd29caf1d2ef7ac7926d61d88d8678337eb78bab0cad58db7482500a00",
2639
2924
  "path": "components/table",
2640
2925
  "alternatives": []
2641
2926
  },
@@ -2851,10 +3136,11 @@ var CATALOG = {
2851
3136
  "source": {
2852
3137
  "provider": "editor",
2853
3138
  "itemId": "timeline",
2854
- "version": "0.336.0",
2855
- "contentHash": "h1-4d6bef2670bfda04"
3139
+ "version": "0.348.0",
3140
+ "contentHash": "h1-e4d3a966ef3d2dc1"
2856
3141
  },
2857
3142
  "runtime": "engine",
3143
+ "fallback": "table",
2858
3144
  "implements": "timeline",
2859
3145
  "category": "data-visual",
2860
3146
  "platforms": [
@@ -2862,7 +3148,7 @@ var CATALOG = {
2862
3148
  ],
2863
3149
  "entry": "@surreal-ui/catalog/react/editor",
2864
3150
  "export": "Timeline",
2865
- "contentHash": "4d4b49ed6803f7a1ae19397a71e65c0d7a1daebe6055372021554a617651d640",
3151
+ "contentHash": "095bff1b2ab99da4a7d00842724c3ec855209a2be13baa876d6af243bf0735fd",
2866
3152
  "path": "components/timeline",
2867
3153
  "alternatives": []
2868
3154
  },
@@ -3031,10 +3317,11 @@ var CATALOG = {
3031
3317
  "source": {
3032
3318
  "provider": "editor",
3033
3319
  "itemId": "weave",
3034
- "version": "0.336.0",
3035
- "contentHash": "h1-6a819cc804a71672"
3320
+ "version": "0.348.0",
3321
+ "contentHash": "h1-4264662135ae41dc"
3036
3322
  },
3037
3323
  "runtime": "engine",
3324
+ "fallback": "table",
3038
3325
  "implements": "weave",
3039
3326
  "category": "data-visual",
3040
3327
  "platforms": [
@@ -3042,7 +3329,7 @@ var CATALOG = {
3042
3329
  ],
3043
3330
  "entry": "@surreal-ui/catalog/react/editor",
3044
3331
  "export": "Weave",
3045
- "contentHash": "a84fc810ed28459abcd6e1ea4232a2ff82de5bcfcf19cf80000ec430794ce943",
3332
+ "contentHash": "d0c88a4f383acfd6ebef5b78ba9da762baedd2b2bfa0e68015b28f17a275a2ed",
3046
3333
  "path": "components/weave",
3047
3334
  "alternatives": []
3048
3335
  }
@@ -270,6 +270,10 @@
270
270
 
271
271
 
272
272
 
273
+
274
+
275
+
276
+
273
277
  /* progress */
274
278
  .sui-progress {
275
279
  display: flex;
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  getComponent,
17
17
  replacementFor,
18
18
  resolveRole
19
- } from "./chunk-K6AAK2NB.js";
19
+ } from "./chunk-W4MVETWL.js";
20
20
  import {
21
21
  mapDeprecatedProps,
22
22
  resolveStructure
package/dist/lazy.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  getAesthetic,
12
12
  getComponent,
13
13
  replacementFor
14
- } from "./chunk-K6AAK2NB.js";
14
+ } from "./chunk-W4MVETWL.js";
15
15
  import "./chunk-HMNTTISG.js";
16
16
 
17
17
  // src/lazy.generated.ts
package/dist/node.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { CatalogComponent } from './index.js';
2
2
  import { RegistryItem } from './registry.js';
3
3
  import { PlatformLanguage } from '@pixerate/schemas';
4
- import '@pixerate/schemas/genui';
4
+ import { UiFallback } from '@pixerate/schemas/genui';
5
+ export { UiFallback } from '@pixerate/schemas/genui';
5
6
  import './theme-V1Iz-HmC.js';
6
7
 
7
8
  /** The skills in the package, by folder name. */
@@ -65,4 +66,14 @@ declare function catalogFrameworks(component: CatalogComponent, dist?: string):
65
66
  */
66
67
  declare function catalogRegistryItem(component: CatalogComponent, framework: PlatformLanguage, aestheticId: string, dist?: string): RegistryItem | null;
67
68
 
68
- export { DEFAULT_SKILLS_DIR, type InstallSkillsOptions, type InstalledSkillFile, type InstalledSkills, SURREAL_SKILLS, type SurrealSkillName, catalogDistDir, catalogFrameworks, catalogRegistryItem, codeDependencies, installSkills, skillsSource };
69
+ /**
70
+ * What `component` shows instead for `data`, from its provider: `{ implements, props }`, where
71
+ * `implements` is a catalog type (usually `component.fallback`, though a provider may pick another
72
+ * baseline for the data, as Flair's loaders show a spinner while their value is unknown).
73
+ * Undefined when the type names no fallback or its provider has no runtime mapping. Throws when
74
+ * the data doesn't fit the type's contract. Needs the provider package installed (an optional
75
+ * peer of this one).
76
+ */
77
+ declare function engineFallback(component: Pick<CatalogComponent, 'fallback' | 'source'>, data: unknown): Promise<UiFallback | undefined>;
78
+
79
+ export { DEFAULT_SKILLS_DIR, type InstallSkillsOptions, type InstalledSkillFile, type InstalledSkills, SURREAL_SKILLS, type SurrealSkillName, catalogDistDir, catalogFrameworks, catalogRegistryItem, codeDependencies, engineFallback, installSkills, skillsSource };
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AESTHETICS,
3
3
  getAesthetic
4
- } from "./chunk-K6AAK2NB.js";
4
+ } from "./chunk-W4MVETWL.js";
5
5
  import "./chunk-HMNTTISG.js";
6
6
 
7
7
  // src/skills.ts
@@ -153,6 +153,25 @@ function catalogRegistryItem(component, framework, aestheticId, dist = catalogDi
153
153
  }
154
154
  };
155
155
  }
156
+
157
+ // src/engine-fallback.ts
158
+ async function editorItem(itemId) {
159
+ const { uiComponents } = await import("@pixerate/editor/chart");
160
+ const chart = uiComponents().find((c) => c.id === itemId);
161
+ if (chart) return chart;
162
+ const { diagramUiComponents } = await import("@pixerate/editor/canvas");
163
+ return diagramUiComponents().find((c) => c.id === itemId);
164
+ }
165
+ async function engineFallback(component, data) {
166
+ const { provider, itemId } = component.source;
167
+ if (!component.fallback || !itemId) return void 0;
168
+ if (provider === "editor") return (await editorItem(itemId))?.fallback?.(data);
169
+ if (provider === "flair") {
170
+ const { loadEffect, uiFallback } = await import("@pixerate/flair/catalog/lazy");
171
+ return uiFallback(await loadEffect(itemId), data);
172
+ }
173
+ return void 0;
174
+ }
156
175
  export {
157
176
  DEFAULT_SKILLS_DIR,
158
177
  SURREAL_SKILLS,
@@ -160,6 +179,7 @@ export {
160
179
  catalogFrameworks,
161
180
  catalogRegistryItem,
162
181
  codeDependencies,
182
+ engineFallback,
163
183
  installSkills,
164
184
  skillsSource
165
185
  };
@@ -15,6 +15,50 @@ interface GaugeProps {
15
15
  /** A speedometer gauge: its coloured band draws on, the needle sweeps past the value and settles, and the reading counts up beneath. (Flair `gauge`, coloured by the aesthetic's roles.) */
16
16
  declare function Gauge({ value, max, unit, label, className, style }: GaugeProps): React.JSX.Element;
17
17
 
18
+ interface LoaderProps {
19
+ /** How far along the job is, 0–1; null (or left out) while it cannot tell, so the loader plays its own loop. */
20
+ value?: number | null;
21
+ /** Accessible name. */
22
+ label?: string;
23
+ className?: string;
24
+ style?: React.CSSProperties;
25
+ }
26
+ /** A glass circle filling with sloshing liquid, two waves rolling across its surface and bubbles rising, then draining to fill again. (Flair `liquid-loader`, coloured by the aesthetic's roles.) */
27
+ declare function Loader({ value, label, className, style }: LoaderProps): React.JSX.Element;
28
+
29
+ interface FlairFlameLoaderProps {
30
+ /** How far along the job is, 0–1; null (or left out) while it cannot tell, so the loader plays its own loop. */
31
+ value?: number | null;
32
+ /** Accessible name. */
33
+ label?: string;
34
+ className?: string;
35
+ style?: React.CSSProperties;
36
+ }
37
+ /** A progress bar that burns along its length: the filled part glows like embers under flames, tallest at the leading edge, sparks flying off it. (Flair `flame-loader`, coloured by the aesthetic's roles.) */
38
+ declare function FlairFlameLoader({ value, label, className, style }: FlairFlameLoaderProps): React.JSX.Element;
39
+
40
+ interface FlairGeneratingFieldProps {
41
+ /** How far along the job is, 0–1; null (or left out) while it cannot tell, so the loader plays its own loop. */
42
+ value?: number | null;
43
+ /** Accessible name. */
44
+ label?: string;
45
+ className?: string;
46
+ style?: React.CSSProperties;
47
+ }
48
+ /** A soft field brewing over a card while a job runs, its motion set by what is being made, with a glowing front that sweeps across as the job gets further along. (Flair `generating-field`, coloured by the aesthetic's roles.) */
49
+ declare function FlairGeneratingField({ value, label, className, style }: FlairGeneratingFieldProps): React.JSX.Element;
50
+
51
+ interface FlairSlopVatProps {
52
+ /** How far along the job is, 0–1; null (or left out) while it cannot tell, so the loader plays its own loop. */
53
+ value?: number | null;
54
+ /** Accessible name. */
55
+ label?: string;
56
+ className?: string;
57
+ style?: React.CSSProperties;
58
+ }
59
+ /** A stroked machine vat filling with bubbling slop to how far a job has got, gooey lobes bobbing on the surface and a nozzle dripping into a puddle below. (Flair `slop-vat`, coloured by the aesthetic's roles.) */
60
+ declare function FlairSlopVat({ value, label, className, style }: FlairSlopVatProps): React.JSX.Element;
61
+
18
62
  interface FlairProgressBarProps {
19
63
  /** Percent done. */
20
64
  value: number;
@@ -38,4 +82,4 @@ interface FlairToggleSwitchProps {
38
82
  /** A switch whose knob slides across, squashing a little mid-slide, as the track blends to its on colour; the next click slides it back. (Flair `toggle-switch`, coloured by the aesthetic's roles.) */
39
83
  declare function FlairToggleSwitch({ checked, onCheckedChange, label, className, style }: FlairToggleSwitchProps): React.JSX.Element;
40
84
 
41
- export { FlairProgressBar, type FlairProgressBarProps, FlairToggleSwitch, type FlairToggleSwitchProps, Gauge, type GaugeProps };
85
+ export { FlairFlameLoader, type FlairFlameLoaderProps, FlairGeneratingField, type FlairGeneratingFieldProps, FlairProgressBar, type FlairProgressBarProps, FlairSlopVat, type FlairSlopVatProps, FlairToggleSwitch, type FlairToggleSwitchProps, Gauge, type GaugeProps, Loader, type LoaderProps };
@@ -43,30 +43,34 @@ function Gauge({ value, max, unit, label, className, style }) {
43
43
  );
44
44
  }
45
45
 
46
- // ../../components/progress/alternatives/flair-progress-bar/react.tsx
46
+ // ../../components/loader/react.tsx
47
47
  import * as React2 from "react";
48
48
  import { FlairEffect as FlairEffect2 } from "@pixerate/flair/react";
49
49
  import { jsx as jsx2 } from "react/jsx-runtime";
50
- var ROLES2 = ["accent", "track-off", "ink"];
51
- var CONTROLS2 = { accent: "accent", "track-off": "track", ink: "ink" };
52
- function FlairProgressBar({ value, label, className, style }) {
50
+ var ROLES2 = ["accent", "track-off", "border"];
51
+ var CONTROLS2 = {
52
+ accent: "uLiquid",
53
+ "track-off": "uBack",
54
+ border: "uGlass"
55
+ };
56
+ function Loader({ value, label, className, style }) {
53
57
  const ref = React2.useRef(null);
54
58
  const colors = useRoleColors(ref, ROLES2);
55
59
  const values = React2.useMemo(
56
60
  () => colors ? Object.fromEntries(ROLES2.map((role) => [CONTROLS2[role], colors.rgb[role]])) : void 0,
57
61
  [colors]
58
62
  );
59
- const data = { value, label };
63
+ const data = { value };
60
64
  return /* @__PURE__ */ jsx2(
61
65
  "span",
62
66
  {
63
67
  ref,
64
68
  className: ["sui-provider", className].filter(Boolean).join(" "),
65
- style: { display: "inline-block", width: 240, height: 59, ...style },
69
+ style: { display: "inline-block", width: "100%", height: 240, ...style },
66
70
  children: values && /* @__PURE__ */ jsx2(
67
71
  FlairEffect2,
68
72
  {
69
- effect: "progress-bar",
73
+ effect: "liquid-loader",
70
74
  values,
71
75
  data: Object.fromEntries(Object.entries(data).filter(([, v]) => v !== void 0)),
72
76
  label,
@@ -77,12 +81,157 @@ function FlairProgressBar({ value, label, className, style }) {
77
81
  );
78
82
  }
79
83
 
80
- // ../../components/switch/alternatives/flair-toggle-switch/react.tsx
84
+ // ../../components/loader/alternatives/flair-flame-loader/react.tsx
81
85
  import * as React3 from "react";
82
86
  import { FlairEffect as FlairEffect3 } from "@pixerate/flair/react";
83
87
  import { jsx as jsx3 } from "react/jsx-runtime";
84
- var ROLES3 = ["surface", "track-off", "track-on", "surface-raised"];
85
- var CONTROLS3 = {
88
+ var ROLES3 = ["track-off"];
89
+ var CONTROLS3 = { "track-off": "uTrack" };
90
+ function FlairFlameLoader({ value, label, className, style }) {
91
+ const ref = React3.useRef(null);
92
+ const colors = useRoleColors(ref, ROLES3);
93
+ const values = React3.useMemo(
94
+ () => colors ? Object.fromEntries(ROLES3.map((role) => [CONTROLS3[role], colors.rgb[role]])) : void 0,
95
+ [colors]
96
+ );
97
+ const data = { value };
98
+ return /* @__PURE__ */ jsx3(
99
+ "span",
100
+ {
101
+ ref,
102
+ className: ["sui-provider", className].filter(Boolean).join(" "),
103
+ style: { display: "inline-block", width: "100%", height: 240, ...style },
104
+ children: values && /* @__PURE__ */ jsx3(
105
+ FlairEffect3,
106
+ {
107
+ effect: "flame-loader",
108
+ values,
109
+ data: Object.fromEntries(Object.entries(data).filter(([, v]) => v !== void 0)),
110
+ label,
111
+ style: { width: "100%", height: "100%" }
112
+ }
113
+ )
114
+ }
115
+ );
116
+ }
117
+
118
+ // ../../components/loader/alternatives/flair-generating-field/react.tsx
119
+ import * as React4 from "react";
120
+ import { FlairEffect as FlairEffect4 } from "@pixerate/flair/react";
121
+ import { jsx as jsx4 } from "react/jsx-runtime";
122
+ var ROLES4 = ["accent", "accent-ink", "focus"];
123
+ var CONTROLS4 = {
124
+ accent: "uColorA",
125
+ "accent-ink": "uColorB",
126
+ focus: "uColorC"
127
+ };
128
+ function FlairGeneratingField({
129
+ value,
130
+ label,
131
+ className,
132
+ style
133
+ }) {
134
+ const ref = React4.useRef(null);
135
+ const colors = useRoleColors(ref, ROLES4);
136
+ const values = React4.useMemo(
137
+ () => colors ? Object.fromEntries(ROLES4.map((role) => [CONTROLS4[role], colors.rgb[role]])) : void 0,
138
+ [colors]
139
+ );
140
+ const data = { value };
141
+ return /* @__PURE__ */ jsx4(
142
+ "span",
143
+ {
144
+ ref,
145
+ className: ["sui-provider", className].filter(Boolean).join(" "),
146
+ style: { display: "inline-block", width: "100%", height: 240, ...style },
147
+ children: values && /* @__PURE__ */ jsx4(
148
+ FlairEffect4,
149
+ {
150
+ effect: "generating-field",
151
+ values,
152
+ data: Object.fromEntries(Object.entries(data).filter(([, v]) => v !== void 0)),
153
+ label,
154
+ style: { width: "100%", height: "100%" }
155
+ }
156
+ )
157
+ }
158
+ );
159
+ }
160
+
161
+ // ../../components/loader/alternatives/flair-slop-vat/react.tsx
162
+ import * as React5 from "react";
163
+ import { FlairEffect as FlairEffect5 } from "@pixerate/flair/react";
164
+ import { jsx as jsx5 } from "react/jsx-runtime";
165
+ var ROLES5 = ["accent", "surface", "ink"];
166
+ var CONTROLS5 = { accent: "slop", surface: "vat", ink: "inkColor" };
167
+ function FlairSlopVat({ value, label, className, style }) {
168
+ const ref = React5.useRef(null);
169
+ const colors = useRoleColors(ref, ROLES5);
170
+ const values = React5.useMemo(
171
+ () => colors ? Object.fromEntries(ROLES5.map((role) => [CONTROLS5[role], colors.rgb[role]])) : void 0,
172
+ [colors]
173
+ );
174
+ const data = { value };
175
+ return /* @__PURE__ */ jsx5(
176
+ "span",
177
+ {
178
+ ref,
179
+ className: ["sui-provider", className].filter(Boolean).join(" "),
180
+ style: { display: "inline-block", width: "100%", height: 240, ...style },
181
+ children: values && /* @__PURE__ */ jsx5(
182
+ FlairEffect5,
183
+ {
184
+ effect: "slop-vat",
185
+ values,
186
+ data: Object.fromEntries(Object.entries(data).filter(([, v]) => v !== void 0)),
187
+ label,
188
+ style: { width: "100%", height: "100%" }
189
+ }
190
+ )
191
+ }
192
+ );
193
+ }
194
+
195
+ // ../../components/progress/alternatives/flair-progress-bar/react.tsx
196
+ import * as React6 from "react";
197
+ import { FlairEffect as FlairEffect6 } from "@pixerate/flair/react";
198
+ import { jsx as jsx6 } from "react/jsx-runtime";
199
+ var ROLES6 = ["accent", "track-off", "ink"];
200
+ var CONTROLS6 = { accent: "accent", "track-off": "track", ink: "ink" };
201
+ function FlairProgressBar({ value, label, className, style }) {
202
+ const ref = React6.useRef(null);
203
+ const colors = useRoleColors(ref, ROLES6);
204
+ const values = React6.useMemo(
205
+ () => colors ? Object.fromEntries(ROLES6.map((role) => [CONTROLS6[role], colors.rgb[role]])) : void 0,
206
+ [colors]
207
+ );
208
+ const data = { value, label };
209
+ return /* @__PURE__ */ jsx6(
210
+ "span",
211
+ {
212
+ ref,
213
+ className: ["sui-provider", className].filter(Boolean).join(" "),
214
+ style: { display: "inline-block", width: 240, height: 59, ...style },
215
+ children: values && /* @__PURE__ */ jsx6(
216
+ FlairEffect6,
217
+ {
218
+ effect: "progress-bar",
219
+ values,
220
+ data: Object.fromEntries(Object.entries(data).filter(([, v]) => v !== void 0)),
221
+ label,
222
+ style: { width: "100%", height: "100%" }
223
+ }
224
+ )
225
+ }
226
+ );
227
+ }
228
+
229
+ // ../../components/switch/alternatives/flair-toggle-switch/react.tsx
230
+ import * as React7 from "react";
231
+ import { FlairEffect as FlairEffect7 } from "@pixerate/flair/react";
232
+ import { jsx as jsx7 } from "react/jsx-runtime";
233
+ var ROLES7 = ["surface", "track-off", "track-on", "surface-raised"];
234
+ var CONTROLS7 = {
86
235
  surface: "background",
87
236
  "track-off": "off",
88
237
  "track-on": "on",
@@ -95,20 +244,20 @@ function FlairToggleSwitch({
95
244
  className,
96
245
  style
97
246
  }) {
98
- const ref = React3.useRef(null);
99
- const colors = useRoleColors(ref, ROLES3);
100
- const values = React3.useMemo(
101
- () => colors ? Object.fromEntries(ROLES3.map((role) => [CONTROLS3[role], colors.rgb[role]])) : void 0,
247
+ const ref = React7.useRef(null);
248
+ const colors = useRoleColors(ref, ROLES7);
249
+ const values = React7.useMemo(
250
+ () => colors ? Object.fromEntries(ROLES7.map((role) => [CONTROLS7[role], colors.rgb[role]])) : void 0,
102
251
  [colors]
103
252
  );
104
- return /* @__PURE__ */ jsx3(
253
+ return /* @__PURE__ */ jsx7(
105
254
  "span",
106
255
  {
107
256
  ref,
108
257
  className: ["sui-provider", className].filter(Boolean).join(" "),
109
258
  style: { display: "inline-block", width: 40, height: 24, ...style },
110
- children: values && /* @__PURE__ */ jsx3(
111
- FlairEffect3,
259
+ children: values && /* @__PURE__ */ jsx7(
260
+ FlairEffect7,
112
261
  {
113
262
  effect: "toggle-switch",
114
263
  values,
@@ -124,7 +273,11 @@ function FlairToggleSwitch({
124
273
  );
125
274
  }
126
275
  export {
276
+ FlairFlameLoader,
277
+ FlairGeneratingField,
127
278
  FlairProgressBar,
279
+ FlairSlopVat,
128
280
  FlairToggleSwitch,
129
- Gauge
281
+ Gauge,
282
+ Loader
130
283
  };
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (bar-chart). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (bar-chart). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (braid). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (braid). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { createLinkFocus } from '@pixerate/editor/tools';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (donut-chart). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (donut-chart). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (flow). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (flow). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { diagramUiComponents } from '@pixerate/editor/canvas';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/flair 0.121.0 (gauge). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/flair 0.143.1 (gauge). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { FlairEffect } from '@pixerate/flair/react';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (line-chart). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (line-chart). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (lineage). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (lineage). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { createLinkFocus } from '@pixerate/editor/tools';
@@ -0,0 +1,52 @@
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/flair 0.143.1 (liquid-loader). Do not edit.
2
+ import * as React from 'react';
3
+ import { FlairEffect } from '@pixerate/flair/react';
4
+ import { useRoleColors } from '@surreal-ui/catalog/react';
5
+
6
+ const ROLES = ['accent', 'track-off', 'border'] as const;
7
+ const CONTROLS: Record<string, string> = {
8
+ accent: 'uLiquid',
9
+ 'track-off': 'uBack',
10
+ border: 'uGlass'
11
+ };
12
+
13
+ export interface LoaderProps {
14
+ /** How far along the job is, 0–1; null (or left out) while it cannot tell, so the loader plays its own loop. */
15
+ value?: number | null;
16
+ /** Accessible name. */
17
+ label?: string;
18
+ className?: string;
19
+ style?: React.CSSProperties;
20
+ }
21
+
22
+ /** A glass circle filling with sloshing liquid, two waves rolling across its surface and bubbles rising, then draining to fill again. (Flair `liquid-loader`, coloured by the aesthetic's roles.) */
23
+ export function Loader({ value, label, className, style }: LoaderProps) {
24
+ const ref = React.useRef<HTMLSpanElement>(null);
25
+ const colors = useRoleColors(ref, ROLES);
26
+ const values = React.useMemo(
27
+ () =>
28
+ colors
29
+ ? Object.fromEntries(ROLES.map((role) => [CONTROLS[role]!, colors.rgb[role]!]))
30
+ : undefined,
31
+ [colors]
32
+ );
33
+ const data = { value };
34
+ return (
35
+ <span
36
+ ref={ref}
37
+ className={['sui-provider', className].filter(Boolean).join(' ')}
38
+ style={{ display: 'inline-block', width: '100%', height: 240, ...style }}
39
+ >
40
+ {values && (
41
+ <FlairEffect
42
+ effect="liquid-loader"
43
+ values={values}
44
+ data={Object.fromEntries(Object.entries(data).filter(([, v]) => v !== undefined))}
45
+
46
+ label={label}
47
+ style={{ width: '100%', height: '100%' }}
48
+ />
49
+ )}
50
+ </span>
51
+ );
52
+ }
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (mindmap). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (mindmap). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { diagramUiComponents } from '@pixerate/editor/canvas';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (sparkline). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (sparkline). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -22,6 +22,15 @@
22
22
  class: className = '',
23
23
  ...rest
24
24
  }: Props = $props();
25
+
26
+ // A column is numeric when it has a number and every other cell is a number or empty.
27
+ const numeric = $derived(
28
+ columns.map(
29
+ (_, c) =>
30
+ rows.some((r) => typeof r[c] === 'number') &&
31
+ rows.every((r) => r[c] === null || r[c] === undefined || typeof r[c] === 'number')
32
+ )
33
+ );
25
34
  </script>
26
35
 
27
36
  <div class="sui-table">
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (timeline). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (timeline). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { diagramUiComponents } from '@pixerate/editor/canvas';
4
4
  import { useRoleColors } from '@surreal-ui/catalog/react';
@@ -1,4 +1,4 @@
1
- // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (weave). Do not edit.
1
+ // Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.348.0 (weave). Do not edit.
2
2
  import * as React from 'react';
3
3
  import { uiComponents } from '@pixerate/editor/chart';
4
4
  import { createLinkFocus } from '@pixerate/editor/tools';
@@ -22,6 +22,15 @@
22
22
  class: className = '',
23
23
  ...rest
24
24
  }: Props = $props();
25
+
26
+ // A column is numeric when it has a number and every other cell is a number or empty.
27
+ const numeric = $derived(
28
+ columns.map(
29
+ (_, c) =>
30
+ rows.some((r) => typeof r[c] === 'number') &&
31
+ rows.every((r) => r[c] === null || r[c] === undefined || typeof r[c] === 'number')
32
+ )
33
+ );
25
34
  </script>
26
35
 
27
36
  <div class="sui-table">
package/llms.txt CHANGED
@@ -44,6 +44,10 @@
44
44
  - label: Label (form). Accessible labeling for form controls. Import `Label` from `@surreal-ui/catalog/react`; element `<surreal-label>`.
45
45
  - line-chart: Line chart (data-visual). Lines showing how values change across ordered categories (time), one colour per series, with a value axis and a legend for several series. Import `LineChart` from `@surreal-ui/catalog/react/editor`.
46
46
  - lineage: Lineage (data-visual). One root fanned out to a row of items with rounded connectors that never cross, labels sized to fit their columns; draws on from the root, and focusing an item lights its branch. Import `Lineage` from `@surreal-ui/catalog/react/editor`.
47
+ - loader: Liquid loader (feedback). A glass circle filling with sloshing liquid, two waves rolling across its surface and bubbles rising, then draining to fill again. Import `Loader` from `@surreal-ui/catalog/react/flair`.
48
+ - flair-flame-loader: Flame loader (feedback, implements loader). A progress bar that burns along its length: the filled part glows like embers under flames, tallest at the leading edge, sparks flying off it. Import `FlairFlameLoader` from `@surreal-ui/catalog/react/flair`.
49
+ - flair-generating-field: Generating field (feedback, implements loader). A soft field brewing over a card while a job runs, its motion set by what is being made, with a glowing front that sweeps across as the job gets further along. Import `FlairGeneratingField` from `@surreal-ui/catalog/react/flair`.
50
+ - flair-slop-vat: Slop vat (feedback, implements loader). A stroked machine vat filling with bubbling slop to how far a job has got, gooey lobes bobbing on the surface and a nozzle dripping into a puddle below. Import `FlairSlopVat` from `@surreal-ui/catalog/react/flair`.
47
51
  - mindmap: Mind map (data-visual). A central idea with branches and sub-branches spread round it, one colour per branch. Import `Mindmap` from `@surreal-ui/catalog/react/editor`.
48
52
  - progress: Progress (feedback). Displays an indicator showing the completion progress of a task. Import `Progress` from `@surreal-ui/catalog/react`; element `<surreal-progress>`.
49
53
  - flair-progress-bar: Progress bar (feedback, implements progress). A striped progress bar filling to a value while its percentage counts up, the stripes marching all the while. Import `FlairProgressBar` from `@surreal-ui/catalog/react/flair`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surreal-ui/catalog",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "description": "Drop-in UI components with a catalog API and aesthetic packs: one implementation per component type, restyled by aesthetics defined as skills.",
5
5
  "license": "MIT",
6
6
  "author": "Pixerate",
@@ -100,12 +100,12 @@
100
100
  "access": "public"
101
101
  },
102
102
  "dependencies": {
103
- "@pixerate/schemas": "^1.52.0"
103
+ "@pixerate/schemas": "^2.6.0"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@dagrejs/dagre": ">=1.1.8",
107
- "@pixerate/editor": ">=0.334.1",
108
- "@pixerate/flair": ">=0.121.0",
107
+ "@pixerate/editor": ">=0.348.0",
108
+ "@pixerate/flair": ">=0.143.0",
109
109
  "react": ">=18.0.0",
110
110
  "svelte": ">=5.20.0"
111
111
  },
@@ -128,8 +128,8 @@
128
128
  },
129
129
  "devDependencies": {
130
130
  "@dagrejs/dagre": "^1.1.8",
131
- "@pixerate/editor": "^0.336.0",
132
- "@pixerate/flair": "^0.121.0",
131
+ "@pixerate/editor": "^0.348.0",
132
+ "@pixerate/flair": "^0.143.0",
133
133
  "@playwright/test": "^1.64.1",
134
134
  "@types/node": "^22.20.1",
135
135
  "@types/react": "^18.3.0",
@@ -143,7 +143,7 @@
143
143
  "tsup": "^8.0.2",
144
144
  "tsx": "^4.23.15",
145
145
  "typescript": "^5.5.0",
146
- "zod": "^3.25.76"
146
+ "zod": "^4.6.6"
147
147
  },
148
148
  "scripts": {
149
149
  "generate": "tsx scripts/build-catalog.ts",
@@ -31,6 +31,10 @@ Show content or status without taking input: badges, avatars, typography.
31
31
 
32
32
  Report progress or the result of an action: progress, alerts, toasts, skeletons.
33
33
 
34
+ - `loader` **Liquid loader**: A glass circle filling with sloshing liquid, two waves rolling across its surface and bubbles rising, then draining to fill again; React `Loader` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`; examples `example`; group paradigm; runtime engine; fallback `progress`; tags flair, paradigm.
35
+ - alternative `flair-flame-loader` **Flame loader**: A progress bar that burns along its length: the filled part glows like embers under flames, tallest at the leading edge, sparks flying off it; React `FlairFlameLoader` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`; examples `example`; group paradigm; runtime engine; fallback `progress`; tags flair, paradigm.
36
+ - alternative `flair-generating-field` **Generating field**: A soft field brewing over a card while a job runs, its motion set by what is being made, with a glowing front that sweeps across as the job gets further along; React `FlairGeneratingField` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`; examples `example`; group paradigm; runtime engine; fallback `progress`; tags flair, paradigm.
37
+ - alternative `flair-slop-vat` **Slop vat**: A stroked machine vat filling with bubbling slop to how far a job has got, gooey lobes bobbing on the surface and a nozzle dripping into a puddle below; React `FlairSlopVat` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`; examples `example`; group paradigm; runtime engine; fallback `progress`; tags flair, paradigm.
34
38
  - `progress` **Progress**: Displays an indicator showing the completion progress of a task; React `Progress` from `@surreal-ui/catalog/react`; Svelte `Progress` from `@surreal-ui/catalog/svelte`; element `<surreal-progress>` from `@surreal-ui/catalog/web`; props `value`, `label`, `max`; examples `partway`; replaces `MinimalistProgress`, `ShadcnProgress`; tags feedback.
35
39
  - alternative `flair-progress-bar` **Progress bar**: A striped progress bar filling to a value while its percentage counts up, the stripes marching all the while; React `FlairProgressBar` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`, `label`; examples `example`; runtime engine; tags flair, baseline.
36
40
  - `skeleton` **Skeleton**: Used to placeholder load states while content is fetching; React `Skeleton` from `@surreal-ui/catalog/react`; Svelte `Skeleton` from `@surreal-ui/catalog/svelte`; element `<surreal-skeleton>` from `@surreal-ui/catalog/web`; props `width`, `height`, `shape`; examples `text`, `avatar`; replaces `MinimalistSkeleton`, `ShadcnSkeleton`; tags feedback, loading.
@@ -47,14 +51,14 @@ Hold and arrange other content: cards, separators, scroll areas, panels.
47
51
 
48
52
  Draw numbers: charts, gauges, sparklines.
49
53
 
50
- - `bar-chart` **Bar chart**: Vertical bars comparing values across categories, one colour per series, with a value axis and a legend for several series; React `BarChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `categories`, `series`, `title`, `unit`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
51
- - `braid` **Braid**: Strands twisted into one root, passing over and under, weighted by value and labelled at the open end; draws on along the braid, and focusing a strand lights it; React `Braid` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `strands`, `turns`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; tags editor, data-visual.
52
- - `donut-chart` **Donut chart**: Parts of a whole as slices of a ring, one colour per slice, with a legend; React `DonutChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `slices`, `title`, `unit`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
53
- - `flow` **Flow**: A process as boxes joined by arrows, left to right or top down, in the diagram editor's layout; React `Flow` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `steps`, `links`, `direction`, `title`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
54
- - `gauge` **Gauge**: A speedometer gauge: its coloured band draws on, the needle sweeps past the value and settles, and the reading counts up beneath; React `Gauge` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`, `max`, `unit`, `label`; examples `example`; group data-visual; runtime engine; tags flair, data-visual.
55
- - `line-chart` **Line chart**: Lines showing how values change across ordered categories (time), one colour per series, with a value axis and a legend for several series; React `LineChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `categories`, `series`, `title`, `unit`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
56
- - `lineage` **Lineage**: One root fanned out to a row of items with rounded connectors that never cross, labels sized to fit their columns; draws on from the root, and focusing an item lights its branch; React `Lineage` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `items`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; tags editor, data-visual.
57
- - `mindmap` **Mind map**: A central idea with branches and sub-branches spread round it, one colour per branch; React `Mindmap` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `branches`, `title`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
58
- - `sparkline` **Sparkline**: A word-sized line chart of one run of values, without axes or labels; React `Sparkline` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `values`, `label`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
59
- - `timeline` **Timeline**: Periods along an axis, each with its events stacked under it, one colour per period; React `Timeline` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `periods`, `title`; examples `example`; group data-visual; runtime engine; tags editor, data-visual.
60
- - `weave` **Weave**: Items along the top joined to the tags they share along the bottom, many to many; focusing an item lights its tags, and focusing a tag lights its items; React `Weave` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `items`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; tags editor, data-visual.
54
+ - `bar-chart` **Bar chart**: Vertical bars comparing values across categories, one colour per series, with a value axis and a legend for several series; React `BarChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `categories`, `series`, `title`, `unit`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
55
+ - `braid` **Braid**: Strands twisted into one root, passing over and under, weighted by value and labelled at the open end; draws on along the braid, and focusing a strand lights it; React `Braid` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `strands`, `turns`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
56
+ - `donut-chart` **Donut chart**: Parts of a whole as slices of a ring, one colour per slice, with a legend; React `DonutChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `slices`, `title`, `unit`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
57
+ - `flow` **Flow**: A process as boxes joined by arrows, left to right or top down, in the diagram editor's layout; React `Flow` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `steps`, `links`, `direction`, `title`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
58
+ - `gauge` **Gauge**: A speedometer gauge: its coloured band draws on, the needle sweeps past the value and settles, and the reading counts up beneath; React `Gauge` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); props `value`, `max`, `unit`, `label`; examples `example`; group data-visual; runtime engine; fallback `progress`; tags flair, data-visual.
59
+ - `line-chart` **Line chart**: Lines showing how values change across ordered categories (time), one colour per series, with a value axis and a legend for several series; React `LineChart` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `categories`, `series`, `title`, `unit`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
60
+ - `lineage` **Lineage**: One root fanned out to a row of items with rounded connectors that never cross, labels sized to fit their columns; draws on from the root, and focusing an item lights its branch; React `Lineage` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `items`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
61
+ - `mindmap` **Mind map**: A central idea with branches and sub-branches spread round it, one colour per branch; React `Mindmap` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `root`, `branches`, `title`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
62
+ - `sparkline` **Sparkline**: A word-sized line chart of one run of values, without axes or labels; React `Sparkline` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `values`, `label`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
63
+ - `timeline` **Timeline**: Periods along an axis, each with its events stacked under it, one colour per period; React `Timeline` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `periods`, `title`; examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.
64
+ - `weave` **Weave**: Items along the top joined to the tags they share along the bottom, many to many; focusing an item lights its tags, and focusing a tag lights its items; React `Weave` from `@surreal-ui/catalog/react/editor` (needs @pixerate/editor); props `items`, `title`; state focus (event focus); examples `example`; group data-visual; runtime engine; fallback `table`; tags editor, data-visual.