@caqophony/ui 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/charts.d.mts +117 -0
- package/dist/charts.js +367 -0
- package/dist/chunk-K3SEIIA3.js +72 -0
- package/dist/index.d.mts +1716 -0
- package/dist/index.js +4605 -0
- package/dist/markdown.d.mts +27 -0
- package/dist/markdown.js +8 -0
- package/package.json +74 -4
- package/styles.css +207 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MarkdownRenderer Component
|
|
6
|
+
*
|
|
7
|
+
* Centralized markdown rendering with Gossamer design system tokens.
|
|
8
|
+
* Uses @tailwindcss/typography prose classes for base styling,
|
|
9
|
+
* with semantic token overrides for dark mode compatibility.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* import { MarkdownRenderer } from '@caqophony/ui';
|
|
13
|
+
* // or: import { MarkdownRenderer } from '@caqophony/ui/markdown';
|
|
14
|
+
* <MarkdownRenderer size="sm">{markdownString}</MarkdownRenderer>
|
|
15
|
+
*
|
|
16
|
+
* Authored by Caqophony
|
|
17
|
+
*/
|
|
18
|
+
interface MarkdownRendererProps {
|
|
19
|
+
children: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Typography size — 'sm' for compact (chat, sidebars), 'base' for standard */
|
|
22
|
+
size?: 'sm' | 'base';
|
|
23
|
+
}
|
|
24
|
+
declare function NonMemoizedMarkdownRenderer({ children, className, size, }: MarkdownRendererProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare const MarkdownRenderer: React.MemoExoticComponent<typeof NonMemoizedMarkdownRenderer>;
|
|
26
|
+
|
|
27
|
+
export { MarkdownRenderer };
|
package/dist/markdown.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caqophony/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generic, optional React UI reuse library (Gossamer tokens). Centrally maintained by Caqophony.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Caqophony",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/caqophony/caqophony.git",
|
|
10
|
+
"directory": "packages/ui"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"react",
|
|
14
|
+
"ui",
|
|
15
|
+
"components",
|
|
16
|
+
"tailwind",
|
|
17
|
+
"design-system"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"*.css",
|
|
22
|
+
"./dist/charts.js"
|
|
23
|
+
],
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.mts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.mts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./charts": {
|
|
32
|
+
"types": "./dist/charts.d.mts",
|
|
33
|
+
"import": "./dist/charts.js"
|
|
34
|
+
},
|
|
35
|
+
"./markdown": {
|
|
36
|
+
"types": "./dist/markdown.d.mts",
|
|
37
|
+
"import": "./dist/markdown.js"
|
|
38
|
+
},
|
|
39
|
+
"./styles.css": "./styles.css",
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"styles.css",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
50
|
+
"@radix-ui/react-switch": "^1.1.1",
|
|
51
|
+
"@radix-ui/react-tooltip": "^1.1.3",
|
|
52
|
+
"class-variance-authority": "^0.7.0",
|
|
53
|
+
"clsx": "^2.1.1",
|
|
54
|
+
"lucide-react": "^0.446.0",
|
|
55
|
+
"react-markdown": "^9.0.1",
|
|
56
|
+
"remark-gfm": "^4.0.0",
|
|
57
|
+
"tailwind-merge": "^2.5.2"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"chart.js": "^4.5.1",
|
|
61
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
62
|
+
"react-chartjs-2": "^5.3.1",
|
|
63
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"chart.js": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"react-chartjs-2": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"publishConfig": {
|
|
74
|
+
"access": "public"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/* GENERATED by scripts/generate-ui-library-styles.ts from the Gossamer tokens. Do not edit. */
|
|
2
|
+
@source "./dist";
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--background: 0 0% 100%;
|
|
6
|
+
--foreground: 240 10% 4%;
|
|
7
|
+
--card: 0 0% 100%;
|
|
8
|
+
--card-foreground: 240 10% 4%;
|
|
9
|
+
--popover: 0 0% 100%;
|
|
10
|
+
--popover-foreground: 240 10% 4%;
|
|
11
|
+
--border: 240 6% 90%;
|
|
12
|
+
--input: 240 6% 90%;
|
|
13
|
+
--ring: 240 6% 10%;
|
|
14
|
+
--muted: 240 5% 96%;
|
|
15
|
+
--muted-foreground: 240 4% 46%;
|
|
16
|
+
--secondary: 240 5% 96%;
|
|
17
|
+
--secondary-foreground: 240 6% 10%;
|
|
18
|
+
--accent: 240 5% 96%;
|
|
19
|
+
--accent-foreground: 240 6% 10%;
|
|
20
|
+
--destructive: 0 84% 60%;
|
|
21
|
+
--destructive-foreground: 0 0% 100%;
|
|
22
|
+
--primary: 161 66% 36%;
|
|
23
|
+
--primary-foreground: 0 0% 100%;
|
|
24
|
+
--intent-success: 142 71% 45%;
|
|
25
|
+
--intent-success-fg: 142 72% 25%;
|
|
26
|
+
--intent-success-border: 142 71% 35%;
|
|
27
|
+
--intent-warning: 38 92% 50%;
|
|
28
|
+
--intent-warning-fg: 38 92% 25%;
|
|
29
|
+
--intent-warning-border: 38 92% 40%;
|
|
30
|
+
--intent-error: 0 84% 60%;
|
|
31
|
+
--intent-error-fg: 0 84% 25%;
|
|
32
|
+
--intent-error-border: 0 84% 50%;
|
|
33
|
+
--intent-info: 217 91% 60%;
|
|
34
|
+
--intent-info-fg: 217 91% 25%;
|
|
35
|
+
--intent-info-border: 217 91% 50%;
|
|
36
|
+
--status-action: 262 83% 58%;
|
|
37
|
+
--status-action-fg: 262 83% 25%;
|
|
38
|
+
--status-waiting: 38 92% 50%;
|
|
39
|
+
--status-waiting-fg: 38 92% 25%;
|
|
40
|
+
--status-critical: 0 84% 58%;
|
|
41
|
+
--status-critical-fg: 0 84% 25%;
|
|
42
|
+
--status-info: 217 91% 60%;
|
|
43
|
+
--status-info-fg: 217 91% 25%;
|
|
44
|
+
--radius: 0.5rem;
|
|
45
|
+
--opacity-hover: 0.9;
|
|
46
|
+
--opacity-active: 0.8;
|
|
47
|
+
--opacity-disabled: 0.5;
|
|
48
|
+
--opacity-subtle: 0.1;
|
|
49
|
+
--opacity-overlay: 0.6;
|
|
50
|
+
--z-sticky: 40;
|
|
51
|
+
--z-dropdown: 50;
|
|
52
|
+
--z-overlay: 60;
|
|
53
|
+
--z-modal: 70;
|
|
54
|
+
--z-popover: 80;
|
|
55
|
+
--z-toast: 90;
|
|
56
|
+
--z-tooltip: 100;
|
|
57
|
+
--duration-fast: 150ms;
|
|
58
|
+
--duration-default: 200ms;
|
|
59
|
+
--duration-slow: 300ms;
|
|
60
|
+
--duration-drawer: 500ms;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dark {
|
|
64
|
+
--background: 240 10% 4%;
|
|
65
|
+
--foreground: 0 0% 98%;
|
|
66
|
+
--card: 240 6% 10%;
|
|
67
|
+
--card-foreground: 0 0% 98%;
|
|
68
|
+
--popover: 240 6% 10%;
|
|
69
|
+
--popover-foreground: 0 0% 98%;
|
|
70
|
+
--border: 240 4% 16%;
|
|
71
|
+
--input: 240 4% 16%;
|
|
72
|
+
--ring: 240 5% 65%;
|
|
73
|
+
--muted: 240 4% 16%;
|
|
74
|
+
--muted-foreground: 240 5% 65%;
|
|
75
|
+
--secondary: 240 4% 16%;
|
|
76
|
+
--secondary-foreground: 0 0% 98%;
|
|
77
|
+
--accent: 240 4% 16%;
|
|
78
|
+
--accent-foreground: 0 0% 98%;
|
|
79
|
+
--destructive: 0 63% 31%;
|
|
80
|
+
--destructive-foreground: 0 0% 100%;
|
|
81
|
+
--primary: 161 66% 36%;
|
|
82
|
+
--primary-foreground: 0 0% 100%;
|
|
83
|
+
--intent-success: 142 76% 36%;
|
|
84
|
+
--intent-success-fg: 142 69% 58%;
|
|
85
|
+
--intent-success-border: 142 71% 45%;
|
|
86
|
+
--intent-warning: 32 95% 44%;
|
|
87
|
+
--intent-warning-fg: 43 96% 56%;
|
|
88
|
+
--intent-warning-border: 38 92% 50%;
|
|
89
|
+
--intent-error: 0 72% 51%;
|
|
90
|
+
--intent-error-fg: 0 91% 71%;
|
|
91
|
+
--intent-error-border: 0 84% 60%;
|
|
92
|
+
--intent-info: 199 89% 48%;
|
|
93
|
+
--intent-info-fg: 198 93% 60%;
|
|
94
|
+
--intent-info-border: 199 89% 48%;
|
|
95
|
+
--status-action: 262 83% 58%;
|
|
96
|
+
--status-action-fg: 255 92% 76%;
|
|
97
|
+
--status-waiting: 32 95% 44%;
|
|
98
|
+
--status-waiting-fg: 43 96% 56%;
|
|
99
|
+
--status-critical: 0 72% 51%;
|
|
100
|
+
--status-critical-fg: 0 91% 71%;
|
|
101
|
+
--status-info: 199 89% 48%;
|
|
102
|
+
--status-info-fg: 198 93% 60%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@theme inline {
|
|
106
|
+
--color-background: hsl(var(--background));
|
|
107
|
+
--color-foreground: hsl(var(--foreground));
|
|
108
|
+
--color-card: hsl(var(--card));
|
|
109
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
110
|
+
--color-popover: hsl(var(--popover));
|
|
111
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
112
|
+
--color-border: hsl(var(--border));
|
|
113
|
+
--color-input: hsl(var(--input));
|
|
114
|
+
--color-ring: hsl(var(--ring));
|
|
115
|
+
--color-muted: hsl(var(--muted));
|
|
116
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
117
|
+
--color-secondary: hsl(var(--secondary));
|
|
118
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
119
|
+
--color-accent: hsl(var(--accent));
|
|
120
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
121
|
+
--color-destructive: hsl(var(--destructive));
|
|
122
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
123
|
+
--color-primary: hsl(var(--primary));
|
|
124
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
125
|
+
--color-intent-success: hsl(var(--intent-success));
|
|
126
|
+
--color-intent-success-fg: hsl(var(--intent-success-fg));
|
|
127
|
+
--color-intent-success-foreground: hsl(var(--intent-success-fg));
|
|
128
|
+
--color-intent-success-border: hsl(var(--intent-success-border));
|
|
129
|
+
--color-intent-warning: hsl(var(--intent-warning));
|
|
130
|
+
--color-intent-warning-fg: hsl(var(--intent-warning-fg));
|
|
131
|
+
--color-intent-warning-foreground: hsl(var(--intent-warning-fg));
|
|
132
|
+
--color-intent-warning-border: hsl(var(--intent-warning-border));
|
|
133
|
+
--color-intent-error: hsl(var(--intent-error));
|
|
134
|
+
--color-intent-error-fg: hsl(var(--intent-error-fg));
|
|
135
|
+
--color-intent-error-foreground: hsl(var(--intent-error-fg));
|
|
136
|
+
--color-intent-error-border: hsl(var(--intent-error-border));
|
|
137
|
+
--color-intent-info: hsl(var(--intent-info));
|
|
138
|
+
--color-intent-info-fg: hsl(var(--intent-info-fg));
|
|
139
|
+
--color-intent-info-foreground: hsl(var(--intent-info-fg));
|
|
140
|
+
--color-intent-info-border: hsl(var(--intent-info-border));
|
|
141
|
+
--color-status-action: hsl(var(--status-action));
|
|
142
|
+
--color-status-action-fg: hsl(var(--status-action-fg));
|
|
143
|
+
--color-status-action-foreground: hsl(var(--status-action-fg));
|
|
144
|
+
--color-status-waiting: hsl(var(--status-waiting));
|
|
145
|
+
--color-status-waiting-fg: hsl(var(--status-waiting-fg));
|
|
146
|
+
--color-status-waiting-foreground: hsl(var(--status-waiting-fg));
|
|
147
|
+
--color-status-critical: hsl(var(--status-critical));
|
|
148
|
+
--color-status-critical-fg: hsl(var(--status-critical-fg));
|
|
149
|
+
--color-status-critical-foreground: hsl(var(--status-critical-fg));
|
|
150
|
+
--color-status-info: hsl(var(--status-info));
|
|
151
|
+
--color-status-info-fg: hsl(var(--status-info-fg));
|
|
152
|
+
--color-status-info-foreground: hsl(var(--status-info-fg));
|
|
153
|
+
--radius-lg: var(--radius);
|
|
154
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
155
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@utility z-sticky {
|
|
159
|
+
z-index: var(--z-sticky);
|
|
160
|
+
}
|
|
161
|
+
@utility z-dropdown {
|
|
162
|
+
z-index: var(--z-dropdown);
|
|
163
|
+
}
|
|
164
|
+
@utility z-overlay {
|
|
165
|
+
z-index: var(--z-overlay);
|
|
166
|
+
}
|
|
167
|
+
@utility z-modal {
|
|
168
|
+
z-index: var(--z-modal);
|
|
169
|
+
}
|
|
170
|
+
@utility z-popover {
|
|
171
|
+
z-index: var(--z-popover);
|
|
172
|
+
}
|
|
173
|
+
@utility z-toast {
|
|
174
|
+
z-index: var(--z-toast);
|
|
175
|
+
}
|
|
176
|
+
@utility z-tooltip {
|
|
177
|
+
z-index: var(--z-tooltip);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@utility opacity-hover {
|
|
181
|
+
opacity: var(--opacity-hover);
|
|
182
|
+
}
|
|
183
|
+
@utility opacity-active {
|
|
184
|
+
opacity: var(--opacity-active);
|
|
185
|
+
}
|
|
186
|
+
@utility opacity-disabled {
|
|
187
|
+
opacity: var(--opacity-disabled);
|
|
188
|
+
}
|
|
189
|
+
@utility opacity-subtle {
|
|
190
|
+
opacity: var(--opacity-subtle);
|
|
191
|
+
}
|
|
192
|
+
@utility opacity-overlay {
|
|
193
|
+
opacity: var(--opacity-overlay);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@utility duration-fast {
|
|
197
|
+
transition-duration: var(--duration-fast);
|
|
198
|
+
}
|
|
199
|
+
@utility duration-default {
|
|
200
|
+
transition-duration: var(--duration-default);
|
|
201
|
+
}
|
|
202
|
+
@utility duration-slow {
|
|
203
|
+
transition-duration: var(--duration-slow);
|
|
204
|
+
}
|
|
205
|
+
@utility duration-drawer {
|
|
206
|
+
transition-duration: var(--duration-drawer);
|
|
207
|
+
}
|