@oneflowui/ui 0.4.2 → 0.4.3

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 (233) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/dist/components/ContextMenu/index.vue.js +7 -0
  4. package/dist/components/ContextMenu/index.vue2.js +91 -0
  5. package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
  6. package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
  7. package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
  8. package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
  9. package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
  10. package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
  11. package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
  12. package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
  13. package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
  14. package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
  15. package/dist/components/Dashboard/index.vue.js +7 -0
  16. package/dist/components/Dashboard/index.vue2.js +104 -0
  17. package/dist/components/ai/AiMessageBubble.vue.js +7 -0
  18. package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
  19. package/dist/components/ai/AiMessageList.vue.js +7 -0
  20. package/dist/components/ai/AiMessageList.vue2.js +78 -0
  21. package/dist/components/ai/AiSender.vue.js +7 -0
  22. package/dist/components/ai/AiSender.vue2.js +86 -0
  23. package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
  24. package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
  25. package/dist/components/ai/AiThinking.vue.js +7 -0
  26. package/dist/components/ai/AiThinking.vue2.js +19 -0
  27. package/dist/components/ai/UserMessageBubble.vue.js +7 -0
  28. package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
  29. package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
  30. package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
  31. package/dist/components/auxiliary/FileUpload.vue.js +7 -0
  32. package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
  33. package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
  34. package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
  35. package/dist/components/base/Accordion.vue.js +7 -0
  36. package/dist/components/base/Accordion.vue2.js +78 -0
  37. package/dist/components/base/AddViewBtn.vue.js +7 -0
  38. package/dist/components/base/AddViewBtn.vue2.js +25 -0
  39. package/dist/components/base/Avatar.vue.js +7 -0
  40. package/dist/components/base/Avatar.vue2.js +72 -0
  41. package/dist/components/base/Badge.vue.js +7 -0
  42. package/dist/components/base/Badge.vue2.js +70 -0
  43. package/dist/components/base/ButtonGroup.vue.js +7 -0
  44. package/dist/components/base/ButtonGroup.vue2.js +40 -0
  45. package/dist/components/base/ChainItem.vue.js +7 -0
  46. package/dist/components/base/ChainItem.vue2.js +68 -0
  47. package/dist/components/base/DescBlock.vue.js +7 -0
  48. package/dist/components/base/DescBlock.vue2.js +13 -0
  49. package/dist/components/base/DropdownMenu.vue.js +7 -0
  50. package/dist/components/base/DropdownMenu.vue2.js +92 -0
  51. package/dist/components/base/EmptyState.vue.js +7 -0
  52. package/dist/components/base/EmptyState.vue2.js +38 -0
  53. package/dist/components/base/InfoCard.vue.js +7 -0
  54. package/dist/components/base/InfoCard.vue2.js +167 -0
  55. package/dist/components/base/MonitorItem.vue.js +7 -0
  56. package/dist/components/base/MonitorItem.vue2.js +56 -0
  57. package/dist/components/base/PersonaCard.vue.js +7 -0
  58. package/dist/components/base/PersonaCard.vue2.js +173 -0
  59. package/dist/components/base/ProgressBar.vue.js +7 -0
  60. package/dist/components/base/ProgressBar.vue2.js +49 -0
  61. package/dist/components/base/RangeSlider.vue.js +7 -0
  62. package/dist/components/base/RangeSlider.vue2.js +35 -0
  63. package/dist/components/base/RefTag.vue.js +7 -0
  64. package/dist/components/base/RefTag.vue2.js +52 -0
  65. package/dist/components/base/SectionBlock.vue.js +7 -0
  66. package/dist/components/base/SectionBlock.vue2.js +115 -0
  67. package/dist/components/base/SelectBadge.vue.js +7 -0
  68. package/dist/components/base/SelectBadge.vue2.js +81 -0
  69. package/dist/components/base/StatisticCard.vue.js +7 -0
  70. package/dist/components/base/StatisticCard.vue2.js +57 -0
  71. package/dist/components/base/StatusIndicator.vue.js +7 -0
  72. package/dist/components/base/StatusIndicator.vue2.js +54 -0
  73. package/dist/components/base/StatusSummary.vue.js +7 -0
  74. package/dist/components/base/StatusSummary.vue2.js +64 -0
  75. package/dist/components/base/Stepper.vue.js +7 -0
  76. package/dist/components/base/Stepper.vue2.js +70 -0
  77. package/dist/components/base/Switch.vue.js +7 -0
  78. package/dist/components/base/Switch.vue2.js +43 -0
  79. package/dist/components/base/ToolbarBtn.vue.js +7 -0
  80. package/dist/components/base/ToolbarBtn.vue2.js +30 -0
  81. package/dist/components/base/ViewModeGroup.vue.js +7 -0
  82. package/dist/components/base/ViewModeGroup.vue2.js +32 -0
  83. package/dist/components/base/ViewSwitcher.vue.js +7 -0
  84. package/dist/components/base/ViewSwitcher.vue2.js +73 -0
  85. package/dist/components/base/ViewTab.vue.js +7 -0
  86. package/dist/components/base/ViewTab.vue2.js +42 -0
  87. package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
  88. package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
  89. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
  90. package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
  91. package/dist/components/detail/CommentItem.vue.js +7 -0
  92. package/dist/components/detail/CommentItem.vue2.js +29 -0
  93. package/dist/components/detail/DetailLayout.vue.js +7 -0
  94. package/dist/components/detail/DetailLayout.vue2.js +118 -0
  95. package/dist/components/detail/PropPanel.vue.js +7 -0
  96. package/dist/components/detail/PropPanel.vue2.js +51 -0
  97. package/dist/components/detail/PropRow.vue.js +7 -0
  98. package/dist/components/detail/PropRow.vue2.js +51 -0
  99. package/dist/components/editor/BlockQuote.vue.js +7 -0
  100. package/dist/components/editor/BlockQuote.vue2.js +45 -0
  101. package/dist/components/editor/CodeBlock.vue.js +7 -0
  102. package/dist/components/editor/CodeBlock.vue2.js +48 -0
  103. package/dist/components/editor/ContentBlock.vue.js +7 -0
  104. package/dist/components/editor/ContentBlock.vue2.js +49 -0
  105. package/dist/components/editor/RefLink.vue.js +7 -0
  106. package/dist/components/editor/RefLink.vue2.js +37 -0
  107. package/dist/components/editor/RichTextEditor.vue.js +7 -0
  108. package/dist/components/editor/RichTextEditor.vue2.js +132 -0
  109. package/dist/components/field/FieldCheckbox.vue.js +7 -0
  110. package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
  111. package/dist/components/field/FieldDate.vue.js +7 -0
  112. package/dist/{FieldDate-Bljx4jb7.js → components/field/FieldDate.vue2.js} +9 -10
  113. package/dist/components/field/FieldDatetime.vue.js +7 -0
  114. package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
  115. package/dist/components/field/FieldEmail.vue.js +7 -0
  116. package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
  117. package/dist/components/field/FieldMultiSelect.vue.js +7 -0
  118. package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
  119. package/dist/components/field/FieldNumber.vue.js +7 -0
  120. package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
  121. package/dist/components/field/FieldRating.vue.js +7 -0
  122. package/dist/components/field/FieldRating.vue2.js +31 -0
  123. package/dist/components/field/FieldSelect.vue.js +7 -0
  124. package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +34 -35
  125. package/dist/components/field/FieldText.vue.js +7 -0
  126. package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
  127. package/dist/components/field/FieldUrl.vue.js +7 -0
  128. package/dist/components/field/FieldUrl.vue2.js +33 -0
  129. package/dist/components/form/FormDesigner.vue.js +7 -0
  130. package/dist/components/form/FormDesigner.vue2.js +245 -0
  131. package/dist/components/gallery/GalleryCard.vue.js +7 -0
  132. package/dist/components/gallery/GalleryCard.vue2.js +87 -0
  133. package/dist/components/gallery/GalleryView.vue.js +7 -0
  134. package/dist/components/gallery/GalleryView.vue2.js +48 -0
  135. package/dist/components/kanban/KanbanBoard.vue.js +7 -0
  136. package/dist/components/kanban/KanbanBoard.vue2.js +86 -0
  137. package/dist/components/kanban/KanbanCard.vue.js +7 -0
  138. package/dist/components/kanban/KanbanCard.vue2.js +56 -0
  139. package/dist/components/kanban/KanbanColumn.vue.js +7 -0
  140. package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
  141. package/dist/components/kanban/QuickAddRow.vue.js +7 -0
  142. package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
  143. package/dist/components/layout/AppLayout.vue.js +7 -0
  144. package/dist/components/layout/AppLayout.vue2.js +98 -0
  145. package/dist/components/layout/Navbar.vue.js +7 -0
  146. package/dist/components/layout/Navbar.vue2.js +70 -0
  147. package/dist/components/layout/Sidebar.vue.js +7 -0
  148. package/dist/components/layout/Sidebar.vue2.js +88 -0
  149. package/dist/components/layout/StatusBar.vue.js +7 -0
  150. package/dist/components/layout/StatusBar.vue2.js +37 -0
  151. package/dist/components/mermaid/MermaidChart.vue.js +7 -0
  152. package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
  153. package/dist/components/overlay/Dialog.vue.js +7 -0
  154. package/dist/components/overlay/Dialog.vue2.js +89 -0
  155. package/dist/components/overlay/Drawer.vue.js +7 -0
  156. package/dist/components/overlay/Drawer.vue2.js +112 -0
  157. package/dist/components/overlay/Modal.vue.js +7 -0
  158. package/dist/components/overlay/Modal.vue2.js +115 -0
  159. package/dist/components/overlay/SidePanel.vue.js +7 -0
  160. package/dist/components/overlay/SidePanel.vue2.js +137 -0
  161. package/dist/components/split/SplitPane.vue.js +8 -0
  162. package/dist/components/split/SplitPane.vue2.js +68 -0
  163. package/dist/components/table/DataTable.vue.js +7 -0
  164. package/dist/components/table/DataTable.vue2.js +234 -0
  165. package/dist/components/table/FieldCell.vue.js +7 -0
  166. package/dist/components/table/FieldCell.vue2.js +71 -0
  167. package/dist/components/table/NewRowBtn.vue.js +7 -0
  168. package/dist/components/table/NewRowBtn.vue2.js +22 -0
  169. package/dist/components/table/TableColumnManager.vue.js +7 -0
  170. package/dist/components/table/TableColumnManager.vue2.js +100 -0
  171. package/dist/components/table/TableDataRow.vue.js +7 -0
  172. package/dist/components/table/TableDataRow.vue2.js +115 -0
  173. package/dist/components/table/TableFilterPanel.vue.js +7 -0
  174. package/dist/components/table/TableFilterPanel.vue2.js +142 -0
  175. package/dist/components/table/TableGroupRow.vue.js +7 -0
  176. package/dist/components/table/TableGroupRow.vue2.js +48 -0
  177. package/dist/components/table/TableHeaderRow.vue.js +7 -0
  178. package/dist/components/table/TableHeaderRow.vue2.js +69 -0
  179. package/dist/components/tabs/TabPanel.vue.js +7 -0
  180. package/dist/components/tabs/TabPanel.vue2.js +26 -0
  181. package/dist/components/tabs/Tabs.vue.js +7 -0
  182. package/dist/components/tabs/Tabs.vue2.js +87 -0
  183. package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
  184. package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
  185. package/dist/components/timeline/GanttRow.vue.js +7 -0
  186. package/dist/components/timeline/GanttRow.vue2.js +110 -0
  187. package/dist/components/timeline/GanttTimeline.vue.js +7 -0
  188. package/dist/components/timeline/GanttTimeline.vue2.js +185 -0
  189. package/dist/components/toast/ToastContainer.vue.js +34 -0
  190. package/dist/components/toast/ToastContainer.vue3.js +5 -0
  191. package/dist/components/toast/ToastItem.vue.js +7 -0
  192. package/dist/components/toast/ToastItem.vue2.js +78 -0
  193. package/dist/composables/useAiChat.js +103 -0
  194. package/dist/composables/useBadge.js +76 -0
  195. package/dist/composables/useBreakpoint.js +16 -0
  196. package/dist/composables/useInlineEdit.js +28 -0
  197. package/dist/composables/useMarkdown.js +69 -0
  198. package/dist/composables/useStream.js +80 -0
  199. package/dist/composables/useTable.js +115 -0
  200. package/dist/composables/useTableColumns.js +24 -0
  201. package/dist/composables/useTableData.js +16 -0
  202. package/dist/composables/useTableFilter.js +97 -0
  203. package/dist/composables/useTableGroup.js +46 -0
  204. package/dist/composables/useToast.js +38 -0
  205. package/dist/composables/useTypewriter.js +56 -0
  206. package/dist/composables/useVirtualList.js +117 -0
  207. package/dist/constants/table.js +11 -0
  208. package/dist/index.js +301 -0
  209. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
  210. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
  211. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
  212. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
  213. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
  214. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
  215. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
  216. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
  217. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
  218. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
  219. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
  220. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
  221. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
  222. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
  223. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
  224. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
  225. package/dist/style.css +1 -1
  226. package/dist/types/index.js +77 -0
  227. package/dist/utils/icon.js +15 -0
  228. package/package.json +13 -6
  229. package/dist/FieldRating-BKHUu-A1.js +0 -32
  230. package/dist/FieldUrl-bv0EB9sh.js +0 -34
  231. package/dist/index-DQph5iTq.js +0 -12936
  232. package/dist/oneflow-ui.js +0 -111
  233. package/dist/oneflow-ui.umd.cjs +0 -13
@@ -0,0 +1,103 @@
1
+ import { defineComponent as D, ref as k, watch as v, computed as C, openBlock as r, createElementBlock as d, createElementVNode as n, normalizeStyle as m, toDisplayString as y, createVNode as E, unref as c, createBlock as f, withCtx as H, Fragment as h, renderList as b } from "vue";
2
+ import { Plus as L } from "lucide-vue-next";
3
+ import { VueDraggable as R } from "vue-draggable-plus";
4
+ import { useVirtualList as U } from "../../composables/useVirtualList.js";
5
+ import V from "./KanbanCard.vue.js";
6
+ import { mergeColorMap as Y, DEFAULT_STATUS_MAP as w } from "../../composables/useBadge.js";
7
+ const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { class: "of-col-title" }, K = { class: "of-col-count" }, q = /* @__PURE__ */ D({
8
+ __name: "KanbanColumn",
9
+ props: {
10
+ column: {},
11
+ ghostClass: { default: "of-ghost" },
12
+ priorityColorMap: {},
13
+ statusColorMap: {}
14
+ },
15
+ emits: ["add-card", "card-click", "update:column"],
16
+ setup(i, { emit: x }) {
17
+ const a = i, u = x, l = k([...a.column.tasks]);
18
+ v(
19
+ () => a.column.tasks,
20
+ (s) => {
21
+ s.length === l.value.length && s.every((o, e) => {
22
+ var g;
23
+ return o.id === ((g = l.value[e]) == null ? void 0 : g.id);
24
+ }) || (l.value = [...s]);
25
+ }
26
+ ), v(l, (s) => {
27
+ u("update:column", { ...a.column, tasks: s });
28
+ });
29
+ const S = C(() => l.value.length > 50), p = k(null), {
30
+ visibleItems: T,
31
+ totalHeight: M,
32
+ offsetY: A
33
+ } = U({
34
+ items: l,
35
+ itemHeight: 120,
36
+ overscan: 3,
37
+ containerRef: p
38
+ }), B = C(() => {
39
+ if (a.column.color) return a.column.color;
40
+ const s = Y(w, a.statusColorMap), t = s[a.column.id], o = s[a.column.title], e = t ?? o;
41
+ return (e == null ? void 0 : e.dot) ?? (e == null ? void 0 : e.text) ?? "var(--of-color-gray-400)";
42
+ });
43
+ return (s, t) => (r(), d("div", z, [
44
+ n("div", F, [
45
+ n("span", {
46
+ class: "of-col-dot",
47
+ style: m({ background: B.value })
48
+ }, null, 4),
49
+ n("span", I, y(i.column.title), 1),
50
+ n("span", K, y(l.value.length), 1),
51
+ t[4] || (t[4] = n("span", { class: "of-col-spacer" }, null, -1)),
52
+ n("button", {
53
+ class: "of-col-add-btn",
54
+ onClick: t[0] || (t[0] = (o) => u("add-card", i.column.id))
55
+ }, [
56
+ E(c(L), { size: 14 })
57
+ ])
58
+ ]),
59
+ S.value ? (r(), d("div", {
60
+ key: 1,
61
+ ref_key: "cardContainerRef",
62
+ ref: p,
63
+ class: "of-col-cards of-col-cards-virtual"
64
+ }, [
65
+ n("div", {
66
+ style: m({ height: c(M) + "px", position: "relative" })
67
+ }, [
68
+ n("div", {
69
+ style: m({ transform: `translateY(${c(A)}px)` })
70
+ }, [
71
+ (r(!0), d(h, null, b(c(T), ({ data: o }) => (r(), f(V, {
72
+ key: o.id,
73
+ task: o,
74
+ onClick: t[3] || (t[3] = (e) => u("card-click", e))
75
+ }, null, 8, ["task"]))), 128))
76
+ ], 4)
77
+ ], 4)
78
+ ], 512)) : (r(), f(c(R), {
79
+ key: 0,
80
+ modelValue: l.value,
81
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => l.value = o),
82
+ group: { name: "kanban", pull: !0, put: !0 },
83
+ "item-key": "id",
84
+ "ghost-class": i.ghostClass,
85
+ "chosen-class": "of-chosen",
86
+ animation: 200,
87
+ class: "of-col-cards"
88
+ }, {
89
+ default: H(() => [
90
+ (r(!0), d(h, null, b(l.value, (o) => (r(), f(V, {
91
+ key: o.id,
92
+ task: o,
93
+ onClick: t[1] || (t[1] = (e) => u("card-click", e))
94
+ }, null, 8, ["task"]))), 128))
95
+ ]),
96
+ _: 1
97
+ }, 8, ["modelValue", "ghost-class"]))
98
+ ]));
99
+ }
100
+ });
101
+ export {
102
+ q as default
103
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./QuickAddRow.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5ebea11d"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,58 @@
1
+ import { defineComponent as v, ref as a, openBlock as c, createElementBlock as i, createVNode as h, unref as y, createElementVNode as _, toDisplayString as x, withDirectives as q, vModelText as w, nextTick as E } from "vue";
2
+ import { Plus as B } from "lucide-vue-next";
3
+ const V = { class: "of-quick-add" }, b = { class: "of-quick-add-placeholder" }, g = ["placeholder"], C = /* @__PURE__ */ v({
4
+ __name: "QuickAddRow",
5
+ props: {
6
+ placeholder: { default: "快速创建任务,按 Enter 提交" }
7
+ },
8
+ emits: ["submit", "cancel"],
9
+ setup(u, { emit: r }) {
10
+ const s = r, n = a(!1), e = a(""), d = a(null);
11
+ async function f() {
12
+ var t;
13
+ n.value = !0, await E(), (t = d.value) == null || t.focus();
14
+ }
15
+ function o() {
16
+ n.value = !1, e.value = "";
17
+ }
18
+ function p(t) {
19
+ if (t.key === "Enter") {
20
+ const l = e.value.trim();
21
+ l && (s("submit", l), e.value = "", o());
22
+ } else t.key === "Escape" && (s("cancel"), o());
23
+ }
24
+ function m() {
25
+ setTimeout(() => {
26
+ e.value.trim() || o();
27
+ }, 150);
28
+ }
29
+ return (t, l) => (c(), i("div", V, [
30
+ n.value ? q((c(), i("input", {
31
+ key: 1,
32
+ ref_key: "inputRef",
33
+ ref: d,
34
+ "onUpdate:modelValue": l[0] || (l[0] = (k) => e.value = k),
35
+ type: "text",
36
+ class: "of-quick-add-input",
37
+ placeholder: u.placeholder,
38
+ onKeydown: p,
39
+ onBlur: m
40
+ }, null, 40, g)), [
41
+ [w, e.value]
42
+ ]) : (c(), i("button", {
43
+ key: 0,
44
+ class: "of-quick-add-trigger",
45
+ onClick: f
46
+ }, [
47
+ h(y(B), {
48
+ size: 14,
49
+ class: "of-quick-add-icon"
50
+ }),
51
+ _("span", b, x(u.placeholder), 1)
52
+ ]))
53
+ ]));
54
+ }
55
+ });
56
+ export {
57
+ C as default
58
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AppLayout.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4bb400e7"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,98 @@
1
+ import { defineComponent as N, provide as m, computed as C, ref as h, onBeforeUnmount as T, openBlock as n, createElementBlock as s, normalizeClass as E, createElementVNode as r, unref as p, createCommentVNode as c, renderSlot as l, Fragment as $, nextTick as B } from "vue";
2
+ import { useBreakpoint as S } from "../../composables/useBreakpoint.js";
3
+ const x = { class: "of-app-layout__navbar" }, A = ["aria-expanded"], D = { class: "of-app-layout__body" }, M = {
4
+ key: 0,
5
+ class: "of-app-layout__sidebar"
6
+ }, R = { class: "of-app-layout__main" }, V = { class: "of-app-layout__statusbar" }, K = /* @__PURE__ */ N({
7
+ __name: "AppLayout",
8
+ props: {
9
+ density: { default: "comfortable" }
10
+ },
11
+ setup(v) {
12
+ const w = v, { isMobile: i, isTablet: g } = S();
13
+ m("isMobile", i), m("isTablet", g), m(
14
+ "density",
15
+ C(() => w.density)
16
+ );
17
+ const a = h(!1), f = h(null);
18
+ let t = null;
19
+ function b() {
20
+ return f.value ? Array.from(
21
+ f.value.querySelectorAll(
22
+ 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), a[href]'
23
+ )
24
+ ).filter((e) => !e.closest('[aria-hidden="true"]')) : [];
25
+ }
26
+ function d(e) {
27
+ if (e.key !== "Tab") return;
28
+ const o = b();
29
+ if (o.length === 0) {
30
+ e.preventDefault();
31
+ return;
32
+ }
33
+ const _ = o[0], k = o[o.length - 1];
34
+ e.shiftKey ? document.activeElement === _ && (e.preventDefault(), k.focus()) : document.activeElement === k && (e.preventDefault(), _.focus());
35
+ }
36
+ function L() {
37
+ const e = !a.value;
38
+ a.value = e, e ? (t = document.activeElement, B(() => {
39
+ const o = b();
40
+ o.length && o[0].focus(), document.addEventListener("keydown", d), document.addEventListener("keydown", u);
41
+ })) : (document.removeEventListener("keydown", d), document.removeEventListener("keydown", u), t == null || t.focus(), t = null);
42
+ }
43
+ function y() {
44
+ a.value = !1, document.removeEventListener("keydown", d), document.removeEventListener("keydown", u), t == null || t.focus(), t = null;
45
+ }
46
+ function u(e) {
47
+ e.key === "Escape" && y();
48
+ }
49
+ return T(() => {
50
+ document.removeEventListener("keydown", d), document.removeEventListener("keydown", u);
51
+ }), (e, o) => (n(), s("div", {
52
+ class: E(["of-app-layout", { "of-density-compact": v.density === "compact" }])
53
+ }, [
54
+ r("header", x, [
55
+ p(i) ? (n(), s("button", {
56
+ key: 0,
57
+ class: "of-app-layout__hamburger",
58
+ "aria-label": "Toggle sidebar",
59
+ "aria-expanded": a.value,
60
+ onClick: L
61
+ }, " ☰ ", 8, A)) : c("", !0),
62
+ l(e.$slots, "navbar", {}, void 0, !0)
63
+ ]),
64
+ r("div", D, [
65
+ p(i) ? c("", !0) : (n(), s("aside", M, [
66
+ l(e.$slots, "sidebar", {}, void 0, !0)
67
+ ])),
68
+ p(i) ? (n(), s($, { key: 1 }, [
69
+ a.value ? (n(), s("div", {
70
+ key: 0,
71
+ class: "of-drawer-overlay",
72
+ "aria-hidden": "true",
73
+ onClick: y
74
+ })) : c("", !0),
75
+ r("aside", {
76
+ ref_key: "drawerNavRef",
77
+ ref: f,
78
+ class: E(["of-drawer-sidebar", { "of-drawer-sidebar--open": a.value }]),
79
+ role: "dialog",
80
+ "aria-modal": "true",
81
+ "aria-label": "导航菜单"
82
+ }, [
83
+ l(e.$slots, "sidebar", {}, void 0, !0)
84
+ ], 2)
85
+ ], 64)) : c("", !0),
86
+ r("main", R, [
87
+ l(e.$slots, "default", {}, void 0, !0)
88
+ ])
89
+ ]),
90
+ r("footer", V, [
91
+ l(e.$slots, "statusbar", {}, void 0, !0)
92
+ ])
93
+ ], 2));
94
+ }
95
+ });
96
+ export {
97
+ K as default
98
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Navbar.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7187692f"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,70 @@
1
+ import { defineComponent as p, inject as C, computed as l, openBlock as r, createElementBlock as i, normalizeClass as k, createElementVNode as a, renderSlot as g, createVNode as f, unref as u, toDisplayString as d, createCommentVNode as N } from "vue";
2
+ import { SearchIcon as I, BellIcon as S } from "lucide-vue-next";
3
+ const z = { class: "of-navbar__left" }, B = { class: "of-navbar__center" }, U = { class: "of-navbar__search" }, V = ["placeholder"], x = { class: "of-navbar__right" }, A = {
4
+ key: 0,
5
+ class: "of-navbar__notify-badge"
6
+ }, j = /* @__PURE__ */ p({
7
+ __name: "Navbar",
8
+ props: {
9
+ username: { default: "U" },
10
+ searchPlaceholder: { default: "⌘K 搜索..." },
11
+ notifyCount: { default: 0 }
12
+ },
13
+ emits: ["search", "notify-click", "avatar-click"],
14
+ setup(t, { emit: v }) {
15
+ const e = C("density"), _ = l(() => (e == null ? void 0 : e.value) ?? "comfortable"), c = t, n = v, h = l(
16
+ () => c.username ? c.username.charAt(0).toUpperCase() : "U"
17
+ );
18
+ function m(o) {
19
+ n("search", o.target.value);
20
+ }
21
+ function b() {
22
+ n("notify-click");
23
+ }
24
+ function y() {
25
+ n("avatar-click");
26
+ }
27
+ return (o, s) => (r(), i("nav", {
28
+ class: k(["of-navbar", { "of-navbar--compact": _.value === "compact" }])
29
+ }, [
30
+ a("div", z, [
31
+ g(o.$slots, "logo", {}, () => [
32
+ s[0] || (s[0] = a("span", { class: "of-navbar__logo-default" }, "OneFlow", -1))
33
+ ], !0)
34
+ ]),
35
+ a("div", B, [
36
+ a("div", U, [
37
+ f(u(I), {
38
+ class: "of-navbar__search-icon",
39
+ size: 14
40
+ }),
41
+ a("input", {
42
+ class: "of-navbar__search-input",
43
+ type: "text",
44
+ placeholder: t.searchPlaceholder,
45
+ onInput: m
46
+ }, null, 40, V)
47
+ ])
48
+ ]),
49
+ a("div", x, [
50
+ a("button", {
51
+ class: "of-navbar__notify-btn",
52
+ onClick: b
53
+ }, [
54
+ f(u(S), {
55
+ class: "of-navbar__notify-icon",
56
+ size: 16
57
+ }),
58
+ t.notifyCount && t.notifyCount > 0 ? (r(), i("span", A, d(t.notifyCount > 99 ? "99+" : t.notifyCount), 1)) : N("", !0)
59
+ ]),
60
+ a("button", {
61
+ class: "of-navbar__avatar",
62
+ onClick: y
63
+ }, d(h.value), 1)
64
+ ])
65
+ ], 2));
66
+ }
67
+ });
68
+ export {
69
+ j as default
70
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Sidebar.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9dd6ae54"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,88 @@
1
+ import { defineComponent as z, inject as E, computed as S, ref as B, openBlock as s, createElementBlock as t, normalizeClass as _, renderSlot as m, createCommentVNode as a, createElementVNode as r, Fragment as f, renderList as k, createBlock as u, resolveDynamicComponent as b, unref as c, toDisplayString as d } from "vue";
2
+ import { ChevronDownIcon as D, ChevronRightIcon as w } from "lucide-vue-next";
3
+ import { resolveIcon as p } from "../../utils/icon.js";
4
+ const N = {
5
+ key: 0,
6
+ class: "of-sidebar__header"
7
+ }, V = { class: "of-sidebar__nav" }, j = ["onClick"], x = { class: "of-sidebar__item-label" }, F = {
8
+ key: 1,
9
+ class: "of-sidebar__item-badge"
10
+ }, L = {
11
+ key: 0,
12
+ class: "of-sidebar__children"
13
+ }, q = ["onClick"], A = { class: "of-sidebar__item-label" }, G = {
14
+ key: 1,
15
+ class: "of-sidebar__item-badge"
16
+ }, H = {
17
+ key: 1,
18
+ class: "of-sidebar__footer"
19
+ }, Q = /* @__PURE__ */ z({
20
+ __name: "Sidebar",
21
+ props: {
22
+ items: {}
23
+ },
24
+ emits: ["item-click"],
25
+ setup(g, { emit: y }) {
26
+ const l = E("density"), C = S(() => (l == null ? void 0 : l.value) ?? "comfortable"), v = y, i = B(/* @__PURE__ */ new Set());
27
+ function $(e) {
28
+ i.value.has(e.id) ? i.value.delete(e.id) : i.value.add(e.id);
29
+ }
30
+ function I(e) {
31
+ e.children && e.children.length > 0 && $(e), v("item-click", e);
32
+ }
33
+ function h(e) {
34
+ return i.value.has(e.id);
35
+ }
36
+ return (e, J) => (s(), t("div", {
37
+ class: _(["of-sidebar", { "of-sidebar--compact": C.value === "compact" }])
38
+ }, [
39
+ e.$slots.header ? (s(), t("div", N, [
40
+ m(e.$slots, "header", {}, void 0, !0)
41
+ ])) : a("", !0),
42
+ r("nav", V, [
43
+ (s(!0), t(f, null, k(g.items, (o) => (s(), t(f, {
44
+ key: o.id
45
+ }, [
46
+ r("button", {
47
+ class: _(["of-sidebar__item", { "of-sidebar__item--active": o.active }]),
48
+ onClick: (n) => I(o)
49
+ }, [
50
+ o.icon ? (s(), u(b(c(p)(o.icon)), {
51
+ key: 0,
52
+ class: "of-sidebar__item-icon",
53
+ size: 15
54
+ })) : a("", !0),
55
+ r("span", x, d(o.label), 1),
56
+ o.badge !== void 0 ? (s(), t("span", F, d(o.badge), 1)) : a("", !0),
57
+ o.children && o.children.length > 0 ? (s(), u(b(h(o) ? c(D) : c(w)), {
58
+ key: 2,
59
+ class: "of-sidebar__item-chevron",
60
+ size: 13
61
+ })) : a("", !0)
62
+ ], 10, j),
63
+ o.children && o.children.length > 0 && h(o) ? (s(), t("div", L, [
64
+ (s(!0), t(f, null, k(o.children, (n) => (s(), t("button", {
65
+ key: n.id,
66
+ class: _(["of-sidebar__item of-sidebar__item--child", { "of-sidebar__item--active": n.active }]),
67
+ onClick: (K) => v("item-click", n)
68
+ }, [
69
+ n.icon ? (s(), u(b(c(p)(n.icon)), {
70
+ key: 0,
71
+ class: "of-sidebar__item-icon",
72
+ size: 14
73
+ })) : a("", !0),
74
+ r("span", A, d(n.label), 1),
75
+ n.badge !== void 0 ? (s(), t("span", G, d(n.badge), 1)) : a("", !0)
76
+ ], 10, q))), 128))
77
+ ])) : a("", !0)
78
+ ], 64))), 128))
79
+ ]),
80
+ e.$slots.footer ? (s(), t("div", H, [
81
+ m(e.$slots, "footer", {}, void 0, !0)
82
+ ])) : a("", !0)
83
+ ], 2));
84
+ }
85
+ });
86
+ export {
87
+ Q as default
88
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./StatusBar.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-06dfdfe7"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as i, openBlock as e, createElementBlock as c, createElementVNode as t, createBlock as n, unref as r, toDisplayString as o, createCommentVNode as _ } from "vue";
2
+ import { CircleCheckIcon as u, CircleAlertIcon as l } from "lucide-vue-next";
3
+ const f = { class: "of-statusbar" }, d = { class: "of-statusbar__left" }, y = { class: "of-statusbar__sync-text" }, b = { class: "of-statusbar__right" }, h = {
4
+ key: 0,
5
+ class: "of-statusbar__shortcuts"
6
+ }, m = { class: "of-statusbar__version" }, B = /* @__PURE__ */ i({
7
+ __name: "StatusBar",
8
+ props: {
9
+ synced: { type: Boolean, default: !0 },
10
+ shortcuts: { default: "" },
11
+ version: { default: "v1.0.0" }
12
+ },
13
+ setup(s) {
14
+ return (k, a) => (e(), c("div", f, [
15
+ t("div", d, [
16
+ s.synced ? (e(), n(r(u), {
17
+ key: 0,
18
+ class: "of-statusbar__sync-icon of-statusbar__sync-icon--ok",
19
+ size: 13
20
+ })) : (e(), n(r(l), {
21
+ key: 1,
22
+ class: "of-statusbar__sync-icon of-statusbar__sync-icon--warn",
23
+ size: 13
24
+ })),
25
+ t("span", y, o(s.synced ? "所有更改已同步" : "同步中..."), 1)
26
+ ]),
27
+ a[0] || (a[0] = t("div", { class: "of-statusbar__spacer" }, null, -1)),
28
+ t("div", b, [
29
+ s.shortcuts ? (e(), c("span", h, o(s.shortcuts), 1)) : _("", !0),
30
+ t("span", m, o(s.version), 1)
31
+ ])
32
+ ]));
33
+ }
34
+ });
35
+ export {
36
+ B as default
37
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./MermaidChart.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2947d038"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,75 @@
1
+ import { defineComponent as p, ref as d, onMounted as h, watch as y, openBlock as n, createElementBlock as i, normalizeStyle as g, renderSlot as u, createElementVNode as s, toDisplayString as w, nextTick as k } from "vue";
2
+ const M = {
3
+ key: 0,
4
+ class: "of-mermaid__loading"
5
+ }, C = {
6
+ key: 1,
7
+ class: "of-mermaid__error"
8
+ }, L = { class: "of-mermaid__error-text" }, S = /* @__PURE__ */ p({
9
+ __name: "MermaidChart",
10
+ props: {
11
+ code: {},
12
+ theme: {},
13
+ width: {}
14
+ },
15
+ setup(c) {
16
+ const t = c;
17
+ let f = 0;
18
+ const _ = `of-mermaid-${Date.now()}-${f++}`, l = d(null), o = d(!0), a = d("");
19
+ async function m() {
20
+ var r;
21
+ if (!((r = t.code) != null && r.trim())) {
22
+ o.value = !1;
23
+ return;
24
+ }
25
+ o.value = !0, a.value = "";
26
+ try {
27
+ let e = window.mermaid;
28
+ e || (e = (await import("mermaid")).default), e.initialize({
29
+ startOnLoad: !1,
30
+ theme: t.theme || "default",
31
+ securityLevel: "loose"
32
+ }), await k();
33
+ const { svg: v } = await e.render(_, t.code);
34
+ l.value && (l.value.innerHTML = v);
35
+ } catch (e) {
36
+ a.value = (e == null ? void 0 : e.message) || "图表渲染失败,请检查 Mermaid 语法";
37
+ } finally {
38
+ o.value = !1;
39
+ }
40
+ }
41
+ return h(() => m()), y(
42
+ () => [t.code, t.theme],
43
+ () => m()
44
+ ), (r, e) => (n(), i("div", {
45
+ class: "of-mermaid",
46
+ style: g({ width: t.width || "100%" })
47
+ }, [
48
+ o.value ? (n(), i("div", M, [
49
+ u(r.$slots, "loading", {}, () => [
50
+ e[0] || (e[0] = s("span", {
51
+ class: "of-mermaid__spinner",
52
+ "aria-hidden": "true"
53
+ }, null, -1)),
54
+ e[1] || (e[1] = s("span", { class: "of-mermaid__loading-text" }, "图表加载中...", -1))
55
+ ], !0)
56
+ ])) : a.value ? (n(), i("div", C, [
57
+ u(r.$slots, "error", { message: a.value }, () => [
58
+ e[2] || (e[2] = s("span", {
59
+ class: "of-mermaid__error-icon",
60
+ "aria-hidden": "true"
61
+ }, "!", -1)),
62
+ s("span", L, w(a.value), 1)
63
+ ], !0)
64
+ ])) : (n(), i("div", {
65
+ key: 2,
66
+ ref_key: "containerRef",
67
+ ref: l,
68
+ class: "of-mermaid__container"
69
+ }, null, 512))
70
+ ], 4));
71
+ }
72
+ });
73
+ export {
74
+ S as default
75
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Dialog.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1b14e831"]]);
5
+ export {
6
+ p as default
7
+ };