@caqophony/ui 0.0.0-stage → 0.2.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.
@@ -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 };
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ MarkdownRenderer
5
+ } from "./chunk-4YA6BZDJ.js";
6
+ export {
7
+ MarkdownRenderer
8
+ };
package/package.json CHANGED
@@ -1,6 +1,76 @@
1
1
  {
2
2
  "name": "@caqophony/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.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,256 @@
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% 41%;
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
+ --primary-text: 160 66% 27%;
45
+ --primary-solid: 161 66% 31%;
46
+ --intent-success-solid: 142 71% 31%;
47
+ --intent-success-solid-fg: 0 0% 100%;
48
+ --intent-warning-solid: 38 92% 33%;
49
+ --intent-warning-solid-fg: 0 0% 100%;
50
+ --intent-error-solid: 0 84% 50%;
51
+ --intent-error-solid-fg: 0 0% 100%;
52
+ --intent-info-solid: 217 91% 53%;
53
+ --intent-info-solid-fg: 0 0% 100%;
54
+ --radius: 0.5rem;
55
+ --opacity-hover: 0.9;
56
+ --opacity-active: 0.8;
57
+ --opacity-disabled: 0.5;
58
+ --opacity-subtle: 0.1;
59
+ --opacity-overlay: 0.6;
60
+ --z-sticky: 40;
61
+ --z-dropdown: 50;
62
+ --z-overlay: 60;
63
+ --z-modal: 70;
64
+ --z-popover: 80;
65
+ --z-toast: 90;
66
+ --z-tooltip: 100;
67
+ --duration-fast: 150ms;
68
+ --duration-default: 200ms;
69
+ --duration-slow: 300ms;
70
+ --duration-drawer: 500ms;
71
+ }
72
+
73
+ @media (prefers-color-scheme: dark) {
74
+ :root {
75
+ --background: 240 10% 4%;
76
+ --foreground: 0 0% 98%;
77
+ --card: 240 6% 10%;
78
+ --card-foreground: 0 0% 98%;
79
+ --popover: 240 6% 10%;
80
+ --popover-foreground: 0 0% 98%;
81
+ --border: 240 4% 16%;
82
+ --input: 240 4% 16%;
83
+ --ring: 240 5% 65%;
84
+ --muted: 240 4% 16%;
85
+ --muted-foreground: 240 5% 65%;
86
+ --secondary: 240 4% 16%;
87
+ --secondary-foreground: 0 0% 98%;
88
+ --accent: 240 4% 16%;
89
+ --accent-foreground: 0 0% 98%;
90
+ --destructive: 0 63% 31%;
91
+ --destructive-foreground: 0 0% 100%;
92
+ --primary: 161 66% 36%;
93
+ --primary-foreground: 0 0% 100%;
94
+ --intent-success: 142 76% 36%;
95
+ --intent-success-fg: 142 69% 58%;
96
+ --intent-success-border: 142 71% 45%;
97
+ --intent-warning: 32 95% 44%;
98
+ --intent-warning-fg: 43 96% 56%;
99
+ --intent-warning-border: 38 92% 50%;
100
+ --intent-error: 0 72% 51%;
101
+ --intent-error-fg: 0 91% 71%;
102
+ --intent-error-border: 0 84% 60%;
103
+ --intent-info: 199 89% 48%;
104
+ --intent-info-fg: 198 93% 60%;
105
+ --intent-info-border: 199 89% 48%;
106
+ --status-action: 262 83% 58%;
107
+ --status-action-fg: 255 92% 76%;
108
+ --status-waiting: 32 95% 44%;
109
+ --status-waiting-fg: 43 96% 56%;
110
+ --status-critical: 0 72% 51%;
111
+ --status-critical-fg: 0 91% 71%;
112
+ --status-info: 199 89% 48%;
113
+ --status-info-fg: 198 93% 60%;
114
+ --primary-text: 161 66% 38%;
115
+ --primary-solid: 161 66% 31%;
116
+ --intent-success-solid: 142 77% 30%;
117
+ --intent-success-solid-fg: 0 0% 100%;
118
+ --intent-warning-solid: 32 95% 36%;
119
+ --intent-warning-solid-fg: 0 0% 100%;
120
+ --intent-error-solid: 0 72% 51%;
121
+ --intent-error-solid-fg: 0 0% 100%;
122
+ --intent-info-solid: 199 88% 37%;
123
+ --intent-info-solid-fg: 0 0% 100%;
124
+ }
125
+ }
126
+
127
+ @theme inline {
128
+ --color-background: hsl(var(--background));
129
+ --color-foreground: hsl(var(--foreground));
130
+ --color-card: hsl(var(--card));
131
+ --color-card-foreground: hsl(var(--card-foreground));
132
+ --color-popover: hsl(var(--popover));
133
+ --color-popover-foreground: hsl(var(--popover-foreground));
134
+ --color-border: hsl(var(--border));
135
+ --color-input: hsl(var(--input));
136
+ --color-ring: hsl(var(--ring));
137
+ --color-muted: hsl(var(--muted));
138
+ --color-muted-foreground: hsl(var(--muted-foreground));
139
+ --color-secondary: hsl(var(--secondary));
140
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
141
+ --color-accent: hsl(var(--accent));
142
+ --color-accent-foreground: hsl(var(--accent-foreground));
143
+ --color-destructive: hsl(var(--destructive));
144
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
145
+ --color-primary: hsl(var(--primary));
146
+ --color-primary-foreground: hsl(var(--primary-foreground));
147
+ --color-intent-success: hsl(var(--intent-success));
148
+ --color-intent-success-fg: hsl(var(--intent-success-fg));
149
+ --color-intent-success-foreground: hsl(var(--intent-success-fg));
150
+ --color-intent-success-border: hsl(var(--intent-success-border));
151
+ --color-intent-warning: hsl(var(--intent-warning));
152
+ --color-intent-warning-fg: hsl(var(--intent-warning-fg));
153
+ --color-intent-warning-foreground: hsl(var(--intent-warning-fg));
154
+ --color-intent-warning-border: hsl(var(--intent-warning-border));
155
+ --color-intent-error: hsl(var(--intent-error));
156
+ --color-intent-error-fg: hsl(var(--intent-error-fg));
157
+ --color-intent-error-foreground: hsl(var(--intent-error-fg));
158
+ --color-intent-error-border: hsl(var(--intent-error-border));
159
+ --color-intent-info: hsl(var(--intent-info));
160
+ --color-intent-info-fg: hsl(var(--intent-info-fg));
161
+ --color-intent-info-foreground: hsl(var(--intent-info-fg));
162
+ --color-intent-info-border: hsl(var(--intent-info-border));
163
+ --color-status-action: hsl(var(--status-action));
164
+ --color-status-action-fg: hsl(var(--status-action-fg));
165
+ --color-status-action-foreground: hsl(var(--status-action-fg));
166
+ --color-status-waiting: hsl(var(--status-waiting));
167
+ --color-status-waiting-fg: hsl(var(--status-waiting-fg));
168
+ --color-status-waiting-foreground: hsl(var(--status-waiting-fg));
169
+ --color-status-critical: hsl(var(--status-critical));
170
+ --color-status-critical-fg: hsl(var(--status-critical-fg));
171
+ --color-status-critical-foreground: hsl(var(--status-critical-fg));
172
+ --color-status-info: hsl(var(--status-info));
173
+ --color-status-info-fg: hsl(var(--status-info-fg));
174
+ --color-status-info-foreground: hsl(var(--status-info-fg));
175
+ --color-primary-text: hsl(var(--primary-text));
176
+ --color-primary-solid: hsl(var(--primary-solid));
177
+ --color-intent-success-solid: hsl(var(--intent-success-solid));
178
+ --color-intent-success-solid-fg: hsl(var(--intent-success-solid-fg));
179
+ --color-intent-success-solid-foreground: hsl(var(--intent-success-solid-fg));
180
+ --color-intent-warning-solid: hsl(var(--intent-warning-solid));
181
+ --color-intent-warning-solid-fg: hsl(var(--intent-warning-solid-fg));
182
+ --color-intent-warning-solid-foreground: hsl(var(--intent-warning-solid-fg));
183
+ --color-intent-error-solid: hsl(var(--intent-error-solid));
184
+ --color-intent-error-solid-fg: hsl(var(--intent-error-solid-fg));
185
+ --color-intent-error-solid-foreground: hsl(var(--intent-error-solid-fg));
186
+ --color-intent-info-solid: hsl(var(--intent-info-solid));
187
+ --color-intent-info-solid-fg: hsl(var(--intent-info-solid-fg));
188
+ --color-intent-info-solid-foreground: hsl(var(--intent-info-solid-fg));
189
+ --radius-4xl: calc(var(--radius) * 4);
190
+ --radius-3xl: calc(var(--radius) * 3);
191
+ --radius-2xl: calc(var(--radius) * 2);
192
+ --radius-xl: calc(var(--radius) * 1.5);
193
+ --radius-lg: var(--radius);
194
+ --radius-md: calc(var(--radius) * 0.75);
195
+ --radius-sm: calc(var(--radius) * 0.5);
196
+ --radius-xs: calc(var(--radius) * 0.25);
197
+ --container-content-sm: 36rem;
198
+ --container-content-md: 48rem;
199
+ --container-content-lg: 64rem;
200
+ --container-content-xl: 75rem;
201
+ }
202
+
203
+ @theme inline reference {
204
+ --radius: calc(var(--radius) * 0.5);
205
+ }
206
+
207
+ @utility z-sticky {
208
+ z-index: var(--z-sticky);
209
+ }
210
+ @utility z-dropdown {
211
+ z-index: var(--z-dropdown);
212
+ }
213
+ @utility z-overlay {
214
+ z-index: var(--z-overlay);
215
+ }
216
+ @utility z-modal {
217
+ z-index: var(--z-modal);
218
+ }
219
+ @utility z-popover {
220
+ z-index: var(--z-popover);
221
+ }
222
+ @utility z-toast {
223
+ z-index: var(--z-toast);
224
+ }
225
+ @utility z-tooltip {
226
+ z-index: var(--z-tooltip);
227
+ }
228
+
229
+ @utility opacity-hover {
230
+ opacity: var(--opacity-hover);
231
+ }
232
+ @utility opacity-active {
233
+ opacity: var(--opacity-active);
234
+ }
235
+ @utility opacity-disabled {
236
+ opacity: var(--opacity-disabled);
237
+ }
238
+ @utility opacity-subtle {
239
+ opacity: var(--opacity-subtle);
240
+ }
241
+ @utility opacity-overlay {
242
+ opacity: var(--opacity-overlay);
243
+ }
244
+
245
+ @utility duration-fast {
246
+ transition-duration: var(--duration-fast);
247
+ }
248
+ @utility duration-default {
249
+ transition-duration: var(--duration-default);
250
+ }
251
+ @utility duration-slow {
252
+ transition-duration: var(--duration-slow);
253
+ }
254
+ @utility duration-drawer {
255
+ transition-duration: var(--duration-drawer);
256
+ }