@djangocfg/ui-tools 2.1.355 → 2.1.357

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.
Files changed (70) hide show
  1. package/dist/ChatRoot-6U7633X3.mjs +5 -0
  2. package/dist/{ChatRoot-2KT32NFJ.cjs.map → ChatRoot-6U7633X3.mjs.map} +1 -1
  3. package/dist/ChatRoot-HARTIAJ5.cjs +14 -0
  4. package/dist/{ChatRoot-VSIBJLE2.mjs.map → ChatRoot-HARTIAJ5.cjs.map} +1 -1
  5. package/dist/{DocsLayout-VFPPNKSQ.mjs → DocsLayout-HGYIJTF3.mjs} +4 -4
  6. package/dist/{DocsLayout-VFPPNKSQ.mjs.map → DocsLayout-HGYIJTF3.mjs.map} +1 -1
  7. package/dist/{DocsLayout-N5ZJZPBY.cjs → DocsLayout-OQHDNKZE.cjs} +11 -11
  8. package/dist/{DocsLayout-N5ZJZPBY.cjs.map → DocsLayout-OQHDNKZE.cjs.map} +1 -1
  9. package/dist/JsonTree-43PQAJKY.mjs +5 -0
  10. package/dist/{JsonTree-55625VVH.mjs.map → JsonTree-43PQAJKY.mjs.map} +1 -1
  11. package/dist/JsonTree-X6W5YEVY.cjs +11 -0
  12. package/dist/{JsonTree-DCM5QGWF.cjs.map → JsonTree-X6W5YEVY.cjs.map} +1 -1
  13. package/dist/TreeRoot-5COOOSWG.mjs +4 -0
  14. package/dist/{TreeRoot-N72OYKXU.cjs.map → TreeRoot-5COOOSWG.mjs.map} +1 -1
  15. package/dist/TreeRoot-AABP2J6Y.cjs +19 -0
  16. package/dist/{TreeRoot-VGAIXCUA.mjs.map → TreeRoot-AABP2J6Y.cjs.map} +1 -1
  17. package/dist/{chunk-5G5YBFS6.mjs → chunk-ECONRHIG.mjs} +7 -7
  18. package/dist/chunk-ECONRHIG.mjs.map +1 -0
  19. package/dist/{chunk-IEEAENLX.cjs → chunk-FVVF7VCD.cjs} +14 -10
  20. package/dist/chunk-FVVF7VCD.cjs.map +1 -0
  21. package/dist/{chunk-2ZLKZ5VR.mjs → chunk-NWUT327A.mjs} +110 -32
  22. package/dist/chunk-NWUT327A.mjs.map +1 -0
  23. package/dist/{chunk-2SXDCXLK.cjs → chunk-OPKFKTIN.cjs} +17 -15
  24. package/dist/chunk-OPKFKTIN.cjs.map +1 -0
  25. package/dist/{chunk-SGP7V2UW.cjs → chunk-T3MWM23F.cjs} +6 -6
  26. package/dist/chunk-T3MWM23F.cjs.map +1 -0
  27. package/dist/{chunk-XJ7CXHSU.mjs → chunk-WGU5BEZX.mjs} +16 -14
  28. package/dist/chunk-WGU5BEZX.mjs.map +1 -0
  29. package/dist/{chunk-B5AWZOHJ.cjs → chunk-XACCHZH2.cjs} +119 -41
  30. package/dist/chunk-XACCHZH2.cjs.map +1 -0
  31. package/dist/{chunk-G5IEC7SR.mjs → chunk-ZL7FH4NW.mjs} +15 -11
  32. package/dist/chunk-ZL7FH4NW.mjs.map +1 -0
  33. package/dist/index.cjs +93 -93
  34. package/dist/index.d.cts +39 -4
  35. package/dist/index.d.ts +39 -4
  36. package/dist/index.mjs +10 -10
  37. package/dist/tree/index.cjs +33 -33
  38. package/dist/tree/index.d.cts +34 -4
  39. package/dist/tree/index.d.ts +34 -4
  40. package/dist/tree/index.mjs +1 -1
  41. package/package.json +6 -6
  42. package/src/components/markdown/MarkdownMessage/ActionRow.tsx +8 -3
  43. package/src/components/markdown/MarkdownMessage/ChatMessageRow.tsx +10 -4
  44. package/src/components/markdown/MarkdownMessage/CodeBlock.tsx +18 -6
  45. package/src/components/markdown/MarkdownMessage/CollapseToggle.tsx +13 -6
  46. package/src/components/markdown/MarkdownMessage/MarkdownMessage.tsx +10 -3
  47. package/src/tools/Chat/components/ChatRoot.tsx +12 -4
  48. package/src/tools/Chat/components/MessageActions.tsx +13 -3
  49. package/src/tools/Chat/components/StreamingIndicator.tsx +11 -1
  50. package/src/tools/JsonTree/components/JsonContent.tsx +13 -4
  51. package/src/tools/JsonTree/components/JsonToolbar.tsx +10 -3
  52. package/src/tools/JsonTree/index.tsx +10 -3
  53. package/src/tools/Tree/components/TreeChevron.tsx +10 -1
  54. package/src/tools/Tree/components/TreeIcon.tsx +11 -1
  55. package/src/tools/Tree/components/TreeLabel.tsx +10 -1
  56. package/src/tools/Tree/components/TreeRow.tsx +11 -1
  57. package/dist/ChatRoot-2KT32NFJ.cjs +0 -14
  58. package/dist/ChatRoot-VSIBJLE2.mjs +0 -5
  59. package/dist/JsonTree-55625VVH.mjs +0 -5
  60. package/dist/JsonTree-DCM5QGWF.cjs +0 -11
  61. package/dist/TreeRoot-N72OYKXU.cjs +0 -19
  62. package/dist/TreeRoot-VGAIXCUA.mjs +0 -4
  63. package/dist/chunk-2SXDCXLK.cjs.map +0 -1
  64. package/dist/chunk-2ZLKZ5VR.mjs.map +0 -1
  65. package/dist/chunk-5G5YBFS6.mjs.map +0 -1
  66. package/dist/chunk-B5AWZOHJ.cjs.map +0 -1
  67. package/dist/chunk-G5IEC7SR.mjs.map +0 -1
  68. package/dist/chunk-IEEAENLX.cjs.map +0 -1
  69. package/dist/chunk-SGP7V2UW.cjs.map +0 -1
  70. package/dist/chunk-XJ7CXHSU.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -5,13 +5,13 @@ 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-XJ7CXHSU.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-XJ7CXHSU.mjs';
8
+ import { LIMITS, createId, useChatAudioPrefs, useChatContextOptional } from './chunk-WGU5BEZX.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-WGU5BEZX.mjs';
10
10
  export { TreeError, TreeSkeleton, createDemoTree } from './chunk-B6IR5KSC.mjs';
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';
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-ZL7FH4NW.mjs';
12
12
  import { PlaygroundProvider } from './chunk-ZUFTH5IR.mjs';
13
- export { MarkdownMessage, Mermaid_default as Mermaid, PrettyCode_default as PrettyCode, extractTextFromChildren, useCollapsibleContent } from './chunk-2ZLKZ5VR.mjs';
14
- export { JsonTree_default as JsonTree } from './chunk-5G5YBFS6.mjs';
13
+ export { MarkdownMessage, Mermaid_default as Mermaid, PrettyCode_default as PrettyCode, extractTextFromChildren, useCollapsibleContent } from './chunk-NWUT327A.mjs';
14
+ export { JsonTree_default as JsonTree } from './chunk-ECONRHIG.mjs';
15
15
  import './chunk-KNEQRUBA.mjs';
16
16
  import { __name, __publicField } from './chunk-N2XQF2OL.mjs';
17
17
  import * as React from 'react';
@@ -242,7 +242,7 @@ function OpenapiLoadingFallback() {
242
242
  }
243
243
  __name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
244
244
  var LazyDocsLayout = createLazyComponent(
245
- () => import('./DocsLayout-VFPPNKSQ.mjs').then((mod) => ({ default: mod.DocsLayout })),
245
+ () => import('./DocsLayout-HGYIJTF3.mjs').then((mod) => ({ default: mod.DocsLayout })),
246
246
  {
247
247
  displayName: "LazyDocsLayout",
248
248
  fallback: /* @__PURE__ */ jsx(OpenapiLoadingFallback, {})
@@ -313,7 +313,7 @@ var LazyVideoPlayer = createLazyComponent(
313
313
  }
314
314
  );
315
315
  var LazyJsonTree = createLazyComponent(
316
- () => import('./JsonTree-55625VVH.mjs'),
316
+ () => import('./JsonTree-43PQAJKY.mjs'),
317
317
  {
318
318
  displayName: "LazyJsonTree",
319
319
  fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 100, text: "Loading JSON viewer..." })
@@ -341,14 +341,14 @@ var LazyCronScheduler = createLazyComponent(
341
341
  }
342
342
  );
343
343
  var LazyTree = createLazyComponent(
344
- () => import('./TreeRoot-VGAIXCUA.mjs'),
344
+ () => import('./TreeRoot-5COOOSWG.mjs'),
345
345
  {
346
346
  displayName: "LazyTree",
347
347
  fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 200, text: "Loading tree\u2026" })
348
348
  }
349
349
  );
350
350
  var LazyChat = createLazyComponent(
351
- () => import('./ChatRoot-VSIBJLE2.mjs').then((m) => ({ default: m.ChatRoot })),
351
+ () => import('./ChatRoot-6U7633X3.mjs').then((m) => ({ default: m.ChatRoot })),
352
352
  {
353
353
  displayName: "LazyChat",
354
354
  fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 320, text: "Loading chat\u2026" })
@@ -741,7 +741,7 @@ function LottiePlayer(props) {
741
741
  }
742
742
  __name(LottiePlayer, "LottiePlayer");
743
743
  var DocsLayout = lazy(
744
- () => import('./DocsLayout-VFPPNKSQ.mjs').then((mod) => ({ default: mod.DocsLayout }))
744
+ () => import('./DocsLayout-HGYIJTF3.mjs').then((mod) => ({ default: mod.DocsLayout }))
745
745
  );
746
746
  var LoadingFallback6 = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
747
747
  var Playground = /* @__PURE__ */ __name(({ config }) => {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var chunkYXZ6GU7H_cjs = require('../chunk-YXZ6GU7H.cjs');
6
- var chunkIEEAENLX_cjs = require('../chunk-IEEAENLX.cjs');
6
+ var chunkFVVF7VCD_cjs = require('../chunk-FVVF7VCD.cjs');
7
7
  require('../chunk-OLISEQHS.cjs');
8
8
 
9
9
 
@@ -22,131 +22,131 @@ Object.defineProperty(exports, "createDemoTree", {
22
22
  });
23
23
  Object.defineProperty(exports, "DEFAULT_TREE_APPEARANCE", {
24
24
  enumerable: true,
25
- get: function () { return chunkIEEAENLX_cjs.DEFAULT_TREE_APPEARANCE; }
25
+ get: function () { return chunkFVVF7VCD_cjs.DEFAULT_TREE_APPEARANCE; }
26
26
  });
27
27
  Object.defineProperty(exports, "DEFAULT_TREE_LABELS", {
28
28
  enumerable: true,
29
- get: function () { return chunkIEEAENLX_cjs.DEFAULT_TREE_LABELS; }
29
+ get: function () { return chunkFVVF7VCD_cjs.DEFAULT_TREE_LABELS; }
30
30
  });
31
31
  Object.defineProperty(exports, "Tree", {
32
32
  enumerable: true,
33
- get: function () { return chunkIEEAENLX_cjs.TreeRoot; }
33
+ get: function () { return chunkFVVF7VCD_cjs.TreeRoot; }
34
34
  });
35
35
  Object.defineProperty(exports, "TreeChevron", {
36
36
  enumerable: true,
37
- get: function () { return chunkIEEAENLX_cjs.TreeChevron; }
37
+ get: function () { return chunkFVVF7VCD_cjs.TreeChevron; }
38
38
  });
39
39
  Object.defineProperty(exports, "TreeContent", {
40
40
  enumerable: true,
41
- get: function () { return chunkIEEAENLX_cjs.TreeContent; }
41
+ get: function () { return chunkFVVF7VCD_cjs.TreeContent; }
42
42
  });
43
43
  Object.defineProperty(exports, "TreeEmpty", {
44
44
  enumerable: true,
45
- get: function () { return chunkIEEAENLX_cjs.TreeEmpty; }
45
+ get: function () { return chunkFVVF7VCD_cjs.TreeEmpty; }
46
46
  });
47
47
  Object.defineProperty(exports, "TreeIcon", {
48
48
  enumerable: true,
49
- get: function () { return chunkIEEAENLX_cjs.TreeIcon; }
49
+ get: function () { return chunkFVVF7VCD_cjs.TreeIcon; }
50
50
  });
51
51
  Object.defineProperty(exports, "TreeIndentGuides", {
52
52
  enumerable: true,
53
- get: function () { return chunkIEEAENLX_cjs.TreeIndentGuides; }
53
+ get: function () { return chunkFVVF7VCD_cjs.TreeIndentGuides; }
54
54
  });
55
55
  Object.defineProperty(exports, "TreeLabel", {
56
56
  enumerable: true,
57
- get: function () { return chunkIEEAENLX_cjs.TreeLabel; }
57
+ get: function () { return chunkFVVF7VCD_cjs.TreeLabel; }
58
58
  });
59
59
  Object.defineProperty(exports, "TreeProvider", {
60
60
  enumerable: true,
61
- get: function () { return chunkIEEAENLX_cjs.TreeProvider; }
61
+ get: function () { return chunkFVVF7VCD_cjs.TreeProvider; }
62
62
  });
63
63
  Object.defineProperty(exports, "TreeRoot", {
64
64
  enumerable: true,
65
- get: function () { return chunkIEEAENLX_cjs.TreeRoot; }
65
+ get: function () { return chunkFVVF7VCD_cjs.TreeRoot; }
66
66
  });
67
67
  Object.defineProperty(exports, "TreeRow", {
68
68
  enumerable: true,
69
- get: function () { return chunkIEEAENLX_cjs.TreeRow; }
69
+ get: function () { return chunkFVVF7VCD_cjs.TreeRow; }
70
70
  });
71
71
  Object.defineProperty(exports, "TreeSearchInput", {
72
72
  enumerable: true,
73
- get: function () { return chunkIEEAENLX_cjs.TreeSearchInput; }
73
+ get: function () { return chunkFVVF7VCD_cjs.TreeSearchInput; }
74
74
  });
75
75
  Object.defineProperty(exports, "appearanceToStyle", {
76
76
  enumerable: true,
77
- get: function () { return chunkIEEAENLX_cjs.appearanceToStyle; }
77
+ get: function () { return chunkFVVF7VCD_cjs.appearanceToStyle; }
78
78
  });
79
79
  Object.defineProperty(exports, "clearTreeState", {
80
80
  enumerable: true,
81
- get: function () { return chunkIEEAENLX_cjs.clearTreeState; }
81
+ get: function () { return chunkFVVF7VCD_cjs.clearTreeState; }
82
82
  });
83
83
  Object.defineProperty(exports, "createChildCache", {
84
84
  enumerable: true,
85
- get: function () { return chunkIEEAENLX_cjs.createChildCache; }
85
+ get: function () { return chunkFVVF7VCD_cjs.createChildCache; }
86
86
  });
87
87
  Object.defineProperty(exports, "default", {
88
88
  enumerable: true,
89
- get: function () { return chunkIEEAENLX_cjs.TreeRoot_default; }
89
+ get: function () { return chunkFVVF7VCD_cjs.TreeRoot_default; }
90
90
  });
91
91
  Object.defineProperty(exports, "flattenTree", {
92
92
  enumerable: true,
93
- get: function () { return chunkIEEAENLX_cjs.flattenTree; }
93
+ get: function () { return chunkFVVF7VCD_cjs.flattenTree; }
94
94
  });
95
95
  Object.defineProperty(exports, "loadTreeState", {
96
96
  enumerable: true,
97
- get: function () { return chunkIEEAENLX_cjs.loadTreeState; }
97
+ get: function () { return chunkFVVF7VCD_cjs.loadTreeState; }
98
98
  });
99
99
  Object.defineProperty(exports, "resolveAppearance", {
100
100
  enumerable: true,
101
- get: function () { return chunkIEEAENLX_cjs.resolveAppearance; }
101
+ get: function () { return chunkFVVF7VCD_cjs.resolveAppearance; }
102
102
  });
103
103
  Object.defineProperty(exports, "resolveChildren", {
104
104
  enumerable: true,
105
- get: function () { return chunkIEEAENLX_cjs.resolveChildren; }
105
+ get: function () { return chunkFVVF7VCD_cjs.resolveChildren; }
106
106
  });
107
107
  Object.defineProperty(exports, "saveTreeState", {
108
108
  enumerable: true,
109
- get: function () { return chunkIEEAENLX_cjs.saveTreeState; }
109
+ get: function () { return chunkFVVF7VCD_cjs.saveTreeState; }
110
110
  });
111
111
  Object.defineProperty(exports, "useTreeActions", {
112
112
  enumerable: true,
113
- get: function () { return chunkIEEAENLX_cjs.useTreeActions; }
113
+ get: function () { return chunkFVVF7VCD_cjs.useTreeActions; }
114
114
  });
115
115
  Object.defineProperty(exports, "useTreeContext", {
116
116
  enumerable: true,
117
- get: function () { return chunkIEEAENLX_cjs.useTreeContext; }
117
+ get: function () { return chunkFVVF7VCD_cjs.useTreeContext; }
118
118
  });
119
119
  Object.defineProperty(exports, "useTreeExpansion", {
120
120
  enumerable: true,
121
- get: function () { return chunkIEEAENLX_cjs.useTreeExpansion; }
121
+ get: function () { return chunkFVVF7VCD_cjs.useTreeExpansion; }
122
122
  });
123
123
  Object.defineProperty(exports, "useTreeFocus", {
124
124
  enumerable: true,
125
- get: function () { return chunkIEEAENLX_cjs.useTreeFocus; }
125
+ get: function () { return chunkFVVF7VCD_cjs.useTreeFocus; }
126
126
  });
127
127
  Object.defineProperty(exports, "useTreeKeyboard", {
128
128
  enumerable: true,
129
- get: function () { return chunkIEEAENLX_cjs.useTreeKeyboard; }
129
+ get: function () { return chunkFVVF7VCD_cjs.useTreeKeyboard; }
130
130
  });
131
131
  Object.defineProperty(exports, "useTreeLabels", {
132
132
  enumerable: true,
133
- get: function () { return chunkIEEAENLX_cjs.useTreeLabels; }
133
+ get: function () { return chunkFVVF7VCD_cjs.useTreeLabels; }
134
134
  });
135
135
  Object.defineProperty(exports, "useTreeRows", {
136
136
  enumerable: true,
137
- get: function () { return chunkIEEAENLX_cjs.useTreeRows; }
137
+ get: function () { return chunkFVVF7VCD_cjs.useTreeRows; }
138
138
  });
139
139
  Object.defineProperty(exports, "useTreeSearch", {
140
140
  enumerable: true,
141
- get: function () { return chunkIEEAENLX_cjs.useTreeSearch; }
141
+ get: function () { return chunkFVVF7VCD_cjs.useTreeSearch; }
142
142
  });
143
143
  Object.defineProperty(exports, "useTreeSelection", {
144
144
  enumerable: true,
145
- get: function () { return chunkIEEAENLX_cjs.useTreeSelection; }
145
+ get: function () { return chunkFVVF7VCD_cjs.useTreeSelection; }
146
146
  });
147
147
  Object.defineProperty(exports, "useTreeTypeAhead", {
148
148
  enumerable: true,
149
- get: function () { return chunkIEEAENLX_cjs.useTreeTypeAhead; }
149
+ get: function () { return chunkFVVF7VCD_cjs.useTreeTypeAhead; }
150
150
  });
151
151
  //# sourceMappingURL=index.cjs.map
152
152
  //# sourceMappingURL=index.cjs.map
@@ -171,27 +171,57 @@ interface TreeChevronProps {
171
171
  isFolder: boolean;
172
172
  className?: string;
173
173
  }
174
- declare function TreeChevron({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
174
+ /**
175
+ * TreeChevron — expand/collapse chevron for a tree row.
176
+ *
177
+ * Memoised: re-renders only when `isExpanded`, `isFolder` or `className`
178
+ * change. Reads appearance from context.
179
+ */
180
+ declare function TreeChevronRaw({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
181
+ declare const TreeChevron: react.MemoExoticComponent<typeof TreeChevronRaw>;
175
182
 
176
183
  interface TreeIconProps {
177
184
  isFolder: boolean;
178
185
  isExpanded: boolean;
179
186
  className?: string;
180
187
  }
181
- declare function TreeIcon({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
188
+ /**
189
+ * TreeIcon — file/folder icon for a tree row.
190
+ *
191
+ * Memoised: re-renders only when `isFolder`, `isExpanded` or `className`
192
+ * change. Reads appearance from context — context updates will still
193
+ * trigger re-render as expected.
194
+ */
195
+ declare function TreeIconRaw({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
196
+ declare const TreeIcon: react.MemoExoticComponent<typeof TreeIconRaw>;
182
197
 
183
198
  interface TreeLabelProps {
184
199
  children: React.ReactNode;
185
200
  isMatchingSearch?: boolean;
186
201
  className?: string;
187
202
  }
188
- declare function TreeLabel({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
203
+ /**
204
+ * TreeLabel — truncated label for a tree row.
205
+ *
206
+ * Memoised: re-renders only when `children`, `isMatchingSearch` or
207
+ * `className` change. `children` is compared by reference.
208
+ */
209
+ declare function TreeLabelRaw({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
210
+ declare const TreeLabel: react.MemoExoticComponent<typeof TreeLabelRaw>;
189
211
 
190
212
  interface TreeRowProps<T> {
191
213
  row: FlatRow<T>;
192
214
  className?: string;
193
215
  }
194
- declare function TreeRow<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
216
+ /**
217
+ * TreeRow — single row in a virtualised tree.
218
+ *
219
+ * Memoised: re-renders only when `row` reference or `className` change.
220
+ * `row` is treated as immutable — the parent should not mutate node
221
+ * objects in place.
222
+ */
223
+ declare function TreeRowRaw<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
224
+ declare const TreeRow: typeof TreeRowRaw;
195
225
 
196
226
  interface TreeContentProps<T> {
197
227
  /** Custom row renderer; falls back to <TreeRow />. */
@@ -171,27 +171,57 @@ interface TreeChevronProps {
171
171
  isFolder: boolean;
172
172
  className?: string;
173
173
  }
174
- declare function TreeChevron({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
174
+ /**
175
+ * TreeChevron — expand/collapse chevron for a tree row.
176
+ *
177
+ * Memoised: re-renders only when `isExpanded`, `isFolder` or `className`
178
+ * change. Reads appearance from context.
179
+ */
180
+ declare function TreeChevronRaw({ isExpanded, isFolder, className }: TreeChevronProps): react_jsx_runtime.JSX.Element;
181
+ declare const TreeChevron: react.MemoExoticComponent<typeof TreeChevronRaw>;
175
182
 
176
183
  interface TreeIconProps {
177
184
  isFolder: boolean;
178
185
  isExpanded: boolean;
179
186
  className?: string;
180
187
  }
181
- declare function TreeIcon({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
188
+ /**
189
+ * TreeIcon — file/folder icon for a tree row.
190
+ *
191
+ * Memoised: re-renders only when `isFolder`, `isExpanded` or `className`
192
+ * change. Reads appearance from context — context updates will still
193
+ * trigger re-render as expected.
194
+ */
195
+ declare function TreeIconRaw({ isFolder, isExpanded, className }: TreeIconProps): react_jsx_runtime.JSX.Element;
196
+ declare const TreeIcon: react.MemoExoticComponent<typeof TreeIconRaw>;
182
197
 
183
198
  interface TreeLabelProps {
184
199
  children: React.ReactNode;
185
200
  isMatchingSearch?: boolean;
186
201
  className?: string;
187
202
  }
188
- declare function TreeLabel({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
203
+ /**
204
+ * TreeLabel — truncated label for a tree row.
205
+ *
206
+ * Memoised: re-renders only when `children`, `isMatchingSearch` or
207
+ * `className` change. `children` is compared by reference.
208
+ */
209
+ declare function TreeLabelRaw({ children, isMatchingSearch, className }: TreeLabelProps): react_jsx_runtime.JSX.Element;
210
+ declare const TreeLabel: react.MemoExoticComponent<typeof TreeLabelRaw>;
189
211
 
190
212
  interface TreeRowProps<T> {
191
213
  row: FlatRow<T>;
192
214
  className?: string;
193
215
  }
194
- declare function TreeRow<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
216
+ /**
217
+ * TreeRow — single row in a virtualised tree.
218
+ *
219
+ * Memoised: re-renders only when `row` reference or `className` change.
220
+ * `row` is treated as immutable — the parent should not mutate node
221
+ * objects in place.
222
+ */
223
+ declare function TreeRowRaw<T>({ row, className }: TreeRowProps<T>): react_jsx_runtime.JSX.Element;
224
+ declare const TreeRow: typeof TreeRowRaw;
195
225
 
196
226
  interface TreeContentProps<T> {
197
227
  /** Custom row renderer; falls back to <TreeRow />. */
@@ -1,5 +1,5 @@
1
1
  export { TreeError, TreeSkeleton, createDemoTree } from '../chunk-B6IR5KSC.mjs';
2
- export { DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, TreeRoot as Tree, TreeChevron, TreeContent, TreeEmpty, TreeIcon, TreeIndentGuides, TreeLabel, TreeProvider, TreeRoot, TreeRow, TreeSearchInput, appearanceToStyle, clearTreeState, createChildCache, TreeRoot_default as default, flattenTree, loadTreeState, resolveAppearance, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from '../chunk-G5IEC7SR.mjs';
2
+ export { DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, TreeRoot as Tree, TreeChevron, TreeContent, TreeEmpty, TreeIcon, TreeIndentGuides, TreeLabel, TreeProvider, TreeRoot, TreeRow, TreeSearchInput, appearanceToStyle, clearTreeState, createChildCache, TreeRoot_default as default, flattenTree, loadTreeState, resolveAppearance, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from '../chunk-ZL7FH4NW.mjs';
3
3
  import '../chunk-N2XQF2OL.mjs';
4
4
  //# sourceMappingURL=index.mjs.map
5
5
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-tools",
3
- "version": "2.1.355",
3
+ "version": "2.1.357",
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.355",
105
- "@djangocfg/ui-core": "^2.1.355",
104
+ "@djangocfg/i18n": "^2.1.357",
105
+ "@djangocfg/ui-core": "^2.1.357",
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.355",
158
+ "@djangocfg/i18n": "^2.1.357",
159
159
  "@djangocfg/playground": "workspace:*",
160
- "@djangocfg/typescript-config": "^2.1.355",
161
- "@djangocfg/ui-core": "^2.1.355",
160
+ "@djangocfg/typescript-config": "^2.1.357",
161
+ "@djangocfg/ui-core": "^2.1.357",
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",
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
3
+ import React, { memo } from 'react';
4
4
  import { CopyButton } from '@djangocfg/ui-core/components';
5
5
 
6
6
  interface ActionRowProps {
@@ -25,7 +25,10 @@ interface ActionRowProps {
25
25
  // stays smooth across re-renders. While invisible we drop pointer
26
26
  // events so a hidden row can't intercept clicks meant for the page
27
27
  // underneath.
28
- export const ActionRow: React.FC<ActionRowProps> = ({ value, isUser, visible }) => {
28
+ //
29
+ // Memoised: re-renders only when `value`, `isUser` or `visible` change.
30
+ // All props are primitives, so default shallow comparison is sufficient.
31
+ function ActionRowRaw({ value, isUser, visible }: ActionRowProps) {
29
32
  return (
30
33
  <div
31
34
  className={`flex ${isUser ? 'justify-end' : 'justify-start'}
@@ -45,4 +48,6 @@ export const ActionRow: React.FC<ActionRowProps> = ({ value, isUser, visible })
45
48
  />
46
49
  </div>
47
50
  );
48
- };
51
+ }
52
+
53
+ export const ActionRow = memo(ActionRowRaw);
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import React, { useCallback, useEffect, useRef, useState } from 'react';
3
+ import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
4
4
  import { useMediaQuery } from '@djangocfg/ui-core/hooks';
5
5
 
6
6
  interface ChatMessageRowProps {
@@ -36,13 +36,17 @@ interface ChatMessageRowProps {
36
36
  // The action row is rendered **absolutely** under the bubble so
37
37
  // hidden rows don't allocate vertical space — no dead-air gap
38
38
  // between consecutive messages.
39
- export const ChatMessageRow: React.FC<ChatMessageRowProps> = ({
39
+ //
40
+ // Memoised: re-renders only when `isUser`, `children`, `actions`,
41
+ // `closeDelayMs` or `className` change. `actions` render-prop is
42
+ // compared by reference — callers should stabilise it with useCallback.
43
+ function ChatMessageRowRaw({
40
44
  isUser,
41
45
  children,
42
46
  actions,
43
47
  closeDelayMs = 250,
44
48
  className = '',
45
- }) => {
49
+ }: ChatMessageRowProps) {
46
50
  const isTouch = useMediaQuery('(hover: none), (pointer: coarse)');
47
51
  const [hovered, setHovered] = useState(false);
48
52
  const closeTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
@@ -94,4 +98,6 @@ export const ChatMessageRow: React.FC<ChatMessageRowProps> = ({
94
98
  )}
95
99
  </div>
96
100
  );
97
- };
101
+ }
102
+
103
+ export const ChatMessageRow = memo(ChatMessageRowRaw);
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { memo } from 'react';
2
2
  import { CopyButton } from '@djangocfg/ui-core/components';
3
3
  import { useResolvedTheme } from '@djangocfg/ui-core/hooks';
4
4
  import PrettyCode from '../../../tools/PrettyCode';
@@ -18,8 +18,12 @@ interface CodeBlockProps {
18
18
  * surfaced as two copy buttons on every code fence. The fallback
19
19
  * branch below still ships its own button because the plain <pre>
20
20
  * has no toolbar of its own.
21
+ *
22
+ * Memoised: re-renders only when `code`, `language`, `isUser` or
23
+ * `isCompact` change. `code` is the main trigger — long code blocks
24
+ * should not re-render when parent chat scrolls.
21
25
  */
22
- export const CodeBlock: React.FC<CodeBlockProps> = ({ code, language }) => {
26
+ function CodeBlockRaw({ code, language }: CodeBlockProps) {
23
27
  const theme = useResolvedTheme();
24
28
 
25
29
  // Chat fences are always rendered in PrettyCode's compact mode:
@@ -46,11 +50,17 @@ export const CodeBlock: React.FC<CodeBlockProps> = ({ code, language }) => {
46
50
  />
47
51
  </div>
48
52
  );
49
- };
53
+ }
54
+
55
+ export const CodeBlock = memo(CodeBlockRaw);
50
56
 
51
57
  /** Simple `<pre>` fallback used when CodeBlock throws (lazy module
52
- * failure, missing PrettyCode peer, etc). */
53
- export const CodeBlockFallback: React.FC<CodeBlockProps> = ({ code, isUser }) => {
58
+ * failure, missing PrettyCode peer, etc).
59
+ *
60
+ * Memoised: re-renders only when `code`, `language`, `isUser` or
61
+ * `isCompact` change.
62
+ */
63
+ function CodeBlockFallbackRaw({ code, isUser }: CodeBlockProps) {
54
64
  // See CodeBlock above for the spirit of this layout — palette
55
65
  // pre-computed before render.
56
66
  const copyHoverClass = isUser
@@ -73,4 +83,6 @@ export const CodeBlockFallback: React.FC<CodeBlockProps> = ({ code, isUser }) =>
73
83
  </pre>
74
84
  </div>
75
85
  );
76
- };
86
+ }
87
+
88
+ export const CodeBlockFallback = memo(CodeBlockFallbackRaw);
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { memo } from 'react';
2
2
 
3
3
  interface CollapseToggleProps {
4
4
  isCollapsed: boolean;
@@ -9,15 +9,20 @@ interface CollapseToggleProps {
9
9
  isCompact: boolean;
10
10
  }
11
11
 
12
- /** "Read more..." / "Show less" button. */
13
- export const CollapseToggle: React.FC<CollapseToggleProps> = ({
12
+ /** "Read more..." / "Show less" button.
13
+ *
14
+ * Memoised: re-renders only when `isCollapsed`, `onClick`, `readMoreLabel`,
15
+ * `showLessLabel`, `isUser` or `isCompact` change. `onClick` is compared
16
+ * by reference — callers should stabilise it with useCallback.
17
+ */
18
+ function CollapseToggleRaw({
14
19
  isCollapsed,
15
20
  onClick,
16
21
  readMoreLabel,
17
22
  showLessLabel,
18
23
  isUser,
19
24
  isCompact,
20
- }) => {
25
+ }: CollapseToggleProps) {
21
26
  const textSize = isCompact ? 'text-xs' : 'text-sm';
22
27
  return (
23
28
  <button
@@ -46,7 +51,7 @@ export const CollapseToggle: React.FC<CollapseToggleProps> = ({
46
51
  );
47
52
  };
48
53
 
49
- function Chevron({ direction }: { direction: 'up' | 'down' }) {
54
+ const Chevron = memo(function Chevron({ direction }: { direction: 'up' | 'down' }) {
50
55
  return (
51
56
  <svg className="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
52
57
  <path
@@ -57,4 +62,6 @@ function Chevron({ direction }: { direction: 'up' | 'down' }) {
57
62
  />
58
63
  </svg>
59
64
  );
60
- }
65
+ });
66
+
67
+ export const CollapseToggle = memo(CollapseToggleRaw);
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
3
+ import React, { memo } from 'react';
4
4
  import ReactMarkdown from 'react-markdown';
5
5
  import rehypeExternalLinks from 'rehype-external-links';
6
6
  import rehypeRaw from 'rehype-raw';
@@ -49,8 +49,13 @@ import { applyPreprocess, buildLinkRulesComponent, collectProtocols } from './li
49
49
  * linkRules={[machineMentionRule]}
50
50
  * />
51
51
  * ```
52
+ *
53
+ * Memoised: re-renders only when props change. `content` is the main
54
+ * trigger — all other props (className, isUser, isCompact, etc.) are
55
+ * compared by value/reference. `onCollapseChange` is compared by
56
+ * reference — callers should stabilise it with useCallback.
52
57
  */
53
- export const MarkdownMessage: React.FC<MarkdownMessageProps> = ({
58
+ function MarkdownMessageRaw({
54
59
  content,
55
60
  className = '',
56
61
  isUser = false,
@@ -66,7 +71,7 @@ export const MarkdownMessage: React.FC<MarkdownMessageProps> = ({
66
71
  showLessLabel = 'Show less',
67
72
  defaultExpanded = false,
68
73
  onCollapseChange,
69
- }) => {
74
+ }: MarkdownMessageProps) {
70
75
  // Pre-process content through any rules that requested it. Done
71
76
  // before trim so a rule can rewrite multi-line shapes too.
72
77
  const preprocessed = React.useMemo(
@@ -250,4 +255,6 @@ export const MarkdownMessage: React.FC<MarkdownMessageProps> = ({
250
255
  );
251
256
  };
252
257
 
258
+ export const MarkdownMessage = memo(MarkdownMessageRaw);
259
+
253
260
  export default MarkdownMessage;
@@ -78,10 +78,16 @@ 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;
85
+ /** Extra className forwarded to the `<Composer>` wrapper div. */
86
+ composerClassName?: string;
81
87
  }
82
88
 
83
89
  export function ChatRoot(props: ChatRootProps) {
84
- const { transport, config, initialSessionId, autoCreateSession, streaming, audio, debug, className, ...slots } = props;
90
+ const { transport, config, initialSessionId, autoCreateSession, streaming, audio, debug, className, listClassName, ...slots } = props;
85
91
  return (
86
92
  <ChatProvider
87
93
  transport={transport}
@@ -92,17 +98,18 @@ export function ChatRoot(props: ChatRootProps) {
92
98
  audio={audio}
93
99
  debug={debug}
94
100
  >
95
- <ChatRootShell className={className} slots={slots} />
101
+ <ChatRootShell className={className} listClassName={listClassName} slots={slots} />
96
102
  </ChatProvider>
97
103
  );
98
104
  }
99
105
 
100
106
  interface ChatRootShellProps {
101
107
  className?: string;
102
- slots: Omit<ChatRootProps, 'transport' | 'config' | 'initialSessionId' | 'autoCreateSession' | 'streaming' | 'audio' | 'debug' | 'className'>;
108
+ listClassName?: string;
109
+ slots: Omit<ChatRootProps, 'transport' | 'config' | 'initialSessionId' | 'autoCreateSession' | 'streaming' | 'audio' | 'debug' | 'className' | 'listClassName'>;
103
110
  }
104
111
 
105
- function ChatRootShell({ className, slots }: ChatRootShellProps) {
112
+ function ChatRootShell({ className, listClassName, slots }: ChatRootShellProps) {
106
113
  const chat = useChatContext();
107
114
  const composer = useChatComposer({
108
115
  onSubmit: (content, attachments) => chat.sendMessage(content, attachments),
@@ -178,6 +185,7 @@ function ChatRootShell({ className, slots }: ChatRootShellProps) {
178
185
  bottomRef={bottomRef}
179
186
  renderItem={renderItem}
180
187
  renderEmpty={() => <>{emptyNode}</>}
188
+ className={listClassName}
181
189
  />
182
190
  <div className="pointer-events-none absolute inset-x-0 bottom-2 flex justify-center">
183
191
  {slots.jumpToLatest ?? (