orbcafe-ui 1.4.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BRAND_THEMING.md +45 -0
- package/MIGRATION_V2.md +161 -0
- package/README.md +26 -25
- package/bin/lib/theme-core.mjs +446 -0
- package/bin/orbcafe-theme.mjs +169 -0
- package/dist/COrbCanvas-4PZFJUYO.mjs +1 -0
- package/dist/chunk-7TUSE6H4.mjs +183 -0
- package/dist/fonts/NOTICE.txt +7 -0
- package/dist/fonts/SAP-icons-LICENSE.txt +202 -0
- package/dist/fonts/SAP-icons.ttf +0 -0
- package/dist/fonts/SAP-icons.woff2 +0 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1279 -205
- package/dist/index.d.ts +1279 -205
- package/dist/index.js +26 -47
- package/dist/index.mjs +25 -46
- package/dist/orbis.css +2446 -0
- package/dist/themes/nvidia.css +36 -0
- package/dist/themes/nvidia.tokens.mjs +117 -0
- package/dist/themes/orbis/fonts/montserrat-300.otf +0 -0
- package/dist/themes/orbis/fonts/montserrat-500.otf +0 -0
- package/dist/themes/orbis/fonts/montserrat-600.otf +0 -0
- package/dist/themes/orbis/fonts/montserrat-700.otf +0 -0
- package/dist/themes/orbis.css +62 -0
- package/dist/themes/orbis.tokens.mjs +117 -0
- package/package.json +45 -14
- package/dist/COrbCanvas-EGX5NO3Y.mjs +0 -1
- package/dist/chunk-74Z76O3S.mjs +0 -183
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* nvidia.css — generated from the local Open Design preset "nvidia". Do not edit.
|
|
2
|
+
Regenerate with: npx orbcafe-theme apply nvidia
|
|
3
|
+
Import AFTER the base styles (import 'orbcafe-ui/styles.css').
|
|
4
|
+
Only base tokens are overridden; all derived tokens re-derive via color-mix. */
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--orb-primary: #76b900;
|
|
8
|
+
--orb-accent: #f2a900;
|
|
9
|
+
--orb-err: #d40000;
|
|
10
|
+
--orb-fg: #1a1a1a;
|
|
11
|
+
--orb-fg-strong: #1a1a1a;
|
|
12
|
+
--orb-muted: #666666;
|
|
13
|
+
--orb-canvas: #ffffff;
|
|
14
|
+
--orb-surface: #f2f2f2;
|
|
15
|
+
--orb-border: #e0e0e0;
|
|
16
|
+
--orb-link: #5c9100;
|
|
17
|
+
--orb-font-brand: "NVIDIA Sans";
|
|
18
|
+
--orb-r: 4px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.orb-dark,
|
|
22
|
+
[data-orb-mode="dark"] {
|
|
23
|
+
--orb-primary: #76b900;
|
|
24
|
+
--orb-accent: #f2a900;
|
|
25
|
+
--orb-err: #ff6b6b;
|
|
26
|
+
--orb-fg: #eeeeee;
|
|
27
|
+
--orb-fg-strong: #eeeeee;
|
|
28
|
+
--orb-muted: #aaaaaa;
|
|
29
|
+
--orb-canvas: #000000;
|
|
30
|
+
--orb-surface: #191919;
|
|
31
|
+
--orb-surface-2: #2a2a2a;
|
|
32
|
+
--orb-border: #3d3d3d;
|
|
33
|
+
--orb-link: #a4d24b;
|
|
34
|
+
--orb-font-brand: "NVIDIA Sans";
|
|
35
|
+
--orb-r: 4px;
|
|
36
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORBCAFE × nvidia theme tokens (JS side) — generated. Do not edit.
|
|
3
|
+
* Mirrors nvidia.css for consumers that cannot read CSS variables
|
|
4
|
+
* (SVG charts, canvas, inline-style computations).
|
|
5
|
+
* Shape matches OrbTokens from 'orbcafe-ui'.
|
|
6
|
+
*/
|
|
7
|
+
export const ORB_LIGHT = {
|
|
8
|
+
canvas: '#ffffff',
|
|
9
|
+
surface: '#f2f2f2',
|
|
10
|
+
surface2: '#f2f2f2',
|
|
11
|
+
surface3: '#f2f2f2',
|
|
12
|
+
fg: '#1a1a1a',
|
|
13
|
+
muted: '#666666',
|
|
14
|
+
border: '#e0e0e0',
|
|
15
|
+
primary: '#76b900',
|
|
16
|
+
onPrimary: '#ffffff',
|
|
17
|
+
link: '#5c9100',
|
|
18
|
+
p50: '#f7fbf3',
|
|
19
|
+
p100: '#ebf6e3',
|
|
20
|
+
p200: '#d8edc7',
|
|
21
|
+
p300: '#c1e1a4',
|
|
22
|
+
p600: '#5e9400',
|
|
23
|
+
p700: '#477100',
|
|
24
|
+
accent: '#f2a900',
|
|
25
|
+
err: '#d40000',
|
|
26
|
+
errBg: '#fff9f2',
|
|
27
|
+
warnBg: '#fef8f0',
|
|
28
|
+
hover: 'rgba(118, 185, 0, 0.06)',
|
|
29
|
+
selected: 'rgba(118, 185, 0, 0.1)',
|
|
30
|
+
focusRing: 'rgba(118, 185, 0, 0.18)',
|
|
31
|
+
focusSolid: '#76b900',
|
|
32
|
+
disabledFg: '#8e8e8e',
|
|
33
|
+
disabledBg: '#eaeaea',
|
|
34
|
+
chartGrid: '#e0e0e0',
|
|
35
|
+
chartText: '#666666',
|
|
36
|
+
track: '#f2f2f2',
|
|
37
|
+
shadow1: '0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)',
|
|
38
|
+
shadow2: '0 4px 14px rgba(1,9,26,.10)',
|
|
39
|
+
shadow3: '0 12px 32px rgba(1,9,26,.16)',
|
|
40
|
+
fontBrand: 'NVIDIA Sans',
|
|
41
|
+
inverseSurface: '#01091a',
|
|
42
|
+
inverseFg: '#ffffff',
|
|
43
|
+
inverseLink: '#c1e1a4',
|
|
44
|
+
aiAccent: '#21bcff',
|
|
45
|
+
statusFg: '#475569',
|
|
46
|
+
statusPrimary: '#1d4ed8',
|
|
47
|
+
statusSuccess: '#047857',
|
|
48
|
+
statusWarning: '#b45309',
|
|
49
|
+
statusError: '#b91c1c',
|
|
50
|
+
statusInfo: '#0369a1',
|
|
51
|
+
chart1: '#76b900',
|
|
52
|
+
chart2: '#c1e1a4',
|
|
53
|
+
chart3: '#666666',
|
|
54
|
+
chart4: '#477100',
|
|
55
|
+
chart5: '#f2a900',
|
|
56
|
+
chart6: '#d8edc7',
|
|
57
|
+
chartPositive: '#66bb6a',
|
|
58
|
+
chartNegative: '#ef5350',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const ORB_DARK = {
|
|
62
|
+
canvas: '#000000',
|
|
63
|
+
surface: '#191919',
|
|
64
|
+
surface2: '#2a2a2a',
|
|
65
|
+
surface3: '#020202',
|
|
66
|
+
fg: '#eeeeee',
|
|
67
|
+
muted: '#aaaaaa',
|
|
68
|
+
border: '#3d3d3d',
|
|
69
|
+
primary: '#76b900',
|
|
70
|
+
onPrimary: '#ffffff',
|
|
71
|
+
link: '#a4d24b',
|
|
72
|
+
p50: '#061000',
|
|
73
|
+
p100: '#122200',
|
|
74
|
+
p200: '#d8edc7',
|
|
75
|
+
p300: '#c1e1a4',
|
|
76
|
+
p600: '#8ac449',
|
|
77
|
+
p700: '#acd685',
|
|
78
|
+
accent: '#f2a900',
|
|
79
|
+
err: '#ff6b6b',
|
|
80
|
+
errBg: '#0c0500',
|
|
81
|
+
warnBg: '#100800',
|
|
82
|
+
hover: 'rgba(255, 255, 255, 0.08)',
|
|
83
|
+
selected: 'rgba(118, 185, 0, 0.45)',
|
|
84
|
+
focusRing: 'rgba(193, 225, 164, 0.45)',
|
|
85
|
+
focusSolid: '#c1e1a4',
|
|
86
|
+
disabledFg: 'rgba(255, 255, 255, 0.38)',
|
|
87
|
+
disabledBg: 'rgba(255, 255, 255, 0.07)',
|
|
88
|
+
chartGrid: 'rgba(255, 255, 255, 0.12)',
|
|
89
|
+
chartText: 'rgba(255, 255, 255, 0.7)',
|
|
90
|
+
track: 'rgba(255, 255, 255, 0.1)',
|
|
91
|
+
shadow1: '0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)',
|
|
92
|
+
shadow2: '0 4px 16px rgba(0,0,0,.5)',
|
|
93
|
+
shadow3: '0 12px 32px rgba(0,0,0,.55)',
|
|
94
|
+
fontBrand: 'NVIDIA Sans',
|
|
95
|
+
inverseSurface: '#01091a',
|
|
96
|
+
inverseFg: '#ffffff',
|
|
97
|
+
inverseLink: '#c1e1a4',
|
|
98
|
+
aiAccent: '#21bcff',
|
|
99
|
+
statusFg: '#94a3b8',
|
|
100
|
+
statusPrimary: '#60a5fa',
|
|
101
|
+
statusSuccess: '#34d399',
|
|
102
|
+
statusWarning: '#fbbf24',
|
|
103
|
+
statusError: '#f87171',
|
|
104
|
+
statusInfo: '#38bdf8',
|
|
105
|
+
chart1: '#76b900',
|
|
106
|
+
chart2: '#c1e1a4',
|
|
107
|
+
chart3: '#aaaaaa',
|
|
108
|
+
chart4: '#acd685',
|
|
109
|
+
chart5: '#f2a900',
|
|
110
|
+
chart6: '#d8edc7',
|
|
111
|
+
chartPositive: '#66bb6a',
|
|
112
|
+
chartNegative: '#ef5350',
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ORB_TOKENS = { light: ORB_LIGHT, dark: ORB_DARK };
|
|
116
|
+
|
|
117
|
+
export default ORB_TOKENS;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* orbis.css — generated from the local Open Design preset "orbis". Do not edit.
|
|
2
|
+
Regenerate with: npx orbcafe-theme apply orbis
|
|
3
|
+
Import AFTER the base styles (import 'orbcafe-ui/styles.css').
|
|
4
|
+
Only base tokens are overridden; all derived tokens re-derive via color-mix. */
|
|
5
|
+
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: "Montserrat";
|
|
8
|
+
src: url("./orbis/fonts/montserrat-300.otf") format("opentype");
|
|
9
|
+
font-weight: 300;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
}
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: "Montserrat";
|
|
15
|
+
src: url("./orbis/fonts/montserrat-500.otf") format("opentype");
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
}
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: "Montserrat";
|
|
22
|
+
src: url("./orbis/fonts/montserrat-600.otf") format("opentype");
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
}
|
|
27
|
+
@font-face {
|
|
28
|
+
font-family: "Montserrat";
|
|
29
|
+
src: url("./orbis/fonts/montserrat-700.otf") format("opentype");
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:root {
|
|
36
|
+
--orb-primary: #154194;
|
|
37
|
+
--orb-accent: #fc4c02;
|
|
38
|
+
--orb-fg: #696969;
|
|
39
|
+
--orb-fg-strong: #696969;
|
|
40
|
+
--orb-muted: #919191;
|
|
41
|
+
--orb-canvas: #ffffff;
|
|
42
|
+
--orb-surface: #f5f5f5;
|
|
43
|
+
--orb-border: #e6e6e6;
|
|
44
|
+
--orb-font-brand: "Montserrat";
|
|
45
|
+
--orb-r: 10px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.orb-dark,
|
|
49
|
+
[data-orb-mode="dark"] {
|
|
50
|
+
--orb-primary: #2c508c;
|
|
51
|
+
--orb-accent: #dc6328;
|
|
52
|
+
--orb-fg: #dcdcdc;
|
|
53
|
+
--orb-fg-strong: #dcdcdc;
|
|
54
|
+
--orb-muted: #adadad;
|
|
55
|
+
--orb-canvas: #1d1d1d;
|
|
56
|
+
--orb-surface: #141414;
|
|
57
|
+
--orb-surface-2: #272727;
|
|
58
|
+
--orb-border: #3e3e3e;
|
|
59
|
+
--orb-link: #97abc2;
|
|
60
|
+
--orb-font-brand: "Montserrat";
|
|
61
|
+
--orb-r: 10px;
|
|
62
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORBCAFE × orbis theme tokens (JS side) — generated. Do not edit.
|
|
3
|
+
* Mirrors orbis.css for consumers that cannot read CSS variables
|
|
4
|
+
* (SVG charts, canvas, inline-style computations).
|
|
5
|
+
* Shape matches OrbTokens from 'orbcafe-ui'.
|
|
6
|
+
*/
|
|
7
|
+
export const ORB_LIGHT = {
|
|
8
|
+
canvas: '#ffffff',
|
|
9
|
+
surface: '#f5f5f5',
|
|
10
|
+
surface2: '#f5f5f5',
|
|
11
|
+
surface3: '#f5f5f5',
|
|
12
|
+
fg: '#696969',
|
|
13
|
+
muted: '#919191',
|
|
14
|
+
border: '#e6e6e6',
|
|
15
|
+
primary: '#154194',
|
|
16
|
+
onPrimary: '#ffffff',
|
|
17
|
+
link: '#154194',
|
|
18
|
+
p50: '#f0f3f9',
|
|
19
|
+
p100: '#dce4f1',
|
|
20
|
+
p200: '#bac9e3',
|
|
21
|
+
p300: '#91a8d1',
|
|
22
|
+
p600: '#0f3276',
|
|
23
|
+
p700: '#08255a',
|
|
24
|
+
accent: '#fc4c02',
|
|
25
|
+
err: '#ac3101',
|
|
26
|
+
errBg: '#fff4f0',
|
|
27
|
+
warnBg: '#fff2ee',
|
|
28
|
+
hover: 'rgba(21, 65, 148, 0.06)',
|
|
29
|
+
selected: 'rgba(21, 65, 148, 0.1)',
|
|
30
|
+
focusRing: 'rgba(21, 65, 148, 0.18)',
|
|
31
|
+
focusSolid: '#154194',
|
|
32
|
+
disabledFg: '#b9b9b9',
|
|
33
|
+
disabledBg: '#f2f2f2',
|
|
34
|
+
chartGrid: '#e6e6e6',
|
|
35
|
+
chartText: '#919191',
|
|
36
|
+
track: '#f5f5f5',
|
|
37
|
+
shadow1: '0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)',
|
|
38
|
+
shadow2: '0 4px 14px rgba(1,9,26,.10)',
|
|
39
|
+
shadow3: '0 12px 32px rgba(1,9,26,.16)',
|
|
40
|
+
fontBrand: 'Montserrat',
|
|
41
|
+
inverseSurface: '#01091a',
|
|
42
|
+
inverseFg: '#ffffff',
|
|
43
|
+
inverseLink: '#91a8d1',
|
|
44
|
+
aiAccent: '#21bcff',
|
|
45
|
+
statusFg: '#475569',
|
|
46
|
+
statusPrimary: '#1d4ed8',
|
|
47
|
+
statusSuccess: '#047857',
|
|
48
|
+
statusWarning: '#b45309',
|
|
49
|
+
statusError: '#b91c1c',
|
|
50
|
+
statusInfo: '#0369a1',
|
|
51
|
+
chart1: '#154194',
|
|
52
|
+
chart2: '#91a8d1',
|
|
53
|
+
chart3: '#919191',
|
|
54
|
+
chart4: '#08255a',
|
|
55
|
+
chart5: '#fc4c02',
|
|
56
|
+
chart6: '#bac9e3',
|
|
57
|
+
chartPositive: '#66bb6a',
|
|
58
|
+
chartNegative: '#ef5350',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const ORB_DARK = {
|
|
62
|
+
canvas: '#1d1d1d',
|
|
63
|
+
surface: '#141414',
|
|
64
|
+
surface2: '#272727',
|
|
65
|
+
surface3: '#2e2e2e',
|
|
66
|
+
fg: '#dcdcdc',
|
|
67
|
+
muted: '#adadad',
|
|
68
|
+
border: '#3e3e3e',
|
|
69
|
+
primary: '#2c508c',
|
|
70
|
+
onPrimary: '#ffffff',
|
|
71
|
+
link: '#97abc2',
|
|
72
|
+
p50: '#212834',
|
|
73
|
+
p100: '#232d3e',
|
|
74
|
+
p200: '#c0ccdf',
|
|
75
|
+
p300: '#9baecc',
|
|
76
|
+
p600: '#49699e',
|
|
77
|
+
p700: '#7c94bb',
|
|
78
|
+
accent: '#dc6328',
|
|
79
|
+
err: '#b95220',
|
|
80
|
+
errBg: '#392922',
|
|
81
|
+
warnBg: '#3c2a23',
|
|
82
|
+
hover: 'rgba(255, 255, 255, 0.08)',
|
|
83
|
+
selected: 'rgba(44, 80, 140, 0.45)',
|
|
84
|
+
focusRing: 'rgba(155, 174, 204, 0.45)',
|
|
85
|
+
focusSolid: '#9baecc',
|
|
86
|
+
disabledFg: 'rgba(255, 255, 255, 0.38)',
|
|
87
|
+
disabledBg: 'rgba(255, 255, 255, 0.07)',
|
|
88
|
+
chartGrid: 'rgba(255, 255, 255, 0.12)',
|
|
89
|
+
chartText: 'rgba(255, 255, 255, 0.7)',
|
|
90
|
+
track: 'rgba(255, 255, 255, 0.1)',
|
|
91
|
+
shadow1: '0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)',
|
|
92
|
+
shadow2: '0 4px 16px rgba(0,0,0,.5)',
|
|
93
|
+
shadow3: '0 12px 32px rgba(0,0,0,.55)',
|
|
94
|
+
fontBrand: 'Montserrat',
|
|
95
|
+
inverseSurface: '#01091a',
|
|
96
|
+
inverseFg: '#ffffff',
|
|
97
|
+
inverseLink: '#9baecc',
|
|
98
|
+
aiAccent: '#21bcff',
|
|
99
|
+
statusFg: '#94a3b8',
|
|
100
|
+
statusPrimary: '#60a5fa',
|
|
101
|
+
statusSuccess: '#34d399',
|
|
102
|
+
statusWarning: '#fbbf24',
|
|
103
|
+
statusError: '#f87171',
|
|
104
|
+
statusInfo: '#38bdf8',
|
|
105
|
+
chart1: '#2c508c',
|
|
106
|
+
chart2: '#9baecc',
|
|
107
|
+
chart3: '#adadad',
|
|
108
|
+
chart4: '#7c94bb',
|
|
109
|
+
chart5: '#dc6328',
|
|
110
|
+
chart6: '#c0ccdf',
|
|
111
|
+
chartPositive: '#66bb6a',
|
|
112
|
+
chartNegative: '#ef5350',
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ORB_TOKENS = { light: ORB_LIGHT, dark: ORB_DARK };
|
|
116
|
+
|
|
117
|
+
export default ORB_TOKENS;
|
package/package.json
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orbcafe-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "ORBCAFE UI components — ORBIS brand system, MUI-free",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"style": "./dist/orbis.css",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./dist/orbis.css",
|
|
16
|
+
"./dist/orbis.css": "./dist/orbis.css",
|
|
17
|
+
"./dist/index.css": "./dist/index.css",
|
|
18
|
+
"./fonts/*": "./dist/fonts/*",
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
"./themes/*": "./dist/themes/*"
|
|
21
|
+
},
|
|
8
22
|
"scripts": {
|
|
9
23
|
"check:ai-contracts": "node scripts/check-ai-contracts.js",
|
|
24
|
+
"check:types": "tsc --noEmit && cd examples && ./node_modules/.bin/tsc --noEmit",
|
|
25
|
+
"check:examples": "npm --prefix examples run lint",
|
|
10
26
|
"docs:build": "node scripts/build-docs-pages.js",
|
|
11
27
|
"build": "tsup",
|
|
12
28
|
"prepublishOnly": "npm run build",
|
|
13
29
|
"pack:check": "npm_config_cache=/tmp/.npm-cache npm pack --dry-run",
|
|
14
|
-
"release:check": "npm run check:ai-contracts && npm run docs:build && npm run build && npm run pack:check",
|
|
30
|
+
"release:check": "npm run check:ai-contracts && npm run check:types && npm run check:examples && npm run docs:build && npm run build && npm run pack:check",
|
|
15
31
|
"publish:npm": "npm publish --access public",
|
|
16
|
-
"publish:npm:token": "./scripts/publish-npm.sh"
|
|
32
|
+
"publish:npm:token": "./scripts/publish-npm.sh",
|
|
33
|
+
"build:theme": "node scripts/build-theme.mjs"
|
|
17
34
|
},
|
|
18
35
|
"keywords": [
|
|
19
36
|
"react",
|
|
@@ -22,29 +39,36 @@
|
|
|
22
39
|
],
|
|
23
40
|
"author": "ORBAI Team",
|
|
24
41
|
"license": "MIT",
|
|
25
|
-
"
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/SHENRUIYANG/orbcafe-ui.git"
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": [
|
|
47
|
+
"**/*.css"
|
|
48
|
+
],
|
|
26
49
|
"files": [
|
|
27
|
-
"dist"
|
|
50
|
+
"dist",
|
|
51
|
+
"bin",
|
|
52
|
+
"MIGRATION_V2.md",
|
|
53
|
+
"BRAND_THEMING.md"
|
|
28
54
|
],
|
|
29
55
|
"publishConfig": {
|
|
30
56
|
"access": "public"
|
|
31
57
|
},
|
|
32
58
|
"peerDependencies": {
|
|
33
|
-
"@emotion/react": "^11.14.0",
|
|
34
|
-
"@emotion/styled": "^11.14.1",
|
|
35
|
-
"@mui/icons-material": "^7.3.8",
|
|
36
|
-
"@mui/material": "^7.3.8",
|
|
37
|
-
"@mui/x-date-pickers": "^8.27.2",
|
|
38
59
|
"next": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
39
60
|
"react": "^18.0.0 || ^19.0.0",
|
|
40
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
61
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
62
|
+
"tailwindcss": "^4.0.0"
|
|
41
63
|
},
|
|
42
64
|
"devDependencies": {
|
|
65
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
43
66
|
"@types/node": "^20.0.0",
|
|
44
67
|
"@types/react": "^18.0.0",
|
|
45
68
|
"@types/react-dom": "^18.0.0",
|
|
46
69
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
47
70
|
"next": "^16.2.0",
|
|
71
|
+
"tailwindcss": "^4.0.0",
|
|
48
72
|
"tsup": "^8.0.0",
|
|
49
73
|
"typescript": "^5.0.0"
|
|
50
74
|
},
|
|
@@ -52,15 +76,17 @@
|
|
|
52
76
|
"@dnd-kit/core": "^6.3.1",
|
|
53
77
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
54
78
|
"@dnd-kit/sortable": "^10.0.0",
|
|
79
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
80
|
+
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
81
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
55
82
|
"@radix-ui/react-slot": "^1.0.0",
|
|
83
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
56
84
|
"class-variance-authority": "^0.7.0",
|
|
57
85
|
"clsx": "^2.0.0",
|
|
58
86
|
"dayjs": "^1.11.19",
|
|
59
87
|
"framer-motion": "^12.35.1",
|
|
60
88
|
"i18next": "^25.8.18",
|
|
61
|
-
"lucide-react": "^0.475.0",
|
|
62
89
|
"mermaid": "^10.9.0",
|
|
63
|
-
"next-themes": "^0.3.0",
|
|
64
90
|
"ogl": "^1.0.11",
|
|
65
91
|
"react-i18next": "^16.5.8",
|
|
66
92
|
"react-markdown": "^9.0.0",
|
|
@@ -72,6 +98,11 @@
|
|
|
72
98
|
"tailwind-merge": "^2.0.0"
|
|
73
99
|
},
|
|
74
100
|
"overrides": {
|
|
101
|
+
"esbuild": "^0.28.1",
|
|
102
|
+
"postcss": "^8.5.10",
|
|
75
103
|
"rollup": "^4.59.0"
|
|
104
|
+
},
|
|
105
|
+
"bin": {
|
|
106
|
+
"orbcafe-theme": "./bin/orbcafe-theme.mjs"
|
|
76
107
|
}
|
|
77
108
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as COrbCanvas}from'./chunk-74Z76O3S.mjs';
|
package/dist/chunk-74Z76O3S.mjs
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import {Renderer,Triangle,Program,Vec3,Mesh}from'ogl';import {useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var U=Object.defineProperty;var B=(t,o,n)=>o in t?U(t,o,{enumerable:true,configurable:true,writable:true,value:n}):t[o]=n;var X=(t,o,n)=>B(t,typeof o!="symbol"?o+"":o,n);function J({hue:t=0,hoverIntensity:o=.2,rotateOnHover:n=true,forceHoverState:s=false,backgroundColor:a="transparent"}){let c=useRef(null),g=`
|
|
2
|
-
precision highp float;
|
|
3
|
-
attribute vec2 position;
|
|
4
|
-
attribute vec2 uv;
|
|
5
|
-
varying vec2 vUv;
|
|
6
|
-
void main() {
|
|
7
|
-
vUv = uv;
|
|
8
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
9
|
-
}
|
|
10
|
-
`,h=`
|
|
11
|
-
precision highp float;
|
|
12
|
-
|
|
13
|
-
uniform float iTime;
|
|
14
|
-
uniform vec3 iResolution;
|
|
15
|
-
uniform float hue;
|
|
16
|
-
uniform float hover;
|
|
17
|
-
uniform float rot;
|
|
18
|
-
uniform float hoverIntensity;
|
|
19
|
-
uniform vec3 backgroundColor;
|
|
20
|
-
varying vec2 vUv;
|
|
21
|
-
|
|
22
|
-
vec3 rgb2yiq(vec3 c) {
|
|
23
|
-
float y = dot(c, vec3(0.299, 0.587, 0.114));
|
|
24
|
-
float i = dot(c, vec3(0.596, -0.274, -0.322));
|
|
25
|
-
float q = dot(c, vec3(0.211, -0.523, 0.312));
|
|
26
|
-
return vec3(y, i, q);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
vec3 yiq2rgb(vec3 c) {
|
|
30
|
-
float r = c.x + 0.956 * c.y + 0.621 * c.z;
|
|
31
|
-
float g = c.x - 0.272 * c.y - 0.647 * c.z;
|
|
32
|
-
float b = c.x - 1.106 * c.y + 1.703 * c.z;
|
|
33
|
-
return vec3(r, g, b);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
vec3 adjustHue(vec3 color, float hueDeg) {
|
|
37
|
-
float hueRad = hueDeg * 3.14159265 / 180.0;
|
|
38
|
-
vec3 yiq = rgb2yiq(color);
|
|
39
|
-
float cosA = cos(hueRad);
|
|
40
|
-
float sinA = sin(hueRad);
|
|
41
|
-
float i = yiq.y * cosA - yiq.z * sinA;
|
|
42
|
-
float q = yiq.y * sinA + yiq.z * cosA;
|
|
43
|
-
yiq.y = i;
|
|
44
|
-
yiq.z = q;
|
|
45
|
-
return yiq2rgb(yiq);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
vec3 hash33(vec3 p3) {
|
|
49
|
-
p3 = fract(p3 * vec3(0.1031, 0.11369, 0.13787));
|
|
50
|
-
p3 += dot(p3, p3.yxz + 19.19);
|
|
51
|
-
return -1.0 + 2.0 * fract(vec3(
|
|
52
|
-
p3.x + p3.y,
|
|
53
|
-
p3.x + p3.z,
|
|
54
|
-
p3.y + p3.z
|
|
55
|
-
) * p3.zyx);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
float snoise3(vec3 p) {
|
|
59
|
-
const float K1 = 0.333333333;
|
|
60
|
-
const float K2 = 0.166666667;
|
|
61
|
-
vec3 i = floor(p + (p.x + p.y + p.z) * K1);
|
|
62
|
-
vec3 d0 = p - (i - (i.x + i.y + i.z) * K2);
|
|
63
|
-
vec3 e = step(vec3(0.0), d0 - d0.yzx);
|
|
64
|
-
vec3 i1 = e * (1.0 - e.zxy);
|
|
65
|
-
vec3 i2 = 1.0 - e.zxy * (1.0 - e);
|
|
66
|
-
vec3 d1 = d0 - (i1 - K2);
|
|
67
|
-
vec3 d2 = d0 - (i2 - K1);
|
|
68
|
-
vec3 d3 = d0 - 0.5;
|
|
69
|
-
vec4 h = max(0.6 - vec4(
|
|
70
|
-
dot(d0, d0),
|
|
71
|
-
dot(d1, d1),
|
|
72
|
-
dot(d2, d2),
|
|
73
|
-
dot(d3, d3)
|
|
74
|
-
), 0.0);
|
|
75
|
-
vec4 n = h * h * h * h * vec4(
|
|
76
|
-
dot(d0, hash33(i)),
|
|
77
|
-
dot(d1, hash33(i + i1)),
|
|
78
|
-
dot(d2, hash33(i + i2)),
|
|
79
|
-
dot(d3, hash33(i + 1.0))
|
|
80
|
-
);
|
|
81
|
-
return dot(vec4(31.316), n);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
vec4 extractAlpha(vec3 colorIn) {
|
|
85
|
-
float a = max(max(colorIn.r, colorIn.g), colorIn.b);
|
|
86
|
-
return vec4(colorIn.rgb / (a + 1e-5), a);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const vec3 baseColor1 = vec3(0.611765, 0.262745, 0.996078);
|
|
90
|
-
const vec3 baseColor2 = vec3(0.298039, 0.760784, 0.913725);
|
|
91
|
-
const vec3 baseColor3 = vec3(0.062745, 0.078431, 0.600000);
|
|
92
|
-
// Make it solid by reducing inner radius to near zero
|
|
93
|
-
const float innerRadius = 0.0;
|
|
94
|
-
const float noiseScale = 1.0;
|
|
95
|
-
|
|
96
|
-
float light1(float intensity, float attenuation, float dist) {
|
|
97
|
-
return intensity / (1.0 + dist * attenuation);
|
|
98
|
-
}
|
|
99
|
-
float light2(float intensity, float attenuation, float dist) {
|
|
100
|
-
return intensity / (1.0 + dist * dist * attenuation);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
vec4 draw(vec2 uv) {
|
|
104
|
-
vec3 color1 = adjustHue(baseColor1, hue);
|
|
105
|
-
vec3 color2 = adjustHue(baseColor2, hue);
|
|
106
|
-
vec3 color3 = adjustHue(baseColor3, hue);
|
|
107
|
-
|
|
108
|
-
float ang = atan(uv.y, uv.x);
|
|
109
|
-
float len = length(uv);
|
|
110
|
-
float invLen = len > 0.0 ? 1.0 / len : 0.0;
|
|
111
|
-
|
|
112
|
-
float bgLuminance = dot(backgroundColor, vec3(0.299, 0.587, 0.114));
|
|
113
|
-
|
|
114
|
-
float n0 = snoise3(vec3(uv * noiseScale, iTime * 0.5)) * 0.5 + 0.5;
|
|
115
|
-
|
|
116
|
-
// Increased outer radius factor from 1.0 to 1.8 to make the orb larger
|
|
117
|
-
float r0 = mix(mix(innerRadius, 1.2, 0.4), mix(innerRadius, 1.8, 0.6), n0);
|
|
118
|
-
|
|
119
|
-
float d0 = distance(uv, (r0 * invLen) * uv);
|
|
120
|
-
float v0 = light1(1.0, 10.0, d0);
|
|
121
|
-
v0 *= smoothstep(r0 * 1.05, r0, len);
|
|
122
|
-
|
|
123
|
-
// Remove inner fade to keep the center solid
|
|
124
|
-
float innerFade = 1.0;
|
|
125
|
-
|
|
126
|
-
v0 *= mix(innerFade, 1.0, bgLuminance * 0.7);
|
|
127
|
-
float cl = cos(ang + iTime * 2.0) * 0.5 + 0.5;
|
|
128
|
-
|
|
129
|
-
float a = iTime * -1.0;
|
|
130
|
-
vec2 pos = vec2(cos(a), sin(a)) * r0;
|
|
131
|
-
float d = distance(uv, pos);
|
|
132
|
-
float v1 = light2(1.5, 5.0, d);
|
|
133
|
-
v1 *= light1(1.0, 50.0, d0);
|
|
134
|
-
|
|
135
|
-
float v2 = smoothstep(1.0, mix(innerRadius, 1.0, n0 * 0.5), len);
|
|
136
|
-
|
|
137
|
-
// Keep center solid instead of fading out
|
|
138
|
-
float v3 = 1.0;
|
|
139
|
-
|
|
140
|
-
vec3 colBase = mix(color1, color2, cl);
|
|
141
|
-
float fadeAmount = mix(1.0, 0.1, bgLuminance);
|
|
142
|
-
|
|
143
|
-
vec3 darkCol = mix(color3, colBase, v0);
|
|
144
|
-
darkCol = (darkCol + v1) * v2 * v3;
|
|
145
|
-
darkCol = clamp(darkCol, 0.0, 1.0);
|
|
146
|
-
|
|
147
|
-
vec3 lightCol = (colBase + v1) * mix(1.0, v2 * v3, fadeAmount);
|
|
148
|
-
lightCol = mix(backgroundColor, lightCol, v0);
|
|
149
|
-
lightCol = clamp(lightCol, 0.0, 1.0);
|
|
150
|
-
|
|
151
|
-
vec3 finalCol = mix(darkCol, lightCol, bgLuminance);
|
|
152
|
-
|
|
153
|
-
return extractAlpha(finalCol);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
vec4 mainImage(vec2 fragCoord) {
|
|
157
|
-
vec2 center = iResolution.xy * 0.5;
|
|
158
|
-
// Use max dimension to ensure the orb covers the area (creating an ambient effect)
|
|
159
|
-
// rather than fitting inside (which would be tiny in a header)
|
|
160
|
-
float size = max(iResolution.x, iResolution.y);
|
|
161
|
-
vec2 uv = (fragCoord - center) / size * 2.0;
|
|
162
|
-
|
|
163
|
-
// Add randomness/waviness to UV coordinates
|
|
164
|
-
uv.x += sin(uv.y * 3.0 + iTime * 0.5) * 0.1;
|
|
165
|
-
uv.y += cos(uv.x * 3.0 + iTime * 0.5) * 0.1;
|
|
166
|
-
|
|
167
|
-
float angle = rot;
|
|
168
|
-
float s = sin(angle);
|
|
169
|
-
float c = cos(angle);
|
|
170
|
-
uv = vec2(c * uv.x - s * uv.y, s * uv.x + c * uv.y);
|
|
171
|
-
|
|
172
|
-
uv.x += hover * hoverIntensity * 0.1 * sin(uv.y * 10.0 + iTime);
|
|
173
|
-
uv.y += hover * hoverIntensity * 0.1 * sin(uv.x * 10.0 + iTime);
|
|
174
|
-
|
|
175
|
-
return draw(uv);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
void main() {
|
|
179
|
-
vec2 fragCoord = vUv * iResolution.xy;
|
|
180
|
-
vec4 col = mainImage(fragCoord);
|
|
181
|
-
gl_FragColor = vec4(col.rgb * col.a, col.a);
|
|
182
|
-
}
|
|
183
|
-
`;return useEffect(()=>{let i=c.current;if(!i)return;let l=new Renderer({alpha:true,premultipliedAlpha:false}),e=l.gl;e.clearColor(0,0,0,0),i.appendChild(e.canvas);let r=new Triangle(e),v=new Program(e,{vertex:g,fragment:h,uniforms:{iTime:{value:0},iResolution:{value:new Vec3(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:o},backgroundColor:{value:k(a)}}}),E=new Mesh(e,{geometry:r,program:v});function y(){if(!i)return;let u=window.devicePixelRatio||1,d=i.clientWidth,f=i.clientHeight;l.setSize(d*u,f*u),e.canvas.style.width=d+"px",e.canvas.style.height=f+"px",v.uniforms.iResolution.value.set(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height);}window.addEventListener("resize",y),y();let p=0,x=0,C=0,M=.3,w=u=>{let d=i.getBoundingClientRect(),f=u.clientX-d.left,H=u.clientY-d.top,R=d.width,q=d.height,A=Math.min(R,q),K=R/2,F=q/2,L=(f-K)/A*2,T=(H-F)/A*2;Math.sqrt(L*L+T*T)<.8?p=1:p=0;},z=()=>{p=0;};i.addEventListener("mousemove",w),i.addEventListener("mouseleave",z);let b,I=u=>{b=requestAnimationFrame(I);let d=(u-x)*.001;x=u,v.uniforms.iTime.value=u*.001,v.uniforms.hue.value=t,v.uniforms.hoverIntensity.value=o,v.uniforms.backgroundColor.value=k(a);let f=s?1:p;v.uniforms.hover.value+=(f-v.uniforms.hover.value)*.1,n&&f>.5&&(C+=d*M),v.uniforms.rot.value=C,l.render({scene:E});};return b=requestAnimationFrame(I),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",y),i.removeEventListener("mousemove",w),i.removeEventListener("mouseleave",z),e.canvas.parentNode===i&&i.removeChild(e.canvas),e.getExtension("WEBGL_lose_context")?.loseContext();}},[t,o,n,s,a]),jsx("div",{ref:c,className:"w-full h-full"})}function V(t,o,n){let s,a,c;if(o===0)s=a=c=n;else {let g=(l,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?l+(e-l)*6*r:r<.5?e:r<.6666666666666666?l+(e-l)*(.6666666666666666-r)*6:l),h=n<.5?n*(1+o):n+o-n*o,i=2*n-h;s=g(i,h,t+1/3),a=g(i,h,t),c=g(i,h,t-1/3);}return new Vec3(s,a,c)}function k(t){if(t==="transparent")return new Vec3(0,0,0);if(t.startsWith("#")){let s=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,c=parseInt(t.slice(5,7),16)/255;return new Vec3(s,a,c)}let o=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return new Vec3(parseInt(o[1])/255,parseInt(o[2])/255,parseInt(o[3])/255);let n=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(n){let s=parseInt(n[1])/360,a=parseInt(n[2])/100,c=parseInt(n[3])/100;return V(s,a,c)}return new Vec3(0,0,0)}export{X as a,J as b};
|