@labelbee/lb-components 1.23.0-alpha.80 → 1.23.0-alpha.82

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.
@@ -1 +1 @@
1
- import e,{useCallback as a,useMemo as b}from"react";import L from"react-draggable";import{useLocalStorageState as j}from"ahooks";import k from"./useUpdateHeight.js";import C from"../assets/topToZero.svg.js";import Z from"../assets/bottomToZero.svg.js";import F from"../assets/divider.svg.js";const P=({containerRef:t,minTopHeight:h=0,minBottomHeight:f=0,defaultHeight:E=50,axis:o,localKey:H,isShortcutButton:s=!1})=>{const l=H||"dynamicResizerHeights",{topHeight:i,position:d,bounds:m,topStyle:S,bottomStyle:T,updateELHeight:c,setTopHeightToZero:g,setBottomHeightToZero:n}=k(t,h,f,E,l),[U,p]=j(l),N=a(()=>{t.current&&t.current.classList.add("hide-scrollbar")},[t]),u=a((r,D)=>{r.stopPropagation(),c(D.y)},[c]),v=a(r=>{r.stopPropagation(),t.current&&t.current.classList.remove("hide-scrollbar"),p(i)},[t,p,i]),y=b(()=>s?e.createElement(e.Fragment,null,e.createElement("img",{src:C,className:"divider-top",draggable:"false",onClick:g}),e.createElement("div",{className:"divider-icon",draggable:"false"}),e.createElement("img",{src:Z,className:"divider-bottom",draggable:"false",onClick:n})):e.createElement(e.Fragment,null,e.createElement("img",{src:F,className:"divider-all",draggable:"false"}),e.createElement("div",{className:"divider-icon",draggable:"false"})),[s,g,n]);return{rendered:b(()=>{const r=e.createElement("div",{className:"divider"},y);return e.createElement(L,{axis:o,position:d,handle:".divider",onStart:N,onDrag:u,onStop:v,bounds:m},r)},[o,d,u,v,m]),topStyle:S,bottomStyle:T}};export{P as default};
1
+ import e,{useCallback as a,useMemo as b}from"react";import L from"react-draggable";import{useLocalStorageState as j}from"ahooks";import k from"./useUpdateHeight.js";import C from"../assets/topToZero.svg.js";import Z from"../assets/bottomToZero.svg.js";import P from"../assets/divider.svg.js";const F=({containerRef:t,minTopHeight:h=0,minBottomHeight:f=0,defaultHeight:E=50,axis:o,localKey:H,isShortcutButton:s=!1})=>{const l=H||"dynamicResizerHeights",{topHeight:i,position:d,bounds:m,topStyle:S,bottomStyle:T,updateELHeight:c,setTopHeightToZero:g,setBottomHeightToZero:n}=k(t,h,f,E,l),[U,p]=j(l),N=a(r=>{r.stopPropagation(),t.current&&t.current.classList.add("hide-scrollbar")},[t]),u=a((r,D)=>{r.stopPropagation(),c(D.y)},[c]),v=a(r=>{r.stopPropagation(),t.current&&t.current.classList.remove("hide-scrollbar"),p(i)},[t,p,i]),y=b(()=>s?e.createElement(e.Fragment,null,e.createElement("img",{src:C,className:"divider-top",draggable:"false",onClick:g}),e.createElement("div",{className:"divider-icon",draggable:"false"}),e.createElement("img",{src:Z,className:"divider-bottom",draggable:"false",onClick:n})):e.createElement(e.Fragment,null,e.createElement("img",{src:P,className:"divider-all",draggable:"false"}),e.createElement("div",{className:"divider-icon",draggable:"false"})),[s,g,n]);return{rendered:b(()=>{const r=e.createElement("div",{className:"divider"},y);return e.createElement(L,{axis:o,position:d,handle:".divider",onStart:N,onDrag:u,onStop:v,bounds:m},r)},[o,d,u,v,m]),topStyle:S,bottomStyle:T}};export{F as default};
@@ -1 +1 @@
1
- import{useState as g,useEffect as y,useMemo as r,useCallback as k}from"react";import{useLocalStorageState as E}from"ahooks";const z=(o,n,m,v,f)=>{const[i,T]=g(0),[H,b]=g(0),[l,M]=g(0),[h,_]=g(0),[x,p]=E(f);y(()=>{Z();const t=x;let e=0;t!=null?e=isNaN(Number(t))?0:Number(t):e=i||v,u(e)},[]);const B=r(()=>({x:0,y:i}),[i]),L=r(()=>{var t;return{top:l,bottom:(((t=o.current)==null?void 0:t.offsetHeight)||0)-h}},[i,o]),S=r(()=>({height:i+"px"}),[i]),N=r(()=>({height:H+"px"}),[H]),Z=()=>{var t,e,s,c;if(o){let a=n,d=m;n>=(((t=o.current)==null?void 0:t.offsetHeight)||0)/2&&(a=(((e=o.current)==null?void 0:e.offsetHeight)||0)/2),m>=(((s=o.current)==null?void 0:s.offsetHeight)||0)/2&&(d=(((c=o.current)==null?void 0:c.offsetHeight)||0)/2),M(a||1e-5),_(d)}},u=k(t=>{var e;if(o){const s=((e=o==null?void 0:o.current)==null?void 0:e.offsetHeight)||0,c=s-h;t>=l&&t<=c&&(T(t),b(s-t))}},[o,l,h]);return{topHeight:i,bottomHeight:H,position:B,bounds:L,topStyle:S,bottomStyle:N,updateELHeight:u,setBottomHeightToZero:()=>{var t;if(o){const e=((t=o==null?void 0:o.current)==null?void 0:t.offsetHeight)||0;u(e-h||0),p(e-h||0)}},setTopHeightToZero:()=>{o&&(u(l||0),p(l||0))}}};export{z as default};
1
+ import{useState as r,useEffect as M,useMemo as c,useCallback as _}from"react";import{useLocalStorageState as U}from"ahooks";const b=1e-5,z=(t,m,v,d,S)=>{const[l,I]=r(0),[n,x]=r(0),[s,B]=r(0),[u,L]=r(0),[h,p]=U(S),[a,N]=r(!1);M(()=>{D(),N(!0)},[]),M(()=>{if(a){const o=P();H(o),p(o)}},[a]);const y=c(()=>({x:0,y:l}),[l]),Z=c(()=>{var o;return{top:s,bottom:(((o=t.current)==null?void 0:o.offsetHeight)||0)-u}},[s,t]),E=c(()=>({height:l+"px"}),[l]),k=c(()=>({height:n+"px"}),[n]),D=()=>{var o,i,e,g;if(t){let f=m,T=v;m>=(((o=t.current)==null?void 0:o.offsetHeight)||0)/2&&(f=(((i=t.current)==null?void 0:i.offsetHeight)||0)/2),v>=(((e=t.current)==null?void 0:e.offsetHeight)||0)/2&&(T=(((g=t.current)==null?void 0:g.offsetHeight)||0)/2),B(f||b),L(T)}},P=_(()=>{var o,i;let e=0;return h!=null?e=isNaN(Number(h))?0:Number(h):e=d,e<s&&(e=s),t&&e>=(((o=t==null?void 0:t.current)==null?void 0:o.offsetHeight)||0)&&(e=(((i=t.current)==null?void 0:i.offsetHeight)||0)/2),e||b},[t,l,s,h,d]),H=_(o=>{var i;if(t){const e=((i=t==null?void 0:t.current)==null?void 0:i.offsetHeight)||0,g=e-u;o>=s&&o<=g&&(I(o),x(e-o))}},[t,s,u]);return{topHeight:l,bottomHeight:n,position:y,bounds:Z,topStyle:E,bottomStyle:k,updateELHeight:H,setBottomHeightToZero:()=>{var o;if(t){const i=((o=t==null?void 0:t.current)==null?void 0:o.offsetHeight)||0;H(i-u||0),p(i-u||0)}},setTopHeightToZero:()=>{t&&(H(s||0),p(s||0))}}};export{z as default};
@@ -1 +1 @@
1
- import{backward as e,forward as n,scale as i,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate90_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import x from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import y from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import I from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import B from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/Image2DBoxScale.svg.js";import t from"react";import{ReloadOutlined as $,RotateLeftOutlined as b,RotateRightOutlined as D}from"@ant-design/icons";import{polygon as k,invalidPolygon as A,selectedPolygon as V,changePolygonAttribute as M,deletePolygon as O,insertPolygonPoint as w,deletePolygonPoint as E}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},a={name:"RotateAroundCenterPoint",icon:t.createElement($,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},H={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},K={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},L={name:"RotateLeft",icon:t.createElement(b,null),shortCut:["Q"]},G={name:"RotateRight",icon:t.createElement(D,null),shortCut:["E"]},N={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},z={name:"NextBox",icon:p,shortCut:["Tab"]},F={name:"Rotate90",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},J={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},Q={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},U={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},Y={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},q={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},W={name:"LassoSelector",icon:x,shortCut:["H"],noticeInfo:"SelectorMsg"},X={name:"RectSelector",icon:y,shortCut:["J"],noticeInfo:"SelectorMsg"},Z={name:"CircleSelector",icon:R,shortCut:["K"],noticeInfo:"SelectorMsg"},oo={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},to={name:"AddPoint",icon:I,shortCut:["U"]},eo={name:"DeletePoint",icon:B,shortCut:["I"]},no={name:"Image2DBoxScale",icon:_,shortCut:["R"],noticeInfo:"SelectedRect"},so=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"RectPattern"},H,K,L,G,N,z,F,J,Q,q,U,Y,u,no],ao=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"PolygonPattern"},k,A,V,M,O,w,E],io=[e,n,a,oo,W,X,Z,to,eo];export{so as default,ao as pointCloudShortCutTable_POLYGON,io as pointCloudShortCutTable_SEGMENT};
1
+ import{backward as e,forward as n,scale as i,fullScreen as u}from"../common/index.js";import s from"../../../../../../assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js";import C from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js";import o from"../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js";import d from"../../../../../../assets/annotation/pointCloudTool/changePointCloudValid.svg.js";import l from"../../../../../../assets/annotation/pointCloudTool/copy.svg.js";import p from"../../../../../../assets/annotation/pointCloudTool/nextBox.svg.js";import h from"../../../../../../assets/annotation/pointCloudTool/patse.svg.js";import f from"../../../../../../assets/annotation/pointCloudTool/prevBox.svg.js";import S from"../../../../../../assets/annotation/pointCloudTool/rotate90_black.svg.js";import v from"../../../../../../assets/annotation/pointCloudTool/selectAll.svg.js";import P from"../../../../../../assets/annotation/pointCloudTool/selectMultiple.svg.js";import j from"../../../../../../assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js";import T from"../../../../../../assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js";import x from"../../../../../../assets/annotation/pointCloudTool/lassoSelector.svg.js";import y from"../../../../../../assets/annotation/rectTool/icon_rect.svg.js";import I from"../../../../../../assets/annotation/pointCloudTool/circleSelector.svg.js";import R from"../../../../../../assets/annotation/pointCloudTool/addSvg.svg.js";import B from"../../../../../../assets/annotation/pointCloudTool/clearSvg.svg.js";import _ from"../../../../../../assets/annotation/pointCloudTool/Image2DBoxScale.svg.js";import t from"react";import{ReloadOutlined as $,RotateLeftOutlined as b,RotateRightOutlined as D}from"@ant-design/icons";import{polygon as k,invalidPolygon as A,selectedPolygon as V,changePolygonAttribute as M,deletePolygon as O,insertPolygonPoint as w,deletePolygonPoint as E}from"../polygon/index.js";const r={name:"PointThickness",icon:t.createElement("span",{style:{display:" inline-block",width:14,height:14,borderRadius:"50%",border:"1px solid"}}),shortCut:["+","-"],linkSymbol:""},a={name:"RotateAroundCenterPoint",icon:t.createElement($,null),shortCut:[C],noticeInfo:"DragOperation"},c={name:"PointCloudViewTranslate",icon:s,shortCut:[o],noticeInfo:"Drag"},m={name:"TopViewTranslate",icon:s,shortCut:[o]},g={name:"ChangePointCloudValid",icon:d,shortCut:["V"]},H={name:"CopyBox",icon:l,shortCut:["Ctrl","C"]},K={name:"PasteBox",icon:h,shortCut:["Ctrl","V"]},L={name:"RotateLeft",icon:t.createElement(b,null),shortCut:["Q"]},G={name:"RotateRight",icon:t.createElement(D,null),shortCut:["E"]},N={name:"PreviousBox",icon:f,shortCut:["Shift","Tab"]},z={name:"NextBox",icon:p,shortCut:["Tab"]},F={name:"Rotate90",icon:S,shortCut:["G"],noticeInfo:"SelectedStatus"},J={name:"CopyPrevPage",icon:l,shortCut:["Alt","C"]},Q={name:"ChangeBoxValid",icon:j,shortCut:["F"],noticeInfo:"SelectedStatus"},U={name:"MultiSelect",icon:P,shortCut:["Ctrl",o]},Y={name:"SelectAllBox",icon:v,shortCut:["Ctrl","A"]},q={name:"Delete",icon:T,shortCut:["Del"],noticeInfo:"SelectedStatus"},W={name:"LassoSelector",icon:x,shortCut:["H"],noticeInfo:"SelectorMsg"},X={name:"RectSelector",icon:y,shortCut:["J"],noticeInfo:"SelectorMsg"},Z={name:"CircleSelector",icon:I,shortCut:["K"],noticeInfo:"SelectorMsg"},oo={name:"PointCloudViewTranslate",icon:s,shortCut:["space",o]},to={name:"AddPoint",icon:R,shortCut:["U"]},eo={name:"DeletePoint",icon:B,shortCut:["I"]},no={name:"Image2DBoxScale",icon:_,shortCut:["Ctrl","4"],noticeInfo:"SelectedRect"},so=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"RectPattern"},H,K,L,G,N,z,F,J,Q,q,U,Y,u,no],ao=[{name:"GeneralOperation"},e,n,r,i,a,c,m,g,{name:"PolygonPattern"},k,A,V,M,O,w,E],io=[e,n,a,oo,W,X,Z,to,eo];export{so as default,ao as pointCloudShortCutTable_POLYGON,io as pointCloudShortCutTable_SEGMENT};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbee/lb-components",
3
- "version": "1.23.0-alpha.80",
3
+ "version": "1.23.0-alpha.82",
4
4
  "description": "Provide a complete library of annotation components",
5
5
  "main": "./dist/index.js",
6
6
  "es": "./es/index.js",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "^4.6.2",
46
- "@labelbee/lb-annotation": "1.27.0-alpha.41",
46
+ "@labelbee/lb-annotation": "1.27.0-alpha.42",
47
47
  "@labelbee/lb-utils": "1.19.0-alpha.19",
48
48
  "@labelbee/wavesurfer": "1.0.0",
49
49
  "@types/react-dom": "^18.2.7",