peanut-gallery 0.0.0-stage → 0.1.0
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.
- package/LICENSE +9 -0
- package/README.md +14 -2
- package/dist/anchor-inject.global.js +1 -0
- package/dist/chunk-WNZ3XQ2E.js +1912 -0
- package/dist/cli.js +192 -0
- package/dist/index.d.ts +512 -0
- package/dist/index.js +77 -0
- package/package.json +50 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anna Poirier
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# peanut-gallery
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Prototype feedback in, pull requests out. This CLI reads reviewer notes from GitHub issues (left with [`@pixelatlarge/peanut-gallery-widget`](https://www.npmjs.com/package/@pixelatlarge/peanut-gallery-widget)), has Claude group them into proposals and implement each one on its own branch, captures before/after screenshots, opens a PR per change and tallies reviewers' votes.
|
|
4
|
+
|
|
5
|
+
[Watch the explainer and try the demo](https://github.com/PixelAtLarge/peanut-gallery#readme).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -D peanut-gallery
|
|
9
|
+
npx peanut-gallery init # config, labels, widget snippet
|
|
10
|
+
npx peanut-gallery review # pull → interpret → confirm → apply
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Needs Node 20+, the GitHub CLI (`gh`) signed in, and Claude: a Claude Code login or `ANTHROPIC_API_KEY`. Spending is capped with `--budget`. The agent can only edit files inside its own worktree, never secrets, CI, dependency manifests or your design-system tokens. See the [security model](https://github.com/PixelAtLarge/peanut-gallery#security-model).
|
|
14
|
+
|
|
15
|
+
MIT licensed.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var h=80;function p(t){return(t??"").replace(/\s+/g," ").trim().slice(0,h)}function c(t,o){if(!o)return .5;let n=p(t.textContent);return n===o?1:n.includes(o)||o.includes(n)?.75:0}function l(t,o){let n=[];try{n=Array.from(o.querySelectorAll(t.selector))}catch{n=[]}if(n.length===1&&c(n[0],t.textFingerprint)>0)return{el:n[0],confidence:.95};if(n.length>1){let s=n.map(r=>({el:r,s:c(r,t.textFingerprint)})).sort((r,a)=>a.s-r.s);if(s[0].s>0)return{el:s[0].el,confidence:.8}}if(t.textFingerprint){let r=Array.from(o.getElementsByTagName(t.tag)).map(a=>({el:a,s:c(a,t.textFingerprint)})).sort((a,u)=>u.s-a.s);if(r[0]?.s>=.75)return{el:r[0].el,confidence:.6}}if(n.length===1)return{el:n[0],confidence:.5};let i=o.defaultView;if(i&&typeof o.elementFromPoint=="function"){let s=t.rect.x+t.rect.width/2-i.scrollX,r=t.rect.y+t.rect.height/2-i.scrollY,a=o.elementFromPoint(s,r);if(a)return{el:a,confidence:.3}}return{el:null,confidence:0}}var e={conifer:"#1E4D36",emerald:"#0F7B52",wasabi:"#719872",matcha:"#9CC98A",pistachio:"#CFE1B4",seaGlass:"#CDE2F2",hydrangea:"#A6BFE5",harbor:"#40648A",chambray:"#6C8EBD",prep:"#152A4A",sunnyside:"#EAC26C",linen:"#F6F3E4",white:"#FFFFFF",gull:"#A5B0B6",carbon:"#22272B"},f={bg:e.linen,surface:e.white,text:e.carbon,muted:"#5A6268",line:"#DEDCCB",heading:e.conifer,primary:e.emerald,primaryHover:"#006340",onPrimary:e.white,toolbar:e.conifer,toolbarButton:"#325D46",toolbarButtonHover:"#4E7660",onToolbar:e.white,accent:e.sunnyside,onAccent:e.carbon,highlight:e.emerald,highlightTint:"rgba(15, 123, 82, 0.10)",pinLow:e.gull,chip:e.seaGlass,onChip:e.prep,count:e.pistachio,onCount:e.conifer,ghost:"#EDEBE3",ghostHover:"#DBD8CA",link:e.prep,toast:e.prep,onToast:e.linen,danger:"#F6E3DF",onDanger:"#9B3426",success:e.emerald,successTint:"#D4F4E2",fontBody:'"Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontDisplay:'"Young Serif", Georgia, "Times New Roman", serif',fontMono:'"JetBrains Mono", ui-monospace, Menlo, Consolas, monospace'};window.__peanutGallery={locate(t,o=!1,n="#EAC26C"){let{el:i,confidence:s}=l(t,document);if(!i)return{rect:null,confidence:0};i.scrollIntoView({block:"center",inline:"center"});let r=i.getBoundingClientRect();return o&&(i.dataset.peanutGalleryOutline="1",i.style.outline=`3px solid ${n}`,i.style.outlineOffset="2px"),{rect:{x:r.left,y:r.top,width:r.width,height:r.height},confidence:s}},clearOutlines(){document.querySelectorAll("[data-peanut-gallery-outline]").forEach(t=>{t.style.outline="",t.style.outlineOffset="",delete t.dataset.peanutGalleryOutline})}};})();
|