@m6d/cortex-react 0.11.0 → 0.12.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 +177 -12
- package/dist/index.d.ts +32 -18
- package/dist/index.js +12 -12
- package/dist/styles.css +45 -4
- package/dist/theme.css +1 -1
- package/package.json +10 -4
package/dist/styles.css
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
/* These read --cortex-font-size (or the color named) when unset, so they ship
|
|
57
57
|
* unset: declaring one here gives that part its own value. Code blocks default
|
|
58
58
|
* to a tint of the heading color, so they stand a step off whatever they sit
|
|
59
|
-
* on: the transcript, the user's bubble, or a
|
|
59
|
+
* on: the transcript, the user's bubble, or a consumer's own surface.
|
|
60
60
|
*
|
|
61
61
|
* --cortex-font-size-message: 0.875rem; message text and the composer
|
|
62
62
|
* --cortex-font-size-header: 0.875rem; the chat and history titles
|
|
@@ -924,8 +924,8 @@ cortex-llm-usage-chips {
|
|
|
924
924
|
}
|
|
925
925
|
|
|
926
926
|
.cortex-widget__thread-item {
|
|
927
|
+
position: relative;
|
|
927
928
|
width: 100%;
|
|
928
|
-
text-align: start;
|
|
929
929
|
padding: 0.75rem;
|
|
930
930
|
border-radius: var(--cortex-radius);
|
|
931
931
|
display: flex;
|
|
@@ -980,6 +980,13 @@ cortex-llm-usage-chips {
|
|
|
980
980
|
.cortex-widget__thread-info {
|
|
981
981
|
min-width: 0;
|
|
982
982
|
flex: 1;
|
|
983
|
+
text-align: start;
|
|
984
|
+
cursor: pointer;
|
|
985
|
+
}
|
|
986
|
+
.cortex-widget__thread-info::after {
|
|
987
|
+
content: "";
|
|
988
|
+
position: absolute;
|
|
989
|
+
inset: 0;
|
|
983
990
|
}
|
|
984
991
|
|
|
985
992
|
.cortex-widget__thread-title-row {
|
|
@@ -1049,6 +1056,7 @@ cortex-llm-usage-chips {
|
|
|
1049
1056
|
}
|
|
1050
1057
|
}
|
|
1051
1058
|
.cortex-widget__thread-delete {
|
|
1059
|
+
position: relative;
|
|
1052
1060
|
flex-shrink: 0;
|
|
1053
1061
|
opacity: 0;
|
|
1054
1062
|
width: 1.75rem;
|
|
@@ -1063,7 +1071,7 @@ cortex-llm-usage-chips {
|
|
|
1063
1071
|
border: 0;
|
|
1064
1072
|
color: var(--cortex-color-text-muted);
|
|
1065
1073
|
}
|
|
1066
|
-
.cortex-widget__thread-item:hover > .cortex-widget__thread-delete {
|
|
1074
|
+
.cortex-widget__thread-item:hover > .cortex-widget__thread-delete, .cortex-widget__thread-delete:focus-visible {
|
|
1067
1075
|
opacity: 1;
|
|
1068
1076
|
}
|
|
1069
1077
|
.cortex-widget__thread-delete:hover {
|
|
@@ -1080,6 +1088,7 @@ cortex-llm-usage-chips {
|
|
|
1080
1088
|
flex-shrink: 0;
|
|
1081
1089
|
transition: color 0.15s;
|
|
1082
1090
|
color: var(--cortex-color-border-strong);
|
|
1091
|
+
pointer-events: none;
|
|
1083
1092
|
}
|
|
1084
1093
|
[dir=rtl] .cortex-widget__thread-arrow {
|
|
1085
1094
|
transform: rotate(180deg);
|
|
@@ -1880,6 +1889,12 @@ cortex-llm-usage-chips {
|
|
|
1880
1889
|
width: fit-content;
|
|
1881
1890
|
max-width: 100%;
|
|
1882
1891
|
}
|
|
1892
|
+
.cortex-table-block:has(table[dir=ltr]) > .cortex-expandable {
|
|
1893
|
+
margin-right: auto;
|
|
1894
|
+
}
|
|
1895
|
+
.cortex-table-block:has(table[dir=rtl]) > .cortex-expandable {
|
|
1896
|
+
margin-left: auto;
|
|
1897
|
+
}
|
|
1883
1898
|
|
|
1884
1899
|
.cortex-table-block__expanded {
|
|
1885
1900
|
padding: 1rem;
|
|
@@ -2041,6 +2056,15 @@ details[open] > summary > .cortex-reasoning-details__chevron {
|
|
|
2041
2056
|
flex-shrink: 0;
|
|
2042
2057
|
}
|
|
2043
2058
|
|
|
2059
|
+
.cortex-aborted-flag__reason {
|
|
2060
|
+
margin: 0.125rem 0 0;
|
|
2061
|
+
font-size: 0.75rem;
|
|
2062
|
+
line-height: 1.4;
|
|
2063
|
+
text-align: center;
|
|
2064
|
+
overflow-wrap: anywhere;
|
|
2065
|
+
color: light-dark(#c2824a, #e2a36f);
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2044
2068
|
/*
|
|
2045
2069
|
* A firing in the transcript. By default a small chip in the assistant column
|
|
2046
2070
|
* with the trigger's name and when it fired; in debug mode a full-width dashed
|
|
@@ -2944,6 +2968,8 @@ details[open] > summary .cortex-debug-tool__chevron {
|
|
|
2944
2968
|
color: var(--cortex-color-text-strong);
|
|
2945
2969
|
}
|
|
2946
2970
|
.cortex-attachment-chip--error {
|
|
2971
|
+
align-items: flex-start;
|
|
2972
|
+
max-width: 100%;
|
|
2947
2973
|
border-color: var(--cortex-color-danger-border);
|
|
2948
2974
|
background: var(--cortex-color-danger-surface);
|
|
2949
2975
|
color: var(--cortex-color-danger);
|
|
@@ -2970,6 +2996,21 @@ details[open] > summary .cortex-debug-tool__chevron {
|
|
|
2970
2996
|
transform: rotate(360deg);
|
|
2971
2997
|
}
|
|
2972
2998
|
}
|
|
2999
|
+
.cortex-attachment-chip__text {
|
|
3000
|
+
display: grid;
|
|
3001
|
+
min-width: 0;
|
|
3002
|
+
text-align: start;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
.cortex-attachment-chip__reason {
|
|
3006
|
+
font-size: 0.71875rem;
|
|
3007
|
+
opacity: 0.9;
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
.cortex-attachment-chip--error .cortex-attachment-chip__icon {
|
|
3011
|
+
color: currentColor;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
2973
3014
|
.cortex-attachment-chip__name {
|
|
2974
3015
|
overflow: hidden;
|
|
2975
3016
|
text-overflow: ellipsis;
|
|
@@ -3450,7 +3491,7 @@ html[dir=ltr] .cortex-llm-inspector__trigger {
|
|
|
3450
3491
|
gap: 0.5rem;
|
|
3451
3492
|
}
|
|
3452
3493
|
|
|
3453
|
-
/* ─── Usage rows (compact
|
|
3494
|
+
/* ─── Usage rows (compact) ─────────────────────────────────────────── */
|
|
3454
3495
|
.cortex-llm-inspector__usage-rows {
|
|
3455
3496
|
display: flex;
|
|
3456
3497
|
flex-direction: column;
|
package/dist/theme.css
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
/* These read --cortex-font-size (or the color named) when unset, so they ship
|
|
65
65
|
* unset: declaring one here gives that part its own value. Code blocks default
|
|
66
66
|
* to a tint of the heading color, so they stand a step off whatever they sit
|
|
67
|
-
* on: the transcript, the user's bubble, or a
|
|
67
|
+
* on: the transcript, the user's bubble, or a consumer's own surface.
|
|
68
68
|
*
|
|
69
69
|
* --cortex-font-size-message: 0.875rem; message text and the composer
|
|
70
70
|
* --cortex-font-size-header: 0.875rem; the chat and history titles
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m6d/cortex-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "React chat widget
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "React chat widget for Cortex agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"dist/*.css"
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "bash scripts/build.sh",
|
|
27
27
|
"check": "tsc --noEmit",
|
|
28
|
-
"prepack": "bun run build"
|
|
28
|
+
"prepack": "bun run build",
|
|
29
|
+
"test": "bun test"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@cortex/client": "workspace:*",
|
|
@@ -36,12 +37,14 @@
|
|
|
36
37
|
"@tanstack/ai-client": "^0.32.1",
|
|
37
38
|
"@tanstack/ai-react": "^0.27.0",
|
|
38
39
|
"@types/bun": "1.3.14",
|
|
40
|
+
"@types/jsdom": "^28.0.0",
|
|
39
41
|
"@types/leaflet": "^1.9.22",
|
|
40
42
|
"@types/react": "^19",
|
|
41
43
|
"@types/react-dom": "^19",
|
|
42
44
|
"dompurify": "^3.3.3",
|
|
43
45
|
"dts-bundle-generator": "^9.5.1",
|
|
44
46
|
"highlight.js": "^11.11.1",
|
|
47
|
+
"jsdom": "^28.1.0",
|
|
45
48
|
"leaflet": "^1.9.4",
|
|
46
49
|
"marked": "^17.0.4",
|
|
47
50
|
"mermaid": "^12.0.0",
|
|
@@ -72,6 +75,9 @@
|
|
|
72
75
|
},
|
|
73
76
|
"releaseWatchPaths": [
|
|
74
77
|
"internal/client",
|
|
75
|
-
"internal/contracts"
|
|
78
|
+
"internal/contracts/src/charts",
|
|
79
|
+
"internal/contracts/src/client-tools",
|
|
80
|
+
"internal/contracts/src/markdown",
|
|
81
|
+
"internal/contracts/src/wire"
|
|
76
82
|
]
|
|
77
83
|
}
|