@multiplatform.one/desktop 9.17.0 → 10.1.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
@@ -1 +1 @@
1
- {"version":3,"names":["browserDialog","name","api","fn","window","Error","bind","dialog","open","_options","save","message","options","title","ask","confirm","prompt","defaultValue"],"sources":["../../../src/dialog/index.ts"],"sourcesContent":[null],"mappings":"AA4DA,SAASA,cACPC,IAAA,EACAC,GAAA,EAC2B;EAC3B,MAAMC,EAAA,GAAK,OAAOC,MAAA,KAAW,cAAc,SAAYA,MAAA,CAAOH,IAAI;EAClE,IAAI,OAAOE,EAAA,KAAO,YAAY;IAC5B,MAAM,IAAIE,KAAA,CACR,sCAAsCH,GAAG,iBAAiBD,IAAI,6KAGhE;EACF;EACA,OAAOE,EAAA,CAAGG,IAAA,CAAKF,MAAM;AACvB;AAEO,MAAMG,MAAA,GAAoB;EAC/B,MAAMC,KAAKC,QAAA,EAAiE;IAG1E,OAAO;EACT;EACA,MAAMC,KAAKD,QAAA,EAAsD;IAC/D,OAAO;EACT;EACA,MAAME,QAAQA,OAAA,EAAiBC,OAAA,EAA+C;IAC5EZ,aAAA,CAAc,SAAS,SAAS,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/F;EACA,MAAMG,IAAIH,OAAA,EAAiBC,OAAA,EAAkD;IAC3E,OAAOZ,aAAA,CACL,WACA,KACF,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMI,QAAQJ,OAAA,EAAiBC,OAAA,EAAkD;IAC/E,OAAOZ,aAAA,CACL,WACA,SACF,EAAEY,OAAA,EAASC,KAAA,GAAQ,GAAGD,OAAA,CAAQC,KAAK;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMK,OAAOL,OAAA,EAAiBM,YAAA,GAAe,IAA4B;IACvE,OAAOjB,aAAA,CAAc,UAAU,QAAQ,EAAEW,OAAA,EAASM,YAAY;EAChE;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/dialog/index.js"],"sourcesContent":["function browserDialog(name, api) {\n const fn = typeof window === \"undefined\" ? void 0 : window[name];\n if (typeof fn !== \"function\") {\n throw new Error(\n `@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 }\n return fn.bind(window);\n}\nconst 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?.title ? `${options.title}\n\n${message}` : message);\n },\n async ask(message, options) {\n return browserDialog(\n \"confirm\",\n \"ask\"\n )(options?.title ? `${options.title}\n\n${message}` : message);\n },\n async confirm(message, options) {\n return browserDialog(\n \"confirm\",\n \"confirm\"\n )(options?.title ? `${options.title}\n\n${message}` : message);\n },\n async prompt(message, defaultValue = \"\") {\n return browserDialog(\"prompt\", \"prompt\")(message, defaultValue);\n }\n};\nexport {\n dialog\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";AAAA,SAAS,cAAc,MAAM,KAAK;CAChC,MAAM,KAAK,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO;CAC3D,IAAI,OAAO,OAAO,YAAY;EAC5B,MAAM,IAAI,MACR,sCAAsC,IAAI,gBAAgB,KAAK,4KACjE;CACF;CACA,OAAO,GAAG,KAAK,MAAM;AACvB;AACA,MAAM,SAAS;CACb,MAAM,KAAK,UAAU;EACnB,OAAO;CACT;CACA,MAAM,KAAK,UAAU;EACnB,OAAO;CACT;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,cAAc,SAAS,SAAS,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,MAAM;;EAEtE,YAAY,OAAO;CACnB;CACA,MAAM,IAAI,SAAS,SAAS;EAC1B,OAAO,cACL,WACA,KACF,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,MAAM;;EAEtC,YAAY,OAAO;CACnB;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,OAAO,cACL,WACA,SACF,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,MAAM;;EAEtC,YAAY,OAAO;CACnB;CACA,MAAM,OAAO,SAAS,eAAe,IAAI;EACvC,OAAO,cAAc,UAAU,QAAQ,CAAC,CAAC,SAAS,YAAY;CAChE;AACF"}
@@ -1,36 +1,37 @@
1
1
  function browserDialog(name, api) {
2
- var fn = typeof window === "undefined" ? void 0 : window[name];
3
- if (typeof fn !== "function") {
4
- 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.`);
5
- }
6
- return fn.bind(window);
2
+ var fn = typeof window === "undefined" ? void 0 : window[name];
3
+ if (typeof fn !== "function") {
4
+ 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.`);
5
+ }
6
+ return fn.bind(window);
7
7
  }
8
8
  var dialog = {
9
- async open(_options) {
10
- return null;
11
- },
12
- async save(_options) {
13
- return null;
14
- },
15
- async message(message, options) {
16
- browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
9
+ async open(_options) {
10
+ return null;
11
+ },
12
+ async save(_options) {
13
+ return null;
14
+ },
15
+ async message(message, options) {
16
+ browserDialog("alert", "message")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
17
17
 
18
18
  ${message}` : message);
19
- },
20
- async ask(message, options) {
21
- return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
19
+ },
20
+ async ask(message, options) {
21
+ return browserDialog("confirm", "ask")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
22
22
 
23
23
  ${message}` : message);
24
- },
25
- async confirm(message, options) {
26
- return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
24
+ },
25
+ async confirm(message, options) {
26
+ return browserDialog("confirm", "confirm")((options === null || options === void 0 ? void 0 : options.title) ? `${options.title}
27
27
 
28
28
  ${message}` : message);
29
- },
30
- async prompt(message) {
31
- var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
32
- return browserDialog("prompt", "prompt")(message, defaultValue);
33
- }
29
+ },
30
+ async prompt(message) {
31
+ var defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
32
+ return browserDialog("prompt", "prompt")(message, defaultValue);
33
+ }
34
34
  };
35
+
35
36
  export { dialog };
36
37
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["browserDialog","name","api","fn","window","Error","bind","dialog","open","_options","save","message","options","title","ask","confirm","prompt","defaultValue","arguments","length"],"sources":["../../../src/dialog/index.ts"],"sourcesContent":[null],"mappings":"AA4DA,SAASA,cACPC,IAAA,EACAC,GAAA,EAC2B;EAC3B,IAAAC,EAAM,UAAKC,MAAO,gBAAW,QAAc,IAAAA,MAAY,CAAAH,IAAO;EAC9D,IAAI,OAAOE,EAAA,KAAO,YAAY;IAC5B,MAAM,IAAIE,KAAA,uCAAAH,GAAA,iBAAAD,IAAA;EAAA;EACsD,OAGhEE,EAAA,CAAAG,IAAA,CAAAF,MAAA;AAAA;AAEF,IAAAG,MAAO,GAAG;EACZ,MAAAC,KAAAC,QAAA;IAEO,OAAM,IAAoB;EAC/B;EAGE,MAAAC,IAAOA,CAAAD,QAAA;IACT;EACA;EACE,MAAAE,OAAOA,QAAA,EAAAC,OAAA;IACTZ,aAAA,sBAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAEE,EAAAF,OAAA,KAAAA,OAAc;EAAqD;EAAO,MAAAG,GAAOA,CAAAH,OAAK,EAAOC,OAAA;IAC/F,OAAAZ,aAAA,oBAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAEE,EAAAF,OAAA,EAAO,GAAAA,OAAA;EAAA;EACL,MACAI,QAAAJ,OAAA,EAAAC,OAAA;IACF,OAAEZ,aAAiB,UAAW,WAAK,GAAAY,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAC,KAAA,OAAAD,OAAA,CAAAC,KAAA;AAAA;AAAA,EAAOF,OAAO,KAAKA,OAAO;EAC/D;EACA,MAAMK,OAAAL,OAAQ;IACZ,IAAAM,YAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAA,OACLlB,aAAA,qBAAAW,OAAA,EAAAM,YAAA;EAAA;AACA;AACiC,SAAOV,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/dialog/index.native.js"],"sourcesContent":["function 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};\nexport {\n dialog\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";AAAA,SAAS,cAAc,MAAM,KAAK;CAChC,IAAI,KAAK,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO;CACzD,IAAI,OAAO,OAAO,YAAY;EAC5B,MAAM,IAAI,MAAM,sCAAsC,IAAI,gBAAgB,KAAK,4KAA4K;CAC7P;CACA,OAAO,GAAG,KAAK,MAAM;AACvB;AACA,IAAI,SAAS;CACX,MAAM,KAAK,UAAU;EACnB,OAAO;CACT;CACA,MAAM,KAAK,UAAU;EACnB,OAAO;CACT;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,cAAc,SAAS,SAAS,CAAC,EAAE,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,SAAS,GAAG,QAAQ,MAAM;;EAEzH,YAAY,OAAO;CACnB;CACA,MAAM,IAAI,SAAS,SAAS;EAC1B,OAAO,cAAc,WAAW,KAAK,CAAC,EAAE,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,SAAS,GAAG,QAAQ,MAAM;;EAE9H,YAAY,OAAO;CACnB;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,OAAO,cAAc,WAAW,SAAS,CAAC,EAAE,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,SAAS,GAAG,QAAQ,MAAM;;EAElI,YAAY,OAAO;CACnB;CACA,MAAM,OAAO,SAAS;EACpB,IAAI,eAAe,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;EACpF,OAAO,cAAc,UAAU,QAAQ,CAAC,CAAC,SAAS,YAAY;CAChE;AACF"}
@@ -1,49 +1,51 @@
1
- import { open as tauriOpen, save as tauriSave, message as tauriMessage, ask as tauriAsk, confirm as tauriConfirm } from "@tauri-apps/plugin-dialog";
1
+ import { ask, confirm, message, open, save } from "@tauri-apps/plugin-dialog";
2
+
2
3
  const dialog = {
3
- async open(options) {
4
- const result = await tauriOpen({
5
- title: options?.title,
6
- defaultPath: options?.defaultPath,
7
- filters: options?.filters,
8
- multiple: options?.multiple,
9
- directory: options?.directory
10
- });
11
- return result;
12
- },
13
- async save(options) {
14
- const result = await tauriSave({
15
- title: options?.title,
16
- defaultPath: options?.defaultPath,
17
- filters: options?.filters
18
- });
19
- return result;
20
- },
21
- async message(message, options) {
22
- await tauriMessage(message, {
23
- title: options?.title,
24
- kind: options?.kind,
25
- okLabel: options?.okLabel
26
- });
27
- },
28
- async ask(message, options) {
29
- return tauriAsk(message, {
30
- title: options?.title,
31
- kind: options?.kind,
32
- okLabel: options?.okLabel,
33
- cancelLabel: options?.cancelLabel
34
- });
35
- },
36
- async confirm(message, options) {
37
- return tauriConfirm(message, {
38
- title: options?.title,
39
- kind: options?.kind,
40
- okLabel: options?.okLabel,
41
- cancelLabel: options?.cancelLabel
42
- });
43
- },
44
- async prompt(_message, _defaultValue) {
45
- return null;
46
- }
4
+ async open(options) {
5
+ const result = await open({
6
+ title: options?.title,
7
+ defaultPath: options?.defaultPath,
8
+ filters: options?.filters,
9
+ multiple: options?.multiple,
10
+ directory: options?.directory
11
+ });
12
+ return result;
13
+ },
14
+ async save(options) {
15
+ const result = await save({
16
+ title: options?.title,
17
+ defaultPath: options?.defaultPath,
18
+ filters: options?.filters
19
+ });
20
+ return result;
21
+ },
22
+ async message(message$1, options) {
23
+ await message(message$1, {
24
+ title: options?.title,
25
+ kind: options?.kind,
26
+ okLabel: options?.okLabel
27
+ });
28
+ },
29
+ async ask(message, options) {
30
+ return ask(message, {
31
+ title: options?.title,
32
+ kind: options?.kind,
33
+ okLabel: options?.okLabel,
34
+ cancelLabel: options?.cancelLabel
35
+ });
36
+ },
37
+ async confirm(message, options) {
38
+ return confirm(message, {
39
+ title: options?.title,
40
+ kind: options?.kind,
41
+ okLabel: options?.okLabel,
42
+ cancelLabel: options?.cancelLabel
43
+ });
44
+ },
45
+ async prompt(_message, _defaultValue) {
46
+ return null;
47
+ }
47
48
  };
49
+
48
50
  export { dialog };
49
51
  //# sourceMappingURL=index.tauri.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["open","tauriOpen","save","tauriSave","message","tauriMessage","ask","tauriAsk","confirm","tauriConfirm","dialog","options","result","title","defaultPath","filters","multiple","directory","kind","okLabel","cancelLabel","prompt","_message","_defaultValue"],"sources":["../../../src/dialog/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAA,IAAQC,SAAA,EACRC,IAAA,IAAQC,SAAA,EACRC,OAAA,IAAWC,YAAA,EACXC,GAAA,IAAOC,QAAA,EACPC,OAAA,IAAWC,YAAA,QACN;AASA,MAAMC,MAAA,GAAoB;EAC/B,MAAMV,KAAKW,OAAA,EAAgE;IACzE,MAAMC,MAAA,GAAS,MAAMX,SAAA,CAAU;MAC7BY,KAAA,EAAOF,OAAA,EAASE,KAAA;MAChBC,WAAA,EAAaH,OAAA,EAASG,WAAA;MACtBC,OAAA,EAASJ,OAAA,EAASI,OAAA;MAClBC,QAAA,EAAUL,OAAA,EAASK,QAAA;MACnBC,SAAA,EAAWN,OAAA,EAASM;IACtB,CAAC;IACD,OAAOL,MAAA;EACT;EACA,MAAMV,KAAKS,OAAA,EAAqD;IAC9D,MAAMC,MAAA,GAAS,MAAMT,SAAA,CAAU;MAC7BU,KAAA,EAAOF,OAAA,EAASE,KAAA;MAChBC,WAAA,EAAaH,OAAA,EAASG,WAAA;MACtBC,OAAA,EAASJ,OAAA,EAASI;IACpB,CAAC;IACD,OAAOH,MAAA;EACT;EACA,MAAMR,QAAQA,OAAA,EAAiBO,OAAA,EAA+C;IAC5E,MAAMN,YAAA,CAAaD,OAAA,EAAS;MAC1BS,KAAA,EAAOF,OAAA,EAASE,KAAA;MAChBK,IAAA,EAAMP,OAAA,EAASO,IAAA;MACfC,OAAA,EAASR,OAAA,EAASQ;IACpB,CAAC;EACH;EACA,MAAMb,IAAIF,OAAA,EAAiBO,OAAA,EAAkD;IAC3E,OAAOJ,QAAA,CAASH,OAAA,EAAS;MACvBS,KAAA,EAAOF,OAAA,EAASE,KAAA;MAChBK,IAAA,EAAMP,OAAA,EAASO,IAAA;MACfC,OAAA,EAASR,OAAA,EAASQ,OAAA;MAClBC,WAAA,EAAaT,OAAA,EAASS;IACxB,CAAC;EACH;EACA,MAAMZ,QAAQJ,OAAA,EAAiBO,OAAA,EAAkD;IAC/E,OAAOF,YAAA,CAAaL,OAAA,EAAS;MAC3BS,KAAA,EAAOF,OAAA,EAASE,KAAA;MAChBK,IAAA,EAAMP,OAAA,EAASO,IAAA;MACfC,OAAA,EAASR,OAAA,EAASQ,OAAA;MAClBC,WAAA,EAAaT,OAAA,EAASS;IACxB,CAAC;EACH;EACA,MAAMC,OAAOC,QAAA,EAAkBC,aAAA,EAAgD;IAC7E,OAAO;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.tauri.js","names":["tauriOpen","tauriSave","tauriMessage","message","tauriAsk","tauriConfirm"],"sources":["esm/dialog/index.tauri.js"],"sourcesContent":["import {\n open as tauriOpen,\n save as tauriSave,\n message as tauriMessage,\n ask as tauriAsk,\n confirm as tauriConfirm\n} from \"@tauri-apps/plugin-dialog\";\nconst dialog = {\n async open(options) {\n const result = await tauriOpen({\n title: options?.title,\n defaultPath: options?.defaultPath,\n filters: options?.filters,\n multiple: options?.multiple,\n directory: options?.directory\n });\n return result;\n },\n async save(options) {\n const result = await tauriSave({\n title: options?.title,\n defaultPath: options?.defaultPath,\n filters: options?.filters\n });\n return result;\n },\n async message(message, options) {\n await tauriMessage(message, {\n title: options?.title,\n kind: options?.kind,\n okLabel: options?.okLabel\n });\n },\n async ask(message, options) {\n return tauriAsk(message, {\n title: options?.title,\n kind: options?.kind,\n okLabel: options?.okLabel,\n cancelLabel: options?.cancelLabel\n });\n },\n async confirm(message, options) {\n return tauriConfirm(message, {\n title: options?.title,\n kind: options?.kind,\n okLabel: options?.okLabel,\n cancelLabel: options?.cancelLabel\n });\n },\n async prompt(_message, _defaultValue) {\n return null;\n }\n};\nexport {\n dialog\n};\n//# sourceMappingURL=index.tauri.js.map\n"],"mappings":";;;AAOA,MAAM,SAAS;CACb,MAAM,KAAK,SAAS;EAClB,MAAM,SAAS,MAAMA,KAAU;GAC7B,OAAO,SAAS;GAChB,aAAa,SAAS;GACtB,SAAS,SAAS;GAClB,UAAU,SAAS;GACnB,WAAW,SAAS;EACtB,CAAC;EACD,OAAO;CACT;CACA,MAAM,KAAK,SAAS;EAClB,MAAM,SAAS,MAAMC,KAAU;GAC7B,OAAO,SAAS;GAChB,aAAa,SAAS;GACtB,SAAS,SAAS;EACpB,CAAC;EACD,OAAO;CACT;CACA,MAAM,QAAQ,WAAS,SAAS;EAC9B,MAAMC,QAAaC,WAAS;GAC1B,OAAO,SAAS;GAChB,MAAM,SAAS;GACf,SAAS,SAAS;EACpB,CAAC;CACH;CACA,MAAM,IAAI,SAAS,SAAS;EAC1B,OAAOC,IAAS,SAAS;GACvB,OAAO,SAAS;GAChB,MAAM,SAAS;GACf,SAAS,SAAS;GAClB,aAAa,SAAS;EACxB,CAAC;CACH;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,OAAOC,QAAa,SAAS;GAC3B,OAAO,SAAS;GAChB,MAAM,SAAS;GACf,SAAS,SAAS;GAClB,aAAa,SAAS;EACxB,CAAC;CACH;CACA,MAAM,OAAO,UAAU,eAAe;EACpC,OAAO;CACT;AACF"}
@@ -1,49 +1,51 @@
1
- import { open as tauriOpen, save as tauriSave, message as tauriMessage, ask as tauriAsk, confirm as tauriConfirm } from "@tauri-apps/plugin-dialog";
1
+ import { ask, confirm, message, open, save } from "@tauri-apps/plugin-dialog";
2
+
2
3
  var dialog = {
3
- async open(options) {
4
- var result = await tauriOpen({
5
- title: options === null || options === void 0 ? void 0 : options.title,
6
- defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
7
- filters: options === null || options === void 0 ? void 0 : options.filters,
8
- multiple: options === null || options === void 0 ? void 0 : options.multiple,
9
- directory: options === null || options === void 0 ? void 0 : options.directory
10
- });
11
- return result;
12
- },
13
- async save(options) {
14
- var result = await tauriSave({
15
- title: options === null || options === void 0 ? void 0 : options.title,
16
- defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
17
- filters: options === null || options === void 0 ? void 0 : options.filters
18
- });
19
- return result;
20
- },
21
- async message(message, options) {
22
- await tauriMessage(message, {
23
- title: options === null || options === void 0 ? void 0 : options.title,
24
- kind: options === null || options === void 0 ? void 0 : options.kind,
25
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel
26
- });
27
- },
28
- async ask(message, options) {
29
- return tauriAsk(message, {
30
- title: options === null || options === void 0 ? void 0 : options.title,
31
- kind: options === null || options === void 0 ? void 0 : options.kind,
32
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
33
- cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
34
- });
35
- },
36
- async confirm(message, options) {
37
- return tauriConfirm(message, {
38
- title: options === null || options === void 0 ? void 0 : options.title,
39
- kind: options === null || options === void 0 ? void 0 : options.kind,
40
- okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
41
- cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
42
- });
43
- },
44
- async prompt(_message, _defaultValue) {
45
- return null;
46
- }
4
+ async open(options) {
5
+ var result = await open({
6
+ title: options === null || options === void 0 ? void 0 : options.title,
7
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
8
+ filters: options === null || options === void 0 ? void 0 : options.filters,
9
+ multiple: options === null || options === void 0 ? void 0 : options.multiple,
10
+ directory: options === null || options === void 0 ? void 0 : options.directory
11
+ });
12
+ return result;
13
+ },
14
+ async save(options) {
15
+ var result = await save({
16
+ title: options === null || options === void 0 ? void 0 : options.title,
17
+ defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,
18
+ filters: options === null || options === void 0 ? void 0 : options.filters
19
+ });
20
+ return result;
21
+ },
22
+ async message(message$1, options) {
23
+ await message(message$1, {
24
+ title: options === null || options === void 0 ? void 0 : options.title,
25
+ kind: options === null || options === void 0 ? void 0 : options.kind,
26
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel
27
+ });
28
+ },
29
+ async ask(message, options) {
30
+ return ask(message, {
31
+ title: options === null || options === void 0 ? void 0 : options.title,
32
+ kind: options === null || options === void 0 ? void 0 : options.kind,
33
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
34
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
35
+ });
36
+ },
37
+ async confirm(message, options) {
38
+ return confirm(message, {
39
+ title: options === null || options === void 0 ? void 0 : options.title,
40
+ kind: options === null || options === void 0 ? void 0 : options.kind,
41
+ okLabel: options === null || options === void 0 ? void 0 : options.okLabel,
42
+ cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel
43
+ });
44
+ },
45
+ async prompt(_message, _defaultValue) {
46
+ return null;
47
+ }
47
48
  };
49
+
48
50
  export { dialog };
49
51
  //# sourceMappingURL=index.tauri.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["open","tauriOpen","save","tauriSave","message","tauriMessage","ask","tauriAsk","confirm","tauriConfirm","dialog","options","result","title","defaultPath","filters","multiple","directory","kind","okLabel","cancelLabel","prompt","_message","_defaultValue"],"sources":["../../../src/dialog/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAAAA,IAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,SAAA,EAAAC,OAAA,IAAAC,YAAA,EAAAC,GAAA,IAAAC,QAAA,EAAAC,OAAA,IAAAC,YAAA;AAAA,IACEC,MAAQ;EACR,MAAAV,IAAQA,CAAAW,OAAA;IACR,IAAAC,MAAW,SAAAX,SAAA;MACXY,KAAO,EAAAF,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MACPC,WAAW,EAAAH,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAG,WAAA;MAAAC,OACN,EAAAJ,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAI,OAAA;MASMC,QAAA,EAAoBL,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAK,QAAA;MAC/BC,SAAW,EAAAN,OAAgE,aAAAA,OAAA,uBAAAA,OAAA,CAAAM;IACzE;IAA+B,OAC7BL,MAAO;EAAS;EACM,MACtBV,KAAAS,OAAS;IAAS,IAClBC,MAAA,GAAU,MAAAT,SAAS;MACnBU,KAAA,EAAAF,OAAW,SAAS,IAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MACrBC,WAAA,EAAAH,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAG,WAAA;MACDC,OAAO,EAAAJ,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAI;IACT;IACA,OAAMH,MAAK;EACT;EAA+B,MAC7BR,OAAOA,QAAS,EAAAO,OAAA;IAAA,MAChBN,YAAa,CAAAD,OAAS;MACtBS,KAAA,EAAAF,OAAS,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MACnBK,IAAA,EAAAP,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAO,IAAA;MACDC,OAAO,EAAAR,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAQ;IACT;EACA;EACE,MAAAb,GAAMA,CAAAF,OAAA,EAAAO,OAAa;IAAS,OAC1BJ,QAAO,CAAAH,OAAS;MAChBS,KAAA,EAAMF,OAAA,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MACfK,IAAA,EAAAP,OAAS,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAO,IAAA;MACnBC,OAAA,EAAAR,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAQ,OAAA;MACHC,WAAA,EAAAT,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAS;IACA;EACE;EAAyB,MACvBZ,OAAOA,CAAAJ,OAAS,EAAAO,OAAA;IAAA,OAChBF,YAAe,CAAAL,OAAA;MACfS,KAAA,EAAAF,OAAS,KAAS,QAAAA,OAAA,uBAAAA,OAAA,CAAAE,KAAA;MAClBK,IAAA,EAAAP,OAAa,SAAS,IAAAA,OAAA,uBAAAA,OAAA,CAAAO,IAAA;MACvBC,OAAA,EAAAR,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAQ,OAAA;MACHC,WAAA,EAAAT,OAAA,aAAAA,OAAA,uBAAAA,OAAA,CAAAS;IACA;EACE;EAA6B,MAC3BC,MAAOA,CAAAC,QAAS,EAAAC,aAAA;IAAA,OAChB,IAAM;EAAS;AACG;AACI,SAE1Bb,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.tauri.native.js","names":["tauriOpen","tauriSave","tauriMessage","message","tauriAsk","tauriConfirm"],"sources":["esm/dialog/index.tauri.native.js"],"sourcesContent":["import { open as tauriOpen, save as tauriSave, message as tauriMessage, ask as tauriAsk, confirm as tauriConfirm } from \"@tauri-apps/plugin-dialog\";\nvar dialog = {\n async open(options) {\n var result = await tauriOpen({\n title: options === null || options === void 0 ? void 0 : options.title,\n defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,\n filters: options === null || options === void 0 ? void 0 : options.filters,\n multiple: options === null || options === void 0 ? void 0 : options.multiple,\n directory: options === null || options === void 0 ? void 0 : options.directory\n });\n return result;\n },\n async save(options) {\n var result = await tauriSave({\n title: options === null || options === void 0 ? void 0 : options.title,\n defaultPath: options === null || options === void 0 ? void 0 : options.defaultPath,\n filters: options === null || options === void 0 ? void 0 : options.filters\n });\n return result;\n },\n async message(message, options) {\n await tauriMessage(message, {\n title: options === null || options === void 0 ? void 0 : options.title,\n kind: options === null || options === void 0 ? void 0 : options.kind,\n okLabel: options === null || options === void 0 ? void 0 : options.okLabel\n });\n },\n async ask(message, options) {\n return tauriAsk(message, {\n title: options === null || options === void 0 ? void 0 : options.title,\n kind: options === null || options === void 0 ? void 0 : options.kind,\n okLabel: options === null || options === void 0 ? void 0 : options.okLabel,\n cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel\n });\n },\n async confirm(message, options) {\n return tauriConfirm(message, {\n title: options === null || options === void 0 ? void 0 : options.title,\n kind: options === null || options === void 0 ? void 0 : options.kind,\n okLabel: options === null || options === void 0 ? void 0 : options.okLabel,\n cancelLabel: options === null || options === void 0 ? void 0 : options.cancelLabel\n });\n },\n async prompt(_message, _defaultValue) {\n return null;\n }\n};\nexport {\n dialog\n};\n//# sourceMappingURL=index.tauri.js.map\n"],"mappings":";;;AACA,IAAI,SAAS;CACX,MAAM,KAAK,SAAS;EAClB,IAAI,SAAS,MAAMA,KAAU;GAC3B,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACjE,aAAa,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACvE,SAAS,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACnE,UAAU,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACpE,WAAW,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;EACvE,CAAC;EACD,OAAO;CACT;CACA,MAAM,KAAK,SAAS;EAClB,IAAI,SAAS,MAAMC,KAAU;GAC3B,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACjE,aAAa,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACvE,SAAS,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;EACrE,CAAC;EACD,OAAO;CACT;CACA,MAAM,QAAQ,WAAS,SAAS;EAC9B,MAAMC,QAAaC,WAAS;GAC1B,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACjE,MAAM,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GAChE,SAAS,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;EACrE,CAAC;CACH;CACA,MAAM,IAAI,SAAS,SAAS;EAC1B,OAAOC,IAAS,SAAS;GACvB,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACjE,MAAM,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GAChE,SAAS,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACnE,aAAa,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;EACzE,CAAC;CACH;CACA,MAAM,QAAQ,SAAS,SAAS;EAC9B,OAAOC,QAAa,SAAS;GAC3B,OAAO,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACjE,MAAM,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GAChE,SAAS,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;GACnE,aAAa,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ;EACzE,CAAC;CACH;CACA,MAAM,OAAO,UAAU,eAAe;EACpC,OAAO;CACT;AACF"}
@@ -1,25 +1,26 @@
1
1
  const fs = {
2
- async readTextFile(_path) {
3
- throw new Error("File system not available in browser");
4
- },
5
- async writeTextFile(_path, _contents) {
6
- throw new Error("File system not available in browser");
7
- },
8
- async exists(_path) {
9
- throw new Error("File system not available in browser");
10
- },
11
- async mkdir(_path, _options) {
12
- throw new Error("File system not available in browser");
13
- },
14
- async remove(_path, _options) {
15
- throw new Error("File system not available in browser");
16
- },
17
- async rename(_oldPath, _newPath) {
18
- throw new Error("File system not available in browser");
19
- },
20
- async copyFile(_src, _dst) {
21
- throw new Error("File system not available in browser");
22
- }
2
+ async readTextFile(_path) {
3
+ throw new Error("File system not available in browser");
4
+ },
5
+ async writeTextFile(_path, _contents) {
6
+ throw new Error("File system not available in browser");
7
+ },
8
+ async exists(_path) {
9
+ throw new Error("File system not available in browser");
10
+ },
11
+ async mkdir(_path, _options) {
12
+ throw new Error("File system not available in browser");
13
+ },
14
+ async remove(_path, _options) {
15
+ throw new Error("File system not available in browser");
16
+ },
17
+ async rename(_oldPath, _newPath) {
18
+ throw new Error("File system not available in browser");
19
+ },
20
+ async copyFile(_src, _dst) {
21
+ throw new Error("File system not available in browser");
22
+ }
23
23
  };
24
+
24
25
  export { fs };
25
26
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","readTextFile","_path","Error","writeTextFile","_contents","exists","mkdir","_options","remove","rename","_oldPath","_newPath","copyFile","_src","_dst"],"sources":["../../../src/fs/index.ts"],"sourcesContent":[null],"mappings":"AAWO,MAAMA,EAAA,GAAY;EACvB,MAAMC,aAAaC,KAAA,EAAgC;IACjD,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMC,cAAcF,KAAA,EAAeG,SAAA,EAAkC;IACnE,MAAM,IAAIF,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMG,OAAOJ,KAAA,EAAiC;IAC5C,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMI,MAAML,KAAA,EAAeM,QAAA,EAAmD;IAC5E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMM,OAAOP,KAAA,EAAeM,QAAA,EAAmD;IAC7E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMO,OAAOC,QAAA,EAAkBC,QAAA,EAAiC;IAC9D,MAAM,IAAIT,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMU,SAASC,IAAA,EAAcC,IAAA,EAA6B;IACxD,MAAM,IAAIZ,KAAA,CAAM,sCAAsC;EACxD;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/fs/index.js"],"sourcesContent":["const fs = {\n async readTextFile(_path) {\n throw new Error(\"File system not available in browser\");\n },\n async writeTextFile(_path, _contents) {\n throw new Error(\"File system not available in browser\");\n },\n async exists(_path) {\n throw new Error(\"File system not available in browser\");\n },\n async mkdir(_path, _options) {\n throw new Error(\"File system not available in browser\");\n },\n async remove(_path, _options) {\n throw new Error(\"File system not available in browser\");\n },\n async rename(_oldPath, _newPath) {\n throw new Error(\"File system not available in browser\");\n },\n async copyFile(_src, _dst) {\n throw new Error(\"File system not available in browser\");\n }\n};\nexport {\n fs\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";AAAA,MAAM,KAAK;CACT,MAAM,aAAa,OAAO;EACxB,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,cAAc,OAAO,WAAW;EACpC,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,OAAO;EAClB,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,MAAM,OAAO,UAAU;EAC3B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,OAAO,UAAU;EAC5B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,UAAU,UAAU;EAC/B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,SAAS,MAAM,MAAM;EACzB,MAAM,IAAI,MAAM,sCAAsC;CACxD;AACF"}
@@ -1,25 +1,26 @@
1
1
  var fs = {
2
- async readTextFile(_path) {
3
- throw new Error("File system not available in browser");
4
- },
5
- async writeTextFile(_path, _contents) {
6
- throw new Error("File system not available in browser");
7
- },
8
- async exists(_path) {
9
- throw new Error("File system not available in browser");
10
- },
11
- async mkdir(_path, _options) {
12
- throw new Error("File system not available in browser");
13
- },
14
- async remove(_path, _options) {
15
- throw new Error("File system not available in browser");
16
- },
17
- async rename(_oldPath, _newPath) {
18
- throw new Error("File system not available in browser");
19
- },
20
- async copyFile(_src, _dst) {
21
- throw new Error("File system not available in browser");
22
- }
2
+ async readTextFile(_path) {
3
+ throw new Error("File system not available in browser");
4
+ },
5
+ async writeTextFile(_path, _contents) {
6
+ throw new Error("File system not available in browser");
7
+ },
8
+ async exists(_path) {
9
+ throw new Error("File system not available in browser");
10
+ },
11
+ async mkdir(_path, _options) {
12
+ throw new Error("File system not available in browser");
13
+ },
14
+ async remove(_path, _options) {
15
+ throw new Error("File system not available in browser");
16
+ },
17
+ async rename(_oldPath, _newPath) {
18
+ throw new Error("File system not available in browser");
19
+ },
20
+ async copyFile(_src, _dst) {
21
+ throw new Error("File system not available in browser");
22
+ }
23
23
  };
24
+
24
25
  export { fs };
25
26
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","readTextFile","_path","Error","writeTextFile","_contents","exists","mkdir","_options","remove","rename","_oldPath","_newPath","copyFile","_src","_dst"],"sources":["../../../src/fs/index.ts"],"sourcesContent":[null],"mappings":"AAWO,IAAAA,EAAM;EACX,MAAMC,aAAaC,KAAA,EAAgC;IACjD,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMC,cAAcF,KAAA,EAAeG,SAAA,EAAkC;IACnE,MAAM,IAAIF,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMG,OAAOJ,KAAA,EAAiC;IAC5C,MAAM,IAAIC,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMI,MAAML,KAAA,EAAeM,QAAA,EAAmD;IAC5E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMM,OAAOP,KAAA,EAAeM,QAAA,EAAmD;IAC7E,MAAM,IAAIL,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMO,OAAOC,QAAA,EAAkBC,QAAA,EAAiC;IAC9D,MAAM,IAAIT,KAAA,CAAM,sCAAsC;EACxD;EACA,MAAMU,SAASC,IAAA,EAAcC,IAAA,EAA6B;IACxD,MAAM,IAAIZ,KAAA,CAAM,sCAAsC;EACxD;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/fs/index.native.js"],"sourcesContent":["var fs = {\n async readTextFile(_path) {\n throw new Error(\"File system not available in browser\");\n },\n async writeTextFile(_path, _contents) {\n throw new Error(\"File system not available in browser\");\n },\n async exists(_path) {\n throw new Error(\"File system not available in browser\");\n },\n async mkdir(_path, _options) {\n throw new Error(\"File system not available in browser\");\n },\n async remove(_path, _options) {\n throw new Error(\"File system not available in browser\");\n },\n async rename(_oldPath, _newPath) {\n throw new Error(\"File system not available in browser\");\n },\n async copyFile(_src, _dst) {\n throw new Error(\"File system not available in browser\");\n }\n};\nexport {\n fs\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";AAAA,IAAI,KAAK;CACP,MAAM,aAAa,OAAO;EACxB,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,cAAc,OAAO,WAAW;EACpC,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,OAAO;EAClB,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,MAAM,OAAO,UAAU;EAC3B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,OAAO,UAAU;EAC5B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,OAAO,UAAU,UAAU;EAC/B,MAAM,IAAI,MAAM,sCAAsC;CACxD;CACA,MAAM,SAAS,MAAM,MAAM;EACzB,MAAM,IAAI,MAAM,sCAAsC;CACxD;AACF"}
@@ -1,26 +1,28 @@
1
- import { readTextFile as tauriReadTextFile, writeTextFile as tauriWriteTextFile, exists as tauriExists, mkdir as tauriMkdir, remove as tauriRemove, rename as tauriRename, copyFile as tauriCopyFile } from "@tauri-apps/plugin-fs";
1
+ import { copyFile, exists, mkdir, readTextFile, remove, rename, writeTextFile } from "@tauri-apps/plugin-fs";
2
+
2
3
  const fs = {
3
- async readTextFile(path) {
4
- return tauriReadTextFile(path);
5
- },
6
- async writeTextFile(path, contents) {
7
- await tauriWriteTextFile(path, contents);
8
- },
9
- async exists(path) {
10
- return tauriExists(path);
11
- },
12
- async mkdir(path, options) {
13
- await tauriMkdir(path, options);
14
- },
15
- async remove(path, options) {
16
- await tauriRemove(path, options);
17
- },
18
- async rename(oldPath, newPath) {
19
- await tauriRename(oldPath, newPath);
20
- },
21
- async copyFile(src, dst) {
22
- await tauriCopyFile(src, dst);
23
- }
4
+ async readTextFile(path) {
5
+ return readTextFile(path);
6
+ },
7
+ async writeTextFile(path, contents) {
8
+ await writeTextFile(path, contents);
9
+ },
10
+ async exists(path) {
11
+ return exists(path);
12
+ },
13
+ async mkdir(path, options) {
14
+ await mkdir(path, options);
15
+ },
16
+ async remove(path, options) {
17
+ await remove(path, options);
18
+ },
19
+ async rename(oldPath, newPath) {
20
+ await rename(oldPath, newPath);
21
+ },
22
+ async copyFile(src, dst) {
23
+ await copyFile(src, dst);
24
+ }
24
25
  };
26
+
25
27
  export { fs };
26
28
  //# sourceMappingURL=index.tauri.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["readTextFile","tauriReadTextFile","writeTextFile","tauriWriteTextFile","exists","tauriExists","mkdir","tauriMkdir","remove","tauriRemove","rename","tauriRename","copyFile","tauriCopyFile","fs","path","contents","options","oldPath","newPath","src","dst"],"sources":["../../../src/fs/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,YAAA,IAAgBC,iBAAA,EAChBC,aAAA,IAAiBC,kBAAA,EACjBC,MAAA,IAAUC,WAAA,EACVC,KAAA,IAASC,UAAA,EACTC,MAAA,IAAUC,WAAA,EACVC,MAAA,IAAUC,WAAA,EACVC,QAAA,IAAYC,aAAA,QACP;AAGA,MAAMC,EAAA,GAAY;EACvB,MAAMd,aAAae,IAAA,EAA+B;IAChD,OAAOd,iBAAA,CAAkBc,IAAI;EAC/B;EACA,MAAMb,cAAca,IAAA,EAAcC,QAAA,EAAiC;IACjE,MAAMb,kBAAA,CAAmBY,IAAA,EAAMC,QAAQ;EACzC;EACA,MAAMZ,OAAOW,IAAA,EAAgC;IAC3C,OAAOV,WAAA,CAAYU,IAAI;EACzB;EACA,MAAMT,MAAMS,IAAA,EAAcE,OAAA,EAAkD;IAC1E,MAAMV,UAAA,CAAWQ,IAAA,EAAME,OAAO;EAChC;EACA,MAAMT,OAAOO,IAAA,EAAcE,OAAA,EAAkD;IAC3E,MAAMR,WAAA,CAAYM,IAAA,EAAME,OAAO;EACjC;EACA,MAAMP,OAAOQ,OAAA,EAAiBC,OAAA,EAAgC;IAC5D,MAAMR,WAAA,CAAYO,OAAA,EAASC,OAAO;EACpC;EACA,MAAMP,SAASQ,GAAA,EAAaC,GAAA,EAA4B;IACtD,MAAMR,aAAA,CAAcO,GAAA,EAAKC,GAAG;EAC9B;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.tauri.js","names":["tauriReadTextFile","tauriWriteTextFile","tauriExists","tauriMkdir","tauriRemove","tauriRename","tauriCopyFile"],"sources":["esm/fs/index.tauri.js"],"sourcesContent":["import {\n readTextFile as tauriReadTextFile,\n writeTextFile as tauriWriteTextFile,\n exists as tauriExists,\n mkdir as tauriMkdir,\n remove as tauriRemove,\n rename as tauriRename,\n copyFile as tauriCopyFile\n} from \"@tauri-apps/plugin-fs\";\nconst fs = {\n async readTextFile(path) {\n return tauriReadTextFile(path);\n },\n async writeTextFile(path, contents) {\n await tauriWriteTextFile(path, contents);\n },\n async exists(path) {\n return tauriExists(path);\n },\n async mkdir(path, options) {\n await tauriMkdir(path, options);\n },\n async remove(path, options) {\n await tauriRemove(path, options);\n },\n async rename(oldPath, newPath) {\n await tauriRename(oldPath, newPath);\n },\n async copyFile(src, dst) {\n await tauriCopyFile(src, dst);\n }\n};\nexport {\n fs\n};\n//# sourceMappingURL=index.tauri.js.map\n"],"mappings":";;;AASA,MAAM,KAAK;CACT,MAAM,aAAa,MAAM;EACvB,OAAOA,aAAkB,IAAI;CAC/B;CACA,MAAM,cAAc,MAAM,UAAU;EAClC,MAAMC,cAAmB,MAAM,QAAQ;CACzC;CACA,MAAM,OAAO,MAAM;EACjB,OAAOC,OAAY,IAAI;CACzB;CACA,MAAM,MAAM,MAAM,SAAS;EACzB,MAAMC,MAAW,MAAM,OAAO;CAChC;CACA,MAAM,OAAO,MAAM,SAAS;EAC1B,MAAMC,OAAY,MAAM,OAAO;CACjC;CACA,MAAM,OAAO,SAAS,SAAS;EAC7B,MAAMC,OAAY,SAAS,OAAO;CACpC;CACA,MAAM,SAAS,KAAK,KAAK;EACvB,MAAMC,SAAc,KAAK,GAAG;CAC9B;AACF"}
@@ -1,26 +1,28 @@
1
- import { readTextFile as tauriReadTextFile, writeTextFile as tauriWriteTextFile, exists as tauriExists, mkdir as tauriMkdir, remove as tauriRemove, rename as tauriRename, copyFile as tauriCopyFile } from "@tauri-apps/plugin-fs";
1
+ import { copyFile, exists, mkdir, readTextFile, remove, rename, writeTextFile } from "@tauri-apps/plugin-fs";
2
+
2
3
  var fs = {
3
- async readTextFile(path) {
4
- return tauriReadTextFile(path);
5
- },
6
- async writeTextFile(path, contents) {
7
- await tauriWriteTextFile(path, contents);
8
- },
9
- async exists(path) {
10
- return tauriExists(path);
11
- },
12
- async mkdir(path, options) {
13
- await tauriMkdir(path, options);
14
- },
15
- async remove(path, options) {
16
- await tauriRemove(path, options);
17
- },
18
- async rename(oldPath, newPath) {
19
- await tauriRename(oldPath, newPath);
20
- },
21
- async copyFile(src, dst) {
22
- await tauriCopyFile(src, dst);
23
- }
4
+ async readTextFile(path) {
5
+ return readTextFile(path);
6
+ },
7
+ async writeTextFile(path, contents) {
8
+ await writeTextFile(path, contents);
9
+ },
10
+ async exists(path) {
11
+ return exists(path);
12
+ },
13
+ async mkdir(path, options) {
14
+ await mkdir(path, options);
15
+ },
16
+ async remove(path, options) {
17
+ await remove(path, options);
18
+ },
19
+ async rename(oldPath, newPath) {
20
+ await rename(oldPath, newPath);
21
+ },
22
+ async copyFile(src, dst) {
23
+ await copyFile(src, dst);
24
+ }
24
25
  };
26
+
25
27
  export { fs };
26
28
  //# sourceMappingURL=index.tauri.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["readTextFile","tauriReadTextFile","writeTextFile","tauriWriteTextFile","exists","tauriExists","mkdir","tauriMkdir","remove","tauriRemove","rename","tauriRename","copyFile","tauriCopyFile","fs","path","contents","options","oldPath","newPath","src","dst"],"sources":["../../../src/fs/index.tauri.ts"],"sourcesContent":[null],"mappings":"AAAA,SAAAA,YAAA,IAAAC,iBAAA,EAAAC,aAAA,IAAAC,kBAAA,EAAAC,MAAA,IAAAC,WAAA,EAAAC,KAAA,IAAAC,UAAA,EAAAC,MAAA,IAAAC,WAAA,EAAAC,MAAA,IAAAC,WAAA,EAAAC,QAAA,IAAAC,aAAA;AAAA,IACEC,EAAA;EACA,MAAAd,YAAiBA,CAAAe,IAAA;IACjB,OAAAd,iBAAU,CAAAc,IAAA;EACV;EACA,MAAAb,aAAUA,CAAAa,IAAA,EAAAC,QAAA;IACV,MAAAb,kBAAU,CAAAY,IAAA,EAAAC,QAAA;EACV;EAAY,MACPZ,OAAAW,IAAA;IAGA,OAAkBV,WAAA,CAAAU,IAAA;EACvB;EACE,MAAAT,KAAOA,CAAAS,IAAA,EAAAE,OAAA,EAAkB;IAC3B,MAAAV,UAAA,CAAAQ,IAAA,EAAAE,OAAA;EACA;EACE,MAAAT,MAAMA,CAAAO,IAAA,EAAAE,OAAA,EAAmB;IAC3B,MAAAR,WAAA,CAAAM,IAAA,EAAAE,OAAA;EACA;EACE,MAAAP,MAAOA,CAAAQ,OAAA,EAAYC,OAAI;IACzB,MAAAR,WAAA,CAAAO,OAAA,EAAAC,OAAA;EACA;EACE,MAAAP,QAAMA,CAAAQ,GAAA,EAAWC,GAAA,EAAM;IACzB,MAAAR,aAAA,CAAAO,GAAA,EAAAC,GAAA;EACA;AACE;AAA+B,SAEjCP,EAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.tauri.native.js","names":["tauriReadTextFile","tauriWriteTextFile","tauriExists","tauriMkdir","tauriRemove","tauriRename","tauriCopyFile"],"sources":["esm/fs/index.tauri.native.js"],"sourcesContent":["import { readTextFile as tauriReadTextFile, writeTextFile as tauriWriteTextFile, exists as tauriExists, mkdir as tauriMkdir, remove as tauriRemove, rename as tauriRename, copyFile as tauriCopyFile } from \"@tauri-apps/plugin-fs\";\nvar fs = {\n async readTextFile(path) {\n return tauriReadTextFile(path);\n },\n async writeTextFile(path, contents) {\n await tauriWriteTextFile(path, contents);\n },\n async exists(path) {\n return tauriExists(path);\n },\n async mkdir(path, options) {\n await tauriMkdir(path, options);\n },\n async remove(path, options) {\n await tauriRemove(path, options);\n },\n async rename(oldPath, newPath) {\n await tauriRename(oldPath, newPath);\n },\n async copyFile(src, dst) {\n await tauriCopyFile(src, dst);\n }\n};\nexport {\n fs\n};\n//# sourceMappingURL=index.tauri.js.map\n"],"mappings":";;;AACA,IAAI,KAAK;CACP,MAAM,aAAa,MAAM;EACvB,OAAOA,aAAkB,IAAI;CAC/B;CACA,MAAM,cAAc,MAAM,UAAU;EAClC,MAAMC,cAAmB,MAAM,QAAQ;CACzC;CACA,MAAM,OAAO,MAAM;EACjB,OAAOC,OAAY,IAAI;CACzB;CACA,MAAM,MAAM,MAAM,SAAS;EACzB,MAAMC,MAAW,MAAM,OAAO;CAChC;CACA,MAAM,OAAO,MAAM,SAAS;EAC1B,MAAMC,OAAY,MAAM,OAAO;CACjC;CACA,MAAM,OAAO,SAAS,SAAS;EAC7B,MAAMC,OAAY,SAAS,OAAO;CACpC;CACA,MAAM,SAAS,KAAK,KAAK;EACvB,MAAMC,SAAc,KAAK,GAAG;CAC9B;AACF"}
@@ -1,5 +1,7 @@
1
- export * from "./dialog/index.mjs";
2
- export * from "./fs/index.mjs";
3
- export * from "./paths/index.mjs";
4
- export * from "./updater/index.mjs";
5
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./dialog/index.mjs"
2
+
3
+ export * from "./fs/index.mjs"
4
+
5
+ export * from "./paths/index.mjs"
6
+
7
+ export * from "./updater/index.mjs"