@oneflowui/ui 0.4.2 → 0.4.4

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 (332) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/dist/assets/tableWorker-CTsbCPPP.js +1 -0
  4. package/dist/components/ContextMenu/index.vue.d.ts +2 -1
  5. package/dist/components/ContextMenu/index.vue.js +7 -0
  6. package/dist/components/ContextMenu/index.vue2.js +92 -0
  7. package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
  8. package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
  9. package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
  10. package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
  11. package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
  12. package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
  13. package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
  14. package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
  15. package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
  16. package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
  17. package/dist/components/Dashboard/index.vue.js +7 -0
  18. package/dist/components/Dashboard/index.vue2.js +104 -0
  19. package/dist/components/ai/AiMessageBubble.vue.js +7 -0
  20. package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
  21. package/dist/components/ai/AiMessageList.vue.js +7 -0
  22. package/dist/components/ai/AiMessageList.vue2.js +78 -0
  23. package/dist/components/ai/AiSender.vue.js +7 -0
  24. package/dist/components/ai/AiSender.vue2.js +86 -0
  25. package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
  26. package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
  27. package/dist/components/ai/AiThinking.vue.js +7 -0
  28. package/dist/components/ai/AiThinking.vue2.js +19 -0
  29. package/dist/components/ai/UserMessageBubble.vue.js +7 -0
  30. package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
  31. package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
  32. package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
  33. package/dist/components/auxiliary/FileUpload.vue.js +7 -0
  34. package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
  35. package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
  36. package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
  37. package/dist/components/base/Accordion.vue.js +7 -0
  38. package/dist/components/base/Accordion.vue2.js +78 -0
  39. package/dist/components/base/AddViewBtn.vue.js +7 -0
  40. package/dist/components/base/AddViewBtn.vue2.js +25 -0
  41. package/dist/components/base/Avatar.vue.js +7 -0
  42. package/dist/components/base/Avatar.vue2.js +72 -0
  43. package/dist/components/base/Badge.vue.js +7 -0
  44. package/dist/components/base/Badge.vue2.js +70 -0
  45. package/dist/components/base/ButtonGroup.vue.js +7 -0
  46. package/dist/components/base/ButtonGroup.vue2.js +40 -0
  47. package/dist/components/base/ChainItem.vue.js +7 -0
  48. package/dist/components/base/ChainItem.vue2.js +68 -0
  49. package/dist/components/base/DescBlock.vue.js +7 -0
  50. package/dist/components/base/DescBlock.vue2.js +13 -0
  51. package/dist/components/base/DropdownMenu.vue.js +7 -0
  52. package/dist/components/base/DropdownMenu.vue2.js +91 -0
  53. package/dist/components/base/EmptyState.vue.js +7 -0
  54. package/dist/components/base/EmptyState.vue2.js +38 -0
  55. package/dist/components/base/InfoCard.vue.js +7 -0
  56. package/dist/components/base/InfoCard.vue2.js +167 -0
  57. package/dist/components/base/MonitorItem.vue.d.ts +1 -1
  58. package/dist/components/base/MonitorItem.vue.js +7 -0
  59. package/dist/components/base/MonitorItem.vue2.js +56 -0
  60. package/dist/components/base/PersonaCard.vue.d.ts +2 -1
  61. package/dist/components/base/PersonaCard.vue.js +7 -0
  62. package/dist/components/base/PersonaCard.vue2.js +185 -0
  63. package/dist/components/base/ProgressBar.vue.js +7 -0
  64. package/dist/components/base/ProgressBar.vue2.js +49 -0
  65. package/dist/components/base/RangeSlider.vue.js +7 -0
  66. package/dist/components/base/RangeSlider.vue2.js +35 -0
  67. package/dist/components/base/RefTag.vue.d.ts +2 -2
  68. package/dist/components/base/RefTag.vue.js +7 -0
  69. package/dist/components/base/RefTag.vue2.js +52 -0
  70. package/dist/components/base/SearchHighlight.vue.d.ts +6 -0
  71. package/dist/components/base/SearchHighlight.vue.js +7 -0
  72. package/dist/components/base/SearchHighlight.vue2.js +21 -0
  73. package/dist/components/base/SectionBlock.vue.js +7 -0
  74. package/dist/components/base/SectionBlock.vue2.js +115 -0
  75. package/dist/components/base/SelectBadge.vue.js +7 -0
  76. package/dist/components/base/SelectBadge.vue2.js +81 -0
  77. package/dist/components/base/StatisticCard.vue.js +7 -0
  78. package/dist/components/base/StatisticCard.vue2.js +57 -0
  79. package/dist/components/base/StatusIndicator.vue.js +7 -0
  80. package/dist/components/base/StatusIndicator.vue2.js +54 -0
  81. package/dist/components/base/StatusSummary.vue.js +7 -0
  82. package/dist/components/base/StatusSummary.vue2.js +64 -0
  83. package/dist/components/base/Stepper.vue.js +7 -0
  84. package/dist/components/base/Stepper.vue2.js +70 -0
  85. package/dist/components/base/Switch.vue.js +7 -0
  86. package/dist/components/base/Switch.vue2.js +43 -0
  87. package/dist/components/base/ToolbarBtn.vue.d.ts +2 -1
  88. package/dist/components/base/ToolbarBtn.vue.js +7 -0
  89. package/dist/components/base/ToolbarBtn.vue2.js +30 -0
  90. package/dist/components/base/ViewModeGroup.vue.d.ts +2 -1
  91. package/dist/components/base/ViewModeGroup.vue.js +7 -0
  92. package/dist/components/base/ViewModeGroup.vue2.js +32 -0
  93. package/dist/components/base/ViewSwitcher.vue.d.ts +2 -1
  94. package/dist/components/base/ViewSwitcher.vue.js +7 -0
  95. package/dist/components/base/ViewSwitcher.vue2.js +73 -0
  96. package/dist/components/base/ViewTab.vue.js +7 -0
  97. package/dist/components/base/ViewTab.vue2.js +42 -0
  98. package/dist/components/base/index.d.ts +1 -0
  99. package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
  100. package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
  101. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
  102. package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
  103. package/dist/components/detail/CommentItem.vue.js +7 -0
  104. package/dist/components/detail/CommentItem.vue2.js +29 -0
  105. package/dist/components/detail/DetailLayout.vue.js +7 -0
  106. package/dist/components/detail/DetailLayout.vue2.js +118 -0
  107. package/dist/components/detail/PropPanel.vue.js +7 -0
  108. package/dist/components/detail/PropPanel.vue2.js +51 -0
  109. package/dist/components/detail/PropRow.vue.js +7 -0
  110. package/dist/components/detail/PropRow.vue2.js +51 -0
  111. package/dist/components/editor/BlockQuote.vue.js +7 -0
  112. package/dist/components/editor/BlockQuote.vue2.js +45 -0
  113. package/dist/components/editor/CodeBlock.vue.js +7 -0
  114. package/dist/components/editor/CodeBlock.vue2.js +48 -0
  115. package/dist/components/editor/ContentBlock.vue.js +7 -0
  116. package/dist/components/editor/ContentBlock.vue2.js +49 -0
  117. package/dist/components/editor/RefLink.vue.js +7 -0
  118. package/dist/components/editor/RefLink.vue2.js +37 -0
  119. package/dist/components/editor/RichTextEditor.vue.js +7 -0
  120. package/dist/components/editor/RichTextEditor.vue2.js +132 -0
  121. package/dist/components/field/FieldAttachment.vue.d.ts +17 -0
  122. package/dist/components/field/FieldAttachment.vue.js +7 -0
  123. package/dist/components/field/FieldAttachment.vue2.js +69 -0
  124. package/dist/components/field/FieldAutoNumber.vue.d.ts +7 -0
  125. package/dist/components/field/FieldAutoNumber.vue.js +7 -0
  126. package/dist/components/field/FieldAutoNumber.vue2.js +15 -0
  127. package/dist/components/field/FieldCheckbox.vue.js +7 -0
  128. package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
  129. package/dist/components/field/FieldCreator.vue.d.ts +7 -0
  130. package/dist/components/field/FieldCreator.vue.js +7 -0
  131. package/dist/components/field/FieldCreator.vue2.js +24 -0
  132. package/dist/components/field/FieldCurrency.vue.d.ts +17 -0
  133. package/dist/components/field/FieldCurrency.vue.js +7 -0
  134. package/dist/components/field/FieldCurrency.vue2.js +42 -0
  135. package/dist/components/field/FieldDate.vue.js +7 -0
  136. package/dist/components/field/FieldDate.vue2.js +36 -0
  137. package/dist/components/field/FieldDatetime.vue.js +7 -0
  138. package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
  139. package/dist/components/field/FieldEmail.vue.js +7 -0
  140. package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
  141. package/dist/components/field/FieldMarkdownPreview.vue.d.ts +13 -0
  142. package/dist/components/field/FieldMarkdownPreview.vue.js +7 -0
  143. package/dist/components/field/FieldMarkdownPreview.vue2.js +37 -0
  144. package/dist/components/field/FieldMultiSelect.vue.js +7 -0
  145. package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
  146. package/dist/components/field/FieldNumber.vue.js +7 -0
  147. package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
  148. package/dist/components/field/FieldPhone.vue.d.ts +17 -0
  149. package/dist/components/field/FieldPhone.vue.js +7 -0
  150. package/dist/components/field/FieldPhone.vue2.js +34 -0
  151. package/dist/components/field/FieldProgress.vue.d.ts +15 -0
  152. package/dist/components/field/FieldProgress.vue.js +7 -0
  153. package/dist/components/field/FieldProgress.vue2.js +40 -0
  154. package/dist/components/field/FieldRating.vue.js +7 -0
  155. package/dist/components/field/FieldRating.vue2.js +31 -0
  156. package/dist/components/field/FieldRelation.vue.d.ts +17 -0
  157. package/dist/components/field/FieldRelation.vue.js +7 -0
  158. package/dist/components/field/FieldRelation.vue2.js +67 -0
  159. package/dist/components/field/FieldRichText.vue.d.ts +17 -0
  160. package/dist/components/field/FieldRichText.vue.js +7 -0
  161. package/dist/components/field/FieldRichText.vue2.js +65 -0
  162. package/dist/components/field/FieldSelect.vue.js +7 -0
  163. package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +44 -44
  164. package/dist/components/field/FieldText.vue.js +7 -0
  165. package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
  166. package/dist/components/field/FieldUrl.vue.js +7 -0
  167. package/dist/components/field/FieldUrl.vue2.js +33 -0
  168. package/dist/components/form/FormDesigner.vue.js +7 -0
  169. package/dist/components/form/FormDesigner.vue2.js +255 -0
  170. package/dist/components/gallery/GalleryCard.vue.js +7 -0
  171. package/dist/components/gallery/GalleryCard.vue2.js +87 -0
  172. package/dist/components/gallery/GalleryView.vue.d.ts +6 -2
  173. package/dist/components/gallery/GalleryView.vue.js +7 -0
  174. package/dist/components/gallery/GalleryView.vue2.js +58 -0
  175. package/dist/components/kanban/KanbanBoard.vue.d.ts +5 -1
  176. package/dist/components/kanban/KanbanBoard.vue.js +7 -0
  177. package/dist/components/kanban/KanbanBoard.vue2.js +119 -0
  178. package/dist/components/kanban/KanbanCard.vue.js +7 -0
  179. package/dist/components/kanban/KanbanCard.vue2.js +56 -0
  180. package/dist/components/kanban/KanbanColumn.vue.js +7 -0
  181. package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
  182. package/dist/components/kanban/QuickAddRow.vue.js +7 -0
  183. package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
  184. package/dist/components/layout/AppLayout.vue.js +7 -0
  185. package/dist/components/layout/AppLayout.vue2.js +82 -0
  186. package/dist/components/layout/Navbar.vue.js +7 -0
  187. package/dist/components/layout/Navbar.vue2.js +70 -0
  188. package/dist/components/layout/Sidebar.vue.js +7 -0
  189. package/dist/components/layout/Sidebar.vue2.js +88 -0
  190. package/dist/components/layout/StatusBar.vue.js +7 -0
  191. package/dist/components/layout/StatusBar.vue2.js +37 -0
  192. package/dist/components/mermaid/MermaidChart.vue.js +7 -0
  193. package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
  194. package/dist/components/overlay/Dialog.vue.js +7 -0
  195. package/dist/components/overlay/Dialog.vue2.js +89 -0
  196. package/dist/components/overlay/Drawer.vue.js +7 -0
  197. package/dist/components/overlay/Drawer.vue2.js +96 -0
  198. package/dist/components/overlay/Modal.vue.js +7 -0
  199. package/dist/components/overlay/Modal.vue2.js +99 -0
  200. package/dist/components/overlay/SidePanel.vue.js +7 -0
  201. package/dist/components/overlay/SidePanel.vue2.js +121 -0
  202. package/dist/components/split/SplitPane.vue.js +8 -0
  203. package/dist/components/split/SplitPane.vue2.js +68 -0
  204. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +33 -0
  205. package/dist/components/table/ColumnHeaderMenu.vue.js +7 -0
  206. package/dist/components/table/ColumnHeaderMenu.vue2.js +153 -0
  207. package/dist/components/table/DataTable.vue.d.ts +116 -25
  208. package/dist/components/table/DataTable.vue.js +7 -0
  209. package/dist/components/table/DataTable.vue2.js +821 -0
  210. package/dist/components/table/DetailSheet.vue.d.ts +43 -0
  211. package/dist/components/table/DetailSheet.vue.js +7 -0
  212. package/dist/components/table/DetailSheet.vue2.js +140 -0
  213. package/dist/components/table/FieldCell.vue.d.ts +1 -1
  214. package/dist/components/table/FieldCell.vue.js +7 -0
  215. package/dist/components/table/FieldCell.vue2.js +86 -0
  216. package/dist/components/table/FieldTypePicker.vue.d.ts +15 -0
  217. package/dist/components/table/FieldTypePicker.vue.js +7 -0
  218. package/dist/components/table/FieldTypePicker.vue2.js +92 -0
  219. package/dist/components/table/MobileListView.vue.d.ts +24 -0
  220. package/dist/components/table/MobileListView.vue.js +7 -0
  221. package/dist/components/table/MobileListView.vue2.js +90 -0
  222. package/dist/components/table/NewRowBtn.vue.js +7 -0
  223. package/dist/components/table/NewRowBtn.vue2.js +22 -0
  224. package/dist/components/table/TableColumnManager.vue.js +7 -0
  225. package/dist/components/table/TableColumnManager.vue2.js +100 -0
  226. package/dist/components/table/TableDataRow.vue.js +7 -0
  227. package/dist/components/table/TableDataRow.vue2.js +115 -0
  228. package/dist/components/table/TableFilterPanel.vue.js +7 -0
  229. package/dist/components/table/TableFilterPanel.vue2.js +142 -0
  230. package/dist/components/table/TableGroupRow.vue.d.ts +5 -0
  231. package/dist/components/table/TableGroupRow.vue.js +7 -0
  232. package/dist/components/table/TableGroupRow.vue2.js +58 -0
  233. package/dist/components/table/TableHeaderRow.vue.d.ts +16 -0
  234. package/dist/components/table/TableHeaderRow.vue.js +7 -0
  235. package/dist/components/table/TableHeaderRow.vue2.js +90 -0
  236. package/dist/components/table/TableToolbar.vue.d.ts +118 -0
  237. package/dist/components/table/TableToolbar.vue.js +7 -0
  238. package/dist/components/table/TableToolbar.vue2.js +273 -0
  239. package/dist/components/table/index.d.ts +5 -0
  240. package/dist/components/tabs/TabPanel.vue.js +7 -0
  241. package/dist/components/tabs/TabPanel.vue2.js +26 -0
  242. package/dist/components/tabs/Tabs.vue.js +7 -0
  243. package/dist/components/tabs/Tabs.vue2.js +87 -0
  244. package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
  245. package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
  246. package/dist/components/timeline/GanttRow.vue.js +7 -0
  247. package/dist/components/timeline/GanttRow.vue2.js +110 -0
  248. package/dist/components/timeline/GanttTimeline.vue.js +7 -0
  249. package/dist/components/timeline/GanttTimeline.vue2.js +186 -0
  250. package/dist/components/toast/ToastContainer.vue.js +34 -0
  251. package/dist/components/toast/ToastContainer.vue3.js +5 -0
  252. package/dist/components/toast/ToastItem.vue.js +7 -0
  253. package/dist/components/toast/ToastItem.vue2.js +78 -0
  254. package/dist/composables/index.d.ts +19 -0
  255. package/dist/composables/useAiChat.js +103 -0
  256. package/dist/composables/useBadge.js +76 -0
  257. package/dist/composables/useBreakpoint.d.ts +2 -1
  258. package/dist/composables/useBreakpoint.js +18 -0
  259. package/dist/composables/useColumnResize.d.ts +19 -0
  260. package/dist/composables/useColumnResize.js +58 -0
  261. package/dist/composables/useDraftRows.d.ts +33 -0
  262. package/dist/composables/useDraftRows.js +103 -0
  263. package/dist/composables/useFixedColumns.d.ts +25 -0
  264. package/dist/composables/useFixedColumns.js +61 -0
  265. package/dist/composables/useFocusTrap.d.ts +10 -0
  266. package/dist/composables/useFocusTrap.js +37 -0
  267. package/dist/composables/useInlineEdit.js +28 -0
  268. package/dist/composables/useKeyboardNavigation.d.ts +45 -0
  269. package/dist/composables/useKeyboardNavigation.js +140 -0
  270. package/dist/composables/useMarkdown.js +69 -0
  271. package/dist/composables/useRowDrag.d.ts +32 -0
  272. package/dist/composables/useRowDrag.js +85 -0
  273. package/dist/composables/useSchemaEngine.d.ts +31 -0
  274. package/dist/composables/useSchemaEngine.js +129 -0
  275. package/dist/composables/useSearch.d.ts +30 -0
  276. package/dist/composables/useSearch.js +59 -0
  277. package/dist/composables/useStream.js +80 -0
  278. package/dist/composables/useSupabaseProvider.d.ts +70 -0
  279. package/dist/composables/useSupabaseProvider.js +126 -0
  280. package/dist/composables/useTable.d.ts +3 -0
  281. package/dist/composables/useTable.js +135 -0
  282. package/dist/composables/useTableColumns.js +24 -0
  283. package/dist/composables/useTableData.js +16 -0
  284. package/dist/composables/useTableFilter.js +97 -0
  285. package/dist/composables/useTableGroup.d.ts +14 -1
  286. package/dist/composables/useTableGroup.js +70 -0
  287. package/dist/composables/useToast.js +38 -0
  288. package/dist/composables/useTypewriter.js +56 -0
  289. package/dist/composables/useViewPersistence.d.ts +98 -0
  290. package/dist/composables/useViewPersistence.js +141 -0
  291. package/dist/composables/useVirtualList.d.ts +4 -1
  292. package/dist/composables/useVirtualList.js +140 -0
  293. package/dist/composables/useWorkerSort.d.ts +14 -0
  294. package/dist/composables/useWorkerSort.js +61 -0
  295. package/dist/constants/table.js +11 -0
  296. package/dist/index.d.ts +28 -4
  297. package/dist/index.js +349 -0
  298. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
  299. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
  300. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
  301. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
  302. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
  303. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
  304. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
  305. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
  306. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
  307. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
  308. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
  309. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
  310. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
  311. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
  312. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
  313. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
  314. package/dist/style.css +1 -1
  315. package/dist/types/index.d.ts +63 -2
  316. package/dist/types/index.js +94 -0
  317. package/dist/types/table-internal.d.ts +64 -0
  318. package/dist/utils/aggregation.d.ts +5 -0
  319. package/dist/utils/aggregation.js +38 -0
  320. package/dist/utils/icon.js +15 -0
  321. package/dist/utils/supabaseAdapter.d.ts +48 -0
  322. package/dist/utils/supabaseAdapter.js +76 -0
  323. package/dist/utils/supabaseSchema.d.ts +81 -0
  324. package/dist/utils/supabaseSchema.js +202 -0
  325. package/dist/workers/tableWorker.d.ts +31 -0
  326. package/package.json +13 -6
  327. package/dist/FieldDate-Bljx4jb7.js +0 -34
  328. package/dist/FieldRating-BKHUu-A1.js +0 -32
  329. package/dist/FieldUrl-bv0EB9sh.js +0 -34
  330. package/dist/index-DQph5iTq.js +0 -12936
  331. package/dist/oneflow-ui.js +0 -111
  332. package/dist/oneflow-ui.umd.cjs +0 -13
@@ -0,0 +1,110 @@
1
+ import { defineComponent as W, ref as _, computed as r, openBlock as B, createElementBlock as T, createElementVNode as n, normalizeStyle as d, toDisplayString as y, normalizeClass as A } from "vue";
2
+ import { resolveBadge as h, mergeColorMap as M, DEFAULT_PRIORITY_MAP as z, DEFAULT_STATUS_MAP as R } from "../../composables/useBadge.js";
3
+ const U = { class: "gantt-row__label" }, X = { class: "gantt-row__title" }, F = { class: "gantt-row__bar-label" }, G = /* @__PURE__ */ W({
4
+ __name: "GanttRow",
5
+ props: {
6
+ item: {},
7
+ dayWidth: {},
8
+ offsetDays: {},
9
+ durationDays: {},
10
+ totalDays: {},
11
+ readonly: { type: Boolean, default: !1 },
12
+ priorityColorMap: {},
13
+ statusColorMap: {}
14
+ },
15
+ emits: ["click", "change"],
16
+ setup(s, { emit: b }) {
17
+ const t = s, u = b, l = _(!1), i = _(null);
18
+ let g = 0, D = 0, c = 0;
19
+ const C = r(() => t.totalDays * t.dayWidth), S = r(() => t.offsetDays * t.dayWidth), k = r(() => Math.max(t.durationDays, 1) * t.dayWidth), m = r(
20
+ () => h(
21
+ t.item.priority || "",
22
+ M(z, t.priorityColorMap)
23
+ )
24
+ ), f = r(() => t.item.barColor ? { background: t.item.barColor, color: "var(--of-color-gray-800)" } : {
25
+ background: m.value.style.background,
26
+ color: m.value.style.color
27
+ }), x = r(() => m.value.style), $ = r(() => {
28
+ const e = h(
29
+ t.item.status || "",
30
+ M(R, t.statusColorMap)
31
+ );
32
+ return e.dot ?? e.style.color;
33
+ }), E = r(() => {
34
+ const e = (a) => {
35
+ const o = /* @__PURE__ */ new Date(`${a}T00:00:00`);
36
+ return `${String(o.getMonth() + 1).padStart(2, "0")}/${String(o.getDate()).padStart(2, "0")}`;
37
+ };
38
+ return `${e(t.item.startDate)} - ${e(t.item.endDate)}`;
39
+ });
40
+ function v(e, a) {
41
+ t.readonly || (e.preventDefault(), e.stopPropagation(), l.value = !0, i.value = a, g = e.clientX, D = t.offsetDays, c = t.durationDays, window.addEventListener("mousemove", p), window.addEventListener("mouseup", w));
42
+ }
43
+ function p(e) {
44
+ if (!l.value || !i.value) return;
45
+ const a = Math.round((e.clientX - g) / t.dayWidth);
46
+ if (i.value === "move") {
47
+ const P = Math.max(0, Math.min(D + a, t.totalDays - 1));
48
+ u("change", {
49
+ id: t.item.id,
50
+ offsetDays: P,
51
+ durationDays: c,
52
+ startDate: t.item.startDate,
53
+ endDate: t.item.endDate
54
+ });
55
+ return;
56
+ }
57
+ const o = Math.max(1, c + a), L = Math.max(1, t.totalDays - t.offsetDays);
58
+ u("change", {
59
+ id: t.item.id,
60
+ offsetDays: t.offsetDays,
61
+ durationDays: Math.min(o, L),
62
+ startDate: t.item.startDate,
63
+ endDate: t.item.endDate
64
+ });
65
+ }
66
+ function w() {
67
+ l.value = !1, i.value = null, window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", w);
68
+ }
69
+ return (e, a) => (B(), T("div", {
70
+ class: "gantt-row",
71
+ onClick: a[2] || (a[2] = (o) => u("click", s.item))
72
+ }, [
73
+ n("div", U, [
74
+ n("span", {
75
+ class: "gantt-row__dot",
76
+ style: d({ backgroundColor: $.value })
77
+ }, null, 4),
78
+ n("span", X, y(s.item.title), 1),
79
+ n("span", {
80
+ class: "gantt-row__priority",
81
+ style: d(x.value)
82
+ }, y(s.item.priority), 5)
83
+ ]),
84
+ n("div", {
85
+ class: "gantt-row__chart",
86
+ style: d({ width: `${C.value}px` })
87
+ }, [
88
+ n("div", {
89
+ class: A(["gantt-row__bar", { "gantt-row__bar--dragging": l.value }]),
90
+ style: d({
91
+ left: `${S.value}px`,
92
+ width: `${k.value}px`,
93
+ backgroundColor: f.value.background,
94
+ color: f.value.color
95
+ }),
96
+ onMousedown: a[1] || (a[1] = (o) => v(o, "move"))
97
+ }, [
98
+ n("span", F, y(E.value), 1),
99
+ n("span", {
100
+ class: "gantt-row__handle",
101
+ onMousedown: a[0] || (a[0] = (o) => v(o, "resize-end"))
102
+ }, null, 32)
103
+ ], 38)
104
+ ], 4)
105
+ ]));
106
+ }
107
+ });
108
+ export {
109
+ G as default
110
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./GanttTimeline.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-87818263"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,186 @@
1
+ import { defineComponent as J, computed as s, ref as K, watch as P, openBlock as l, createElementBlock as c, normalizeStyle as _, createElementVNode as I, Fragment as R, renderList as T, normalizeClass as Q, toDisplayString as U, createCommentVNode as b, createBlock as X } from "vue";
2
+ import Z from "./GanttRow.vue.js";
3
+ import { taskToDataRecord as tt, buildGanttItems as et } from "../../types/index.js";
4
+ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__rows" }, rt = {
5
+ key: 0,
6
+ class: "gantt-timeline__empty"
7
+ }, f = 40, lt = /* @__PURE__ */ J({
8
+ __name: "GanttTimeline",
9
+ props: {
10
+ records: {},
11
+ schema: {},
12
+ viewConfig: {},
13
+ startFieldId: { default: "startDate" },
14
+ endFieldId: { default: "endDate" },
15
+ labelFieldId: { default: "title" },
16
+ items: {},
17
+ data: {},
18
+ startDate: {},
19
+ days: { default: 30 }
20
+ },
21
+ emits: ["row-click", "record-change", "update:records"],
22
+ setup(E, { emit: L }) {
23
+ const n = E, S = L;
24
+ function i(e) {
25
+ return /* @__PURE__ */ new Date(`${e}T00:00:00`);
26
+ }
27
+ function h(e) {
28
+ const t = e.getFullYear(), a = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
29
+ return `${t}-${a}-${r}`;
30
+ }
31
+ function y(e, t) {
32
+ return Math.round((i(t).getTime() - i(e).getTime()) / 864e5);
33
+ }
34
+ function p(e, t) {
35
+ const a = i(e), r = new Date(a);
36
+ return r.setDate(a.getDate() + t), h(r);
37
+ }
38
+ function w(e) {
39
+ if (typeof e != "string" || !e) return null;
40
+ const t = e.match(/^(\d{4}-\d{2}-\d{2})/);
41
+ return t ? t[1] : null;
42
+ }
43
+ function x() {
44
+ const e = /* @__PURE__ */ new Date();
45
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-01`;
46
+ }
47
+ const z = s(() => n.startFieldId ?? "startDate"), B = s(() => n.endFieldId ?? "endDate"), G = s(() => n.labelFieldId ?? "title"), F = s(() => {
48
+ var e, t;
49
+ return (e = n.records) != null && e.length ? n.records : (t = n.data) != null && t.length ? n.data.map(tt) : [];
50
+ }), H = s(() => {
51
+ var e, t, a;
52
+ return (e = n.items) != null && e.length ? n.items : (t = n.records) != null && t.length || (a = n.data) != null && a.length ? et(F.value, {
53
+ startFieldId: z.value,
54
+ endFieldId: B.value,
55
+ labelFieldId: G.value
56
+ }) : [];
57
+ }), m = s(() => H.value.map((t) => {
58
+ const a = w(t.startDate), r = w(t.endDate);
59
+ return {
60
+ id: t.id,
61
+ sourceRecordId: t.id,
62
+ title: t.title,
63
+ status: t.status,
64
+ priority: t.priority,
65
+ startDate: a ?? t.startDate,
66
+ endDate: r ?? t.endDate,
67
+ barColor: t.barColor
68
+ };
69
+ }).filter(
70
+ (t) => w(t.startDate) !== null && w(t.endDate) !== null
71
+ )), O = s(() => {
72
+ var a, r;
73
+ const e = [...m.value], t = (r = (a = n.viewConfig) == null ? void 0 : a.sorts) == null ? void 0 : r[0];
74
+ return t && e.sort((d, v) => {
75
+ const o = d[t.fieldId] ?? "", q = v[t.fieldId] ?? "", M = String(o).localeCompare(String(q));
76
+ return t.direction === "desc" ? -M : M;
77
+ }), e;
78
+ }), V = s(() => {
79
+ if (!m.value.length) return n.startDate || x();
80
+ const e = Math.min(
81
+ ...m.value.map((a) => i(a.startDate).getTime())
82
+ ), t = new Date(e);
83
+ return t.setDate(t.getDate() - 1), h(t);
84
+ }), Y = s(() => {
85
+ if (!m.value.length)
86
+ return p(n.startDate || x(), n.days - 1);
87
+ const e = Math.max(...m.value.map((a) => i(a.endDate).getTime())), t = new Date(e);
88
+ return t.setDate(t.getDate() + 1), h(t);
89
+ }), D = s(() => n.startDate || V.value), g = s(() => n.startDate ? n.days : Math.max(n.days, y(D.value, Y.value) + 1)), N = s(() => {
90
+ const e = [];
91
+ for (let t = 0; t < g.value; t++)
92
+ e.push(p(D.value, t));
93
+ return e;
94
+ }), u = K([]);
95
+ P(
96
+ O,
97
+ (e) => {
98
+ u.value = e.map((t) => ({ ...t }));
99
+ },
100
+ { immediate: !0 }
101
+ );
102
+ const C = s(() => {
103
+ const e = D.value, t = g.value;
104
+ return u.value.map((a) => {
105
+ const r = Math.max(0, y(e, a.startDate)), d = Math.max(r, y(e, a.endDate)), v = Math.max(1, d - r + 1);
106
+ return { row: a, offsetDays: Math.min(r, t - 1), durationDays: v };
107
+ });
108
+ }), $ = h(/* @__PURE__ */ new Date());
109
+ function A(e) {
110
+ return e === $;
111
+ }
112
+ function W(e) {
113
+ const t = i(e);
114
+ return `${String(t.getMonth() + 1).padStart(2, "0")}/${String(t.getDate()).padStart(2, "0")}`;
115
+ }
116
+ const k = s(() => {
117
+ const e = y(D.value, $);
118
+ return e < 0 || e > g.value - 1 ? null : e * f + f / 2;
119
+ });
120
+ function j(e) {
121
+ const t = u.value.findIndex((o) => o.id === e.id);
122
+ if (t === -1) return;
123
+ const a = p(D.value, e.offsetDays), r = p(a, e.durationDays - 1);
124
+ u.value[t] = {
125
+ ...u.value[t],
126
+ startDate: a,
127
+ endDate: r
128
+ };
129
+ const d = u.value[t].sourceRecordId;
130
+ if (!d) return;
131
+ S("record-change", {
132
+ recordId: d,
133
+ startDate: a,
134
+ endDate: r
135
+ });
136
+ const v = F.value.map((o) => o.id !== d ? o : {
137
+ ...o,
138
+ fields: {
139
+ ...o.fields,
140
+ [n.startFieldId]: a,
141
+ [n.endFieldId]: r
142
+ }
143
+ });
144
+ S("update:records", v);
145
+ }
146
+ return (e, t) => (l(), c("div", {
147
+ class: "gantt-timeline",
148
+ style: _({ "--day-width": `${f}px` })
149
+ }, [
150
+ I("div", at, [
151
+ t[0] || (t[0] = I("div", { class: "gantt-timeline__header-label" }, "任务", -1)),
152
+ I("div", {
153
+ class: "gantt-timeline__header-dates",
154
+ style: _({ width: `${g.value * f}px` })
155
+ }, [
156
+ (l(!0), c(R, null, T(N.value, (a) => (l(), c("div", {
157
+ key: a,
158
+ class: Q(["gantt-timeline__header-cell", { "gantt-timeline__header-cell--today": A(a) }]),
159
+ style: _({ width: `${f}px` })
160
+ }, U(W(a)), 7))), 128)),
161
+ k.value !== null ? (l(), c("div", {
162
+ key: 0,
163
+ class: "gantt-timeline__today-line",
164
+ style: _({ left: `${k.value}px` })
165
+ }, null, 4)) : b("", !0)
166
+ ], 4)
167
+ ]),
168
+ I("div", nt, [
169
+ (l(!0), c(R, null, T(C.value, (a) => (l(), X(Z, {
170
+ key: a.row.id,
171
+ item: a.row,
172
+ "offset-days": a.offsetDays,
173
+ "duration-days": a.durationDays,
174
+ "day-width": f,
175
+ "total-days": g.value,
176
+ onChange: j,
177
+ onClick: (r) => S("row-click", a.row)
178
+ }, null, 8, ["item", "offset-days", "duration-days", "total-days", "onClick"]))), 128)),
179
+ C.value.length === 0 ? (l(), c("div", rt, "暂无任务数据")) : b("", !0)
180
+ ])
181
+ ], 4));
182
+ }
183
+ });
184
+ export {
185
+ lt as default
186
+ };
@@ -0,0 +1,34 @@
1
+ import { defineComponent as s, openBlock as t, createBlock as o, Teleport as i, createElementVNode as l, createVNode as c, TransitionGroup as m, withCtx as d, createElementBlock as f, Fragment as p, renderList as u, unref as r } from "vue";
2
+ import { useToast as _ } from "../../composables/useToast.js";
3
+ import v from "./ToastItem.vue.js";
4
+ const C = {
5
+ class: "of-toast-container",
6
+ "aria-live": "polite",
7
+ "aria-atomic": "false"
8
+ }, E = /* @__PURE__ */ s({
9
+ __name: "ToastContainer",
10
+ setup(T) {
11
+ const { toasts: a, remove: n } = _();
12
+ return (k, h) => (t(), o(i, { to: "body" }, [
13
+ l("div", C, [
14
+ c(m, {
15
+ name: "of-toast",
16
+ tag: "div",
17
+ class: "of-toast-list"
18
+ }, {
19
+ default: d(() => [
20
+ (t(!0), f(p, null, u(r(a), (e) => (t(), o(v, {
21
+ key: e.id,
22
+ toast: e,
23
+ onClose: (x) => r(n)(e.id)
24
+ }, null, 8, ["toast", "onClose"]))), 128))
25
+ ]),
26
+ _: 1
27
+ })
28
+ ])
29
+ ]));
30
+ }
31
+ });
32
+ export {
33
+ E as default
34
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./ToastContainer.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./ToastItem.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1b04945c"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as m, computed as a, openBlock as l, createElementBlock as s, normalizeStyle as g, normalizeClass as C, createElementVNode as r, createBlock as _, resolveDynamicComponent as p, toDisplayString as n, createCommentVNode as y, createVNode as k, unref as h } from "vue";
2
+ import { XCircle as L, AlertTriangle as z, CheckCircle2 as $, Info as B, X as I } from "lucide-vue-next";
3
+ const N = ["role", "aria-label"], V = { class: "of-toast__icon" }, w = { class: "of-toast__content" }, x = {
4
+ key: 0,
5
+ class: "of-toast__title"
6
+ }, D = { class: "of-toast__message" }, X = /* @__PURE__ */ m({
7
+ __name: "ToastItem",
8
+ props: {
9
+ toast: {}
10
+ },
11
+ emits: ["close"],
12
+ setup(o, { emit: f }) {
13
+ const t = o, i = f, d = {
14
+ info: B,
15
+ success: $,
16
+ warning: z,
17
+ error: L
18
+ }, b = {
19
+ info: {
20
+ icon: "var(--of-color-blue-500, #3b82f6)",
21
+ border: "var(--of-color-blue-200, #bfdbfe)",
22
+ borderLeft: "var(--of-color-blue-500, #3b82f6)",
23
+ bg: "var(--of-color-blue-50, #eff6ff)"
24
+ },
25
+ success: {
26
+ icon: "var(--of-color-green-500, #22c55e)",
27
+ border: "var(--of-color-green-200, #bbf7d0)",
28
+ borderLeft: "var(--of-color-green-500, #22c55e)",
29
+ bg: "var(--of-color-green-50, #f0fdf4)"
30
+ },
31
+ warning: {
32
+ icon: "var(--of-color-orange-500, #f97316)",
33
+ border: "var(--of-color-orange-200, #fed7aa)",
34
+ borderLeft: "var(--of-color-orange-500, #f97316)",
35
+ bg: "var(--of-color-orange-50, #fff7ed)"
36
+ },
37
+ error: {
38
+ icon: "var(--of-color-red-500, #ef4444)",
39
+ border: "var(--of-color-red-200, #fecaca)",
40
+ borderLeft: "var(--of-color-red-500, #ef4444)",
41
+ bg: "var(--of-color-red-50, #fef2f2)"
42
+ }
43
+ }, v = a(() => d[t.toast.type]), e = a(() => b[t.toast.type]), u = a(() => t.toast.type === "error" ? "alertdialog" : "alert");
44
+ return (E, c) => (l(), s("div", {
45
+ class: C(["of-toast", `of-toast--${o.toast.type}`]),
46
+ style: g({
47
+ borderColor: e.value.border,
48
+ borderLeftColor: e.value.borderLeft,
49
+ backgroundColor: e.value.bg
50
+ }),
51
+ role: u.value,
52
+ "aria-label": `${o.toast.type}: ${o.toast.message}`
53
+ }, [
54
+ r("div", V, [
55
+ (l(), _(p(v.value), {
56
+ size: 20,
57
+ color: e.value.icon,
58
+ "aria-hidden": "true"
59
+ }, null, 8, ["color"]))
60
+ ]),
61
+ r("div", w, [
62
+ o.toast.title ? (l(), s("p", x, n(o.toast.title), 1)) : y("", !0),
63
+ r("p", D, n(o.toast.message), 1)
64
+ ]),
65
+ r("button", {
66
+ class: "of-toast__close",
67
+ type: "button",
68
+ "aria-label": "关闭通知",
69
+ onClick: c[0] || (c[0] = (M) => i("close"))
70
+ }, [
71
+ k(h(I), { size: 16 })
72
+ ])
73
+ ], 14, N));
74
+ }
75
+ });
76
+ export {
77
+ X as default
78
+ };
@@ -23,3 +23,22 @@ export type { UseTableDataOptions } from './useTableData';
23
23
  export { useTableColumns } from './useTableColumns';
24
24
  export type { UseTableColumnsOptions } from './useTableColumns';
25
25
  export { useBreakpoint } from './useBreakpoint';
26
+ export { useColumnResize } from './useColumnResize';
27
+ export type { UseColumnResizeOptions } from './useColumnResize';
28
+ export { useFixedColumns } from './useFixedColumns';
29
+ export type { UseFixedColumnsOptions } from './useFixedColumns';
30
+ export { useKeyboardNavigation } from './useKeyboardNavigation';
31
+ export type { UseKeyboardNavigationOptions, SelectedCell } from './useKeyboardNavigation';
32
+ export { useRowDrag } from './useRowDrag';
33
+ export type { RowReorderPayload, RowGroupChangePayload } from './useRowDrag';
34
+ export { useDraftRows } from './useDraftRows';
35
+ export type { UseDraftRowsOptions } from './useDraftRows';
36
+ export { useWorkerSort } from './useWorkerSort';
37
+ export { useSchemaEngine } from './useSchemaEngine';
38
+ export type { ValidationRule, FilterFieldConfig, FilterPanelConfig, UseSchemaEngineOptions, } from './useSchemaEngine';
39
+ export { useSupabaseProvider } from './useSupabaseProvider';
40
+ export type { SupabaseQueryBuilder, SupabaseFilterBuilder, UseSupabaseProviderOptions, } from './useSupabaseProvider';
41
+ export { useViewPersistence, createLocalStorageBackend, createSupabaseBackend, } from './useViewPersistence';
42
+ export type { ViewStorageBackend, SupabaseViewBackendOptions, UseViewPersistenceOptions, } from './useViewPersistence';
43
+ export { useSearch } from './useSearch';
44
+ export type { UseSearchOptions, SearchHighlight } from './useSearch';
@@ -0,0 +1,103 @@
1
+ import { shallowRef as A, ref as o, readonly as m, triggerRef as f } from "vue";
2
+ import { useStream as D } from "./useStream.js";
3
+ import { useTypewriter as I } from "./useTypewriter.js";
4
+ function g() {
5
+ return Date.now().toString(36) + Math.random().toString(36).slice(2, 6);
6
+ }
7
+ function E(r) {
8
+ const a = A([]), s = o(!1), n = o(null), l = r.typewriter ? I({
9
+ speed: r.typewriterSpeed ?? 15,
10
+ onUpdate: (e) => {
11
+ if (n.value) {
12
+ const t = a.value.findIndex((u) => u.id === n.value);
13
+ t !== -1 && (a.value[t].content = e, f(a));
14
+ }
15
+ }
16
+ }) : null;
17
+ function h(e) {
18
+ const t = {
19
+ id: g(),
20
+ role: "user",
21
+ content: e,
22
+ timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })
23
+ };
24
+ return a.value.push(t), f(a), t;
25
+ }
26
+ function S() {
27
+ const e = {
28
+ id: g(),
29
+ role: "ai",
30
+ content: "",
31
+ isStreaming: !0,
32
+ timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })
33
+ };
34
+ return a.value.push(e), f(a), n.value = e.id, e;
35
+ }
36
+ function c(e, t) {
37
+ const u = a.value.findIndex((i) => i.id === e);
38
+ u !== -1 && (a.value[u] = { ...a.value[u], ...t }, f(a));
39
+ }
40
+ function d(e, t) {
41
+ const u = a.value.findIndex((i) => i.id === e);
42
+ u !== -1 && (a.value[u].content += t, f(a));
43
+ }
44
+ const {
45
+ start: w,
46
+ cancel: p,
47
+ isStreaming: x
48
+ } = D({
49
+ mode: r.parseChunk ? "sse" : "raw",
50
+ onData: r.parseChunk ? (e) => {
51
+ const t = r.parseChunk(e);
52
+ t && n.value && (l ? l.append(t) : d(n.value, t));
53
+ } : void 0,
54
+ onChunk: r.parseChunk ? void 0 : (e) => {
55
+ n.value && (l ? l.append(e) : d(n.value, e));
56
+ },
57
+ onDone: () => {
58
+ n.value && (l && l.flush(), c(n.value, { isStreaming: !1 })), s.value = !1, n.value = null;
59
+ },
60
+ onError: (e) => {
61
+ var t;
62
+ n.value && c(n.value, {
63
+ isStreaming: !1,
64
+ error: !0,
65
+ content: `错误:${e.message}`
66
+ }), s.value = !1, n.value = null, (t = r.onError) == null || t.call(r, e);
67
+ }
68
+ });
69
+ async function C(e) {
70
+ var u;
71
+ if (s.value || !e.trim()) return;
72
+ h(e);
73
+ const t = S();
74
+ s.value = !0, l && l.reset();
75
+ try {
76
+ const i = await r.sendRequest(e, a.value.slice(0, -2)), M = i instanceof Response ? i.body : i;
77
+ await w(M);
78
+ } catch (i) {
79
+ c(t.id, {
80
+ isStreaming: !1,
81
+ error: !0,
82
+ content: `请求失败:${i.message}`
83
+ }), s.value = !1, n.value = null, (u = r.onError) == null || u.call(r, i);
84
+ }
85
+ }
86
+ function v() {
87
+ p(), n.value && c(n.value, { isStreaming: !1 }), s.value = !1, n.value = null;
88
+ }
89
+ function y() {
90
+ v(), a.value = [], f(a);
91
+ }
92
+ return {
93
+ messages: m(a),
94
+ isGenerating: m(s),
95
+ isStreaming: x,
96
+ send: C,
97
+ cancel: v,
98
+ clear: y
99
+ };
100
+ }
101
+ export {
102
+ E as useAiChat
103
+ };
@@ -0,0 +1,76 @@
1
+ const a = {
2
+ P0: { text: "var(--of-priority-p0-text)", bg: "var(--of-priority-p0-bg)", label: "P0" },
3
+ P1: { text: "var(--of-priority-p1-text)", bg: "var(--of-priority-p1-bg)", label: "P1" },
4
+ P2: { text: "var(--of-priority-p2-text)", bg: "var(--of-priority-p2-bg)", label: "P2" },
5
+ P3: { text: "var(--of-priority-p3-text)", bg: "var(--of-priority-p3-bg)", label: "P3" }
6
+ }, r = {
7
+ todo: { text: "var(--of-status-todo-text)", bg: "var(--of-status-todo-bg)", label: "待处理" },
8
+ in_progress: {
9
+ text: "var(--of-status-in-progress-text)",
10
+ bg: "var(--of-status-in-progress-bg)",
11
+ label: "进行中"
12
+ },
13
+ blocked: {
14
+ text: "var(--of-status-blocked-text)",
15
+ bg: "var(--of-status-blocked-bg)",
16
+ label: "已阻塞",
17
+ dot: "var(--of-status-blocked-text)"
18
+ },
19
+ done: { text: "var(--of-status-done-text)", bg: "var(--of-status-done-bg)", label: "已完成" },
20
+ // 常见英文别名
21
+ pending: { text: "var(--of-status-todo-text)", bg: "var(--of-status-todo-bg)", label: "Pending" },
22
+ open: {
23
+ text: "var(--of-status-in-progress-text)",
24
+ bg: "var(--of-status-in-progress-bg)",
25
+ label: "Open"
26
+ },
27
+ closed: { text: "var(--of-status-done-text)", bg: "var(--of-status-done-bg)", label: "Closed" },
28
+ cancelled: {
29
+ text: "var(--of-status-cancelled-text)",
30
+ bg: "var(--of-status-cancelled-bg)",
31
+ label: "Cancelled"
32
+ },
33
+ // 常见中文 key
34
+ 待处理: { text: "var(--of-status-todo-text)", bg: "var(--of-status-todo-bg)", label: "待处理" },
35
+ 进行中: {
36
+ text: "var(--of-status-in-progress-text)",
37
+ bg: "var(--of-status-in-progress-bg)",
38
+ label: "进行中"
39
+ },
40
+ 已阻塞: {
41
+ text: "var(--of-status-blocked-text)",
42
+ bg: "var(--of-status-blocked-bg)",
43
+ label: "已阻塞",
44
+ dot: "var(--of-status-blocked-text)"
45
+ },
46
+ 已完成: { text: "var(--of-status-done-text)", bg: "var(--of-status-done-bg)", label: "已完成" }
47
+ }, s = {
48
+ text: "var(--of-badge-gray-text)",
49
+ bg: "var(--of-badge-gray-bg)"
50
+ };
51
+ function b(t, e) {
52
+ const o = e[t] ?? s;
53
+ return {
54
+ style: { color: o.text, background: o.bg },
55
+ label: o.label ?? t,
56
+ dot: o.dot
57
+ };
58
+ }
59
+ function l(t, e) {
60
+ return e ? { ...t, ...e } : t;
61
+ }
62
+ function g() {
63
+ return {
64
+ DEFAULT_PRIORITY_MAP: a,
65
+ DEFAULT_STATUS_MAP: r,
66
+ resolveBadge: b,
67
+ mergeColorMap: l
68
+ };
69
+ }
70
+ export {
71
+ a as DEFAULT_PRIORITY_MAP,
72
+ r as DEFAULT_STATUS_MAP,
73
+ l as mergeColorMap,
74
+ b as resolveBadge,
75
+ g as useBadge
76
+ };
@@ -1,5 +1,6 @@
1
1
  export declare function useBreakpoint(): {
2
2
  isMobile: import('vue').Ref<boolean, boolean>;
3
3
  isTablet: import('vue').Ref<boolean, boolean>;
4
- isDesktop: import('vue').Ref<boolean, boolean>;
4
+ isDesktop: import('vue').ComputedRef<boolean>;
5
+ hasTouch: import('vue').Ref<boolean, boolean>;
5
6
  };
@@ -0,0 +1,18 @@
1
+ import { ref as i, onMounted as r, onUnmounted as d, computed as a } from "vue";
2
+ function c() {
3
+ const e = i(!1), n = i(!1), s = i(typeof window < "u" && "ontouchstart" in window);
4
+ function o() {
5
+ const t = window.innerWidth;
6
+ e.value = t < 768, n.value = t >= 768 && t < 1024;
7
+ }
8
+ r(() => {
9
+ o(), window.addEventListener("resize", o, { passive: !0 });
10
+ }), d(() => {
11
+ window.removeEventListener("resize", o);
12
+ });
13
+ const u = a(() => !e.value && !n.value);
14
+ return { isMobile: e, isTablet: n, isDesktop: u, hasTouch: s };
15
+ }
16
+ export {
17
+ c as useBreakpoint
18
+ };
@@ -0,0 +1,19 @@
1
+ import { Ref } from 'vue';
2
+ import { TableColumn } from '../types';
3
+ export interface UseColumnResizeOptions {
4
+ columns: Ref<TableColumn[]>;
5
+ /** Minimum column width in px (default 60) */
6
+ minWidth?: number;
7
+ /** Called on every mousemove during resize */
8
+ onResize?: (colKey: string, newWidth: number) => void;
9
+ }
10
+ export declare function useColumnResize(options: UseColumnResizeOptions): {
11
+ startResize: (event: MouseEvent, colKey: string) => void;
12
+ isResizing: Readonly<Ref<boolean, boolean>>;
13
+ resizingColumn: Readonly<Ref<string | null, string | null>>;
14
+ columnWidthOverrides: Readonly<Ref<ReadonlyMap<string, number>, ReadonlyMap<string, number>>>;
15
+ resolvedWidth: (colKey: string) => number;
16
+ autoFitColumn: (colKey: string, containerEl: HTMLElement | null) => void;
17
+ resizeIndicatorX: Readonly<Ref<number, number>>;
18
+ showResizeIndicator: Readonly<Ref<boolean, boolean>>;
19
+ };