@omniviewdev/runtime 0.3.0 → 0.4.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.
Files changed (142) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.d.ts +15 -14
  3. package/dist/api.js +110 -125
  4. package/dist/bindings/encoding/json/index.d.ts +1 -0
  5. package/dist/bindings/encoding/json/models.d.ts +6 -0
  6. package/dist/bindings/github.com/omniviewdev/omniview/appservice.d.ts +18 -0
  7. package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/diagnosticsclient.d.ts +51 -0
  8. package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/index.d.ts +2 -0
  9. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/index.d.ts +2 -0
  10. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/servicewrapper.d.ts +5 -0
  11. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/index.d.ts +3 -0
  12. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models.d.ts +132 -0
  13. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/servicewrapper.d.ts +12 -0
  14. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/index.d.ts +2 -0
  15. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper.d.ts +22 -0
  16. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/index.d.ts +3 -0
  17. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/index.d.ts +1 -0
  18. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/models.d.ts +29 -0
  19. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/index.d.ts +2 -0
  20. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper.d.ts +11 -0
  21. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/index.d.ts +3 -0
  22. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.d.ts +39 -0
  23. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper.d.ts +16 -0
  24. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/models.d.ts +72 -0
  25. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/index.d.ts +2 -0
  26. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper.d.ts +11 -0
  27. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/index.d.ts +3 -0
  28. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models.d.ts +24 -0
  29. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/servicewrapper.d.ts +7 -0
  30. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/index.d.ts +1 -0
  31. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/models.d.ts +94 -0
  32. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +2 -0
  33. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +53 -0
  34. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +14 -0
  35. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +4 -0
  36. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +61 -0
  37. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +92 -0
  38. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.d.ts +24 -0
  39. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/index.d.ts +2 -0
  40. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +18 -0
  41. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/index.d.ts +1 -0
  42. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/models.d.ts +22 -0
  43. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/index.d.ts +3 -0
  44. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models.d.ts +55 -0
  45. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/servicewrapper.d.ts +7 -0
  46. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/client.d.ts +6 -0
  47. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/index.d.ts +3 -0
  48. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/models.d.ts +10 -0
  49. package/dist/bindings/github.com/omniviewdev/omniview/index.d.ts +3 -0
  50. package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +2 -0
  51. package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +48 -0
  52. package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/index.d.ts +2 -0
  53. package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/telemetrybinding.d.ts +7 -0
  54. package/dist/bindings/github.com/omniviewdev/omniview/models.d.ts +38 -0
  55. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/index.d.ts +1 -0
  56. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +101 -0
  57. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/index.d.ts +1 -0
  58. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +199 -0
  59. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/index.d.ts +1 -0
  60. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +79 -0
  61. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -0
  62. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +133 -0
  63. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -0
  64. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +207 -0
  65. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +2 -0
  66. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +96 -0
  67. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +2 -0
  68. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +1199 -0
  69. package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/index.d.ts +2 -0
  70. package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +169 -0
  71. package/dist/bindings/github.com/wailsapp/wails/v3/internal/eventcreate.d.ts +1 -0
  72. package/dist/bindings/time/index.d.ts +1 -0
  73. package/dist/bindings/time/models.d.ts +33 -0
  74. package/dist/calls-BmUnjINC.js +677 -0
  75. package/dist/calls-DZctVyoQ.cjs +1 -0
  76. package/dist/compat/legacyEnum.d.ts +10 -0
  77. package/dist/compat/resource.d.ts +4 -0
  78. package/dist/compat/types.d.ts +4 -0
  79. package/dist/context/plugins/PluginContext.d.ts +2 -2
  80. package/dist/events-BTiuwc-0.cjs +1 -0
  81. package/dist/events-DDTGFACO.js +371 -0
  82. package/dist/hooks/connection/useConnection.d.ts +5 -5
  83. package/dist/hooks/connection/useConnectionStatus.d.ts +7 -0
  84. package/dist/hooks/connection/useConnections.d.ts +4 -4
  85. package/dist/hooks/exec/useExecSession.d.ts +2 -2
  86. package/dist/hooks/logs/useLogSession.d.ts +1 -2
  87. package/dist/hooks/metric/useMetricProviders.d.ts +3 -3
  88. package/dist/hooks/metric/useMetricStream.d.ts +2 -2
  89. package/dist/hooks/metric/useResourceMetrics.d.ts +4 -3
  90. package/dist/hooks/networker/types.d.ts +3 -3
  91. package/dist/hooks/networker/usePortForwardSessions.d.ts +4 -4
  92. package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -4
  93. package/dist/hooks/resource/useEditorSchemas.d.ts +2 -2
  94. package/dist/hooks/resource/useEventBatcher.d.ts +3 -0
  95. package/dist/hooks/resource/useResource.d.ts +3 -4
  96. package/dist/hooks/resource/useResourceActions.d.ts +2 -3
  97. package/dist/hooks/resource/useResourceAreaComponent.d.ts +3 -3
  98. package/dist/hooks/resource/useResourceGroups.d.ts +6 -6
  99. package/dist/hooks/resource/useResourceMutations.d.ts +3 -4
  100. package/dist/hooks/resource/useResourceType.d.ts +1 -1
  101. package/dist/hooks/resource/useResourceTypes.d.ts +6 -6
  102. package/dist/hooks/resource/useResources.d.ts +3 -4
  103. package/dist/index-D2mKAO8s.js +1069 -0
  104. package/dist/index-D_aIcqH0.cjs +6 -0
  105. package/dist/index.cjs +2 -2
  106. package/dist/index.js +1192 -1600
  107. package/dist/legacyEnum-DORXlU_y.js +13 -0
  108. package/dist/legacyEnum-DkV5yRdA.cjs +1 -0
  109. package/dist/models-B8OVRhdT.js +159 -0
  110. package/dist/models-BVKsY9u1.js +2285 -0
  111. package/dist/models-CExSuVU2.cjs +1 -0
  112. package/dist/models-DdAWPDgz.cjs +1 -0
  113. package/dist/models.cjs +1 -1
  114. package/dist/models.d.ts +27 -1
  115. package/dist/models.js +259 -2244
  116. package/dist/runtime.cjs +1 -1
  117. package/dist/runtime.d.ts +1 -1
  118. package/dist/runtime.js +198 -205
  119. package/dist/servicewrapper-BH5omp-N.js +708 -0
  120. package/dist/servicewrapper-dDhyC68C.cjs +1 -0
  121. package/dist/types/watch.d.ts +4 -5
  122. package/package.json +17 -13
  123. package/LICENSE +0 -661
  124. package/dist/Client-07zrOerN.js +0 -636
  125. package/dist/Client-CLvQWnuz.cjs +0 -1
  126. package/dist/wailsjs/go/data/Client.d.ts +0 -10
  127. package/dist/wailsjs/go/devserver/DevServerManager.d.ts +0 -24
  128. package/dist/wailsjs/go/diagnostics/DiagnosticsClient.d.ts +0 -18
  129. package/dist/wailsjs/go/exec/Client.d.ts +0 -26
  130. package/dist/wailsjs/go/logs/Client.d.ts +0 -16
  131. package/dist/wailsjs/go/main/App.d.ts +0 -8
  132. package/dist/wailsjs/go/metric/Client.d.ts +0 -12
  133. package/dist/wailsjs/go/models.d.ts +0 -1060
  134. package/dist/wailsjs/go/networker/Client.d.ts +0 -14
  135. package/dist/wailsjs/go/plugin/pluginManager.d.ts +0 -52
  136. package/dist/wailsjs/go/pluginlog/Manager.d.ts +0 -18
  137. package/dist/wailsjs/go/resource/Client.d.ts +0 -90
  138. package/dist/wailsjs/go/settings/Client.d.ts +0 -14
  139. package/dist/wailsjs/go/settings/provider.d.ts +0 -48
  140. package/dist/wailsjs/go/ui/Client.d.ts +0 -6
  141. package/dist/wailsjs/go/utils/Client.d.ts +0 -2
  142. package/dist/wailsjs/runtime/runtime.d.ts +0 -249
package/dist/runtime.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function w(n){window.runtime.LogPrint(n)}function d(n){window.runtime.LogTrace(n)}function r(n){window.runtime.LogDebug(n)}function u(n){window.runtime.LogInfo(n)}function m(n){window.runtime.LogWarning(n)}function l(n){window.runtime.LogError(n)}function s(n){window.runtime.LogFatal(n)}function o(n,i,e){return window.runtime.EventsOnMultiple(n,i,e)}function W(n,i){return o(n,i,-1)}function f(n,...i){return window.runtime.EventsOff(n,...i)}function c(){return window.runtime.EventsOffAll()}function a(n,i){return o(n,i,1)}function S(n){let i=[n].slice.call(arguments);return window.runtime.EventsEmit.apply(null,i)}function g(){window.runtime.WindowReload()}function p(){window.runtime.WindowReloadApp()}function O(n){window.runtime.WindowSetAlwaysOnTop(n)}function T(){window.runtime.WindowSetSystemDefaultTheme()}function L(){window.runtime.WindowSetLightTheme()}function v(){window.runtime.WindowSetDarkTheme()}function E(){window.runtime.WindowCenter()}function M(n){window.runtime.WindowSetTitle(n)}function h(){window.runtime.WindowFullscreen()}function x(){window.runtime.WindowUnfullscreen()}function F(){return window.runtime.WindowIsFullscreen()}function P(){return window.runtime.WindowGetSize()}function C(n,i){window.runtime.WindowSetSize(n,i)}function D(n,i){window.runtime.WindowSetMaxSize(n,i)}function I(n,i){window.runtime.WindowSetMinSize(n,i)}function R(n,i){window.runtime.WindowSetPosition(n,i)}function z(){return window.runtime.WindowGetPosition()}function A(){window.runtime.WindowHide()}function G(){window.runtime.WindowShow()}function U(){window.runtime.WindowMaximise()}function b(){window.runtime.WindowToggleMaximise()}function y(){window.runtime.WindowUnmaximise()}function k(){return window.runtime.WindowIsMaximised()}function B(){window.runtime.WindowMinimise()}function H(){window.runtime.WindowUnminimise()}function N(n,i,e,t){window.runtime.WindowSetBackgroundColour(n,i,e,t)}function Q(){return window.runtime.ScreenGetAll()}function j(){return window.runtime.WindowIsMinimised()}function q(){return window.runtime.WindowIsNormal()}function J(n){window.runtime.BrowserOpenURL(n)}function K(){return window.runtime.Environment()}function V(){window.runtime.Quit()}function X(){window.runtime.Hide()}function Y(){window.runtime.Show()}function Z(){return window.runtime.ClipboardGetText()}function _(n){return window.runtime.ClipboardSetText(n)}function $(n,i){return window.runtime.OnFileDrop(n,i)}function nn(){return window.runtime.OnFileDropOff()}function en(){return window.runtime.CanResolveFilePaths()}function on(n){return window.runtime.ResolveFilePaths(n)}exports.BrowserOpenURL=J;exports.CanResolveFilePaths=en;exports.ClipboardGetText=Z;exports.ClipboardSetText=_;exports.Environment=K;exports.EventsEmit=S;exports.EventsOff=f;exports.EventsOffAll=c;exports.EventsOn=W;exports.EventsOnMultiple=o;exports.EventsOnce=a;exports.Hide=X;exports.LogDebug=r;exports.LogError=l;exports.LogFatal=s;exports.LogInfo=u;exports.LogPrint=w;exports.LogTrace=d;exports.LogWarning=m;exports.OnFileDrop=$;exports.OnFileDropOff=nn;exports.Quit=V;exports.ResolveFilePaths=on;exports.ScreenGetAll=Q;exports.Show=Y;exports.WindowCenter=E;exports.WindowFullscreen=h;exports.WindowGetPosition=z;exports.WindowGetSize=P;exports.WindowHide=A;exports.WindowIsFullscreen=F;exports.WindowIsMaximised=k;exports.WindowIsMinimised=j;exports.WindowIsNormal=q;exports.WindowMaximise=U;exports.WindowMinimise=B;exports.WindowReload=g;exports.WindowReloadApp=p;exports.WindowSetAlwaysOnTop=O;exports.WindowSetBackgroundColour=N;exports.WindowSetDarkTheme=v;exports.WindowSetLightTheme=L;exports.WindowSetMaxSize=D;exports.WindowSetMinSize=I;exports.WindowSetPosition=R;exports.WindowSetSize=C;exports.WindowSetSystemDefaultTheme=T;exports.WindowSetTitle=M;exports.WindowShow=G;exports.WindowToggleMaximise=b;exports.WindowUnfullscreen=x;exports.WindowUnmaximise=y;exports.WindowUnminimise=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-D_aIcqH0.cjs"),d=require("./events-BTiuwc-0.cjs"),A=require("./calls-DZctVyoQ.cjs"),w=n.newRuntimeCaller(n.objectNames.Application),_=0,M=1,C=2;function j(){return w(_)}function O(){return w(M)}function W(){return w(C)}const T=Object.freeze(Object.defineProperty({__proto__:null,Hide:j,Quit:W,Show:O},Symbol.toStringTag,{value:"Module"})),p=n.newRuntimeCaller(n.objectNames.Clipboard),D=0,E=1;function R(t){return p(D,{text:t})}function L(){return p(E)}const x=Object.freeze(Object.defineProperty({__proto__:null,SetText:R,Text:L},Symbol.toStringTag,{value:"Module"}));n.hasDOM&&(window._wails=window._wails||{});const P=n.newRuntimeCaller(n.objectNames.Dialog),I=0,B=1,G=2,k=3,q=4,z=5;function s(t,e={}){return P(t,e)}function F(t){return s(I,t)}function $(t){return s(B,t)}function Q(t){return s(G,t)}function y(t){return s(k,t)}function N(t){var e;return(e=s(q,t))!==null&&e!==void 0?e:[]}function Y(t){return s(z,t)}const H=Object.freeze(Object.defineProperty({__proto__:null,Error:Q,Info:F,OpenFile:N,Question:y,SaveFile:Y,Warning:$},Symbol.toStringTag,{value:"Module"})),u=n.newRuntimeCaller(n.objectNames.Screens),U=0,J=1,K=2,V=3,X=4;function Z(){return u(U)}function tt(){return u(J)}function et(){return u(K)}function nt(t){return u(V,{id:t})}function ot(t){return u(X,{index:t})}const rt=Object.freeze(Object.defineProperty({__proto__:null,GetAll:Z,GetByID:nt,GetByIndex:ot,GetCurrent:et,GetPrimary:tt},Symbol.toStringTag,{value:"Module"}));function it(t,e=null){d.Emit(t,e)}function lt(t,e){const o=n.thisWindow.Get(t),r=o[e];if(typeof r!="function"){console.error(`Window method '${e}' not found`);return}try{r.call(o)}catch(i){console.error(`Error calling window method '${e}': `,i)}}function h(t){const e=t.currentTarget;function o(i="Yes"){if(i!=="Yes")return;const a=e.getAttribute("wml-event")||e.getAttribute("data-wml-event"),f=e.getAttribute("wml-target-window")||e.getAttribute("data-wml-target-window")||"",b=e.getAttribute("wml-window")||e.getAttribute("data-wml-window"),m=e.getAttribute("wml-openurl")||e.getAttribute("data-wml-openurl");a!==null&&it(a),b!==null&&lt(f,b),m!==null&&d.OpenURL(m)}const r=e.getAttribute("wml-confirm")||e.getAttribute("data-wml-confirm");r?y({Title:"Confirm",Message:r,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(o):o()}const g=Symbol("controller"),c=Symbol("triggerMap"),l=Symbol("elementCount");class st{constructor(){this[g]=new AbortController}set(e,o){return{signal:this[g].signal}}reset(){this[g].abort(),this[g]=new AbortController}}class ct{constructor(){this[c]=new WeakMap,this[l]=0}set(e,o){return this[c].has(e)||this[l]++,this[c].set(e,o),{}}reset(){if(!(this[l]<=0)){for(const e of document.body.querySelectorAll("*")){if(this[l]<=0)break;const o=this[c].get(e);o!=null&&this[l]--;for(const r of o||[])e.removeEventListener(r,h)}this[c]=new WeakMap,this[l]=0}}}const S=n.canAbortListeners()?new st:new ct;function ut(t){const e=/\S+/g,o=t.getAttribute("wml-trigger")||t.getAttribute("data-wml-trigger")||"click",r=[];let i;for(;(i=e.exec(o))!==null;)r.push(i[0]);const a=S.set(t,r);for(const f of r)t.addEventListener(f,h,a)}function at(){n.whenReady(v)}function v(){S.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut)}const gt=Object.freeze(Object.defineProperty({__proto__:null,Enable:at,Reload:v},Symbol.toStringTag,{value:"Module"}));exports.Flags=n.flags;exports.System=n.system;exports.Window=n.thisWindow;exports.Browser=d.browser;exports.Events=d.events;exports.Call=A.calls;exports.Application=T;exports.Clipboard=x;exports.Dialogs=H;exports.Screens=rt;exports.WML=gt;
package/dist/runtime.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './wailsjs/runtime/runtime';
1
+ export { Application, Browser, Call, Clipboard, Dialogs, Events, Flags, Screens, System, Window, WML, } from '@wailsio/runtime';
package/dist/runtime.js CHANGED
@@ -1,215 +1,208 @@
1
- function w(n) {
2
- window.runtime.LogPrint(n);
3
- }
4
- function u(n) {
5
- window.runtime.LogTrace(n);
6
- }
7
- function r(n) {
8
- window.runtime.LogDebug(n);
9
- }
10
- function d(n) {
11
- window.runtime.LogInfo(n);
12
- }
13
- function m(n) {
14
- window.runtime.LogWarning(n);
15
- }
16
- function f(n) {
17
- window.runtime.LogError(n);
18
- }
19
- function c(n) {
20
- window.runtime.LogFatal(n);
21
- }
22
- function e(n, i, o) {
23
- return window.runtime.EventsOnMultiple(n, i, o);
24
- }
25
- function l(n, i) {
26
- return e(n, i, -1);
27
- }
28
- function s(n, ...i) {
29
- return window.runtime.EventsOff(n, ...i);
30
- }
31
- function W() {
32
- return window.runtime.EventsOffAll();
33
- }
34
- function a(n, i) {
35
- return e(n, i, 1);
36
- }
37
- function S(n) {
38
- let i = [n].slice.call(arguments);
39
- return window.runtime.EventsEmit.apply(null, i);
40
- }
41
- function g() {
42
- window.runtime.WindowReload();
43
- }
44
- function p() {
45
- window.runtime.WindowReloadApp();
46
- }
47
- function L(n) {
48
- window.runtime.WindowSetAlwaysOnTop(n);
49
- }
50
- function O() {
51
- window.runtime.WindowSetSystemDefaultTheme();
52
- }
53
- function T() {
54
- window.runtime.WindowSetLightTheme();
55
- }
56
- function h() {
57
- window.runtime.WindowSetDarkTheme();
58
- }
59
- function v() {
60
- window.runtime.WindowCenter();
61
- }
62
- function E(n) {
63
- window.runtime.WindowSetTitle(n);
64
- }
65
- function M() {
66
- window.runtime.WindowFullscreen();
67
- }
1
+ import { n as g, o as f, h as _, w as v, c as M, t as C } from "./index-D2mKAO8s.js";
2
+ import { f as At, s as _t } from "./index-D2mKAO8s.js";
3
+ import { a as O, E as W } from "./events-DDTGFACO.js";
4
+ import { c as Mt, e as Ct } from "./events-DDTGFACO.js";
5
+ import { c as Wt } from "./calls-BmUnjINC.js";
6
+ const w = g(f.Application), D = 0, E = 1, T = 2;
68
7
  function x() {
69
- window.runtime.WindowUnfullscreen();
70
- }
71
- function F() {
72
- return window.runtime.WindowIsFullscreen();
73
- }
74
- function C() {
75
- return window.runtime.WindowGetSize();
76
- }
77
- function D(n, i) {
78
- window.runtime.WindowSetSize(n, i);
79
- }
80
- function I(n, i) {
81
- window.runtime.WindowSetMaxSize(n, i);
82
- }
83
- function P(n, i) {
84
- window.runtime.WindowSetMinSize(n, i);
85
- }
86
- function R(n, i) {
87
- window.runtime.WindowSetPosition(n, i);
88
- }
89
- function z() {
90
- return window.runtime.WindowGetPosition();
91
- }
92
- function A() {
93
- window.runtime.WindowHide();
94
- }
95
- function G() {
96
- window.runtime.WindowShow();
97
- }
98
- function U() {
99
- window.runtime.WindowMaximise();
100
- }
101
- function b() {
102
- window.runtime.WindowToggleMaximise();
103
- }
104
- function y() {
105
- window.runtime.WindowUnmaximise();
106
- }
107
- function k() {
108
- return window.runtime.WindowIsMaximised();
109
- }
110
- function B() {
111
- window.runtime.WindowMinimise();
112
- }
113
- function H() {
114
- window.runtime.WindowUnminimise();
115
- }
116
- function N(n, i, o, t) {
117
- window.runtime.WindowSetBackgroundColour(n, i, o, t);
118
- }
119
- function Q() {
120
- return window.runtime.ScreenGetAll();
8
+ return w(D);
121
9
  }
122
10
  function j() {
123
- return window.runtime.WindowIsMinimised();
124
- }
125
- function q() {
126
- return window.runtime.WindowIsNormal();
127
- }
128
- function J(n) {
129
- window.runtime.BrowserOpenURL(n);
130
- }
131
- function K() {
132
- return window.runtime.Environment();
133
- }
134
- function V() {
135
- window.runtime.Quit();
11
+ return w(E);
136
12
  }
137
- function X() {
138
- window.runtime.Hide();
13
+ function L() {
14
+ return w(T);
139
15
  }
140
- function Y() {
141
- window.runtime.Show();
16
+ const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
+ __proto__: null,
18
+ Hide: x,
19
+ Quit: L,
20
+ Show: j
21
+ }, Symbol.toStringTag, { value: "Module" })), p = g(f.Clipboard), R = 0, I = 1;
22
+ function P(t) {
23
+ return p(R, { text: t });
142
24
  }
143
- function Z() {
144
- return window.runtime.ClipboardGetText();
145
- }
146
- function _(n) {
147
- return window.runtime.ClipboardSetText(n);
148
- }
149
- function $(n, i) {
150
- return window.runtime.OnFileDrop(n, i);
151
- }
152
- function nn() {
153
- return window.runtime.OnFileDropOff();
154
- }
155
- function on() {
156
- return window.runtime.CanResolveFilePaths();
25
+ function B() {
26
+ return p(I);
27
+ }
28
+ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
+ __proto__: null,
30
+ SetText: P,
31
+ Text: B
32
+ }, Symbol.toStringTag, { value: "Module" }));
33
+ _ && (window._wails = window._wails || {});
34
+ const G = g(f.Dialog), k = 0, z = 1, F = 2, $ = 3, Q = 4, Y = 5;
35
+ function l(t, e = {}) {
36
+ return G(t, e);
37
+ }
38
+ function q(t) {
39
+ return l(k, t);
40
+ }
41
+ function H(t) {
42
+ return l(z, t);
43
+ }
44
+ function U(t) {
45
+ return l(F, t);
46
+ }
47
+ function h(t) {
48
+ return l($, t);
49
+ }
50
+ function J(t) {
51
+ var e;
52
+ return (e = l(Q, t)) !== null && e !== void 0 ? e : [];
53
+ }
54
+ function K(t) {
55
+ return l(Y, t);
56
+ }
57
+ const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
58
+ __proto__: null,
59
+ Error: U,
60
+ Info: q,
61
+ OpenFile: J,
62
+ Question: h,
63
+ SaveFile: K,
64
+ Warning: H
65
+ }, Symbol.toStringTag, { value: "Module" })), c = g(f.Screens), N = 0, V = 1, X = 2, Z = 3, tt = 4;
66
+ function et() {
67
+ return c(N);
68
+ }
69
+ function nt() {
70
+ return c(V);
71
+ }
72
+ function ot() {
73
+ return c(X);
74
+ }
75
+ function rt(t) {
76
+ return c(Z, { id: t });
77
+ }
78
+ function it(t) {
79
+ return c(tt, { index: t });
80
+ }
81
+ const pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ __proto__: null,
83
+ GetAll: et,
84
+ GetByID: rt,
85
+ GetByIndex: it,
86
+ GetCurrent: ot,
87
+ GetPrimary: nt
88
+ }, Symbol.toStringTag, { value: "Module" }));
89
+ function lt(t, e = null) {
90
+ W(t, e);
91
+ }
92
+ function st(t, e) {
93
+ const n = C.Get(t), o = n[e];
94
+ if (typeof o != "function") {
95
+ console.error(`Window method '${e}' not found`);
96
+ return;
97
+ }
98
+ try {
99
+ o.call(n);
100
+ } catch (r) {
101
+ console.error(`Error calling window method '${e}': `, r);
102
+ }
103
+ }
104
+ function y(t) {
105
+ const e = t.currentTarget;
106
+ function n(r = "Yes") {
107
+ if (r !== "Yes")
108
+ return;
109
+ const a = e.getAttribute("wml-event") || e.getAttribute("data-wml-event"), d = e.getAttribute("wml-target-window") || e.getAttribute("data-wml-target-window") || "", m = e.getAttribute("wml-window") || e.getAttribute("data-wml-window"), b = e.getAttribute("wml-openurl") || e.getAttribute("data-wml-openurl");
110
+ a !== null && lt(a), m !== null && st(d, m), b !== null && O(b);
111
+ }
112
+ const o = e.getAttribute("wml-confirm") || e.getAttribute("data-wml-confirm");
113
+ o ? h({
114
+ Title: "Confirm",
115
+ Message: o,
116
+ Detached: !1,
117
+ Buttons: [
118
+ { Label: "Yes" },
119
+ { Label: "No", IsDefault: !0 }
120
+ ]
121
+ }).then(n) : n();
122
+ }
123
+ const u = Symbol("controller"), s = Symbol("triggerMap"), i = Symbol("elementCount");
124
+ class ct {
125
+ constructor() {
126
+ this[u] = new AbortController();
127
+ }
128
+ /**
129
+ * Returns an options object for addEventListener that ties the listener
130
+ * to the AbortSignal from the current AbortController.
131
+ *
132
+ * @param element - An HTML element
133
+ * @param triggers - The list of active WML trigger events for the specified elements
134
+ */
135
+ set(e, n) {
136
+ return { signal: this[u].signal };
137
+ }
138
+ /**
139
+ * Removes all registered event listeners and resets the registry.
140
+ */
141
+ reset() {
142
+ this[u].abort(), this[u] = new AbortController();
143
+ }
144
+ }
145
+ class at {
146
+ constructor() {
147
+ this[s] = /* @__PURE__ */ new WeakMap(), this[i] = 0;
148
+ }
149
+ /**
150
+ * Sets active triggers for the specified element.
151
+ *
152
+ * @param element - An HTML element
153
+ * @param triggers - The list of active WML trigger events for the specified element
154
+ */
155
+ set(e, n) {
156
+ return this[s].has(e) || this[i]++, this[s].set(e, n), {};
157
+ }
158
+ /**
159
+ * Removes all registered event listeners.
160
+ */
161
+ reset() {
162
+ if (!(this[i] <= 0)) {
163
+ for (const e of document.body.querySelectorAll("*")) {
164
+ if (this[i] <= 0)
165
+ break;
166
+ const n = this[s].get(e);
167
+ n != null && this[i]--;
168
+ for (const o of n || [])
169
+ e.removeEventListener(o, y);
170
+ }
171
+ this[s] = /* @__PURE__ */ new WeakMap(), this[i] = 0;
172
+ }
173
+ }
174
+ }
175
+ const S = M() ? new ct() : new at();
176
+ function ut(t) {
177
+ const e = /\S+/g, n = t.getAttribute("wml-trigger") || t.getAttribute("data-wml-trigger") || "click", o = [];
178
+ let r;
179
+ for (; (r = e.exec(n)) !== null; )
180
+ o.push(r[0]);
181
+ const a = S.set(t, o);
182
+ for (const d of o)
183
+ t.addEventListener(d, y, a);
184
+ }
185
+ function gt() {
186
+ v(A);
157
187
  }
158
- function en(n) {
159
- return window.runtime.ResolveFilePaths(n);
188
+ function A() {
189
+ S.reset(), document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut);
160
190
  }
191
+ const ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
+ __proto__: null,
193
+ Enable: gt,
194
+ Reload: A
195
+ }, Symbol.toStringTag, { value: "Module" }));
161
196
  export {
162
- J as BrowserOpenURL,
163
- on as CanResolveFilePaths,
164
- Z as ClipboardGetText,
165
- _ as ClipboardSetText,
166
- K as Environment,
167
- S as EventsEmit,
168
- s as EventsOff,
169
- W as EventsOffAll,
170
- l as EventsOn,
171
- e as EventsOnMultiple,
172
- a as EventsOnce,
173
- X as Hide,
174
- r as LogDebug,
175
- f as LogError,
176
- c as LogFatal,
177
- d as LogInfo,
178
- w as LogPrint,
179
- u as LogTrace,
180
- m as LogWarning,
181
- $ as OnFileDrop,
182
- nn as OnFileDropOff,
183
- V as Quit,
184
- en as ResolveFilePaths,
185
- Q as ScreenGetAll,
186
- Y as Show,
187
- v as WindowCenter,
188
- M as WindowFullscreen,
189
- z as WindowGetPosition,
190
- C as WindowGetSize,
191
- A as WindowHide,
192
- F as WindowIsFullscreen,
193
- k as WindowIsMaximised,
194
- j as WindowIsMinimised,
195
- q as WindowIsNormal,
196
- U as WindowMaximise,
197
- B as WindowMinimise,
198
- g as WindowReload,
199
- p as WindowReloadApp,
200
- L as WindowSetAlwaysOnTop,
201
- N as WindowSetBackgroundColour,
202
- h as WindowSetDarkTheme,
203
- T as WindowSetLightTheme,
204
- I as WindowSetMaxSize,
205
- P as WindowSetMinSize,
206
- R as WindowSetPosition,
207
- D as WindowSetSize,
208
- O as WindowSetSystemDefaultTheme,
209
- E as WindowSetTitle,
210
- G as WindowShow,
211
- b as WindowToggleMaximise,
212
- x as WindowUnfullscreen,
213
- y as WindowUnmaximise,
214
- H as WindowUnminimise
197
+ wt as Application,
198
+ Mt as Browser,
199
+ Wt as Call,
200
+ mt as Clipboard,
201
+ bt as Dialogs,
202
+ Ct as Events,
203
+ At as Flags,
204
+ pt as Screens,
205
+ _t as System,
206
+ ht as WML,
207
+ C as Window
215
208
  };