forge-terminal 0.5.0 → 0.5.2
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/README.md +18 -11
- package/dist/chunks/{about-credits-5UQU5WHE.js → about-credits-VZQJAWG3.js} +1 -1
- package/dist/chunks/args-FZXEZBPA.js +3 -0
- package/dist/chunks/{available-M6Z62OWE.js → available-TNMISSBA.js} +1 -1
- package/dist/chunks/{boot-MGR26CBU.js → boot-NYKO3NLR.js} +1 -1
- package/dist/chunks/{catalog-VPSTQTFD.js → catalog-FMHWWMUX.js} +1 -1
- package/dist/chunks/chunk-2AFHW44W.js +36 -0
- package/dist/chunks/{chunk-P4RAYEM7.js → chunk-63ZZRDSV.js} +1 -1
- package/dist/chunks/{chunk-63ZK5SRQ.js → chunk-7I2OSTBX.js} +1 -1
- package/dist/chunks/chunk-7KYO62XK.js +3 -0
- package/dist/chunks/{chunk-DZOBIUV6.js → chunk-BIBDLXCG.js} +1 -1
- package/dist/chunks/{chunk-G46QQBT3.js → chunk-BROTSQXG.js} +1 -1
- package/dist/chunks/chunk-CVNYUROW.js +3 -0
- package/dist/chunks/chunk-CW2Y2KDQ.js +3 -0
- package/dist/chunks/chunk-DYIATUFE.js +3 -0
- package/dist/chunks/{chunk-SK2UZ25Y.js → chunk-EITGK5OI.js} +1 -1
- package/dist/chunks/chunk-GRWOJKQB.js +3 -0
- package/dist/chunks/{chunk-HOZ6XGQQ.js → chunk-GT6U6HV3.js} +2 -2
- package/dist/chunks/{chunk-JMBEZPYC.js → chunk-HWCXNKIN.js} +1 -1
- package/dist/chunks/chunk-I25E2XDH.js +3 -0
- package/dist/chunks/chunk-IED6VBE6.js +3 -0
- package/dist/chunks/{chunk-ZZZAPVKM.js → chunk-ITW5FG4K.js} +1 -1
- package/dist/chunks/{chunk-3GJ7GV3V.js → chunk-IVBSXPNS.js} +2 -2
- package/dist/chunks/chunk-J2UQI544.js +4 -0
- package/dist/chunks/{chunk-THDAQBQ3.js → chunk-J6AZTW62.js} +1 -1
- package/dist/chunks/chunk-JGJU3AW5.js +3 -0
- package/dist/chunks/{chunk-LVYQVJOF.js → chunk-K6ERQTUQ.js} +1 -1
- package/dist/chunks/chunk-KMLT45OJ.js +66 -0
- package/dist/chunks/{chunk-K7KKCR7V.js → chunk-LA5JVBFP.js} +1 -1
- package/dist/chunks/chunk-M6LYLTFH.js +3 -0
- package/dist/chunks/{chunk-PE5LAYGF.js → chunk-MF3KKEFB.js} +1 -1
- package/dist/chunks/chunk-O7DK3GJT.js +3 -0
- package/dist/chunks/chunk-Q7ERPAG3.js +7 -0
- package/dist/chunks/{chunk-Y7LOIHFU.js → chunk-R24JCIZ5.js} +1 -1
- package/dist/chunks/{chunk-XBOMWF34.js → chunk-RK3WGALB.js} +1 -1
- package/dist/chunks/chunk-RXI6QLNY.js +82 -0
- package/dist/chunks/chunk-SNFUGJ3M.js +3 -0
- package/dist/chunks/chunk-T37DEXUI.js +3 -0
- package/dist/chunks/chunk-TARDT6LZ.js +55 -0
- package/dist/chunks/{chunk-EKTUUKDP.js → chunk-TYWGB767.js} +1 -1
- package/dist/chunks/chunk-VLVNA4T3.js +3 -0
- package/dist/chunks/{chunk-YINYF6C7.js → chunk-VTA6Z45X.js} +1 -1
- package/dist/chunks/{chunk-WC6SJN5Y.js → chunk-W2QJA73Q.js} +1 -1
- package/dist/chunks/{chunk-PPR7B5AR.js → chunk-XPATZLEH.js} +1 -1
- package/dist/chunks/chunk-XUKYIVJC.js +3 -0
- package/dist/chunks/{chunk-RMD7F3QX.js → chunk-YK26E3OX.js} +1 -1
- package/dist/chunks/{chunk-F34DPQFQ.js → chunk-ZFLFBNIK.js} +1 -1
- package/dist/chunks/{chunk-OK7XOZFO.js → chunk-ZHNPBRCX.js} +1 -1
- package/dist/chunks/{chunk-C4UCCBCX.js → chunk-ZOQA3JAR.js} +1 -1
- package/dist/chunks/clip-command-SLSAWJF4.js +3 -0
- package/dist/chunks/clipboard-7KSZNWWT.js +3 -0
- package/dist/chunks/colour-LMZO2EE6.js +3 -0
- package/dist/chunks/command-DMGGGAPS.js +3 -0
- package/dist/chunks/config-command-6GXRV627.js +3 -0
- package/dist/chunks/continue-editing-4W3XWWCE.js +3 -0
- package/dist/chunks/decoded-SMEHAVCH.js +3 -0
- package/dist/chunks/{entry-TSLQHDP7.js → entry-TV4FJQDR.js} +2 -2
- package/dist/chunks/execute-NEDE4JM6.js +3 -0
- package/dist/chunks/extensions-4UJRQ32J.js +3 -0
- package/dist/chunks/{extensions-command-25JOL47P.js → extensions-command-VROVGVD4.js} +1 -1
- package/dist/chunks/{ffmpeg-3CJ6C37W.js → ffmpeg-OIVMTPY7.js} +1 -1
- package/dist/chunks/image-J5WDYORX.js +3 -0
- package/dist/chunks/install-5XLVERRR.js +3 -0
- package/dist/chunks/install-C6XNONFF.js +3 -0
- package/dist/chunks/launch-5JMWS5CI.js +17 -0
- package/dist/chunks/lock-AFVXUDOM.js +3 -0
- package/dist/chunks/manager-T3WDLUKR.js +4 -0
- package/dist/chunks/{needed-MYXIUZI4.js → needed-YU5BPYD6.js} +1 -1
- package/dist/chunks/notify-LTV7F634.js +3 -0
- package/dist/chunks/{own-WNA6BFYL.js → own-OJAQ5FRQ.js} +1 -1
- package/dist/chunks/{paths-EOYKOUBC.js → paths-6OENILJ4.js} +1 -1
- package/dist/chunks/pdfium-7HNCQ3K3.js +3 -0
- package/dist/chunks/preset-command-VP5RAXBG.js +3 -0
- package/dist/chunks/registry-E5PNQWOZ.js +3 -0
- package/dist/chunks/run-WSETTQXP.js +3 -0
- package/dist/chunks/{server-KKF3XBQG.js → server-EFNTD7ZW.js} +16 -16
- package/dist/chunks/{theme-NAWQ77WF.js → theme-NF3LQHPV.js} +1 -1
- package/dist/chunks/transcribe-CQFHXBTV.js +3 -0
- package/dist/chunks/transcribe-command-ZXB3JJFZ.js +3 -0
- package/dist/chunks/update-command-DJLYU6AB.js +3 -0
- package/dist/chunks/{update-note-FRMHMUMD.js → update-note-CJ5XYKYH.js} +1 -1
- package/dist/chunks/watch-command-ZNMO4SF7.js +3 -0
- package/dist/index.js +13 -13
- package/dist/third-party-licenses.txt +1 -1
- package/package.json +11 -35
- package/dist/chunks/args-QKAIL3E4.js +0 -3
- package/dist/chunks/chunk-37P6QZ5Q.js +0 -3
- package/dist/chunks/chunk-CKZBBDAW.js +0 -3
- package/dist/chunks/chunk-GSK2A3TN.js +0 -3
- package/dist/chunks/chunk-HKINXTUW.js +0 -3
- package/dist/chunks/chunk-I6754KTB.js +0 -36
- package/dist/chunks/chunk-NDECMPOM.js +0 -3
- package/dist/chunks/chunk-NXJGO66P.js +0 -3
- package/dist/chunks/chunk-SNDFMJIX.js +0 -3
- package/dist/chunks/chunk-TL5MACSF.js +0 -3
- package/dist/chunks/chunk-V3I6DSF4.js +0 -3
- package/dist/chunks/chunk-W6SY5PPG.js +0 -4
- package/dist/chunks/chunk-WIPP5TWQ.js +0 -3
- package/dist/chunks/chunk-XRI5XKEB.js +0 -66
- package/dist/chunks/chunk-ZRHYGR2L.js +0 -134
- package/dist/chunks/clip-command-R2NKW4TI.js +0 -3
- package/dist/chunks/clipboard-GICOXMMN.js +0 -3
- package/dist/chunks/colour-APVBMEJQ.js +0 -3
- package/dist/chunks/command-GYCYLUHN.js +0 -3
- package/dist/chunks/config-command-6YUMMZF3.js +0 -3
- package/dist/chunks/continue-editing-QE5RRIMG.js +0 -3
- package/dist/chunks/decoded-UNCEUPNW.js +0 -3
- package/dist/chunks/execute-S5WN34PS.js +0 -3
- package/dist/chunks/extensions-XI5R74TS.js +0 -3
- package/dist/chunks/image-QSTDWHJ4.js +0 -3
- package/dist/chunks/install-IDUHZTTS.js +0 -3
- package/dist/chunks/install-L5C2UT6M.js +0 -3
- package/dist/chunks/launch-LFFWVTFE.js +0 -17
- package/dist/chunks/lock-PTQUMNYX.js +0 -3
- package/dist/chunks/manager-CQ6NNQY4.js +0 -4
- package/dist/chunks/pdfium-WFGSET5S.js +0 -3
- package/dist/chunks/preset-command-HMOFTZSG.js +0 -3
- package/dist/chunks/registry-4IOXO6DT.js +0 -3
- package/dist/chunks/run-HGZVOXRW.js +0 -5
- package/dist/chunks/transcribe-Q5NLWSSR.js +0 -3
- package/dist/chunks/transcribe-command-2L7F7MCG.js +0 -3
- package/dist/chunks/update-command-JCTCRPCS.js +0 -3
- package/dist/chunks/watch-command-XCCMIQIM.js +0 -3
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{r as F}from"./chunk-DZOBIUV6.js";import{execFile as vn}from"node:child_process";import{chmodSync as le,existsSync as Ke,mkdirSync as pe,readdirSync as Ge,readFileSync as H,rmdirSync as Mn,rmSync as $,writeFileSync as In}from"node:fs";import{dirname as U,join as u}from"node:path";var tn={convert:"#55c7d9",compress:"#79c98b",edit:"#b39ae8",pdf:"#ff6b4a"},rn="#55c7d9",on="#a68ce0",sn=4/5,an=(e,n,t,r)=>`<path fill="${r}" d="M${e} ${n}h${4*t}v${t}h${-3*t}v${t}h${2*t}v${t}h${-2*t}v${2*t}h${-t}z"/>`;function cn(e,n){let t=n<=20,r=t?3:4,i=t?6:4.6,o=t?51:51.5,c=Array.from({length:r},(g,w)=>o-(r-1-w)*i).map(g=>`<line x1="${g}" y1="66" x2="${g+66*sn}" y2="0"/>`).join(""),f=e==="forge"?"url(#w)":tn[e];return`<svg width="${n}" height="${n}" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="w" gradientUnits="userSpaceOnUse" x1="34" y1="0" x2="62" y2="0"><stop offset="0" stop-color="${rn}"/><stop offset="1" stop-color="${on}"/></linearGradient><clipPath id="c"><rect width="64" height="64" rx="14"/></clipPath><clipPath id="i"><rect x="1.5" y="1.5" width="61" height="61" rx="12.5"/></clipPath></defs><g clip-path="url(#c)"><rect width="64" height="64" fill="#1e1e1e"/><g clip-path="url(#i)" stroke="${f}" stroke-width="${t?3.6:2.4}">${c}</g>${an(16,12,8,"#e7e7e7")}</g><rect x=".75" y=".75" width="62.5" height="62.5" rx="13.5" fill="none" stroke="#3a3a3a" stroke-width="1.5"/></svg>`}async function S(e,n){let{default:t}=await import("sharp");return t(Buffer.from(cn(e,n))).png().toBuffer()}function he(e){let n=Buffer.alloc(6);n.writeUInt16LE(0,0),n.writeUInt16LE(1,2),n.writeUInt16LE(e.length,4);let t=6+16*e.length,r=e.map(({size:i,png:o})=>{let s=Buffer.alloc(16);return s[0]=i>=256?0:i,s[1]=i>=256?0:i,s.writeUInt16LE(1,4),s.writeUInt16LE(32,6),s.writeUInt32LE(o.length,8),s.writeUInt32LE(t,12),t+=o.length,s});return Buffer.concat([n,...r,...e.map(i=>i.png)])}function y(e){let n=[{action:"open",label:"Open Forge",kinds:["image","folder"],window:!0,paint:"forge"},{action:"convert",label:"Convert in Forge",kinds:["image","folder"],window:!0,paint:"convert"},{action:"compress",label:"Compress in Forge",kinds:["image","folder"],window:!0,paint:"compress"},{action:"sharpen",label:"Sharpen in Forge",kinds:["image"],window:!1,paint:"edit"},{action:"open-pdf",label:"Open in Forge",kinds:["pdf"],window:!0,paint:"pdf"}],t=(e.presets??[]).map(r=>({action:"preset",preset:r,label:`${r} in Forge`,kinds:["image"],window:!1,paint:"forge"}));return[...e.sharpen?n:n.filter(r=>r.action!=="sharpen"),...t]}var $e=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");function B(e,n){if(typeof e=="string")return`${n}<string>${$e(e)}</string>`;if(typeof e=="number")return`${n}<integer>${e}</integer>`;if(typeof e=="boolean")return`${n}<${e}/>`;if(Array.isArray(e))return`${n}<array>
|
|
4
|
-
${e.map(r=>B(r,`${n} `)).join(`
|
|
5
|
-
`)}
|
|
6
|
-
${n}</array>`;let t=Object.entries(e).map(([r,i])=>`${n} <key>${$e(r)}</key>
|
|
7
|
-
${B(i,`${n} `)}`);return t.length===0?`${n}<dict/>`:`${n}<dict>
|
|
8
|
-
${t.join(`
|
|
9
|
-
`)}
|
|
10
|
-
${n}</dict>`}var ye=e=>`<?xml version="1.0" encoding="UTF-8"?>
|
|
11
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
12
|
-
<plist version="1.0">
|
|
13
|
-
${B(e,"")}
|
|
14
|
-
</plist>
|
|
15
|
-
`,un={image:"public.image",folder:"public.folder",pdf:"com.adobe.pdf"};function fn(e){return e.length===1&&e[0]==="image"?"com.apple.Automator.fileSystemObject.image":e.length===1&&e[0]==="pdf"?"com.apple.Automator.fileSystemObject.PDF":e.length===1&&e[0]==="folder"?"com.apple.Automator.fileSystemObject.folder":"com.apple.Automator.fileSystemObject"}var a=e=>`'${e.replace(/'/g,"'\\''")}'`,j="forge",xe=e=>e.preset===void 0?`com.forge-terminal.menu.${e.action}`:`com.forge-terminal.menu.preset.${e.preset}`,we="com.forge-terminal.menu.",Se="runWorkflowAsService",E=e=>`${xe(e)} - ${e.label} - ${Se}`,ln=`ObjC.import('Foundation')
|
|
16
|
-
function run(argv) {
|
|
17
|
-
const domain = argv[0]
|
|
18
|
-
const defaults = $.NSUserDefaults.standardUserDefaults
|
|
19
|
-
const or = (v) => (v.isNil() ? $.NSDictionary.dictionary : v)
|
|
20
|
-
const all = $.NSMutableDictionary.dictionaryWithDictionary(or(defaults.persistentDomainForName(domain)))
|
|
21
|
-
const status = $.NSMutableDictionary.dictionaryWithDictionary(or(all.objectForKey('NSServicesStatus')))
|
|
22
|
-
const on = { presentation_modes: { ContextMenu: true, FinderPreview: true, ServicesMenu: true, TouchBar: true } }
|
|
23
|
-
for (const arg of argv.slice(1)) {
|
|
24
|
-
const key = arg.slice(1)
|
|
25
|
-
if (arg[0] === '+') status.setObjectForKey($(on), key)
|
|
26
|
-
else status.removeObjectForKey(key)
|
|
27
|
-
}
|
|
28
|
-
all.setObjectForKey(status, 'NSServicesStatus')
|
|
29
|
-
defaults.setPersistentDomainForName(all, domain)
|
|
30
|
-
}`;function D(e){return[e.osascript??"/usr/bin/osascript",["-l","JavaScript","-e",ln,e.domain??"pbs",...e.on.map(n=>`+${n}`),...e.off.map(n=>`-${n}`)]]}function _(e,n){let t=ye({CFBundleDevelopmentRegion:"English",CFBundleIdentifier:xe(e),CFBundleInfoDictionaryVersion:"6.0",CFBundleName:e.label,CFBundlePackageType:"BNDL",CFBundleShortVersionString:"1.0",CFBundleVersion:"1",NSServices:[{NSIconName:j,NSMenuItem:{default:e.label},NSMessage:Se,NSRequiredContext:{NSApplicationIdentifier:"com.apple.finder"},NSSendFileTypes:e.kinds.map(s=>un[s])}]}),r=e.preset===void 0?"":` ${a(e.preset)}`,i=`${a(n)} ${e.action}${r} "$@"`,o=ye({AMApplicationBuild:"521",AMApplicationVersion:"2.10",AMDocumentVersion:"2",actions:[{action:{AMAccepts:{Container:"List",Optional:!0,Types:["com.apple.cocoa.path"]},AMActionVersion:"2.0.3",AMApplication:["Automator"],AMParameterProperties:{COMMAND_STRING:{},CheckedForUserDefaultShell:{},inputMethod:{},shell:{},source:{}},AMProvides:{Container:"List",Types:["com.apple.cocoa.string"]},ActionBundlePath:"/System/Library/Automator/Run Shell Script.action",ActionName:"Run Shell Script",ActionParameters:{COMMAND_STRING:i,CheckedForUserDefaultShell:!0,inputMethod:1,shell:"/bin/zsh",source:""},BundleIdentifier:"com.apple.RunShellScript",CFBundleVersion:"2.0.3",CanShowSelectedItemsWhenRun:!1,CanShowWhenRun:!0,Category:["AMCategoryUtilities"],"Class Name":"RunShellScriptAction",InputUUID:"7A1F3C2E-0F4B-4E8A-9C61-5B2D8E4F1A01",OutputUUID:"7A1F3C2E-0F4B-4E8A-9C61-5B2D8E4F1A02",UUID:"7A1F3C2E-0F4B-4E8A-9C61-5B2D8E4F1A03",UnlocalizedApplications:["Automator"]},isViewVisible:!0}],connectors:{},workflowMetaData:{serviceApplicationBundleID:"com.apple.finder",serviceApplicationPath:"/System/Library/CoreServices/Finder.app",serviceInputTypeIdentifier:fn(e.kinds),serviceOutputTypeIdentifier:"com.apple.Automator.nothing",serviceProcessesInput:!1,workflowTypeIdentifier:"com.apple.Automator.servicesMenu"}});return{name:`${e.label}.workflow`,files:{"Contents/Info.plist":t,"Contents/document.wflow":o,"Contents/Resources/document.wflow":o}}}import{execFile as xn}from"node:child_process";import{accessSync as pn,constants as mn}from"node:fs";import{isAbsolute as De,join as p}from"node:path";var d="forge-terminal-menu";function ve(e){let n=r=>r&&De(r)?r:void 0,t=(e.xdgConfigDirs??"").split(":").filter(r=>De(r));return{dataHome:n(e.xdgDataHome)??p(e.home,".local","share"),configHome:n(e.xdgConfigHome)??p(e.home,".config"),configDirs:t.length>0?t:["/etc/xdg"]}}function K(e,n=process.env.PATH){for(let t of(n??"").split(":"))if(t!=="")try{return pn(p(t,e),mn.X_OK),!0}catch{}return!1}var Me={image:"image/*",folder:"inode/directory",pdf:"application/pdf"},gn=e=>e.map(n=>`${Me[n]};`).join(""),P=e=>`${e.paint}.png`,h=e=>p(e.dataHome,"nautilus","scripts","Forge"),b=e=>e.preset===void 0?e.action:`preset-${e.preset}`,k=e=>e.preset===void 0?e.action:`preset ${e.preset}`,G=e=>e.label;function Ie(e,n){return`#!/bin/sh
|
|
31
|
-
# ${d}: Forge's right-click menu, written by Forge. \`forge menu remove\` takes it out.
|
|
32
|
-
if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
|
|
33
|
-
IFS='
|
|
34
|
-
'
|
|
35
|
-
set -f
|
|
36
|
-
set -- $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
|
|
37
|
-
fi
|
|
38
|
-
exec ${a(n)} ${k(e)} "$@"
|
|
39
|
-
`}var I=e=>p(e.dataHome,"nemo","actions"),W=(e,n)=>`forge-${e.preset===void 0?n.indexOf(e.action)+1:n.length+1}-${b(e)}.nemo_action`,M=e=>e.replace(/%/g,"%%");function Ne(e,n){return`[Nemo Action]
|
|
40
|
-
# ${d}: Forge's right-click menu, written by Forge. \`forge menu remove\` takes it out.
|
|
41
|
-
Name=${M(e.label)}
|
|
42
|
-
Comment=${M(e.label)}
|
|
43
|
-
Exec=${M(a(n))} ${k(e)} %F
|
|
44
|
-
Selection=notnone
|
|
45
|
-
Mimetypes=${gn(e.kinds)}
|
|
46
|
-
`}var A=e=>p(e.dataHome,"kio","servicemenus"),V=e=>`forge-${e}.desktop`,X=["image","folder","pdf"],dn=e=>M(`"${e.replace(/[\\"`$]/g,"\\$&")}"`).replace(/\\/g,"\\\\");function Fe(e,n,t){let r=n.filter(c=>c.kinds.includes(e));if(r.length===0)return;let i=r.length>1,o=["[Desktop Entry]",`# ${d}: Forge's right-click menu, written by Forge. \`forge menu remove\` takes it out.`,"Type=Service","ServiceTypes=KonqPopupMenu/Plugin","X-KDE-ServiceTypes=KonqPopupMenu/Plugin",`MimeType=${Me[e]};`,`Actions=${r.map(c=>`${b(c)};`).join("")}`,"X-KDE-Priority=TopLevel",...i?["X-KDE-Submenu=Forge",`Icon=${p(t.menuDir,"forge.png")}`]:[]],s=r.map(c=>["",`[Desktop Action ${b(c)}]`,`Name=${c.label}`,`Icon=${p(t.menuDir,P(c))}`,`Exec=${dn(t.launcher)} ${k(c)} %F`].join(`
|
|
47
|
-
`));return`${[...o,...s].join(`
|
|
48
|
-
`)}
|
|
49
|
-
`}var C=e=>p(e.configHome,"Thunar","uca.xml"),Ee=e=>e.configDirs.map(n=>p(n,"Thunar","uca.xml")),be=`<?xml version="1.0" encoding="UTF-8"?>
|
|
50
|
-
<actions>
|
|
51
|
-
</actions>
|
|
52
|
-
`,hn=e=>`${d}-${b(e)}`,v=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),$n={image:{patterns:["*"],type:"image-files"},folder:{patterns:["*"],type:"directories"},pdf:{patterns:["*.pdf","*.PDF"],type:"other-files"}};function Pe(e,n){return e.map(t=>{let r=t.kinds.map(s=>$n[s]),i=[...new Set(r.flatMap(s=>s.patterns))],o=i.includes("*")?["*"]:i;return["<action>",` <icon>${v(p(n.menuDir,P(t)))}</icon>`,` <name>${v(t.label)}</name>`,` <submenu>${t.kinds.includes("pdf")?"":"Forge"}</submenu>`,` <unique-id>${hn(t)}</unique-id>`,` <command>${v(M(a(n.launcher)))} ${k(t)} %F</command>`,` <description>${v(t.label)}</description>`," <range></range>",` <patterns>${v(o.join(";"))}</patterns>`,...r.map(s=>` <${s.type}/>`),"</action>"].join(`
|
|
53
|
-
`)}).map(t=>`${t}
|
|
54
|
-
`).join("")}var yn=/[ \t]*<action>[\s\S]*?<\/action>[ \t]*\r?\n?/g;function J(e){return e.replace(yn,n=>n.includes(`<unique-id>${d}-`)?"":n)}function q(e,n){let t=J(e),r=t.lastIndexOf("</actions>");if(r===-1||!/<actions>/.test(t))return;let i=t.lastIndexOf(`
|
|
55
|
-
`,r)+1;return/^[ \t]*$/.test(t.slice(i,r))&&(r=i),`${t.slice(0,r)}${n}${t.slice(r)}`}var ke=(e,n,t)=>K("thunar",n)||t(p(e.configHome,"Thunar"));var Y="ForgeTerminal.Forge",Ae=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Q=e=>e.replace(/['‘’‚‛]/g,"$&$&"),Ce=Q;function Z(e,n){return["[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null","[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] > $null","$x = New-Object Windows.Data.Xml.Dom.XmlDocument",`$x.LoadXml('<toast><visual><binding template="ToastText02"><text id="1">${Ce(Ae(e))}</text><text id="2">${Ce(Ae(n))}</text></binding></visual></toast>')`,`[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('${Y}').Show([Windows.UI.Notifications.ToastNotification]::new($x))`].join("; ")}function wn(e,n,t=process.platform){return t==="win32"?["powershell.exe",["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-Command",Z(e,n)]]:["/usr/bin/osascript",["-e","on run argv","-e","display notification (item 2 of argv) with title (item 1 of argv)","-e","end run",e,n]]}var T=e=>`"${e.replace(/[\\"]/g,"\\$&").replace(/\n/g,"\\n")}"`;function Sn(e,n,t={}){let r=t.has??(i=>K(i));if(r("notify-send"))return["notify-send",["--app-name=Forge",...t.icon?[`--icon=${t.icon}`]:[],"--",e,n]];if(r("gdbus"))return["gdbus",["call","--session","--dest","org.freedesktop.Notifications","--object-path","/org/freedesktop/Notifications","--method","org.freedesktop.Notifications.Notify",T("Forge"),"0",T(t.icon??""),T(e),T(n),"[]","{}","-1"]]}function _n(e,n,t=process.platform,r={}){let i=t==="linux"?Sn(e,n,r):wn(e,n,t);return new Promise(o=>{if(i===void 0)return o();try{xn(i[0],i[1],{timeout:1e4,windowsHide:!0},()=>o())}catch{o()}})}var z="Forge was uninstalled",ee="Its menu items are removed.",Te="Forge could not start",Oe="Run forge in a terminal once to set its menu up again.";function Le(e){let{osascript:n,pbs:t}=e.tools??{osascript:"/usr/bin/osascript",pbs:"/System/Library/CoreServices/pbs"},r=[e.node,...e.execArgv,e.forge].map(a).join(" "),[i,o]=D({on:[],off:e.services,osascript:n}),s=[i,...o].map(a).join(" "),c=(f,g)=>`${a(n)} -e 'display notification "${g}" with title "${f}"'`;return`#!/bin/sh
|
|
56
|
-
# Forge's right-click menu. Rewritten by Forge whenever it sets the menu up.
|
|
57
|
-
if [ ! -f ${a(e.forge)} ]; then
|
|
58
|
-
# Forge is gone: take its menu with it, and say so once.
|
|
59
|
-
${e.bundles.map(f=>` rm -rf ${a(f)}`).join(`
|
|
60
|
-
`)}
|
|
61
|
-
rm -rf ${a(e.menuDir)}
|
|
62
|
-
${s}
|
|
63
|
-
${a(t)} -update
|
|
64
|
-
${c(z,ee)}
|
|
65
|
-
exit 0
|
|
66
|
-
fi
|
|
67
|
-
if [ ! -x ${a(e.node)} ]; then
|
|
68
|
-
${c(Te,Oe)}
|
|
69
|
-
exit 1
|
|
70
|
-
fi
|
|
71
|
-
${e.xdgConfigHome===void 0?"":`export XDG_CONFIG_HOME=${a(e.xdgConfigHome)}
|
|
72
|
-
`}exec ${r} menu run "$@"
|
|
73
|
-
`}function Ue(e){let n=e.xdgConfigHome===void 0?{}:{XDG_CONFIG_HOME:e.xdgConfigHome};return`// Forge's right-click menu. Rewritten by Forge whenever it sets the menu up.
|
|
74
|
-
import { execFileSync, spawn } from 'node:child_process'
|
|
75
|
-
import { existsSync, rmSync } from 'node:fs'
|
|
76
|
-
|
|
77
|
-
const FORGE = ${JSON.stringify(e.forge)}
|
|
78
|
-
const ARGS = ${JSON.stringify(e.execArgv)}
|
|
79
|
-
const MENU = ${JSON.stringify(e.menuDir)}
|
|
80
|
-
const KEYS = ${JSON.stringify(e.keys)}
|
|
81
|
-
const ENV = ${JSON.stringify(n)}
|
|
82
|
-
|
|
83
|
-
if (existsSync(FORGE)) {
|
|
84
|
-
const child = spawn(process.execPath, [...ARGS, FORGE, 'menu', 'run', ...process.argv.slice(2)], {
|
|
85
|
-
stdio: 'inherit',
|
|
86
|
-
windowsHide: true,
|
|
87
|
-
env: { ...process.env, ...ENV },
|
|
88
|
-
})
|
|
89
|
-
child.on('exit', (code) => process.exit(code ?? 0))
|
|
90
|
-
} else {
|
|
91
|
-
// Forge is gone: say so while its app ID still exists, then take the menu with it.
|
|
92
|
-
try {
|
|
93
|
-
execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', ${JSON.stringify(Z(z,ee))}], { windowsHide: true })
|
|
94
|
-
} catch {}
|
|
95
|
-
for (const key of KEYS) {
|
|
96
|
-
try {
|
|
97
|
-
execFileSync('reg.exe', ['delete', key, '/f'], { windowsHide: true, stdio: 'ignore' })
|
|
98
|
-
} catch {}
|
|
99
|
-
}
|
|
100
|
-
rmSync(MENU, { recursive: true, force: true })
|
|
101
|
-
}
|
|
102
|
-
`}function Dn(){return`say() {
|
|
103
|
-
if command -v notify-send >/dev/null 2>&1; then
|
|
104
|
-
notify-send --app-name=Forge -- "$1" "$2" >/dev/null 2>&1
|
|
105
|
-
elif command -v gdbus >/dev/null 2>&1; then
|
|
106
|
-
${["gdbus call --session --dest org.freedesktop.Notifications","--object-path /org/freedesktop/Notifications","--method org.freedesktop.Notifications.Notify",`Forge 0 "''" "\\"$1\\"" "\\"$2\\"" '[]' '{}' -1`].join(" ")} >/dev/null 2>&1
|
|
107
|
-
fi
|
|
108
|
-
}`}function He(e){let n=[e.node,...e.execArgv,e.forge].map(a).join(" "),t=e.files.map(a).join(` \\
|
|
109
|
-
`),r="";if(e.thunar!==void 0){let i=a(e.thunar.file),o=a(`${e.thunar.file}.forge-tmp`),s=a(e.thunar.seed),c=['/<action>/ { held = ""; holding = 1 }',`holding { held = held $0 "\\n"; if (/<\\/action>/) { holding = 0; if (held !~ /<unique-id>${e.marker}-/) printf "%s", held }; next }`,"{ print }"].join(`
|
|
110
|
-
`);r=` if [ -f ${i} ] && grep -qF '<unique-id>${e.marker}-' ${i}; then
|
|
111
|
-
awk ${a(c)} ${i} > ${o} && mv -f ${o} ${i}
|
|
112
|
-
if [ -f ${s} ] && cmp -s ${s} ${i}; then rm -f ${i}; fi
|
|
113
|
-
fi
|
|
114
|
-
`}return`#!/bin/sh
|
|
115
|
-
# Forge's right-click menu. Rewritten by Forge whenever it sets the menu up.
|
|
116
|
-
${Dn()}
|
|
117
|
-
if [ ! -f ${a(e.forge)} ]; then
|
|
118
|
-
# Forge is gone: take its menu with it, and say so once.
|
|
119
|
-
for f in ${t}; do
|
|
120
|
-
if [ -f "$f" ] && grep -qF ${a(e.marker)} "$f"; then rm -f "$f"; fi
|
|
121
|
-
done
|
|
122
|
-
${r}${e.folders.map(i=>` rmdir ${a(i)} 2>/dev/null
|
|
123
|
-
`).join("")} rm -rf ${a(e.menuDir)}
|
|
124
|
-
say ${a(z)} ${a(ee)}
|
|
125
|
-
exit 0
|
|
126
|
-
fi
|
|
127
|
-
if [ ! -x ${a(e.node)} ]; then
|
|
128
|
-
say ${a(Te)} ${a(Oe)}
|
|
129
|
-
exit 1
|
|
130
|
-
fi
|
|
131
|
-
${e.xdgConfigHome===void 0?"":`export XDG_CONFIG_HOME=${a(e.xdgConfigHome)}
|
|
132
|
-
`}exec ${n} menu run "$@"
|
|
133
|
-
`}var O="HKCU\\Software\\Classes",Re=`${O}\\SystemFileAssociations\\image\\shell\\Forge`,Be=`${O}\\Directory\\shell\\Forge`,te=`${O}\\SystemFileAssociations\\.pdf\\shell\\ForgeOpen`,je=`${O}\\AppUserModelId\\${Y}`,ie=()=>[Re,Be,te,je],oe=e=>`${e.paint}.ico`;function _e(e){let n=o=>`conhost.exe --headless "${e.node}" "${e.menuDir}\\run.mjs" ${o.action}${o.preset===void 0?"":` ${o.preset}`} "%1"`,t=o=>`${e.menuDir}\\${oe(o)}`,r=(o,s)=>{let c=e.items.filter(f=>f.kinds.includes(s));return c.length===0?[]:[{key:o,values:{MUIVerb:"Forge",Icon:t({paint:"forge"}),SubCommands:""}},...c.flatMap((f,g)=>{let w=f.preset===void 0?f.action:`preset-${f.preset}`,l=`${o}\\shell\\${g+1}${w}`;return[{key:l,values:{MUIVerb:f.label,Icon:t(f)}},{key:`${l}\\command`,values:{"":n(f)}}]})]},i=e.items.find(o=>o.kinds.includes("pdf"));return[...r(Re,"image"),...r(Be,"folder"),...i?[{key:te,values:{MUIVerb:i.label,Icon:t(i)}},{key:`${te}\\command`,values:{"":n(i)}}]:[],{key:je,values:{DisplayName:"Forge",IconUri:`${e.menuDir}\\forge.png`}}]}var re=e=>`'${Q(e)}'`,ne=e=>re(`Registry::${e.replace(/^HKCU\\/,"HKEY_CURRENT_USER\\")}`);function se(e){return["$ErrorActionPreference = 'Stop'",...ie().map(t=>`Remove-Item -Path ${ne(t)} -Recurse -Force -ErrorAction SilentlyContinue`),...e.flatMap(({key:t,values:r})=>[`New-Item -Path ${ne(t)} -Force | Out-Null`,...Object.entries(r).map(([i,o])=>`Set-ItemProperty -LiteralPath ${ne(t)} -Name ${re(i===""?"(default)":i)} -Value ${re(o)}`)])].join(`
|
|
134
|
-
`)}var ot=(e,n)=>e.version===n.version&&e.forge===n.forge&&e.node===n.node&&e.execArgv.join("\0")===n.execArgv.join("\0")&&e.xdgConfigHome===n.xdgConfigHome&&(e.presets??[]).join("\0")===(n.presets??[]).join("\0"),We="/System/Library/CoreServices/pbs",Ve=e=>u(e.menuDir,"state.json"),N=e=>u(e.home,"Library","Services"),ce=e=>y({sharpen:!0}).map(n=>u(N(e),`${n.label}.workflow`)),ue=()=>y({sharpen:!0}).map(E);function Xe(e){let n;try{n=Ge(N(e)).filter(t=>t.endsWith(".workflow"))}catch{return[]}return n.flatMap(t=>{let r=u(N(e),t);try{let i=H(u(r,"Contents","Info.plist"),"utf8"),o=/<key>CFBundleIdentifier<\/key>\s*<string>([^<]*)<\/string>/.exec(i)?.[1],s=/<key>CFBundleName<\/key>\s*<string>([^<]*)<\/string>/.exec(i)?.[1];return!o?.startsWith(we)||s===void 0?[]:[{path:r,key:`${o} - ${(f=>f.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"))(s)} - runWorkflowAsService`}]}catch{return[]}})}function Nn(e){try{return JSON.parse(H(Ve(e),"utf8"))}catch{return}}var st=e=>Nn(e)!==void 0,m=(e,n)=>{pe(U(e),{recursive:!0}),In(e,n)};async function at(e){if(!Fn(e.platform))return;let n=y({sharpen:e.sharpen,presets:e.presets??[]});if(pe(e.menuDir,{recursive:!0}),e.platform==="linux")await kn(e,n);else if(e.platform==="darwin"){let r=u(e.menuDir,"run"),i=n.filter(l=>l.preset!==void 0),o=i.map(l=>u(N(e),_(l,r).name));m(r,Le({...e,bundles:[...ce(e),...o],services:[...ue(),...i.map(E)]})),le(r,493);let s=Xe(e);for(let l of[...ce(e),...s.map(R=>R.path)])$(l,{recursive:!0,force:!0});let c=new Map,{default:f}=await import("sharp");for(let l of n){c.has(l.paint)||c.set(l.paint,await f(await S(l.paint,64)).tiff().toBuffer());let{name:R,files:ze}=_(l,r),de=u(N(e),R);for(let[en,nn]of Object.entries(ze))m(u(de,en),nn);m(u(de,"Contents","Resources",`${j}.tiff`),c.get(l.paint))}let g=n.map(E),w=new Set([...ue(),...s.map(l=>l.key)]);await e.run(...D({on:g,off:[...w].filter(l=>!g.includes(l))})),await e.run(We,["-update"])}else{m(u(e.menuDir,"run.mjs"),Ue({...e,keys:ie()}));for(let r of Je){let i=await Promise.all([16,24,32,48,256].map(async o=>({size:o,png:await S(r,o)})));m(u(e.menuDir,oe({paint:r})),he(i))}m(u(e.menuDir,"forge.png"),await S("forge",256)),await e.run("powershell.exe",Ze(se(_e({...e,items:n}))))}let t={version:e.version,forge:e.forge,node:e.node,execArgv:e.execArgv,...e.xdgConfigHome===void 0?{}:{xdgConfigHome:e.xdgConfigHome},...e.presets&&e.presets.length>0?{presets:[...e.presets]}:{}};m(Ve(e),JSON.stringify(t))}var Fn=e=>e==="darwin"||e==="win32"||e==="linux",Je=["forge","convert","compress","edit","pdf"],qe=e=>ve({home:e.home,...e.xdgDataHome===void 0?{}:{xdgDataHome:e.xdgDataHome},...e.xdgConfigHome===void 0?{}:{xdgConfigHome:e.xdgConfigHome},...e.xdgConfigDirs===void 0?{}:{xdgConfigDirs:e.xdgConfigDirs}});function fe(e){let n=y({sharpen:!0}),t=n.map(i=>i.action),r=(i,o)=>{try{return Ge(i).filter(o).map(s=>u(i,s))}catch{return[]}};return[...new Set([...n.map(i=>u(h(e),G(i))),...r(h(e),()=>!0),...n.map(i=>u(I(e),W(i,t))),...r(I(e),i=>i.startsWith("forge-")&&i.endsWith(".nemo_action")),...X.map(i=>u(A(e),V(i)))])]}var x=e=>{try{return H(e,"utf8")}catch{return}};function Ye(e){for(let n of e)x(n)?.includes(d)&&$(n,{force:!0})}var Qe=e=>u(e.menuDir,"made.json"),me=e=>{try{return JSON.parse(H(Qe(e),"utf8"))}catch{return[]}};function L(e,n){let t=[];for(let r=n;!Ke(r)&&U(r)!==r;r=U(r))t.push(r);t.length!==0&&(pe(n,{recursive:!0}),m(Qe(e),JSON.stringify([...new Set([...me(e),...t])])))}function En(e){for(let n of[...e].sort((t,r)=>r.length-t.length))try{Mn(n)}catch{}}var ge=e=>u(e.menuDir,"thunar-seed.xml");async function bn(e,n,t,r){let i=C(n),o=x(i);if(o===void 0){if(!ke(n,e.path,Ke))return;o=Ee(n).map(x).find(c=>c!==void 0&&q(c,"")!==void 0)??be,m(ge(e),o),L(e,U(i))}let s=q(o,Pe(t,{launcher:r,menuDir:e.menuDir}));s!==void 0&&s!==x(i)&&await F(i,Buffer.from(s))}async function Pn(e,n){let t=C(n),r=x(t);if(r===void 0||!r.includes(`<unique-id>${d}-`))return;let i=J(r);i===x(ge(e))?$(t,{force:!0}):await F(t,Buffer.from(i))}async function ae(e,n,t=!1){await F(e,Buffer.from(n)),t&&le(e,493)}async function kn(e,n){let t=qe(e),r=u(e.menuDir,"run");for(let o of Je)m(u(e.menuDir,P({paint:o})),await S(o,128));Ye(fe(t));let i=y({sharpen:!0}).map(o=>o.action);L(e,h(t));for(let o of n)await ae(u(h(t),G(o)),Ie(o,r),!0);L(e,I(t));for(let o of n)await ae(u(I(t),W(o,i)),Ne(o,r));L(e,A(t));for(let o of X){let s=Fe(o,n,{launcher:r,menuDir:e.menuDir});s!==void 0&&await ae(u(A(t),V(o)),s,!0)}await bn(e,t,n,r),m(r,He({...e,files:fe(t),folders:[...new Set([h(t),...me(e)])].sort((o,s)=>s.length-o.length),marker:d,thunar:{file:C(t),seed:ge(e)}})),le(r,493)}async function An(e){let n=qe(e);Ye(fe(n)),await Pn(e,n),En([h(n),...me(e)]),$(e.menuDir,{recursive:!0,force:!0})}async function ct(e){if(e.platform==="linux")await An(e);else if(e.platform==="darwin"){let n=Xe(e);for(let r of[...ce(e),...n.map(i=>i.path)])$(r,{recursive:!0,force:!0});$(e.menuDir,{recursive:!0,force:!0});let t=new Set([...ue(),...n.map(r=>r.key)]);await e.run(...D({on:[],off:[...t]})),await e.run(We,["-update"])}else e.platform==="win32"&&($(e.menuDir,{recursive:!0,force:!0}),await e.run("powershell.exe",Ze(se([]))))}var Ze=e=>["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-Command",e],ut=(e,n)=>new Promise((t,r)=>{vn(e,n,{timeout:6e4,windowsHide:!0},i=>i?r(i):t())});export{a,K as b,P as c,_n as d,ot as e,Nn as f,st as g,at as h,Fn as i,ct as j,ut as k};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d}from"./chunk-37P6QZ5Q.js";import"./chunk-C4UCCBCX.js";import"./chunk-EKTUUKDP.js";import"./chunk-W6SY5PPG.js";import"./chunk-WC6SJN5Y.js";import"./chunk-OK7XOZFO.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-CKZBBDAW.js";import"./chunk-GSK2A3TN.js";import"./chunk-Y7LOIHFU.js";import"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import"./chunk-PPR7B5AR.js";import"./chunk-XBOMWF34.js";import"./chunk-V3I6DSF4.js";import"./chunk-EEQSUBBL.js";import"./chunk-K7KKCR7V.js";import"./chunk-LVYQVJOF.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-SNDFMJIX.js";import"./chunk-THDAQBQ3.js";import"./chunk-DZOBIUV6.js";import"./chunk-TL5MACSF.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{b as clipLines,a as runClip,d as runClipCommand,c as runUndo};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b,c}from"./chunk-SK2UZ25Y.js";import"./chunk-EKTUUKDP.js";import"./chunk-DZOBIUV6.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as copy,c as linuxText,b as paste};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{h as S,i as k,m as C}from"./chunk-3GJ7GV3V.js";import{i as $,k as u,l as w}from"./chunk-YINYF6C7.js";import{c as I,d as y,f as O}from"./chunk-PBIS2ONZ.js";import{b as m,c as d,h as f,i as p}from"./chunk-QVACE4IE.js";import{a as h,b as g}from"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import{a as l}from"./chunk-XBOMWF34.js";import"./chunk-V3I6DSF4.js";import"./chunk-EEQSUBBL.js";import"./chunk-K7KKCR7V.js";import"./chunk-LVYQVJOF.js";import"./chunk-SNDFMJIX.js";import"./chunk-THDAQBQ3.js";import"./chunk-DZOBIUV6.js";import"./chunk-TL5MACSF.js";import{c as b,n as x}from"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";import{resolve as R}from"node:path";var P=({r:t,g:n,b:o},s)=>s?`\x1B[38;2;${t};${n};${o}m\u2588\u2588\x1B[39m `:"";function N(t,n){let o=d(n),s,e=Number.POSITIVE_INFINITY;for(let r of t){let a=(r.centre.L-o.L)**2+(r.centre.a-o.a)**2+(r.centre.b-o.b)**2;a<e&&(e=a,s=r)}return s}async function D(t,n){let{pixels:o}=await C(t.input),s=I(o);if(s.length===0)throw x(t.input);let e=t.inside?N(s,t.inside):void 0,r=e?y(o,e):s;if(t.svg)return{exitCode:0,stdout:[S(b(t.input),r,"light",e?.hex)],stderr:[]};if(n.json){let i=h(l,{source:R(t.input),...e?{inside:e.hex}:{},colours:r.map(c=>({hex:c.hex,rgb:f(c.rgb),oklch:p(c.rgb),share:c.share}))});return{exitCode:0,stdout:[JSON.stringify(i)],stderr:[]}}let a=O(r.map(i=>i.share));return{exitCode:0,stdout:r.map((i,c)=>`${P(i.rgb,n.colour)}${i.hex} ${String(a[c]).padStart(3)}%`),stderr:[]}}async function H(t,n){let o=$(t.colour);if(t.svg)return{exitCode:0,stdout:[k(t.colour,o)],stderr:[]};let s=o.map(e=>({...e,...w(e.rgb)}));if(n.json){let e=g(l,{reference:m(t.colour),steps:s.map(r=>({step:r.step,hex:r.hex,oklch:p(r.rgb),white:r.white,black:r.black}))});return{exitCode:0,stdout:[JSON.stringify(e)],stderr:[]}}return{exitCode:0,stdout:s.map(e=>`${String(e.step).padStart(4)} ${P(e.rgb,n.colour)}${e.hex} white ${e.white.toFixed(1)} ${u(e.white)} \xB7 black ${e.black.toFixed(1)} ${u(e.black)}`),stderr:[]}}export{D as runPalette,H as runScale};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a as s}from"./chunk-WE6KP4FR.js";import{H as o}from"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";var c=["open","convert","compress","sharpen","open-pdf","preset"];function u(r){let[e,n,...i]=r;if(e==="install"||e==="remove")return{kind:e};if(e==="run"||e==="open"){if(!c.includes(n))throw o(`No menu action called "${n??""}".`);if(n==="preset"){let[t,...a]=i;if(e!=="run"||t===void 0||!s(t))throw o(`No preset called "${t??""}".`);return{kind:"run",action:n,preset:t,paths:a}}return{kind:e,action:n,paths:i}}throw o(`No menu command called "${e??""}".`)}function m(r,e){switch(r){case"convert":return{paths:e,mode:"convert",advance:!0};case"compress":return{paths:e,mode:"compress",advance:!0};case"open-pdf":return{paths:e,mode:"pdf",advance:!1};default:return{paths:[],mode:"convert",advance:!1}}}export{m as openedFor,u as parseMenuArgs};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-JMBEZPYC.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as CONFIG_KEYS,b as runConfig};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e}from"./chunk-G46QQBT3.js";import"./chunk-THDAQBQ3.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{a as OPS,d as chainLabels,e as reasonsFor,c as stepLabel,b as withStep};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{g as a}from"./chunk-TL5MACSF.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{a as openable};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{c as a,d as b,e as c,f as d}from"./chunk-W6SY5PPG.js";import"./chunk-WC6SJN5Y.js";import"./chunk-OK7XOZFO.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-CKZBBDAW.js";import"./chunk-GSK2A3TN.js";import"./chunk-Y7LOIHFU.js";import"./chunk-57M4J2BR.js";import"./chunk-63XCSYHM.js";import"./chunk-PPR7B5AR.js";import"./chunk-XBOMWF34.js";import"./chunk-V3I6DSF4.js";import"./chunk-EEQSUBBL.js";import"./chunk-K7KKCR7V.js";import"./chunk-LVYQVJOF.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-SNDFMJIX.js";import"./chunk-THDAQBQ3.js";import"./chunk-DZOBIUV6.js";import"./chunk-TL5MACSF.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{d as execute,a as exitCodeFor,c as renderRun,b as runIntent};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{Ib as a,Jb as b,Kb as c,Lb as d,Mb as e}from"./chunk-XRI5XKEB.js";import"./chunk-YINYF6C7.js";import"./chunk-PBIS2ONZ.js";import"./chunk-Q6KQWJ4J.js";import"./chunk-HKINXTUW.js";import"./chunk-IBPGC4N2.js";import"./chunk-U5TEGDGH.js";import"./chunk-QVACE4IE.js";import"./chunk-XBOMWF34.js";import"./chunk-EEQSUBBL.js";import"./chunk-N6RCLJE6.js";import"./chunk-WE6KP4FR.js";import"./chunk-KH5DHZ2U.js";import"./chunk-HON4OV7M.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{e as ExtensionsFlow,c as byteCount,b as extensionCredits,d as extensionsChip,a as realManager};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{h as a,i as b,j as c,k as d,l as e,m as f,n as g,o as h}from"./chunk-SNDFMJIX.js";import"./chunk-THDAQBQ3.js";import"./chunk-DZOBIUV6.js";import"./chunk-TL5MACSF.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-KXKQDFHX.js";import"./chunk-TMUK2DD3.js";export{c as decodeToPng,a as encode,d as encodeToBuffer,g as guessCrop,h as imageEngine,f as loadCropView,e as measureImage,b as writeAtomic};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g}from"./chunk-ZRHYGR2L.js";import"./chunk-DZOBIUV6.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{e as hasMenu,d as installMenu,c as isInstalled,b as readState,f as removeMenu,g as runProgram,a as stateMatches};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __forgeCreateRequire } from 'node:module';
|
|
2
|
-
const require = __forgeCreateRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e,f}from"./chunk-63ZK5SRQ.js";import"./chunk-WIPP5TWQ.js";import"./chunk-J7FLFHQJ.js";import"./chunk-H3DIRJFE.js";import"./chunk-TMUK2DD3.js";export{f as installUpdate,a as installedGlobally,e as lastWords,c as npmBeside,d as npmCliBeside,b as runningScript};
|