@surreal-ui/catalog 0.11.1 → 0.13.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 +16 -16
- package/dist/{chunk-NICVZTCB.js → chunk-BV22DQWK.js} +26 -26
- package/dist/{chunk-ZYD3ZW7Q.js → chunk-FJC5GAN5.js} +1 -0
- package/dist/index.js +1 -1
- package/dist/lazy.js +1 -1
- package/dist/node.d.ts +24 -1
- package/dist/node.js +90 -0
- package/dist/react/editor.js +1 -1
- package/dist/react/flair.js +1 -1
- package/dist/react/index.d.ts +20 -1
- package/dist/react/index.js +6 -0
- package/dist/registry.d.ts +8 -0
- package/dist/sources/bar-chart/react.tsx +1 -1
- package/dist/sources/braid/react.tsx +1 -1
- package/dist/sources/donut-chart/react.tsx +1 -1
- package/dist/sources/flow/react.tsx +1 -1
- package/dist/sources/gauge/react.tsx +1 -1
- package/dist/sources/line-chart/react.tsx +1 -1
- package/dist/sources/lineage/react.tsx +1 -1
- package/dist/sources/mindmap/react.tsx +1 -1
- package/dist/sources/sparkline/react.tsx +1 -1
- package/dist/sources/timeline/react.tsx +1 -1
- package/dist/sources/weave/react.tsx +1 -1
- package/package.json +1 -1
- package/skills/surreal-use/references/components.md +13 -13
package/README.md
CHANGED
|
@@ -40,22 +40,22 @@ npm install @surreal-ui/catalog
|
|
|
40
40
|
|
|
41
41
|
React 18+ or Svelte 5. Install `@pixerate/flair` or `@pixerate/editor` only if you use the components that come from them.
|
|
42
42
|
|
|
43
|
-
| Entry point | What it has
|
|
44
|
-
| ------------------------------------ |
|
|
45
|
-
| `@surreal-ui/catalog` | The catalog API: components, categories, aesthetics, contracts, packs
|
|
46
|
-
| `@surreal-ui/catalog/lazy` | The same metadata, with each React component loaded on demand
|
|
47
|
-
| `@surreal-ui/catalog/react` | React components
|
|
48
|
-
| `@surreal-ui/catalog/react/flair` | Components drawn by Flair (needs `@pixerate/flair`)
|
|
49
|
-
| `@surreal-ui/catalog/react/editor` | Charts from editor (needs `@pixerate/editor`)
|
|
50
|
-
| `@surreal-ui/catalog/svelte` | Svelte 5 components (`/svelte/lazy` to load them on demand)
|
|
51
|
-
| `@surreal-ui/catalog/components.css` | The styles every component needs
|
|
52
|
-
| `@surreal-ui/catalog/aesthetics/*` | One CSS pack per aesthetic, e.g. `@surreal-ui/catalog/aesthetics/ink.css`
|
|
53
|
-
| `@surreal-ui/catalog/web` | WebComponents: importing it defines `<surreal-button>`, `<surreal-theme>`, …
|
|
54
|
-
| `@surreal-ui/catalog/node` | `installSkills` (Node only)
|
|
55
|
-
| `@surreal-ui/catalog/naming` | Naming helpers shared by the packages, the CLI and the service
|
|
56
|
-
| `@surreal-ui/catalog/registry` | The hosted registry's item types (shadcn registry-item compatible)
|
|
57
|
-
| `@surreal-ui/catalog/theme` | A `Theme` as Tailwind v4 custom properties
|
|
58
|
-
| `@surreal-ui/catalog/look` | The deterministic look checks (contrast, hit targets, reduced motion)
|
|
43
|
+
| Entry point | What it has |
|
|
44
|
+
| ------------------------------------ | ----------------------------------------------------------------------------- |
|
|
45
|
+
| `@surreal-ui/catalog` | The catalog API: components, categories, aesthetics, contracts, packs |
|
|
46
|
+
| `@surreal-ui/catalog/lazy` | The same metadata, with each React component loaded on demand |
|
|
47
|
+
| `@surreal-ui/catalog/react` | React components, and `useRoleColors` for components drawn by a provider |
|
|
48
|
+
| `@surreal-ui/catalog/react/flair` | Components drawn by Flair (needs `@pixerate/flair`) |
|
|
49
|
+
| `@surreal-ui/catalog/react/editor` | Charts and diagrams from editor (needs `@pixerate/editor`; diagrams `dagre`) |
|
|
50
|
+
| `@surreal-ui/catalog/svelte` | Svelte 5 components (`/svelte/lazy` to load them on demand) |
|
|
51
|
+
| `@surreal-ui/catalog/components.css` | The styles every component needs |
|
|
52
|
+
| `@surreal-ui/catalog/aesthetics/*` | One CSS pack per aesthetic, e.g. `@surreal-ui/catalog/aesthetics/ink.css` |
|
|
53
|
+
| `@surreal-ui/catalog/web` | WebComponents: importing it defines `<surreal-button>`, `<surreal-theme>`, … |
|
|
54
|
+
| `@surreal-ui/catalog/node` | `installSkills`, `catalogRegistryItem` (what `surreal add` copies; Node only) |
|
|
55
|
+
| `@surreal-ui/catalog/naming` | Naming helpers shared by the packages, the CLI and the service |
|
|
56
|
+
| `@surreal-ui/catalog/registry` | The hosted registry's item types (shadcn registry-item compatible) |
|
|
57
|
+
| `@surreal-ui/catalog/theme` | A `Theme` as Tailwind v4 custom properties |
|
|
58
|
+
| `@surreal-ui/catalog/look` | The deterministic look checks (contrast, hit targets, reduced motion) |
|
|
59
59
|
|
|
60
60
|
## 🚀 Drop in
|
|
61
61
|
|
|
@@ -240,15 +240,15 @@ var CATALOG = {
|
|
|
240
240
|
"version": "0.336.0",
|
|
241
241
|
"contentHash": "h1-76ee0998eaac0913"
|
|
242
242
|
},
|
|
243
|
+
"runtime": "engine",
|
|
243
244
|
"implements": "bar-chart",
|
|
244
245
|
"category": "data-visual",
|
|
245
|
-
"runtime": "code",
|
|
246
246
|
"platforms": [
|
|
247
247
|
"react"
|
|
248
248
|
],
|
|
249
249
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
250
250
|
"export": "BarChart",
|
|
251
|
-
"contentHash": "
|
|
251
|
+
"contentHash": "891c1fc309014e6d3fd8aaa7c4f8efae7a81fca7f8d27590eeb2525b3d324417",
|
|
252
252
|
"path": "components/bar-chart",
|
|
253
253
|
"alternatives": []
|
|
254
254
|
},
|
|
@@ -401,15 +401,15 @@ var CATALOG = {
|
|
|
401
401
|
"version": "0.336.0",
|
|
402
402
|
"contentHash": "h1-32ab36e8632bd353"
|
|
403
403
|
},
|
|
404
|
+
"runtime": "engine",
|
|
404
405
|
"implements": "braid",
|
|
405
406
|
"category": "data-visual",
|
|
406
|
-
"runtime": "code",
|
|
407
407
|
"platforms": [
|
|
408
408
|
"react"
|
|
409
409
|
],
|
|
410
410
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
411
411
|
"export": "Braid",
|
|
412
|
-
"contentHash": "
|
|
412
|
+
"contentHash": "d0302d8764b3adaf61fca077103d82389919fb89ec6805bc1be523ba12c5b36c",
|
|
413
413
|
"path": "components/braid",
|
|
414
414
|
"alternatives": []
|
|
415
415
|
},
|
|
@@ -885,15 +885,15 @@ var CATALOG = {
|
|
|
885
885
|
"version": "0.336.0",
|
|
886
886
|
"contentHash": "h1-50feaa770e686a53"
|
|
887
887
|
},
|
|
888
|
+
"runtime": "engine",
|
|
888
889
|
"implements": "donut-chart",
|
|
889
890
|
"category": "data-visual",
|
|
890
|
-
"runtime": "code",
|
|
891
891
|
"platforms": [
|
|
892
892
|
"react"
|
|
893
893
|
],
|
|
894
894
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
895
895
|
"export": "DonutChart",
|
|
896
|
-
"contentHash": "
|
|
896
|
+
"contentHash": "98d4d2922a808ca8bf515047a8db39e9123e797a69645c4953555ad21b2910e6",
|
|
897
897
|
"path": "components/donut-chart",
|
|
898
898
|
"alternatives": []
|
|
899
899
|
},
|
|
@@ -1028,15 +1028,15 @@ var CATALOG = {
|
|
|
1028
1028
|
"version": "0.336.0",
|
|
1029
1029
|
"contentHash": "h1-610ee378b54394ed"
|
|
1030
1030
|
},
|
|
1031
|
+
"runtime": "engine",
|
|
1031
1032
|
"implements": "flow",
|
|
1032
1033
|
"category": "data-visual",
|
|
1033
|
-
"runtime": "code",
|
|
1034
1034
|
"platforms": [
|
|
1035
1035
|
"react"
|
|
1036
1036
|
],
|
|
1037
1037
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
1038
1038
|
"export": "Flow",
|
|
1039
|
-
"contentHash": "
|
|
1039
|
+
"contentHash": "b661f616251347d38e0293d74a0ab00bce0a507c525c9fb3a1719d3a6776f7e1",
|
|
1040
1040
|
"path": "components/flow",
|
|
1041
1041
|
"alternatives": []
|
|
1042
1042
|
},
|
|
@@ -1116,15 +1116,15 @@ var CATALOG = {
|
|
|
1116
1116
|
"version": "0.121.0",
|
|
1117
1117
|
"contentHash": "75633984bd4ab14c"
|
|
1118
1118
|
},
|
|
1119
|
+
"runtime": "engine",
|
|
1119
1120
|
"implements": "gauge",
|
|
1120
1121
|
"category": "data-visual",
|
|
1121
|
-
"runtime": "code",
|
|
1122
1122
|
"platforms": [
|
|
1123
1123
|
"react"
|
|
1124
1124
|
],
|
|
1125
1125
|
"entry": "@surreal-ui/catalog/react/flair",
|
|
1126
1126
|
"export": "Gauge",
|
|
1127
|
-
"contentHash": "
|
|
1127
|
+
"contentHash": "ee32b859c602654237041df6afa651b862aa7fa20e1a8523861d98444ef911b5",
|
|
1128
1128
|
"path": "components/gauge",
|
|
1129
1129
|
"alternatives": []
|
|
1130
1130
|
},
|
|
@@ -1499,15 +1499,15 @@ var CATALOG = {
|
|
|
1499
1499
|
"version": "0.336.0",
|
|
1500
1500
|
"contentHash": "h1-7a9211007a63771b"
|
|
1501
1501
|
},
|
|
1502
|
+
"runtime": "engine",
|
|
1502
1503
|
"implements": "line-chart",
|
|
1503
1504
|
"category": "data-visual",
|
|
1504
|
-
"runtime": "code",
|
|
1505
1505
|
"platforms": [
|
|
1506
1506
|
"react"
|
|
1507
1507
|
],
|
|
1508
1508
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
1509
1509
|
"export": "LineChart",
|
|
1510
|
-
"contentHash": "
|
|
1510
|
+
"contentHash": "61e6f1f5b4868c71a501e8c06b0fd8f5165622184fee9c1c0fe17906e43a2806",
|
|
1511
1511
|
"path": "components/line-chart",
|
|
1512
1512
|
"alternatives": []
|
|
1513
1513
|
},
|
|
@@ -1653,15 +1653,15 @@ var CATALOG = {
|
|
|
1653
1653
|
"version": "0.336.0",
|
|
1654
1654
|
"contentHash": "h1-80fbdcdee156c4aa"
|
|
1655
1655
|
},
|
|
1656
|
+
"runtime": "engine",
|
|
1656
1657
|
"implements": "lineage",
|
|
1657
1658
|
"category": "data-visual",
|
|
1658
|
-
"runtime": "code",
|
|
1659
1659
|
"platforms": [
|
|
1660
1660
|
"react"
|
|
1661
1661
|
],
|
|
1662
1662
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
1663
1663
|
"export": "Lineage",
|
|
1664
|
-
"contentHash": "
|
|
1664
|
+
"contentHash": "3bdf12a81d25f518d492c57347596864993268dd040ae81a92ca8c83ed91996f",
|
|
1665
1665
|
"path": "components/lineage",
|
|
1666
1666
|
"alternatives": []
|
|
1667
1667
|
},
|
|
@@ -1814,15 +1814,15 @@ var CATALOG = {
|
|
|
1814
1814
|
"version": "0.336.0",
|
|
1815
1815
|
"contentHash": "h1-8de425038a9756ec"
|
|
1816
1816
|
},
|
|
1817
|
+
"runtime": "engine",
|
|
1817
1818
|
"implements": "mindmap",
|
|
1818
1819
|
"category": "data-visual",
|
|
1819
|
-
"runtime": "code",
|
|
1820
1820
|
"platforms": [
|
|
1821
1821
|
"react"
|
|
1822
1822
|
],
|
|
1823
1823
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
1824
1824
|
"export": "Mindmap",
|
|
1825
|
-
"contentHash": "
|
|
1825
|
+
"contentHash": "3ffa0c55478a14d63d682aa2a5cad4748edff776880db8295c681f4cfc0f2d39",
|
|
1826
1826
|
"path": "components/mindmap",
|
|
1827
1827
|
"alternatives": []
|
|
1828
1828
|
},
|
|
@@ -1964,15 +1964,15 @@ var CATALOG = {
|
|
|
1964
1964
|
"version": "0.121.0",
|
|
1965
1965
|
"contentHash": "123abfb771b8b266"
|
|
1966
1966
|
},
|
|
1967
|
+
"runtime": "engine",
|
|
1967
1968
|
"implements": "progress",
|
|
1968
1969
|
"category": "feedback",
|
|
1969
|
-
"runtime": "code",
|
|
1970
1970
|
"platforms": [
|
|
1971
1971
|
"react"
|
|
1972
1972
|
],
|
|
1973
1973
|
"entry": "@surreal-ui/catalog/react/flair",
|
|
1974
1974
|
"export": "FlairProgressBar",
|
|
1975
|
-
"contentHash": "
|
|
1975
|
+
"contentHash": "c50b25960bdadff092a001b229af2fc07e9620445eb5393ab42dedcc126555a2",
|
|
1976
1976
|
"path": "components/progress/alternatives/flair-progress-bar"
|
|
1977
1977
|
}
|
|
1978
1978
|
]
|
|
@@ -2219,15 +2219,15 @@ var CATALOG = {
|
|
|
2219
2219
|
"version": "0.336.0",
|
|
2220
2220
|
"contentHash": "h1-f5415ff4a27028bf"
|
|
2221
2221
|
},
|
|
2222
|
+
"runtime": "engine",
|
|
2222
2223
|
"implements": "sparkline",
|
|
2223
2224
|
"category": "data-visual",
|
|
2224
|
-
"runtime": "code",
|
|
2225
2225
|
"platforms": [
|
|
2226
2226
|
"react"
|
|
2227
2227
|
],
|
|
2228
2228
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
2229
2229
|
"export": "Sparkline",
|
|
2230
|
-
"contentHash": "
|
|
2230
|
+
"contentHash": "a2518ab4bd7e82f887f28a066991a2447d8cc483328fa6e667396d7c376b1485",
|
|
2231
2231
|
"path": "components/sparkline",
|
|
2232
2232
|
"alternatives": []
|
|
2233
2233
|
},
|
|
@@ -2505,15 +2505,15 @@ var CATALOG = {
|
|
|
2505
2505
|
"version": "0.121.0",
|
|
2506
2506
|
"contentHash": "f543742e308ca500"
|
|
2507
2507
|
},
|
|
2508
|
+
"runtime": "engine",
|
|
2508
2509
|
"implements": "switch",
|
|
2509
2510
|
"category": "form",
|
|
2510
|
-
"runtime": "code",
|
|
2511
2511
|
"platforms": [
|
|
2512
2512
|
"react"
|
|
2513
2513
|
],
|
|
2514
2514
|
"entry": "@surreal-ui/catalog/react/flair",
|
|
2515
2515
|
"export": "FlairToggleSwitch",
|
|
2516
|
-
"contentHash": "
|
|
2516
|
+
"contentHash": "e069f8a2e6a2ae4f9d3b95d39b12dd1e5e5c2916a15d9bd493bac5cf4485ad5b",
|
|
2517
2517
|
"path": "components/switch/alternatives/flair-toggle-switch"
|
|
2518
2518
|
}
|
|
2519
2519
|
]
|
|
@@ -2733,15 +2733,15 @@ var CATALOG = {
|
|
|
2733
2733
|
"version": "0.336.0",
|
|
2734
2734
|
"contentHash": "h1-4d6bef2670bfda04"
|
|
2735
2735
|
},
|
|
2736
|
+
"runtime": "engine",
|
|
2736
2737
|
"implements": "timeline",
|
|
2737
2738
|
"category": "data-visual",
|
|
2738
|
-
"runtime": "code",
|
|
2739
2739
|
"platforms": [
|
|
2740
2740
|
"react"
|
|
2741
2741
|
],
|
|
2742
2742
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
2743
2743
|
"export": "Timeline",
|
|
2744
|
-
"contentHash": "
|
|
2744
|
+
"contentHash": "4d4b49ed6803f7a1ae19397a71e65c0d7a1daebe6055372021554a617651d640",
|
|
2745
2745
|
"path": "components/timeline",
|
|
2746
2746
|
"alternatives": []
|
|
2747
2747
|
},
|
|
@@ -2913,15 +2913,15 @@ var CATALOG = {
|
|
|
2913
2913
|
"version": "0.336.0",
|
|
2914
2914
|
"contentHash": "h1-6a819cc804a71672"
|
|
2915
2915
|
},
|
|
2916
|
+
"runtime": "engine",
|
|
2916
2917
|
"implements": "weave",
|
|
2917
2918
|
"category": "data-visual",
|
|
2918
|
-
"runtime": "code",
|
|
2919
2919
|
"platforms": [
|
|
2920
2920
|
"react"
|
|
2921
2921
|
],
|
|
2922
2922
|
"entry": "@surreal-ui/catalog/react/editor",
|
|
2923
2923
|
"export": "Weave",
|
|
2924
|
-
"contentHash": "
|
|
2924
|
+
"contentHash": "a84fc810ed28459abcd6e1ea4232a2ff82de5bcfcf19cf80000ec430794ce943",
|
|
2925
2925
|
"path": "components/weave",
|
|
2926
2926
|
"alternatives": []
|
|
2927
2927
|
}
|
package/dist/index.js
CHANGED
package/dist/lazy.js
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { CatalogComponent } from './index.js';
|
|
2
|
+
import { RegistryItem } from './registry.js';
|
|
3
|
+
import { PlatformLanguage } from '@pixerate/schemas';
|
|
4
|
+
import '@pixerate/schemas/genui';
|
|
5
|
+
import './theme-V1Iz-HmC.js';
|
|
6
|
+
|
|
1
7
|
/** The skills in the package, by folder name. */
|
|
2
8
|
declare const SURREAL_SKILLS: readonly [{
|
|
3
9
|
readonly name: "surreal-use";
|
|
@@ -42,4 +48,21 @@ declare function skillsSource(): string;
|
|
|
42
48
|
*/
|
|
43
49
|
declare function installSkills(options?: InstallSkillsOptions): InstalledSkills;
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
/** This package's dist folder: beside the built module, or ../dist from the sources. */
|
|
52
|
+
declare function catalogDistDir(): string;
|
|
53
|
+
/**
|
|
54
|
+
* The npm packages a component's code imports (bare specifiers, by package name), plus the peers
|
|
55
|
+
* those entries need, without the framework itself. Sorted.
|
|
56
|
+
*/
|
|
57
|
+
declare function codeDependencies(code: string): string[];
|
|
58
|
+
/** The frameworks this release ships a type's source for. */
|
|
59
|
+
declare function catalogFrameworks(component: CatalogComponent, dist?: string): PlatformLanguage[];
|
|
60
|
+
/**
|
|
61
|
+
* The files `surreal add` writes for a catalog type: its implementation for the framework, its
|
|
62
|
+
* stylesheet and the aesthetic's pack, with every package the code imports as a dependency (for an
|
|
63
|
+
* engine type, its provider). Null if the release has no source for that framework; throws for an
|
|
64
|
+
* unknown aesthetic.
|
|
65
|
+
*/
|
|
66
|
+
declare function catalogRegistryItem(component: CatalogComponent, framework: PlatformLanguage, aestheticId: string, dist?: string): RegistryItem | null;
|
|
67
|
+
|
|
68
|
+
export { DEFAULT_SKILLS_DIR, type InstallSkillsOptions, type InstalledSkillFile, type InstalledSkills, SURREAL_SKILLS, type SurrealSkillName, catalogDistDir, catalogFrameworks, catalogRegistryItem, codeDependencies, installSkills, skillsSource };
|
package/dist/node.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AESTHETICS,
|
|
3
|
+
getAesthetic
|
|
4
|
+
} from "./chunk-BV22DQWK.js";
|
|
5
|
+
import "./chunk-HMNTTISG.js";
|
|
6
|
+
|
|
1
7
|
// src/skills.ts
|
|
2
8
|
import fs from "fs";
|
|
3
9
|
import path from "path";
|
|
@@ -67,9 +73,93 @@ function installSkills(options = {}) {
|
|
|
67
73
|
}
|
|
68
74
|
return { dir, skills: wanted, files };
|
|
69
75
|
}
|
|
76
|
+
|
|
77
|
+
// src/registry-item.ts
|
|
78
|
+
import fs2 from "fs";
|
|
79
|
+
import path2 from "path";
|
|
80
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
81
|
+
var SOURCE = {
|
|
82
|
+
react: { file: "react.tsx", ext: "tsx" },
|
|
83
|
+
svelte: { file: "svelte.svelte", ext: "svelte" },
|
|
84
|
+
webcomponent: { file: "element.ts", ext: "ts" }
|
|
85
|
+
};
|
|
86
|
+
var FRAMEWORKS = /* @__PURE__ */ new Set(["react", "react-dom", "svelte"]);
|
|
87
|
+
var ENTRY_PEERS = {
|
|
88
|
+
// Diagram layout (diagramUiComponents) needs dagre.
|
|
89
|
+
"@pixerate/editor/canvas": ["@dagrejs/dagre"]
|
|
90
|
+
};
|
|
91
|
+
function catalogDistDir() {
|
|
92
|
+
const here = path2.dirname(fileURLToPath2(import.meta.url));
|
|
93
|
+
return fs2.existsSync(path2.join(here, "sources")) ? here : path2.resolve(here, "../dist");
|
|
94
|
+
}
|
|
95
|
+
function codeDependencies(code) {
|
|
96
|
+
const deps = /* @__PURE__ */ new Set();
|
|
97
|
+
for (const m of code.matchAll(/(?:from\s+|import\s+|import\()\s*['"]([^'"./][^'"]*)['"]/g)) {
|
|
98
|
+
const spec = m[1];
|
|
99
|
+
const parts = spec.split("/");
|
|
100
|
+
const name = spec.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
|
|
101
|
+
if (FRAMEWORKS.has(name)) continue;
|
|
102
|
+
deps.add(name);
|
|
103
|
+
for (const peer of ENTRY_PEERS[spec] ?? []) deps.add(peer);
|
|
104
|
+
}
|
|
105
|
+
return [...deps].sort();
|
|
106
|
+
}
|
|
107
|
+
function catalogFrameworks(component, dist = catalogDistDir()) {
|
|
108
|
+
const dir = path2.join(dist, "sources", component.id);
|
|
109
|
+
return Object.keys(SOURCE).filter(
|
|
110
|
+
(f) => fs2.existsSync(path2.join(dir, SOURCE[f].file))
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function catalogRegistryItem(component, framework, aestheticId, dist = catalogDistDir()) {
|
|
114
|
+
const src = SOURCE[framework];
|
|
115
|
+
const dir = path2.join(dist, "sources", component.id);
|
|
116
|
+
const main = path2.join(dir, src.file);
|
|
117
|
+
if (!fs2.existsSync(main)) return null;
|
|
118
|
+
if (!getAesthetic(aestheticId))
|
|
119
|
+
throw new Error(
|
|
120
|
+
`Unknown aesthetic "${aestheticId}". Available: ${AESTHETICS.map((a) => a.id).join(", ")}`
|
|
121
|
+
);
|
|
122
|
+
const code = fs2.readFileSync(main, "utf8");
|
|
123
|
+
const files = [
|
|
124
|
+
{ path: `${component.export}.${src.ext}`, content: code, type: "registry:ui" }
|
|
125
|
+
];
|
|
126
|
+
const style = path2.join(dir, "style.css");
|
|
127
|
+
if (fs2.existsSync(style))
|
|
128
|
+
files.push({
|
|
129
|
+
path: `${component.id}.css`,
|
|
130
|
+
content: fs2.readFileSync(style, "utf8"),
|
|
131
|
+
type: "registry:ui"
|
|
132
|
+
});
|
|
133
|
+
files.push({
|
|
134
|
+
path: `aesthetic-${aestheticId}.css`,
|
|
135
|
+
content: fs2.readFileSync(path2.join(dist, "aesthetics", `${aestheticId}.css`), "utf8"),
|
|
136
|
+
type: "registry:ui"
|
|
137
|
+
});
|
|
138
|
+
return {
|
|
139
|
+
name: component.id,
|
|
140
|
+
type: "registry:ui",
|
|
141
|
+
title: component.name,
|
|
142
|
+
description: component.description,
|
|
143
|
+
dependencies: codeDependencies(code),
|
|
144
|
+
files,
|
|
145
|
+
meta: {
|
|
146
|
+
aestheticId,
|
|
147
|
+
componentTypeId: component.id,
|
|
148
|
+
version: component.source.version ?? "",
|
|
149
|
+
framework,
|
|
150
|
+
symbolName: component.export,
|
|
151
|
+
runtime: component.runtime,
|
|
152
|
+
...component.source.provider !== "manual" ? { provider: component.source.provider } : {}
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
70
156
|
export {
|
|
71
157
|
DEFAULT_SKILLS_DIR,
|
|
72
158
|
SURREAL_SKILLS,
|
|
159
|
+
catalogDistDir,
|
|
160
|
+
catalogFrameworks,
|
|
161
|
+
catalogRegistryItem,
|
|
162
|
+
codeDependencies,
|
|
73
163
|
installSkills,
|
|
74
164
|
skillsSource
|
|
75
165
|
};
|
package/dist/react/editor.js
CHANGED
package/dist/react/flair.js
CHANGED
package/dist/react/index.d.ts
CHANGED
|
@@ -23,6 +23,25 @@ declare function withAesthetic<P extends object>(Component: React.ComponentType<
|
|
|
23
23
|
/** An old aesthetic-prefixed export as the type plus its aesthetic, with the old props mapped. */
|
|
24
24
|
declare function deprecatedAlias<P extends object>(Component: React.ComponentType<P>, spec: DeprecatedSpec): React.ForwardRefExoticComponent<Record<string, unknown> & React.RefAttributes<unknown>>;
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* For components synced from providers (Flair, editor): the aesthetic's colour roles and colour
|
|
28
|
+
* scheme where the component sits, read from the `--sui-<role>` variables its aesthetic pack sets.
|
|
29
|
+
* They are read after mount and again whenever an ancestor's class, data-theme or data-aesthetic
|
|
30
|
+
* changes, or the OS colour scheme does, so switching aesthetic or theme restyles them.
|
|
31
|
+
*/
|
|
32
|
+
type Rgb = [number, number, number];
|
|
33
|
+
interface RoleColors {
|
|
34
|
+
/** Role → CSS colour as computed (`rgb(…)`). */
|
|
35
|
+
css: Record<string, string>;
|
|
36
|
+
/** Role → [r, g, b] in 0–1, as Flair's colour controls take. */
|
|
37
|
+
rgb: Record<string, Rgb>;
|
|
38
|
+
scheme: 'light' | 'dark';
|
|
39
|
+
}
|
|
40
|
+
/** Reads the roles at an element. Undefined until every role resolves (no aesthetic pack loaded yet). */
|
|
41
|
+
declare function readRoleColors(el: Element, roles: readonly string[]): RoleColors | undefined;
|
|
42
|
+
/** The roles at `ref`, kept current as aesthetics and themes change. */
|
|
43
|
+
declare function useRoleColors(ref: React.RefObject<Element | null>, roles: readonly string[]): RoleColors | undefined;
|
|
44
|
+
|
|
26
45
|
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
27
46
|
tone?: 'neutral' | 'accent' | 'danger';
|
|
28
47
|
}
|
|
@@ -123,4 +142,4 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
123
142
|
}
|
|
124
143
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
125
144
|
|
|
126
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, DeprecatedSpec, Input, type InputProps, Kbd, type KbdProps, Label, type LabelProps, Progress, type ProgressProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, SurrealTheme, type SurrealThemeProps, Switch, type SwitchProps, Textarea, type TextareaProps, ThemeMode, deprecatedAlias, useAesthetic, useStructure, withAesthetic };
|
|
145
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, DeprecatedSpec, Input, type InputProps, Kbd, type KbdProps, Label, type LabelProps, Progress, type ProgressProps, type Rgb, type RoleColors, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, SurrealTheme, type SurrealThemeProps, Switch, type SwitchProps, Textarea, type TextareaProps, ThemeMode, deprecatedAlias, readRoleColors, useAesthetic, useRoleColors, useStructure, withAesthetic };
|
package/dist/react/index.js
CHANGED
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
Switch
|
|
27
27
|
} from "../chunk-F5CUZM5I.js";
|
|
28
|
+
import {
|
|
29
|
+
readRoleColors,
|
|
30
|
+
useRoleColors
|
|
31
|
+
} from "../chunk-FJC5GAN5.js";
|
|
28
32
|
import {
|
|
29
33
|
Badge
|
|
30
34
|
} from "../chunk-LABYZELU.js";
|
|
@@ -59,7 +63,9 @@ export {
|
|
|
59
63
|
Switch,
|
|
60
64
|
Textarea,
|
|
61
65
|
deprecatedAlias,
|
|
66
|
+
readRoleColors,
|
|
62
67
|
useAesthetic,
|
|
68
|
+
useRoleColors,
|
|
63
69
|
useStructure,
|
|
64
70
|
withAesthetic
|
|
65
71
|
};
|
package/dist/registry.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ interface RegistryItem {
|
|
|
25
25
|
framework: PlatformLanguage;
|
|
26
26
|
themeSupport?: string;
|
|
27
27
|
symbolName?: string;
|
|
28
|
+
/** `engine`: a provider's runtime draws it from data (#38); `code` otherwise. */
|
|
29
|
+
runtime?: 'code' | 'engine';
|
|
30
|
+
/** For a provider's component: who draws it (`editor`, `flair`). */
|
|
31
|
+
provider?: string;
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
34
|
interface RegistryIndexItem {
|
|
@@ -35,6 +39,10 @@ interface RegistryIndexItem {
|
|
|
35
39
|
aesthetics: string[];
|
|
36
40
|
dependencies: string[];
|
|
37
41
|
registryDependencies?: string[];
|
|
42
|
+
/** `engine` types (#38) are drawn by a provider's runtime; served from the catalog release. */
|
|
43
|
+
runtime?: 'code' | 'engine';
|
|
44
|
+
/** Frameworks it can be added for, when not every one. */
|
|
45
|
+
frameworks?: PlatformLanguage[];
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
export { DEFAULT_REGISTRY_URL, type RegistryIndexItem, type RegistryItem, type RegistryItemFile };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (bar-chart). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
7
7
|
const COMPONENT = uiComponents().find((c) => c.id === 'bar-chart')!;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
4
|
import { createLinkFocus } from '@pixerate/editor/tools';
|
|
5
|
-
import { useRoleColors } from '
|
|
5
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
6
6
|
|
|
7
7
|
const ROLES = ['surface', 'ink', 'accent'] as const;
|
|
8
8
|
const COMPONENT = uiComponents().find((c) => c.id === 'braid')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (donut-chart). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'ink', 'accent'] as const;
|
|
7
7
|
const COMPONENT = uiComponents().find((c) => c.id === 'donut-chart')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (flow). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { diagramUiComponents } from '@pixerate/editor/canvas';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'surface-raised', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
7
7
|
const COMPONENT = diagramUiComponents().find((c) => c.id === 'flow')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/flair 0.121.0 (gauge). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { FlairEffect } from '@pixerate/flair/react';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['success', 'warning', 'danger', 'accent', 'surface', 'ink'] as const;
|
|
7
7
|
const CONTROLS: Record<string, string> = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (line-chart). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
7
7
|
const COMPONENT = uiComponents().find((c) => c.id === 'line-chart')!;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
4
|
import { createLinkFocus } from '@pixerate/editor/tools';
|
|
5
|
-
import { useRoleColors } from '
|
|
5
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
6
6
|
|
|
7
7
|
const ROLES = ['surface', 'ink', 'ink-muted', 'accent'] as const;
|
|
8
8
|
const COMPONENT = uiComponents().find((c) => c.id === 'lineage')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (mindmap). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { diagramUiComponents } from '@pixerate/editor/canvas';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'surface-raised', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
7
7
|
const COMPONENT = diagramUiComponents().find((c) => c.id === 'mindmap')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (sparkline). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['accent'] as const;
|
|
7
7
|
const COMPONENT = uiComponents().find((c) => c.id === 'sparkline')!;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by packages/catalog/scripts/sync-providers.ts from @pixerate/editor 0.336.0 (timeline). Do not edit.
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { diagramUiComponents } from '@pixerate/editor/canvas';
|
|
4
|
-
import { useRoleColors } from '
|
|
4
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
5
5
|
|
|
6
6
|
const ROLES = ['surface', 'surface-raised', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
7
7
|
const COMPONENT = diagramUiComponents().find((c) => c.id === 'timeline')!;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { uiComponents } from '@pixerate/editor/chart';
|
|
4
4
|
import { createLinkFocus } from '@pixerate/editor/tools';
|
|
5
|
-
import { useRoleColors } from '
|
|
5
|
+
import { useRoleColors } from '@surreal-ui/catalog/react';
|
|
6
6
|
|
|
7
7
|
const ROLES = ['surface', 'surface-raised', 'ink', 'ink-muted', 'border', 'accent'] as const;
|
|
8
8
|
const COMPONENT = uiComponents().find((c) => c.id === 'weave')!;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surreal-ui/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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",
|
|
@@ -16,7 +16,7 @@ Controls that hold a value: inputs, switches, checkboxes, selects, sliders.
|
|
|
16
16
|
- `input` **Input**: Displays a form input field or a component that looks like an input field; React `Input` from `@surreal-ui/catalog/react`; Svelte `Input` from `@surreal-ui/catalog/svelte`; element `<surreal-input>` from `@surreal-ui/catalog/web`; props `label`, `placeholder`, `type`, `disabled`; state value (event change); examples `default`; replaces `MinimalistInput`, `ShadcnInput`; tags form.
|
|
17
17
|
- `label` **Label**: Accessible labeling for form controls; React `Label` from `@surreal-ui/catalog/react`; Svelte `Label` from `@surreal-ui/catalog/svelte`; element `<surreal-label>` from `@surreal-ui/catalog/web`; props `children`, `htmlFor`, `required`; examples `required`; replaces `MinimalistLabel`, `ShadcnLabel`; tags form, typography.
|
|
18
18
|
- `switch` **Switch**: A control that allows the user to toggle between checked and not checked; React `Switch` from `@surreal-ui/catalog/react`; Svelte `Switch` from `@surreal-ui/catalog/svelte`; element `<surreal-switch>` from `@surreal-ui/catalog/web`; props `label`, `disabled`; state checked (event change); examples `on`, `off`; replaces `MinimalistSwitch`, `ShadcnSwitch`; tags form.
|
|
19
|
-
- alternative `flair-toggle-switch` **Toggle switch**: 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; React `FlairToggleSwitch` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); state checked (event change); examples `example`; tags flair, baseline.
|
|
19
|
+
- alternative `flair-toggle-switch` **Toggle switch**: 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; React `FlairToggleSwitch` from `@surreal-ui/catalog/react/flair` (needs @pixerate/flair); state checked (event change); examples `example`; runtime engine; tags flair, baseline.
|
|
20
20
|
- `textarea` **Textarea**: A multi-line text input control; React `Textarea` from `@surreal-ui/catalog/react`; Svelte `Textarea` from `@surreal-ui/catalog/svelte`; element `<surreal-textarea>` from `@surreal-ui/catalog/web`; props `label`, `placeholder`, `disabled`, `rows`; state value (event input); examples `labelled`; replaces `MinimalistTextarea`, `ShadcnTextarea`; tags form, input.
|
|
21
21
|
|
|
22
22
|
## Display (`display`)
|
|
@@ -31,7 +31,7 @@ Show content or status without taking input: badges, avatars, typography.
|
|
|
31
31
|
Report progress or the result of an action: progress, alerts, toasts, skeletons.
|
|
32
32
|
|
|
33
33
|
- `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.
|
|
34
|
-
- 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`; tags flair, baseline.
|
|
34
|
+
- 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.
|
|
35
35
|
- `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.
|
|
36
36
|
- `spinner` **Spinner**: A visual loading/spinner indicator; React `Spinner` from `@surreal-ui/catalog/react`; Svelte `Spinner` from `@surreal-ui/catalog/svelte`; element `<surreal-spinner>` from `@surreal-ui/catalog/web`; props `label`, `size`; examples `default`, `large`; replaces `MinimalistSpinner`, `ShadcnSpinner`; tags feedback, loading.
|
|
37
37
|
|
|
@@ -46,14 +46,14 @@ Hold and arrange other content: cards, separators, scroll areas, panels.
|
|
|
46
46
|
|
|
47
47
|
Draw numbers: charts, gauges, sparklines.
|
|
48
48
|
|
|
49
|
-
- `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; tags editor, data-visual.
|
|
50
|
-
- `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; tags editor, data-visual.
|
|
51
|
-
- `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; tags editor, data-visual.
|
|
52
|
-
- `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; tags editor, data-visual.
|
|
53
|
-
- `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; tags flair, data-visual.
|
|
54
|
-
- `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; tags editor, data-visual.
|
|
55
|
-
- `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; tags editor, data-visual.
|
|
56
|
-
- `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; tags editor, data-visual.
|
|
57
|
-
- `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; tags editor, data-visual.
|
|
58
|
-
- `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; tags editor, data-visual.
|
|
59
|
-
- `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; tags editor, data-visual.
|
|
49
|
+
- `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.
|
|
50
|
+
- `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.
|
|
51
|
+
- `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.
|
|
52
|
+
- `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.
|
|
53
|
+
- `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.
|
|
54
|
+
- `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.
|
|
55
|
+
- `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.
|
|
56
|
+
- `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.
|
|
57
|
+
- `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.
|
|
58
|
+
- `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.
|
|
59
|
+
- `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.
|