vlite3 1.4.31 → 1.4.33

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 (102) hide show
  1. package/components/Accordion/Accordion.vue.js +19 -16
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionItem.vue.js +38 -36
  4. package/components/CategoryManager/CategoryManager.vue2.js +4 -3
  5. package/components/CategoryManager/CategoryNode.vue.js +30 -30
  6. package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
  7. package/components/Chart/GanttChart.vue.d.ts +18 -2
  8. package/components/Chart/GanttChart.vue.js +1 -1
  9. package/components/Chart/GanttChart.vue2.js +1347 -604
  10. package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
  11. package/components/Chart/GanttChartConnectorRouting.js +405 -0
  12. package/components/Chart/GanttChartDateUtils.d.ts +38 -0
  13. package/components/Chart/GanttChartDateUtils.js +79 -0
  14. package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
  15. package/components/Chart/GanttChartDependencyUtils.js +109 -0
  16. package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
  17. package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
  18. package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
  19. package/components/Chart/GanttChartTooltipUtils.js +63 -0
  20. package/components/Chart/index.d.ts +3 -1
  21. package/components/Chart/types.d.ts +92 -2
  22. package/components/Chart/types.js +8 -0
  23. package/components/ColorPicker/ColorIro.vue2.js +155 -0
  24. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  25. package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
  26. package/components/ColorPicker/ColorPicker.vue.js +111 -65
  27. package/components/ColorPicker/constants.d.ts +2 -0
  28. package/components/ColorPicker/constants.js +4 -0
  29. package/components/ColorPicker/index.d.ts +1 -0
  30. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  31. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  32. package/components/Dropdown/Dropdown.vue.js +100 -97
  33. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  34. package/components/Form/AccordionView.vue.js +5 -220
  35. package/components/Form/AccordionView.vue3.js +250 -0
  36. package/components/Form/Form.vue.js +2 -2
  37. package/components/Form/Form.vue2.js +309 -280
  38. package/components/Form/FormField.vue.js +177 -197
  39. package/components/Form/FormFields.vue.js +1 -1
  40. package/components/Form/FormFields.vue2.js +60 -60
  41. package/components/Form/FormSkeleton.vue.js +50 -35
  42. package/components/Form/TableView.vue.js +59 -43
  43. package/components/Form/composables/useForm.js +159 -148
  44. package/components/Form/index.vue2.js +7 -7
  45. package/components/Form/utils/form.utils.d.ts +2 -0
  46. package/components/Form/utils/form.utils.js +17 -13
  47. package/components/GoogleMap.vue.d.ts +1 -1
  48. package/components/Kanban/Kanban.vue.d.ts +16 -2
  49. package/components/Kanban/Kanban.vue.js +2 -2
  50. package/components/Kanban/Kanban.vue2.js +150 -86
  51. package/components/Kanban/types.d.ts +37 -0
  52. package/components/NavbarCommandPalette.vue.js +1 -1
  53. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
  54. package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
  55. package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
  56. package/components/PanZoomViewport/index.d.ts +2 -0
  57. package/components/PanZoomViewport/types.d.ts +121 -0
  58. package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
  59. package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
  60. package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
  61. package/components/ScaleGenerator/types.d.ts +2 -0
  62. package/components/Screen/ScreenFilter.vue.js +19 -18
  63. package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
  64. package/components/SeoProvider/SeoProvider.vue.js +39 -33
  65. package/components/SeoProvider/domAdapter.d.ts +1 -4
  66. package/components/SeoProvider/domAdapter.js +71 -58
  67. package/components/SeoProvider/index.d.ts +5 -2
  68. package/components/SeoProvider/normalizeSeo.d.ts +10 -49
  69. package/components/SeoProvider/normalizeSeo.js +246 -182
  70. package/components/SeoProvider/plainText.d.ts +8 -0
  71. package/components/SeoProvider/plainText.js +117 -0
  72. package/components/SeoProvider/seoUrl.d.ts +13 -0
  73. package/components/SeoProvider/seoUrl.js +25 -0
  74. package/components/SeoProvider/structuredData.d.ts +100 -0
  75. package/components/SeoProvider/structuredData.js +33 -0
  76. package/components/SeoProvider/types.d.ts +47 -109
  77. package/components/Tabes/Tabes.vue.js +1 -1
  78. package/components/Tabes/Tabes.vue2.js +215 -193
  79. package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
  80. package/components/Tabes/TabesMarkerGeometry.js +21 -0
  81. package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
  82. package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
  83. package/components/ThemeProvider/index.d.ts +1 -1
  84. package/components/ThemeProvider/themeVars.d.ts +9 -13
  85. package/components/ThemeProvider/themeVars.js +173 -125
  86. package/components/ThemeProvider/types.d.ts +10 -0
  87. package/components/ToastNotification.vue.js +1 -1
  88. package/components/ToastNotification.vue2.js +3 -3
  89. package/components/index.d.ts +3 -2
  90. package/composables/useKeyStroke.d.ts +18 -0
  91. package/composables/useKeyStroke.js +103 -77
  92. package/composables/useTheme.js +1 -1
  93. package/index.d.ts +2 -0
  94. package/index.js +380 -350
  95. package/package.json +12 -4
  96. package/style.css +1 -1
  97. package/utils/environment.d.ts +29 -0
  98. package/utils/environment.js +4 -0
  99. package/utils/functions.js +14 -13
  100. package/components/ColorPicker/ColorIro.vue.js +0 -141
  101. package/components/Form/AccordionView.vue2.js +0 -4
  102. /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
@@ -1,11 +1,12 @@
1
- import { defineComponent as fe, ref as g, computed as f, watch as p, onMounted as me, openBlock as m, createElementBlock as k, normalizeClass as o, withDirectives as C, createVNode as h, vShow as z, createElementVNode as c, normalizeStyle as ve, createCommentVNode as O, Fragment as W, renderList as ge, unref as K, createBlock as B, withCtx as P, toDisplayString as F, resolveDynamicComponent as be, mergeProps as pe, nextTick as he } from "vue";
2
- import { useResizeObserver as G } from "@vueuse/core";
3
- import { getActiveMarkerKey as xe, isMenuTab as H, isTabActive as q } from "./tabes.utils.js";
4
- import x from "../Icon.vue.js";
5
- import J from "../FadeOverlay/FadeOverlay.vue.js";
6
- import we from "../Dropdown/Dropdown.vue.js";
7
- import { $t as ye } from "../../utils/i18n.js";
8
- const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded", "disabled"], Le = /* @__PURE__ */ fe({
1
+ import { defineComponent as Ce, ref as h, computed as d, watch as p, onMounted as Ve, onBeforeUnmount as ze, openBlock as f, createElementBlock as $, normalizeClass as l, withDirectives as M, createVNode as y, vShow as L, createElementVNode as c, normalizeStyle as Se, createCommentVNode as E, Fragment as J, renderList as Be, unref as X, createBlock as A, withCtx as Y, toDisplayString as Z, withMemo as $e, resolveDynamicComponent as Me, mergeProps as Le, nextTick as Ae } from "vue";
2
+ import { useResizeObserver as _ } from "@vueuse/core";
3
+ import { getActiveMarkerKey as Oe, isMenuTab as ee, isTabActive as te } from "./tabes.utils.js";
4
+ import { measureTabesMarkerGeometry as Re, toTabesLocalScrollDelta as ne } from "./TabesMarkerGeometry.js";
5
+ import w from "../Icon.vue.js";
6
+ import re from "../FadeOverlay/FadeOverlay.vue.js";
7
+ import Fe from "../Dropdown/Dropdown.vue.js";
8
+ import { $t as Ie } from "../../utils/i18n.js";
9
+ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded", "disabled"], Qe = /* @__PURE__ */ Ce({
9
10
  __name: "Tabes",
10
11
  props: {
11
12
  options: {},
@@ -19,105 +20,126 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
19
20
  direction: { default: "ltr" }
20
21
  },
21
22
  emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close"],
22
- setup(l, { emit: Q }) {
23
- const n = l, v = Q, w = g(null), u = g(null), y = g(/* @__PURE__ */ new Map()), S = g(!1), $ = g(!1), i = () => {
23
+ setup(s, { emit: ae }) {
24
+ const n = s, m = ae, k = h(null), u = h(null), v = /* @__PURE__ */ new Map(), C = h(!1), V = h(!1);
25
+ let O = 0, T = 0, z = !1, S = !1, R = 0;
26
+ const j = () => {
24
27
  if (!u.value) return;
25
- const { scrollLeft: t, scrollWidth: a, clientWidth: e } = u.value;
26
- S.value = t > 1, $.value = Math.ceil(t + e) < a - 1;
27
- }, M = (t) => {
28
- u.value && u.value.scrollBy({ left: t, behavior: "smooth" });
29
- }, L = f(() => xe(n.options, n.modelValue)), I = () => {
30
- if (!u.value || !w.value) return;
31
- const t = L.value;
32
- if (t === void 0) return;
33
- const a = y.value.get(t);
34
- if (!a) return;
35
- const e = u.value, r = a.getBoundingClientRect(), s = e.getBoundingClientRect(), b = 40;
36
- r.left < s.left + b ? e.scrollBy({
37
- left: r.left - s.left - b,
28
+ const { scrollLeft: e, scrollWidth: r, clientWidth: t } = u.value, a = e > 1, o = Math.ceil(e + t) < r - 1;
29
+ C.value !== a && (C.value = a), V.value !== o && (V.value = o);
30
+ }, se = () => {
31
+ S || (S = !0, T = requestAnimationFrame(() => {
32
+ S = !1, j();
33
+ }));
34
+ }, q = (e) => {
35
+ u.value && u.value.scrollBy({ left: e, behavior: "smooth" });
36
+ }, D = d(() => Oe(n.options, n.modelValue)), oe = () => {
37
+ if (!u.value || !k.value) return;
38
+ const e = D.value;
39
+ if (e === void 0) return;
40
+ const r = v.get(e);
41
+ if (!r) return;
42
+ const t = u.value, a = r.getBoundingClientRect(), o = t.getBoundingClientRect(), g = 40;
43
+ a.left < o.left + g ? t.scrollBy({
44
+ left: ne(
45
+ t,
46
+ a.left - o.left - g
47
+ ),
38
48
  behavior: "smooth"
39
- }) : r.right > s.right - b && e.scrollBy({
40
- left: r.right - s.right + b,
49
+ }) : a.right > o.right - g && t.scrollBy({
50
+ left: ne(
51
+ t,
52
+ a.right - o.right + g
53
+ ),
41
54
  behavior: "smooth"
42
55
  });
43
- };
44
- G(u, i);
45
- const T = (t, a) => {
46
- t ? y.value.set(a, t) : y.value.delete(a);
47
- }, R = g({
56
+ }, W = (e, r) => {
57
+ e instanceof HTMLElement ? v.set(r, e) : e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement ? v.set(r, e.$el) : v.delete(r);
58
+ }, b = h({
48
59
  width: "0px",
49
60
  height: "0px",
50
61
  transform: "translate(0px, 0px)",
51
62
  opacity: 0
52
- }), V = g(!1), d = async () => {
53
- await he();
54
- const t = w.value, a = L.value, e = a !== void 0 ? y.value.get(a) : void 0;
55
- if (!t || !e) {
56
- R.value.opacity = 0;
63
+ }), F = h(!1), P = () => {
64
+ b.value.opacity !== 0 && (b.value = {
65
+ ...b.value,
66
+ opacity: 0
67
+ });
68
+ }, le = async () => {
69
+ await Ae();
70
+ const e = k.value, r = D.value, t = r !== void 0 ? v.get(r) : void 0;
71
+ if (!e || !t) {
72
+ P();
57
73
  return;
58
74
  }
59
- const r = t.getBoundingClientRect(), s = e.getBoundingClientRect(), b = s.left - r.left, ce = s.top - r.top, ue = s.width, de = s.height;
60
- R.value = {
61
- width: `${ue}px`,
62
- height: `${de}px`,
63
- transform: `translate(${b}px, ${ce}px)`,
75
+ if (e.offsetWidth <= 0 || t.offsetWidth <= 0) {
76
+ P();
77
+ return;
78
+ }
79
+ const { width: a, height: o, left: g, top: ke } = Re(e, t), x = {
80
+ width: `${a}px`,
81
+ height: `${o}px`,
82
+ transform: `translate(${g}px, ${ke}px)`,
64
83
  opacity: 1
65
- }, V.value || setTimeout(() => {
66
- V.value = !0;
67
- }, 50);
84
+ }, B = b.value;
85
+ B.width === x.width && B.height === x.height && B.transform === x.transform && B.opacity === x.opacity || (b.value = x, F.value || (cancelAnimationFrame(R), R = requestAnimationFrame(() => {
86
+ F.value = !0;
87
+ })));
88
+ };
89
+ let I = !1;
90
+ const H = async (e) => {
91
+ await le(), j(), e?.ensureVisible && oe();
92
+ }, i = (e) => {
93
+ e?.ensureVisible && (I = !0), !z && (z = !0, cancelAnimationFrame(O), O = requestAnimationFrame(() => {
94
+ z = !1;
95
+ const r = I;
96
+ I = !1, H({ ensureVisible: r });
97
+ }));
68
98
  };
69
- G(w, () => {
70
- d(), i();
71
- }), p(
99
+ _(u, () => i()), _(k, () => i()), p(
72
100
  () => n.modelValue,
73
- async () => {
74
- await d(), I();
75
- }
101
+ () => i({ ensureVisible: !0 })
76
102
  ), p(
77
103
  () => n.options,
78
- async () => {
79
- await d(), i();
80
- },
81
- { deep: !0 }
104
+ () => i()
82
105
  ), p(
83
106
  () => n.size,
84
- async () => {
85
- await d(), i();
86
- }
107
+ () => i()
87
108
  ), p(
88
109
  () => n.block,
89
- async () => {
90
- await d(), i();
91
- }
110
+ () => i()
92
111
  ), p(
93
112
  () => n.wrap,
94
- async () => {
95
- await d(), i();
96
- }
97
- ), me(async () => {
98
- await d(), i(), setTimeout(i, 100), setTimeout(I, 100);
113
+ () => i()
114
+ ), p(
115
+ () => n.variant,
116
+ () => i()
117
+ ), Ve(() => {
118
+ H({ ensureVisible: !0 });
119
+ }), ze(() => {
120
+ cancelAnimationFrame(O), cancelAnimationFrame(T), cancelAnimationFrame(R), z = !1, S = !1, v.clear();
99
121
  });
100
- const U = f(() => {
101
- const t = n.variant === "line";
102
- return n.block || t ? "flex w-full relative" : "inline-flex max-w-full relative";
103
- }), j = f(() => [
122
+ const ie = d(() => {
123
+ const e = n.variant === "line";
124
+ return n.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
125
+ }), N = d(() => [
104
126
  "absolute top-0 bottom-0 z-20 flex items-center pointer-events-none transition-opacity duration-200",
105
127
  n.variant === "line" ? "pb-[10px]" : ""
106
- ]), X = (t) => {
107
- t.disabled || H(t) || (v("update:modelValue", t.value), v("change", t.value));
108
- }, Y = (t, a) => {
109
- if (t.disabled) return;
110
- const e = a.value;
111
- e != null && (v("update:modelValue", e), v("change", e), v("menu-select", { value: e, option: a.option, tab: t }));
112
- }, Z = (t) => {
113
- v("menu-open", t);
114
- }, _ = (t) => {
115
- v("menu-close", t), d();
116
- }, ee = f(() => {
117
- const t = n.variant === "line";
118
- return (n.block || n.wrap) && !t ? "flex-1 min-w-max" : "shrink-0";
119
- }), te = (t) => t.dropdown?.direction ?? n.direction, ne = f(() => {
120
- const t = n.variant === "line", a = {
128
+ ]), ce = (e) => {
129
+ e.disabled || ee(e) || (m("update:modelValue", e.value), m("change", e.value));
130
+ }, ue = (e, r) => {
131
+ if (e.disabled) return;
132
+ const t = r.value;
133
+ t != null && (m("update:modelValue", t), m("change", t), m("menu-select", { value: t, option: r.option, tab: e }));
134
+ }, de = (e) => {
135
+ m("menu-open", e);
136
+ }, fe = (e) => {
137
+ m("menu-close", e), i();
138
+ }, me = d(() => {
139
+ const e = n.variant === "line";
140
+ return (n.block || n.wrap) && !e ? "flex-1 min-w-max" : "shrink-0";
141
+ }), ve = (e) => e.dropdown?.direction ?? n.direction, be = d(() => {
142
+ const e = n.variant === "line", r = {
121
143
  surface: "bg-secondary/80 p-1",
122
144
  primary: "bg-secondary p-1",
123
145
  secondary: "bg-secondary p-1",
@@ -125,52 +147,52 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
125
147
  success: "bg-success/10 p-1",
126
148
  outline: "bg-transparent border border-border p-1",
127
149
  line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
128
- }, e = n.wrap && !t ? "flex-wrap" : "";
129
- return [`${n.block || t ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${e}`, a[n.variant]];
130
- }), A = f(() => n.variant === "surface" || n.variant === "primary" || n.variant === "secondary" ? "var(--color-secondary)" : n.variant === "danger" ? "color-mix(in srgb, var(--color-danger) 10%, transparent)" : n.variant === "success" ? "color-mix(in srgb, var(--color-success) 10%, transparent)" : "var(--color-background)"), D = {
150
+ }, t = n.wrap && !e ? "flex-wrap" : "";
151
+ return [`${n.block || e ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${t}`, r[n.variant]];
152
+ }), G = d(() => n.variant === "surface" || n.variant === "primary" || n.variant === "secondary" ? "var(--color-secondary)" : n.variant === "danger" ? "color-mix(in srgb, var(--color-danger) 10%, transparent)" : n.variant === "success" ? "color-mix(in srgb, var(--color-success) 10%, transparent)" : "var(--color-background)"), K = {
131
153
  sm: "text-xs px-2.5 py-1",
132
154
  md: "-text-fs-2 px-3 py-1",
133
155
  lg: "-text-fs-1 px-4 py-1"
134
- }, re = f(() => {
135
- const t = n.variant === "line", a = t ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none pb-3 border-b-2 border-transparent hover:text-foreground shrink-0" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none shrink-0", e = (n.block || n.wrap) && !t ? "flex-1" : "";
136
- return [a, e];
137
- }), E = (t) => {
138
- const a = q(t, n.modelValue), e = n.variant === "line";
139
- let r = "";
140
- if (a)
141
- if (e)
142
- r = n.wrap ? "text-primary !border-primary" : "text-primary";
156
+ }, ge = d(() => {
157
+ const e = n.variant === "line", r = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none pb-3 border-b-2 border-transparent hover:text-foreground shrink-0" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none shrink-0", t = (n.block || n.wrap) && !e ? "flex-1" : "";
158
+ return [r, t];
159
+ }), Q = (e) => {
160
+ const r = te(e, n.modelValue), t = n.variant === "line";
161
+ let a = "";
162
+ if (r)
163
+ if (t)
164
+ a = n.wrap ? "text-primary !border-primary" : "text-primary";
143
165
  else
144
166
  switch (n.variant) {
145
167
  case "surface":
146
- r = n.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
168
+ a = n.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
147
169
  break;
148
170
  case "primary":
149
- r = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
171
+ a = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
150
172
  break;
151
173
  case "secondary":
152
- r = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
174
+ a = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
153
175
  break;
154
176
  case "danger":
155
- r = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
177
+ a = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
156
178
  break;
157
179
  case "success":
158
- r = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
180
+ a = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
159
181
  break;
160
182
  case "outline":
161
- r = n.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
183
+ a = n.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
162
184
  break;
163
185
  default:
164
- r = "text-foreground";
186
+ a = "text-foreground";
165
187
  }
166
188
  else
167
- r = e ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
168
- const s = t.disabled ? "opacity-50 cursor-not-allowed" : "";
169
- return [re.value, r, n?.tabClass, s].join(" ");
170
- }, ae = f(() => {
171
- const a = `absolute left-0 top-0 z-0 pointer-events-none ${V.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
172
- return n.variant === "line" ? `${a} !h-[2px] !top-auto bottom-0` : `${a} rounded-md shadow-sm`;
173
- }), se = () => ({
189
+ a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
190
+ const o = e.disabled ? "opacity-50 cursor-not-allowed" : "";
191
+ return [ge.value, a, n?.tabClass, o].join(" ");
192
+ }, he = d(() => {
193
+ const r = `absolute left-0 top-0 z-0 pointer-events-none ${F.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
194
+ return n.variant === "line" ? `${r} !h-[2px] !top-auto bottom-0` : `${r} rounded-md shadow-sm`;
195
+ }), pe = () => ({
174
196
  surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
175
197
  primary: "bg-primary",
176
198
  secondary: "bg-secondary-foreground",
@@ -178,175 +200,175 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
178
200
  success: "bg-success",
179
201
  outline: "bg-accent/50 ring-1 ring-border",
180
202
  line: "bg-primary"
181
- })[n.variant], N = (t) => t.labelI18n ? ye(t.labelI18n) : t.label, oe = (t) => t.to ? "router-link" : t.href ? "a" : "button", le = (t) => t.to ? { to: t.to } : t.href ? { href: t.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, ie = (t) => [
203
+ })[n.variant], U = (e) => e.labelI18n ? Ie(e.labelI18n) : e.label, xe = (e) => e.to ? "router-link" : e.href ? "a" : "button", ye = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, we = (e) => [
182
204
  n.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
183
205
  "opacity-70 shrink-0 transition-transform duration-200",
184
- t ? "rotate-180" : ""
206
+ e ? "rotate-180" : ""
185
207
  ].join(" ");
186
- return (t, a) => (m(), k("div", {
187
- class: o([U.value, "group"]),
188
- dir: l.direction
208
+ return (e, r) => (f(), $("div", {
209
+ class: l([ie.value, "group"]),
210
+ dir: s.direction
189
211
  }, [
190
- C(h(J, {
212
+ M(y(re, {
191
213
  direction: "left",
192
- color: A.value,
214
+ color: G.value,
193
215
  coverage: "100px",
194
216
  blur: "40px",
195
217
  easing: "smooth",
196
218
  tintOpacity: 1,
197
- class: o(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-l-lg"])
219
+ class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-l-lg"])
198
220
  }, null, 8, ["color", "class"]), [
199
- [z, S.value]
221
+ [L, C.value]
200
222
  ]),
201
- C(c("div", {
202
- class: o(["left-0 pl-1", j.value])
223
+ M(c("div", {
224
+ class: l(["left-0 pl-1", N.value])
203
225
  }, [
204
226
  c("button", {
205
- onClick: a[0] || (a[0] = (e) => M(-200)),
227
+ onClick: r[0] || (r[0] = (t) => q(-200)),
206
228
  class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
207
229
  "aria-label": "Scroll left"
208
230
  }, [
209
- h(x, {
231
+ y(w, {
210
232
  icon: "lucide:chevron-left",
211
233
  class: "w-5 h-5"
212
234
  })
213
235
  ])
214
236
  ], 2), [
215
- [z, S.value]
237
+ [L, C.value]
216
238
  ]),
217
239
  c("div", {
218
240
  ref_key: "scrollRef",
219
241
  ref: u,
220
- class: "flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
221
- onScroll: i
242
+ class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
243
+ onScroll: se
222
244
  }, [
223
245
  c("div", {
224
246
  ref_key: "containerRef",
225
- ref: w,
226
- class: o([ne.value, "tabes-container"]),
247
+ ref: k,
248
+ class: l([be.value, "tabes-container"]),
227
249
  role: "tablist",
228
250
  "data-variant": n.variant,
229
251
  "data-tabes": ""
230
252
  }, [
231
- l.modelValue !== void 0 && !l.wrap ? (m(), k("div", {
253
+ s.modelValue !== void 0 && !s.wrap ? (f(), $("div", {
232
254
  key: 0,
233
- class: o([ae.value, se()]),
234
- style: ve(R.value)
235
- }, null, 6)) : O("", !0),
236
- (m(!0), k(W, null, ge(l.options, (e) => (m(), k(W, {
237
- key: e.value
255
+ class: l(["tabes-marker", [he.value, pe()]]),
256
+ style: Se(b.value)
257
+ }, null, 6)) : E("", !0),
258
+ (f(!0), $(J, null, Be(s.options, (t) => (f(), $(J, {
259
+ key: t.value
238
260
  }, [
239
- K(H)(e) ? (m(), B(we, {
261
+ X(ee)(t) ? (f(), A(Fe, {
240
262
  key: 0,
241
- options: e.menu,
242
- selected: l.modelValue,
243
- disabled: e.disabled,
244
- direction: te(e),
245
- position: e.dropdown?.position,
246
- offset: e.dropdown?.offset ?? [0, 8],
247
- searchable: e.dropdown?.searchable ?? !1,
248
- "close-on-select": e.dropdown?.closeOnSelect ?? !0,
249
- "max-height": e.dropdown?.maxHeight ?? "300px",
250
- "min-width": e.dropdown?.minWidth ?? "160px",
251
- width: e.dropdown?.width,
252
- "menu-id": e.dropdown?.menuId ?? `tabes-menu-${e.value}`,
253
- teleport: e.dropdown?.teleport ?? !0,
263
+ options: t.menu,
264
+ selected: s.modelValue,
265
+ disabled: t.disabled,
266
+ direction: ve(t),
267
+ position: t.dropdown?.position,
268
+ offset: t.dropdown?.offset ?? [0, 8],
269
+ searchable: t.dropdown?.searchable ?? !1,
270
+ "close-on-select": t.dropdown?.closeOnSelect ?? !0,
271
+ "max-height": t.dropdown?.maxHeight ?? "300px",
272
+ "min-width": t.dropdown?.minWidth ?? "160px",
273
+ width: t.dropdown?.width,
274
+ "menu-id": t.dropdown?.menuId ?? `tabes-menu-${t.value}`,
275
+ teleport: t.dropdown?.teleport ?? !0,
254
276
  "show-selected-label": !1,
255
277
  "show-selected-icon": !1,
256
278
  "toggle-selection": !1,
257
279
  selectable: !0,
258
- class: o(["tabes-menu", "inline-flex!", ee.value]),
259
- onOnSelect: (r) => Y(e, r),
260
- onOnOpen: () => Z(e),
261
- onOnClose: () => _(e)
280
+ class: l(["tabes-menu", "inline-flex!", me.value]),
281
+ onOnSelect: (a) => ue(t, a),
282
+ onOnOpen: () => de(t),
283
+ onOnClose: () => fe(t)
262
284
  }, {
263
- trigger: P(({ isOpen: r }) => [
285
+ trigger: Y(({ isOpen: a }) => [
264
286
  c("button", {
265
287
  ref_for: !0,
266
- ref: (s) => T(s, e.value),
288
+ ref: (o) => W(o, t.value),
267
289
  type: "button",
268
290
  role: "tab",
269
291
  "data-tabes-item": "",
270
292
  "data-tabes-menu-trigger": "",
271
- "aria-selected": K(q)(e, l.modelValue),
293
+ "aria-selected": X(te)(t, s.modelValue),
272
294
  "aria-haspopup": !0,
273
- "aria-expanded": r,
274
- disabled: e.disabled,
275
- class: o([E(e), D[n.size], "w-full"])
295
+ "aria-expanded": a,
296
+ disabled: t.disabled,
297
+ class: l([Q(t), K[n.size], "w-full"])
276
298
  }, [
277
- e.icon ? (m(), B(x, {
299
+ t.icon ? (f(), A(w, {
278
300
  key: 0,
279
- icon: e.icon,
280
- class: o(l.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
281
- }, null, 8, ["icon", "class"])) : O("", !0),
301
+ icon: t.icon,
302
+ class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
303
+ }, null, 8, ["icon", "class"])) : E("", !0),
282
304
  c("span", {
283
- class: o(["whitespace-nowrap z-20 relative", l.textClass])
284
- }, F(N(e)), 3),
285
- h(x, {
305
+ class: l(["whitespace-nowrap z-20 relative", s.textClass])
306
+ }, Z(U(t)), 3),
307
+ y(w, {
286
308
  icon: "lucide:chevron-down",
287
- class: o(ie(r)),
309
+ class: l(we(a)),
288
310
  "aria-hidden": "true"
289
311
  }, null, 8, ["class"])
290
- ], 10, ze)
312
+ ], 10, je)
291
313
  ]),
292
314
  _: 2
293
- }, 1032, ["options", "selected", "disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) : (m(), B(be(oe(e)), pe({
315
+ }, 1032, ["options", "selected", "disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) : $e([t, s.modelValue === t.value, s.size, s.variant, s.block, s.wrap, s.tabClass, s.textClass], () => (f(), A(Me(xe(t)), Le({
294
316
  key: 1,
295
317
  ref_for: !0,
296
- ref: (r) => T(r?.$el || r, e.value),
318
+ ref: (a) => W(a, t.value),
297
319
  role: "tab",
298
320
  "data-tabes-item": "",
299
- "aria-selected": l.modelValue === e.value,
300
- disabled: e.disabled,
301
- class: [E(e), D[n.size]]
302
- }, { ref_for: !0 }, le(e), {
303
- onClick: (r) => X(e)
321
+ "aria-selected": s.modelValue === t.value,
322
+ disabled: t.disabled,
323
+ class: [Q(t), K[n.size]]
324
+ }, { ref_for: !0 }, ye(t), {
325
+ onClick: (a) => ce(t)
304
326
  }), {
305
- default: P(() => [
306
- e.icon ? (m(), B(x, {
327
+ default: Y(() => [
328
+ t.icon ? (f(), A(w, {
307
329
  key: 0,
308
- icon: e.icon,
309
- class: o(l.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
310
- }, null, 8, ["icon", "class"])) : O("", !0),
330
+ icon: t.icon,
331
+ class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
332
+ }, null, 8, ["icon", "class"])) : E("", !0),
311
333
  c("span", {
312
- class: o(["whitespace-nowrap z-20 relative", l.textClass])
313
- }, F(N(e)), 3)
334
+ class: l(["whitespace-nowrap z-20 relative", s.textClass])
335
+ }, Z(U(t)), 3)
314
336
  ]),
315
337
  _: 2
316
- }, 1040, ["aria-selected", "disabled", "class", "onClick"]))
338
+ }, 1040, ["aria-selected", "disabled", "class", "onClick"])), r, 1)
317
339
  ], 64))), 128))
318
- ], 10, Ce)
340
+ ], 10, Te)
319
341
  ], 544),
320
- C(h(J, {
342
+ M(y(re, {
321
343
  direction: "right",
322
- color: A.value,
344
+ color: G.value,
323
345
  coverage: "100px",
324
346
  blur: "40",
325
347
  easing: "smooth",
326
348
  tintOpacity: 1,
327
- class: o(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-r-lg"])
349
+ class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-r-lg"])
328
350
  }, null, 8, ["color", "class"]), [
329
- [z, $.value]
351
+ [L, V.value]
330
352
  ]),
331
- C(c("div", {
332
- class: o(["right-0 pr-1", j.value])
353
+ M(c("div", {
354
+ class: l(["right-0 pr-1", N.value])
333
355
  }, [
334
356
  c("button", {
335
- onClick: a[1] || (a[1] = (e) => M(200)),
357
+ onClick: r[2] || (r[2] = (t) => q(200)),
336
358
  class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
337
359
  "aria-label": "Scroll right"
338
360
  }, [
339
- h(x, {
361
+ y(w, {
340
362
  icon: "lucide:chevron-right",
341
363
  class: "w-5 h-5"
342
364
  })
343
365
  ])
344
366
  ], 2), [
345
- [z, $.value]
367
+ [L, V.value]
346
368
  ])
347
- ], 10, ke));
369
+ ], 10, Ee));
348
370
  }
349
371
  });
350
372
  export {
351
- Le as default
373
+ Qe as default
352
374
  };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Local-coordinate geometry helpers for the Tabes active marker.
3
+ *
4
+ * Ancestor CSS transforms (e.g. ScaleGenerator's `transform: scale(...)`)
5
+ * affect `getBoundingClientRect()` but not layout sizes (`offsetWidth`).
6
+ * Feeding visual rect sizes into local CSS `width` / `translate` would
7
+ * double-apply the scale. These helpers normalize measurements into the
8
+ * container's own CSS pixel space.
9
+ */
10
+ export interface TabesMarkerGeometry {
11
+ width: number;
12
+ height: number;
13
+ left: number;
14
+ top: number;
15
+ }
16
+ /**
17
+ * Returns the horizontal transform scale currently applied to `element`
18
+ * (visual width ÷ layout width). `1` when unscaled or zero-sized.
19
+ */
20
+ export declare const getTabesElementScaleX: (element: HTMLElement) => number;
21
+ /**
22
+ * Returns the vertical transform scale currently applied to `element`.
23
+ */
24
+ export declare const getTabesElementScaleY: (element: HTMLElement) => number;
25
+ /**
26
+ * Measure active-tab marker geometry in `container`'s local CSS coordinates.
27
+ * Width/height use layout sizes; left/top normalize visual deltas by scale.
28
+ */
29
+ export declare const measureTabesMarkerGeometry: (container: HTMLElement, activeElement: HTMLElement) => TabesMarkerGeometry;
30
+ /**
31
+ * Convert a visual (viewport) horizontal delta into a local `scrollLeft` delta
32
+ * for `scrollContainer`, accounting for ancestor CSS scale transforms.
33
+ */
34
+ export declare const toTabesLocalScrollDelta: (scrollContainer: HTMLElement, visualDelta: number) => number;
@@ -0,0 +1,21 @@
1
+ const s = (t, e) => {
2
+ if (e <= 0) return 1;
3
+ const o = t / e;
4
+ return o > 1e-3 ? o : 1;
5
+ }, i = (t) => {
6
+ const e = t.getBoundingClientRect();
7
+ return s(e.width, t.offsetWidth);
8
+ }, r = (t, e) => {
9
+ const o = t.getBoundingClientRect(), c = e.getBoundingClientRect(), n = s(o.width, t.offsetWidth), f = s(o.height, t.offsetHeight);
10
+ return {
11
+ width: e.offsetWidth,
12
+ height: e.offsetHeight,
13
+ left: (c.left - o.left) / n,
14
+ top: (c.top - o.top) / f
15
+ };
16
+ }, h = (t, e) => e / i(t);
17
+ export {
18
+ i as getTabesElementScaleX,
19
+ r as measureTabesMarkerGeometry,
20
+ h as toTabesLocalScrollDelta
21
+ };
@@ -14,8 +14,10 @@ declare const __VLS_component: import('vue').DefineComponent<ThemeProviderProps,
14
14
  borderRadius: number;
15
15
  bgColor: string;
16
16
  primaryColor: string;
17
+ surfaceColor: string;
17
18
  footerBgColor: string;
18
19
  baseFontSize: number;
20
+ scaleSpacingWithBaseFontSize: boolean;
19
21
  headingScale: number;
20
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
21
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;