From 7399922f21f9e48ac2c00b048df48ec4d210bccb Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 19 Jun 2023 09:01:00 -0300 Subject: [PATCH 1/2] chore: remove v1 references on documentation and benchmark --- core/tauri/src/window.rs | 2 +- tooling/api/docs/js-api.json | 2 +- tooling/api/src/mocks.ts | 16 +++--------- tooling/api/typedoc.json | 4 +-- tooling/bench/src/utils.rs | 6 ++++- tooling/bench/tests/Cargo.toml | 25 +------------------ .../tests/files_transfer/public/index.html | 13 +--------- .../tests/files_transfer/src-tauri/Cargo.toml | 2 +- .../files_transfer/src-tauri/src/main.rs | 17 +++++++++++-- 9 files changed, 31 insertions(+), 56 deletions(-) diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 788cdba8d6da..4609604b662a 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -2084,7 +2084,7 @@ impl Window { /// /// This listener only receives events that are triggered using the /// [`trigger`](Window#method.trigger) and [`emit_and_trigger`](Window#method.emit_and_trigger) methods or - /// the `appWindow.emit` function from the @tauri-apps/api `window` module. + /// the `emit` function from the window plugin (`@tauri-apps/plugin-window` package). /// /// # Examples /// ``` diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 5da01340e14f..e8cab1e50ffc 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L59"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L53"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L49"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L50"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L51"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L56"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L58"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L57"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L52"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L48"}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L47"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L54"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L55"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L46"}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L16"}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L20"}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L22"}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L18"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L14"}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L31"}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L25"}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L25"}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L29"}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L27"}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L27"}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":164,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L164"}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":164,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L164"}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":99,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L99"}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":99,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L99"}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":137,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L137"}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":137,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L137"}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/event.ts#L1"}]},{"id":50,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":62,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":186,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L186"}],"signatures":[{"id":63,"name":"clearMocks","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":186,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L186"}],"type":{"type":"intrinsic","name":"void"}}]},{"id":51,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L80"}],"signatures":[{"id":52,"name":"mockIPC","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L80"}],"parameters":[{"id":53,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":54,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L81"}],"signatures":[{"id":55,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L81"}],"parameters":[{"id":56,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":57,"name":"args","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":58,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":150,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L150"}],"signatures":[{"id":59,"name":"mockWindows","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":150,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L150"}],"parameters":[{"id":60,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":61,"name":"additionalWindows","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[62,51,58]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/mocks.ts#L1"}]},{"id":64,"name":"tauri","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":73,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":74,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L66"}],"signatures":[{"id":75,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L66"}],"typeParameter":[{"id":76,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":73,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":79,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L62"}],"type":{"type":"reflection","declaration":{"id":80,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L62"}],"signatures":[{"id":81,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L62"}],"parameters":[{"id":82,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":78,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L61"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":77,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L59"}],"type":{"type":"intrinsic","name":"number"}},{"id":83,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L72"},{"fileName":"tauri.ts","line":76,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L76"}],"getSignature":{"id":84,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L76"}],"type":{"type":"reflection","declaration":{"id":85,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L76"}],"signatures":[{"id":86,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L76"}],"parameters":[{"id":87,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":88,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L72"}],"parameters":[{"id":89,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":90,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L72"}],"signatures":[{"id":91,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L72"}],"parameters":[{"id":92,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":93,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L80"}],"signatures":[{"id":94,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L80"}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[74]},{"title":"Properties","children":[79,78,77]},{"title":"Accessors","children":[83]},{"title":"Methods","children":[93]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L58"}],"typeParameters":[{"id":95,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":96,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":97,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L90"}],"signatures":[{"id":98,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L90"}],"parameters":[{"id":99,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":100,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":101,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":96,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":104,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L88"}],"type":{"type":"intrinsic","name":"number"}},{"id":103,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L87"}],"type":{"type":"intrinsic","name":"string"}},{"id":102,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":86,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L86"}],"type":{"type":"intrinsic","name":"string"}},{"id":105,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":96,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L96"}],"signatures":[{"id":106,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L96"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[97]},{"title":"Properties","children":[104,103,102]},{"title":"Methods","children":[105]}],"sources":[{"fileName":"tauri.ts","line":85,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L85"}]},{"id":65,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":128,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L128"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}},{"id":107,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":111,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L111"}],"signatures":[{"id":108,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":111,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L111"}],"typeParameter":[{"id":109,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":110,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":111,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":112,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":113,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":114,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L114"}],"signatures":[{"id":114,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":114,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L114"}],"parameters":[{"id":115,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":96,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":121,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":194,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L194"}],"signatures":[{"id":122,"name":"convertFileSrc","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":194,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L194"}],"parameters":[{"id":123,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":124,"name":"protocol","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":116,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":144,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L144"}],"signatures":[{"id":117,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":144,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L144"}],"typeParameter":[{"id":118,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":119,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":120,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":65,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":66,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":67,"name":"transformCallback","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":36,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L36"}],"parameters":[{"id":68,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":69,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":70,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L37"}],"parameters":[{"id":71,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":72,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[73,96]},{"title":"Type Aliases","children":[65]},{"title":"Functions","children":[107,121,116,66]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ebf0e02d1/tooling/api/src/tauri.ts#L1"}]}],"groups":[{"title":"Modules","children":[1,50,64]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"args"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"65":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"66":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"67":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"68":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"69":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"70":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"71":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"72":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"73":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"74":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"75":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"76":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"77":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"78":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"79":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"80":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"81":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"82":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"83":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"84":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"85":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"86":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"87":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"88":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"89":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"90":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"91":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"92":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"93":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"94":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"95":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"96":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"97":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"98":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"99":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"100":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"101":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"102":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"103":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"104":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"105":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"106":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"107":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"108":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"109":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"110":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"111":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"112":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"113":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"114":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"115":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"116":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"117":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"118":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"119":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"120":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"121":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"122":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"123":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"124":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"}}} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2}],"type":{"type":"literal","value":"tauri://menu"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":164,"character":15}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":164,"character":0}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":99,"character":15}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":99,"character":0}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":137,"character":15}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"event.ts","line":137,"character":0}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0}]},{"id":50,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":62,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":178,"character":16}],"signatures":[{"id":63,"name":"clearMocks","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":178,"character":0}],"type":{"type":"intrinsic","name":"void"}}]},{"id":51,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16}],"signatures":[{"id":52,"name":"mockIPC","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0}],"parameters":[{"id":53,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":54,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6}],"signatures":[{"id":55,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6}],"parameters":[{"id":56,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":57,"name":"args","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":58,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":142,"character":16}],"signatures":[{"id":59,"name":"mockWindows","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"plugin:event|emit\") {\n console.log('emit event', args?.event, args?.payload);\n }\n});\n\nconst { emit } = await import(\"@tauri-apps/api/path\");\nawait emit('loaded'); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":142,"character":0}],"parameters":[{"id":60,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":61,"name":"additionalWindows","variant":"param","kind":32768,"flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[62,51,58]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0}]},{"id":64,"name":"path","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":65,"name":"BaseDirectory","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":81,"name":"AppCache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2}],"type":{"type":"literal","value":16}},{"id":78,"name":"AppConfig","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":32,"character":2}],"type":{"type":"literal","value":13}},{"id":79,"name":"AppData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2}],"type":{"type":"literal","value":14}},{"id":80,"name":"AppLocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2}],"type":{"type":"literal","value":15}},{"id":82,"name":"AppLog","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2}],"type":{"type":"literal","value":17}},{"id":66,"name":"Audio","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":20,"character":2}],"type":{"type":"literal","value":1}},{"id":67,"name":"Cache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":21,"character":2}],"type":{"type":"literal","value":2}},{"id":68,"name":"Config","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":22,"character":2}],"type":{"type":"literal","value":3}},{"id":69,"name":"Data","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":23,"character":2}],"type":{"type":"literal","value":4}},{"id":83,"name":"Desktop","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2}],"type":{"type":"literal","value":18}},{"id":71,"name":"Document","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":25,"character":2}],"type":{"type":"literal","value":6}},{"id":72,"name":"Download","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":26,"character":2}],"type":{"type":"literal","value":7}},{"id":84,"name":"Executable","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2}],"type":{"type":"literal","value":19}},{"id":85,"name":"Font","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2}],"type":{"type":"literal","value":20}},{"id":86,"name":"Home","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2}],"type":{"type":"literal","value":21}},{"id":70,"name":"LocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":24,"character":2}],"type":{"type":"literal","value":5}},{"id":73,"name":"Picture","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":27,"character":2}],"type":{"type":"literal","value":8}},{"id":74,"name":"Public","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":28,"character":2}],"type":{"type":"literal","value":9}},{"id":76,"name":"Resource","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":30,"character":2}],"type":{"type":"literal","value":11}},{"id":87,"name":"Runtime","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2}],"type":{"type":"literal","value":22}},{"id":77,"name":"Temp","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":31,"character":2}],"type":{"type":"literal","value":12}},{"id":88,"name":"Template","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2}],"type":{"type":"literal","value":23}},{"id":75,"name":"Video","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":29,"character":2}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[81,78,79,80,82,66,67,68,69,83,71,72,84,85,86,70,73,74,76,87,77,88,75]}],"sources":[{"fileName":"path.ts","line":19,"character":5}]},{"id":95,"name":"appCacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":119,"character":15}],"signatures":[{"id":96,"name":"appCacheDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"sources":[{"fileName":"path.ts","line":119,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":89,"name":"appConfigDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":68,"character":15}],"signatures":[{"id":90,"name":"appConfigDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"sources":[{"fileName":"path.ts","line":68,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":91,"name":"appDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":85,"character":15}],"signatures":[{"id":92,"name":"appDataDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"sources":[{"fileName":"path.ts","line":85,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":93,"name":"appLocalDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":102,"character":15}],"signatures":[{"id":94,"name":"appLocalDataDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"sources":[{"fileName":"path.ts","line":102,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":97,"name":"appLogDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":531,"character":15}],"signatures":[{"id":98,"name":"appLogDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"sources":[{"fileName":"path.ts","line":531,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":99,"name":"audioDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":141,"character":15}],"signatures":[{"id":100,"name":"audioDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":141,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":155,"name":"basename","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":664,"character":15}],"signatures":[{"id":156,"name":"basename","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":664,"character":0}],"parameters":[{"id":157,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":158,"name":"ext","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":101,"name":"cacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":163,"character":15}],"signatures":[{"id":102,"name":"cacheDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":163,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":103,"name":"configDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":185,"character":15}],"signatures":[{"id":104,"name":"configDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":185,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":105,"name":"dataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":207,"character":15}],"signatures":[{"id":106,"name":"dataDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":207,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":138,"name":"delimiter","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":571,"character":9}],"signatures":[{"id":139,"name":"delimiter","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":571,"character":0}],"type":{"type":"intrinsic","name":"string"}}]},{"id":107,"name":"desktopDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":229,"character":15}],"signatures":[{"id":108,"name":"desktopDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":229,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":149,"name":"dirname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":630,"character":15}],"signatures":[{"id":150,"name":"dirname","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":630,"character":0}],"parameters":[{"id":151,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":109,"name":"documentDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":251,"character":15}],"signatures":[{"id":110,"name":"documentDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":251,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":111,"name":"downloadDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":273,"character":15}],"signatures":[{"id":112,"name":"downloadDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":273,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":113,"name":"executableDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":295,"character":15}],"signatures":[{"id":114,"name":"executableDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":295,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":152,"name":"extname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":646,"character":15}],"signatures":[{"id":153,"name":"extname","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":646,"character":0}],"parameters":[{"id":154,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":115,"name":"fontDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":317,"character":15}],"signatures":[{"id":116,"name":"fontDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":317,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":117,"name":"homeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":339,"character":15}],"signatures":[{"id":118,"name":"homeDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":339,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":159,"name":"isAbsolute","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":678,"character":15}],"signatures":[{"id":160,"name":"isAbsolute","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":678,"character":0}],"parameters":[{"id":161,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":146,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":615,"character":15}],"signatures":[{"id":147,"name":"join","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":615,"character":0}],"parameters":[{"id":148,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":119,"name":"localDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":361,"character":15}],"signatures":[{"id":120,"name":"localDataDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":361,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":143,"name":"normalize","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":600,"character":15}],"signatures":[{"id":144,"name":"normalize","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":600,"character":0}],"parameters":[{"id":145,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":121,"name":"pictureDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":383,"character":15}],"signatures":[{"id":122,"name":"pictureDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":383,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":123,"name":"publicDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":405,"character":15}],"signatures":[{"id":124,"name":"publicDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":405,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":140,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":585,"character":15}],"signatures":[{"id":141,"name":"resolve","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":585,"character":0}],"parameters":[{"id":142,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":127,"name":"resolveResource","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":442,"character":15}],"signatures":[{"id":128,"name":"resolveResource","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":442,"character":0}],"parameters":[{"id":129,"name":"resourcePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":125,"name":"resourceDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":422,"character":15}],"signatures":[{"id":126,"name":"resourceDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":422,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":130,"name":"runtimeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":465,"character":15}],"signatures":[{"id":131,"name":"runtimeDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":465,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":136,"name":"sep","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":560,"character":9}],"signatures":[{"id":137,"name":"sep","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":560,"character":0}],"type":{"type":"intrinsic","name":"string"}}]},{"id":162,"name":"tempDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":547,"character":15}],"signatures":[{"id":163,"name":"tempDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a temporary directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempDir } from '@tauri-apps/api/path';\nconst temp = await tempDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":547,"character":0}],"parameters":[{"id":164,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":132,"name":"templateDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":487,"character":15}],"signatures":[{"id":133,"name":"templateDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":487,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":134,"name":"videoDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":509,"character":15}],"signatures":[{"id":135,"name":"videoDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":509,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[65]},{"title":"Functions","children":[95,89,91,93,97,99,155,101,103,105,138,107,149,109,111,113,152,115,117,159,146,119,143,121,123,140,127,125,130,136,162,132,134]}],"sources":[{"fileName":"path.ts","line":1,"character":0}]},{"id":165,"name":"tauri","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":174,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":175,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2}],"signatures":[{"id":176,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2}],"typeParameter":[{"id":177,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":174,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":180,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2}],"type":{"type":"reflection","declaration":{"id":181,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14}],"signatures":[{"id":182,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14}],"parameters":[{"id":183,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":179,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":178,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":184,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6},{"fileName":"tauri.ts","line":76,"character":6}],"getSignature":{"id":185,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":2}],"type":{"type":"reflection","declaration":{"id":186,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19}],"signatures":[{"id":187,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19}],"parameters":[{"id":188,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":189,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":2}],"parameters":[{"id":190,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":191,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25}],"signatures":[{"id":192,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25}],"parameters":[{"id":193,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":194,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2}],"signatures":[{"id":195,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[175]},{"title":"Properties","children":[180,179,178]},{"title":"Accessors","children":[184]},{"title":"Methods","children":[194]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6}],"typeParameters":[{"id":196,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":197,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":198,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":90,"character":2}],"signatures":[{"id":199,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":90,"character":2}],"parameters":[{"id":200,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":201,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":202,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":197,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":205,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":88,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":204,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":87,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":203,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":86,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":206,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":96,"character":8}],"signatures":[{"id":207,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":96,"character":2}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[198]},{"title":"Properties","children":[205,204,203]},{"title":"Methods","children":[206]}],"sources":[{"fileName":"tauri.ts","line":85,"character":6}]},{"id":166,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":128,"character":5}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}},{"id":208,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":111,"character":15}],"signatures":[{"id":209,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":111,"character":0}],"typeParameter":[{"id":210,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":211,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":212,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":213,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":214,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":114,"character":6}],"signatures":[{"id":215,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":114,"character":6}],"parameters":[{"id":216,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":197,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":222,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":194,"character":9}],"signatures":[{"id":223,"name":"convertFileSrc","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":194,"character":0}],"parameters":[{"id":224,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":225,"name":"protocol","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":217,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":144,"character":15}],"signatures":[{"id":218,"name":"invoke","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":144,"character":0}],"typeParameter":[{"id":219,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":220,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":221,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":166,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":167,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9}],"signatures":[{"id":168,"name":"transformCallback","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":36,"character":0}],"parameters":[{"id":169,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":170,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13}],"signatures":[{"id":171,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13}],"parameters":[{"id":172,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":173,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[174,197]},{"title":"Type Aliases","children":[166]},{"title":"Functions","children":[208,222,217,167]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0}]}],"groups":[{"title":"Modules","children":[1,50,64,165]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"args"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/path.ts","qualifiedName":""},"65":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory"},"66":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Audio"},"67":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Cache"},"68":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Config"},"69":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Data"},"70":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.LocalData"},"71":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Document"},"72":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Download"},"73":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Picture"},"74":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Public"},"75":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Video"},"76":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Resource"},"77":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Temp"},"78":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppConfig"},"79":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppData"},"80":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLocalData"},"81":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppCache"},"82":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLog"},"83":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Desktop"},"84":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Executable"},"85":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Font"},"86":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Home"},"87":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Runtime"},"88":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Template"},"89":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"90":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"91":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"92":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"93":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"94":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"95":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"96":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"97":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"98":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"99":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"100":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"101":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"102":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"103":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"104":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"105":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"106":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"107":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"108":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"109":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"110":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"111":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"112":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"113":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"114":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"115":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"116":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"117":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"118":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"119":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"120":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"121":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"122":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"123":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"124":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"125":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"126":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"127":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"128":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"129":{"sourceFileName":"src/path.ts","qualifiedName":"resourcePath"},"130":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"131":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"132":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"133":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"134":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"135":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"136":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"137":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"138":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"139":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"140":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"141":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"142":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"143":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"144":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"145":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"146":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"147":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"148":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"149":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"150":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"151":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"152":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"153":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"154":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"155":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"156":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"157":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"158":{"sourceFileName":"src/path.ts","qualifiedName":"ext"},"159":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"160":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"161":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"162":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"163":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"164":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"165":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"166":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"167":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"168":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"169":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"170":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"171":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"172":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"173":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"174":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"175":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"176":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"177":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"178":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"179":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"180":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"181":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"182":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"183":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"184":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"185":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"186":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"187":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"188":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"189":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"190":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"191":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"192":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"193":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"194":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"195":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"196":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"197":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"198":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"199":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"200":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"201":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"202":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"203":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"204":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"205":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"206":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"207":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"208":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"209":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"210":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"211":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"212":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"213":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"214":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"215":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"216":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"217":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"218":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"219":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"220":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"221":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"222":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"223":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"224":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"225":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"}}} \ No newline at end of file diff --git a/tooling/api/src/mocks.ts b/tooling/api/src/mocks.ts index 56b9ac81ce32..78e08c3d0cc6 100644 --- a/tooling/api/src/mocks.ts +++ b/tooling/api/src/mocks.ts @@ -125,21 +125,13 @@ export function mockIPC( * mockWindows("main", "second", "third"); * * mockIPC((cmd, args) => { - * if (cmd === "tauri") { - * if ( - * args?.__tauriModule === "Window" && - * args?.message?.cmd === "manage" && - * args?.message?.data?.cmd?.type === "close" - * ) { - * console.log('closing window!'); - * } + * if (cmd === "plugin:event|emit") { + * console.log('emit event', args?.event, args?.payload); * } * }); * - * const { getCurrent } = await import("@tauri-apps/api/window"); - * - * const win = getCurrent(); - * await win.close(); // this will cause the mocked IPC handler to log to the console. + * const { emit } = await import("@tauri-apps/api/path"); + * await emit('loaded'); // this will cause the mocked IPC handler to log to the console. * ``` * * @param current Label of window this JavaScript context is running in. diff --git a/tooling/api/typedoc.json b/tooling/api/typedoc.json index b10750659109..844f6065f09e 100644 --- a/tooling/api/typedoc.json +++ b/tooling/api/typedoc.json @@ -2,8 +2,8 @@ "entryPoints": [ "src/event.ts", "src/mocks.ts", - "src/tauri.ts", - "src/window.ts" + "src/path.ts", + "src/tauri.ts" ], "githubPages": false, "readme": "none", diff --git a/tooling/bench/src/utils.rs b/tooling/bench/src/utils.rs index fcbc349fa79d..d8db7e926d82 100644 --- a/tooling/bench/src/utils.rs +++ b/tooling/bench/src/utils.rs @@ -37,7 +37,11 @@ pub struct StraceOutput { pub fn get_target() -> &'static str { #[cfg(target_os = "macos")] - return "x86_64-apple-darwin"; + return if cfg!(target_arch = "aarch64") { + "aarch64-apple-darwin" + } else { + "x86_64-apple-darwin" + }; #[cfg(target_os = "linux")] return "x86_64-unknown-linux-gnu"; #[cfg(target_os = "windows")] diff --git a/tooling/bench/tests/Cargo.toml b/tooling/bench/tests/Cargo.toml index 87225298d3b8..87b3b701966c 100644 --- a/tooling/bench/tests/Cargo.toml +++ b/tooling/bench/tests/Cargo.toml @@ -2,6 +2,7 @@ members = [ "./*/src-tauri/", ] +resolver = "2" [profile.release] panic = "abort" @@ -9,27 +10,3 @@ codegen-units = 1 lto = true incremental = false opt-level = "s" - -# See https://github.com/rust-lang/cargo/issues/10118#issuecomment-1006000210 -# And https://github.com/rust-lang/rust/issues/96486 -[profile.release.package.compiler_builtins] -# The compiler-builtins crate cannot reference libcore, and it's own CI will -# verify that this is the case. This requires, however, that the crate is built -# without overflow checks and debug assertions. Forcefully disable debug -# assertions and overflow checks here which should ensure that even if these -# assertions are enabled for libstd we won't enable then for compiler_builtins -# which should ensure we still link everything correctly. -debug-assertions = false -overflow-checks = false - -# For compiler-builtins we always use a high number of codegen units. -# The goal here is to place every single intrinsic into its own object -# file to avoid symbol clashes with the system libgcc if possible. Note -# that this number doesn't actually produce this many object files, we -# just don't create more than this number of object files. -# -# It's a bit of a bummer that we have to pass this here, unfortunately. -# Ideally this would be specified through an env var to Cargo so Cargo -# knows how many CGUs are for this specific crate, but for now -# per-crate configuration isn't specifiable in the environment. -codegen-units = 10000 diff --git a/tooling/bench/tests/files_transfer/public/index.html b/tooling/bench/tests/files_transfer/public/index.html index 88771b525a95..7435e92c4a44 100644 --- a/tooling/bench/tests/files_transfer/public/index.html +++ b/tooling/bench/tests/files_transfer/public/index.html @@ -10,18 +10,7 @@

Welcome to Tauri!