glassbox 0.4.2 → 0.4.3
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/dist/cli.js +216 -130
- package/dist/client/app.global.js +8 -14
- package/dist/client/history.global.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var h=Object.defineProperty;var k=(e,t,n)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var s=(e,t,n)=>k(e,typeof t!="symbol"?t+"":t,n);function c(e){let t=document.createElement("template");return t.innerHTML=String(e).trim(),t.content.firstElementChild}function p(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function m(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}var i=class{constructor(t){s(this,"__html");this.__html=t}toString(){return this.__html}};var y=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]);function d(e){return e==null||typeof e=="boolean"?"":e instanceof i?e.__html:typeof e=="string"?p(e):typeof e=="number"?String(e):Array.isArray(e)?e.map(d).join(""):""}var x={className:"class",htmlFor:"for",httpEquiv:"http-equiv",acceptCharset:"accept-charset",accessKey:"accesskey",autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",colSpan:"colspan",contentEditable:"contenteditable",crossOrigin:"crossorigin",dateTime:"datetime",defaultChecked:"checked",defaultValue:"value",encType:"enctype",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formNoValidate:"formnovalidate",formTarget:"formtarget",hrefLang:"hreflang",inputMode:"inputmode",maxLength:"maxlength",minLength:"minlength",noModule:"nomodule",noValidate:"novalidate",readOnly:"readonly",referrerPolicy:"referrerpolicy",rowSpan:"rowspan",spellCheck:"spellcheck",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",tabIndex:"tabindex",useMap:"usemap",strokeWidth:"stroke-width",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",fillOpacity:"fill-opacity",fillRule:"fill-rule",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",floodColor:"flood-color",floodOpacity:"flood-opacity",lightingColor:"lighting-color",stopColor:"stop-color",stopOpacity:"stop-opacity",shapeRendering:"shape-rendering",imageRendering:"image-rendering",textRendering:"text-rendering",pointerEvents:"pointer-events",vectorEffect:"vector-effect",paintOrder:"paint-order",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontStretch:"font-stretch",textAnchor:"text-anchor",textDecoration:"text-decoration",dominantBaseline:"dominant-baseline",alignmentBaseline:"alignment-baseline",baselineShift:"baseline-shift",letterSpacing:"letter-spacing",wordSpacing:"word-spacing",writingMode:"writing-mode",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",markerStart:"marker-start",markerMid:"marker-mid",markerEnd:"marker-end",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",spreadMethod:"spreadMethod",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",filterUnits:"filterUnits",primitiveUnits:"primitiveUnits",clipPathUnits:"clipPathUnits",xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",xlinkType:"xlink:type",xlinkRole:"xlink:role",xlinkTitle:"xlink:title",xlinkArcrole:"xlink:arcrole",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlns:"xmlns",xmlnsXlink:"xmlns:xlink",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",kernelMatrix:"kernelMatrix",surfaceScale:"surfaceScale",specularConstant:"specularConstant",specularExponent:"specularExponent",diffuseConstant:"diffuseConstant",pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",limitingConeAngle:"limitingConeAngle",tableValues:"tableValues"};function b(e,t){let n=x[e]??e;if(t==null||t===!1)return"";if(t===!0)return` ${n}`;let r;return t instanceof i?r=t.__html:typeof t=="number"?r=String(t):typeof t=="string"?r=m(t):r="",` ${n}="${r}"`}function o(e,t){if(typeof e=="function")return e(t);let{children:n,...r}=t,l=Object.entries(r).map(([u,g])=>b(u,g)).join("");if(y.has(e))return new i(`<${e}${l}>`);let f=n!=null?d(n):"";return new i(`<${e}${l}>${f}</${e}>`)}function S(){let e=document.querySelector(".bulk-actions");e&&!document.querySelector(".delete-review-btn")&&e.remove()}function a(e,t){let n=c(o("div",{className:"modal-overlay",children:o("div",{className:"modal",children:[o("h3",{children:"Confirm"}),o("p",{children:e}),o("div",{className:"modal-actions",children:[o("button",{className:"btn btn-sm modal-cancel",children:"Cancel"}),o("button",{className:"btn btn-sm btn-danger modal-confirm",children:"Delete"})]})]})}));n.querySelector(".modal-cancel").addEventListener("click",()=>{n.remove()}),n.querySelector(".modal-confirm").addEventListener("click",()=>{n.remove(),t()}),n.addEventListener("click",r=>{r.target===n&&n.remove()}),document.body.appendChild(n)}document.querySelectorAll(".delete-review-btn").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();let n=e.dataset.deleteId;a("Delete this review? This cannot be undone.",()=>{fetch("/api/review/"+encodeURIComponent(n),{method:"DELETE"}).then(r=>r.json()).then(()=>{e.closest(".history-item-link")?.parentElement?.remove(),S()})})})});document.getElementById("delete-completed-btn")?.addEventListener("click",()=>{a("Delete all completed reviews (except current)? This cannot be undone.",()=>{fetch("/api/reviews/delete-completed",{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(()=>{location.reload()})})});document.getElementById("delete-all-btn")?.addEventListener("click",()=>{a("Delete ALL reviews except the current one? This cannot be undone.",()=>{fetch("/api/reviews/delete-all",{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(()=>{location.reload()})})});})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glassbox",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "A local code review tool for AI-generated code. Review diffs, annotate lines, and export structured feedback that AI tools can act on.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"dev": "npm run build:client && tsx --tsconfig tsconfig.json src/cli.ts",
|
|
32
32
|
"build": "tsup",
|
|
33
|
-
"build:client": "mkdir -p dist/client && npx esbuild src/client/app.
|
|
33
|
+
"build:client": "mkdir -p dist/client && npx esbuild src/client/app.tsx --bundle --format=iife --outfile=dist/client/app.global.js --target=es2020 --jsx=automatic --jsx-import-source=#jsx --alias:#jsx/jsx-runtime=./src/jsx-runtime.ts && npx esbuild src/client/history.tsx --bundle --format=iife --outfile=dist/client/history.global.js --target=es2020 --minify --jsx=automatic --jsx-import-source=#jsx --alias:#jsx/jsx-runtime=./src/jsx-runtime.ts && npx sass src/client/styles.scss dist/client/styles.css --style compressed --no-source-map",
|
|
34
34
|
"dev:server": "npm run build:client && tsx --tsconfig tsconfig.json src/cli.ts --no-open --strict-port",
|
|
35
35
|
"tauri": "tauri",
|
|
36
36
|
"tauri:clean": "rm -rf src-tauri/target",
|