@djangocfg/ui-tools 2.1.355 → 2.1.356
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/dist/ChatRoot-L2T7LU54.mjs +5 -0
- package/dist/{ChatRoot-2KT32NFJ.cjs.map → ChatRoot-L2T7LU54.mjs.map} +1 -1
- package/dist/ChatRoot-XY3E6AKV.cjs +14 -0
- package/dist/{ChatRoot-VSIBJLE2.mjs.map → ChatRoot-XY3E6AKV.cjs.map} +1 -1
- package/dist/{chunk-2SXDCXLK.cjs → chunk-H42G3HTQ.cjs} +7 -6
- package/dist/chunk-H42G3HTQ.cjs.map +1 -0
- package/dist/{chunk-XJ7CXHSU.mjs → chunk-PRRH35VD.mjs} +7 -6
- package/dist/chunk-PRRH35VD.mjs.map +1 -0
- package/dist/index.cjs +49 -49
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +3 -3
- package/package.json +6 -6
- package/src/tools/Chat/components/ChatRoot.tsx +10 -4
- package/dist/ChatRoot-2KT32NFJ.cjs +0 -14
- package/dist/ChatRoot-VSIBJLE2.mjs +0 -5
- package/dist/chunk-2SXDCXLK.cjs.map +0 -1
- package/dist/chunk-XJ7CXHSU.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var chunkKNDLV4PI_cjs = require('./chunk-KNDLV4PI.cjs');
|
|
|
7
7
|
var chunk5I5QNGUG_cjs = require('./chunk-5I5QNGUG.cjs');
|
|
8
8
|
var chunkYW5IVWHQ_cjs = require('./chunk-YW5IVWHQ.cjs');
|
|
9
9
|
var chunk76NNDZH6_cjs = require('./chunk-76NNDZH6.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkH42G3HTQ_cjs = require('./chunk-H42G3HTQ.cjs');
|
|
11
11
|
var chunkYXZ6GU7H_cjs = require('./chunk-YXZ6GU7H.cjs');
|
|
12
12
|
var chunkIEEAENLX_cjs = require('./chunk-IEEAENLX.cjs');
|
|
13
13
|
var chunkQW4RBGHN_cjs = require('./chunk-QW4RBGHN.cjs');
|
|
@@ -373,7 +373,7 @@ var LazyTree = createLazyComponent(
|
|
|
373
373
|
}
|
|
374
374
|
);
|
|
375
375
|
var LazyChat = createLazyComponent(
|
|
376
|
-
() => import('./ChatRoot-
|
|
376
|
+
() => import('./ChatRoot-XY3E6AKV.cjs').then((m) => ({ default: m.ChatRoot })),
|
|
377
377
|
{
|
|
378
378
|
displayName: "LazyChat",
|
|
379
379
|
fallback: /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback, { minHeight: 320, text: "Loading chat\u2026" })
|
|
@@ -410,7 +410,7 @@ async function* parseSSE(response, options = {}) {
|
|
|
410
410
|
throw new Error("SSE response has no body");
|
|
411
411
|
}
|
|
412
412
|
const map = options.map ?? DEFAULT_MAP;
|
|
413
|
-
const idleMs = options.idleTimeoutMs ??
|
|
413
|
+
const idleMs = options.idleTimeoutMs ?? chunkH42G3HTQ_cjs.LIMITS.sseIdleMs;
|
|
414
414
|
const reader = response.body.getReader();
|
|
415
415
|
const decoder = new TextDecoder();
|
|
416
416
|
let buffer = "";
|
|
@@ -613,7 +613,7 @@ function createMockTransport(opts = {}) {
|
|
|
613
613
|
async createSession(_opts) {
|
|
614
614
|
await sleep(latency);
|
|
615
615
|
return {
|
|
616
|
-
sessionId:
|
|
616
|
+
sessionId: chunkH42G3HTQ_cjs.createId("s"),
|
|
617
617
|
messages: history.length ? [...history] : void 0,
|
|
618
618
|
hasMore: false,
|
|
619
619
|
cursor: null,
|
|
@@ -630,12 +630,12 @@ function createMockTransport(opts = {}) {
|
|
|
630
630
|
throw new Error("mock transport scripted failure");
|
|
631
631
|
}
|
|
632
632
|
history.push({
|
|
633
|
-
id:
|
|
633
|
+
id: chunkH42G3HTQ_cjs.createId("u"),
|
|
634
634
|
role: "user",
|
|
635
635
|
content,
|
|
636
636
|
createdAt: Date.now()
|
|
637
637
|
});
|
|
638
|
-
const messageId =
|
|
638
|
+
const messageId = chunkH42G3HTQ_cjs.createId("a");
|
|
639
639
|
yield { type: "message_start", messageId, sessionId: _sid };
|
|
640
640
|
const reply = replies[turn % replies.length];
|
|
641
641
|
turn += 1;
|
|
@@ -664,7 +664,7 @@ function createMockTransport(opts = {}) {
|
|
|
664
664
|
turn += 1;
|
|
665
665
|
const text = typeof reply === "string" ? reply : reply.filter((e) => e.type === "chunk").map((e) => e.delta).join("");
|
|
666
666
|
return {
|
|
667
|
-
id:
|
|
667
|
+
id: chunkH42G3HTQ_cjs.createId("a"),
|
|
668
668
|
role: "assistant",
|
|
669
669
|
content: text || DEFAULT_REPLY,
|
|
670
670
|
createdAt: Date.now()
|
|
@@ -732,9 +732,9 @@ function AudioToggle({
|
|
|
732
732
|
alwaysShow = false,
|
|
733
733
|
className
|
|
734
734
|
}) {
|
|
735
|
-
const muted =
|
|
736
|
-
const setMuted =
|
|
737
|
-
const ctx =
|
|
735
|
+
const muted = chunkH42G3HTQ_cjs.useChatAudioPrefs((s) => s.muted);
|
|
736
|
+
const setMuted = chunkH42G3HTQ_cjs.useChatAudioPrefs((s) => s.setMuted);
|
|
737
|
+
const ctx = chunkH42G3HTQ_cjs.useChatContextOptional();
|
|
738
738
|
if (ctx && !ctx.hasAudio && !alwaysShow) return null;
|
|
739
739
|
const Icon = muted ? lucideReact.VolumeX : lucideReact.Volume2;
|
|
740
740
|
const label = muted ? "Unmute chat sounds" : "Mute chat sounds";
|
|
@@ -2048,159 +2048,159 @@ Object.defineProperty(exports, "useCronWeekDays", {
|
|
|
2048
2048
|
});
|
|
2049
2049
|
Object.defineProperty(exports, "Attachments", {
|
|
2050
2050
|
enumerable: true,
|
|
2051
|
-
get: function () { return
|
|
2051
|
+
get: function () { return chunkH42G3HTQ_cjs.Attachments; }
|
|
2052
2052
|
});
|
|
2053
2053
|
Object.defineProperty(exports, "AttachmentsGrid", {
|
|
2054
2054
|
enumerable: true,
|
|
2055
|
-
get: function () { return
|
|
2055
|
+
get: function () { return chunkH42G3HTQ_cjs.AttachmentsGrid; }
|
|
2056
2056
|
});
|
|
2057
2057
|
Object.defineProperty(exports, "AttachmentsList", {
|
|
2058
2058
|
enumerable: true,
|
|
2059
|
-
get: function () { return
|
|
2059
|
+
get: function () { return chunkH42G3HTQ_cjs.AttachmentsList; }
|
|
2060
2060
|
});
|
|
2061
2061
|
Object.defineProperty(exports, "CHAT_EVENT_NAME", {
|
|
2062
2062
|
enumerable: true,
|
|
2063
|
-
get: function () { return
|
|
2063
|
+
get: function () { return chunkH42G3HTQ_cjs.CHAT_EVENT_NAME; }
|
|
2064
2064
|
});
|
|
2065
2065
|
Object.defineProperty(exports, "CSS_VARS", {
|
|
2066
2066
|
enumerable: true,
|
|
2067
|
-
get: function () { return
|
|
2067
|
+
get: function () { return chunkH42G3HTQ_cjs.CSS_VARS; }
|
|
2068
2068
|
});
|
|
2069
2069
|
Object.defineProperty(exports, "ChatProvider", {
|
|
2070
2070
|
enumerable: true,
|
|
2071
|
-
get: function () { return
|
|
2071
|
+
get: function () { return chunkH42G3HTQ_cjs.ChatProvider; }
|
|
2072
2072
|
});
|
|
2073
2073
|
Object.defineProperty(exports, "ChatRoot", {
|
|
2074
2074
|
enumerable: true,
|
|
2075
|
-
get: function () { return
|
|
2075
|
+
get: function () { return chunkH42G3HTQ_cjs.ChatRoot; }
|
|
2076
2076
|
});
|
|
2077
2077
|
Object.defineProperty(exports, "Composer", {
|
|
2078
2078
|
enumerable: true,
|
|
2079
|
-
get: function () { return
|
|
2079
|
+
get: function () { return chunkH42G3HTQ_cjs.Composer; }
|
|
2080
2080
|
});
|
|
2081
2081
|
Object.defineProperty(exports, "DEFAULT_LABELS", {
|
|
2082
2082
|
enumerable: true,
|
|
2083
|
-
get: function () { return
|
|
2083
|
+
get: function () { return chunkH42G3HTQ_cjs.DEFAULT_LABELS; }
|
|
2084
2084
|
});
|
|
2085
2085
|
Object.defineProperty(exports, "DEFAULT_SIDEBAR", {
|
|
2086
2086
|
enumerable: true,
|
|
2087
|
-
get: function () { return
|
|
2087
|
+
get: function () { return chunkH42G3HTQ_cjs.DEFAULT_SIDEBAR; }
|
|
2088
2088
|
});
|
|
2089
2089
|
Object.defineProperty(exports, "DEFAULT_Z_INDEX", {
|
|
2090
2090
|
enumerable: true,
|
|
2091
|
-
get: function () { return
|
|
2091
|
+
get: function () { return chunkH42G3HTQ_cjs.DEFAULT_Z_INDEX; }
|
|
2092
2092
|
});
|
|
2093
2093
|
Object.defineProperty(exports, "EmptyState", {
|
|
2094
2094
|
enumerable: true,
|
|
2095
|
-
get: function () { return
|
|
2095
|
+
get: function () { return chunkH42G3HTQ_cjs.EmptyState; }
|
|
2096
2096
|
});
|
|
2097
2097
|
Object.defineProperty(exports, "ErrorBanner", {
|
|
2098
2098
|
enumerable: true,
|
|
2099
|
-
get: function () { return
|
|
2099
|
+
get: function () { return chunkH42G3HTQ_cjs.ErrorBanner; }
|
|
2100
2100
|
});
|
|
2101
2101
|
Object.defineProperty(exports, "HOTKEYS", {
|
|
2102
2102
|
enumerable: true,
|
|
2103
|
-
get: function () { return
|
|
2103
|
+
get: function () { return chunkH42G3HTQ_cjs.HOTKEYS; }
|
|
2104
2104
|
});
|
|
2105
2105
|
Object.defineProperty(exports, "JumpToLatest", {
|
|
2106
2106
|
enumerable: true,
|
|
2107
|
-
get: function () { return
|
|
2107
|
+
get: function () { return chunkH42G3HTQ_cjs.JumpToLatest; }
|
|
2108
2108
|
});
|
|
2109
2109
|
Object.defineProperty(exports, "LIMITS", {
|
|
2110
2110
|
enumerable: true,
|
|
2111
|
-
get: function () { return
|
|
2111
|
+
get: function () { return chunkH42G3HTQ_cjs.LIMITS; }
|
|
2112
2112
|
});
|
|
2113
2113
|
Object.defineProperty(exports, "MessageActions", {
|
|
2114
2114
|
enumerable: true,
|
|
2115
|
-
get: function () { return
|
|
2115
|
+
get: function () { return chunkH42G3HTQ_cjs.MessageActions; }
|
|
2116
2116
|
});
|
|
2117
2117
|
Object.defineProperty(exports, "MessageBubble", {
|
|
2118
2118
|
enumerable: true,
|
|
2119
|
-
get: function () { return
|
|
2119
|
+
get: function () { return chunkH42G3HTQ_cjs.MessageBubble; }
|
|
2120
2120
|
});
|
|
2121
2121
|
Object.defineProperty(exports, "MessageList", {
|
|
2122
2122
|
enumerable: true,
|
|
2123
|
-
get: function () { return
|
|
2123
|
+
get: function () { return chunkH42G3HTQ_cjs.MessageList; }
|
|
2124
2124
|
});
|
|
2125
2125
|
Object.defineProperty(exports, "STORAGE_KEYS", {
|
|
2126
2126
|
enumerable: true,
|
|
2127
|
-
get: function () { return
|
|
2127
|
+
get: function () { return chunkH42G3HTQ_cjs.STORAGE_KEYS; }
|
|
2128
2128
|
});
|
|
2129
2129
|
Object.defineProperty(exports, "Sources", {
|
|
2130
2130
|
enumerable: true,
|
|
2131
|
-
get: function () { return
|
|
2131
|
+
get: function () { return chunkH42G3HTQ_cjs.Sources; }
|
|
2132
2132
|
});
|
|
2133
2133
|
Object.defineProperty(exports, "StreamingIndicator", {
|
|
2134
2134
|
enumerable: true,
|
|
2135
|
-
get: function () { return
|
|
2135
|
+
get: function () { return chunkH42G3HTQ_cjs.StreamingIndicator; }
|
|
2136
2136
|
});
|
|
2137
2137
|
Object.defineProperty(exports, "ToolCalls", {
|
|
2138
2138
|
enumerable: true,
|
|
2139
|
-
get: function () { return
|
|
2139
|
+
get: function () { return chunkH42G3HTQ_cjs.ToolCalls; }
|
|
2140
2140
|
});
|
|
2141
2141
|
Object.defineProperty(exports, "createId", {
|
|
2142
2142
|
enumerable: true,
|
|
2143
|
-
get: function () { return
|
|
2143
|
+
get: function () { return chunkH42G3HTQ_cjs.createId; }
|
|
2144
2144
|
});
|
|
2145
2145
|
Object.defineProperty(exports, "createTokenBuffer", {
|
|
2146
2146
|
enumerable: true,
|
|
2147
|
-
get: function () { return
|
|
2147
|
+
get: function () { return chunkH42G3HTQ_cjs.createTokenBuffer; }
|
|
2148
2148
|
});
|
|
2149
2149
|
Object.defineProperty(exports, "deriveInitials", {
|
|
2150
2150
|
enumerable: true,
|
|
2151
|
-
get: function () { return
|
|
2151
|
+
get: function () { return chunkH42G3HTQ_cjs.deriveInitials; }
|
|
2152
2152
|
});
|
|
2153
2153
|
Object.defineProperty(exports, "getChatLogger", {
|
|
2154
2154
|
enumerable: true,
|
|
2155
|
-
get: function () { return
|
|
2155
|
+
get: function () { return chunkH42G3HTQ_cjs.getChatLogger; }
|
|
2156
2156
|
});
|
|
2157
2157
|
Object.defineProperty(exports, "initialState", {
|
|
2158
2158
|
enumerable: true,
|
|
2159
|
-
get: function () { return
|
|
2159
|
+
get: function () { return chunkH42G3HTQ_cjs.initialState; }
|
|
2160
2160
|
});
|
|
2161
2161
|
Object.defineProperty(exports, "reducer", {
|
|
2162
2162
|
enumerable: true,
|
|
2163
|
-
get: function () { return
|
|
2163
|
+
get: function () { return chunkH42G3HTQ_cjs.reducer; }
|
|
2164
2164
|
});
|
|
2165
2165
|
Object.defineProperty(exports, "resolvePersona", {
|
|
2166
2166
|
enumerable: true,
|
|
2167
|
-
get: function () { return
|
|
2167
|
+
get: function () { return chunkH42G3HTQ_cjs.resolvePersona; }
|
|
2168
2168
|
});
|
|
2169
2169
|
Object.defineProperty(exports, "useChat", {
|
|
2170
2170
|
enumerable: true,
|
|
2171
|
-
get: function () { return
|
|
2171
|
+
get: function () { return chunkH42G3HTQ_cjs.useChat; }
|
|
2172
2172
|
});
|
|
2173
2173
|
Object.defineProperty(exports, "useChatAudio", {
|
|
2174
2174
|
enumerable: true,
|
|
2175
|
-
get: function () { return
|
|
2175
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatAudio; }
|
|
2176
2176
|
});
|
|
2177
2177
|
Object.defineProperty(exports, "useChatAudioPrefs", {
|
|
2178
2178
|
enumerable: true,
|
|
2179
|
-
get: function () { return
|
|
2179
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatAudioPrefs; }
|
|
2180
2180
|
});
|
|
2181
2181
|
Object.defineProperty(exports, "useChatComposer", {
|
|
2182
2182
|
enumerable: true,
|
|
2183
|
-
get: function () { return
|
|
2183
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatComposer; }
|
|
2184
2184
|
});
|
|
2185
2185
|
Object.defineProperty(exports, "useChatContext", {
|
|
2186
2186
|
enumerable: true,
|
|
2187
|
-
get: function () { return
|
|
2187
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatContext; }
|
|
2188
2188
|
});
|
|
2189
2189
|
Object.defineProperty(exports, "useChatContextOptional", {
|
|
2190
2190
|
enumerable: true,
|
|
2191
|
-
get: function () { return
|
|
2191
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatContextOptional; }
|
|
2192
2192
|
});
|
|
2193
2193
|
Object.defineProperty(exports, "useChatHistory", {
|
|
2194
2194
|
enumerable: true,
|
|
2195
|
-
get: function () { return
|
|
2195
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatHistory; }
|
|
2196
2196
|
});
|
|
2197
2197
|
Object.defineProperty(exports, "useChatLayout", {
|
|
2198
2198
|
enumerable: true,
|
|
2199
|
-
get: function () { return
|
|
2199
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatLayout; }
|
|
2200
2200
|
});
|
|
2201
2201
|
Object.defineProperty(exports, "useChatScroll", {
|
|
2202
2202
|
enumerable: true,
|
|
2203
|
-
get: function () { return
|
|
2203
|
+
get: function () { return chunkH42G3HTQ_cjs.useChatScroll; }
|
|
2204
2204
|
});
|
|
2205
2205
|
Object.defineProperty(exports, "TreeError", {
|
|
2206
2206
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -2013,6 +2013,10 @@ interface ChatRootProps {
|
|
|
2013
2013
|
/** Composer size variant. Default ``md`` (36px slot). Use ``lg`` for primary
|
|
2014
2014
|
* surfaces (onboarding, full-page chat), ``sm`` for dense sidebars. */
|
|
2015
2015
|
composerSize?: ComposerSize;
|
|
2016
|
+
/** Extra className forwarded to the `<MessageList>` scroll container.
|
|
2017
|
+
* Use to add padding inside the scroll area so the scrollbar stays flush
|
|
2018
|
+
* with the edge (e.g. `"px-6 pt-6 sm:px-8"`). */
|
|
2019
|
+
listClassName?: string;
|
|
2016
2020
|
}
|
|
2017
2021
|
declare function ChatRoot(props: ChatRootProps): react_jsx_runtime.JSX.Element;
|
|
2018
2022
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2013,6 +2013,10 @@ interface ChatRootProps {
|
|
|
2013
2013
|
/** Composer size variant. Default ``md`` (36px slot). Use ``lg`` for primary
|
|
2014
2014
|
* surfaces (onboarding, full-page chat), ``sm`` for dense sidebars. */
|
|
2015
2015
|
composerSize?: ComposerSize;
|
|
2016
|
+
/** Extra className forwarded to the `<MessageList>` scroll container.
|
|
2017
|
+
* Use to add padding inside the scroll area so the scrollbar stays flush
|
|
2018
|
+
* with the edge (e.g. `"px-6 pt-6 sm:px-8"`). */
|
|
2019
|
+
listClassName?: string;
|
|
2016
2020
|
}
|
|
2017
2021
|
declare function ChatRoot(props: ChatRootProps): react_jsx_runtime.JSX.Element;
|
|
2018
2022
|
|
package/dist/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ export { NativeProvider, StreamProvider, VideoControls, VideoErrorFallback, Vide
|
|
|
5
5
|
export { ImageViewer } from './chunk-OBRSGM64.mjs';
|
|
6
6
|
export { generateContentKey, useAudioCache, useBlobUrlCleanup, useImageCache, useMediaCacheStore, useVideoCache, useVideoPlayerSettings } from './chunk-C6GXVH5J.mjs';
|
|
7
7
|
export { CronSchedulerProvider, CustomInput, DayChips, MonthDayGrid, SchedulePreview, ScheduleTypeSelector, TimeSelector, buildCron, humanizeCron, isValidCron, parseCron, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays } from './chunk-PVAX67JG.mjs';
|
|
8
|
-
import { LIMITS, createId, useChatAudioPrefs, useChatContextOptional } from './chunk-
|
|
9
|
-
export { Attachments, AttachmentsGrid, AttachmentsList, CHAT_EVENT_NAME, CSS_VARS, ChatProvider, ChatRoot, Composer, DEFAULT_LABELS, DEFAULT_SIDEBAR, DEFAULT_Z_INDEX, EmptyState, ErrorBanner, HOTKEYS, JumpToLatest, LIMITS, MessageActions, MessageBubble, MessageList, STORAGE_KEYS, Sources, StreamingIndicator, ToolCalls, createId, createTokenBuffer, deriveInitials, getChatLogger, initialState, reducer, resolvePersona, useChat, useChatAudio, useChatAudioPrefs, useChatComposer, useChatContext, useChatContextOptional, useChatHistory, useChatLayout, useChatScroll } from './chunk-
|
|
8
|
+
import { LIMITS, createId, useChatAudioPrefs, useChatContextOptional } from './chunk-PRRH35VD.mjs';
|
|
9
|
+
export { Attachments, AttachmentsGrid, AttachmentsList, CHAT_EVENT_NAME, CSS_VARS, ChatProvider, ChatRoot, Composer, DEFAULT_LABELS, DEFAULT_SIDEBAR, DEFAULT_Z_INDEX, EmptyState, ErrorBanner, HOTKEYS, JumpToLatest, LIMITS, MessageActions, MessageBubble, MessageList, STORAGE_KEYS, Sources, StreamingIndicator, ToolCalls, createId, createTokenBuffer, deriveInitials, getChatLogger, initialState, reducer, resolvePersona, useChat, useChatAudio, useChatAudioPrefs, useChatComposer, useChatContext, useChatContextOptional, useChatHistory, useChatLayout, useChatScroll } from './chunk-PRRH35VD.mjs';
|
|
10
10
|
export { TreeError, TreeSkeleton, createDemoTree } from './chunk-B6IR5KSC.mjs';
|
|
11
11
|
export { DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, TreeRoot as Tree, TreeChevron, TreeContent, TreeEmpty, TreeIcon, TreeIndentGuides, TreeLabel, TreeProvider, TreeRoot, TreeRow, TreeSearchInput, appearanceToStyle, clearTreeState, createChildCache, flattenTree, loadTreeState, resolveAppearance, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from './chunk-G5IEC7SR.mjs';
|
|
12
12
|
import { PlaygroundProvider } from './chunk-ZUFTH5IR.mjs';
|
|
@@ -348,7 +348,7 @@ var LazyTree = createLazyComponent(
|
|
|
348
348
|
}
|
|
349
349
|
);
|
|
350
350
|
var LazyChat = createLazyComponent(
|
|
351
|
-
() => import('./ChatRoot-
|
|
351
|
+
() => import('./ChatRoot-L2T7LU54.mjs').then((m) => ({ default: m.ChatRoot })),
|
|
352
352
|
{
|
|
353
353
|
displayName: "LazyChat",
|
|
354
354
|
fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 320, text: "Loading chat\u2026" })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-tools",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.356",
|
|
4
4
|
"description": "Heavy React tools with lazy loading - for Electron, Vite, CRA, Next.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-tools",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"check": "tsc --noEmit"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@djangocfg/i18n": "^2.1.
|
|
105
|
-
"@djangocfg/ui-core": "^2.1.
|
|
104
|
+
"@djangocfg/i18n": "^2.1.356",
|
|
105
|
+
"@djangocfg/ui-core": "^2.1.356",
|
|
106
106
|
"consola": "^3.4.2",
|
|
107
107
|
"lodash-es": "^4.18.1",
|
|
108
108
|
"lucide-react": "^0.545.0",
|
|
@@ -155,10 +155,10 @@
|
|
|
155
155
|
"material-file-icons": "^2.4.0"
|
|
156
156
|
},
|
|
157
157
|
"devDependencies": {
|
|
158
|
-
"@djangocfg/i18n": "^2.1.
|
|
158
|
+
"@djangocfg/i18n": "^2.1.356",
|
|
159
159
|
"@djangocfg/playground": "workspace:*",
|
|
160
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
161
|
-
"@djangocfg/ui-core": "^2.1.
|
|
160
|
+
"@djangocfg/typescript-config": "^2.1.356",
|
|
161
|
+
"@djangocfg/ui-core": "^2.1.356",
|
|
162
162
|
"@types/lodash-es": "^4.17.12",
|
|
163
163
|
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
|
|
164
164
|
"@types/node": "^24.7.2",
|
|
@@ -78,10 +78,14 @@ export interface ChatRootProps {
|
|
|
78
78
|
/** Composer size variant. Default ``md`` (36px slot). Use ``lg`` for primary
|
|
79
79
|
* surfaces (onboarding, full-page chat), ``sm`` for dense sidebars. */
|
|
80
80
|
composerSize?: ComposerSize;
|
|
81
|
+
/** Extra className forwarded to the `<MessageList>` scroll container.
|
|
82
|
+
* Use to add padding inside the scroll area so the scrollbar stays flush
|
|
83
|
+
* with the edge (e.g. `"px-6 pt-6 sm:px-8"`). */
|
|
84
|
+
listClassName?: string;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
export function ChatRoot(props: ChatRootProps) {
|
|
84
|
-
const { transport, config, initialSessionId, autoCreateSession, streaming, audio, debug, className, ...slots } = props;
|
|
88
|
+
const { transport, config, initialSessionId, autoCreateSession, streaming, audio, debug, className, listClassName, ...slots } = props;
|
|
85
89
|
return (
|
|
86
90
|
<ChatProvider
|
|
87
91
|
transport={transport}
|
|
@@ -92,17 +96,18 @@ export function ChatRoot(props: ChatRootProps) {
|
|
|
92
96
|
audio={audio}
|
|
93
97
|
debug={debug}
|
|
94
98
|
>
|
|
95
|
-
<ChatRootShell className={className} slots={slots} />
|
|
99
|
+
<ChatRootShell className={className} listClassName={listClassName} slots={slots} />
|
|
96
100
|
</ChatProvider>
|
|
97
101
|
);
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
interface ChatRootShellProps {
|
|
101
105
|
className?: string;
|
|
102
|
-
|
|
106
|
+
listClassName?: string;
|
|
107
|
+
slots: Omit<ChatRootProps, 'transport' | 'config' | 'initialSessionId' | 'autoCreateSession' | 'streaming' | 'audio' | 'debug' | 'className' | 'listClassName'>;
|
|
103
108
|
}
|
|
104
109
|
|
|
105
|
-
function ChatRootShell({ className, slots }: ChatRootShellProps) {
|
|
110
|
+
function ChatRootShell({ className, listClassName, slots }: ChatRootShellProps) {
|
|
106
111
|
const chat = useChatContext();
|
|
107
112
|
const composer = useChatComposer({
|
|
108
113
|
onSubmit: (content, attachments) => chat.sendMessage(content, attachments),
|
|
@@ -178,6 +183,7 @@ function ChatRootShell({ className, slots }: ChatRootShellProps) {
|
|
|
178
183
|
bottomRef={bottomRef}
|
|
179
184
|
renderItem={renderItem}
|
|
180
185
|
renderEmpty={() => <>{emptyNode}</>}
|
|
186
|
+
className={listClassName}
|
|
181
187
|
/>
|
|
182
188
|
<div className="pointer-events-none absolute inset-x-0 bottom-2 flex justify-center">
|
|
183
189
|
{slots.jumpToLatest ?? (
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2SXDCXLK_cjs = require('./chunk-2SXDCXLK.cjs');
|
|
4
|
-
require('./chunk-B5AWZOHJ.cjs');
|
|
5
|
-
require('./chunk-OLISEQHS.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "ChatRoot", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return chunk2SXDCXLK_cjs.ChatRoot; }
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=ChatRoot-2KT32NFJ.cjs.map
|
|
14
|
-
//# sourceMappingURL=ChatRoot-2KT32NFJ.cjs.map
|