@djangocfg/ui-tools 2.1.334 → 2.1.336

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 (196) hide show
  1. package/README.md +68 -2
  2. package/dist/ChatRoot-IIYQEWUU.mjs +5 -0
  3. package/dist/ChatRoot-IIYQEWUU.mjs.map +1 -0
  4. package/dist/ChatRoot-PNNGQCYF.css +7 -0
  5. package/dist/ChatRoot-PNNGQCYF.css.map +1 -0
  6. package/dist/ChatRoot-UUKTYM4N.cjs +14 -0
  7. package/dist/ChatRoot-UUKTYM4N.cjs.map +1 -0
  8. package/dist/{CronScheduler.client-3O3VU4CI.mjs → CronScheduler.client-DLMXCPAJ.mjs} +4 -4
  9. package/dist/{CronScheduler.client-3O3VU4CI.mjs.map → CronScheduler.client-DLMXCPAJ.mjs.map} +1 -1
  10. package/dist/{CronScheduler.client-A4GO6YBY.cjs → CronScheduler.client-WEJF4PWQ.cjs} +14 -14
  11. package/dist/{CronScheduler.client-A4GO6YBY.cjs.map → CronScheduler.client-WEJF4PWQ.cjs.map} +1 -1
  12. package/dist/{DocsLayout-XLDB6CJ2.cjs → DocsLayout-N5ZJZPBY.cjs} +200 -199
  13. package/dist/DocsLayout-N5ZJZPBY.cjs.map +1 -0
  14. package/dist/{DocsLayout-CTJINVBM.mjs → DocsLayout-VFPPNKSQ.mjs} +7 -6
  15. package/dist/DocsLayout-VFPPNKSQ.mjs.map +1 -0
  16. package/dist/JsonSchemaForm-DD7CLRIG.cjs +13 -0
  17. package/dist/{JsonSchemaForm-OSPUUUHM.cjs.map → JsonSchemaForm-DD7CLRIG.cjs.map} +1 -1
  18. package/dist/JsonSchemaForm-XKUIVELK.mjs +4 -0
  19. package/dist/{JsonSchemaForm-TSLX2GRO.mjs.map → JsonSchemaForm-XKUIVELK.mjs.map} +1 -1
  20. package/dist/JsonTree-55625VVH.mjs +5 -0
  21. package/dist/{JsonTree-F27RMYSI.cjs.map → JsonTree-55625VVH.mjs.map} +1 -1
  22. package/dist/JsonTree-DCM5QGWF.cjs +11 -0
  23. package/dist/{JsonTree-QTJYSHCV.mjs.map → JsonTree-DCM5QGWF.cjs.map} +1 -1
  24. package/dist/{LottiePlayer.client-6WVWDO75.cjs → LottiePlayer.client-2S7ISJ2S.cjs} +6 -6
  25. package/dist/{LottiePlayer.client-6WVWDO75.cjs.map → LottiePlayer.client-2S7ISJ2S.cjs.map} +1 -1
  26. package/dist/{LottiePlayer.client-B4I6WNZM.mjs → LottiePlayer.client-5LDSSJWS.mjs} +4 -4
  27. package/dist/{LottiePlayer.client-B4I6WNZM.mjs.map → LottiePlayer.client-5LDSSJWS.mjs.map} +1 -1
  28. package/dist/{MapContainer-RYG4HPH4.cjs → MapContainer-76YL2JXL.cjs} +8 -8
  29. package/dist/{MapContainer-RYG4HPH4.cjs.map → MapContainer-76YL2JXL.cjs.map} +1 -1
  30. package/dist/{MapContainer-GXQLP5WY.mjs → MapContainer-7HXBI3OH.mjs} +3 -3
  31. package/dist/{MapContainer-GXQLP5WY.mjs.map → MapContainer-7HXBI3OH.mjs.map} +1 -1
  32. package/dist/{Mermaid.client-SXRRI2YW.mjs → Mermaid.client-NL4SVR7F.mjs} +4 -4
  33. package/dist/{Mermaid.client-SXRRI2YW.mjs.map → Mermaid.client-NL4SVR7F.mjs.map} +1 -1
  34. package/dist/{Mermaid.client-W76R5AKJ.cjs → Mermaid.client-NNTI6DFX.cjs} +26 -26
  35. package/dist/{Mermaid.client-W76R5AKJ.cjs.map → Mermaid.client-NNTI6DFX.cjs.map} +1 -1
  36. package/dist/Player-BRV7XTWR.mjs +4 -0
  37. package/dist/{Player-M3GC3VPE.mjs.map → Player-BRV7XTWR.mjs.map} +1 -1
  38. package/dist/Player-PM7F7DD7.cjs +13 -0
  39. package/dist/{Player-ZL2X5LGG.cjs.map → Player-PM7F7DD7.cjs.map} +1 -1
  40. package/dist/{PrettyCode.client-RPDIE5CH.cjs → PrettyCode.client-KOHDVPPN.cjs} +13 -13
  41. package/dist/{PrettyCode.client-RPDIE5CH.cjs.map → PrettyCode.client-KOHDVPPN.cjs.map} +1 -1
  42. package/dist/{PrettyCode.client-SPMTQEG4.mjs → PrettyCode.client-ZGYGKE7G.mjs} +4 -4
  43. package/dist/{PrettyCode.client-SPMTQEG4.mjs.map → PrettyCode.client-ZGYGKE7G.mjs.map} +1 -1
  44. package/dist/TreeRoot-N72OYKXU.cjs +19 -0
  45. package/dist/{TreeRoot-A3J65L6F.mjs.map → TreeRoot-N72OYKXU.cjs.map} +1 -1
  46. package/dist/TreeRoot-VGAIXCUA.mjs +4 -0
  47. package/dist/{TreeRoot-DSK5JILT.cjs.map → TreeRoot-VGAIXCUA.mjs.map} +1 -1
  48. package/dist/chunk-2ZLKZ5VR.mjs +631 -0
  49. package/dist/chunk-2ZLKZ5VR.mjs.map +1 -0
  50. package/dist/{chunk-LFWQ36LJ.mjs → chunk-5G5YBFS6.mjs} +4 -4
  51. package/dist/{chunk-LFWQ36LJ.mjs.map → chunk-5G5YBFS6.mjs.map} +1 -1
  52. package/dist/{chunk-IHAY6FO6.cjs → chunk-5I5QNGUG.cjs} +17 -17
  53. package/dist/{chunk-IHAY6FO6.cjs.map → chunk-5I5QNGUG.cjs.map} +1 -1
  54. package/dist/{chunk-F2CMIIOH.cjs → chunk-76NNDZH6.cjs} +42 -42
  55. package/dist/{chunk-F2CMIIOH.cjs.map → chunk-76NNDZH6.cjs.map} +1 -1
  56. package/dist/chunk-B5AWZOHJ.cjs +649 -0
  57. package/dist/chunk-B5AWZOHJ.cjs.map +1 -0
  58. package/dist/{chunk-KR6B3LVY.mjs → chunk-B6IR5KSC.mjs} +3 -3
  59. package/dist/{chunk-KR6B3LVY.mjs.map → chunk-B6IR5KSC.mjs.map} +1 -1
  60. package/dist/{chunk-5LBDYFWH.mjs → chunk-C6GXVH5J.mjs} +3 -3
  61. package/dist/{chunk-5LBDYFWH.mjs.map → chunk-C6GXVH5J.mjs.map} +1 -1
  62. package/dist/{chunk-4IW7GZFQ.cjs → chunk-FEN5S772.cjs} +74 -48
  63. package/dist/chunk-FEN5S772.cjs.map +1 -0
  64. package/dist/{chunk-2SMCH62O.cjs → chunk-FP2RLYQZ.cjs} +11 -11
  65. package/dist/{chunk-2SMCH62O.cjs.map → chunk-FP2RLYQZ.cjs.map} +1 -1
  66. package/dist/{chunk-MOME6KYD.mjs → chunk-G5IEC7SR.mjs} +3 -3
  67. package/dist/{chunk-MOME6KYD.mjs.map → chunk-G5IEC7SR.mjs.map} +1 -1
  68. package/dist/{chunk-EXGXUK2N.mjs → chunk-GYIO7W7M.mjs} +41 -15
  69. package/dist/chunk-GYIO7W7M.mjs.map +1 -0
  70. package/dist/{chunk-3Z3A7FHA.cjs → chunk-IEEAENLX.cjs} +48 -48
  71. package/dist/{chunk-3Z3A7FHA.cjs.map → chunk-IEEAENLX.cjs.map} +1 -1
  72. package/dist/{chunk-DFTVB66S.cjs → chunk-KNDLV4PI.cjs} +85 -85
  73. package/dist/{chunk-DFTVB66S.cjs.map → chunk-KNDLV4PI.cjs.map} +1 -1
  74. package/dist/{chunk-SSUOENAZ.mjs → chunk-KNEQRUBA.mjs} +3 -3
  75. package/dist/{chunk-SSUOENAZ.mjs.map → chunk-KNEQRUBA.mjs.map} +1 -1
  76. package/dist/chunk-KRETIZU6.mjs +2218 -0
  77. package/dist/chunk-KRETIZU6.mjs.map +1 -0
  78. package/dist/{chunk-CGILA3WO.mjs → chunk-N2XQF2OL.mjs} +5 -3
  79. package/dist/{chunk-CGILA3WO.mjs.map → chunk-N2XQF2OL.mjs.map} +1 -1
  80. package/dist/{chunk-EUADAUBQ.mjs → chunk-N4MZYNR4.mjs} +4 -4
  81. package/dist/{chunk-EUADAUBQ.mjs.map → chunk-N4MZYNR4.mjs.map} +1 -1
  82. package/dist/chunk-NRXYYO5V.cjs +2257 -0
  83. package/dist/chunk-NRXYYO5V.cjs.map +1 -0
  84. package/dist/{chunk-GGKGH5PM.mjs → chunk-OBRSGM64.mjs} +4 -4
  85. package/dist/{chunk-GGKGH5PM.mjs.map → chunk-OBRSGM64.mjs.map} +1 -1
  86. package/dist/{chunk-6JTB2X72.mjs → chunk-ODO4GMW7.mjs} +3 -3
  87. package/dist/{chunk-6JTB2X72.mjs.map → chunk-ODO4GMW7.mjs.map} +1 -1
  88. package/dist/{chunk-WGEGR3DF.cjs → chunk-OLISEQHS.cjs} +5 -2
  89. package/dist/{chunk-WGEGR3DF.cjs.map → chunk-OLISEQHS.cjs.map} +1 -1
  90. package/dist/{chunk-PZKAH7WQ.mjs → chunk-PVAX67JG.mjs} +3 -3
  91. package/dist/{chunk-PZKAH7WQ.mjs.map → chunk-PVAX67JG.mjs.map} +1 -1
  92. package/dist/{chunk-PRPG2T2E.cjs → chunk-QJ6GTUCO.cjs} +6 -6
  93. package/dist/{chunk-PRPG2T2E.cjs.map → chunk-QJ6GTUCO.cjs.map} +1 -1
  94. package/dist/chunk-QW4RBGHN.cjs +961 -0
  95. package/dist/chunk-QW4RBGHN.cjs.map +1 -0
  96. package/dist/{chunk-33AMWFBZ.cjs → chunk-SGP7V2UW.cjs} +15 -15
  97. package/dist/{chunk-33AMWFBZ.cjs.map → chunk-SGP7V2UW.cjs.map} +1 -1
  98. package/dist/{chunk-FX2QFYWF.mjs → chunk-VWQ5WOIL.mjs} +3 -3
  99. package/dist/{chunk-FX2QFYWF.mjs.map → chunk-VWQ5WOIL.mjs.map} +1 -1
  100. package/dist/{chunk-ZLQHUZDU.cjs → chunk-YDPDTOSP.cjs} +139 -139
  101. package/dist/{chunk-ZLQHUZDU.cjs.map → chunk-YDPDTOSP.cjs.map} +1 -1
  102. package/dist/{chunk-77HQWEQ6.cjs → chunk-YW5IVWHQ.cjs} +33 -33
  103. package/dist/{chunk-77HQWEQ6.cjs.map → chunk-YW5IVWHQ.cjs.map} +1 -1
  104. package/dist/{chunk-YXBOAGIM.cjs → chunk-YXZ6GU7H.cjs} +7 -7
  105. package/dist/{chunk-YXBOAGIM.cjs.map → chunk-YXZ6GU7H.cjs.map} +1 -1
  106. package/dist/{chunk-62Y65TGK.mjs → chunk-ZUFTH5IR.mjs} +8 -631
  107. package/dist/chunk-ZUFTH5IR.mjs.map +1 -0
  108. package/dist/components-EHOGXATG.cjs +22 -0
  109. package/dist/{components-5UXYNAKR.cjs.map → components-EHOGXATG.cjs.map} +1 -1
  110. package/dist/components-MQ6DR7TX.cjs +26 -0
  111. package/dist/{components-CFXOEVPN.mjs.map → components-MQ6DR7TX.cjs.map} +1 -1
  112. package/dist/components-XRX7QGLB.mjs +5 -0
  113. package/dist/{components-WYEZL5TE.cjs.map → components-XRX7QGLB.mjs.map} +1 -1
  114. package/dist/components-YATKRWLH.mjs +5 -0
  115. package/dist/{components-ZAGG2PBO.mjs.map → components-YATKRWLH.mjs.map} +1 -1
  116. package/dist/file-icon/index.cjs +6 -6
  117. package/dist/file-icon/index.mjs +1 -1
  118. package/dist/index.cjs +735 -215
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.cts +972 -39
  121. package/dist/index.d.ts +972 -39
  122. package/dist/index.mjs +387 -31
  123. package/dist/index.mjs.map +1 -1
  124. package/dist/tree/index.cjs +38 -38
  125. package/dist/tree/index.d.cts +2 -2
  126. package/dist/tree/index.d.ts +2 -2
  127. package/dist/tree/index.mjs +3 -3
  128. package/package.json +6 -6
  129. package/src/index.ts +5 -0
  130. package/src/stories/index.ts +3 -1
  131. package/src/tools/Chat/Chat.story.tsx +1006 -0
  132. package/src/tools/Chat/README.md +528 -0
  133. package/src/tools/Chat/components/Attachments.tsx +192 -0
  134. package/src/tools/Chat/components/ChatRoot.tsx +201 -0
  135. package/src/tools/Chat/components/Composer.tsx +134 -0
  136. package/src/tools/Chat/components/EmptyState.tsx +47 -0
  137. package/src/tools/Chat/components/ErrorBanner.tsx +47 -0
  138. package/src/tools/Chat/components/JumpToLatest.tsx +30 -0
  139. package/src/tools/Chat/components/MessageActions.tsx +72 -0
  140. package/src/tools/Chat/components/MessageBubble.tsx +228 -0
  141. package/src/tools/Chat/components/MessageList.tsx +82 -0
  142. package/src/tools/Chat/components/Sources.tsx +55 -0
  143. package/src/tools/Chat/components/StreamingIndicator.tsx +29 -0
  144. package/src/tools/Chat/components/ToolCalls.tsx +172 -0
  145. package/src/tools/Chat/components/index.ts +24 -0
  146. package/src/tools/Chat/config.ts +55 -0
  147. package/src/tools/Chat/context/ChatProvider.tsx +122 -0
  148. package/src/tools/Chat/context/index.ts +9 -0
  149. package/src/tools/Chat/core/audio/audioBus.ts +172 -0
  150. package/src/tools/Chat/core/audio/index.ts +8 -0
  151. package/src/tools/Chat/core/audio/preferences.ts +68 -0
  152. package/src/tools/Chat/core/audio/types.ts +49 -0
  153. package/src/tools/Chat/core/ids.ts +16 -0
  154. package/src/tools/Chat/core/index.ts +5 -0
  155. package/src/tools/Chat/core/markdown.ts +56 -0
  156. package/src/tools/Chat/core/payload-dispatch.ts +54 -0
  157. package/src/tools/Chat/core/persona.ts +35 -0
  158. package/src/tools/Chat/core/reducer.ts +335 -0
  159. package/src/tools/Chat/core/transport/http.ts +167 -0
  160. package/src/tools/Chat/core/transport/index.ts +13 -0
  161. package/src/tools/Chat/core/transport/mock.ts +134 -0
  162. package/src/tools/Chat/core/transport/sse.ts +116 -0
  163. package/src/tools/Chat/core/transport/types.ts +24 -0
  164. package/src/tools/Chat/hooks/index.ts +26 -0
  165. package/src/tools/Chat/hooks/useChat.ts +440 -0
  166. package/src/tools/Chat/hooks/useChatAudio.ts +191 -0
  167. package/src/tools/Chat/hooks/useChatComposer.ts +227 -0
  168. package/src/tools/Chat/hooks/useChatHistory.ts +59 -0
  169. package/src/tools/Chat/hooks/useChatLayout.ts +111 -0
  170. package/src/tools/Chat/hooks/useChatLightbox.ts +34 -0
  171. package/src/tools/Chat/hooks/useChatScroll.ts +132 -0
  172. package/src/tools/Chat/index.ts +158 -0
  173. package/src/tools/Chat/lazy.tsx +14 -0
  174. package/src/tools/Chat/types.ts +237 -0
  175. package/src/tools/Chat/utils/collectImageAttachments.ts +13 -0
  176. package/src/tools/JsonForm/JsonSchemaForm.tsx +32 -1
  177. package/src/tools/Map/README.md +384 -0
  178. package/dist/DocsLayout-CTJINVBM.mjs.map +0 -1
  179. package/dist/DocsLayout-XLDB6CJ2.cjs.map +0 -1
  180. package/dist/JsonSchemaForm-OSPUUUHM.cjs +0 -13
  181. package/dist/JsonSchemaForm-TSLX2GRO.mjs +0 -4
  182. package/dist/JsonTree-F27RMYSI.cjs +0 -11
  183. package/dist/JsonTree-QTJYSHCV.mjs +0 -5
  184. package/dist/Player-M3GC3VPE.mjs +0 -4
  185. package/dist/Player-ZL2X5LGG.cjs +0 -13
  186. package/dist/TreeRoot-A3J65L6F.mjs +0 -4
  187. package/dist/TreeRoot-DSK5JILT.cjs +0 -19
  188. package/dist/chunk-4IW7GZFQ.cjs.map +0 -1
  189. package/dist/chunk-62Y65TGK.mjs.map +0 -1
  190. package/dist/chunk-EXGXUK2N.mjs.map +0 -1
  191. package/dist/chunk-TKSFZHCG.cjs +0 -1597
  192. package/dist/chunk-TKSFZHCG.cjs.map +0 -1
  193. package/dist/components-5UXYNAKR.cjs +0 -22
  194. package/dist/components-CFXOEVPN.mjs +0 -5
  195. package/dist/components-WYEZL5TE.cjs +0 -26
  196. package/dist/components-ZAGG2PBO.mjs +0 -5
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkWGEGR3DF_cjs = require('./chunk-WGEGR3DF.cjs');
3
+ var chunkOLISEQHS_cjs = require('./chunk-OLISEQHS.cjs');
4
4
  var React = require('react');
5
5
  var lib = require('@djangocfg/ui-core/lib');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -33,13 +33,13 @@ var DEFAULT_TREE_LABELS = {
33
33
  empty: "Nothing to show",
34
34
  error: "Failed to load",
35
35
  searchPlaceholder: "Search\u2026",
36
- searchMatches: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((n) => `${n} match${n === 1 ? "" : "es"}`, "searchMatches"),
36
+ searchMatches: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((n) => `${n} match${n === 1 ? "" : "es"}`, "searchMatches"),
37
37
  ariaLabel: "Tree"
38
38
  };
39
39
 
40
40
  // src/tools/Tree/data/childCache.ts
41
- var createChildCache = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => /* @__PURE__ */ new Map(), "createChildCache");
42
- var resolveChildren = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((cache, node) => {
41
+ var createChildCache = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => /* @__PURE__ */ new Map(), "createChildCache");
42
+ var resolveChildren = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((cache, node) => {
43
43
  if (Array.isArray(node.children)) {
44
44
  return { children: node.children, status: "loaded" };
45
45
  }
@@ -52,7 +52,7 @@ var resolveChildren = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((cache, node) =>
52
52
  }, "resolveChildren");
53
53
 
54
54
  // src/tools/Tree/data/flatten.ts
55
- var isNodeFolder = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((node) => {
55
+ var isNodeFolder = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((node) => {
56
56
  if (typeof node.isFolder === "boolean") return node.isFolder;
57
57
  return Array.isArray(node.children);
58
58
  }, "isNodeFolder");
@@ -63,7 +63,7 @@ function flattenTree({
63
63
  filterNode
64
64
  }) {
65
65
  const out = [];
66
- const walk = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((nodes, level, parentId) => {
66
+ const walk = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((nodes, level, parentId) => {
67
67
  for (const node of nodes) {
68
68
  if (filterNode && !filterNode(node)) continue;
69
69
  const isFolder = isNodeFolder(node);
@@ -86,7 +86,7 @@ function flattenTree({
86
86
  walk(roots, 0, null);
87
87
  return out;
88
88
  }
89
- chunkWGEGR3DF_cjs.__name(flattenTree, "flattenTree");
89
+ chunkOLISEQHS_cjs.__name(flattenTree, "flattenTree");
90
90
 
91
91
  // src/tools/Tree/data/persist.ts
92
92
  var KEY_PREFIX = "@djangocfg/tree:";
@@ -99,7 +99,7 @@ function safeStorage() {
99
99
  return null;
100
100
  }
101
101
  }
102
- chunkWGEGR3DF_cjs.__name(safeStorage, "safeStorage");
102
+ chunkOLISEQHS_cjs.__name(safeStorage, "safeStorage");
103
103
  function loadTreeState(key) {
104
104
  const storage = safeStorage();
105
105
  if (!storage) return null;
@@ -116,7 +116,7 @@ function loadTreeState(key) {
116
116
  return null;
117
117
  }
118
118
  }
119
- chunkWGEGR3DF_cjs.__name(loadTreeState, "loadTreeState");
119
+ chunkOLISEQHS_cjs.__name(loadTreeState, "loadTreeState");
120
120
  function saveTreeState(key, state) {
121
121
  const storage = safeStorage();
122
122
  if (!storage) return;
@@ -126,7 +126,7 @@ function saveTreeState(key, state) {
126
126
  } catch {
127
127
  }
128
128
  }
129
- chunkWGEGR3DF_cjs.__name(saveTreeState, "saveTreeState");
129
+ chunkOLISEQHS_cjs.__name(saveTreeState, "saveTreeState");
130
130
  function clearTreeState(key) {
131
131
  const storage = safeStorage();
132
132
  if (!storage) return;
@@ -135,7 +135,7 @@ function clearTreeState(key) {
135
135
  } catch {
136
136
  }
137
137
  }
138
- chunkWGEGR3DF_cjs.__name(clearTreeState, "clearTreeState");
138
+ chunkOLISEQHS_cjs.__name(clearTreeState, "clearTreeState");
139
139
 
140
140
  // src/tools/Tree/data/appearance.ts
141
141
  var DENSITY_PRESETS = {
@@ -171,7 +171,7 @@ function resolveAppearance(input, outerIndent) {
171
171
  showActiveIndicator: input?.showActiveIndicator ?? DEFAULT_TREE_APPEARANCE.showActiveIndicator
172
172
  };
173
173
  }
174
- chunkWGEGR3DF_cjs.__name(resolveAppearance, "resolveAppearance");
174
+ chunkOLISEQHS_cjs.__name(resolveAppearance, "resolveAppearance");
175
175
  function appearanceToStyle(a) {
176
176
  return {
177
177
  ["--tree-row-height"]: `${a.rowHeight}px`,
@@ -183,7 +183,7 @@ function appearanceToStyle(a) {
183
183
  ["--tree-guide-opacity"]: a.indentGuideOpacity
184
184
  };
185
185
  }
186
- chunkWGEGR3DF_cjs.__name(appearanceToStyle, "appearanceToStyle");
186
+ chunkOLISEQHS_cjs.__name(appearanceToStyle, "appearanceToStyle");
187
187
  var RADIUS_CLASS = {
188
188
  none: "rounded-none",
189
189
  sm: "rounded-sm",
@@ -192,7 +192,7 @@ var RADIUS_CLASS = {
192
192
  function radiusClass(a) {
193
193
  return RADIUS_CLASS[a.radius];
194
194
  }
195
- chunkWGEGR3DF_cjs.__name(radiusClass, "radiusClass");
195
+ chunkOLISEQHS_cjs.__name(radiusClass, "radiusClass");
196
196
  var HOVER = {
197
197
  subtle: "hover:bg-foreground/[.03]",
198
198
  default: "hover:bg-foreground/[.06]",
@@ -221,8 +221,8 @@ function rowStateClasses(a) {
221
221
  SELECTED_ACTIVE[a.accent]
222
222
  ].join(" ");
223
223
  }
224
- chunkWGEGR3DF_cjs.__name(rowStateClasses, "rowStateClasses");
225
- var reducer = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((state, action) => {
224
+ chunkOLISEQHS_cjs.__name(rowStateClasses, "rowStateClasses");
225
+ var reducer = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((state, action) => {
226
226
  switch (action.type) {
227
227
  case "expand": {
228
228
  if (state.expanded.has(action.id)) return state;
@@ -276,13 +276,13 @@ function useTreeContext() {
276
276
  }
277
277
  return ctx;
278
278
  }
279
- chunkWGEGR3DF_cjs.__name(useTreeContext, "useTreeContext");
280
- var setEqualsArr = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((set, arr) => {
279
+ chunkOLISEQHS_cjs.__name(useTreeContext, "useTreeContext");
280
+ var setEqualsArr = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((set, arr) => {
281
281
  if (set.size !== arr.length) return false;
282
282
  for (const id of arr) if (!set.has(id)) return false;
283
283
  return true;
284
284
  }, "setEqualsArr");
285
- var collectAllIds = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((roots, cache, out) => {
285
+ var collectAllIds = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((roots, cache, out) => {
286
286
  for (const node of roots) {
287
287
  if (Array.isArray(node.children)) {
288
288
  out.push(node.id);
@@ -375,7 +375,7 @@ function TreeProvider(props) {
375
375
  );
376
376
  const nodeById = React.useMemo(() => {
377
377
  const map = /* @__PURE__ */ new Map();
378
- const walk = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((nodes) => {
378
+ const walk = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((nodes) => {
379
379
  for (const n of nodes) {
380
380
  map.set(n.id, n);
381
381
  if (Array.isArray(n.children)) walk(n.children);
@@ -570,7 +570,7 @@ function TreeProvider(props) {
570
570
  );
571
571
  return /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value, children });
572
572
  }
573
- chunkWGEGR3DF_cjs.__name(TreeProvider, "TreeProvider");
573
+ chunkOLISEQHS_cjs.__name(TreeProvider, "TreeProvider");
574
574
  function TreeChevron({ isExpanded, isFolder, className }) {
575
575
  const { appearance } = useTreeContext();
576
576
  const size = { width: "var(--tree-icon-size)", height: "var(--tree-icon-size)" };
@@ -598,7 +598,7 @@ function TreeChevron({ isExpanded, isFolder, className }) {
598
598
  }
599
599
  );
600
600
  }
601
- chunkWGEGR3DF_cjs.__name(TreeChevron, "TreeChevron");
601
+ chunkOLISEQHS_cjs.__name(TreeChevron, "TreeChevron");
602
602
  function TreeIcon({ isFolder, isExpanded, className }) {
603
603
  const { appearance } = useTreeContext();
604
604
  const Icon = isFolder ? isExpanded ? lucideReact.FolderOpen : lucideReact.Folder : lucideReact.File;
@@ -616,7 +616,7 @@ function TreeIcon({ isFolder, isExpanded, className }) {
616
616
  }
617
617
  );
618
618
  }
619
- chunkWGEGR3DF_cjs.__name(TreeIcon, "TreeIcon");
619
+ chunkOLISEQHS_cjs.__name(TreeIcon, "TreeIcon");
620
620
  function TreeIndentGuides({ level, indent }) {
621
621
  const { appearance } = useTreeContext();
622
622
  if (level <= 0) return null;
@@ -637,7 +637,7 @@ function TreeIndentGuides({ level, indent }) {
637
637
  }
638
638
  );
639
639
  }
640
- chunkWGEGR3DF_cjs.__name(TreeIndentGuides, "TreeIndentGuides");
640
+ chunkOLISEQHS_cjs.__name(TreeIndentGuides, "TreeIndentGuides");
641
641
  function TreeLabel({ children, isMatchingSearch, className }) {
642
642
  return /* @__PURE__ */ jsxRuntime.jsx(
643
643
  "span",
@@ -652,7 +652,7 @@ function TreeLabel({ children, isMatchingSearch, className }) {
652
652
  }
653
653
  );
654
654
  }
655
- chunkWGEGR3DF_cjs.__name(TreeLabel, "TreeLabel");
655
+ chunkOLISEQHS_cjs.__name(TreeLabel, "TreeLabel");
656
656
  function TreeRow({ row, className }) {
657
657
  const ctx = useTreeContext();
658
658
  const {
@@ -686,7 +686,7 @@ function TreeRow({ row, className }) {
686
686
  isLoading,
687
687
  isMatchingSearch
688
688
  };
689
- const handleClick = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((e) => {
689
+ const handleClick = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
690
690
  if (node.disabled) return;
691
691
  setFocus(node.id);
692
692
  select(node.id);
@@ -699,7 +699,7 @@ function TreeRow({ row, className }) {
699
699
  }
700
700
  e.currentTarget.scrollIntoView?.({ block: "nearest" });
701
701
  }, "handleClick");
702
- const handleDoubleClick = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
702
+ const handleDoubleClick = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
703
703
  if (node.disabled) return;
704
704
  if (isFolder) return;
705
705
  activate(node, { preview: false });
@@ -786,7 +786,7 @@ function TreeRow({ row, className }) {
786
786
  }
787
787
  return trigger;
788
788
  }
789
- chunkWGEGR3DF_cjs.__name(TreeRow, "TreeRow");
789
+ chunkOLISEQHS_cjs.__name(TreeRow, "TreeRow");
790
790
  function TreeEmpty({ children, className }) {
791
791
  return /* @__PURE__ */ jsxRuntime.jsx(
792
792
  "div",
@@ -799,7 +799,7 @@ function TreeEmpty({ children, className }) {
799
799
  }
800
800
  );
801
801
  }
802
- chunkWGEGR3DF_cjs.__name(TreeEmpty, "TreeEmpty");
802
+ chunkOLISEQHS_cjs.__name(TreeEmpty, "TreeEmpty");
803
803
  function TreeContent({ children, className, ariaLabel }) {
804
804
  const { flatRows, labels, selected, focused, matchingIds, appearance } = useTreeContext();
805
805
  if (flatRows.length === 0) {
@@ -829,15 +829,15 @@ function TreeContent({ children, className, ariaLabel }) {
829
829
  }
830
830
  );
831
831
  }
832
- chunkWGEGR3DF_cjs.__name(TreeContent, "TreeContent");
832
+ chunkOLISEQHS_cjs.__name(TreeContent, "TreeContent");
833
833
  function useTreeLabels() {
834
834
  return useTreeContext().labels;
835
835
  }
836
- chunkWGEGR3DF_cjs.__name(useTreeLabels, "useTreeLabels");
836
+ chunkOLISEQHS_cjs.__name(useTreeLabels, "useTreeLabels");
837
837
  function useTreeRows() {
838
838
  return useTreeContext().flatRows;
839
839
  }
840
- chunkWGEGR3DF_cjs.__name(useTreeRows, "useTreeRows");
840
+ chunkOLISEQHS_cjs.__name(useTreeRows, "useTreeRows");
841
841
  function useTreeSelection() {
842
842
  const ctx = useTreeContext();
843
843
  const selectedIds = React.useMemo(() => [...ctx.selected], [ctx.selected]);
@@ -856,7 +856,7 @@ function useTreeSelection() {
856
856
  [selectedIds, ctx.select, ctx.setSelectedIds, ctx.clearSelection, isSelected]
857
857
  );
858
858
  }
859
- chunkWGEGR3DF_cjs.__name(useTreeSelection, "useTreeSelection");
859
+ chunkOLISEQHS_cjs.__name(useTreeSelection, "useTreeSelection");
860
860
  function useTreeExpansion() {
861
861
  const ctx = useTreeContext();
862
862
  const expandedIds = React.useMemo(() => [...ctx.expanded], [ctx.expanded]);
@@ -885,7 +885,7 @@ function useTreeExpansion() {
885
885
  ]
886
886
  );
887
887
  }
888
- chunkWGEGR3DF_cjs.__name(useTreeExpansion, "useTreeExpansion");
888
+ chunkOLISEQHS_cjs.__name(useTreeExpansion, "useTreeExpansion");
889
889
  function useTreeFocus() {
890
890
  const ctx = useTreeContext();
891
891
  return React.useMemo(
@@ -893,7 +893,7 @@ function useTreeFocus() {
893
893
  [ctx.focused, ctx.setFocus]
894
894
  );
895
895
  }
896
- chunkWGEGR3DF_cjs.__name(useTreeFocus, "useTreeFocus");
896
+ chunkOLISEQHS_cjs.__name(useTreeFocus, "useTreeFocus");
897
897
  function useTreeSearch() {
898
898
  const ctx = useTreeContext();
899
899
  return React.useMemo(
@@ -907,7 +907,7 @@ function useTreeSearch() {
907
907
  [ctx.enableSearch, ctx.query, ctx.setQuery, ctx.matchingIds]
908
908
  );
909
909
  }
910
- chunkWGEGR3DF_cjs.__name(useTreeSearch, "useTreeSearch");
910
+ chunkOLISEQHS_cjs.__name(useTreeSearch, "useTreeSearch");
911
911
  function useTreeActions() {
912
912
  const ctx = useTreeContext();
913
913
  return React.useMemo(
@@ -933,7 +933,7 @@ function useTreeActions() {
933
933
  ]
934
934
  );
935
935
  }
936
- chunkWGEGR3DF_cjs.__name(useTreeActions, "useTreeActions");
936
+ chunkOLISEQHS_cjs.__name(useTreeActions, "useTreeActions");
937
937
  function TreeSearchInput({ className, showMatches = true }) {
938
938
  const { labels } = useTreeContext();
939
939
  const { query, setQuery, matchCount } = useTreeSearch();
@@ -971,7 +971,7 @@ function TreeSearchInput({ className, showMatches = true }) {
971
971
  }
972
972
  );
973
973
  }
974
- chunkWGEGR3DF_cjs.__name(TreeSearchInput, "TreeSearchInput");
974
+ chunkOLISEQHS_cjs.__name(TreeSearchInput, "TreeSearchInput");
975
975
  function useTreeKeyboard({
976
976
  rows,
977
977
  focusedId,
@@ -987,7 +987,7 @@ function useTreeKeyboard({
987
987
  const focusedIdRef = React.useRef(focusedId);
988
988
  rowsRef.current = rows;
989
989
  focusedIdRef.current = focusedId;
990
- const getCurrent = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
990
+ const getCurrent = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
991
991
  const r = rowsRef.current;
992
992
  const id = focusedIdRef.current;
993
993
  const idx = id ? r.findIndex((x) => x.node.id === id) : -1;
@@ -1093,7 +1093,7 @@ function useTreeKeyboard({
1093
1093
  );
1094
1094
  return { ref };
1095
1095
  }
1096
- chunkWGEGR3DF_cjs.__name(useTreeKeyboard, "useTreeKeyboard");
1096
+ chunkOLISEQHS_cjs.__name(useTreeKeyboard, "useTreeKeyboard");
1097
1097
  var FLUSH_MS = 600;
1098
1098
  function useTreeTypeAhead({
1099
1099
  rows,
@@ -1114,14 +1114,14 @@ function useTreeTypeAhead({
1114
1114
  if (!enabled) return;
1115
1115
  const target = containerRef.current;
1116
1116
  if (!target) return;
1117
- const reset = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
1117
+ const reset = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
1118
1118
  bufferRef.current = "";
1119
1119
  if (timerRef.current) {
1120
1120
  clearTimeout(timerRef.current);
1121
1121
  timerRef.current = null;
1122
1122
  }
1123
1123
  }, "reset");
1124
- const handler = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((e) => {
1124
+ const handler = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
1125
1125
  const tag = e.target?.tagName;
1126
1126
  if (tag === "INPUT" || tag === "TEXTAREA") return;
1127
1127
  if (e.target?.isContentEditable) return;
@@ -1150,7 +1150,7 @@ function useTreeTypeAhead({
1150
1150
  };
1151
1151
  }, [containerRef, enabled]);
1152
1152
  }
1153
- chunkWGEGR3DF_cjs.__name(useTreeTypeAhead, "useTreeTypeAhead");
1153
+ chunkOLISEQHS_cjs.__name(useTreeTypeAhead, "useTreeTypeAhead");
1154
1154
  function TreeRoot(props) {
1155
1155
  const {
1156
1156
  data,
@@ -1218,7 +1218,7 @@ function TreeRoot(props) {
1218
1218
  }
1219
1219
  );
1220
1220
  }
1221
- chunkWGEGR3DF_cjs.__name(TreeRoot, "TreeRoot");
1221
+ chunkOLISEQHS_cjs.__name(TreeRoot, "TreeRoot");
1222
1222
  function TreeRootShell({
1223
1223
  className,
1224
1224
  style,
@@ -1233,7 +1233,7 @@ function TreeRootShell({
1233
1233
  focusedId: ctx.focused,
1234
1234
  onFocus: ctx.setFocus,
1235
1235
  onSelect: ctx.select,
1236
- onActivate: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((id) => {
1236
+ onActivate: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((id) => {
1237
1237
  const row = ctx.flatRows.find((r) => r.node.id === id);
1238
1238
  if (row) ctx.activate(row.node, { preview: false });
1239
1239
  }, "onActivate"),
@@ -1283,7 +1283,7 @@ function TreeRootShell({
1283
1283
  }
1284
1284
  );
1285
1285
  }
1286
- chunkWGEGR3DF_cjs.__name(TreeRootShell, "TreeRootShell");
1286
+ chunkOLISEQHS_cjs.__name(TreeRootShell, "TreeRootShell");
1287
1287
  var TreeRoot_default = TreeRoot;
1288
1288
 
1289
1289
  exports.DEFAULT_TREE_APPEARANCE = DEFAULT_TREE_APPEARANCE;
@@ -1317,5 +1317,5 @@ exports.useTreeRows = useTreeRows;
1317
1317
  exports.useTreeSearch = useTreeSearch;
1318
1318
  exports.useTreeSelection = useTreeSelection;
1319
1319
  exports.useTreeTypeAhead = useTreeTypeAhead;
1320
- //# sourceMappingURL=chunk-3Z3A7FHA.cjs.map
1321
- //# sourceMappingURL=chunk-3Z3A7FHA.cjs.map
1320
+ //# sourceMappingURL=chunk-IEEAENLX.cjs.map
1321
+ //# sourceMappingURL=chunk-IEEAENLX.cjs.map