yamlover 0.3.56 → 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 (46) hide show
  1. package/README.md +48 -5
  2. package/bin/yamlover.js +41 -4
  3. package/dist/agent-docs/AGENTS.md +20 -333
  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/decision +34 -0
  7. package/dist/builtin-taxonomy/$defs/edit +60 -0
  8. package/dist/builtin-taxonomy/$defs/edit-answer +21 -0
  9. package/dist/builtin-taxonomy/$defs/edit-batch +31 -0
  10. package/dist/builtin-taxonomy/$defs/envelope +169 -0
  11. package/dist/builtin-taxonomy/$defs/event +85 -0
  12. package/dist/builtin-taxonomy/$defs/link +58 -0
  13. package/dist/builtin-taxonomy/$defs/task +28 -19
  14. package/dist/builtin-taxonomy/$defs/workflow +3 -0
  15. package/dist/builtin-taxonomy/ontos/.yo/body.yo +7 -1
  16. package/dist/client/assets/{decoded-CytDRqwJ.js → decoded-Bj1qJCo_.js} +1 -1
  17. package/dist/client/assets/{djvu-Da-iyAV_.js → djvu-lnurzbzN.js} +1 -1
  18. package/dist/client/assets/{docx-CX_gHuMq.js → docx-DpN_PtM8.js} +1 -1
  19. package/dist/client/assets/{heic-Bf9423pJ.js → heic-BqJutS0N.js} +1 -1
  20. package/dist/client/assets/imagemap-rdhcPlWy.js +1 -0
  21. package/dist/client/assets/index-0ALNONIF.js +962 -0
  22. package/dist/client/assets/index-BiETmvLO.css +1 -0
  23. package/dist/client/assets/map-Btm4SlVs.js +1 -0
  24. package/dist/client/assets/paged-Cjy3svw2.js +1 -0
  25. package/dist/client/assets/{openable-D48EbC_P.js → panzoom-BXEAw479.js} +2 -2
  26. package/dist/client/assets/{pdf-Dj6UMm-B.js → pdf-DvC2sbDN.js} +1 -1
  27. package/dist/client/assets/psd-BKmCWsdC.js +11 -0
  28. package/dist/client/assets/{spreadsheet-BmqsAKDF.js → spreadsheet-Coy5sooG.js} +1 -1
  29. package/dist/client/assets/tiff-IcWiNdYs.js +1 -0
  30. package/dist/client/assets/video-YC-ZvXg7.js +1 -0
  31. package/dist/client/assets/xyflow-CFNcu5cT.js +23 -0
  32. package/dist/client/index.html +2 -2
  33. package/dist/server.js +8818 -5114
  34. package/dist/wire/openapi.yo +935 -0
  35. package/package.json +6 -1
  36. package/dist/agent-docs/CLAUDE.md +0 -7
  37. package/dist/builtin-taxonomy/$defs/board +0 -15
  38. package/dist/client/assets/imagemap-BaCsSWT2.js +0 -1
  39. package/dist/client/assets/index-CLllgDtO.js +0 -765
  40. package/dist/client/assets/index-CYdxG8JF.css +0 -1
  41. package/dist/client/assets/map-C0h_m0kt.js +0 -1
  42. package/dist/client/assets/paged-YrFta0Z1.js +0 -1
  43. package/dist/client/assets/psd-vtV8RE5t.js +0 -11
  44. package/dist/client/assets/tiff-DTjYlW1c.js +0 -1
  45. package/dist/client/assets/xyflow-DLSA3Qi6.js +0 -23
  46. /package/dist/client/assets/{openable-CIGW-MKW.css → panzoom-CIGW-MKW.css} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yamlover",
3
- "version": "0.3.56",
3
+ "version": "0.3.58",
4
4
  "description": "A local-first, editable knowledge graph for humans and LLMs: npx yamlover <root> serves a browser UI over a plain-text directory, with an editor, live queries, pointers, and an LLM-agent API.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,9 +34,13 @@
34
34
  ],
35
35
  "scripts": {
36
36
  "start": "node bin/yamlover.js",
37
+ "dev-run-examples": "node scripts/dev-run-examples.mjs",
38
+ "dev-run-docs": "node bin/yamlover.js ../../docs",
39
+ "dev-run-empty": "node scripts/dev-run-empty.mjs",
37
40
  "build": "node scripts/build.mjs",
38
41
  "prepack": "node scripts/build.mjs",
39
42
  "gen:edit-fixtures": "node scripts/gen-edit-fixtures.ts",
43
+ "gen:wire-fixtures": "node scripts/gen-wire-fixtures.mjs",
40
44
  "test": "vitest run",
41
45
  "test:watch": "vitest"
42
46
  },
@@ -60,6 +64,7 @@
60
64
  "@types/react": "^18.3.12",
61
65
  "@types/react-dom": "^18.3.1",
62
66
  "@vitejs/plugin-react": "^4.3.4",
67
+ "@webgpu/types": "^0.1.71",
63
68
  "@xyflow/react": "^12.11.2",
64
69
  "ag-psd": "^28.5.1",
65
70
  "esbuild": "^0.21.5",
@@ -1,7 +0,0 @@
1
- # Project guidance for AI agents
2
-
3
- This is a **yamlover** project. The authoring rules, the pointer/anchor syntax, and the rules for
4
- safely co-editing the tree while the yamlover web UI is running are in **`AGENTS.md`** — read it
5
- before editing any `.yo` / `.json5p` file.
6
-
7
- @AGENTS.md
@@ -1,15 +0,0 @@
1
- # $defs/board — marks a DIRECTORY of tasks as an agile/kanban board. Attach it to the directory's
2
- # `.yo/body.yo` overlay; the `workflow:` ref names which $defs/workflow supplies the
3
- # lanes (its states, in order). The board renderer then groups the directory's task members into
4
- # those lanes by each task's current state annotation, and a drag between lanes rewrites that
5
- # annotation (re-tags the state). format `x-yamlover-board`. Attach with !!<*yamlover:$defs:board>.
6
- # Spec: ../TICKETS.md §3.
7
- type: object
8
- format: x-yamlover-board
9
- members:
10
- workflow: *:: yamlover: $defs: onto # ref → the workflow that SEEDS the default lanes
11
- lanes: # optional saved lanes (the explorer board view's config):
12
- type: array # a sequence of lanes, each a list of tag refs — one tag
13
- others: # = a plain lane, several = per-tag SUBLANES stacked
14
- type: array # vertically. Edited via the lane headers, persisted by
15
- others: *:: yamlover: $defs: onto # POST /api/board.
@@ -1 +0,0 @@
1
- import{j as f,r as a,D as z,i as q,k as K,b as F,u as V,a as X,f as Y,e as _,c as Q}from"./index-CLllgDtO.js";import{O as ee,u as te,L as p,w as ne}from"./openable-D48EbC_P.js";import{a as oe}from"./paged-YrFta0Z1.js";const y=t=>Number(t)||0,B=t=>t.replace(/[&<>"]/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[o]);function re(t){return t.map(o=>{const s=q({name:o.label,color:o.color});return K(o.path)?`<span class="tagswatch" style="--tag:${s}" title="${B(o.label)}"></span>`:`<span class="tagtag" style="--tag:${s}">${B(o.label)}</span>`}).join("")}function se(t,o,s,n,c){if(!t||n<=0||c<=0)return;const r=document.createElement("canvas");r.width=n,r.height=c;const w=r.getContext("2d");if(w){w.drawImage(t,o,s,n,c,0,0,n,c);try{return r.toDataURL("image/png")}catch{return}}}function ae(t,o){const s=new Map;for(const n of t){if(n.selector?.type!=="rect")continue;const c=JSON.stringify(n.selector);let r=s.get(c);r||(r={x:y(n.selector.x),y:y(n.selector.y),w:y(n.selector.w),h:y(n.selector.h),title:n.description,color:Q(n),ann:_(n)?n:void 0,id:n.fragmentSlug?Y(o,n.fragmentSlug):void 0,tags:[]},s.set(c,r)),n.tag&&r.tags.push({path:n.tag.path,label:n.tag.name,color:n.tag.color})}return[...s.values()]}function ce({src:t,className:o,regions:s,onSelectRegion:n,onRegionClick:c,selectColor:r,fill:w=!0}){const d=a.useRef(null),l=a.useRef(null),R=a.useRef(null),b=a.useRef(null),S=a.useRef({w:1,h:1}),C=a.useRef(n),N=a.useRef(c),O=a.useRef(r),[k,I]=a.useState(null),[L,P]=a.useState(0),T=JSON.stringify(s??[]),M=!!n;oe(d,14,w),te(d,()=>l.current),a.useEffect(()=>{C.current=n,N.current=c,O.current=r}),a.useEffect(()=>{let i=!1,h=null;I(null);const e=new Image;return e.onload=()=>{if(i||!d.current)return;const m=e.naturalWidth||1,v=e.naturalHeight||1;S.current={w:m,h:v},b.current=e;const u=p.map(d.current,{crs:p.CRS.Simple,minZoom:-8,attributionControl:!1,zoomSnap:0}),x=[[0,0],[v,m]];p.imageOverlay(t,x).addTo(u),u.fitBounds(x),R.current=p.layerGroup().addTo(u),l.current=u,h=ne(u,{color:()=>O.current?.()??z,onSelect:M?(g,E)=>{const{h:G}=S.current,A=g.getWest(),J=g.getEast(),W=g.getSouth(),D=g.getNorth(),H=Math.round(A),U=Math.round(G-D),Z=Math.round(J-A),$=Math.round(D-W);C.current?.({type:"rect",x:H,y:U,w:Z,h:$},E,se(b.current,H,U,Z,$))}:void 0}),P(g=>g+1)},e.onerror=()=>{i||I("could not load image")},e.src=t,()=>{i=!0,h?.(),l.current?.remove(),l.current=null,R.current=null}},[t]);const j=a.useRef(new Map);return a.useEffect(()=>{const i=R.current;if(!i)return;i.clearLayers(),j.current.clear();const{h}=S.current;for(const e of s??[]){const m=e.color||z,v=[[h-e.y,e.x],[h-(e.y+e.h),e.x+e.w]],u=p.rectangle(v,{className:"yo-region",color:m,weight:3,fillColor:m,fillOpacity:.25});if(e.title&&u.bindTooltip(e.title),e.ann){const x=e.ann,g=E=>{p.DomEvent.stop(E),N.current?.(x,{x:E.originalEvent.clientX,y:E.originalEvent.clientY})};u.on("click",g),u.on("contextmenu",g)}if(u.addTo(i),e.tags&&e.tags.length){const x=p.latLng(h-(e.y+e.h),e.x),g=p.divIcon({className:"yo-region-tags",html:re(e.tags),iconAnchor:[0,0]});p.marker(x,{icon:g,interactive:!1,keyboard:!1}).addTo(i)}e.id&&j.current.set(e.id,{rect:u,bounds:v})}},[T,L]),a.useEffect(()=>{const i=()=>{const h=l.current,e=decodeURIComponent(window.location.hash.slice(1)),m=e?j.current.get(e):void 0;!h||!m||(h.fitBounds(m.bounds,{maxZoom:h.getZoom(),padding:[40,40]}),m.rect.setStyle({weight:6,fillOpacity:.45}),window.setTimeout(()=>m.rect.setStyle({weight:3,fillOpacity:.25}),1e3))};return i(),window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[T,L]),f.jsxs(f.Fragment,{children:[k&&f.jsxs("div",{className:"error",children:["image: ",k]}),f.jsx("div",{ref:d,className:o+(M?" yo-selectable":"")})]})}function fe({node:t}){const o=V(t.path),{openCreate:s,openEdit:n,palette:c,preview:r,color:w}=X(o,t.path),d=ae(o.annotations,t.path);if(r?.selector.type==="rect"){const l=r.selector;d.push({x:y(l.x),y:y(l.y),w:y(l.w),h:y(l.h),color:r.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(ce,{src:F(t.path),regions:d,onSelectRegion:(l,R,b)=>s(l,R,void 0,b),onRegionClick:n,selectColor:()=>w,className:"filemap fileimagemap"}),c]})}function le({src:t,path:o,onNavigate:s}){return f.jsx(ee,{path:o,onNavigate:s,title:"Open image on its own page",children:f.jsx("img",{className:"chunk-image",src:t,alt:"",loading:"lazy"})})}function he({chunk:t,onNavigate:o}){return f.jsx(le,{src:F(t.path),path:t.path,onNavigate:o})}export{he as ImageChunk,fe as ImageView,ce as PanZoomImage,le as StaticImageChunk};