flowcloudai-ui 0.1.8 → 0.1.10

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 (2) hide show
  1. package/dist/index.js +12 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2029,7 +2029,7 @@ import { useRef as useRef7, useCallback as useCallback8, memo as memo4, useEffec
2029
2029
  import {
2030
2030
  DndContext as DndContext2,
2031
2031
  closestCenter,
2032
- PointerSensor as PointerSensor2,
2032
+ MouseSensor,
2033
2033
  useSensor as useSensor2,
2034
2034
  useSensors as useSensors2
2035
2035
  } from "@dnd-kit/core";
@@ -2061,6 +2061,7 @@ var TabItemView = memo4(({
2061
2061
  isActive,
2062
2062
  closable,
2063
2063
  draggable,
2064
+ stopMouseDown,
2064
2065
  tabClassName,
2065
2066
  activeTabClassName,
2066
2067
  tabStyle,
@@ -2096,6 +2097,11 @@ var TabItemView = memo4(({
2096
2097
  ...tabStyle,
2097
2098
  ...isActive ? activeTabStyle : void 0
2098
2099
  };
2100
+ const { onMouseDown: dndMouseDown, ...restListeners } = listeners ?? {};
2101
+ const handleMouseDown = (e) => {
2102
+ dndMouseDown?.(e);
2103
+ if (stopMouseDown) e.stopPropagation();
2104
+ };
2099
2105
  return /* @__PURE__ */ jsxs13(
2100
2106
  "div",
2101
2107
  {
@@ -2103,8 +2109,9 @@ var TabItemView = memo4(({
2103
2109
  className: classes,
2104
2110
  style: mergedStyle,
2105
2111
  onClick: () => !item.disabled && onClick(item.key),
2112
+ onMouseDown: handleMouseDown,
2106
2113
  ...attributes,
2107
- ...listeners,
2114
+ ...restListeners,
2108
2115
  role: "tab",
2109
2116
  "aria-selected": isActive,
2110
2117
  "aria-disabled": item.disabled,
@@ -2212,7 +2219,7 @@ var TabBar = memo4(({
2212
2219
  [onClose]
2213
2220
  );
2214
2221
  const sensors = useSensors2(
2215
- useSensor2(PointerSensor2, {
2222
+ useSensor2(MouseSensor, {
2216
2223
  activationConstraint: { distance: 5 }
2217
2224
  })
2218
2225
  );
@@ -2244,6 +2251,7 @@ var TabBar = memo4(({
2244
2251
  isActive: activeKey === item.key,
2245
2252
  closable,
2246
2253
  draggable,
2254
+ stopMouseDown: tauriDragRegion,
2247
2255
  tabClassName,
2248
2256
  activeTabClassName,
2249
2257
  tabStyle,
@@ -2277,6 +2285,7 @@ var TabBar = memo4(({
2277
2285
  {
2278
2286
  className: "fc-tab-bar__add-btn",
2279
2287
  onClick: onAdd,
2288
+ onMouseDown: tauriDragRegion ? (e) => e.stopPropagation() : void 0,
2280
2289
  role: "button",
2281
2290
  "aria-label": "\u6DFB\u52A0\u6807\u7B7E",
2282
2291
  children: renderAddButton ? renderAddButton() : "+"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcloudai-ui",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "author": "flowcloudai",
6
6
  "module": "dist/index.js",