@floegence/floe-webapp-core 0.17.0 → 0.19.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.
Files changed (230) hide show
  1. package/dist/{index92.js → app/ActivityAppsMain.js} +3 -3
  2. package/dist/{index91.js → app/FloeApp.js} +5 -5
  3. package/dist/{index90.js → app/FloeProvider.js} +8 -8
  4. package/dist/{index93.js → app/FloeRegistryRuntime.js} +1 -1
  5. package/dist/app.d.ts +1 -0
  6. package/dist/app.js +10 -0
  7. package/dist/chat.css +2 -2
  8. package/dist/chat.d.ts +1 -0
  9. package/dist/chat.js +75 -0
  10. package/dist/{index57.js → components/chat/ChatContainer.js} +8 -10
  11. package/dist/{index58.js → components/chat/ChatProvider.js} +6 -6
  12. package/dist/{index67.js → components/chat/blocks/BlockRenderer.js} +14 -14
  13. package/dist/{index75.js → components/chat/blocks/ChecklistBlock.js} +2 -2
  14. package/dist/{index70.js → components/chat/blocks/CodeBlock.js} +3 -3
  15. package/dist/{index71.js → components/chat/blocks/CodeDiffBlock.js} +2 -2
  16. package/dist/{index77.js → components/chat/blocks/FileBlock.js} +5 -5
  17. package/dist/components/chat/blocks/ImageBlock.js +201 -0
  18. package/dist/{index69.js → components/chat/blocks/MarkdownBlock.js} +2 -2
  19. package/dist/components/chat/blocks/MermaidBlock.js +200 -0
  20. package/dist/{index76.js → components/chat/blocks/ShellBlock.js} +1 -1
  21. package/dist/{index73.js → components/chat/blocks/SvgBlock.js} +1 -1
  22. package/dist/{index68.js → components/chat/blocks/TextBlock.js} +1 -1
  23. package/dist/{index78.js → components/chat/blocks/ThinkingBlock.js} +1 -1
  24. package/dist/{index79.js → components/chat/blocks/ToolCallBlock.js} +4 -4
  25. package/dist/components/chat/hooks/useAutoScroll.js +44 -0
  26. package/dist/{index81.js → components/chat/input/AttachmentPreview.js} +5 -5
  27. package/dist/{index80.js → components/chat/input/ChatInput.js} +8 -8
  28. package/dist/{index66.js → components/chat/message/MessageActions.js} +6 -6
  29. package/dist/{index64.js → components/chat/message/MessageAvatar.js} +1 -1
  30. package/dist/components/chat/message/MessageBubble.js +36 -0
  31. package/dist/{index62.js → components/chat/message/MessageItem.js} +6 -6
  32. package/dist/{index65.js → components/chat/message/MessageMeta.js} +1 -1
  33. package/dist/components/chat/message-list/SimpleMessageList.js +97 -0
  34. package/dist/{index60.js → components/chat/message-list/VirtualMessageList.js} +13 -22
  35. package/dist/{index84.js → components/chat/status/ConnectionStatus.js} +1 -1
  36. package/dist/{index83.js → components/chat/status/StreamingCursor.js} +1 -1
  37. package/dist/{index82.js → components/chat/status/WorkingIndicator.js} +1 -1
  38. package/dist/{index12.js → components/deck/DeckCell.js} +6 -6
  39. package/dist/{index11.js → components/deck/DeckGrid.js} +6 -6
  40. package/dist/{index18.js → components/deck/DeckTopBar.js} +12 -12
  41. package/dist/{index19.js → components/deck/DropZonePreview.js} +2 -2
  42. package/dist/{index17.js → components/deck/LayoutSelector.js} +7 -7
  43. package/dist/{index13.js → components/deck/WidgetFrame.js} +8 -8
  44. package/dist/{index15.js → components/deck/WidgetPalette.js} +9 -9
  45. package/dist/{index14.js → components/deck/WidgetResizeHandle.js} +10 -10
  46. package/dist/{index16.js → components/deck/WidgetTypeSwitcher.js} +9 -9
  47. package/dist/{index54.js → components/file-browser/Breadcrumb.js} +8 -8
  48. package/dist/{index50.js → components/file-browser/DirectoryTree.js} +41 -41
  49. package/dist/components/file-browser/DragPreview.d.ts +2 -1
  50. package/dist/components/file-browser/DragPreview.js +192 -0
  51. package/dist/{index48.js → components/file-browser/FileBrowser.js} +14 -14
  52. package/dist/{index49.js → components/file-browser/FileBrowserContext.js} +5 -5
  53. package/dist/{index55.js → components/file-browser/FileBrowserToolbar.js} +7 -7
  54. package/dist/components/file-browser/FileContextMenu.js +225 -0
  55. package/dist/{index52.js → components/file-browser/FileGridView.js} +69 -65
  56. package/dist/{index51.js → components/file-browser/FileListView.js} +141 -137
  57. package/dist/{index43.js → components/launchpad/Launchpad.js} +58 -54
  58. package/dist/{index45.js → components/launchpad/LaunchpadGrid.js} +1 -1
  59. package/dist/{index44.js → components/launchpad/LaunchpadItem.js} +6 -6
  60. package/dist/{index47.js → components/launchpad/LaunchpadPagination.js} +5 -5
  61. package/dist/{index46.js → components/launchpad/LaunchpadSearch.js} +6 -6
  62. package/dist/components/layout/ActivityBar.js +100 -0
  63. package/dist/{index6.js → components/layout/BottomBar.js} +3 -3
  64. package/dist/{index10.js → components/layout/KeepAliveStack.js} +2 -2
  65. package/dist/{index7.js → components/layout/MobileTabBar.js} +7 -7
  66. package/dist/{index9.js → components/layout/Panel.js} +1 -1
  67. package/dist/{index8.js → components/layout/ResizeHandle.js} +7 -7
  68. package/dist/{index2.js → components/layout/Shell.js} +15 -15
  69. package/dist/{index4.js → components/layout/Sidebar.js} +2 -2
  70. package/dist/{index5.js → components/layout/TopBar.js} +7 -7
  71. package/dist/components/layout/index.d.ts +0 -1
  72. package/dist/{index40.js → components/loading/LoadingOverlay.js} +2 -2
  73. package/dist/{index41.js → components/loading/Skeleton.js} +2 -2
  74. package/dist/{index39.js → components/loading/SnakeLoader.js} +1 -1
  75. package/dist/{index20.js → components/ui/Button.js} +2 -2
  76. package/dist/{index27.js → components/ui/Card.js} +4 -4
  77. package/dist/{index37.js → components/ui/Charts.js} +6 -6
  78. package/dist/{index26.js → components/ui/CommandPalette.js} +11 -11
  79. package/dist/{index22.js → components/ui/Dialog.js} +10 -10
  80. package/dist/{index30.js → components/ui/DirectoryInput.js} +9 -9
  81. package/dist/{index29.js → components/ui/DirectoryPicker.js} +5 -5
  82. package/dist/{index24.js → components/ui/Dropdown.js} +4 -4
  83. package/dist/{index31.js → components/ui/FileSavePicker.js} +11 -11
  84. package/dist/{index23.js → components/ui/FloatingWindow.js} +10 -10
  85. package/dist/{index36.js → components/ui/Form.js} +6 -6
  86. package/dist/{index34.js → components/ui/HighlightBlock.js} +5 -5
  87. package/dist/{index21.js → components/ui/Input.js} +135 -128
  88. package/dist/{index35.js → components/ui/ProcessingIndicator.js} +1 -1
  89. package/dist/{index33.js → components/ui/QuoteBlock.js} +1 -1
  90. package/dist/{index38.js → components/ui/Stepper.js} +5 -5
  91. package/dist/{index28.js → components/ui/Tabs.js} +7 -7
  92. package/dist/{index25.js → components/ui/Tooltip.js} +5 -5
  93. package/dist/{index32.js → components/ui/picker/PickerBase.js} +11 -11
  94. package/dist/context/CommandContext.js +104 -0
  95. package/dist/{index100.js → context/ComponentRegistry.js} +7 -7
  96. package/dist/{index102.js → context/DeckContext.js} +4 -4
  97. package/dist/context/FileBrowserDragContext.d.ts +16 -1
  98. package/dist/context/FileBrowserDragContext.js +153 -0
  99. package/dist/{index95.js → context/FloeConfigContext.js} +1 -1
  100. package/dist/{index97.js → context/LayoutContext.js} +2 -2
  101. package/dist/{index99.js → context/NotificationContext.js} +8 -8
  102. package/dist/{index96.js → context/ThemeContext.js} +3 -3
  103. package/dist/{index104.js → context/ViewActivationContext.js} +4 -4
  104. package/dist/{index101.js → context/WidgetRegistry.js} +1 -1
  105. package/dist/{index103.js → context/WidgetStateContext.js} +4 -4
  106. package/dist/deck.d.ts +1 -0
  107. package/dist/deck.js +22 -0
  108. package/dist/file-browser.d.ts +1 -0
  109. package/dist/file-browser.js +29 -0
  110. package/dist/full.d.ts +11 -0
  111. package/dist/full.js +559 -0
  112. package/dist/{index111.js → hooks/useDeckDrag.js} +4 -4
  113. package/dist/{index112.js → hooks/useFileBrowserDrag.js} +50 -49
  114. package/dist/hooks/useKeybind.d.ts +15 -1
  115. package/dist/hooks/useKeybind.js +15 -0
  116. package/dist/{index110.js → hooks/usePersisted.js} +1 -1
  117. package/dist/icons.d.ts +1 -0
  118. package/dist/icons.js +194 -0
  119. package/dist/index.d.ts +1 -3
  120. package/dist/index.js +111 -556
  121. package/dist/launchpad.d.ts +1 -0
  122. package/dist/launchpad.js +12 -0
  123. package/dist/layout.d.ts +1 -0
  124. package/dist/layout.js +28 -0
  125. package/dist/loading.d.ts +1 -0
  126. package/dist/loading.js +11 -0
  127. package/dist/node_modules/.pnpm/@motionone_animation@10.18.0/node_modules/@motionone/animation/dist/Animation.es.js +71 -0
  128. package/dist/node_modules/.pnpm/@motionone_animation@10.18.0/node_modules/@motionone/animation/dist/utils/easing.es.js +31 -0
  129. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/animate-style.es.js +83 -0
  130. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/data.es.js +15 -0
  131. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/style.es.js +20 -0
  132. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js +22 -0
  133. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/easing.es.js +17 -0
  134. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js +26 -0
  135. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js +7 -0
  136. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js +15 -0
  137. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js +10 -0
  138. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/options.es.js +11 -0
  139. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js +10 -0
  140. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/style-object.es.js +16 -0
  141. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js +45 -0
  142. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/gestures/in-view.es.js +29 -0
  143. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/gestures/hover.es.js +15 -0
  144. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/gestures/in-view.es.js +18 -0
  145. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/gestures/press.es.js +17 -0
  146. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/index.es.js +87 -0
  147. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/utils/events.es.js +12 -0
  148. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/utils/has-changed.es.js +16 -0
  149. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/utils/is-variant.es.js +6 -0
  150. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js +10 -0
  151. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/state/utils/schedule.es.js +19 -0
  152. package/dist/node_modules/.pnpm/@motionone_dom@10.18.0/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js +6 -0
  153. package/dist/node_modules/.pnpm/@motionone_easing@10.18.0/node_modules/@motionone/easing/dist/cubic-bezier.es.js +18 -0
  154. package/dist/node_modules/.pnpm/@motionone_easing@10.18.0/node_modules/@motionone/easing/dist/steps.es.js +9 -0
  155. package/dist/node_modules/.pnpm/@motionone_types@10.17.1/node_modules/@motionone/types/dist/MotionValue.es.js +12 -0
  156. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/array.es.js +11 -0
  157. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/clamp.es.js +4 -0
  158. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/defaults.es.js +10 -0
  159. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/easing.es.js +8 -0
  160. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/interpolate.es.js +19 -0
  161. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js +5 -0
  162. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-easing-generator.es.js +4 -0
  163. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-easing-list.es.js +5 -0
  164. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-function.es.js +4 -0
  165. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-number.es.js +4 -0
  166. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/is-string.es.js +4 -0
  167. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/mix.es.js +4 -0
  168. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/noop.es.js +6 -0
  169. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/offset.es.js +17 -0
  170. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/progress.es.js +4 -0
  171. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/time.es.js +7 -0
  172. package/dist/node_modules/.pnpm/@motionone_utils@10.18.0/node_modules/@motionone/utils/dist/wrap.es.js +7 -0
  173. package/dist/node_modules/.pnpm/@solid-primitives_props@3.2.2_solid-js@1.9.11/node_modules/@solid-primitives/props/dist/combineProps.js +21 -0
  174. package/dist/node_modules/.pnpm/@solid-primitives_refs@1.1.2_solid-js@1.9.11/node_modules/@solid-primitives/refs/dist/index.js +25 -0
  175. package/dist/node_modules/.pnpm/@solid-primitives_transition-group@1.1.2_solid-js@1.9.11/node_modules/@solid-primitives/transition-group/dist/index.js +48 -0
  176. package/dist/{index132.js → node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/line.js} +1 -1
  177. package/dist/node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js +9 -0
  178. package/dist/node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js +76 -0
  179. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +11 -0
  180. package/dist/styles.css +1 -1
  181. package/dist/ui.d.ts +1 -0
  182. package/dist/ui.js +75 -0
  183. package/dist/utils/cn.js +8 -0
  184. package/dist/utils/dom.d.ts +10 -0
  185. package/dist/utils/dom.js +15 -0
  186. package/dist/utils/index.d.ts +1 -0
  187. package/dist/{index122.js → widgets/MetricsWidget.js} +1 -1
  188. package/dist/{index121.js → widgets/SidebarWidget.js} +2 -2
  189. package/dist/{index123.js → widgets/TerminalWidget.js} +5 -5
  190. package/dist/widgets.d.ts +1 -0
  191. package/dist/widgets.js +12 -0
  192. package/package.json +47 -1
  193. package/dist/index105.js +0 -130
  194. package/dist/index109.js +0 -13
  195. package/dist/index113.js +0 -8
  196. package/dist/index128.js +0 -126
  197. package/dist/index3.js +0 -100
  198. package/dist/index53.js +0 -213
  199. package/dist/index61.js +0 -106
  200. package/dist/index63.js +0 -44
  201. package/dist/index72.js +0 -139
  202. package/dist/index74.js +0 -138
  203. package/dist/index88.js +0 -36
  204. package/dist/index98.js +0 -109
  205. /package/dist/{index89.js → components/chat/hooks/useAttachments.js} +0 -0
  206. /package/dist/{index86.js → components/chat/hooks/useCodeHighlight.js} +0 -0
  207. /package/dist/{index87.js → components/chat/hooks/useMermaid.js} +0 -0
  208. /package/dist/{index85.js → components/chat/hooks/useVirtualList.js} +0 -0
  209. /package/dist/{index59.js → components/chat/types.js} +0 -0
  210. /package/dist/{index56.js → components/file-browser/FileIcons.js} +0 -0
  211. /package/dist/{index129.js → components/file-browser/longPressContextMenu.js} +0 -0
  212. /package/dist/{index42.js → components/icons/index.js} +0 -0
  213. /package/dist/{index126.js → components/layout/mobileTabs.js} +0 -0
  214. /package/dist/{index127.js → components/ui/chartXAxis.js} +0 -0
  215. /package/dist/{index94.js → context/createSimpleContext.js} +0 -0
  216. /package/dist/{index107.js → hooks/useDebounce.js} +0 -0
  217. /package/dist/{index106.js → hooks/useMediaQuery.js} +0 -0
  218. /package/dist/{index108.js → hooks/useResizeObserver.js} +0 -0
  219. /package/dist/{index130.js → hooks/useVirtualWindow.js} +0 -0
  220. /package/dist/{index124.js → node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js} +0 -0
  221. /package/dist/{index133.js → node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/base.js} +0 -0
  222. /package/dist/{index131.js → node_modules/.pnpm/marked@17.0.1/node_modules/marked/lib/marked.esm.js} +0 -0
  223. /package/dist/{index125.js → node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js} +0 -0
  224. /package/dist/{index120.js → styles/themes/index.js} +0 -0
  225. /package/dist/{index117.js → utils/animations.js} +0 -0
  226. /package/dist/{index116.js → utils/bodyStyleLock.js} +0 -0
  227. /package/dist/{index114.js → utils/defer.js} +0 -0
  228. /package/dist/{index118.js → utils/gridCollision.js} +0 -0
  229. /package/dist/{index119.js → utils/gridLayout.js} +0 -0
  230. /package/dist/{index115.js → utils/keybind.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { createComponent as n, Dynamic as a } from "solid-js/web";
2
2
  import { untrack as d, createMemo as m } from "solid-js";
3
- import { useLayout as l } from "./index97.js";
4
- import { useComponentRegistry as v } from "./index100.js";
5
- import { KeepAliveStack as f } from "./index10.js";
3
+ import { useLayout as l } from "../context/LayoutContext.js";
4
+ import { useComponentRegistry as v } from "../context/ComponentRegistry.js";
5
+ import { KeepAliveStack as f } from "../components/layout/KeepAliveStack.js";
6
6
  function y(e) {
7
7
  return e.sidebar?.fullScreen === !0;
8
8
  }
@@ -1,10 +1,10 @@
1
1
  import { createComponent as t, mergeProps as c, memo as o } from "solid-js/web";
2
2
  import { onMount as a, onCleanup as f } from "solid-js";
3
- import { useComponentRegistry as u, useComponentContextFactory as C } from "./index100.js";
4
- import { NotificationContainer as g } from "./index99.js";
5
- import { Shell as h } from "./index2.js";
6
- import { CommandPalette as d } from "./index26.js";
7
- import { FloeProvider as s } from "./index90.js";
3
+ import { useComponentRegistry as u, useComponentContextFactory as C } from "../context/ComponentRegistry.js";
4
+ import { NotificationContainer as g } from "../context/NotificationContext.js";
5
+ import { Shell as h } from "../components/layout/Shell.js";
6
+ import { CommandPalette as d } from "../components/ui/CommandPalette.js";
7
+ import { FloeProvider as s } from "./FloeProvider.js";
8
8
  function A(e) {
9
9
  const n = u(), i = C(), l = e.getProtocol?.();
10
10
  return e.components?.length && n.registerAll(e.components), a(() => {
@@ -1,12 +1,12 @@
1
1
  import { createComponent as r, memo as o } from "solid-js/web";
2
- import { FloeConfigProvider as i } from "./index95.js";
3
- import { ThemeProvider as n } from "./index96.js";
4
- import { NotificationProvider as m } from "./index99.js";
5
- import { ComponentRegistryProvider as d } from "./index100.js";
6
- import { LayoutProvider as c } from "./index97.js";
7
- import { CommandProvider as f } from "./index98.js";
8
- import { WidgetRegistryProvider as g } from "./index101.js";
9
- import { DeckProvider as h } from "./index102.js";
2
+ import { FloeConfigProvider as i } from "../context/FloeConfigContext.js";
3
+ import { ThemeProvider as n } from "../context/ThemeContext.js";
4
+ import { NotificationProvider as m } from "../context/NotificationContext.js";
5
+ import { ComponentRegistryProvider as d } from "../context/ComponentRegistry.js";
6
+ import { LayoutProvider as c } from "../context/LayoutContext.js";
7
+ import { CommandProvider as f } from "../context/CommandContext.js";
8
+ import { WidgetRegistryProvider as g } from "../context/WidgetRegistry.js";
9
+ import { DeckProvider as h } from "../context/DeckContext.js";
10
10
  function w(e) {
11
11
  const t = () => r(m, {
12
12
  get children() {
@@ -1,6 +1,6 @@
1
1
  import { memo as i } from "solid-js/web";
2
2
  import { onMount as l, onCleanup as u } from "solid-js";
3
- import { useComponentRegistry as s, useComponentContextFactory as C } from "./index100.js";
3
+ import { useComponentRegistry as s, useComponentContextFactory as C } from "../context/ComponentRegistry.js";
4
4
  function f(t) {
5
5
  const o = s(), r = C(), m = t.getProtocol?.(), c = t.components?.length ? o.registerAll(t.components) : () => {
6
6
  };
package/dist/app.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './app/index';
package/dist/app.js ADDED
@@ -0,0 +1,10 @@
1
+ import { ActivityAppsMain as e } from "./app/ActivityAppsMain.js";
2
+ import { FloeApp as t } from "./app/FloeApp.js";
3
+ import { FloeProvider as m } from "./app/FloeProvider.js";
4
+ import { FloeRegistryRuntime as x } from "./app/FloeRegistryRuntime.js";
5
+ export {
6
+ e as ActivityAppsMain,
7
+ t as FloeApp,
8
+ m as FloeProvider,
9
+ x as FloeRegistryRuntime
10
+ };
package/dist/chat.css CHANGED
@@ -1195,7 +1195,7 @@ pre.chat-md-code-block code {
1195
1195
 
1196
1196
  .chat-image-dialog-toolbar {
1197
1197
  position: absolute;
1198
- top: 1rem;
1198
+ top: calc(env(safe-area-inset-top, 0px) + 1rem);
1199
1199
  left: 50%;
1200
1200
  transform: translateX(-50%);
1201
1201
  z-index: 52;
@@ -1262,7 +1262,7 @@ pre.chat-md-code-block code {
1262
1262
 
1263
1263
  .chat-image-dialog-hint {
1264
1264
  position: absolute;
1265
- bottom: 1rem;
1265
+ bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
1266
1266
  left: 50%;
1267
1267
  transform: translateX(-50%);
1268
1268
  padding: 0.5rem 1rem;
package/dist/chat.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components/chat';
package/dist/chat.js ADDED
@@ -0,0 +1,75 @@
1
+ import { AttachmentPreview as e } from "./components/chat/input/AttachmentPreview.js";
2
+ import { BlockRenderer as m } from "./components/chat/blocks/BlockRenderer.js";
3
+ import { ChatContainer as f } from "./components/chat/ChatContainer.js";
4
+ import { ChatInput as p } from "./components/chat/input/ChatInput.js";
5
+ import { ChatProvider as l, useChatContext as c } from "./components/chat/ChatProvider.js";
6
+ import { ChecklistBlock as s } from "./components/chat/blocks/ChecklistBlock.js";
7
+ import { CodeBlock as g } from "./components/chat/blocks/CodeBlock.js";
8
+ import { CodeDiffBlock as u } from "./components/chat/blocks/CodeDiffBlock.js";
9
+ import { ConnectionStatus as C } from "./components/chat/status/ConnectionStatus.js";
10
+ import { DEFAULT_VIRTUAL_LIST_CONFIG as M } from "./components/chat/types.js";
11
+ import { FileBlock as A } from "./components/chat/blocks/FileBlock.js";
12
+ import { ImageBlock as T } from "./components/chat/blocks/ImageBlock.js";
13
+ import { MarkdownBlock as W } from "./components/chat/blocks/MarkdownBlock.js";
14
+ import { MermaidBlock as F } from "./components/chat/blocks/MermaidBlock.js";
15
+ import { MessageActions as _ } from "./components/chat/message/MessageActions.js";
16
+ import { MessageAvatar as w } from "./components/chat/message/MessageAvatar.js";
17
+ import { MessageBubble as D } from "./components/chat/message/MessageBubble.js";
18
+ import { MessageItem as P } from "./components/chat/message/MessageItem.js";
19
+ import { MessageMeta as U } from "./components/chat/message/MessageMeta.js";
20
+ import { ShellBlock as G } from "./components/chat/blocks/ShellBlock.js";
21
+ import { StreamingCursor as O } from "./components/chat/status/StreamingCursor.js";
22
+ import { SvgBlock as q } from "./components/chat/blocks/SvgBlock.js";
23
+ import { TextBlock as J } from "./components/chat/blocks/TextBlock.js";
24
+ import { ThinkingBlock as Q } from "./components/chat/blocks/ThinkingBlock.js";
25
+ import { ToolCallBlock as Y } from "./components/chat/blocks/ToolCallBlock.js";
26
+ import { VirtualMessageList as $ } from "./components/chat/message-list/VirtualMessageList.js";
27
+ import { WorkingIndicator as ro } from "./components/chat/status/WorkingIndicator.js";
28
+ import { configureMermaidWorker as to, configureSyncMermaid as mo, renderMermaid as io, terminateMermaidWorker as fo, useMermaid as xo } from "./components/chat/hooks/useMermaid.js";
29
+ import { configureShikiWorker as ao, configureSyncHighlighter as lo, highlightCode as co, terminateShikiWorker as no, useCodeHighlight as so } from "./components/chat/hooks/useCodeHighlight.js";
30
+ import { useAttachments as go } from "./components/chat/hooks/useAttachments.js";
31
+ import { useAutoScroll as uo } from "./components/chat/hooks/useAutoScroll.js";
32
+ import { useVirtualList as Bo } from "./components/chat/hooks/useVirtualList.js";
33
+ export {
34
+ e as AttachmentPreview,
35
+ m as BlockRenderer,
36
+ f as ChatContainer,
37
+ p as ChatInput,
38
+ l as ChatProvider,
39
+ s as ChecklistBlock,
40
+ g as CodeBlock,
41
+ u as CodeDiffBlock,
42
+ C as ConnectionStatus,
43
+ M as DEFAULT_VIRTUAL_LIST_CONFIG,
44
+ A as FileBlock,
45
+ T as ImageBlock,
46
+ W as MarkdownBlock,
47
+ F as MermaidBlock,
48
+ _ as MessageActions,
49
+ w as MessageAvatar,
50
+ D as MessageBubble,
51
+ P as MessageItem,
52
+ U as MessageMeta,
53
+ G as ShellBlock,
54
+ O as StreamingCursor,
55
+ q as SvgBlock,
56
+ J as TextBlock,
57
+ Q as ThinkingBlock,
58
+ Y as ToolCallBlock,
59
+ $ as VirtualMessageList,
60
+ ro as WorkingIndicator,
61
+ to as configureMermaidWorker,
62
+ ao as configureShikiWorker,
63
+ lo as configureSyncHighlighter,
64
+ mo as configureSyncMermaid,
65
+ co as highlightCode,
66
+ io as renderMermaid,
67
+ fo as terminateMermaidWorker,
68
+ no as terminateShikiWorker,
69
+ go as useAttachments,
70
+ uo as useAutoScroll,
71
+ c as useChatContext,
72
+ so as useCodeHighlight,
73
+ xo as useMermaid,
74
+ Bo as useVirtualList
75
+ };
@@ -1,14 +1,12 @@
1
1
  import { createComponent as t, insert as r, memo as i, Dynamic as l, effect as u, className as h, template as c } from "solid-js/web";
2
2
  import { Show as a } from "solid-js";
3
- import { cn as m } from "./index113.js";
4
- import { ChatProvider as g } from "./index58.js";
5
- import "./index60.js";
6
- import { SimpleMessageList as d } from "./index61.js";
7
- import { ChatInput as s } from "./index80.js";
8
- import "./index81.js";
9
- import { ConnectionStatus as f } from "./index84.js";
3
+ import { cn as g } from "../../utils/cn.js";
4
+ import { ChatProvider as m } from "./ChatProvider.js";
5
+ import { SimpleMessageList as d } from "./message-list/SimpleMessageList.js";
6
+ import { ChatInput as s } from "./input/ChatInput.js";
7
+ import { ConnectionStatus as f } from "./status/ConnectionStatus.js";
10
8
  var C = /* @__PURE__ */ c("<div>"), v = /* @__PURE__ */ c("<div class=chat-header><div class=chat-header-title>");
11
- const x = (e) => t(g, {
9
+ const H = (e) => t(m, {
12
10
  get initialMessages() {
13
11
  return e.initialMessages;
14
12
  },
@@ -72,7 +70,7 @@ const x = (e) => t(g, {
72
70
  }
73
71
  });
74
72
  }
75
- }), null), u(() => h(n, m("chat-container", e.class))), n;
73
+ }), null), u(() => h(n, g("chat-container", e.class))), n;
76
74
  }
77
75
  }), S = (e) => (() => {
78
76
  var n = v(), o = n.firstChild;
@@ -90,5 +88,5 @@ const x = (e) => t(g, {
90
88
  }), null), n;
91
89
  })();
92
90
  export {
93
- x as ChatContainer
91
+ H as ChatContainer
94
92
  };
@@ -1,11 +1,11 @@
1
1
  import { createComponent as j } from "solid-js/web";
2
- import { createContext as q, useContext as N, createMemo as M, createEffect as _, on as O, createSignal as C, batch as v } from "solid-js";
2
+ import { createMemo as M, createEffect as q, on as N, createSignal as C, useContext as _, createContext as O, batch as v } from "solid-js";
3
3
  import { createStore as V, reconcile as x, produce as f } from "solid-js/store";
4
- import { deferNonBlocking as I } from "./index114.js";
5
- import { DEFAULT_VIRTUAL_LIST_CONFIG as G } from "./index59.js";
6
- const H = q();
4
+ import { deferNonBlocking as I } from "../../utils/defer.js";
5
+ import { DEFAULT_VIRTUAL_LIST_CONFIG as G } from "./types.js";
6
+ const H = O();
7
7
  function ie() {
8
- const a = N(H);
8
+ const a = _(H);
9
9
  if (!a)
10
10
  throw new Error("useChatContext must be used within a ChatProvider");
11
11
  return a;
@@ -22,7 +22,7 @@ const ue = (a) => {
22
22
  ...G,
23
23
  ...a.config?.virtualList
24
24
  })), [c, u] = V(a.initialMessages || []), L = /* @__PURE__ */ new Map();
25
- _(O(() => a.initialMessages, (e) => {
25
+ q(N(() => a.initialMessages, (e) => {
26
26
  e && e.length > 0 && u(x(e));
27
27
  }, {
28
28
  defer: !0
@@ -1,23 +1,23 @@
1
1
  import { createComponent as t, insert as r, template as k } from "solid-js/web";
2
- import { lazy as u, Switch as i, Match as l, Suspense as o } from "solid-js";
3
- import { TextBlock as d } from "./index68.js";
4
- import { MarkdownBlock as m } from "./index69.js";
5
- import { ImageBlock as h } from "./index72.js";
6
- import { FileBlock as b } from "./index77.js";
7
- import { ChecklistBlock as f } from "./index75.js";
8
- import { ShellBlock as s } from "./index76.js";
9
- import { ThinkingBlock as w } from "./index78.js";
10
- import { Skeleton as c } from "./index41.js";
2
+ import { Switch as i, Match as l, Suspense as o, lazy as u } from "solid-js";
3
+ import { TextBlock as d } from "./TextBlock.js";
4
+ import { MarkdownBlock as m } from "./MarkdownBlock.js";
5
+ import { ImageBlock as h } from "./ImageBlock.js";
6
+ import { FileBlock as b } from "./FileBlock.js";
7
+ import { ChecklistBlock as f } from "./ChecklistBlock.js";
8
+ import { ShellBlock as s } from "./ShellBlock.js";
9
+ import { ThinkingBlock as w } from "./ThinkingBlock.js";
10
+ import { Skeleton as c } from "../../loading/Skeleton.js";
11
11
  var B = /* @__PURE__ */ k("<div class=chat-block-unknown>Unknown block type: "), C = /* @__PURE__ */ k("<div class=chat-code-skeleton><div class=chat-code-skeleton-header></div><div class=chat-code-skeleton-body>"), y = /* @__PURE__ */ k("<div class=chat-mermaid-skeleton>"), v = /* @__PURE__ */ k('<div class=chat-tool-skeleton><div class="flex items-center gap-2 p-3">');
12
- const x = u(() => import("./index70.js").then((e) => ({
12
+ const x = u(() => import("./CodeBlock.js").then((e) => ({
13
13
  default: e.CodeBlock
14
- }))), _ = u(() => import("./index71.js").then((e) => ({
14
+ }))), _ = u(() => import("./CodeDiffBlock.js").then((e) => ({
15
15
  default: e.CodeDiffBlock
16
- }))), $ = u(() => import("./index74.js").then((e) => ({
16
+ }))), $ = u(() => import("./MermaidBlock.js").then((e) => ({
17
17
  default: e.MermaidBlock
18
- }))), S = u(() => import("./index73.js").then((e) => ({
18
+ }))), S = u(() => import("./SvgBlock.js").then((e) => ({
19
19
  default: e.SvgBlock
20
- }))), I = u(() => import("./index79.js").then((e) => ({
20
+ }))), I = u(() => import("./ToolCallBlock.js").then((e) => ({
21
21
  default: e.ToolCallBlock
22
22
  }))), H = (e) => t(i, {
23
23
  get fallback() {
@@ -1,7 +1,7 @@
1
1
  import { insert as i, createComponent as f, effect as s, className as r, template as o } from "solid-js/web";
2
2
  import { For as g } from "solid-js";
3
- import { cn as n } from "./index113.js";
4
- import { useChatContext as C } from "./index58.js";
3
+ import { cn as n } from "../../../utils/cn.js";
4
+ import { useChatContext as C } from "../ChatProvider.js";
5
5
  var _ = /* @__PURE__ */ o("<div><ul class=chat-checklist>"), $ = /* @__PURE__ */ o("<li class=chat-checklist-item><label class=chat-checklist-label><input type=checkbox class=chat-checklist-checkbox><span>");
6
6
  const I = (t) => {
7
7
  const k = C(), d = (e) => {
@@ -1,8 +1,8 @@
1
1
  import { insert as r, createComponent as o, memo as k, effect as _, className as x, setAttribute as y, template as l, delegateEvents as H } from "solid-js/web";
2
2
  import { createSignal as m, createEffect as B, Show as h } from "solid-js";
3
- import { cn as I } from "./index113.js";
4
- import { highlightCode as S } from "./index86.js";
5
- import { deferNonBlocking as L } from "./index114.js";
3
+ import { cn as I } from "../../../utils/cn.js";
4
+ import { highlightCode as S } from "../hooks/useCodeHighlight.js";
5
+ import { deferNonBlocking as L } from "../../../utils/defer.js";
6
6
  var T = /* @__PURE__ */ l("<span class=chat-code-filename>"), j = /* @__PURE__ */ l("<span class=chat-code-language>"), E = /* @__PURE__ */ l("<div>"), M = /* @__PURE__ */ l("<div><div class=chat-code-header><div class=chat-code-info></div><button type=button class=chat-code-copy-btn></button></div><div class=chat-code-content>"), N = /* @__PURE__ */ l("<pre class=chat-code-pre><code>"), A = /* @__PURE__ */ l('<svg xmlns=http://www.w3.org/2000/svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><rect x=9 y=9 width=13 height=13 rx=2 ry=2></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1">'), F = /* @__PURE__ */ l('<svg xmlns=http://www.w3.org/2000/svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">');
7
7
  const K = (t) => {
8
8
  const [f, g] = m(null), [p, s] = m(!0), [v, w] = m(!1);
@@ -1,7 +1,7 @@
1
1
  import { insert as l, createComponent as f, effect as b, className as g, setAttribute as E, template as u, memo as S, delegateEvents as H } from "solid-js/web";
2
2
  import { createSignal as T, createMemo as k, Show as x, For as _ } from "solid-js";
3
- import { diffLines as L } from "./index132.js";
4
- import { cn as $ } from "./index113.js";
3
+ import { diffLines as L } from "../../../node_modules/.pnpm/diff@8.0.3/node_modules/diff/libesm/diff/line.js";
4
+ import { cn as $ } from "../../../utils/cn.js";
5
5
  var R = /* @__PURE__ */ u("<span class=chat-code-diff-filename>"), j = /* @__PURE__ */ u('<div><div class=chat-code-diff-header><div class=chat-code-diff-info><span class=chat-code-diff-stats><span style="color:rgb(34 197 94)">+</span><span style="color:rgb(239 68 68);margin-left:0.5rem">-</span></span></div><div class=chat-code-diff-actions><div class=chat-code-diff-view-toggle><button type=button>Unified</button><button type=button>Split</button></div><button type=button class=chat-code-copy-btn></button></div></div><div class=chat-code-diff-content>'), q = /* @__PURE__ */ u("<div class=chat-diff-unified>"), z = /* @__PURE__ */ u("<div><span class=chat-diff-line-number></span><span class=chat-diff-line-sign></span><span class=chat-diff-line-content>"), G = /* @__PURE__ */ u("<div class=chat-diff-split><div class=chat-diff-split-side></div><div class=chat-diff-split-side>"), U = /* @__PURE__ */ u("<div><span class=chat-diff-line-number></span><span class=chat-diff-line-content>"), J = /* @__PURE__ */ u('<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><rect x=9 y=9 width=13 height=13 rx=2 ry=2></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1">'), K = /* @__PURE__ */ u('<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><polyline points="20 6 9 17 4 12">');
6
6
  const te = (h) => {
7
7
  const [v, p] = T("unified"), [t, d] = T(!1), a = k(() => L(h.oldCode, h.newCode)), e = k(() => {
@@ -1,6 +1,6 @@
1
- import { delegateEvents as w, insert as i, createComponent as s, effect as x, className as g, setAttribute as k, template as r } from "solid-js/web";
1
+ import { insert as i, createComponent as s, effect as w, className as x, setAttribute as g, template as r, delegateEvents as k } from "solid-js/web";
2
2
  import { Show as _ } from "solid-js";
3
- import { cn as B } from "./index113.js";
3
+ import { cn as B } from "../../../utils/cn.js";
4
4
  var C = /* @__PURE__ */ r("<div class=chat-file-download>"), z = /* @__PURE__ */ r("<div><div class=chat-file-icon></div><div class=chat-file-info><div class=chat-file-name></div><div class=chat-file-meta><span class=chat-file-size>"), F = /* @__PURE__ */ r('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1=12 y1=15 x2=12 y2=3>');
5
5
  const I = (n) => {
6
6
  const d = (t) => t < 1024 ? `${t} B` : t < 1048576 ? `${(t / 1024).toFixed(1)} KB` : `${(t / 1048576).toFixed(1)} MB`, u = (t) => t.startsWith("image/") ? "🖼️" : t.startsWith("video/") ? "🎬" : t.startsWith("audio/") ? "🎵" : t.includes("pdf") ? "📄" : t.includes("zip") || t.includes("rar") || t.includes("tar") ? "📦" : t.includes("text") || t.includes("json") || t.includes("xml") ? "📝" : t.includes("spreadsheet") || t.includes("excel") ? "📊" : t.includes("presentation") || t.includes("powerpoint") ? "📽️" : t.includes("document") || t.includes("word") ? "📃" : "📁", f = () => {
@@ -16,16 +16,16 @@ const I = (n) => {
16
16
  var e = C();
17
17
  return i(e, s(S, {})), e;
18
18
  }
19
- }), null), x((e) => {
19
+ }), null), w((e) => {
20
20
  var o = B("chat-file-block", n.class), a = n.name;
21
- return o !== e.e && g(t, e.e = o), a !== e.t && k(l, "title", e.t = a), e;
21
+ return o !== e.e && x(t, e.e = o), a !== e.t && g(l, "title", e.t = a), e;
22
22
  }, {
23
23
  e: void 0,
24
24
  t: void 0
25
25
  }), t;
26
26
  })();
27
27
  }, S = () => F();
28
- w(["click"]);
28
+ k(["click"]);
29
29
  export {
30
30
  I as FileBlock
31
31
  };
@@ -0,0 +1,201 @@
1
+ import { insert as c, createComponent as a, effect as D, setAttribute as k, className as V, Portal as de, setStyleProperty as W, template as r, delegateEvents as ue } from "solid-js/web";
2
+ import { createSignal as v, onCleanup as B, createEffect as j, Show as C } from "solid-js";
3
+ import { cn as G } from "../../../utils/cn.js";
4
+ import { lockBodyStyle as ge } from "../../../utils/bodyStyleLock.js";
5
+ var he = /* @__PURE__ */ r("<div class=chat-image-loading>"), me = /* @__PURE__ */ r("<div class=chat-image-error><span>Failed to load image"), ye = /* @__PURE__ */ r("<img loading=lazy>", !0, !1, !1), fe = /* @__PURE__ */ r("<div>"), ve = /* @__PURE__ */ r("<div class=chat-image-dialog-backdrop>"), pe = /* @__PURE__ */ r('<div class=chat-image-dialog><div class=chat-image-dialog-toolbar><button type=button class=chat-image-dialog-btn title="Zoom out (-)"></button><span class=chat-image-dialog-scale>%</span><button type=button class=chat-image-dialog-btn title="Zoom in (+)"></button><button type=button class=chat-image-dialog-btn title="Reset (0)"></button><div class=chat-image-dialog-separator></div><button type=button class=chat-image-dialog-btn title="Close (Esc)"></button></div><div class=chat-image-dialog-content style=touch-action:none><img class=chat-image-dialog-img></div><div class=chat-image-dialog-hint>Scroll/pinch to zoom · Drag to pan · Press Esc to close'), xe = /* @__PURE__ */ r('<svg class="animate-spin h-6 w-6 text-muted-foreground"xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 24 24"><circle class=opacity-25 cx=12 cy=12 r=10 stroke=currentColor stroke-width=4></circle><path class=opacity-75 fill=currentColor d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'), $e = /* @__PURE__ */ r('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><rect x=3 y=3 width=18 height=18 rx=2 ry=2></rect><circle cx=8.5 cy=8.5 r=1.5></circle><polyline points="21 15 16 10 5 21"></polyline><line x1=2 y1=2 x2=22 y2=22>'), we = /* @__PURE__ */ r('<svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'), be = /* @__PURE__ */ r('<svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><circle cx=11 cy=11 r=8></circle><line x1=21 y1=21 x2=16.65 y2=16.65></line><line x1=11 y1=8 x2=11 y2=14></line><line x1=8 y1=11 x2=14 y2=11>'), ke = /* @__PURE__ */ r('<svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><circle cx=11 cy=11 r=8></circle><line x1=21 y1=21 x2=16.65 y2=16.65></line><line x1=8 y1=11 x2=14 y2=11>'), _e = /* @__PURE__ */ r('<svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5">');
6
+ const Be = (p) => {
7
+ const [O, X] = v(!0), [Y, J] = v(!1), [S, F] = v(!1), [i, I] = v(1), [x, $] = v({
8
+ x: 0,
9
+ y: 0
10
+ }), [Q, g] = v(!1);
11
+ let h = null, E = {
12
+ x: 0,
13
+ y: 0
14
+ };
15
+ const l = /* @__PURE__ */ new Map();
16
+ let s = null, d = null, m = 0, w = 1;
17
+ const ee = 0.5, te = 5, Z = 0.25, ne = (e) => Math.max(ee, Math.min(e, te)), z = (e) => {
18
+ const t = ne(e);
19
+ I(t), t <= 1 && ($({
20
+ x: 0,
21
+ y: 0
22
+ }), g(!1));
23
+ }, le = () => {
24
+ X(!1);
25
+ }, ie = () => {
26
+ X(!1), J(!0);
27
+ }, re = () => {
28
+ I(1), $({
29
+ x: 0,
30
+ y: 0
31
+ }), F(!0);
32
+ }, A = () => {
33
+ F(!1);
34
+ }, L = () => {
35
+ z(i() + Z);
36
+ }, M = () => {
37
+ z(i() - Z);
38
+ }, T = () => {
39
+ I(1), $({
40
+ x: 0,
41
+ y: 0
42
+ }), g(!1);
43
+ }, oe = (e) => {
44
+ e.preventDefault(), e.deltaY < 0 ? L() : M();
45
+ }, ae = (e) => {
46
+ if (e.pointerType === "mouse" && e.button !== 0) return;
47
+ e.preventDefault();
48
+ const t = e.currentTarget;
49
+ l.set(e.pointerId, {
50
+ x: e.clientX,
51
+ y: e.clientY
52
+ });
53
+ try {
54
+ t.setPointerCapture(e.pointerId);
55
+ } catch {
56
+ }
57
+ if (l.size === 1) {
58
+ s = {
59
+ x: e.clientX,
60
+ y: e.clientY
61
+ }, d = {
62
+ ...x()
63
+ }, g(i() > 1);
64
+ return;
65
+ }
66
+ if (l.size === 2) {
67
+ const [n, o] = Array.from(l.values());
68
+ m = Math.hypot(n.x - o.x, n.y - o.y), w = i(), s = null, d = null, g(!1);
69
+ }
70
+ }, ce = (e) => {
71
+ if (l.has(e.pointerId)) {
72
+ if (l.set(e.pointerId, {
73
+ x: e.clientX,
74
+ y: e.clientY
75
+ }), l.size === 2) {
76
+ const [t, n] = Array.from(l.values()), o = Math.hypot(t.x - n.x, t.y - n.y);
77
+ m > 0 && z(w * (o / m));
78
+ return;
79
+ }
80
+ if (!(l.size !== 1 || i() <= 1) && (g(!0), (!s || !d) && (s = {
81
+ x: e.clientX,
82
+ y: e.clientY
83
+ }, d = {
84
+ ...x()
85
+ }), E = {
86
+ x: d.x + (e.clientX - s.x),
87
+ y: d.y + (e.clientY - s.y)
88
+ }, h === null)) {
89
+ if (typeof requestAnimationFrame > "u") {
90
+ $(E);
91
+ return;
92
+ }
93
+ h = requestAnimationFrame(() => {
94
+ h = null, !(l.size !== 1 || i() <= 1) && $(E);
95
+ });
96
+ }
97
+ }
98
+ }, R = (e) => {
99
+ l.delete(e.pointerId);
100
+ try {
101
+ e.currentTarget.releasePointerCapture(e.pointerId);
102
+ } catch {
103
+ }
104
+ if (l.size === 0) {
105
+ g(!1), s = null, d = null, m = 0, w = i();
106
+ return;
107
+ }
108
+ if (l.size === 1) {
109
+ const t = Array.from(l.values())[0];
110
+ s = {
111
+ x: t.x,
112
+ y: t.y
113
+ }, d = {
114
+ ...x()
115
+ }, g(i() > 1), m = 0, w = i();
116
+ return;
117
+ }
118
+ if (l.size === 2) {
119
+ const [t, n] = Array.from(l.values());
120
+ m = Math.hypot(t.x - n.x, t.y - n.y), w = i(), s = null, d = null, g(!1);
121
+ }
122
+ };
123
+ return B(() => {
124
+ h !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(h), h = null), l.clear();
125
+ }), j(() => {
126
+ if (!S()) return;
127
+ const e = (t) => {
128
+ t.key === "Escape" ? A() : t.key === "+" || t.key === "=" ? L() : t.key === "-" ? M() : t.key === "0" && T();
129
+ };
130
+ document.addEventListener("keydown", e), B(() => document.removeEventListener("keydown", e));
131
+ }), j(() => {
132
+ if (!S()) return;
133
+ const e = ge({
134
+ overflow: "hidden"
135
+ });
136
+ B(e);
137
+ }), [(() => {
138
+ var e = fe();
139
+ return c(e, a(C, {
140
+ get when() {
141
+ return O();
142
+ },
143
+ get children() {
144
+ var t = he();
145
+ return c(t, a(Ce, {})), t;
146
+ }
147
+ }), null), c(e, a(C, {
148
+ get when() {
149
+ return Y();
150
+ },
151
+ get children() {
152
+ var t = me(), n = t.firstChild;
153
+ return c(t, a(Se, {}), n), t;
154
+ }
155
+ }), null), c(e, a(C, {
156
+ get when() {
157
+ return !Y();
158
+ },
159
+ get children() {
160
+ var t = ye();
161
+ return t.$$click = re, t.addEventListener("error", ie), t.addEventListener("load", le), D((n) => {
162
+ var o = p.src, _ = p.alt || "Image", y = G("chat-image", O() && "invisible");
163
+ return o !== n.e && k(t, "src", n.e = o), _ !== n.t && k(t, "alt", n.t = _), y !== n.a && V(t, n.a = y), n;
164
+ }, {
165
+ e: void 0,
166
+ t: void 0,
167
+ a: void 0
168
+ }), t;
169
+ }
170
+ }), null), D(() => V(e, G("chat-image-block", p.class))), e;
171
+ })(), a(C, {
172
+ get when() {
173
+ return S();
174
+ },
175
+ get children() {
176
+ return a(de, {
177
+ get children() {
178
+ return [(() => {
179
+ var e = ve();
180
+ return e.$$click = A, e;
181
+ })(), (() => {
182
+ var e = pe(), t = e.firstChild, n = t.firstChild, o = n.nextSibling, _ = o.firstChild, y = o.nextSibling, P = y.nextSibling, se = P.nextSibling, q = se.nextSibling, f = t.nextSibling, b = f.firstChild;
183
+ return n.$$click = M, c(n, a(ze, {})), c(o, () => Math.round(i() * 100), _), y.$$click = L, c(y, a(Ee, {})), P.$$click = T, c(P, a(Ae, {})), q.$$click = A, c(q, a(Ie, {})), f.addEventListener("pointercancel", R), f.$$pointerup = R, f.$$pointermove = ce, f.$$pointerdown = ae, f.addEventListener("wheel", oe), k(b, "draggable", !1), D((u) => {
184
+ var H = p.src, N = p.alt || "Image", K = `translate(${x().x}px, ${x().y}px) scale(${i()})`, U = i() > 1 ? Q() ? "grabbing" : "grab" : "default";
185
+ return H !== u.e && k(b, "src", u.e = H), N !== u.t && k(b, "alt", u.t = N), K !== u.a && W(b, "transform", u.a = K), U !== u.o && W(b, "cursor", u.o = U), u;
186
+ }, {
187
+ e: void 0,
188
+ t: void 0,
189
+ a: void 0,
190
+ o: void 0
191
+ }), e;
192
+ })()];
193
+ }
194
+ });
195
+ }
196
+ })];
197
+ }, Ce = () => xe(), Se = () => $e(), Ie = () => we(), Ee = () => be(), ze = () => ke(), Ae = () => _e();
198
+ ue(["click", "pointerdown", "pointermove", "pointerup"]);
199
+ export {
200
+ Be as ImageBlock
201
+ };
@@ -1,7 +1,7 @@
1
1
  import { effect as i, className as d, template as m } from "solid-js/web";
2
2
  import { createSignal as u, createEffect as f } from "solid-js";
3
- import { marked as o } from "./index131.js";
4
- import { cn as g } from "./index113.js";
3
+ import { marked as o } from "../../../node_modules/.pnpm/marked@17.0.1/node_modules/marked/lib/marked.esm.js";
4
+ import { cn as g } from "../../../utils/cn.js";
5
5
  var p = /* @__PURE__ */ m("<div>");
6
6
  o.setOptions({
7
7
  gfm: !0,