@multiplatform.one/desktop 9.17.0 → 10.0.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 (73) hide show
  1. package/dist/cjs/dialog/index.cjs +37 -41
  2. package/dist/cjs/dialog/index.native.cjs +59 -0
  3. package/dist/cjs/dialog/index.native.js +38 -41
  4. package/dist/cjs/dialog/index.native.js.map +1 -1
  5. package/dist/cjs/dialog/index.tauri.cjs +58 -62
  6. package/dist/cjs/dialog/index.tauri.native.cjs +72 -0
  7. package/dist/cjs/dialog/index.tauri.native.js +58 -61
  8. package/dist/cjs/dialog/index.tauri.native.js.map +1 -1
  9. package/dist/cjs/fs/index.cjs +35 -39
  10. package/dist/cjs/fs/index.native.cjs +48 -0
  11. package/dist/cjs/fs/index.native.js +35 -38
  12. package/dist/cjs/fs/index.native.js.map +1 -1
  13. package/dist/cjs/fs/index.tauri.cjs +35 -39
  14. package/dist/cjs/fs/index.tauri.native.cjs +49 -0
  15. package/dist/cjs/fs/index.tauri.native.js +35 -38
  16. package/dist/cjs/fs/index.tauri.native.js.map +1 -1
  17. package/dist/cjs/index.cjs +9 -11
  18. package/dist/cjs/index.native.cjs +23 -0
  19. package/dist/cjs/index.native.js +9 -10
  20. package/dist/cjs/index.native.js.map +1 -1
  21. package/dist/cjs/paths/index.cjs +31 -35
  22. package/dist/cjs/paths/index.native.cjs +50 -0
  23. package/dist/cjs/paths/index.native.js +37 -40
  24. package/dist/cjs/paths/index.native.js.map +1 -1
  25. package/dist/cjs/paths/index.tauri.cjs +29 -41
  26. package/dist/cjs/paths/index.tauri.native.cjs +49 -0
  27. package/dist/cjs/paths/index.tauri.native.js +35 -46
  28. package/dist/cjs/paths/index.tauri.native.js.map +1 -1
  29. package/dist/cjs/updater/index.cjs +23 -27
  30. package/dist/cjs/updater/index.native.cjs +36 -0
  31. package/dist/cjs/updater/index.native.js +23 -26
  32. package/dist/cjs/updater/index.native.js.map +1 -1
  33. package/dist/cjs/updater/index.tauri.cjs +74 -87
  34. package/dist/cjs/updater/index.tauri.native.cjs +95 -0
  35. package/dist/cjs/updater/index.tauri.native.js +76 -88
  36. package/dist/cjs/updater/index.tauri.native.js.map +1 -1
  37. package/dist/esm/dialog/index.mjs +24 -23
  38. package/dist/esm/dialog/index.mjs.map +1 -1
  39. package/dist/esm/dialog/index.native.js +25 -24
  40. package/dist/esm/dialog/index.native.js.map +1 -1
  41. package/dist/esm/dialog/index.tauri.mjs +47 -45
  42. package/dist/esm/dialog/index.tauri.mjs.map +1 -1
  43. package/dist/esm/dialog/index.tauri.native.js +47 -45
  44. package/dist/esm/dialog/index.tauri.native.js.map +1 -1
  45. package/dist/esm/fs/index.mjs +22 -21
  46. package/dist/esm/fs/index.mjs.map +1 -1
  47. package/dist/esm/fs/index.native.js +22 -21
  48. package/dist/esm/fs/index.native.js.map +1 -1
  49. package/dist/esm/fs/index.tauri.mjs +24 -22
  50. package/dist/esm/fs/index.tauri.mjs.map +1 -1
  51. package/dist/esm/fs/index.tauri.native.js +24 -22
  52. package/dist/esm/fs/index.tauri.native.js.map +1 -1
  53. package/dist/esm/index.mjs +7 -5
  54. package/dist/esm/index.native.js +7 -5
  55. package/dist/esm/paths/index.mjs +18 -17
  56. package/dist/esm/paths/index.mjs.map +1 -1
  57. package/dist/esm/paths/index.native.js +24 -23
  58. package/dist/esm/paths/index.native.js.map +1 -1
  59. package/dist/esm/paths/index.tauri.mjs +17 -23
  60. package/dist/esm/paths/index.tauri.mjs.map +1 -1
  61. package/dist/esm/paths/index.tauri.native.js +23 -29
  62. package/dist/esm/paths/index.tauri.native.js.map +1 -1
  63. package/dist/esm/updater/index.mjs +10 -9
  64. package/dist/esm/updater/index.mjs.map +1 -1
  65. package/dist/esm/updater/index.native.js +10 -9
  66. package/dist/esm/updater/index.native.js.map +1 -1
  67. package/dist/esm/updater/index.tauri.mjs +58 -61
  68. package/dist/esm/updater/index.tauri.mjs.map +1 -1
  69. package/dist/esm/updater/index.tauri.native.js +60 -63
  70. package/dist/esm/updater/index.tauri.native.js.map +1 -1
  71. package/package.json +2 -2
  72. package/dist/esm/index.mjs.map +0 -1
  73. package/dist/esm/index.native.js.map +0 -1
@@ -3,58 +3,54 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var dialog_exports = {};
24
- __export(dialog_exports, {
25
- dialog: () => dialog
26
- });
22
+ __export(dialog_exports, { dialog: () => dialog });
27
23
  module.exports = __toCommonJS(dialog_exports);
28
24
  function browserDialog(name, api) {
29
- const fn = typeof window === "undefined" ? void 0 : window[name];
30
- if (typeof fn !== "function") {
31
- throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
32
- }
33
- return fn.bind(window);
25
+ const fn = typeof window === "undefined" ? void 0 : window[name];
26
+ if (typeof fn !== "function") {
27
+ throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
28
+ }
29
+ return fn.bind(window);
34
30
  }
35
31
  const dialog = {
36
- async open(_options) {
37
- return null;
38
- },
39
- async save(_options) {
40
- return null;
41
- },
42
- async message(message, options) {
43
- browserDialog("alert", "message")(options?.title ? `${options.title}
32
+ async open(_options) {
33
+ return null;
34
+ },
35
+ async save(_options) {
36
+ return null;
37
+ },
38
+ async message(message, options) {
39
+ browserDialog("alert", "message")(options?.title ? `${options.title}
44
40
 
45
41
  ${message}` : message);
46
- },
47
- async ask(message, options) {
48
- return browserDialog("confirm", "ask")(options?.title ? `${options.title}
42
+ },
43
+ async ask(message, options) {
44
+ return browserDialog("confirm", "ask")(options?.title ? `${options.title}
49
45
 
50
46
  ${message}` : message);
51
- },
52
- async confirm(message, options) {
53
- return browserDialog("confirm", "confirm")(options?.title ? `${options.title}
47
+ },
48
+ async confirm(message, options) {
49
+ return browserDialog("confirm", "confirm")(options?.title ? `${options.title}
54
50
 
55
51
  ${message}` : message);
56
- },
57
- async prompt(message, defaultValue = "") {
58
- return browserDialog("prompt", "prompt")(message, defaultValue);
59
- }
60
- };
52
+ },
53
+ async prompt(message, defaultValue = "") {
54
+ return browserDialog("prompt", "prompt")(message, defaultValue);
55
+ }
56
+ };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var dialog_exports = {};
24
+ __export(dialog_exports, { dialog: () => dialog });
25
+ module.exports = __toCommonJS(dialog_exports);
26
+ function browserDialog(name, api) {
27
+ var fn = typeof window === "undefined" ? void 0 : window[name];
28
+ if (typeof fn !== "function") {
29
+ throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
30
+ }
31
+ return fn.bind(window);
32
+ }
33
+ var dialog = {
34
+ async open(_options) {
35
+ return null;
36
+ },
37
+ async save(_options) {
38
+ return null;
39
+ },
40
+ async message(message, options) {
41
+ browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
42
+
43
+ ${message}` : message);
44
+ },
45
+ async ask(message, options) {
46
+ return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
47
+
48
+ ${message}` : message);
49
+ },
50
+ async confirm(message, options) {
51
+ return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
52
+
53
+ ${message}` : message);
54
+ },
55
+ async prompt(message) {
56
+ var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
57
+ return browserDialog("prompt", "prompt")(message, defaultValue);
58
+ }
59
+ };
@@ -5,60 +5,57 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var dialog_exports = {};
26
- __export(dialog_exports, {
27
- dialog: () => dialog
28
- });
24
+ __export(dialog_exports, { dialog: () => dialog });
29
25
  module.exports = __toCommonJS(dialog_exports);
30
26
  function browserDialog(name, api) {
31
- var fn = typeof window === "undefined" ? void 0 : window[name];
32
- if (typeof fn !== "function") {
33
- throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
34
- }
35
- return fn.bind(window);
27
+ var fn = typeof window === "undefined" ? void 0 : window[name];
28
+ if (typeof fn !== "function") {
29
+ throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);
30
+ }
31
+ return fn.bind(window);
36
32
  }
37
33
  var dialog = {
38
- async open(_options) {
39
- return null;
40
- },
41
- async save(_options) {
42
- return null;
43
- },
44
- async message(message, options) {
45
- browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
34
+ async open(_options) {
35
+ return null;
36
+ },
37
+ async save(_options) {
38
+ return null;
39
+ },
40
+ async message(message, options) {
41
+ browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
46
42
 
47
43
  ${message}` : message);
48
- },
49
- async ask(message, options) {
50
- return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
44
+ },
45
+ async ask(message, options) {
46
+ return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
51
47
 
52
48
  ${message}` : message);
53
- },
54
- async confirm(message, options) {
55
- return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
49
+ },
50
+ async confirm(message, options) {
51
+ return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
56
52
 
57
53
  ${message}` : message);
58
- },
59
- async prompt(message) {
60
- var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
61
- return browserDialog("prompt", "prompt")(message, defaultValue);
62
- }
54
+ },
55
+ async prompt(message) {
56
+ var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
57
+ return browserDialog("prompt", "prompt")(message, defaultValue);
58
+ }
63
59
  };
60
+
64
61
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","dialog_exports","dialog","module","exports","browserDialog","api","fn","window","Error","bind","open","_options","save","message","options","title","ask","confirm","prompt","defaultValue","arguments","length"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar dialog_exports = {};\n__export(dialog_exports, {\n dialog: () => dialog\n});\nmodule.exports = __toCommonJS(dialog_exports);\nfunction browserDialog(name, api) {\n var fn = typeof window === \"undefined\" ? void 0 : window[name];\n if (typeof fn !== \"function\") {\n throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);\n }\n return fn.bind(window);\n}\nvar dialog = {\n async open(_options) {\n return null;\n },\n async save(_options) {\n return null;\n },\n async message(message, options) {\n browserDialog(\"alert\", \"message\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async ask(message, options) {\n return browserDialog(\"confirm\", \"ask\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async confirm(message, options) {\n return browserDialog(\"confirm\", \"confirm\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async prompt(message) {\n var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n return browserDialog(\"prompt\", \"prompt\")(message, defaultValue);\n }\n};\n//# sourceMappingURL=index.js.map\n"],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pB,CAAC;EACD,MAAMI,OAAOA,CAACJ,OAAO,EAAEC,OAAO,EAAE;IAC9B,OAAOV,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAACU,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,OAAO,CAACC,KAAK,IAAI,GAAGD,OAAO,CAACC,KAAK;AACnI;AACA,EAAEF,OAAO,EAAE,GAAGA,OAAO,CAAC;EACpB,CAAC;EACD,MAAMK,MAAMA,CAACL,OAAO,EAAE;IACpB,IAAIM,YAAY,GAAGC,SAAS,CAACC,MAAM,GAAG,CAAC,IAAID,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAGA,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE;IACtF,OAAOhB,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAACS,OAAO,EAAEM,YAAY,CAAC;EACjE;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/dialog/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar dialog_exports = {};\n__export(dialog_exports, {\n dialog: () => dialog\n});\nmodule.exports = __toCommonJS(dialog_exports);\nfunction browserDialog(name, api) {\n var fn = typeof window === \"undefined\" ? void 0 : window[name];\n if (typeof fn !== \"function\") {\n throw new Error(`@multiplatform.one/desktop: dialog.${api} needs window.${name}, which this platform does not have. The dialog defaults are the browser's modal globals and are web-only; GNOME needs an Adw.AlertDialog backend in dialog/index.gnome.ts.`);\n }\n return fn.bind(window);\n}\nvar dialog = {\n async open(_options) {\n return null;\n },\n async save(_options) {\n return null;\n },\n async message(message, options) {\n browserDialog(\"alert\", \"message\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async ask(message, options) {\n return browserDialog(\"confirm\", \"ask\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async confirm(message, options) {\n return browserDialog(\"confirm\", \"confirm\")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}\n\n${message}` : message);\n },\n async prompt(message) {\n var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n return browserDialog(\"prompt\", \"prompt\")(message, defaultValue);\n }\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,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or;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var index_tauri_exports = {};
24
- __export(index_tauri_exports, {
25
- dialog: () => dialog
26
- });
22
+ __export(index_tauri_exports, { dialog: () => dialog });
27
23
  module.exports = __toCommonJS(index_tauri_exports);
28
24
  var import_plugin_dialog = require("@tauri-apps/plugin-dialog");
29
25
  const dialog = {
30
- async open(options) {
31
- const result = await (0, import_plugin_dialog.open)({
32
- title: options?.title,
33
- defaultPath: options?.defaultPath,
34
- filters: options?.filters,
35
- multiple: options?.multiple,
36
- directory: options?.directory
37
- });
38
- return result;
39
- },
40
- async save(options) {
41
- const result = await (0, import_plugin_dialog.save)({
42
- title: options?.title,
43
- defaultPath: options?.defaultPath,
44
- filters: options?.filters
45
- });
46
- return result;
47
- },
48
- async message(message, options) {
49
- await (0, import_plugin_dialog.message)(message, {
50
- title: options?.title,
51
- kind: options?.kind,
52
- okLabel: options?.okLabel
53
- });
54
- },
55
- async ask(message, options) {
56
- return (0, import_plugin_dialog.ask)(message, {
57
- title: options?.title,
58
- kind: options?.kind,
59
- okLabel: options?.okLabel,
60
- cancelLabel: options?.cancelLabel
61
- });
62
- },
63
- async confirm(message, options) {
64
- return (0, import_plugin_dialog.confirm)(message, {
65
- title: options?.title,
66
- kind: options?.kind,
67
- okLabel: options?.okLabel,
68
- cancelLabel: options?.cancelLabel
69
- });
70
- },
71
- async prompt(_message, _defaultValue) {
72
- return null;
73
- }
74
- };
26
+ async open(options) {
27
+ const result = await (0, import_plugin_dialog.open)({
28
+ title: options?.title,
29
+ defaultPath: options?.defaultPath,
30
+ filters: options?.filters,
31
+ multiple: options?.multiple,
32
+ directory: options?.directory
33
+ });
34
+ return result;
35
+ },
36
+ async save(options) {
37
+ const result = await (0, import_plugin_dialog.save)({
38
+ title: options?.title,
39
+ defaultPath: options?.defaultPath,
40
+ filters: options?.filters
41
+ });
42
+ return result;
43
+ },
44
+ async message(message, options) {
45
+ await (0, import_plugin_dialog.message)(message, {
46
+ title: options?.title,
47
+ kind: options?.kind,
48
+ okLabel: options?.okLabel
49
+ });
50
+ },
51
+ async ask(message, options) {
52
+ return (0, import_plugin_dialog.ask)(message, {
53
+ title: options?.title,
54
+ kind: options?.kind,
55
+ okLabel: options?.okLabel,
56
+ cancelLabel: options?.cancelLabel
57
+ });
58
+ },
59
+ async confirm(message, options) {
60
+ return (0, import_plugin_dialog.confirm)(message, {
61
+ title: options?.title,
62
+ kind: options?.kind,
63
+ okLabel: options?.okLabel,
64
+ cancelLabel: options?.cancelLabel
65
+ });
66
+ },
67
+ async prompt(_message, _defaultValue) {
68
+ return null;
69
+ }
70
+ };
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var index_tauri_exports = {};
24
+ __export(index_tauri_exports, { dialog: () => dialog });
25
+ module.exports = __toCommonJS(index_tauri_exports);
26
+ var import_plugin_dialog = require("@tauri-apps/plugin-dialog");
27
+ var dialog = {
28
+ async open(options) {
29
+ var result = await (0, import_plugin_dialog.open)({
30
+ title: options === null || options === void 0 ? void 0 : options.title,
31
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
32
+ filters: options === null || options === void 0 ? void 0 : options.filters,
33
+ multiple: options === null || options === void 0 ? void 0 : options.multiple,
34
+ directory: options === null || options === void 0 ? void 0 : options.directory
35
+ });
36
+ return result;
37
+ },
38
+ async save(options) {
39
+ var result = await (0, import_plugin_dialog.save)({
40
+ title: options === null || options === void 0 ? void 0 : options.title,
41
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
42
+ filters: options === null || options === void 0 ? void 0 : options.filters
43
+ });
44
+ return result;
45
+ },
46
+ async message(message, options) {
47
+ await (0, import_plugin_dialog.message)(message, {
48
+ title: options === null || options === void 0 ? void 0 : options.title,
49
+ kind: options === null || options === void 0 ? void 0 : options.kind,
50
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel
51
+ });
52
+ },
53
+ async ask(message, options) {
54
+ return (0, import_plugin_dialog.ask)(message, {
55
+ title: options === null || options === void 0 ? void 0 : options.title,
56
+ kind: options === null || options === void 0 ? void 0 : options.kind,
57
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
58
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
59
+ });
60
+ },
61
+ async confirm(message, options) {
62
+ return (0, import_plugin_dialog.confirm)(message, {
63
+ title: options === null || options === void 0 ? void 0 : options.title,
64
+ kind: options === null || options === void 0 ? void 0 : options.kind,
65
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
66
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
67
+ });
68
+ },
69
+ async prompt(_message, _defaultValue) {
70
+ return null;
71
+ }
72
+ };
@@ -5,73 +5,70 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var index_tauri_exports = {};
26
- __export(index_tauri_exports, {
27
- dialog: () => dialog
28
- });
24
+ __export(index_tauri_exports, { dialog: () => dialog });
29
25
  module.exports = __toCommonJS(index_tauri_exports);
30
26
  var import_plugin_dialog = require("@tauri-apps/plugin-dialog");
31
27
  var dialog = {
32
- async open(options) {
33
- var result = await (0, import_plugin_dialog.open)({
34
- title: options === null || options === void 0 ? void 0 : options.title,
35
- defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
36
- filters: options === null || options === void 0 ? void 0 : options.filters,
37
- multiple: options === null || options === void 0 ? void 0 : options.multiple,
38
- directory: options === null || options === void 0 ? void 0 : options.directory
39
- });
40
- return result;
41
- },
42
- async save(options) {
43
- var result = await (0, import_plugin_dialog.save)({
44
- title: options === null || options === void 0 ? void 0 : options.title,
45
- defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
46
- filters: options === null || options === void 0 ? void 0 : options.filters
47
- });
48
- return result;
49
- },
50
- async message(message, options) {
51
- await (0, import_plugin_dialog.message)(message, {
52
- title: options === null || options === void 0 ? void 0 : options.title,
53
- kind: options === null || options === void 0 ? void 0 : options.kind,
54
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel
55
- });
56
- },
57
- async ask(message, options) {
58
- return (0, import_plugin_dialog.ask)(message, {
59
- title: options === null || options === void 0 ? void 0 : options.title,
60
- kind: options === null || options === void 0 ? void 0 : options.kind,
61
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
62
- cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
63
- });
64
- },
65
- async confirm(message, options) {
66
- return (0, import_plugin_dialog.confirm)(message, {
67
- title: options === null || options === void 0 ? void 0 : options.title,
68
- kind: options === null || options === void 0 ? void 0 : options.kind,
69
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
70
- cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
71
- });
72
- },
73
- async prompt(_message, _defaultValue) {
74
- return null;
75
- }
28
+ async open(options) {
29
+ var result = await (0, import_plugin_dialog.open)({
30
+ title: options === null || options === void 0 ? void 0 : options.title,
31
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
32
+ filters: options === null || options === void 0 ? void 0 : options.filters,
33
+ multiple: options === null || options === void 0 ? void 0 : options.multiple,
34
+ directory: options === null || options === void 0 ? void 0 : options.directory
35
+ });
36
+ return result;
37
+ },
38
+ async save(options) {
39
+ var result = await (0, import_plugin_dialog.save)({
40
+ title: options === null || options === void 0 ? void 0 : options.title,
41
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
42
+ filters: options === null || options === void 0 ? void 0 : options.filters
43
+ });
44
+ return result;
45
+ },
46
+ async message(message, options) {
47
+ await (0, import_plugin_dialog.message)(message, {
48
+ title: options === null || options === void 0 ? void 0 : options.title,
49
+ kind: options === null || options === void 0 ? void 0 : options.kind,
50
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel
51
+ });
52
+ },
53
+ async ask(message, options) {
54
+ return (0, import_plugin_dialog.ask)(message, {
55
+ title: options === null || options === void 0 ? void 0 : options.title,
56
+ kind: options === null || options === void 0 ? void 0 : options.kind,
57
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
58
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
59
+ });
60
+ },
61
+ async confirm(message, options) {
62
+ return (0, import_plugin_dialog.confirm)(message, {
63
+ title: options === null || options === void 0 ? void 0 : options.title,
64
+ kind: options === null || options === void 0 ? void 0 : options.kind,
65
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
66
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
67
+ });
68
+ },
69
+ async prompt(_message, _defaultValue) {
70
+ return null;
71
+ }
76
72
  };
73
+
77
74
  //# sourceMappingURL=index.tauri.native.js.map