@stacksjs/desktop 0.2.359 → 0.2.360

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.
@@ -6,6 +6,7 @@ export declare interface ContextMenuItem {
6
6
  icon?: string
7
7
  shortcut?: string
8
8
  disabled?: boolean
9
+ checked?: boolean
9
10
  submenu?: ContextMenuItem[]
10
11
  }
11
12
  export declare interface ContextMenuOptions {
package/dist/index.js CHANGED
@@ -583,4 +583,4 @@ Terminal=false
583
583
  StartupNotify=false
584
584
  ${Z.isHidden?`X-GNOME-Autostart-enabled=true
585
585
  NoDisplay=true`:""}
586
- `;if(!C($))UY($,{recursive:!0});EY(X,G,"utf-8")}else if(C(X))_Y(X)}async function Z0(Y){return C(jY(Y))}async function Q0(Y){let Z=BY(Y);if(!C(Z))return!1;try{let Q=tZ(Z,"utf-8");if(Q.includes("X-GNOME-Autostart-enabled=false"))return!1;if(Q.includes("Hidden=true"))return!1;return!0}catch{return!1}}function X0(Y){return Y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async function $0(Y,Z={}){let Q=FY();switch(Q){case"darwin":return eZ(Y,Z);case"linux":return Y0(Y,Z);default:throw Error(`Auto-launch is not yet supported on ${Q}`)}}async function J0(Y){let Z=Y||"StxApp";switch(FY()){case"darwin":return Z0(Z);case"linux":return Q0(Z);default:return!1}}function zY(Y){if(Y.separator)return{id:Y.id||"",title:"",type:"separator"};return{id:Y.id||"",title:Y.title||"",icon:Y.icon,shortcut:Y.shortcut,enabled:Y.disabled?!1:void 0,type:Y.submenu?"submenu":void 0,submenu:Y.submenu?.map(zY)}}async function VY(Y){if(!Y.items||Y.items.length===0)throw Error("contextMenu.show requires at least one item");if(!x("nativeUI"))return null;let Z=await window.craft.nativeUI.showContextMenu({targetId:Y.targetId||"",targetType:"general",x:Math.round(Y.x),y:Math.round(Y.y),items:Y.items.map(zY)});return{id:typeof Z?.id==="string"?Z.id:null,targetId:Z?.targetId}}var G0={available(){return x("nativeUI")},async show(Y){return await VY(Y)!==null},async pick(Y){return(await VY(Y))?.id??null},onAction(Y){return OY("craft:contextmenu:action",(Z)=>{if(typeof Z.id==="string")Y({id:Z.id,targetId:Z.targetId??""})})}};var R0={accentColor:()=>W("system","accentColor",()=>""),highlightColor:()=>W("system","highlightColor",()=>""),language:()=>W("system","language",()=>{if(typeof navigator>"u")return"";return navigator.language?.split("-")[0]||""}),locale:()=>W("system","locale",()=>{if(typeof navigator>"u")return"";return navigator.language||""}),timezone:()=>W("system","timezone",()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}),is24HourTime:()=>W("system","is24HourTime",()=>{try{let Y=new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions();return Y.hourCycle==="h23"||Y.hourCycle==="h24"}catch{return!1}}),reduceMotion:()=>W("system","reduceMotion",()=>n("(prefers-reduced-motion: reduce)")),reduceTransparency:()=>W("system","reduceTransparency",()=>n("(prefers-reduced-transparency: reduce)")),increaseContrast:()=>W("system","increaseContrast",()=>n("(prefers-contrast: more)")),systemVersion:()=>W("system","systemVersion",()=>""),hostname:()=>W("system","hostname",()=>""),username:()=>W("system","username",()=>""),async openPreferences(){if(x("system"))await window.craft.system.openPreferences()}};async function W(Y,Z,Q){if(x(Y))return await window.craft[Y][Z]();return await Q()}function n(Y){if(typeof window>"u"||!window.matchMedia)return!1;return window.matchMedia(Y).matches}export{V1 as windowEvents,m1 as watchScreenSharing,Q2 as vision,uZ as verifyBundleTrust,B1 as updater,i0 as unregisterHotkey,s0 as unregisterAllHotkeys,UZ as triggerTrayAction,N1 as touchbar,K1 as theme,i1 as tags,R0 as system,yZ as swapBundle,z1 as standardMenus,Y2 as spotlight,Z2 as speechRecognition,C1 as speech,H1 as signPayload,F0 as showWarningToast,D0 as showWarningModal,u0 as showWarningDialog,U0 as showToast,E0 as showSuccessToast,P0 as showSuccessModal,w0 as showSaveDialog,A0 as showQuestionModal,v0 as showOpenDialog,L0 as showModal,f0 as showMessageBox,_0 as showInfoToast,T0 as showInfoModal,j0 as showErrorToast,W0 as showErrorModal,y0 as showErrorDialog,b0 as showConfirmDialog,S0 as showColorPicker,g0 as showAlertDialog,K0 as showAlert,R1 as shell,zZ as setDesktopConfig,$0 as setAutoLaunch,G2 as serviceMenu,R2 as serial,h1 as screenSharing,g1 as screenCapture,L1 as screen,mZ as runningBundleTeamId,wZ as resolveCraftBinary,LZ as resetDesktopConfig,q0 as requestNotificationPermission,qY as relaunchBundle,a0 as registerHotkey,x1 as redactPII,p as readBundleIdentity,RY as quitLauncher,C0 as prompt,W1 as printing,D1 as permissions,s1 as pdf,o0 as parseShortcut,HZ as packageApp,xZ as pack,NZ as openDevWindow,B0 as notify,J1 as notifications,j1 as network,A1 as nativeWindow,P1 as nativeAutoLaunch,X2 as midi,M1 as menu,t1 as log,S1 as location,r1 as localServer,f1 as liveActivities,T1 as keychain,CZ as isWebviewAvailable,_1 as isDragOutAvailable,d0 as isCaffeinated,U2 as isAvailable,J0 as isAutoLaunchEnabled,v1 as iap,d1 as hasFocusShortcuts,w1 as handoff,q1 as globalShortcuts,JY as githubReleaseAssetUrl,$Y as githubLatestAssetUrl,IZ as getWindowBridgeScript,WZ as getWindow,KZ as getTrayInstance,EZ as getTrayBridgeScript,_Z as getSimulatedTrayHTML,t0 as getRegisteredHotkeys,h0 as getDialogBridgeScript,MZ as getDesktopConfig,K2 as getCapability,q2 as getCapabilities,p0 as getCaffeinateStatus,DZ as getActiveWindowIds,qZ as getActiveTrayInstances,I0 as getActiveModalCount,z0 as getActiveAlertCount,QY as generateUpdateManifest,G1 as fs,Q1 as formatTime,l0 as formatShortcut,r0 as formatRemainingTime,n0 as formatDuration,X1 as formatCompact,p1 as focusShortcutsReady,c1 as focus,a1 as fileAssociations,bZ as extractBundle,U1 as dragOut,O0 as dismissAllAlerts,V0 as dismissAlertById,Z1 as delay,E1 as deepLinks,c0 as decaffeinate,kZ as createWindowWithHTML,AZ as createWindow,YZ as createWebView,oY as createTreeView,uY as createTooltip,e0 as createTimer,fY as createTimePicker,TY as createTextInput,CY as createTabs,nY as createTable,e as createSystemTray,dY as createStepper,mY as createSplitView,WY as createSlider,cZ as createSelfUpdater,hY as createScrollView,xY as createRating,HY as createRadioButton,PY as createProgressBar,sZ as createPreferences,pY as createModalComponent,RZ as createMenubar,sY as createMediaPlayer,rY as createListView,gY as createLabel,Y1 as createInterval,bY as createImageView,GY as createGitHubUpdater,hZ as createGitHubUpdateManifest,eY as createFileExplorer,IY as createDropdown,wY as createDatePicker,lY as createDataGrid,vY as createColorPicker,iY as createCodeEditor,yY as createChip,DY as createCheckbox,aY as createChart,kY as createCard,LY as createButton,AY as createBadge,NY as createAvatar,SY as createAutocomplete,cY as createAccordion,I1 as crashReporter,d as craftWindowArguments,vZ as craftBinaryNotFoundMessage,$2 as coreml,J2 as continuityCamera,G0 as contextMenu,N0 as confirm,PZ as closeAllWindows,x0 as closeAllModals,$1 as clipboard,gZ as clearQuarantine,SZ as canReplaceBundle,m0 as caffeinate,b as bundlePathForExecutable,e1 as bonjour,k1 as bluetooth,n1 as biometric,F1 as battery,o1 as audio,l1 as appleScript,O1 as appInfo,k0 as alert,XY as UPDATE_MANIFEST_ASSET,FZ as TRAY_MENU_STYLES,M0 as TOAST_STYLES,H0 as MODAL_STYLES,b1 as MIN_WATCH_INTERVAL_MS,y1 as MAX_WATCH_INTERVAL_MS,u1 as DEFAULT_WATCH_INTERVAL_MS,QZ as COMPONENT_STYLES,ZY as AutoUpdater,ZZ as AVAILABLE_COMPONENTS};
586
+ `;if(!C($))UY($,{recursive:!0});EY(X,G,"utf-8")}else if(C(X))_Y(X)}async function Z0(Y){return C(jY(Y))}async function Q0(Y){let Z=BY(Y);if(!C(Z))return!1;try{let Q=tZ(Z,"utf-8");if(Q.includes("X-GNOME-Autostart-enabled=false"))return!1;if(Q.includes("Hidden=true"))return!1;return!0}catch{return!1}}function X0(Y){return Y.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}async function $0(Y,Z={}){let Q=FY();switch(Q){case"darwin":return eZ(Y,Z);case"linux":return Y0(Y,Z);default:throw Error(`Auto-launch is not yet supported on ${Q}`)}}async function J0(Y){let Z=Y||"StxApp";switch(FY()){case"darwin":return Z0(Z);case"linux":return Q0(Z);default:return!1}}function zY(Y){if(Y.separator)return{id:Y.id||"",title:"",type:"separator"};return{id:Y.id||"",title:Y.title||"",icon:Y.icon,shortcut:Y.shortcut,enabled:Y.disabled?!1:void 0,checked:Y.checked?!0:void 0,type:Y.submenu?"submenu":void 0,submenu:Y.submenu?.map(zY)}}async function VY(Y){if(!Y.items||Y.items.length===0)throw Error("contextMenu.show requires at least one item");if(!x("nativeUI"))return null;let Z=await window.craft.nativeUI.showContextMenu({targetId:Y.targetId||"",targetType:"general",x:Math.round(Y.x),y:Math.round(Y.y),items:Y.items.map(zY)});return{id:typeof Z?.id==="string"?Z.id:null,targetId:Z?.targetId}}var G0={available(){return x("nativeUI")},async show(Y){return await VY(Y)!==null},async pick(Y){return(await VY(Y))?.id??null},onAction(Y){return OY("craft:contextmenu:action",(Z)=>{if(typeof Z.id==="string")Y({id:Z.id,targetId:Z.targetId??""})})}};var R0={accentColor:()=>W("system","accentColor",()=>""),highlightColor:()=>W("system","highlightColor",()=>""),language:()=>W("system","language",()=>{if(typeof navigator>"u")return"";return navigator.language?.split("-")[0]||""}),locale:()=>W("system","locale",()=>{if(typeof navigator>"u")return"";return navigator.language||""}),timezone:()=>W("system","timezone",()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}),is24HourTime:()=>W("system","is24HourTime",()=>{try{let Y=new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions();return Y.hourCycle==="h23"||Y.hourCycle==="h24"}catch{return!1}}),reduceMotion:()=>W("system","reduceMotion",()=>n("(prefers-reduced-motion: reduce)")),reduceTransparency:()=>W("system","reduceTransparency",()=>n("(prefers-reduced-transparency: reduce)")),increaseContrast:()=>W("system","increaseContrast",()=>n("(prefers-contrast: more)")),systemVersion:()=>W("system","systemVersion",()=>""),hostname:()=>W("system","hostname",()=>""),username:()=>W("system","username",()=>""),async openPreferences(){if(x("system"))await window.craft.system.openPreferences()}};async function W(Y,Z,Q){if(x(Y))return await window.craft[Y][Z]();return await Q()}function n(Y){if(typeof window>"u"||!window.matchMedia)return!1;return window.matchMedia(Y).matches}export{V1 as windowEvents,m1 as watchScreenSharing,Q2 as vision,uZ as verifyBundleTrust,B1 as updater,i0 as unregisterHotkey,s0 as unregisterAllHotkeys,UZ as triggerTrayAction,N1 as touchbar,K1 as theme,i1 as tags,R0 as system,yZ as swapBundle,z1 as standardMenus,Y2 as spotlight,Z2 as speechRecognition,C1 as speech,H1 as signPayload,F0 as showWarningToast,D0 as showWarningModal,u0 as showWarningDialog,U0 as showToast,E0 as showSuccessToast,P0 as showSuccessModal,w0 as showSaveDialog,A0 as showQuestionModal,v0 as showOpenDialog,L0 as showModal,f0 as showMessageBox,_0 as showInfoToast,T0 as showInfoModal,j0 as showErrorToast,W0 as showErrorModal,y0 as showErrorDialog,b0 as showConfirmDialog,S0 as showColorPicker,g0 as showAlertDialog,K0 as showAlert,R1 as shell,zZ as setDesktopConfig,$0 as setAutoLaunch,G2 as serviceMenu,R2 as serial,h1 as screenSharing,g1 as screenCapture,L1 as screen,mZ as runningBundleTeamId,wZ as resolveCraftBinary,LZ as resetDesktopConfig,q0 as requestNotificationPermission,qY as relaunchBundle,a0 as registerHotkey,x1 as redactPII,p as readBundleIdentity,RY as quitLauncher,C0 as prompt,W1 as printing,D1 as permissions,s1 as pdf,o0 as parseShortcut,HZ as packageApp,xZ as pack,NZ as openDevWindow,B0 as notify,J1 as notifications,j1 as network,A1 as nativeWindow,P1 as nativeAutoLaunch,X2 as midi,M1 as menu,t1 as log,S1 as location,r1 as localServer,f1 as liveActivities,T1 as keychain,CZ as isWebviewAvailable,_1 as isDragOutAvailable,d0 as isCaffeinated,U2 as isAvailable,J0 as isAutoLaunchEnabled,v1 as iap,d1 as hasFocusShortcuts,w1 as handoff,q1 as globalShortcuts,JY as githubReleaseAssetUrl,$Y as githubLatestAssetUrl,IZ as getWindowBridgeScript,WZ as getWindow,KZ as getTrayInstance,EZ as getTrayBridgeScript,_Z as getSimulatedTrayHTML,t0 as getRegisteredHotkeys,h0 as getDialogBridgeScript,MZ as getDesktopConfig,K2 as getCapability,q2 as getCapabilities,p0 as getCaffeinateStatus,DZ as getActiveWindowIds,qZ as getActiveTrayInstances,I0 as getActiveModalCount,z0 as getActiveAlertCount,QY as generateUpdateManifest,G1 as fs,Q1 as formatTime,l0 as formatShortcut,r0 as formatRemainingTime,n0 as formatDuration,X1 as formatCompact,p1 as focusShortcutsReady,c1 as focus,a1 as fileAssociations,bZ as extractBundle,U1 as dragOut,O0 as dismissAllAlerts,V0 as dismissAlertById,Z1 as delay,E1 as deepLinks,c0 as decaffeinate,kZ as createWindowWithHTML,AZ as createWindow,YZ as createWebView,oY as createTreeView,uY as createTooltip,e0 as createTimer,fY as createTimePicker,TY as createTextInput,CY as createTabs,nY as createTable,e as createSystemTray,dY as createStepper,mY as createSplitView,WY as createSlider,cZ as createSelfUpdater,hY as createScrollView,xY as createRating,HY as createRadioButton,PY as createProgressBar,sZ as createPreferences,pY as createModalComponent,RZ as createMenubar,sY as createMediaPlayer,rY as createListView,gY as createLabel,Y1 as createInterval,bY as createImageView,GY as createGitHubUpdater,hZ as createGitHubUpdateManifest,eY as createFileExplorer,IY as createDropdown,wY as createDatePicker,lY as createDataGrid,vY as createColorPicker,iY as createCodeEditor,yY as createChip,DY as createCheckbox,aY as createChart,kY as createCard,LY as createButton,AY as createBadge,NY as createAvatar,SY as createAutocomplete,cY as createAccordion,I1 as crashReporter,d as craftWindowArguments,vZ as craftBinaryNotFoundMessage,$2 as coreml,J2 as continuityCamera,G0 as contextMenu,N0 as confirm,PZ as closeAllWindows,x0 as closeAllModals,$1 as clipboard,gZ as clearQuarantine,SZ as canReplaceBundle,m0 as caffeinate,b as bundlePathForExecutable,e1 as bonjour,k1 as bluetooth,n1 as biometric,F1 as battery,o1 as audio,l1 as appleScript,O1 as appInfo,k0 as alert,XY as UPDATE_MANIFEST_ASSET,FZ as TRAY_MENU_STYLES,M0 as TOAST_STYLES,H0 as MODAL_STYLES,b1 as MIN_WATCH_INTERVAL_MS,y1 as MAX_WATCH_INTERVAL_MS,u1 as DEFAULT_WATCH_INTERVAL_MS,QZ as COMPONENT_STYLES,ZY as AutoUpdater,ZZ as AVAILABLE_COMPONENTS};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/desktop",
3
3
  "type": "module",
4
- "version": "0.2.359",
4
+ "version": "0.2.360",
5
5
  "description": "Native desktop application framework for stx (powered by Craft)",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",