@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.
- package/dist/cjs/dialog/index.cjs +37 -41
- package/dist/cjs/dialog/index.native.cjs +59 -0
- package/dist/cjs/dialog/index.native.js +38 -41
- package/dist/cjs/dialog/index.native.js.map +1 -1
- package/dist/cjs/dialog/index.tauri.cjs +58 -62
- package/dist/cjs/dialog/index.tauri.native.cjs +72 -0
- package/dist/cjs/dialog/index.tauri.native.js +58 -61
- package/dist/cjs/dialog/index.tauri.native.js.map +1 -1
- package/dist/cjs/fs/index.cjs +35 -39
- package/dist/cjs/fs/index.native.cjs +48 -0
- package/dist/cjs/fs/index.native.js +35 -38
- package/dist/cjs/fs/index.native.js.map +1 -1
- package/dist/cjs/fs/index.tauri.cjs +35 -39
- package/dist/cjs/fs/index.tauri.native.cjs +49 -0
- package/dist/cjs/fs/index.tauri.native.js +35 -38
- package/dist/cjs/fs/index.tauri.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -11
- package/dist/cjs/index.native.cjs +23 -0
- package/dist/cjs/index.native.js +9 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/paths/index.cjs +31 -35
- package/dist/cjs/paths/index.native.cjs +50 -0
- package/dist/cjs/paths/index.native.js +37 -40
- package/dist/cjs/paths/index.native.js.map +1 -1
- package/dist/cjs/paths/index.tauri.cjs +29 -41
- package/dist/cjs/paths/index.tauri.native.cjs +49 -0
- package/dist/cjs/paths/index.tauri.native.js +35 -46
- package/dist/cjs/paths/index.tauri.native.js.map +1 -1
- package/dist/cjs/updater/index.cjs +23 -27
- package/dist/cjs/updater/index.native.cjs +36 -0
- package/dist/cjs/updater/index.native.js +23 -26
- package/dist/cjs/updater/index.native.js.map +1 -1
- package/dist/cjs/updater/index.tauri.cjs +74 -87
- package/dist/cjs/updater/index.tauri.native.cjs +95 -0
- package/dist/cjs/updater/index.tauri.native.js +76 -88
- package/dist/cjs/updater/index.tauri.native.js.map +1 -1
- package/dist/esm/dialog/index.mjs +24 -23
- package/dist/esm/dialog/index.mjs.map +1 -1
- package/dist/esm/dialog/index.native.js +25 -24
- package/dist/esm/dialog/index.native.js.map +1 -1
- package/dist/esm/dialog/index.tauri.mjs +47 -45
- package/dist/esm/dialog/index.tauri.mjs.map +1 -1
- package/dist/esm/dialog/index.tauri.native.js +47 -45
- package/dist/esm/dialog/index.tauri.native.js.map +1 -1
- package/dist/esm/fs/index.mjs +22 -21
- package/dist/esm/fs/index.mjs.map +1 -1
- package/dist/esm/fs/index.native.js +22 -21
- package/dist/esm/fs/index.native.js.map +1 -1
- package/dist/esm/fs/index.tauri.mjs +24 -22
- package/dist/esm/fs/index.tauri.mjs.map +1 -1
- package/dist/esm/fs/index.tauri.native.js +24 -22
- package/dist/esm/fs/index.tauri.native.js.map +1 -1
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/index.native.js +7 -5
- package/dist/esm/paths/index.mjs +18 -17
- package/dist/esm/paths/index.mjs.map +1 -1
- package/dist/esm/paths/index.native.js +24 -23
- package/dist/esm/paths/index.native.js.map +1 -1
- package/dist/esm/paths/index.tauri.mjs +17 -23
- package/dist/esm/paths/index.tauri.mjs.map +1 -1
- package/dist/esm/paths/index.tauri.native.js +23 -29
- package/dist/esm/paths/index.tauri.native.js.map +1 -1
- package/dist/esm/updater/index.mjs +10 -9
- package/dist/esm/updater/index.mjs.map +1 -1
- package/dist/esm/updater/index.native.js +10 -9
- package/dist/esm/updater/index.native.js.map +1 -1
- package/dist/esm/updater/index.tauri.mjs +58 -61
- package/dist/esm/updater/index.tauri.mjs.map +1 -1
- package/dist/esm/updater/index.tauri.native.js +60 -63
- package/dist/esm/updater/index.tauri.native.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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,"
|
|
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 {
|
|
1
|
+
import { ask, confirm, message, open, save } from "@tauri-apps/plugin-dialog";
|
|
2
|
+
|
|
2
3
|
const dialog = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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,"
|
|
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 {
|
|
1
|
+
import { ask, confirm, message, open, save } from "@tauri-apps/plugin-dialog";
|
|
2
|
+
|
|
2
3
|
var dialog = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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,"
|
|
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"}
|
package/dist/esm/fs/index.mjs
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
const fs = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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","
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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","
|
|
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 {
|
|
1
|
+
import { copyFile, exists, mkdir, readTextFile, remove, rename, writeTextFile } from "@tauri-apps/plugin-fs";
|
|
2
|
+
|
|
2
3
|
const fs = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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,"
|
|
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 {
|
|
1
|
+
import { copyFile, exists, mkdir, readTextFile, remove, rename, writeTextFile } from "@tauri-apps/plugin-fs";
|
|
2
|
+
|
|
2
3
|
var fs = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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,"
|
|
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"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * from "./dialog/index.mjs"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
|
|
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"
|