@oneflowui/ui 0.4.3 → 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 (149) hide show
  1. package/dist/assets/tableWorker-CTsbCPPP.js +1 -0
  2. package/dist/components/ContextMenu/index.vue.d.ts +2 -1
  3. package/dist/components/ContextMenu/index.vue.js +2 -2
  4. package/dist/components/ContextMenu/index.vue2.js +37 -36
  5. package/dist/components/base/DropdownMenu.vue.js +2 -2
  6. package/dist/components/base/DropdownMenu.vue2.js +38 -39
  7. package/dist/components/base/MonitorItem.vue.d.ts +1 -1
  8. package/dist/components/base/PersonaCard.vue.d.ts +2 -1
  9. package/dist/components/base/PersonaCard.vue.js +3 -3
  10. package/dist/components/base/PersonaCard.vue2.js +51 -39
  11. package/dist/components/base/RefTag.vue.d.ts +2 -2
  12. package/dist/components/base/RefTag.vue.js +3 -3
  13. package/dist/components/base/SearchHighlight.vue.d.ts +6 -0
  14. package/dist/components/base/SearchHighlight.vue.js +7 -0
  15. package/dist/components/base/SearchHighlight.vue2.js +21 -0
  16. package/dist/components/base/ToolbarBtn.vue.d.ts +2 -1
  17. package/dist/components/base/ToolbarBtn.vue.js +1 -1
  18. package/dist/components/base/ViewModeGroup.vue.d.ts +2 -1
  19. package/dist/components/base/ViewModeGroup.vue.js +3 -3
  20. package/dist/components/base/ViewSwitcher.vue.d.ts +2 -1
  21. package/dist/components/base/ViewSwitcher.vue.js +2 -2
  22. package/dist/components/base/index.d.ts +1 -0
  23. package/dist/components/field/FieldAttachment.vue.d.ts +17 -0
  24. package/dist/components/field/FieldAttachment.vue.js +7 -0
  25. package/dist/components/field/FieldAttachment.vue2.js +69 -0
  26. package/dist/components/field/FieldAutoNumber.vue.d.ts +7 -0
  27. package/dist/components/field/FieldAutoNumber.vue.js +7 -0
  28. package/dist/components/field/FieldAutoNumber.vue2.js +15 -0
  29. package/dist/components/field/FieldCreator.vue.d.ts +7 -0
  30. package/dist/components/field/FieldCreator.vue.js +7 -0
  31. package/dist/components/field/FieldCreator.vue2.js +24 -0
  32. package/dist/components/field/FieldCurrency.vue.d.ts +17 -0
  33. package/dist/components/field/FieldCurrency.vue.js +7 -0
  34. package/dist/components/field/FieldCurrency.vue2.js +42 -0
  35. package/dist/components/field/FieldDate.vue.js +2 -2
  36. package/dist/components/field/FieldDate.vue2.js +13 -10
  37. package/dist/components/field/FieldDatetime.vue.js +1 -1
  38. package/dist/components/field/FieldMarkdownPreview.vue.d.ts +13 -0
  39. package/dist/components/field/FieldMarkdownPreview.vue.js +7 -0
  40. package/dist/components/field/FieldMarkdownPreview.vue2.js +37 -0
  41. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  42. package/dist/components/field/FieldPhone.vue.d.ts +17 -0
  43. package/dist/components/field/FieldPhone.vue.js +7 -0
  44. package/dist/components/field/FieldPhone.vue2.js +34 -0
  45. package/dist/components/field/FieldProgress.vue.d.ts +15 -0
  46. package/dist/components/field/FieldProgress.vue.js +7 -0
  47. package/dist/components/field/FieldProgress.vue2.js +40 -0
  48. package/dist/components/field/FieldRelation.vue.d.ts +17 -0
  49. package/dist/components/field/FieldRelation.vue.js +7 -0
  50. package/dist/components/field/FieldRelation.vue2.js +67 -0
  51. package/dist/components/field/FieldRichText.vue.d.ts +17 -0
  52. package/dist/components/field/FieldRichText.vue.js +7 -0
  53. package/dist/components/field/FieldRichText.vue2.js +65 -0
  54. package/dist/components/field/FieldSelect.vue.js +1 -1
  55. package/dist/components/field/FieldSelect.vue2.js +43 -42
  56. package/dist/components/form/FormDesigner.vue.js +2 -2
  57. package/dist/components/form/FormDesigner.vue2.js +62 -52
  58. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  59. package/dist/components/gallery/GalleryView.vue.d.ts +6 -2
  60. package/dist/components/gallery/GalleryView.vue.js +2 -2
  61. package/dist/components/gallery/GalleryView.vue2.js +30 -20
  62. package/dist/components/kanban/KanbanBoard.vue.d.ts +5 -1
  63. package/dist/components/kanban/KanbanBoard.vue.js +4 -4
  64. package/dist/components/kanban/KanbanBoard.vue2.js +81 -48
  65. package/dist/components/layout/AppLayout.vue.js +2 -2
  66. package/dist/components/layout/AppLayout.vue2.js +46 -62
  67. package/dist/components/overlay/Drawer.vue.js +1 -1
  68. package/dist/components/overlay/Drawer.vue2.js +52 -68
  69. package/dist/components/overlay/Modal.vue.js +1 -1
  70. package/dist/components/overlay/Modal.vue2.js +52 -68
  71. package/dist/components/overlay/SidePanel.vue.js +2 -2
  72. package/dist/components/overlay/SidePanel.vue2.js +64 -80
  73. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +33 -0
  74. package/dist/components/table/ColumnHeaderMenu.vue.js +7 -0
  75. package/dist/components/table/ColumnHeaderMenu.vue2.js +153 -0
  76. package/dist/components/table/DataTable.vue.d.ts +116 -25
  77. package/dist/components/table/DataTable.vue.js +4 -4
  78. package/dist/components/table/DataTable.vue2.js +775 -188
  79. package/dist/components/table/DetailSheet.vue.d.ts +43 -0
  80. package/dist/components/table/DetailSheet.vue.js +7 -0
  81. package/dist/components/table/DetailSheet.vue2.js +140 -0
  82. package/dist/components/table/FieldCell.vue.d.ts +1 -1
  83. package/dist/components/table/FieldCell.vue.js +1 -1
  84. package/dist/components/table/FieldCell.vue2.js +59 -44
  85. package/dist/components/table/FieldTypePicker.vue.d.ts +15 -0
  86. package/dist/components/table/FieldTypePicker.vue.js +7 -0
  87. package/dist/components/table/FieldTypePicker.vue2.js +92 -0
  88. package/dist/components/table/MobileListView.vue.d.ts +24 -0
  89. package/dist/components/table/MobileListView.vue.js +7 -0
  90. package/dist/components/table/MobileListView.vue2.js +90 -0
  91. package/dist/components/table/TableGroupRow.vue.d.ts +5 -0
  92. package/dist/components/table/TableGroupRow.vue.js +2 -2
  93. package/dist/components/table/TableGroupRow.vue2.js +33 -23
  94. package/dist/components/table/TableHeaderRow.vue.d.ts +16 -0
  95. package/dist/components/table/TableHeaderRow.vue.js +2 -2
  96. package/dist/components/table/TableHeaderRow.vue2.js +54 -33
  97. package/dist/components/table/TableToolbar.vue.d.ts +118 -0
  98. package/dist/components/table/TableToolbar.vue.js +7 -0
  99. package/dist/components/table/TableToolbar.vue2.js +273 -0
  100. package/dist/components/table/index.d.ts +5 -0
  101. package/dist/components/timeline/GanttTimeline.vue.js +1 -1
  102. package/dist/components/timeline/GanttTimeline.vue2.js +128 -127
  103. package/dist/components/toast/ToastItem.vue.js +3 -3
  104. package/dist/composables/index.d.ts +19 -0
  105. package/dist/composables/useBreakpoint.d.ts +2 -1
  106. package/dist/composables/useBreakpoint.js +14 -12
  107. package/dist/composables/useColumnResize.d.ts +19 -0
  108. package/dist/composables/useColumnResize.js +58 -0
  109. package/dist/composables/useDraftRows.d.ts +33 -0
  110. package/dist/composables/useDraftRows.js +103 -0
  111. package/dist/composables/useFixedColumns.d.ts +25 -0
  112. package/dist/composables/useFixedColumns.js +61 -0
  113. package/dist/composables/useFocusTrap.d.ts +10 -0
  114. package/dist/composables/useFocusTrap.js +37 -0
  115. package/dist/composables/useInlineEdit.js +3 -3
  116. package/dist/composables/useKeyboardNavigation.d.ts +45 -0
  117. package/dist/composables/useKeyboardNavigation.js +140 -0
  118. package/dist/composables/useRowDrag.d.ts +32 -0
  119. package/dist/composables/useRowDrag.js +85 -0
  120. package/dist/composables/useSchemaEngine.d.ts +31 -0
  121. package/dist/composables/useSchemaEngine.js +129 -0
  122. package/dist/composables/useSearch.d.ts +30 -0
  123. package/dist/composables/useSearch.js +59 -0
  124. package/dist/composables/useSupabaseProvider.d.ts +70 -0
  125. package/dist/composables/useSupabaseProvider.js +126 -0
  126. package/dist/composables/useTable.d.ts +3 -0
  127. package/dist/composables/useTable.js +103 -83
  128. package/dist/composables/useTableGroup.d.ts +14 -1
  129. package/dist/composables/useTableGroup.js +57 -33
  130. package/dist/composables/useViewPersistence.d.ts +98 -0
  131. package/dist/composables/useViewPersistence.js +141 -0
  132. package/dist/composables/useVirtualList.d.ts +4 -1
  133. package/dist/composables/useVirtualList.js +108 -85
  134. package/dist/composables/useWorkerSort.d.ts +14 -0
  135. package/dist/composables/useWorkerSort.js +61 -0
  136. package/dist/index.d.ts +28 -4
  137. package/dist/index.js +264 -216
  138. package/dist/style.css +1 -1
  139. package/dist/types/index.d.ts +63 -2
  140. package/dist/types/index.js +23 -6
  141. package/dist/types/table-internal.d.ts +64 -0
  142. package/dist/utils/aggregation.d.ts +5 -0
  143. package/dist/utils/aggregation.js +38 -0
  144. package/dist/utils/supabaseAdapter.d.ts +48 -0
  145. package/dist/utils/supabaseAdapter.js +76 -0
  146. package/dist/utils/supabaseSchema.d.ts +81 -0
  147. package/dist/utils/supabaseSchema.js +202 -0
  148. package/dist/workers/tableWorker.d.ts +31 -0
  149. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ (function(){"use strict";function i(r,e,t){return[...r].sort((s,u)=>{const n=s[e],a=u[e];if(n==null&&a==null)return 0;if(n==null)return 1;if(a==null)return-1;if(typeof n=="number"&&typeof a=="number")return t==="asc"?n-a:a-n;const l=String(n),o=String(a);return t==="asc"?l.localeCompare(o):o.localeCompare(l)})}function c(r,e){const t=String(r??"").toLowerCase(),s=e.value.toLowerCase();switch(e.operator){case"equals":return t===s;case"not_equals":return t!==s;case"contains":return t.includes(s);case"not_contains":return!t.includes(s);case"starts_with":return t.startsWith(s);case"ends_with":return t.endsWith(s);case"is_empty":return t===""||r==null;case"is_not_empty":return t!==""&&r!=null;case"gt":return Number(r)>Number(e.value);case"gte":return Number(r)>=Number(e.value);case"lt":return Number(r)<Number(e.value);case"lte":return Number(r)<=Number(e.value);default:return!0}}function f(r,e,t){return e.length===0?r:r.filter(s=>{const u=e.map(n=>n.field?c(s[n.field],n):!0);return t==="and"?u.every(Boolean):u.some(Boolean)})}self.onmessage=r=>{try{const e=r.data;if(e.type==="sort"){const t=i(e.data,e.field,e.order);self.postMessage({type:"sort-result",data:t})}else if(e.type==="filter"){const t=f(e.data,e.conditions,e.logic);self.postMessage({type:"filter-result",data:t})}}catch(e){self.postMessage({type:"error",message:e instanceof Error?e.message:String(e)})}}})();
@@ -1,7 +1,8 @@
1
+ import { Component } from 'vue';
1
2
  export interface ContextMenuItem {
2
3
  key: string;
3
4
  label: string;
4
- icon?: string;
5
+ icon?: string | Component;
5
6
  disabled?: boolean;
6
7
  danger?: boolean;
7
8
  separator?: boolean;
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e1a1d45d"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-58bfadd1"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,14 +1,12 @@
1
- import { defineComponent as x, ref as h, computed as w, watch as g, onBeforeUnmount as E, openBlock as t, createBlock as L, Teleport as C, createElementBlock as o, withModifiers as B, normalizeStyle as D, Fragment as p, renderList as M, normalizeClass as S, toDisplayString as y, createCommentVNode as a, createElementVNode as $ } from "vue";
2
- const z = {
1
+ import { defineComponent as x, ref as h, computed as w, watch as g, onBeforeUnmount as C, openBlock as t, createBlock as p, Teleport as E, createElementBlock as o, withModifiers as L, normalizeStyle as B, Fragment as y, renderList as D, normalizeClass as M, resolveDynamicComponent as S, unref as $, createCommentVNode as a, createElementVNode as z, toDisplayString as N } from "vue";
2
+ import { resolveIcon as R } from "../../utils/icon.js";
3
+ const V = {
3
4
  key: 0,
4
5
  class: "of-context-menu__sep"
5
- }, N = ["disabled", "onClick"], R = {
6
- key: 0,
7
- class: "of-context-menu__icon"
8
- }, V = { class: "of-context-menu__label" }, F = {
6
+ }, F = ["disabled", "onClick"], I = { class: "of-context-menu__label" }, K = {
9
7
  key: 1,
10
8
  class: "of-context-menu__submenu-indicator"
11
- }, U = /* @__PURE__ */ x({
9
+ }, q = /* @__PURE__ */ x({
12
10
  name: "ContextMenu",
13
11
  __name: "index",
14
12
  props: {
@@ -19,67 +17,70 @@ const z = {
19
17
  },
20
18
  emits: ["select", "close"],
21
19
  setup(l, { emit: _ }) {
22
- const i = l, c = _, r = h(null), k = w(() => ({
20
+ const c = l, r = _, i = h(null), k = w(() => ({
23
21
  position: "fixed",
24
- left: `${i.x}px`,
25
- top: `${i.y}px`
22
+ left: `${c.x}px`,
23
+ top: `${c.y}px`
26
24
  }));
27
- function b(e) {
28
- e.disabled || e.separator || (c("select", e.key), c("close"));
25
+ function v(e) {
26
+ e.disabled || e.separator || (r("select", e.key), r("close"));
29
27
  }
30
- function d(e) {
28
+ function u(e) {
31
29
  const s = e.target;
32
- r.value && s && !r.value.contains(s) && c("close");
30
+ i.value && s && !i.value.contains(s) && r("close");
33
31
  }
34
- function u(e) {
35
- e.key === "Escape" && c("close");
32
+ function d(e) {
33
+ e.key === "Escape" && r("close");
36
34
  }
37
- function v() {
38
- document.addEventListener("mousedown", d), document.addEventListener("keydown", u);
35
+ function b() {
36
+ document.addEventListener("mousedown", u), document.addEventListener("keydown", d);
39
37
  }
40
38
  function m() {
41
- document.removeEventListener("mousedown", d), document.removeEventListener("keydown", u);
39
+ document.removeEventListener("mousedown", u), document.removeEventListener("keydown", d);
42
40
  }
43
41
  return g(
44
- () => i.visible,
42
+ () => c.visible,
45
43
  (e) => {
46
44
  if (e) {
47
- v();
45
+ b();
48
46
  return;
49
47
  }
50
48
  m();
51
49
  },
52
50
  { immediate: !0 }
53
- ), E(() => {
51
+ ), C(() => {
54
52
  m();
55
- }), (e, s) => (t(), L(C, { to: "body" }, [
53
+ }), (e, s) => (t(), p(E, { to: "body" }, [
56
54
  l.visible ? (t(), o("div", {
57
55
  key: 0,
58
56
  ref_key: "menuRef",
59
- ref: r,
57
+ ref: i,
60
58
  class: "of-context-menu",
61
- style: D(k.value),
59
+ style: B(k.value),
62
60
  role: "menu",
63
- onMousedown: s[0] || (s[0] = B(() => {
61
+ onMousedown: s[0] || (s[0] = L(() => {
64
62
  }, ["stop"]))
65
63
  }, [
66
- (t(!0), o(p, null, M(l.items, (n) => {
64
+ (t(!0), o(y, null, D(l.items, (n) => {
67
65
  var f;
68
- return t(), o(p, {
66
+ return t(), o(y, {
69
67
  key: n.key
70
68
  }, [
71
- n.separator ? (t(), o("hr", z)) : (t(), o("button", {
69
+ n.separator ? (t(), o("hr", V)) : (t(), o("button", {
72
70
  key: 1,
73
71
  type: "button",
74
- class: S(["of-context-menu__item", { "is-disabled": n.disabled, "is-danger": n.danger }]),
72
+ class: M(["of-context-menu__item", { "is-disabled": n.disabled, "is-danger": n.danger }]),
75
73
  disabled: n.disabled,
76
74
  role: "menuitem",
77
- onClick: (K) => b(n)
75
+ onClick: (T) => v(n)
78
76
  }, [
79
- n.icon ? (t(), o("span", R, y(n.icon), 1)) : a("", !0),
80
- $("span", V, y(n.label), 1),
81
- (f = n.children) != null && f.length ? (t(), o("span", F, "›")) : a("", !0)
82
- ], 10, N))
77
+ n.icon ? (t(), p(S($(R)(n.icon)), {
78
+ key: 0,
79
+ class: "of-context-menu__icon"
80
+ })) : a("", !0),
81
+ z("span", I, N(n.label), 1),
82
+ (f = n.children) != null && f.length ? (t(), o("span", K, "›")) : a("", !0)
83
+ ], 10, F))
83
84
  ], 64);
84
85
  }), 128))
85
86
  ], 36)) : a("", !0)
@@ -87,5 +88,5 @@ const z = {
87
88
  }
88
89
  });
89
90
  export {
90
- U as default
91
+ q as default
91
92
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./DropdownMenu.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-876336db"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2c7dd355"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
@@ -1,86 +1,85 @@
1
- import { defineComponent as C, ref as l, onMounted as h, onBeforeUnmount as b, openBlock as r, createElementBlock as a, mergeProps as x, createElementVNode as f, createVNode as i, unref as m, Transition as p, withCtx as v, createCommentVNode as s, Fragment as E, renderList as M, normalizeClass as B, createBlock as R, resolveDynamicComponent as z, toDisplayString as D, nextTick as L } from "vue";
2
- import { MoreHorizontal as N } from "lucide-vue-next";
3
- import { resolveIcon as V } from "../../utils/icon.js";
4
- const $ = ["aria-expanded"], S = ["onClick"], H = /* @__PURE__ */ C({
1
+ import { defineComponent as C, ref as s, onBeforeUnmount as E, openBlock as r, createElementBlock as l, mergeProps as h, createElementVNode as f, createVNode as d, unref as m, Transition as p, withCtx as v, createCommentVNode as i, Fragment as L, renderList as b, normalizeClass as x, createBlock as B, resolveDynamicComponent as M, toDisplayString as R, nextTick as z } from "vue";
2
+ import { MoreHorizontal as D } from "lucide-vue-next";
3
+ import { resolveIcon as N } from "../../utils/icon.js";
4
+ const V = ["aria-expanded"], $ = ["onClick"], F = /* @__PURE__ */ C({
5
5
  inheritAttrs: !1,
6
6
  __name: "DropdownMenu",
7
7
  props: {
8
8
  items: {}
9
9
  },
10
10
  setup(_) {
11
- const n = l(!1), u = l(null), d = l(null);
12
- function c(e) {
11
+ const n = s(!1), a = s(null), c = s(null);
12
+ function u(e) {
13
13
  var o;
14
- e.key === "Escape" && n.value && (n.value = !1, (o = u.value) == null || o.focus());
14
+ e.key === "Escape" && n.value && (n.value = !1, (o = a.value) == null || o.focus());
15
15
  }
16
- h(() => {
17
- typeof document > "u" || document.addEventListener("keydown", c);
18
- }), b(() => {
19
- typeof document > "u" || document.removeEventListener("keydown", c);
16
+ E(() => {
17
+ typeof document > "u" || document.removeEventListener("keydown", u);
20
18
  });
21
19
  function k(e) {
22
20
  var o;
23
- e.onClick(), n.value = !1, (o = u.value) == null || o.focus();
21
+ e.onClick(), n.value = !1, document.removeEventListener("keydown", u), (o = a.value) == null || o.focus();
24
22
  }
25
- function y() {
23
+ function w() {
26
24
  var e;
27
- n.value = !n.value, n.value ? L(() => {
25
+ n.value = !n.value, n.value ? z(() => {
28
26
  var t;
29
- const o = (t = d.value) == null ? void 0 : t.querySelector('[role="menuitem"]');
27
+ document.addEventListener("keydown", u);
28
+ const o = (t = c.value) == null ? void 0 : t.querySelector('[role="menuitem"]');
30
29
  o == null || o.focus();
31
- }) : (e = u.value) == null || e.focus();
30
+ }) : (document.removeEventListener("keydown", u), (e = a.value) == null || e.focus());
32
31
  }
33
- function w() {
32
+ function y() {
34
33
  var e;
35
- n.value = !1, (e = u.value) == null || e.focus();
34
+ n.value = !1, document.removeEventListener("keydown", u), (e = a.value) == null || e.focus();
36
35
  }
37
- return (e, o) => (r(), a("div", x({ class: "of-dropdown-menu" }, e.$attrs), [
36
+ return (e, o) => (r(), l("div", h({ class: "of-dropdown-menu" }, e.$attrs), [
38
37
  f("button", {
39
38
  ref_key: "triggerRef",
40
- ref: u,
39
+ ref: a,
41
40
  class: "of-dropdown-menu__trigger",
42
41
  "aria-haspopup": "true",
43
42
  "aria-expanded": n.value,
44
43
  "aria-label": "更多操作",
45
- onClick: y
44
+ onClick: w
46
45
  }, [
47
- i(m(N), { size: 18 })
48
- ], 8, $),
49
- i(p, { name: "of-dropdown-fade" }, {
46
+ d(m(D), { size: 18 })
47
+ ], 8, V),
48
+ d(p, { name: "of-dropdown-fade" }, {
50
49
  default: v(() => [
51
- n.value ? (r(), a("div", {
50
+ n.value ? (r(), l("div", {
52
51
  key: 0,
53
52
  class: "of-dropdown-menu__backdrop",
54
- onClick: w
55
- })) : s("", !0)
53
+ onClick: y
54
+ })) : i("", !0)
56
55
  ]),
57
56
  _: 1
58
57
  }),
59
- i(p, { name: "of-dropdown-slide" }, {
58
+ d(p, { name: "of-dropdown-slide" }, {
60
59
  default: v(() => [
61
- n.value ? (r(), a("div", {
60
+ n.value ? (r(), l("div", {
62
61
  key: 0,
63
62
  ref_key: "menuRef",
64
- ref: d,
63
+ ref: c,
65
64
  class: "of-dropdown-menu__content",
66
65
  role: "menu"
67
66
  }, [
68
- (r(!0), a(E, null, M(_.items, (t, g) => (r(), a("button", {
67
+ (r(!0), l(L, null, b(_.items, (t, g) => (r(), l("button", {
69
68
  key: g,
70
- onClick: (T) => k(t),
71
- class: B([
69
+ onClick: (S) => k(t),
70
+ class: x([
72
71
  "of-dropdown-menu__item",
73
72
  `of-dropdown-menu__item--${t.variant || "default"}`
74
73
  ]),
75
74
  role: "menuitem"
76
75
  }, [
77
- t.icon ? (r(), R(z(m(V)(t.icon)), {
76
+ t.icon ? (r(), B(M(m(N)(t.icon)), {
78
77
  key: 0,
79
78
  class: "of-dropdown-menu__item-icon"
80
- })) : s("", !0),
81
- f("span", null, D(t.label), 1)
82
- ], 10, S))), 128))
83
- ], 512)) : s("", !0)
79
+ })) : i("", !0),
80
+ f("span", null, R(t.label), 1)
81
+ ], 10, $))), 128))
82
+ ], 512)) : i("", !0)
84
83
  ]),
85
84
  _: 1
86
85
  })
@@ -88,5 +87,5 @@ const $ = ["aria-expanded"], S = ["onClick"], H = /* @__PURE__ */ C({
88
87
  }
89
88
  });
90
89
  export {
91
- H as default
90
+ F as default
92
91
  };
@@ -11,9 +11,9 @@ declare const _default: import('vue').DefineComponent<MonitorItemProps, {}, {},
11
11
  }, string, import('vue').PublicProps, Readonly<MonitorItemProps> & Readonly<{
12
12
  onClick?: (() => any) | undefined;
13
13
  }>, {
14
+ count: string;
14
15
  color: string;
15
16
  clickable: boolean;
16
17
  subtitle: string;
17
- count: string;
18
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
19
  export default _default;
@@ -1,7 +1,8 @@
1
+ import { Component } from 'vue';
1
2
  export interface PersonaCardProps {
2
3
  name: string;
3
4
  title?: string;
4
- icon?: string;
5
+ icon?: string | Component;
5
6
  color?: string;
6
7
  subtitle?: string;
7
8
  tags?: string[];
@@ -1,7 +1,7 @@
1
1
  import o from "./PersonaCard.vue2.js";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-88e46628"]]);
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0c8a7d5a"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,17 +1,18 @@
1
- import { defineComponent as C, computed as o, openBlock as t, createElementBlock as n, mergeProps as P, createElementVNode as c, normalizeStyle as f, toDisplayString as l, renderSlot as b, createCommentVNode as i, Fragment as w, renderList as A } from "vue";
2
- const E = { class: "of-persona-card__body" }, F = { class: "of-persona-card__name-row" }, L = {
1
+ import { defineComponent as w, computed as r, openBlock as t, createElementBlock as n, mergeProps as A, createElementVNode as c, normalizeStyle as f, createBlock as E, resolveDynamicComponent as F, Fragment as y, createTextVNode as N, toDisplayString as l, renderSlot as b, createCommentVNode as i, renderList as T } from "vue";
2
+ import { resolveIcon as V } from "../../utils/icon.js";
3
+ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__name-row" }, L = {
3
4
  key: 0,
4
5
  class: "of-persona-card__title-badge"
5
- }, N = {
6
+ }, H = {
6
7
  key: 1,
7
8
  class: "of-persona-card__tags"
8
- }, T = { class: "of-persona-card__right" }, V = {
9
+ }, M = { class: "of-persona-card__right" }, j = {
9
10
  key: 0,
10
11
  class: "of-persona-card__done-mark"
11
- }, D = { class: "of-persona-card__chevron" }, H = {
12
+ }, q = { class: "of-persona-card__chevron" }, G = {
12
13
  key: 0,
13
14
  class: "of-persona-card__detail"
14
- }, M = /* @__PURE__ */ C({
15
+ }, O = /* @__PURE__ */ w({
15
16
  name: "PersonaCard",
16
17
  inheritAttrs: !1,
17
18
  __name: "PersonaCard",
@@ -29,8 +30,8 @@ const E = { class: "of-persona-card__body" }, F = { class: "of-persona-card__nam
29
30
  size: { default: "md" }
30
31
  },
31
32
  emits: ["update:expanded", "click"],
32
- setup(r, { emit: m }) {
33
- const e = r, v = m, u = [
33
+ setup(o, { emit: _ }) {
34
+ const e = o, v = _, u = [
34
35
  {
35
36
  accent: "var(--of-color-warning)",
36
37
  bg: "var(--of-color-warning-light)",
@@ -80,13 +81,13 @@ const E = { class: "of-persona-card__body" }, F = { class: "of-persona-card__nam
80
81
  tagBg: "var(--of-badge-green-bg)"
81
82
  }
82
83
  ];
83
- function h(a) {
84
+ function B(a) {
84
85
  let s = 0;
85
86
  for (let d = 0; d < a.length; d++)
86
87
  s = (s << 5) - s + a.charCodeAt(d), s |= 0;
87
88
  return Math.abs(s);
88
89
  }
89
- const g = o(() => {
90
+ const g = r(() => {
90
91
  if (e.color) {
91
92
  const a = e.color.replace("#", "");
92
93
  return {
@@ -96,12 +97,16 @@ const E = { class: "of-persona-card__body" }, F = { class: "of-persona-card__nam
96
97
  tagBg: `#${a}1a`
97
98
  };
98
99
  }
99
- return u[h(e.name) % u.length];
100
- }), p = o(() => e.size === "sm" ? 24 : 32), y = o(() => e.size === "sm" ? 12 : 16), _ = o(() => e.size === "sm" ? 12 : 13), B = o(() => e.size === "sm" ? 11 : 12), x = o(() => {
101
- if (e.icon) return e.icon;
100
+ return u[B(e.name) % u.length];
101
+ }), p = r(() => e.size === "sm" ? 24 : 32), m = r(() => e.size === "sm" ? 12 : 16), k = r(() => e.size === "sm" ? 12 : 13), x = r(() => e.size === "sm" ? 11 : 12), h = r(() => {
102
+ if (e.icon)
103
+ return V(e.icon);
104
+ }), z = r(() => {
105
+ if (e.icon && typeof e.icon == "string") return e.icon;
106
+ if (e.icon) return "";
102
107
  const a = e.name.trim();
103
108
  return a ? a.charAt(0) : "?";
104
- }), z = o(() => [
109
+ }), S = r(() => [
105
110
  "of-persona-card",
106
111
  `of-persona-card--${e.size}`,
107
112
  {
@@ -110,64 +115,71 @@ const E = { class: "of-persona-card__body" }, F = { class: "of-persona-card__nam
110
115
  "of-persona-card--disabled": e.disabled,
111
116
  "of-persona-card--expanded": e.expanded
112
117
  }
113
- ]), k = o(() => ({
118
+ ]), $ = r(() => ({
114
119
  "--pc-accent": g.value.accent,
115
120
  "--pc-accent-bg": g.value.bg,
116
121
  "--pc-accent-border": g.value.border,
117
122
  "--pc-accent-tag-bg": g.value.tagBg
118
- })), S = o(() => ({
123
+ })), C = r(() => ({
119
124
  width: `${p.value}px`,
120
125
  height: `${p.value}px`,
121
- fontSize: `${y.value}px`
126
+ fontSize: `${m.value}px`
122
127
  }));
123
- function $() {
128
+ function P() {
124
129
  e.disabled || (v("update:expanded", !e.expanded), v("click"));
125
130
  }
126
- return (a, s) => (t(), n("div", P({
127
- class: z.value,
128
- style: k.value
131
+ return (a, s) => (t(), n("div", A({
132
+ class: S.value,
133
+ style: $.value
129
134
  }, a.$attrs), [
130
135
  c("div", {
131
136
  class: "of-persona-card__header",
132
- onClick: $
137
+ onClick: P
133
138
  }, [
134
139
  c("span", {
135
140
  class: "of-persona-card__avatar",
136
- style: f(S.value)
137
- }, l(x.value), 5),
138
- c("div", E, [
139
- c("div", F, [
141
+ style: f(C.value)
142
+ }, [
143
+ h.value ? (t(), E(F(h.value), {
144
+ key: 0,
145
+ size: m.value
146
+ }, null, 8, ["size"])) : (t(), n(y, { key: 1 }, [
147
+ N(l(z.value), 1)
148
+ ], 64))
149
+ ], 4),
150
+ c("div", D, [
151
+ c("div", I, [
140
152
  c("span", {
141
153
  class: "of-persona-card__name",
142
- style: f({ fontSize: `${_.value}px` })
143
- }, l(r.name), 5),
154
+ style: f({ fontSize: `${k.value}px` })
155
+ }, l(o.name), 5),
144
156
  b(a.$slots, "badge", {}, void 0, !0),
145
- r.title ? (t(), n("span", L, l(r.title), 1)) : i("", !0)
157
+ o.title ? (t(), n("span", L, l(o.title), 1)) : i("", !0)
146
158
  ]),
147
- r.subtitle ? (t(), n("span", {
159
+ o.subtitle ? (t(), n("span", {
148
160
  key: 0,
149
161
  class: "of-persona-card__subtitle",
150
- style: f({ fontSize: `${B.value}px` })
151
- }, l(r.subtitle), 5)) : i("", !0),
152
- r.tags && r.tags.length > 0 ? (t(), n("div", N, [
153
- (t(!0), n(w, null, A(r.tags, (d) => (t(), n("span", {
162
+ style: f({ fontSize: `${x.value}px` })
163
+ }, l(o.subtitle), 5)) : i("", !0),
164
+ o.tags && o.tags.length > 0 ? (t(), n("div", H, [
165
+ (t(!0), n(y, null, T(o.tags, (d) => (t(), n("span", {
154
166
  key: d,
155
167
  class: "of-persona-card__tag"
156
168
  }, l(d), 1))), 128))
157
169
  ])) : i("", !0)
158
170
  ]),
159
- c("div", T, [
171
+ c("div", M, [
160
172
  b(a.$slots, "actions", {}, void 0, !0),
161
- r.done ? (t(), n("span", V, "✓")) : i("", !0),
162
- c("span", D, l(r.expanded ? "▲" : "▼"), 1)
173
+ o.done ? (t(), n("span", j, "✓")) : i("", !0),
174
+ c("span", q, l(o.expanded ? "▲" : "▼"), 1)
163
175
  ])
164
176
  ]),
165
- r.expanded ? (t(), n("div", H, [
177
+ o.expanded ? (t(), n("div", G, [
166
178
  b(a.$slots, "default", {}, void 0, !0)
167
179
  ])) : i("", !0)
168
180
  ], 16));
169
181
  }
170
182
  });
171
183
  export {
172
- M as default
184
+ O as default
173
185
  };
@@ -1,7 +1,7 @@
1
- import { VNode } from 'vue';
1
+ import { Component, VNode } from 'vue';
2
2
  export interface RefTagProps {
3
3
  type?: "spec" | "wiki" | "task" | string;
4
- icon?: string;
4
+ icon?: string | Component;
5
5
  color?: string;
6
6
  bg?: string;
7
7
  href?: string;
@@ -1,7 +1,7 @@
1
1
  import o from "./RefTag.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4b527ca4"]]);
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-69a5acde"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -0,0 +1,6 @@
1
+ import { SearchHighlight } from '../../composables/useSearch';
2
+ type __VLS_Props = {
3
+ segments: SearchHighlight[];
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./SearchHighlight.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb57f288"]]);
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as h, openBlock as e, createElementBlock as t, mergeProps as l, Fragment as s, renderList as m, toDisplayString as n } from "vue";
2
+ const i = {
3
+ key: 0,
4
+ class: "of-search-hl__match"
5
+ }, p = { key: 1 }, u = /* @__PURE__ */ h({
6
+ inheritAttrs: !1,
7
+ __name: "SearchHighlight",
8
+ props: {
9
+ segments: {}
10
+ },
11
+ setup(a) {
12
+ return (o, _) => (e(), t("span", l({ class: "of-search-hl" }, o.$attrs), [
13
+ (e(!0), t(s, null, m(a.segments, (r, c) => (e(), t(s, { key: c }, [
14
+ r.match ? (e(), t("mark", i, n(r.text), 1)) : (e(), t("span", p, n(r.text), 1))
15
+ ], 64))), 128))
16
+ ], 16));
17
+ }
18
+ });
19
+ export {
20
+ u as default
21
+ };
@@ -1,5 +1,6 @@
1
+ import { Component } from 'vue';
1
2
  type __VLS_Props = {
2
- icon: string;
3
+ icon: string | Component;
3
4
  label: string;
4
5
  active?: boolean;
5
6
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ToolbarBtn.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a47e32a0"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8452ab02"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,6 +1,7 @@
1
+ import { Component } from 'vue';
1
2
  export interface ViewModeOption {
2
3
  value: string;
3
- icon: string;
4
+ icon: string | Component;
4
5
  label?: string;
5
6
  }
6
7
  export interface ViewModeGroupProps {
@@ -1,7 +1,7 @@
1
1
  import o from "./ViewModeGroup.vue2.js";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1fa6a5bf"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cebe6331"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,7 +1,8 @@
1
+ import { Component } from 'vue';
1
2
  export interface ViewSwitcherTab {
2
3
  value: string;
3
4
  label: string;
4
- icon?: string;
5
+ icon?: string | Component;
5
6
  }
6
7
  export interface ViewSwitcherProps {
7
8
  tabs?: ViewSwitcherTab[];
@@ -1,7 +1,7 @@
1
1
  import o from "./ViewSwitcher.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e11bb993"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03bd60ba"]]);
5
5
  export {
6
- m as default
6
+ i as default
7
7
  };
@@ -44,3 +44,4 @@ export { default as MonitorItem } from './MonitorItem.vue';
44
44
  export type { MonitorItemProps } from './MonitorItem.vue';
45
45
  export { default as PersonaCard } from './PersonaCard.vue';
46
46
  export type { PersonaCardProps } from './PersonaCard.vue';
47
+ export { default as SearchHighlight } from './SearchHighlight.vue';