@expcat/tigercat-vue 2.1.0 → 2.1.2

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 (198) hide show
  1. package/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
  2. package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
  3. package/dist/{chunk-IEAEB4TX.mjs → chunk-3OCHBGPF.mjs} +242 -51
  4. package/dist/{chunk-OHR7IUBQ.mjs → chunk-5OILGUNU.mjs} +2 -2
  5. package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
  6. package/dist/{chunk-66OS5A4D.mjs → chunk-67VS6QHJ.mjs} +26 -12
  7. package/dist/{chunk-EHGFW5GX.mjs → chunk-6JAAXPBW.mjs} +4 -3
  8. package/dist/{chunk-JHMT5Q6P.mjs → chunk-6NYC7EY2.mjs} +29 -15
  9. package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
  10. package/dist/{chunk-F3ZVVVYD.mjs → chunk-7C7SG3SS.mjs} +15 -3
  11. package/dist/{chunk-CHEXI7MO.mjs → chunk-7TJE7OYH.mjs} +4 -3
  12. package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
  13. package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
  14. package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
  15. package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
  16. package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
  17. package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
  18. package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
  19. package/dist/{chunk-4HUYX5WW.mjs → chunk-EC62TY2Y.mjs} +80 -19
  20. package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
  21. package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
  22. package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
  23. package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
  24. package/dist/{chunk-6AMWX5K4.mjs → chunk-GQOPDD44.mjs} +1 -1
  25. package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
  26. package/dist/{chunk-AU6IC6K7.mjs → chunk-IFASMNTU.mjs} +36 -16
  27. package/dist/{chunk-EZYOCPMM.mjs → chunk-IK2WHKDA.mjs} +29 -15
  28. package/dist/{chunk-HGXD57QM.mjs → chunk-JBS3AESR.mjs} +65 -23
  29. package/dist/{chunk-PYRKFQ6J.mjs → chunk-JIU5UEOU.mjs} +70 -26
  30. package/dist/{chunk-JALHMWKW.mjs → chunk-K5MHUMKR.mjs} +2 -2
  31. package/dist/{chunk-BZ6MVFV7.mjs → chunk-K5RYFPOQ.mjs} +17 -19
  32. package/dist/{chunk-DI6RRAGQ.mjs → chunk-KIUGJNQO.mjs} +4 -4
  33. package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
  34. package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
  35. package/dist/{chunk-W5XFWVNV.mjs → chunk-M4FWWEMX.mjs} +15 -6
  36. package/dist/{chunk-VLW3UBIR.mjs → chunk-N2XV37BL.mjs} +37 -41
  37. package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
  38. package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
  39. package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
  40. package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
  41. package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
  42. package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
  43. package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
  44. package/dist/{chunk-7DWWNFRP.mjs → chunk-PWWWACHC.mjs} +1 -1
  45. package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
  46. package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
  47. package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
  48. package/dist/{chunk-37W7XTA6.mjs → chunk-RHQWQJ4I.mjs} +4 -3
  49. package/dist/{chunk-32X54QKW.mjs → chunk-RRLE7QRH.mjs} +43 -22
  50. package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
  51. package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
  52. package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
  53. package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
  54. package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
  55. package/dist/{chunk-U4B5QT72.mjs → chunk-SX3NAN4M.mjs} +1 -1
  56. package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
  57. package/dist/chunk-UEGNXN5B.mjs +28 -0
  58. package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
  59. package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
  60. package/dist/{chunk-VN2TWPRC.mjs → chunk-UR5F74ZB.mjs} +112 -18
  61. package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
  62. package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
  63. package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
  64. package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
  65. package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
  66. package/dist/{chunk-ZOYHZF4N.mjs → chunk-X5LJT76O.mjs} +49 -32
  67. package/dist/{chunk-FSJRNEZK.mjs → chunk-YLO73TDM.mjs} +4 -4
  68. package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
  69. package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
  70. package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
  71. package/dist/components/ActivityFeed.d.mts +23 -5
  72. package/dist/components/ActivityFeed.mjs +2 -2
  73. package/dist/components/Affix.mjs +1 -1
  74. package/dist/components/Alert.d.mts +1 -1
  75. package/dist/components/Anchor.d.mts +1 -1
  76. package/dist/components/Anchor.mjs +1 -1
  77. package/dist/components/AreaChart.mjs +4 -3
  78. package/dist/components/AutoComplete.mjs +1 -1
  79. package/dist/components/BarChart.mjs +4 -3
  80. package/dist/components/Calendar.mjs +1 -1
  81. package/dist/components/Cascader.mjs +1 -1
  82. package/dist/components/ChartCanvas.d.mts +7 -3
  83. package/dist/components/ChartCanvas.mjs +1 -1
  84. package/dist/components/ChatWindow.d.mts +26 -8
  85. package/dist/components/ChatWindow.mjs +3 -3
  86. package/dist/components/Checkbox.d.mts +1 -1
  87. package/dist/components/Code.d.mts +34 -7
  88. package/dist/components/Code.mjs +3 -1
  89. package/dist/components/CodeEditor.d.mts +1 -1
  90. package/dist/components/CollapsePanel.mjs +1 -1
  91. package/dist/components/ColorPicker.d.mts +19 -1
  92. package/dist/components/ColorPicker.mjs +3 -1
  93. package/dist/components/ColorSwatch.d.mts +6 -0
  94. package/dist/components/ColorSwatch.mjs +1 -1
  95. package/dist/components/CommentThread.d.mts +63 -27
  96. package/dist/components/CommentThread.mjs +2 -2
  97. package/dist/components/ContextMenu.d.mts +2 -2
  98. package/dist/components/Countdown.d.mts +2 -2
  99. package/dist/components/CronEditor.d.mts +1 -1
  100. package/dist/components/DataExport.mjs +2 -2
  101. package/dist/components/DataTableWithToolbar.mjs +8 -8
  102. package/dist/components/DatePicker.d.mts +1 -1
  103. package/dist/components/Descriptions.d.mts +1 -1
  104. package/dist/components/DonutChart.mjs +4 -4
  105. package/dist/components/Drawer.d.mts +1 -1
  106. package/dist/components/Dropdown.d.mts +21 -2
  107. package/dist/components/Dropdown.mjs +1 -1
  108. package/dist/components/FileManager.d.mts +7 -1
  109. package/dist/components/FileManager.mjs +1 -1
  110. package/dist/components/FloatButton.d.mts +31 -1
  111. package/dist/components/FloatButton.mjs +1 -1
  112. package/dist/components/FormWizard.mjs +1 -1
  113. package/dist/components/FunnelChart.mjs +3 -3
  114. package/dist/components/Gantt.d.mts +3 -1
  115. package/dist/components/Gantt.mjs +2 -2
  116. package/dist/components/GaugeChart.mjs +2 -2
  117. package/dist/components/HeatmapChart.mjs +3 -3
  118. package/dist/components/Icon.d.mts +1 -1
  119. package/dist/components/Image.d.mts +1 -1
  120. package/dist/components/Image.mjs +3 -3
  121. package/dist/components/ImageAnnotation.d.mts +1 -1
  122. package/dist/components/ImageGroup.mjs +2 -2
  123. package/dist/components/ImagePreview.mjs +1 -1
  124. package/dist/components/Input.mjs +1 -1
  125. package/dist/components/InputNumber.mjs +1 -1
  126. package/dist/components/InputOTP.d.mts +1 -1
  127. package/dist/components/Kanban.mjs +2 -2
  128. package/dist/components/LineChart.mjs +4 -3
  129. package/dist/components/Link.d.mts +1 -1
  130. package/dist/components/List.mjs +2 -2
  131. package/dist/components/Loading.mjs +1 -1
  132. package/dist/components/MarkdownEditor.d.mts +1 -1
  133. package/dist/components/MarkdownEditor.mjs +1 -1
  134. package/dist/components/MaskInput.d.mts +9 -3
  135. package/dist/components/MaskInput.mjs +1 -1
  136. package/dist/components/Menu.d.mts +2 -2
  137. package/dist/components/Modal.d.mts +1 -1
  138. package/dist/components/NavigationMenu.d.mts +3 -3
  139. package/dist/components/NotificationCenter.d.mts +44 -26
  140. package/dist/components/NotificationCenter.mjs +4 -4
  141. package/dist/components/NumberKeyboard.d.mts +1 -1
  142. package/dist/components/OrgChart.mjs +2 -2
  143. package/dist/components/PageHeader.d.mts +1 -1
  144. package/dist/components/Pagination.mjs +1 -1
  145. package/dist/components/PieChart.mjs +3 -3
  146. package/dist/components/Popconfirm.d.mts +1 -1
  147. package/dist/components/Popconfirm.mjs +2 -2
  148. package/dist/components/Popover.d.mts +2 -2
  149. package/dist/components/Popover.mjs +2 -2
  150. package/dist/components/QRCode.d.mts +2 -11
  151. package/dist/components/QRCode.mjs +1 -1
  152. package/dist/components/RadarChart.mjs +3 -3
  153. package/dist/components/Radio.d.mts +1 -1
  154. package/dist/components/Radio.mjs +1 -1
  155. package/dist/components/Rate.mjs +1 -1
  156. package/dist/components/Result.d.mts +1 -1
  157. package/dist/components/RichTextEditor.d.mts +1 -1
  158. package/dist/components/RichTextEditor.mjs +1 -1
  159. package/dist/components/ScatterChart.mjs +4 -3
  160. package/dist/components/ScrollSpy.mjs +1 -1
  161. package/dist/components/Select.d.mts +4 -6
  162. package/dist/components/Select.mjs +1 -1
  163. package/dist/components/Signature.mjs +1 -1
  164. package/dist/components/Slider.d.mts +18 -0
  165. package/dist/components/Slider.mjs +1 -1
  166. package/dist/components/SplitButton.d.mts +1 -1
  167. package/dist/components/SplitButton.mjs +2 -2
  168. package/dist/components/Splitter.d.mts +4 -4
  169. package/dist/components/Splitter.mjs +1 -1
  170. package/dist/components/Spotlight.d.mts +1 -1
  171. package/dist/components/Statistic.d.mts +2 -2
  172. package/dist/components/Stepper.d.mts +7 -1
  173. package/dist/components/Stepper.mjs +1 -1
  174. package/dist/components/SunburstChart.mjs +3 -3
  175. package/dist/components/Switch.d.mts +22 -6
  176. package/dist/components/Switch.mjs +1 -1
  177. package/dist/components/Table.d.mts +4 -4
  178. package/dist/components/Table.mjs +4 -4
  179. package/dist/components/TagsInput.d.mts +1 -1
  180. package/dist/components/TaskBoard.mjs +1 -1
  181. package/dist/components/Text.d.mts +2 -2
  182. package/dist/components/Textarea.mjs +1 -1
  183. package/dist/components/TimePicker.d.mts +1 -1
  184. package/dist/components/Tooltip.d.mts +1 -1
  185. package/dist/components/Tooltip.mjs +2 -2
  186. package/dist/components/Tour.mjs +1 -1
  187. package/dist/components/Transfer.d.mts +2 -1
  188. package/dist/components/Transfer.mjs +1 -1
  189. package/dist/components/TreeMapChart.mjs +3 -3
  190. package/dist/components/TreeSelect.mjs +1 -1
  191. package/dist/components/Upload.d.mts +1 -1
  192. package/dist/components/Upload.mjs +1 -1
  193. package/dist/components/Watermark.d.mts +1 -1
  194. package/dist/composables/useChartInteraction.d.mts +5 -0
  195. package/dist/composables/useChartInteraction.mjs +1 -1
  196. package/dist/index.d.mts +1 -1
  197. package/dist/index.mjs +57 -0
  198. package/package.json +2 -2
@@ -10,7 +10,7 @@ import { defineComponent, computed, ref, watch, h, inject, getCurrentInstance }
10
10
  import {
11
11
  classNames,
12
12
  coerceClassValue,
13
- getInputClasses,
13
+ getInputFieldClasses,
14
14
  getInputWrapperClasses,
15
15
  getInputAffixClasses,
16
16
  getInputErrorClasses,
@@ -177,14 +177,18 @@ var Input = defineComponent({
177
177
  }
178
178
  }
179
179
  );
180
- watch([effectiveStatus, effectiveShakeTrigger], ([newStatus]) => {
181
- if (newStatus === "error" && wrapperRef.value) {
182
- const el = wrapperRef.value;
183
- el.classList.remove(SHAKE_CLASS);
184
- void el.offsetWidth;
185
- el.classList.add(SHAKE_CLASS);
186
- }
187
- });
180
+ watch(
181
+ [effectiveStatus, effectiveShakeTrigger],
182
+ ([newStatus]) => {
183
+ if (newStatus === "error" && wrapperRef.value) {
184
+ const el = wrapperRef.value;
185
+ el.classList.remove(SHAKE_CLASS);
186
+ void el.offsetWidth;
187
+ el.classList.add(SHAKE_CLASS);
188
+ }
189
+ },
190
+ { flush: "post" }
191
+ );
188
192
  const handleAnimationEnd = () => {
189
193
  wrapperRef.value?.classList.remove(SHAKE_CLASS);
190
194
  };
@@ -195,14 +199,6 @@ var Input = defineComponent({
195
199
  const activeError = computed(
196
200
  () => effectiveStatus.value === "error" && !!effectiveErrorMessage.value
197
201
  );
198
- const inputClasses = computed(
199
- () => getInputClasses({
200
- size: effectiveSize.value,
201
- status: effectiveStatus.value,
202
- hasPrefix: hasPrefix.value,
203
- hasSuffix: hasSuffix.value
204
- })
205
- );
206
202
  const effectiveType = computed(() => {
207
203
  if (props.showPassword && props.type === "password") {
208
204
  return passwordVisible.value ? "text" : "password";
@@ -233,55 +229,56 @@ var Input = defineComponent({
233
229
  const currentValStr = String(localValue.value);
234
230
  const showClear = props.clearable && !props.disabled && !props.readonly && currentValStr.length > 0;
235
231
  const showPasswordToggle = props.showPassword && props.type === "password" && !props.disabled;
232
+ const dualSuffix = showClear && showPasswordToggle;
233
+ const inputClasses = getInputFieldClasses({
234
+ size: effectiveSize.value,
235
+ status: effectiveStatus.value,
236
+ hasPrefix: hasPrefix.value,
237
+ hasSuffix: hasSuffix.value,
238
+ hasDualSuffix: dualSuffix
239
+ });
236
240
  const suffixNodes = [];
237
- if (activeError.value) {
241
+ if (showClear) {
242
+ suffixNodes.push(
243
+ h(
244
+ "button",
245
+ {
246
+ type: "button",
247
+ class: getInputClearButtonClasses(
248
+ effectiveSize.value,
249
+ dualSuffix ? { offset: true } : void 0
250
+ ),
251
+ onClick: handleClear,
252
+ "aria-label": "Clear input",
253
+ tabindex: -1
254
+ },
255
+ "\u2715"
256
+ )
257
+ );
258
+ }
259
+ if (showPasswordToggle) {
260
+ suffixNodes.push(
261
+ h(
262
+ "button",
263
+ {
264
+ type: "button",
265
+ class: getInputPasswordToggleClasses(effectiveSize.value),
266
+ onClick: togglePasswordVisibility,
267
+ "aria-label": passwordVisible.value ? "Hide password" : "Show password",
268
+ tabindex: -1
269
+ },
270
+ passwordVisible.value ? "\u{1F648}" : "\u{1F441}"
271
+ )
272
+ );
273
+ }
274
+ if (!showClear && !showPasswordToggle && hasSuffix.value) {
238
275
  suffixNodes.push(
239
276
  h(
240
277
  "div",
241
- { id: errorMsgId, class: getInputErrorClasses(effectiveSize.value) },
242
- effectiveErrorMessage.value
278
+ { class: getInputAffixClasses("suffix", effectiveSize.value) },
279
+ slots.suffix ? slots.suffix() : props.suffix
243
280
  )
244
281
  );
245
- } else {
246
- if (showClear) {
247
- suffixNodes.push(
248
- h(
249
- "button",
250
- {
251
- type: "button",
252
- class: getInputClearButtonClasses(effectiveSize.value),
253
- onClick: handleClear,
254
- "aria-label": "Clear input",
255
- tabindex: -1
256
- },
257
- "\u2715"
258
- )
259
- );
260
- }
261
- if (showPasswordToggle) {
262
- suffixNodes.push(
263
- h(
264
- "button",
265
- {
266
- type: "button",
267
- class: getInputPasswordToggleClasses(effectiveSize.value),
268
- onClick: togglePasswordVisibility,
269
- "aria-label": passwordVisible.value ? "Hide password" : "Show password",
270
- tabindex: -1
271
- },
272
- passwordVisible.value ? "\u{1F648}" : "\u{1F441}"
273
- )
274
- );
275
- }
276
- if (!showClear && !showPasswordToggle && hasSuffix.value) {
277
- suffixNodes.push(
278
- h(
279
- "div",
280
- { class: getInputAffixClasses("suffix", effectiveSize.value) },
281
- slots.suffix ? slots.suffix() : props.suffix
282
- )
283
- );
284
- }
285
282
  }
286
283
  const wrapperChildren = [
287
284
  hasPrefix.value && h(
@@ -292,7 +289,7 @@ var Input = defineComponent({
292
289
  h("input", {
293
290
  ...restAttrs,
294
291
  ref: inputRef,
295
- class: inputClasses.value,
292
+ class: inputClasses,
296
293
  type: effectiveType.value,
297
294
  value: localValue.value,
298
295
  placeholder: props.placeholder,
@@ -314,29 +311,41 @@ var Input = defineComponent({
314
311
  }),
315
312
  ...suffixNodes
316
313
  ];
317
- const nodes = [
318
- h(
319
- "div",
320
- {
321
- ref: wrapperRef,
322
- class: classNames(
323
- getInputWrapperClasses(),
324
- props.className,
325
- coerceClassValue(attrClass)
326
- ),
327
- style: [attrStyle, props.style],
328
- onAnimationend: handleAnimationEnd
329
- },
330
- wrapperChildren
331
- )
332
- ];
314
+ const chromeNode = h(
315
+ "div",
316
+ {
317
+ ref: wrapperRef,
318
+ class: classNames(
319
+ getInputWrapperClasses(effectiveStatus.value),
320
+ props.className,
321
+ coerceClassValue(attrClass)
322
+ ),
323
+ style: [attrStyle, props.style],
324
+ onAnimationend: handleAnimationEnd
325
+ },
326
+ wrapperChildren
327
+ );
328
+ const extras = [];
329
+ if (activeError.value) {
330
+ extras.push(
331
+ h(
332
+ "div",
333
+ {
334
+ id: errorMsgId,
335
+ class: getInputErrorClasses(effectiveSize.value),
336
+ "aria-live": "polite"
337
+ },
338
+ effectiveErrorMessage.value
339
+ )
340
+ );
341
+ }
333
342
  if (props.showCount) {
334
343
  const count = currentValStr.length;
335
344
  const isOver = props.maxLength !== void 0 && count > props.maxLength;
336
345
  const countText = props.maxLength !== void 0 ? `${count} / ${props.maxLength}` : `${count}`;
337
- nodes.push(h("div", { class: getInputCountClasses(isOver) }, countText));
346
+ extras.push(h("div", { class: getInputCountClasses(isOver) }, countText));
338
347
  }
339
- return nodes.length === 1 ? nodes[0] : h("div", null, nodes);
348
+ return extras.length === 0 ? chromeNode : h("div", { class: "w-full" }, [chromeNode, ...extras]);
340
349
  };
341
350
  }
342
351
  });
@@ -5,9 +5,11 @@ import {
5
5
  coerceClassValue,
6
6
  getSplitterContainerClasses,
7
7
  getSplitterGutterClasses,
8
+ getSplitterGutterCssVars,
8
9
  getSplitterGutterHandleClasses,
9
10
  getPaneStyle,
10
11
  resizePanes,
12
+ resolveInitialPaneSizes,
11
13
  createDocumentDragSession
12
14
  } from "@expcat/tigercat-core";
13
15
  var Splitter = defineComponent({
@@ -54,29 +56,41 @@ var Splitter = defineComponent({
54
56
  const startPos = ref(0);
55
57
  const startSizes = ref([]);
56
58
  let dragSession = null;
57
- watch(
58
- () => props.sizes,
59
- (newSizes) => {
60
- if (newSizes) paneSizes.value = [...newSizes];
61
- },
62
- { immediate: true }
63
- );
64
- const initSizes = () => {
65
- if (props.sizes && props.sizes.length > 0) {
66
- paneSizes.value = [...props.sizes];
67
- return;
68
- }
59
+ const getPaneCount = () => {
60
+ if (props.sizes && props.sizes.length > 0) return props.sizes.length;
69
61
  const el = containerRef.value;
70
- if (!el) return;
71
- const slotChildren = slots.default?.() || [];
72
- const paneCount = slotChildren.length;
62
+ if (!el) return 0;
63
+ let n = 0;
64
+ for (let i = 0; i < el.children.length; i++) {
65
+ if (el.children[i].classList.contains("tiger-splitter-pane")) n++;
66
+ }
67
+ return n;
68
+ };
69
+ const resolveAndApplySizes = () => {
70
+ const paneCount = getPaneCount();
73
71
  if (paneCount === 0) return;
74
- const totalGutter = (paneCount - 1) * props.gutterSize;
75
- const total = props.direction === "horizontal" ? el.clientWidth - totalGutter : el.clientHeight - totalGutter;
76
- const eachSize = total / paneCount;
77
- paneSizes.value = Array.from({ length: paneCount }, () => eachSize);
72
+ const el = containerRef.value;
73
+ const containerSize = el ? props.direction === "horizontal" ? el.clientWidth : el.clientHeight : 0;
74
+ const resolved = resolveInitialPaneSizes(
75
+ paneCount,
76
+ containerSize,
77
+ props.gutterSize,
78
+ props.sizes,
79
+ props.min,
80
+ props.max
81
+ );
82
+ if (resolved) {
83
+ paneSizes.value = resolved;
84
+ }
78
85
  };
79
- onMounted(initSizes);
86
+ watch(
87
+ () => [props.sizes, props.min, props.max, props.gutterSize, props.direction],
88
+ () => {
89
+ resolveAndApplySizes();
90
+ },
91
+ { immediate: true, deep: true }
92
+ );
93
+ onMounted(resolveAndApplySizes);
80
94
  const containerClasses = computed(
81
95
  () => classNames(
82
96
  getSplitterContainerClasses(props.direction, props.className),
@@ -196,7 +210,10 @@ var Splitter = defineComponent({
196
210
  {
197
211
  ref: containerRef,
198
212
  class: containerClasses.value,
199
- style: props.style,
213
+ style: {
214
+ ...props.style,
215
+ ...getSplitterGutterCssVars(props.gutterSize)
216
+ },
200
217
  "data-direction": props.direction
201
218
  },
202
219
  nodes
@@ -2,7 +2,7 @@ import {
2
2
  Dropdown,
3
3
  DropdownItem,
4
4
  DropdownMenu
5
- } from "./chunk-KROVW4AW.mjs";
5
+ } from "./chunk-PJQTRDIG.mjs";
6
6
  import {
7
7
  Button
8
8
  } from "./chunk-YZBQ6IR7.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ImagePreview
3
- } from "./chunk-LPZBXTJ6.mjs";
3
+ } from "./chunk-SAC4PAG3.mjs";
4
4
 
5
5
  // src/components/ImageGroup.ts
6
6
  import { defineComponent, h, ref, provide, onBeforeUnmount } from "vue";
@@ -22,6 +22,7 @@ import {
22
22
  getAnchorLinkClasses,
23
23
  getAnchorLinkListClasses,
24
24
  createAnchorObserver,
25
+ createProgrammaticScrollLock,
25
26
  scrollToAnchor
26
27
  } from "@expcat/tigercat-core";
27
28
  var AnchorContextKey = /* @__PURE__ */ Symbol("AnchorContext");
@@ -200,9 +201,8 @@ var Anchor = defineComponent({
200
201
  const links = ref([]);
201
202
  const anchorRef = ref(null);
202
203
  const inkRef = ref(null);
203
- const isScrolling = ref(false);
204
- let scrollTimeoutId = null;
205
204
  const getContainer = () => props.getContainer();
205
+ const scrollLock = createProgrammaticScrollLock(getContainer);
206
206
  const scrollOffset = computed(() => props.targetOffset ?? props.offsetTop);
207
207
  const registerLink = (href) => {
208
208
  if (href && !links.value.includes(href)) {
@@ -219,9 +219,10 @@ var Anchor = defineComponent({
219
219
  const root = container === window ? null : container;
220
220
  stopObserver = createAnchorObserver(links.value, {
221
221
  offsetTop: scrollOffset.value,
222
+ bounds: props.bounds,
222
223
  root,
223
224
  onChange: (newActiveLink) => {
224
- if (isScrolling.value) return;
225
+ if (scrollLock.isLocked()) return;
225
226
  const finalActiveLink = props.getCurrentAnchor ? props.getCurrentAnchor(newActiveLink) : newActiveLink;
226
227
  if (finalActiveLink !== activeLink.value) {
227
228
  activeLink.value = finalActiveLink;
@@ -235,14 +236,9 @@ var Anchor = defineComponent({
235
236
  };
236
237
  const handleLinkClick = (href, event) => {
237
238
  emit("click", event, href);
238
- isScrolling.value = true;
239
+ scrollLock.lock();
239
240
  activeLink.value = href;
240
241
  scrollTo(href);
241
- if (scrollTimeoutId !== null) clearTimeout(scrollTimeoutId);
242
- scrollTimeoutId = setTimeout(() => {
243
- isScrolling.value = false;
244
- scrollTimeoutId = null;
245
- }, 500);
246
242
  };
247
243
  const updateInkPosition = () => {
248
244
  if (!inkRef.value || !anchorRef.value || !activeLink.value) {
@@ -274,14 +270,12 @@ var Anchor = defineComponent({
274
270
  setTimeout(updateInkPosition, 0);
275
271
  });
276
272
  });
277
- watch([links, scrollOffset, () => props.getContainer], () => {
273
+ watch([links, scrollOffset, () => props.getContainer, () => props.bounds], () => {
278
274
  nextTick(() => setupObserver());
279
275
  });
280
276
  onBeforeUnmount(() => {
281
277
  stopObserver?.();
282
- if (scrollTimeoutId !== null) {
283
- clearTimeout(scrollTimeoutId);
284
- }
278
+ scrollLock.dispose();
285
279
  });
286
280
  const wrapperClasses = computed(() => {
287
281
  return classNames(
@@ -1,3 +1,7 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-UOJOJBEU.mjs";
4
+
1
5
  // src/components/Code.ts
2
6
  import { computed, defineComponent, h, onBeforeUnmount, ref } from "vue";
3
7
  import {
@@ -6,7 +10,10 @@ import {
6
10
  copyTextToClipboard,
7
11
  getCodeBlockContainerClasses,
8
12
  getCodeBlockCopyButtonClasses,
9
- mergeStyleValues
13
+ getCodeLabels,
14
+ mergeStyleValues,
15
+ mergeTigerLocale,
16
+ resolveLocaleText
10
17
  } from "@expcat/tigercat-core";
11
18
  var Code = defineComponent({
12
19
  name: "TigerCode",
@@ -22,11 +29,23 @@ var Code = defineComponent({
22
29
  },
23
30
  copyLabel: {
24
31
  type: String,
25
- default: "\u590D\u5236"
32
+ default: void 0
26
33
  },
27
34
  copiedLabel: {
28
35
  type: String,
29
- default: "\u5DF2\u590D\u5236"
36
+ default: void 0
37
+ },
38
+ copyFailedLabel: {
39
+ type: String,
40
+ default: void 0
41
+ },
42
+ locale: {
43
+ type: Object,
44
+ default: void 0
45
+ },
46
+ labels: {
47
+ type: Object,
48
+ default: void 0
30
49
  },
31
50
  className: {
32
51
  type: String,
@@ -39,14 +58,31 @@ var Code = defineComponent({
39
58
  },
40
59
  emits: ["copy"],
41
60
  setup(props, { emit, attrs }) {
42
- const isCopied = ref(false);
61
+ const config = useTigerConfig();
62
+ const copyStatus = ref("idle");
43
63
  const timerRef = ref(null);
64
+ const mergedLocale = computed(() => mergeTigerLocale(config.value.locale, props.locale));
65
+ const labels = computed(() => getCodeLabels(mergedLocale.value, props.labels));
66
+ const resolvedCopyLabel = computed(
67
+ () => resolveLocaleText(labels.value.copyLabel, props.copyLabel)
68
+ );
69
+ const resolvedCopiedLabel = computed(
70
+ () => resolveLocaleText(labels.value.copiedLabel, props.copiedLabel)
71
+ );
72
+ const resolvedCopyFailedLabel = computed(
73
+ () => resolveLocaleText(labels.value.copyFailedLabel, props.copyFailedLabel)
74
+ );
75
+ const buttonLabel = computed(() => {
76
+ if (copyStatus.value === "failed") return resolvedCopyFailedLabel.value;
77
+ if (copyStatus.value === "copied") return resolvedCopiedLabel.value;
78
+ return resolvedCopyLabel.value;
79
+ });
44
80
  const containerClasses = computed(() => {
45
81
  const attrsRecord = attrs;
46
82
  return getCodeBlockContainerClasses(props.className, coerceClassValue(attrsRecord.class));
47
83
  });
48
84
  const copyButtonClasses = computed(() => {
49
- return getCodeBlockCopyButtonClasses(isCopied.value);
85
+ return getCodeBlockCopyButtonClasses(copyStatus.value);
50
86
  });
51
87
  const clearTimer = () => {
52
88
  if (timerRef.value != null) {
@@ -57,12 +93,15 @@ var Code = defineComponent({
57
93
  const handleCopy = async () => {
58
94
  if (!props.copyable) return;
59
95
  const ok = await copyTextToClipboard(props.code);
60
- if (!ok) return;
61
- isCopied.value = true;
62
- emit("copy", props.code);
63
96
  clearTimer();
97
+ if (ok) {
98
+ copyStatus.value = "copied";
99
+ emit("copy", props.code);
100
+ } else {
101
+ copyStatus.value = "failed";
102
+ }
64
103
  timerRef.value = window.setTimeout(() => {
65
- isCopied.value = false;
104
+ copyStatus.value = "idle";
66
105
  timerRef.value = null;
67
106
  }, 1500);
68
107
  };
@@ -84,9 +123,9 @@ var Code = defineComponent({
84
123
  type: "button",
85
124
  class: copyButtonClasses.value,
86
125
  onClick: handleCopy,
87
- "aria-label": isCopied.value ? props.copiedLabel : props.copyLabel
126
+ "aria-label": buttonLabel.value
88
127
  },
89
- isCopied.value ? props.copiedLabel : props.copyLabel
128
+ buttonLabel.value
90
129
  ) : null
91
130
  ]
92
131
  );
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useChartInteraction
3
- } from "./chunk-PE5OA4YG.mjs";
3
+ } from "./chunk-FHUGOSEY.mjs";
4
4
  import {
5
5
  ChartSeries
6
6
  } from "./chunk-2ZUEXCVJ.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-SPFL55TF.mjs";
10
10
  import {
11
11
  ChartCanvas
12
- } from "./chunk-W5RZPTFD.mjs";
12
+ } from "./chunk-SNNT64HK.mjs";
13
13
  import {
14
14
  ChartLegend
15
15
  } from "./chunk-V443QIJM.mjs";
@@ -78,6 +78,7 @@ var FunnelChart = defineComponent({
78
78
  wrapperClasses
79
79
  } = useChartInteraction({
80
80
  hoverable: computed(() => props.hoverable),
81
+ showTooltip: computed(() => props.showTooltip),
81
82
  hoveredIndexProp: () => props.hoveredIndex,
82
83
  selectable: computed(() => props.selectable),
83
84
  selectedIndexProp: () => props.selectedIndex,
@@ -209,7 +210,7 @@ var FunnelChart = defineComponent({
209
210
  }
210
211
  }
211
212
  );
212
- const tooltip = props.showTooltip && props.hoverable ? h(ChartTooltip, {
213
+ const tooltip = props.showTooltip ? h(ChartTooltip, {
213
214
  content: tooltipContent.value,
214
215
  open: resolvedHoveredIndex.value !== null && tooltipContent.value !== "",
215
216
  x: tooltipPosition.value.x,