yamlover 0.3.55 → 0.3.58

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 (48) hide show
  1. package/README.md +48 -5
  2. package/bin/yamlover.js +41 -4
  3. package/dist/agent-docs/AGENTS.md +20 -330
  4. package/dist/agent-docs/AGENTS.yo +621 -0
  5. package/dist/builtin-taxonomy/$defs/.yo/meta.yo +0 -2
  6. package/dist/builtin-taxonomy/$defs/annotation +3 -1
  7. package/dist/builtin-taxonomy/$defs/decision +34 -0
  8. package/dist/builtin-taxonomy/$defs/edit +60 -0
  9. package/dist/builtin-taxonomy/$defs/edit-answer +21 -0
  10. package/dist/builtin-taxonomy/$defs/edit-batch +31 -0
  11. package/dist/builtin-taxonomy/$defs/envelope +169 -0
  12. package/dist/builtin-taxonomy/$defs/event +85 -0
  13. package/dist/builtin-taxonomy/$defs/fragment +7 -9
  14. package/dist/builtin-taxonomy/$defs/link +58 -0
  15. package/dist/builtin-taxonomy/$defs/task +28 -19
  16. package/dist/builtin-taxonomy/$defs/workflow +3 -0
  17. package/dist/builtin-taxonomy/ontos/.yo/body.yo +7 -1
  18. package/dist/client/assets/{decoded-DYF3m3qY.js → decoded-Bj1qJCo_.js} +1 -1
  19. package/dist/client/assets/{djvu--bwAI3Ad.js → djvu-lnurzbzN.js} +1 -1
  20. package/dist/client/assets/{docx-rhrp57OA.js → docx-DpN_PtM8.js} +1 -1
  21. package/dist/client/assets/{heic-CNvQbH_2.js → heic-BqJutS0N.js} +1 -1
  22. package/dist/client/assets/imagemap-rdhcPlWy.js +1 -0
  23. package/dist/client/assets/index-0ALNONIF.js +962 -0
  24. package/dist/client/assets/index-BiETmvLO.css +1 -0
  25. package/dist/client/assets/map-Btm4SlVs.js +1 -0
  26. package/dist/client/assets/paged-Cjy3svw2.js +1 -0
  27. package/dist/client/assets/{openable-CaZBG8d8.js → panzoom-BXEAw479.js} +2 -2
  28. package/dist/client/assets/{pdf-CJhbTDg_.js → pdf-DvC2sbDN.js} +1 -1
  29. package/dist/client/assets/psd-BKmCWsdC.js +11 -0
  30. package/dist/client/assets/{spreadsheet-B71fTduw.js → spreadsheet-Coy5sooG.js} +1 -1
  31. package/dist/client/assets/tiff-IcWiNdYs.js +1 -0
  32. package/dist/client/assets/video-YC-ZvXg7.js +1 -0
  33. package/dist/client/assets/xyflow-CFNcu5cT.js +23 -0
  34. package/dist/client/index.html +2 -2
  35. package/dist/server.js +9228 -5278
  36. package/dist/wire/openapi.yo +935 -0
  37. package/package.json +6 -1
  38. package/dist/agent-docs/CLAUDE.md +0 -7
  39. package/dist/builtin-taxonomy/$defs/board +0 -15
  40. package/dist/client/assets/imagemap-BHOOud3m.js +0 -1
  41. package/dist/client/assets/index-D7Uc99a8.css +0 -1
  42. package/dist/client/assets/index-DDCohDX6.js +0 -759
  43. package/dist/client/assets/map-DRUkC_pT.js +0 -1
  44. package/dist/client/assets/paged-CKzW-eq6.js +0 -1
  45. package/dist/client/assets/psd-CPdDl_Gy.js +0 -11
  46. package/dist/client/assets/tiff-D6Ts7aAc.js +0 -1
  47. package/dist/client/assets/xyflow-DWUupXDf.js +0 -23
  48. /package/dist/client/assets/{openable-CIGW-MKW.css → panzoom-CIGW-MKW.css} +0 -0
@@ -0,0 +1 @@
1
+ import{j as f,O as K,r as a,D as G,l as V,m as X,t as Y,b as J,u as _,a as Q,f as ee,e as te,c as ne}from"./index-0ALNONIF.js";import{u as re,L as p,f as oe,w as ae}from"./panzoom-BXEAw479.js";import{a as se}from"./paged-Cjy3svw2.js";const w=t=>Number(t)||0,ce=t=>t.replace(/[&<>"]/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[r]);function ie(t){return t.map(r=>{const o=V({name:r.label,color:r.color});return X(r.path)?`<span class="tagswatch" style="--tag:${o}" title="${ce(r.label)}"></span>`:Y(r.path,r.label,o)}).join("")}function le(t,r,o,n,c){if(!t||n<=0||c<=0)return;const s=document.createElement("canvas");s.width=n,s.height=c;const d=s.getContext("2d");if(d){d.drawImage(t,r,o,n,c,0,0,n,c);try{return s.toDataURL("image/png")}catch{return}}}function ue(t,r){const o=new Map;for(const n of t){if(n.selector?.type!=="rect")continue;const c=JSON.stringify(n.selector);let s=o.get(c);s||(s={x:w(n.selector.x),y:w(n.selector.y),w:w(n.selector.w),h:w(n.selector.h),title:n.description,color:ne(n),ann:te(n)?n:void 0,id:n.fragmentSlug?ee(r,n.fragmentSlug):void 0,tags:[]},o.set(c,s)),n.tag&&s.tags.push({path:n.tag.path,label:n.tag.name,color:n.tag.color})}return[...o.values()]}function fe({src:t,className:r,regions:o,onSelectRegion:n,onRegionClick:c,selectColor:s,fill:d=!0,onNavigate:S}){const y=a.useRef(null),m=a.useRef(S);m.current=S;const x=a.useRef(null),E=a.useRef(null),k=a.useRef(null),N=a.useRef({w:1,h:1}),L=a.useRef(n),I=a.useRef(c),M=a.useRef(s),[T,A]=a.useState(null),[H,W]=a.useState(0),D=JSON.stringify(o??[]),P=!!n;se(y,14,d,0),re(y,()=>x.current),a.useEffect(()=>{L.current=n,I.current=c,M.current=s}),a.useEffect(()=>{let i=!1,g=null;A(null);const e=new Image;return e.onload=()=>{if(i||!y.current)return;const h=e.naturalWidth||1,b=e.naturalHeight||1;N.current={w:h,h:b},k.current=e;const l=p.map(y.current,{crs:p.CRS.Simple,minZoom:-8,attributionControl:!1,zoomSnap:0}),R=[[0,0],[b,h]];p.imageOverlay(t,R).addTo(l),oe(l,R),E.current=p.layerGroup().addTo(l),x.current=l,g=ae(l,{color:()=>M.current?.()??G,onSelect:P?(u,v)=>{const{h:j}=N.current,C=u.getWest(),$=u.getEast(),q=u.getSouth(),U=u.getNorth(),Z=Math.round(C),z=Math.round(j-U),F=Math.round($-C),B=Math.round(U-q);L.current?.({type:"rect",x:Z,y:z,w:F,h:B},v,le(k.current,Z,z,F,B))}:void 0}),W(u=>u+1)},e.onerror=()=>{i||A("could not load image")},e.src=t,()=>{i=!0,g?.(),x.current?.remove(),x.current=null,E.current=null}},[t]);const O=a.useRef(new Map);return a.useEffect(()=>{const i=E.current;if(!i)return;i.clearLayers(),O.current.clear();const{h:g}=N.current;for(const e of o??[]){const h=e.color||G,b=[[g-e.y,e.x],[g-(e.y+e.h),e.x+e.w]],l=p.rectangle(b,{className:"yo-region",color:h,weight:3,fillColor:h,fillOpacity:.25});if(e.title&&l.bindTooltip(e.title),e.ann){const R=e.ann,u=v=>{p.DomEvent.stop(v),I.current?.(R,{x:v.originalEvent.clientX,y:v.originalEvent.clientY})};l.on("click",u),l.on("contextmenu",u)}if(l.addTo(i),e.tags&&e.tags.length){const R=p.latLng(g-(e.y+e.h),e.x),u=p.divIcon({className:"yo-region-tags",html:ie(e.tags),iconAnchor:[0,0]});p.marker(R,{icon:u,interactive:!1,keyboard:!1}).addTo(i).getElement()?.addEventListener("click",j=>{const C=j.target.closest("[data-tag-path]");C&&(j.stopPropagation(),m.current?.(C.getAttribute("data-tag-path")))})}e.id&&O.current.set(e.id,{rect:l,bounds:b})}},[D,H]),a.useEffect(()=>{const i=()=>{const g=x.current,e=decodeURIComponent(window.location.hash.slice(1)),h=e?O.current.get(e):void 0;!g||!h||(g.fitBounds(h.bounds,{maxZoom:g.getZoom(),padding:[40,40]}),h.rect.setStyle({weight:6,fillOpacity:.45}),window.setTimeout(()=>h.rect.setStyle({weight:3,fillOpacity:.25}),1e3))};return i(),window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[D,H]),f.jsxs(f.Fragment,{children:[T&&f.jsxs("div",{className:"error",children:["image: ",T]}),f.jsx("div",{ref:y,className:r+(P?" yo-selectable":"")})]})}function de({node:t,onNavigate:r}){const o=_(t.path),{openCreate:n,openEdit:c,palette:s,preview:d,color:S}=Q(o,t.path),y=ue(o.annotations,t.path);if(d?.selector.type==="rect"){const m=d.selector;y.push({x:w(m.x),y:w(m.y),w:w(m.w),h:w(m.h),color:d.color})}return f.jsxs("div",{className:"text",children:[t.title&&f.jsx("h1",{className:"chapter-title",children:t.title}),t.description&&f.jsx("p",{className:"chapter-subtitle",children:t.description}),f.jsx(fe,{src:J(t.path),regions:y,onSelectRegion:(m,x,E)=>n(m,x,void 0,E),onRegionClick:c,selectColor:()=>S,className:"filemap fileimagemap",onNavigate:r}),s]})}function ge({src:t,path:r,onNavigate:o}){return f.jsx(K,{path:r,onNavigate:o,title:"Open image on its own page",children:f.jsx("img",{className:"chunk-image",src:t,alt:"",loading:"lazy"})})}function ye({chunk:t,onNavigate:r}){return f.jsx(ge,{src:J(t.path),path:t.path,onNavigate:r})}export{ye as ImageChunk,de as ImageView,fe as PanZoomImage,ge as StaticImageChunk};