@m6d/cortex-react 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/README.md +30 -0
- package/dist/index.d.ts +121 -0
- package/dist/index.js +9 -0
- package/dist/styles.css +3372 -0
- package/dist/theme.css +71 -0
- package/package.json +77 -0
package/dist/theme.css
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Theming surface.
|
|
3
|
+
*
|
|
4
|
+
* Every value below is the widget's own default; the compiled stylesheet ships
|
|
5
|
+
* this same file, so importing it changes nothing until you edit it. Override
|
|
6
|
+
* any token on :root, or on any ancestor of the widget, to retheme it.
|
|
7
|
+
*
|
|
8
|
+
* Each color is a light-dark() pair. Which side applies follows the widget root's
|
|
9
|
+
* color-scheme, set by the `theme` config option ('light' | 'dark' | 'system').
|
|
10
|
+
* The radius and font tokens below the colors are plain values — neither depends
|
|
11
|
+
* on the scheme.
|
|
12
|
+
*/
|
|
13
|
+
:root {
|
|
14
|
+
--cortex-color-surface: light-dark(#ffffff, #0a0a0a);
|
|
15
|
+
--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);
|
|
16
|
+
--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);
|
|
17
|
+
|
|
18
|
+
--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);
|
|
19
|
+
--cortex-color-border-strong: light-dark(#cbd5e1, #444444);
|
|
20
|
+
|
|
21
|
+
--cortex-color-text-heading: light-dark(#1e293b, #fafafa);
|
|
22
|
+
--cortex-color-text-strong: light-dark(#334155, #e5e5e5);
|
|
23
|
+
--cortex-color-text: light-dark(#475569, #d4d4d4);
|
|
24
|
+
--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);
|
|
25
|
+
--cortex-color-text-muted: light-dark(#94a3b8, #737373);
|
|
26
|
+
|
|
27
|
+
--cortex-color-primary: light-dark(#1e293b, #fafafa);
|
|
28
|
+
--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);
|
|
29
|
+
--cortex-color-accent: light-dark(#4f46e5, #818cf8);
|
|
30
|
+
--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);
|
|
31
|
+
--cortex-color-link: light-dark(#2563eb, #60a5fa);
|
|
32
|
+
--cortex-color-hover: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.06));
|
|
33
|
+
|
|
34
|
+
/* User messages default to the same subtle surface every other quiet panel
|
|
35
|
+
* uses, split out so a consumer can give their own side of the chat a color
|
|
36
|
+
* without touching anything else. */
|
|
37
|
+
--cortex-color-user-surface: var(--cortex-color-surface-subtle);
|
|
38
|
+
--cortex-color-user-border: var(--cortex-color-border);
|
|
39
|
+
|
|
40
|
+
/* Code blocks sit a step below the bubble they are in, in either scheme. */
|
|
41
|
+
--cortex-color-code-surface: light-dark(#e8edf3, #111111);
|
|
42
|
+
--cortex-color-code-text: light-dark(#334155, #e5e5e5);
|
|
43
|
+
|
|
44
|
+
--cortex-color-success: light-dark(#059669, #34d399);
|
|
45
|
+
--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);
|
|
46
|
+
--cortex-color-success-border: light-dark(#d1fae5, #065f46);
|
|
47
|
+
--cortex-color-danger: light-dark(#dc2626, #f87171);
|
|
48
|
+
--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);
|
|
49
|
+
--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);
|
|
50
|
+
|
|
51
|
+
/* The corner scale every rounded surface derives from: the widget multiplies
|
|
52
|
+
* this by 0.5/0.75/1.5/2, so overriding it rescales all of them together. */
|
|
53
|
+
--cortex-radius: 0.5rem;
|
|
54
|
+
|
|
55
|
+
--cortex-font-mono: var(
|
|
56
|
+
--default-mono-font-family,
|
|
57
|
+
ui-monospace,
|
|
58
|
+
SFMono-Regular,
|
|
59
|
+
Menlo,
|
|
60
|
+
Monaco,
|
|
61
|
+
Consolas,
|
|
62
|
+
monospace
|
|
63
|
+
);
|
|
64
|
+
--cortex-font-size: 0.8125rem;
|
|
65
|
+
|
|
66
|
+
/* The widget's headings read --cortex-font-display and fall back to `inherit`,
|
|
67
|
+
* so it ships unset on purpose — declaring it here is how you opt in:
|
|
68
|
+
*
|
|
69
|
+
* --cortex-font-display: 'Your Display Face', sans-serif;
|
|
70
|
+
*/
|
|
71
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@m6d/cortex-react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React chat widget SDK for cortex servers",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"dist/*.css"
|
|
8
|
+
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"bun": "./dist/index.js",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./styles.css": "./dist/styles.css",
|
|
18
|
+
"./theme.css": "./dist/theme.css"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "bash scripts/build.sh",
|
|
27
|
+
"check": "tsc --noEmit",
|
|
28
|
+
"prepack": "bun run build"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@cortex/client": "workspace:*",
|
|
32
|
+
"@cortex/contracts": "workspace:*",
|
|
33
|
+
"@m6d/prettier-config": "workspace:*",
|
|
34
|
+
"@m6d/tsconfig": "workspace:*",
|
|
35
|
+
"@tanstack/ai": "^0.55.0",
|
|
36
|
+
"@tanstack/ai-client": "^0.32.1",
|
|
37
|
+
"@tanstack/ai-react": "^0.27.0",
|
|
38
|
+
"@types/bun": "1.3.14",
|
|
39
|
+
"@types/leaflet": "^1.9.22",
|
|
40
|
+
"@types/react": "^19",
|
|
41
|
+
"@types/react-dom": "^19",
|
|
42
|
+
"dompurify": "^3.3.3",
|
|
43
|
+
"dts-bundle-generator": "^9.5.1",
|
|
44
|
+
"highlight.js": "^11.11.1",
|
|
45
|
+
"leaflet": "^1.9.4",
|
|
46
|
+
"marked": "^17.0.4",
|
|
47
|
+
"mermaid": "^12.0.0",
|
|
48
|
+
"react": "^19.2.0",
|
|
49
|
+
"sass": "^1.83.0",
|
|
50
|
+
"typescript": "~6.0.3",
|
|
51
|
+
"vega": "^6.4.0",
|
|
52
|
+
"vega-embed": "^7.2.0",
|
|
53
|
+
"vega-lite": "^6.4.3"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@tanstack/ai": "^0.55.0",
|
|
57
|
+
"@tanstack/ai-client": "^0.32.1",
|
|
58
|
+
"@tanstack/ai-react": "^0.27.0",
|
|
59
|
+
"dompurify": "^3.0.0",
|
|
60
|
+
"highlight.js": "^11.0.0",
|
|
61
|
+
"leaflet": "^1.9.0",
|
|
62
|
+
"marked": "^17.0.0",
|
|
63
|
+
"mermaid": "^12.0.0",
|
|
64
|
+
"react": ">=18",
|
|
65
|
+
"react-dom": ">=18",
|
|
66
|
+
"vega": "^6.0.0",
|
|
67
|
+
"vega-embed": "^7.0.0",
|
|
68
|
+
"vega-lite": "^6.0.0"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public"
|
|
72
|
+
},
|
|
73
|
+
"releaseWatchPaths": [
|
|
74
|
+
"internal/client",
|
|
75
|
+
"internal/contracts"
|
|
76
|
+
]
|
|
77
|
+
}
|