struggle-annotator 0.2.4__tar.gz → 0.2.5__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: struggle-annotator
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Streamlit custom component for interactive NER-style text annotation
5
5
  License: MIT License
6
6
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "struggle-annotator"
7
- version = "0.2.4"
7
+ version = "0.2.5"
8
8
  description = "Streamlit custom component for interactive NER-style text annotation"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -36,4 +36,4 @@ Error generating stack: `+d.message+`
36
36
  white-space: nowrap;
37
37
  overflow: hidden;
38
38
  }
39
- `}),Qt.jsxs("div",{style:{display:"flex",gap:"20px",alignItems:"center",marginBottom:"10px"},children:[Qt.jsx(A,{checked:p,onToggle:()=>m(V=>!V),label:"Auto-expand to full word"}),Qt.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#444"},children:["Spacing",Qt.jsx("input",{type:"range",min:1.2,max:5,step:.1,value:D,onChange:V=>C(parseFloat(V.target.value)),style:{width:"140px",cursor:"pointer",accentColor:"#1E88E5"}})]}),Qt.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#444"},children:["Labels",Qt.jsx("div",{style:{display:"inline-flex",border:"1px solid #ccc",borderRadius:"4px",overflow:"hidden"},children:["left","top","right"].map((V,dt,wt)=>Qt.jsx("button",{onClick:()=>B(V),style:{padding:"3px 10px",fontSize:"12px",background:w===V?"#1E88E5":"#fff",color:w===V?"#fff":"#444",border:"none",borderRight:dt<wt.length-1?"1px solid #ccc":"none",cursor:"pointer",transition:"background 0.15s, color 0.15s"},children:V.charAt(0).toUpperCase()+V.slice(1)},V))})]})]}),w==="top"&&Qt.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",marginBottom:"12px"},children:te}),Qt.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"flex-start"},children:[w==="left"&&Qt.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",flexShrink:0},children:te}),Qt.jsx("div",{ref:tt,onMouseDown:It,onMouseUp:Vt,style:{flex:1,whiteSpace:"pre-wrap",lineHeight:D,fontSize:"14px",border:"1px solid #ddd",borderRadius:"4px",padding:"12px",cursor:"text",userSelect:"text"},children:Nt.map((V,dt)=>V.kind==="annotated"?Qt.jsx("span",{"data-start":V.start,"data-end":V.end,"data-label":V.label,"data-ann-idx":V.annIdx,title:`${V.label} — click to remove`,style:{display:"inline-block",position:"relative",backgroundColor:V.color,borderRadius:"3px",padding:"0 3px",lineHeight:"3em",cursor:"pointer",color:"#fff",textShadow:"0 1px 2px rgba(0,0,0,0.35)"},children:V.text},dt):Qt.jsx("span",{"data-start":V.start,"data-end":V.end,children:V.text},dt))}),w==="right"&&Qt.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",flexShrink:0},children:te})]}),Qt.jsx("div",{style:{marginTop:"6px",fontSize:"12px",color:"#666",minHeight:"16px",fontStyle:"italic"},children:L})]})}const I_=v_(S_);Ov.createRoot(document.getElementById("root")).render(Qt.jsx(Kr.StrictMode,{children:Qt.jsx(I_,{})}));
39
+ `}),Qt.jsxs("div",{style:{display:"flex",gap:"20px",alignItems:"center",marginBottom:"10px"},children:[Qt.jsx(A,{checked:p,onToggle:()=>m(V=>!V),label:"Auto-expand to full word"}),Qt.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#444"},children:["Spacing",Qt.jsx("input",{type:"range",min:1.2,max:5,step:.1,value:D,onChange:V=>C(parseFloat(V.target.value)),style:{width:"140px",cursor:"pointer",accentColor:"#1E88E5"}})]}),Qt.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#444"},children:["Labels",Qt.jsx("div",{style:{display:"inline-flex",border:"1px solid #ccc",borderRadius:"4px",overflow:"hidden"},children:["left","top","right"].map((V,dt,wt)=>Qt.jsx("button",{onClick:()=>B(V),style:{padding:"3px 10px",fontSize:"12px",background:w===V?"#1E88E5":"#fff",color:w===V?"#fff":"#444",border:"none",borderRight:dt<wt.length-1?"1px solid #ccc":"none",cursor:"pointer",transition:"background 0.15s, color 0.15s"},children:V.charAt(0).toUpperCase()+V.slice(1)},V))})]})]}),w==="top"&&Qt.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",marginBottom:"12px"},children:te}),Qt.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"flex-start"},children:[w==="left"&&Qt.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",flexShrink:0},children:te}),Qt.jsx("div",{ref:tt,onMouseDown:It,onMouseUp:Vt,style:{flex:1,whiteSpace:"pre-wrap",lineHeight:D,fontSize:"14px",border:"1px solid #ddd",borderRadius:"4px",padding:"12px",cursor:"text",userSelect:"text",maxHeight:"400px",overflowY:"auto"},children:Nt.map((V,dt)=>V.kind==="annotated"?Qt.jsx("span",{"data-start":V.start,"data-end":V.end,"data-label":V.label,"data-ann-idx":V.annIdx,title:`${V.label} — click to remove`,style:{display:"inline-block",position:"relative",backgroundColor:V.color,borderRadius:"3px",padding:"0 3px",lineHeight:"3em",cursor:"pointer",color:"#fff",textShadow:"0 1px 2px rgba(0,0,0,0.35)"},children:V.text},dt):Qt.jsx("span",{"data-start":V.start,"data-end":V.end,children:V.text},dt))}),w==="right"&&Qt.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",flexShrink:0},children:te})]}),Qt.jsx("div",{style:{marginTop:"6px",fontSize:"12px",color:"#666",minHeight:"16px",fontStyle:"italic"},children:L})]})}const I_=v_(S_);Ov.createRoot(document.getElementById("root")).render(Qt.jsx(Kr.StrictMode,{children:Qt.jsx(I_,{})}));
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Struggle Annotator</title>
7
- <script type="module" crossorigin src="./assets/index-LtXtvZ4l.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-DNSOR7es.js"></script>
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: struggle-annotator
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Streamlit custom component for interactive NER-style text annotation
5
5
  License: MIT License
6
6
 
@@ -9,4 +9,4 @@ struggle_annotator.egg-info/dependency_links.txt
9
9
  struggle_annotator.egg-info/requires.txt
10
10
  struggle_annotator.egg-info/top_level.txt
11
11
  struggle_annotator/frontend/build/index.html
12
- struggle_annotator/frontend/build/assets/index-LtXtvZ4l.js
12
+ struggle_annotator/frontend/build/assets/index-DNSOR7es.js