diff --git a/.changes/move-cli.md b/.changes/move-cli.md new file mode 100644 index 00000000000..6492a86b2d2 --- /dev/null +++ b/.changes/move-cli.md @@ -0,0 +1,7 @@ +--- +"api": patch +"tauri": patch +"tauri-utils": patch +--- + +Moved the `cli` feature to its own plugin in the plugins-workspace repository. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 455a184d05a..ffe024b57db 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -71,7 +71,7 @@ The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and ### Developing Tauri Core and Related Components (Rust API, Macros, Codegen, and Utils) -The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all", "cli" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project. +The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project. #### Building the documentation locally diff --git a/.github/workflows/lint-fmt-core.yml b/.github/workflows/lint-fmt-core.yml index 1abcb615be9..ab4fdac67c9 100644 --- a/.github/workflows/lint-fmt-core.yml +++ b/.github/workflows/lint-fmt-core.yml @@ -50,7 +50,7 @@ jobs: clippy: - { args: '', key: 'empty' } - { - args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart', + args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,windows7-compat,http-multipart', key: 'all' } - { args: '--features custom-protocol', key: 'custom-protocol' } diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 7c71ae61e1e..6244711ff5c 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -76,7 +76,7 @@ jobs: key: api-all } - { - args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart, + args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,windows7-compat,http-multipart, key: all } diff --git a/core/config-schema/schema.json b/core/config-schema/schema.json index ad8bdc1d45c..904148a0b35 100644 --- a/core/config-schema/schema.json +++ b/core/config-schema/schema.json @@ -258,17 +258,6 @@ "$ref": "#/definitions/WindowConfig" } }, - "cli": { - "description": "The CLI configuration.", - "anyOf": [ - { - "$ref": "#/definitions/CliConfig" - }, - { - "type": "null" - } - ] - }, "bundle": { "description": "The bundler configuration.", "default": { @@ -778,252 +767,6 @@ } ] }, - "CliConfig": { - "description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig", - "type": "object", - "properties": { - "description": { - "description": "Command description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "Command long description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "beforeHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.", - "type": [ - "string", - "null" - ] - }, - "afterHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.", - "type": [ - "string", - "null" - ] - }, - "args": { - "description": "List of arguments for the command", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/CliArg" - } - }, - "subcommands": { - "description": "List of subcommands of this command", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/definitions/CliConfig" - } - } - }, - "additionalProperties": false - }, - "CliArg": { - "description": "A CLI argument definition.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "short": { - "description": "The short version of the argument, without the preceding -.\n\nNOTE: Any leading `-` characters will be stripped, and only the first non-character will be used as the short version.", - "type": [ - "string", - "null" - ], - "maxLength": 1, - "minLength": 1 - }, - "name": { - "description": "The unique argument name", - "type": "string" - }, - "description": { - "description": "The argument description which will be shown on the help information. Typically, this is a short (one line) description of the arg.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "The argument long description which will be shown on the help information. Typically this a more detailed (multi-line) message that describes the argument.", - "type": [ - "string", - "null" - ] - }, - "takesValue": { - "description": "Specifies that the argument takes a value at run time.\n\nNOTE: values for arguments may be specified in any of the following methods - Using a space such as -o value or --option value - Using an equals and no space such as -o=value or --option=value - Use a short and no space such as -ovalue", - "default": false, - "type": "boolean" - }, - "multiple": { - "description": "Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once.\n\nFor example, --opt val1 val2 is allowed, but --opt val1 val2 --opt val3 is not.\n\nNOTE: Setting this requires `takes_value` to be set to true.", - "default": false, - "type": "boolean" - }, - "multipleOccurrences": { - "description": "Specifies that the argument may appear more than once. For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed)\n\nFor example, --opt val1 --opt val2 is allowed, but --opt val1 val2 is not.", - "default": false, - "type": "boolean" - }, - "numberOfValues": { - "description": "Specifies how many values are required to satisfy this argument. For example, if you had a `-f ` argument where you wanted exactly 3 'files' you would set `number_of_values = 3`, and this argument wouldn't be satisfied unless the user provided 3 and only 3 values.\n\n**NOTE:** Does *not* require `multiple_occurrences = true` to be set. Setting `multiple_occurrences = true` would allow `-f -f ` where as *not* setting it would only allow one occurrence of this argument.\n\n**NOTE:** implicitly sets `takes_value = true` and `multiple_values = true`.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "possibleValues": { - "description": "Specifies a list of possible values for this argument. At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "minValues": { - "description": "Specifies the minimum number of values for this argument. For example, if you had a -f `` argument where you wanted at least 2 'files', you would set `minValues: 2`, and this argument would be satisfied if the user provided, 2 or more values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "maxValues": { - "description": "Specifies the maximum number of values are for this argument. For example, if you had a -f `` argument where you wanted up to 3 'files', you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "required": { - "description": "Sets whether or not the argument is required by default.\n\n- Required by default means it is required, when no other conflicting rules have been evaluated - Conflicting rules take precedence over being required.", - "default": false, - "type": "boolean" - }, - "requiredUnlessPresent": { - "description": "Sets an arg that override this arg's required setting i.e. this arg will be required unless this other argument is present.", - "type": [ - "string", - "null" - ] - }, - "requiredUnlessPresentAll": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless all these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredUnlessPresentAny": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless at least one of these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "conflictsWith": { - "description": "Sets a conflicting argument by name i.e. when using this argument, the following argument can't be present and vice versa.", - "type": [ - "string", - "null" - ] - }, - "conflictsWithAll": { - "description": "The same as conflictsWith but allows specifying multiple two-way conflicts per argument.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requires": { - "description": "Tets an argument by name that is required when this one is present i.e. when using this argument, the following argument must be present.", - "type": [ - "string", - "null" - ] - }, - "requiresAll": { - "description": "Sts multiple arguments by names that are required when this one is present i.e. when using this argument, the following arguments must be present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiresIf": { - "description": "Allows a conditional requirement with the signature [arg, value] the requirement will only become valid if `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredIfEq": { - "description": "Allows specifying that an argument is required conditionally with the signature [arg, value] the requirement will only become valid if the `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requireEquals": { - "description": "Requires that options use the --option=val syntax i.e. an equals between the option and associated value.", - "type": [ - "boolean", - "null" - ] - }, - "index": { - "description": "The positional argument index, starting at 1.\n\nThe index refers to position according to other positional argument. It does not define position in the argument list as a whole. When utilized with multiple=true, only the last positional argument may be defined as multiple (i.e. the one with the highest index).", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 1.0 - } - }, - "additionalProperties": false - }, "BundleConfig": { "description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig", "type": "object", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 06f7fc9251b..3579d14deb4 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -685,191 +685,6 @@ pub struct BundleConfig { pub android: AndroidConfig, } -/// A CLI argument definition. -#[skip_serializing_none] -#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct CliArg { - /// The short version of the argument, without the preceding -. - /// - /// NOTE: Any leading `-` characters will be stripped, and only the first non-character will be used as the short version. - pub short: Option, - /// The unique argument name - pub name: String, - /// The argument description which will be shown on the help information. - /// Typically, this is a short (one line) description of the arg. - pub description: Option, - /// The argument long description which will be shown on the help information. - /// Typically this a more detailed (multi-line) message that describes the argument. - #[serde(alias = "long-description")] - pub long_description: Option, - /// Specifies that the argument takes a value at run time. - /// - /// NOTE: values for arguments may be specified in any of the following methods - /// - Using a space such as -o value or --option value - /// - Using an equals and no space such as -o=value or --option=value - /// - Use a short and no space such as -ovalue - #[serde(default, alias = "takes-value")] - pub takes_value: bool, - /// Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once. - /// - /// For example, --opt val1 val2 is allowed, but --opt val1 val2 --opt val3 is not. - /// - /// NOTE: Setting this requires `takes_value` to be set to true. - #[serde(default)] - pub multiple: bool, - /// Specifies that the argument may appear more than once. - /// For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. - /// For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed) - /// - /// For example, --opt val1 --opt val2 is allowed, but --opt val1 val2 is not. - #[serde(default, alias = "multiple-occurrences")] - pub multiple_occurrences: bool, - /// Specifies how many values are required to satisfy this argument. For example, if you had a - /// `-f ` argument where you wanted exactly 3 'files' you would set - /// `number_of_values = 3`, and this argument wouldn't be satisfied unless the user provided - /// 3 and only 3 values. - /// - /// **NOTE:** Does *not* require `multiple_occurrences = true` to be set. Setting - /// `multiple_occurrences = true` would allow `-f -f ` where - /// as *not* setting it would only allow one occurrence of this argument. - /// - /// **NOTE:** implicitly sets `takes_value = true` and `multiple_values = true`. - #[serde(alias = "number-of-values")] - pub number_of_values: Option, - /// Specifies a list of possible values for this argument. - /// At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message. - #[serde(alias = "possible-values")] - pub possible_values: Option>, - /// Specifies the minimum number of values for this argument. - /// For example, if you had a -f `` argument where you wanted at least 2 'files', - /// you would set `minValues: 2`, and this argument would be satisfied if the user provided, 2 or more values. - #[serde(alias = "min-values")] - pub min_values: Option, - /// Specifies the maximum number of values are for this argument. - /// For example, if you had a -f `` argument where you wanted up to 3 'files', - /// you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values. - #[serde(alias = "max-values")] - pub max_values: Option, - /// Sets whether or not the argument is required by default. - /// - /// - Required by default means it is required, when no other conflicting rules have been evaluated - /// - Conflicting rules take precedence over being required. - #[serde(default)] - pub required: bool, - /// Sets an arg that override this arg's required setting - /// i.e. this arg will be required unless this other argument is present. - #[serde(alias = "required-unless-present")] - pub required_unless_present: Option, - /// Sets args that override this arg's required setting - /// i.e. this arg will be required unless all these other arguments are present. - #[serde(alias = "required-unless-present-all")] - pub required_unless_present_all: Option>, - /// Sets args that override this arg's required setting - /// i.e. this arg will be required unless at least one of these other arguments are present. - #[serde(alias = "required-unless-present-any")] - pub required_unless_present_any: Option>, - /// Sets a conflicting argument by name - /// i.e. when using this argument, the following argument can't be present and vice versa. - #[serde(alias = "conflicts-with")] - pub conflicts_with: Option, - /// The same as conflictsWith but allows specifying multiple two-way conflicts per argument. - #[serde(alias = "conflicts-with-all")] - pub conflicts_with_all: Option>, - /// Tets an argument by name that is required when this one is present - /// i.e. when using this argument, the following argument must be present. - pub requires: Option, - /// Sts multiple arguments by names that are required when this one is present - /// i.e. when using this argument, the following arguments must be present. - #[serde(alias = "requires-all")] - pub requires_all: Option>, - /// Allows a conditional requirement with the signature [arg, value] - /// the requirement will only become valid if `arg`'s value equals `${value}`. - #[serde(alias = "requires-if")] - pub requires_if: Option>, - /// Allows specifying that an argument is required conditionally with the signature [arg, value] - /// the requirement will only become valid if the `arg`'s value equals `${value}`. - #[serde(alias = "requires-if-eq")] - pub required_if_eq: Option>, - /// Requires that options use the --option=val syntax - /// i.e. an equals between the option and associated value. - #[serde(alias = "requires-equals")] - pub require_equals: Option, - /// The positional argument index, starting at 1. - /// - /// The index refers to position according to other positional argument. - /// It does not define position in the argument list as a whole. When utilized with multiple=true, - /// only the last positional argument may be defined as multiple (i.e. the one with the highest index). - #[cfg_attr(feature = "schema", validate(range(min = 1)))] - pub index: Option, -} - -/// describes a CLI configuration -/// -/// See more: https://tauri.app/v1/api/config#cliconfig -#[skip_serializing_none] -#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct CliConfig { - /// Command description which will be shown on the help information. - pub description: Option, - /// Command long description which will be shown on the help information. - #[serde(alias = "long-description")] - pub long_description: Option, - /// Adds additional help information to be displayed in addition to auto-generated help. - /// This information is displayed before the auto-generated help information. - /// This is often used for header information. - #[serde(alias = "before-help")] - pub before_help: Option, - /// Adds additional help information to be displayed in addition to auto-generated help. - /// This information is displayed after the auto-generated help information. - /// This is often used to describe how to use the arguments, or caveats to be noted. - #[serde(alias = "after-help")] - pub after_help: Option, - /// List of arguments for the command - pub args: Option>, - /// List of subcommands of this command - pub subcommands: Option>, -} - -impl CliConfig { - /// List of arguments for the command - pub fn args(&self) -> Option<&Vec> { - self.args.as_ref() - } - - /// List of subcommands of this command - pub fn subcommands(&self) -> Option<&HashMap> { - self.subcommands.as_ref() - } - - /// Command description which will be shown on the help information. - pub fn description(&self) -> Option<&String> { - self.description.as_ref() - } - - /// Command long description which will be shown on the help information. - pub fn long_description(&self) -> Option<&String> { - self.description.as_ref() - } - - /// Adds additional help information to be displayed in addition to auto-generated help. - /// This information is displayed before the auto-generated help information. - /// This is often used for header information. - pub fn before_help(&self) -> Option<&String> { - self.before_help.as_ref() - } - - /// Adds additional help information to be displayed in addition to auto-generated help. - /// This information is displayed after the auto-generated help information. - /// This is often used to describe how to use the arguments, or caveats to be noted. - pub fn after_help(&self) -> Option<&String> { - self.after_help.as_ref() - } -} - /// The window configuration object. /// /// See more: https://tauri.app/v1/api/config#windowconfig @@ -2333,8 +2148,6 @@ pub struct TauriConfig { /// The windows configuration. #[serde(default)] pub windows: Vec, - /// The CLI configuration. - pub cli: Option, /// The bundler configuration. #[serde(default)] pub bundle: BundleConfig, @@ -2361,7 +2174,6 @@ impl TauriConfig { pub fn all_features() -> Vec<&'static str> { let mut features = AllowlistConfig::all_features(); features.extend(vec![ - "cli", "updater", "system-tray", "macos-private-api", @@ -2374,9 +2186,6 @@ impl TauriConfig { #[allow(dead_code)] pub fn features(&self) -> Vec<&str> { let mut features = self.allowlist.to_features(); - if self.cli.is_some() { - features.push("cli"); - } if self.updater.active { features.push("updater"); } @@ -3271,103 +3080,6 @@ mod build { } } - impl ToTokens for CliArg { - fn to_tokens(&self, tokens: &mut TokenStream) { - let short = opt_lit(self.short.as_ref()); - let name = str_lit(&self.name); - let description = opt_str_lit(self.description.as_ref()); - let long_description = opt_str_lit(self.long_description.as_ref()); - let takes_value = self.takes_value; - let multiple = self.multiple; - let multiple_occurrences = self.multiple_occurrences; - let number_of_values = opt_lit(self.number_of_values.as_ref()); - let possible_values = opt_vec_str_lit(self.possible_values.as_ref()); - let min_values = opt_lit(self.min_values.as_ref()); - let max_values = opt_lit(self.max_values.as_ref()); - let required = self.required; - let required_unless_present = opt_str_lit(self.required_unless_present.as_ref()); - let required_unless_present_all = opt_vec_str_lit(self.required_unless_present_all.as_ref()); - let required_unless_present_any = opt_vec_str_lit(self.required_unless_present_any.as_ref()); - let conflicts_with = opt_str_lit(self.conflicts_with.as_ref()); - let conflicts_with_all = opt_vec_str_lit(self.conflicts_with_all.as_ref()); - let requires = opt_str_lit(self.requires.as_ref()); - let requires_all = opt_vec_str_lit(self.requires_all.as_ref()); - let requires_if = opt_vec_str_lit(self.requires_if.as_ref()); - let required_if_eq = opt_vec_str_lit(self.required_if_eq.as_ref()); - let require_equals = opt_lit(self.require_equals.as_ref()); - let index = opt_lit(self.index.as_ref()); - - literal_struct!( - tokens, - CliArg, - short, - name, - description, - long_description, - takes_value, - multiple, - multiple_occurrences, - number_of_values, - possible_values, - min_values, - max_values, - required, - required_unless_present, - required_unless_present_all, - required_unless_present_any, - conflicts_with, - conflicts_with_all, - requires, - requires_all, - requires_if, - required_if_eq, - require_equals, - index - ); - } - } - - impl ToTokens for CliConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let description = opt_str_lit(self.description.as_ref()); - let long_description = opt_str_lit(self.long_description.as_ref()); - let before_help = opt_str_lit(self.before_help.as_ref()); - let after_help = opt_str_lit(self.after_help.as_ref()); - let args = { - let args = self.args.as_ref().map(|args| { - let arg = args.iter().map(|a| quote! { #a }); - quote! { vec![#(#arg),*] } - }); - opt_lit(args.as_ref()) - }; - let subcommands = opt_lit( - self - .subcommands - .as_ref() - .map(|map| { - map_lit( - quote! { ::std::collections::HashMap }, - map, - str_lit, - identity, - ) - }) - .as_ref(), - ); - - literal_struct!( - tokens, - CliConfig, - description, - long_description, - before_help, - after_help, - args, - subcommands - ); - } - } - impl ToTokens for PatternKind { fn to_tokens(&self, tokens: &mut TokenStream) { let prefix = quote! { ::tauri::utils::config::PatternKind }; @@ -3781,7 +3493,6 @@ mod build { fn to_tokens(&self, tokens: &mut TokenStream) { let pattern = &self.pattern; let windows = vec_lit(&self.windows, identity); - let cli = opt_lit(self.cli.as_ref()); let bundle = &self.bundle; let updater = &self.updater; let security = &self.security; @@ -3794,7 +3505,6 @@ mod build { TauriConfig, pattern, windows, - cli, bundle, updater, security, @@ -3884,7 +3594,6 @@ mod test { ios: Default::default(), android: Default::default(), }, - cli: None, updater: UpdaterConfig { active: false, dialog: true, diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index f5b1099e22c..8b2448894e2 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -20,7 +20,6 @@ features = [ "custom-protocol", "api-all", "windows7-compat", - "cli", "updater", "fs-extract-api", "system-tray", @@ -64,7 +63,6 @@ http = "0.2" dirs-next = "2.0" percent-encoding = "2.2" base64 = { version = "0.21", optional = true } -clap = { version = "3", optional = true } reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } bytes = { version = "1", features = [ "serde" ] } open = { version = "3.0", optional = true } @@ -166,7 +164,6 @@ global-shortcut = [ clipboard = [ "tauri-runtime/clipboard", "tauri-runtime-wry/clipboard" ] dialog = [ "rfd" ] notification = [ "notify-rust" ] -cli = [ "clap" ] system-tray = [ "tauri-runtime/system-tray", "tauri-runtime-wry/system-tray" ] devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ] dox = [ "tauri-runtime-wry/dox" ] diff --git a/core/tauri/build.rs b/core/tauri/build.rs index c85e9279cbd..ddbe073ef79 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -123,8 +123,6 @@ fn main() { alias_module("http", &["request"], api_all); - alias("cli", has_feature("cli")); - if !mobile { alias_module("notification", &[], api_all); alias_module("global-shortcut", &[], api_all); diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 56d1a23ef86..e0a6b34c5d1 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,7 +1,7 @@ -"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var de=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var t in e)L(n,t,{get:e[t],enumerable:!0})},me=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ce(e))!de.call(n,s)&&s!==t&&L(n,s,{get:()=>e[s],enumerable:!(r=ue(e,s))||r.enumerable});return n};var pe=n=>me(L({},"__esModule",{value:!0}),n);var Gt={};d(Gt,{app:()=>R,cli:()=>U,clipboard:()=>N,dialog:()=>I,event:()=>V,fs:()=>j,globalShortcut:()=>q,http:()=>$,invoke:()=>qt,notification:()=>J,os:()=>ne,path:()=>K,process:()=>Q,shell:()=>Y,tauri:()=>k,updater:()=>X,window:()=>te});var R={};d(R,{getName:()=>fe,getTauriVersion:()=>be,getVersion:()=>he,hide:()=>Pe,show:()=>_e});var k={};d(k,{convertFileSrc:()=>ye,invoke:()=>l,transformCallback:()=>m});function ge(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function m(n,e=!1){let t=ge(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=m(u=>{t(u),Reflect.deleteProperty(window,`_${a}`)},!0),a=m(u=>{r(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:a,...e})})}function ye(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function he(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function fe(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function be(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function _e(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function Pe(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var U={};d(U,{getMatches:()=>we});async function we(){return i({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}var N={};d(N,{readText:()=>Oe,writeText:()=>ve});async function ve(n){return i({__tauriModule:"Clipboard",message:{cmd:"writeText",data:n}})}async function Oe(){return i({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}var I={};d(I,{ask:()=>Fe,confirm:()=>Ce,message:()=>Me,open:()=>Te,save:()=>Ee});async function Te(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"openDialog",options:n}})}async function Ee(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:n}})}async function Me(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabel:t?.okLabel?.toString()}})}async function Fe(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"askDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Yes",t?.cancelLabel?.toString()??"No"]}})}async function Ce(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Ok",t?.cancelLabel?.toString()??"Cancel"]}})}var V={};d(V,{TauriEvent:()=>O,emit:()=>T,listen:()=>z,once:()=>H});async function ie(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function w(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function _(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:m(t)}}).then(r=>async()=>ie(n,r))}async function v(n,e,t){return _(n,e,r=>{t(r),ie(n,r.id).catch(()=>{})})}var O=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c.MENU="tauri://menu",c.CHECK_UPDATE="tauri://update",c.UPDATE_AVAILABLE="tauri://update-available",c.INSTALL_UPDATE="tauri://update-install",c.STATUS_UPDATE="tauri://update-status",c.DOWNLOAD_PROGRESS="tauri://update-download-progress",c))(O||{});async function z(n,e){return _(n,null,e)}async function H(n,e){return v(n,null,e)}async function T(n,e){return w(n,void 0,e)}var j={};d(j,{BaseDirectory:()=>E,Dir:()=>E,copyFile:()=>Ue,createDir:()=>ke,exists:()=>ze,readBinaryFile:()=>De,readDir:()=>Le,readTextFile:()=>xe,removeDir:()=>Re,removeFile:()=>Ne,renameFile:()=>Ie,writeBinaryFile:()=>We,writeFile:()=>Se,writeTextFile:()=>Se});var E=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(E||{});async function xe(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"readTextFile",path:n,options:e}})}async function De(n,e={}){let t=await i({__tauriModule:"Fs",message:{cmd:"readFile",path:n,options:e}});return Uint8Array.from(t)}async function Se(n,e,t){typeof t=="object"&&Object.freeze(t),typeof n=="object"&&Object.freeze(n);let r={path:"",contents:""},s=t;return typeof n=="string"?r.path=n:(r.path=n.path,r.contents=n.contents),typeof e=="string"?r.contents=e??"":s=e,i({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(new TextEncoder().encode(r.contents)),options:s}})}async function We(n,e,t){typeof t=="object"&&Object.freeze(t),typeof n=="object"&&Object.freeze(n);let r={path:"",contents:[]},s=t;return typeof n=="string"?r.path=n:(r.path=n.path,r.contents=n.contents),e&&"dir"in e?s=e:typeof n=="string"&&(r.contents=e??[]),i({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:s}})}async function Le(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"readDir",path:n,options:e}})}async function ke(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"createDir",path:n,options:e}})}async function Re(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"removeDir",path:n,options:e}})}async function Ue(n,e,t={}){return i({__tauriModule:"Fs",message:{cmd:"copyFile",source:n,destination:e,options:t}})}async function Ne(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"removeFile",path:n,options:e}})}async function Ie(n,e,t={}){return i({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:n,newPath:e,options:t}})}async function ze(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"exists",path:n,options:e}})}var q={};d(q,{isRegistered:()=>je,register:()=>He,registerAll:()=>Ve,unregister:()=>qe,unregisterAll:()=>Ge});async function He(n,e){return i({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:n,handler:m(e)}})}async function Ve(n,e){return i({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:n,handler:m(e)}})}async function je(n){return i({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:n}})}async function qe(n){return i({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:n}})}async function Ge(){return i({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}var $={};d($,{Body:()=>g,Client:()=>F,Response:()=>M,ResponseType:()=>re,fetch:()=>$e,getClient:()=>se});var re=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(re||{}),g=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,a)=>{if(a!==null){let u;typeof a=="string"?u=a:a instanceof Uint8Array||Array.isArray(a)?u=Array.from(a):a instanceof File?u={file:a.name,mime:a.type,fileName:a.name}:typeof a.file=="string"?u={file:a.file,mime:a.mime,fileName:a.fileName}:u={file:Array.from(a.file),mime:a.mime,fileName:a.fileName},t[String(s)]=u}};if(e instanceof FormData)for(let[s,a]of e)r(s,a);else for(let[s,a]of Object.entries(e))r(s,a);return new g("Form",t)}static json(e){return new g("Json",e)}static text(e){return new g("Text",e)}static bytes(e){return new g("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},M=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},F=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new M(r);if(t){try{s.data=JSON.parse(s.data)}catch(a){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${a}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function se(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new F(e))}var G=null;async function $e(n,e){return G===null&&(G=await se()),G.request({url:n,method:e?.method??"GET",...e})}var J={};d(J,{isPermissionGranted:()=>Je,requestPermission:()=>Ke,sendNotification:()=>Qe});async function Je(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function Ke(){return window.Notification.requestPermission()}function Qe(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var K={};d(K,{BaseDirectory:()=>E,appCacheDir:()=>Be,appConfigDir:()=>Ye,appDataDir:()=>Ze,appLocalDataDir:()=>Xe,appLogDir:()=>bt,audioDir:()=>et,basename:()=>Mt,cacheDir:()=>tt,configDir:()=>nt,dataDir:()=>it,delimiter:()=>Pt,desktopDir:()=>rt,dirname:()=>Tt,documentDir:()=>st,downloadDir:()=>at,executableDir:()=>ot,extname:()=>Et,fontDir:()=>lt,homeDir:()=>ut,isAbsolute:()=>Ft,join:()=>Ot,localDataDir:()=>ct,normalize:()=>vt,pictureDir:()=>dt,publicDir:()=>mt,resolve:()=>wt,resolveResource:()=>gt,resourceDir:()=>pt,runtimeDir:()=>yt,sep:()=>_t,templateDir:()=>ht,videoDir:()=>ft});function P(){return navigator.appVersion.includes("Win")}async function Ye(){return l("plugin:path|resolve_directory",{directory:13})}async function Ze(){return l("plugin:path|resolve_directory",{directory:14})}async function Xe(){return l("plugin:path|resolve_directory",{directory:15})}async function Be(){return l("plugin:path|resolve_directory",{directory:16})}async function et(){return l("plugin:path|resolve_directory",{directory:1})}async function tt(){return l("plugin:path|resolve_directory",{directory:2})}async function nt(){return l("plugin:path|resolve_directory",{directory:3})}async function it(){return l("plugin:path|resolve_directory",{directory:4})}async function rt(){return l("plugin:path|resolve_directory",{directory:18})}async function st(){return l("plugin:path|resolve_directory",{directory:6})}async function at(){return l("plugin:path|resolve_directory",{directory:7})}async function ot(){return l("plugin:path|resolve_directory",{directory:19})}async function lt(){return l("plugin:path|resolve_directory",{directory:20})}async function ut(){return l("plugin:path|resolve_directory",{directory:21})}async function ct(){return l("plugin:path|resolve_directory",{directory:5})}async function dt(){return l("plugin:path|resolve_directory",{directory:8})}async function mt(){return l("plugin:path|resolve_directory",{directory:9})}async function pt(){return l("plugin:path|resolve_directory",{directory:11})}async function gt(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function yt(){return l("plugin:path|resolve_directory",{directory:22})}async function ht(){return l("plugin:path|resolve_directory",{directory:23})}async function ft(){return l("plugin:path|resolve_directory",{directory:10})}async function bt(){return l("plugin:path|resolve_directory",{directory:17})}var _t=P()?"\\":"/",Pt=P()?";":":";async function wt(...n){return l("plugin:path|resolve",{paths:n})}async function vt(n){return l("plugin:path|normalize",{path:n})}async function Ot(...n){return l("plugin:path|join",{paths:n})}async function Tt(n){return l("plugin:path|dirname",{path:n})}async function Et(n){return l("plugin:path|extname",{path:n})}async function Mt(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function Ft(n){return l("plugin:path|isAbsolute",{path:n})}var Q={};d(Q,{exit:()=>Ct,relaunch:()=>At});async function Ct(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function At(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var Y={};d(Y,{Child:()=>C,Command:()=>h,EventEmitter:()=>y,open:()=>Dt});async function xt(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:m(n)}})}var y=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},C=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},h=class extends y{constructor(t,r=[],s){super();this.stdout=new y;this.stderr=new y;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new h(t,r,s)}static sidecar(t,r=[],s){let a=new h(t,r,s);return a.options.sidecar=!0,a}async spawn(){return xt(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],a=[];this.stdout.on("data",u=>{s.push(u)}),this.stderr.on("data",u=>{a.push(u)}),this.on("close",u=>{t({code:u.code,signal:u.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(a)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(` -`)}};async function Dt(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var X={};d(X,{checkUpdate:()=>Wt,installUpdate:()=>St,onUpdaterEvent:()=>Z});async function Z(n){return z("tauri://update-status",e=>{n(e?.payload)})}async function St(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(a){if(a.error){e(),r(a.error);return}a.status==="DONE"&&(e(),t())}Z(s).then(a=>{n=a}).catch(a=>{throw e(),a}),T("tauri://update-install").catch(a=>{throw e(),a})})}async function Wt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(u){e(),t({manifest:u,shouldUpdate:!0})}function a(u){if(u.error){e(),r(u.error);return}u.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}H("tauri://update-available",u=>{s(u?.payload)}).catch(u=>{throw e(),u}),Z(a).then(u=>{n=u}).catch(u=>{throw e(),u}),T("tauri://update").catch(u=>{throw e(),u})})}var te={};d(te,{CloseRequestedEvent:()=>W,LogicalPosition:()=>x,LogicalSize:()=>A,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>oe,WebviewWindow:()=>p,WebviewWindowHandle:()=>D,WindowManager:()=>S,appWindow:()=>B,availableMonitors:()=>Ut,currentMonitor:()=>kt,getAll:()=>le,getCurrent:()=>Lt,primaryMonitor:()=>Rt});var A=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new A(this.width/e,this.height/e)}},x=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new x(this.x/e,this.y/e)}},oe=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(oe||{});function Lt(){return new p(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function le(){return window.__TAURI_METADATA__.__windows.map(n=>new p(n.label,{skip:!0}))}var ae=["tauri://created","tauri://error"],D=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):_(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):v(e,this.label,t)}async emit(e,t){if(ae.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return w(e,this.label,t)}_handleTauriEvent(e,t){return ae.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},S=class extends D{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new W(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),r=await this.listen("tauri://file-drop-hover",a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen("tauri://file-drop-cancelled",a=>{e({...a,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},W=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},p=class extends S{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return le().some(t=>t.label===e)?new p(e,{skip:!0}):null}},B;"__TAURI_METADATA__"in window?B=new p(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),B=new p("main",{skip:!0}));function ee(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function kt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(ee)}async function Rt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(ee)}async function Ut(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(ee))}var ne={};d(ne,{EOL:()=>Nt,arch:()=>Vt,platform:()=>It,tempdir:()=>jt,type:()=>Ht,version:()=>zt});var Nt=P()?`\r +"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var de=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)L(n,t,{get:e[t],enumerable:!0})},ce=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ue(e))!de.call(n,s)&&s!==t&&L(n,s,{get:()=>e[s],enumerable:!(r=le(e,s))||r.enumerable});return n};var me=n=>ce(L({},"__esModule",{value:!0}),n);var jt={};c(jt,{app:()=>R,clipboard:()=>U,dialog:()=>N,event:()=>H,fs:()=>V,globalShortcut:()=>j,http:()=>G,invoke:()=>Vt,notification:()=>$,os:()=>te,path:()=>J,process:()=>K,shell:()=>Q,tauri:()=>k,updater:()=>Z,window:()=>ee});var R={};c(R,{getName:()=>he,getTauriVersion:()=>fe,getVersion:()=>ye,hide:()=>_e,show:()=>be});var k={};c(k,{convertFileSrc:()=>ge,invoke:()=>l,transformCallback:()=>m});function pe(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function m(n,e=!1){let t=pe(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=m(u=>{t(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=m(u=>{r(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:o,...e})})}function ge(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function ye(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function he(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function fe(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function be(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function _e(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var U={};c(U,{readText:()=>we,writeText:()=>Pe});async function Pe(n){return i({__tauriModule:"Clipboard",message:{cmd:"writeText",data:n}})}async function we(){return i({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}var N={};c(N,{ask:()=>Ee,confirm:()=>Fe,message:()=>Te,open:()=>ve,save:()=>Oe});async function ve(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"openDialog",options:n}})}async function Oe(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:n}})}async function Te(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabel:t?.okLabel?.toString()}})}async function Ee(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"askDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Yes",t?.cancelLabel?.toString()??"No"]}})}async function Fe(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Ok",t?.cancelLabel?.toString()??"Cancel"]}})}var H={};c(H,{TauriEvent:()=>O,emit:()=>T,listen:()=>I,once:()=>z});async function ne(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function w(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function _(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:m(t)}}).then(r=>async()=>ne(n,r))}async function v(n,e,t){return _(n,e,r=>{t(r),ne(n,r.id).catch(()=>{})})}var O=(d=>(d.WINDOW_RESIZED="tauri://resize",d.WINDOW_MOVED="tauri://move",d.WINDOW_CLOSE_REQUESTED="tauri://close-requested",d.WINDOW_CREATED="tauri://window-created",d.WINDOW_DESTROYED="tauri://destroyed",d.WINDOW_FOCUS="tauri://focus",d.WINDOW_BLUR="tauri://blur",d.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",d.WINDOW_THEME_CHANGED="tauri://theme-changed",d.WINDOW_FILE_DROP="tauri://file-drop",d.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",d.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",d.MENU="tauri://menu",d.CHECK_UPDATE="tauri://update",d.UPDATE_AVAILABLE="tauri://update-available",d.INSTALL_UPDATE="tauri://update-install",d.STATUS_UPDATE="tauri://update-status",d.DOWNLOAD_PROGRESS="tauri://update-download-progress",d))(O||{});async function I(n,e){return _(n,null,e)}async function z(n,e){return v(n,null,e)}async function T(n,e){return w(n,void 0,e)}var V={};c(V,{BaseDirectory:()=>E,Dir:()=>E,copyFile:()=>ke,createDir:()=>We,exists:()=>Ne,readBinaryFile:()=>Ae,readDir:()=>Se,readTextFile:()=>Ce,removeDir:()=>Le,removeFile:()=>Re,renameFile:()=>Ue,writeBinaryFile:()=>xe,writeFile:()=>De,writeTextFile:()=>De});var E=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(E||{});async function Ce(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"readTextFile",path:n,options:e}})}async function Ae(n,e={}){let t=await i({__tauriModule:"Fs",message:{cmd:"readFile",path:n,options:e}});return Uint8Array.from(t)}async function De(n,e,t){typeof t=="object"&&Object.freeze(t),typeof n=="object"&&Object.freeze(n);let r={path:"",contents:""},s=t;return typeof n=="string"?r.path=n:(r.path=n.path,r.contents=n.contents),typeof e=="string"?r.contents=e??"":s=e,i({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(new TextEncoder().encode(r.contents)),options:s}})}async function xe(n,e,t){typeof t=="object"&&Object.freeze(t),typeof n=="object"&&Object.freeze(n);let r={path:"",contents:[]},s=t;return typeof n=="string"?r.path=n:(r.path=n.path,r.contents=n.contents),e&&"dir"in e?s=e:typeof n=="string"&&(r.contents=e??[]),i({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:s}})}async function Se(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"readDir",path:n,options:e}})}async function We(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"createDir",path:n,options:e}})}async function Le(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"removeDir",path:n,options:e}})}async function ke(n,e,t={}){return i({__tauriModule:"Fs",message:{cmd:"copyFile",source:n,destination:e,options:t}})}async function Re(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"removeFile",path:n,options:e}})}async function Ue(n,e,t={}){return i({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:n,newPath:e,options:t}})}async function Ne(n,e={}){return i({__tauriModule:"Fs",message:{cmd:"exists",path:n,options:e}})}var j={};c(j,{isRegistered:()=>He,register:()=>Ie,registerAll:()=>ze,unregister:()=>Ve,unregisterAll:()=>je});async function Ie(n,e){return i({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:n,handler:m(e)}})}async function ze(n,e){return i({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:n,handler:m(e)}})}async function He(n){return i({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:n}})}async function Ve(n){return i({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:n}})}async function je(){return i({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}var G={};c(G,{Body:()=>g,Client:()=>M,Response:()=>F,ResponseType:()=>ie,fetch:()=>qe,getClient:()=>re});var ie=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(ie||{}),g=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,o)=>{if(o!==null){let u;typeof o=="string"?u=o:o instanceof Uint8Array||Array.isArray(o)?u=Array.from(o):o instanceof File?u={file:o.name,mime:o.type,fileName:o.name}:typeof o.file=="string"?u={file:o.file,mime:o.mime,fileName:o.fileName}:u={file:Array.from(o.file),mime:o.mime,fileName:o.fileName},t[String(s)]=u}};if(e instanceof FormData)for(let[s,o]of e)r(s,o);else for(let[s,o]of Object.entries(e))r(s,o);return new g("Form",t)}static json(e){return new g("Json",e)}static text(e){return new g("Text",e)}static bytes(e){return new g("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},F=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},M=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new F(r);if(t){try{s.data=JSON.parse(s.data)}catch(o){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${o}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function re(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new M(e))}var q=null;async function qe(n,e){return q===null&&(q=await re()),q.request({url:n,method:e?.method??"GET",...e})}var $={};c($,{isPermissionGranted:()=>Ge,requestPermission:()=>$e,sendNotification:()=>Je});async function Ge(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function $e(){return window.Notification.requestPermission()}function Je(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var J={};c(J,{BaseDirectory:()=>E,appCacheDir:()=>Ze,appConfigDir:()=>Ke,appDataDir:()=>Qe,appLocalDataDir:()=>Ye,appLogDir:()=>ht,audioDir:()=>Xe,basename:()=>Tt,cacheDir:()=>Be,configDir:()=>et,dataDir:()=>tt,delimiter:()=>bt,desktopDir:()=>nt,dirname:()=>vt,documentDir:()=>it,downloadDir:()=>rt,executableDir:()=>st,extname:()=>Ot,fontDir:()=>ot,homeDir:()=>at,isAbsolute:()=>Et,join:()=>wt,localDataDir:()=>lt,normalize:()=>Pt,pictureDir:()=>ut,publicDir:()=>dt,resolve:()=>_t,resolveResource:()=>mt,resourceDir:()=>ct,runtimeDir:()=>pt,sep:()=>ft,templateDir:()=>gt,videoDir:()=>yt});function P(){return navigator.appVersion.includes("Win")}async function Ke(){return l("plugin:path|resolve_directory",{directory:13})}async function Qe(){return l("plugin:path|resolve_directory",{directory:14})}async function Ye(){return l("plugin:path|resolve_directory",{directory:15})}async function Ze(){return l("plugin:path|resolve_directory",{directory:16})}async function Xe(){return l("plugin:path|resolve_directory",{directory:1})}async function Be(){return l("plugin:path|resolve_directory",{directory:2})}async function et(){return l("plugin:path|resolve_directory",{directory:3})}async function tt(){return l("plugin:path|resolve_directory",{directory:4})}async function nt(){return l("plugin:path|resolve_directory",{directory:18})}async function it(){return l("plugin:path|resolve_directory",{directory:6})}async function rt(){return l("plugin:path|resolve_directory",{directory:7})}async function st(){return l("plugin:path|resolve_directory",{directory:19})}async function ot(){return l("plugin:path|resolve_directory",{directory:20})}async function at(){return l("plugin:path|resolve_directory",{directory:21})}async function lt(){return l("plugin:path|resolve_directory",{directory:5})}async function ut(){return l("plugin:path|resolve_directory",{directory:8})}async function dt(){return l("plugin:path|resolve_directory",{directory:9})}async function ct(){return l("plugin:path|resolve_directory",{directory:11})}async function mt(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function pt(){return l("plugin:path|resolve_directory",{directory:22})}async function gt(){return l("plugin:path|resolve_directory",{directory:23})}async function yt(){return l("plugin:path|resolve_directory",{directory:10})}async function ht(){return l("plugin:path|resolve_directory",{directory:17})}var ft=P()?"\\":"/",bt=P()?";":":";async function _t(...n){return l("plugin:path|resolve",{paths:n})}async function Pt(n){return l("plugin:path|normalize",{path:n})}async function wt(...n){return l("plugin:path|join",{paths:n})}async function vt(n){return l("plugin:path|dirname",{path:n})}async function Ot(n){return l("plugin:path|extname",{path:n})}async function Tt(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function Et(n){return l("plugin:path|isAbsolute",{path:n})}var K={};c(K,{exit:()=>Ft,relaunch:()=>Mt});async function Ft(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function Mt(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var Q={};c(Q,{Child:()=>C,Command:()=>h,EventEmitter:()=>y,open:()=>At});async function Ct(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:m(n)}})}var y=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},C=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},h=class extends y{constructor(t,r=[],s){super();this.stdout=new y;this.stderr=new y;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new h(t,r,s)}static sidecar(t,r=[],s){let o=new h(t,r,s);return o.options.sidecar=!0,o}async spawn(){return Ct(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],o=[];this.stdout.on("data",u=>{s.push(u)}),this.stderr.on("data",u=>{o.push(u)}),this.on("close",u=>{t({code:u.code,signal:u.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(o)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(` +`)}};async function At(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var Z={};c(Z,{checkUpdate:()=>xt,installUpdate:()=>Dt,onUpdaterEvent:()=>Y});async function Y(n){return I("tauri://update-status",e=>{n(e?.payload)})}async function Dt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(o){if(o.error){e(),r(o.error);return}o.status==="DONE"&&(e(),t())}Y(s).then(o=>{n=o}).catch(o=>{throw e(),o}),T("tauri://update-install").catch(o=>{throw e(),o})})}async function xt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(u){e(),t({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){e(),r(u.error);return}u.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}z("tauri://update-available",u=>{s(u?.payload)}).catch(u=>{throw e(),u}),Y(o).then(u=>{n=u}).catch(u=>{throw e(),u}),T("tauri://update").catch(u=>{throw e(),u})})}var ee={};c(ee,{CloseRequestedEvent:()=>W,LogicalPosition:()=>D,LogicalSize:()=>A,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>oe,WebviewWindow:()=>p,WebviewWindowHandle:()=>x,WindowManager:()=>S,appWindow:()=>X,availableMonitors:()=>kt,currentMonitor:()=>Wt,getAll:()=>ae,getCurrent:()=>St,primaryMonitor:()=>Lt});var A=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new A(this.width/e,this.height/e)}},D=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new D(this.x/e,this.y/e)}},oe=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(oe||{});function St(){return new p(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ae(){return window.__TAURI_METADATA__.__windows.map(n=>new p(n.label,{skip:!0}))}var se=["tauri://created","tauri://error"],x=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):_(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):v(e,this.label,t)}async emit(e,t){if(se.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return w(e,this.label,t)}_handleTauriEvent(e,t){return se.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},S=class extends x{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new W(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",o=>{e({...o,payload:{type:"drop",paths:o.payload}})}),r=await this.listen("tauri://file-drop-hover",o=>{e({...o,payload:{type:"hover",paths:o.payload}})}),s=await this.listen("tauri://file-drop-cancelled",o=>{e({...o,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},W=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},p=class extends S{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return ae().some(t=>t.label===e)?new p(e,{skip:!0}):null}},X;"__TAURI_METADATA__"in window?X=new p(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),X=new p("main",{skip:!0}));function B(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function Wt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(B)}async function Lt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(B)}async function kt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(B))}var te={};c(te,{EOL:()=>Rt,arch:()=>zt,platform:()=>Ut,tempdir:()=>Ht,type:()=>It,version:()=>Nt});var Rt=P()?`\r `:` -`;async function It(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function zt(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function Ht(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function Vt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function jt(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var qt=l;return pe(Gt);})(); +`;async function Ut(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function Nt(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function It(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function zt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function Ht(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Vt=l;return me(jt);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/api/cli.rs b/core/tauri/src/api/cli.rs deleted file mode 100644 index 4cef96abb4e..00000000000 --- a/core/tauri/src/api/cli.rs +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! Types and functions related to CLI arguments. - -use crate::{ - utils::config::{CliArg, CliConfig}, - PackageInfo, -}; - -use clap::{Arg, ArgMatches, ErrorKind}; -use serde::Serialize; -use serde_json::Value; -use std::collections::HashMap; - -#[macro_use] -mod macros; - -mod clapfix { - //! Compatibility between `clap` 3.0 and 3.1+ without deprecation errors. - #![allow(deprecated)] - - pub type ClapCommand<'help> = clap::App<'help>; - - pub trait ErrorExt { - fn kind(&self) -> clap::ErrorKind; - } - - impl ErrorExt for clap::Error { - fn kind(&self) -> clap::ErrorKind { - self.kind - } - } -} - -use clapfix::{ClapCommand as App, ErrorExt}; - -/// The resolution of a argument match. -#[derive(Default, Debug, Serialize)] -#[non_exhaustive] -pub struct ArgData { - /// - [`Value::Bool`] if it's a flag, - /// - [`Value::Array`] if it's multiple, - /// - [`Value::String`] if it has value, - /// - [`Value::Null`] otherwise. - pub value: Value, - /// The number of occurrences of the argument. - /// e.g. `./app --arg 1 --arg 2 --arg 2 3 4` results in three occurrences. - pub occurrences: u64, -} - -/// The matched subcommand. -#[derive(Default, Debug, Serialize)] -#[non_exhaustive] -pub struct SubcommandMatches { - /// The subcommand name. - pub name: String, - /// The subcommand argument matches. - pub matches: Matches, -} - -/// The argument matches of a command. -#[derive(Default, Debug, Serialize)] -#[non_exhaustive] -pub struct Matches { - /// Data structure mapping each found arg with its resolution. - pub args: HashMap, - /// The matched subcommand if found. - pub subcommand: Option>, -} - -impl Matches { - /// Set a arg match. - pub(crate) fn set_arg(&mut self, name: String, value: ArgData) { - self.args.insert(name, value); - } - - /// Sets the subcommand matches. - pub(crate) fn set_subcommand(&mut self, name: String, matches: Matches) { - self.subcommand = Some(Box::new(SubcommandMatches { name, matches })); - } -} - -/// Gets the argument matches of the CLI definition. -/// -/// This is a low level API. If the application has been built, -/// prefer [`App::get_cli_matches`](`crate::App#method.get_cli_matches`). -/// -/// # Examples -/// -/// ```rust,no_run -/// use tauri::api::cli::get_matches; -/// tauri::Builder::default() -/// .setup(|app| { -/// let matches = get_matches(app.config().tauri.cli.as_ref().unwrap(), app.package_info())?; -/// Ok(()) -/// }); -/// ``` -pub fn get_matches(cli: &CliConfig, package_info: &PackageInfo) -> crate::api::Result { - let about = cli - .description() - .unwrap_or(&package_info.description.to_string()) - .to_string(); - let version = &*package_info.version.to_string(); - let app = get_app(package_info, version, &package_info.name, Some(&about), cli); - match app.try_get_matches() { - Ok(matches) => Ok(get_matches_internal(cli, &matches)), - Err(e) => match ErrorExt::kind(&e) { - ErrorKind::DisplayHelp => { - let mut matches = Matches::default(); - let help_text = e.to_string(); - matches.args.insert( - "help".to_string(), - ArgData { - value: Value::String(help_text), - occurrences: 0, - }, - ); - Ok(matches) - } - ErrorKind::DisplayVersion => { - let mut matches = Matches::default(); - matches - .args - .insert("version".to_string(), Default::default()); - Ok(matches) - } - _ => Err(e.into()), - }, - } -} - -fn get_matches_internal(config: &CliConfig, matches: &ArgMatches) -> Matches { - let mut cli_matches = Matches::default(); - map_matches(config, matches, &mut cli_matches); - - if let Some((subcommand_name, subcommand_matches)) = matches.subcommand() { - if let Some(subcommand_config) = config - .subcommands - .as_ref() - .and_then(|s| s.get(subcommand_name)) - { - cli_matches.set_subcommand( - subcommand_name.to_string(), - get_matches_internal(subcommand_config, subcommand_matches), - ); - } - } - - cli_matches -} - -fn map_matches(config: &CliConfig, matches: &ArgMatches, cli_matches: &mut Matches) { - if let Some(args) = config.args() { - for arg in args { - #[allow(deprecated)] - let occurrences = matches.occurrences_of(arg.name.clone()); - let value = if occurrences == 0 || !arg.takes_value { - Value::Bool(occurrences > 0) - } else if arg.multiple { - #[allow(deprecated)] - matches - .values_of(arg.name.clone()) - .map(|v| { - let mut values = Vec::new(); - for value in v { - values.push(Value::String(value.to_string())); - } - Value::Array(values) - }) - .unwrap_or(Value::Null) - } else { - #[allow(deprecated)] - matches - .value_of(arg.name.clone()) - .map(|v| Value::String(v.to_string())) - .unwrap_or(Value::Null) - }; - - cli_matches.set_arg(arg.name.clone(), ArgData { value, occurrences }); - } - } -} - -fn get_app<'a>( - package_info: &'a PackageInfo, - version: &'a str, - command_name: &'a str, - about: Option<&'a String>, - config: &'a CliConfig, -) -> App<'a> { - let mut app = App::new(command_name) - .author(package_info.authors) - .version(version); - - if let Some(about) = about { - app = app.about(&**about); - } - if let Some(long_description) = config.long_description() { - app = app.long_about(&**long_description); - } - if let Some(before_help) = config.before_help() { - app = app.before_help(&**before_help); - } - if let Some(after_help) = config.after_help() { - app = app.after_help(&**after_help); - } - - if let Some(args) = config.args() { - for arg in args { - let arg_name = arg.name.as_ref(); - app = app.arg(get_arg(arg_name, arg)); - } - } - - if let Some(subcommands) = config.subcommands() { - for (subcommand_name, subcommand) in subcommands { - let clap_subcommand = get_app( - package_info, - version, - subcommand_name, - subcommand.description(), - subcommand, - ); - app = app.subcommand(clap_subcommand); - } - } - - app -} - -fn get_arg<'a>(arg_name: &'a str, arg: &'a CliArg) -> Arg<'a> { - let mut clap_arg = Arg::new(arg_name); - - if arg.index.is_none() { - clap_arg = clap_arg.long(arg_name); - if let Some(short) = arg.short { - clap_arg = clap_arg.short(short); - } - } - - clap_arg = bind_string_arg!(arg, clap_arg, description, help); - clap_arg = bind_string_arg!(arg, clap_arg, long_description, long_help); - clap_arg = clap_arg.takes_value(arg.takes_value); - clap_arg = clap_arg.multiple_values(arg.multiple); - #[allow(deprecated)] - { - clap_arg = clap_arg.multiple_occurrences(arg.multiple_occurrences); - } - clap_arg = bind_value_arg!(arg, clap_arg, number_of_values); - #[allow(deprecated)] - { - clap_arg = bind_string_slice_arg!(arg, clap_arg, possible_values); - } - clap_arg = bind_value_arg!(arg, clap_arg, min_values); - clap_arg = bind_value_arg!(arg, clap_arg, max_values); - clap_arg = clap_arg.required(arg.required); - clap_arg = bind_string_arg!( - arg, - clap_arg, - required_unless_present, - required_unless_present - ); - clap_arg = bind_string_slice_arg!(arg, clap_arg, required_unless_present_all); - clap_arg = bind_string_slice_arg!(arg, clap_arg, required_unless_present_any); - clap_arg = bind_string_arg!(arg, clap_arg, conflicts_with, conflicts_with); - if let Some(value) = &arg.conflicts_with_all { - let v: Vec<&str> = value.iter().map(|x| &**x).collect(); - clap_arg = clap_arg.conflicts_with_all(&v); - } - clap_arg = bind_string_arg!(arg, clap_arg, requires, requires); - if let Some(value) = &arg.requires_all { - let v: Vec<&str> = value.iter().map(|x| &**x).collect(); - clap_arg = clap_arg.requires_all(&v); - } - clap_arg = bind_if_arg!(arg, clap_arg, requires_if); - clap_arg = bind_if_arg!(arg, clap_arg, required_if_eq); - clap_arg = bind_value_arg!(arg, clap_arg, require_equals); - clap_arg = bind_value_arg!(arg, clap_arg, index); - - clap_arg -} diff --git a/core/tauri/src/api/cli/macros.rs b/core/tauri/src/api/cli/macros.rs deleted file mode 100644 index 87d82194b20..00000000000 --- a/core/tauri/src/api/cli/macros.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -macro_rules! bind_string_arg { - ($arg:expr, $clap_arg:expr, $arg_name:ident, $clap_field:ident) => {{ - let arg = $arg; - let mut clap_arg = $clap_arg; - if let Some(value) = &arg.$arg_name { - clap_arg = clap_arg.$clap_field(value.as_str()); - } - clap_arg - }}; -} - -macro_rules! bind_value_arg { - ($arg:expr, $clap_arg:expr, $field:ident) => {{ - let arg = $arg; - let mut clap_arg = $clap_arg; - if let Some(value) = arg.$field { - clap_arg = clap_arg.$field(value); - } - clap_arg - }}; -} - -macro_rules! bind_string_slice_arg { - ($arg:expr, $clap_arg:expr, $field:ident) => {{ - let arg = $arg; - let mut clap_arg = $clap_arg; - if let Some(value) = &arg.$field { - let v: Vec<&str> = value.iter().map(|x| &**x).collect(); - clap_arg = clap_arg.$field(v); - } - clap_arg - }}; -} - -macro_rules! bind_if_arg { - ($arg:expr, $clap_arg:expr, $field:ident) => {{ - let arg = $arg; - let mut clap_arg = $clap_arg; - if let Some(value) = &arg.$field { - let v: Vec<&str> = value.iter().map(|x| &**x).collect(); - clap_arg = clap_arg.$field(&v[0], &v[1]); - } - clap_arg - }}; -} diff --git a/core/tauri/src/api/error.rs b/core/tauri/src/api/error.rs index 3187df5da9c..4457c6356bf 100644 --- a/core/tauri/src/api/error.rs +++ b/core/tauri/src/api/error.rs @@ -69,11 +69,6 @@ pub enum Error { /// failed to detect the current platform. #[error("failed to detect platform: {0}")] FailedToDetectPlatform(String), - /// CLI argument parsing error. - #[cfg(feature = "cli")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))] - #[error("failed to parse CLI arguments: {0}")] - ParseCliArguments(String), /// Shell error. #[error("shell error: {0}")] Shell(String), @@ -84,10 +79,3 @@ pub enum Error { #[error(transparent)] Http(#[from] http::Error), } - -#[cfg(feature = "cli")] -impl From for Error { - fn from(error: clap::Error) -> Self { - Self::ParseCliArguments(error.to_string()) - } -} diff --git a/core/tauri/src/api/mod.rs b/core/tauri/src/api/mod.rs index 48270f35193..fd3ed5499c5 100644 --- a/core/tauri/src/api/mod.rs +++ b/core/tauri/src/api/mod.rs @@ -19,14 +19,6 @@ pub mod process; pub mod shell; pub mod version; -#[cfg(feature = "cli")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))] -pub mod cli; - -#[cfg(feature = "cli")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))] -pub use clap; - #[cfg(all(desktop, feature = "notification"))] #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "notification"))))] pub mod notification; diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 428afcc575d..48a96fb546a 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -748,26 +748,6 @@ impl App { .set_device_event_filter(filter); } - /// Gets the argument matches of the CLI definition configured in `tauri.conf.json`. - /// - /// # Examples - /// - /// ``` - /// tauri::Builder::default() - /// .setup(|app| { - /// let matches = app.get_cli_matches()?; - /// Ok(()) - /// }); - /// ``` - #[cfg(cli)] - pub fn get_cli_matches(&self) -> crate::Result { - if let Some(cli) = &self.manager.config().tauri.cli { - crate::api::cli::get_matches(cli, self.manager.package_info()).map_err(Into::into) - } else { - Ok(Default::default()) - } - } - /// Runs the application. /// /// # Examples diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index 4f7e8e24a82..77f1429149c 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -13,8 +13,6 @@ use serde_json::Value as JsonValue; use std::sync::Arc; mod app; -#[cfg(cli)] -mod cli; #[cfg(clipboard_any)] mod clipboard; #[cfg(dialog_any)] @@ -82,8 +80,6 @@ enum Module { Event(event::Cmd), #[cfg(dialog_any)] Dialog(dialog::Cmd), - #[cfg(cli)] - Cli(cli::Cmd), Notification(notification::Cmd), #[cfg(http_any)] Http(http::Cmd), @@ -161,13 +157,6 @@ impl Module { .and_then(|r| r.json) .map_err(InvokeError::from_anyhow) }), - #[cfg(cli)] - Self::Cli(cmd) => resolver.respond_async(async move { - cmd - .run(context) - .and_then(|r| r.json) - .map_err(InvokeError::from_anyhow) - }), Self::Notification(cmd) => resolver.respond_async(async move { cmd .run(context) diff --git a/core/tauri/src/endpoints/cli.rs b/core/tauri/src/endpoints/cli.rs deleted file mode 100644 index 1c7c490a934..00000000000 --- a/core/tauri/src/endpoints/cli.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![allow(unused_imports)] - -use super::{InvokeContext, InvokeResponse}; -use crate::Runtime; -use serde::Deserialize; -use tauri_macros::{command_enum, module_command_handler, CommandModule}; - -/// The API descriptor. -#[command_enum] -#[derive(CommandModule, Deserialize)] -#[serde(tag = "cmd", rename_all = "camelCase")] -pub enum Cmd { - /// The get CLI matches API. - CliMatches, -} - -impl Cmd { - #[module_command_handler(cli)] - fn cli_matches(context: InvokeContext) -> super::Result { - if let Some(cli) = &context.config.tauri.cli { - crate::api::cli::get_matches(cli, &context.package_info) - .map(Into::into) - .map_err(Into::into) - } else { - Ok(crate::api::cli::Matches::default().into()) - } - } - - #[cfg(not(cli))] - fn cli_matches(_: InvokeContext) -> super::Result { - Err(crate::error::into_anyhow("CLI definition not set under tauri.conf.json > tauri > cli (https://tauri.app/docs/api/config#tauri.cli)")) - } -} - -#[cfg(test)] -mod tests { - #[tauri_macros::module_command_test(cli, "CLI definition not set under tauri.conf.json > tauri > cli (https://tauri.app/docs/api/config#tauri.cli)", runtime)] - #[quickcheck_macros::quickcheck] - fn cli_matches() { - let res = super::Cmd::cli_matches(crate::test::mock_invoke_context()); - crate::test_utils::assert_not_allowlist_error(res); - } -} diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index dbaf5d86c4f..e31e4cc1edd 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -32,7 +32,6 @@ //! - **dialog**: Enables the [`api::dialog`] module. //! - **notification**: Enables the [`api::notification`] module. //! - **fs-extract-api**: Enabled the `tauri::api::file::Extract` API. -//! - **cli**: Enables usage of `clap` for CLI argument parsing. Enabled by default if the `cli` config is defined on the `tauri.conf.json` file. //! - **system-tray**: Enables application system tray API. Enabled by default if the `systemTray` config is defined on the `tauri.conf.json` file. //! - **macos-private-api**: Enables features only available in **macOS**'s private APIs, currently the `transparent` window functionality and the `fullScreenEnabled` preference setting to `true`. Enabled by default if the `tauri > macosPrivateApi` config flag is set to `true` on the `tauri.conf.json` file. //! - **windows7-compat**: Enables compatibility with Windows 7 for the notification API. diff --git a/core/tauri/src/test/mod.rs b/core/tauri/src/test/mod.rs index 41d6dfb67ca..f7972ac5bdc 100644 --- a/core/tauri/src/test/mod.rs +++ b/core/tauri/src/test/mod.rs @@ -16,7 +16,7 @@ use crate::ShellScopeConfig; use crate::{Manager, Pattern, WindowBuilder}; use tauri_utils::{ assets::{AssetKey, Assets, CspHash}, - config::{CliConfig, Config, PatternKind, TauriConfig, WindowUrl}, + config::{Config, PatternKind, TauriConfig, WindowUrl}, }; pub struct NoopAsset { @@ -47,14 +47,6 @@ pub fn mock_context(assets: A) -> crate::Context { tauri: TauriConfig { pattern: PatternKind::Brownfield, windows: Vec::new(), - cli: Some(CliConfig { - description: None, - long_description: None, - before_help: None, - after_help: None, - args: None, - subcommands: None, - }), bundle: Default::default(), allowlist: Default::default(), security: Default::default(), diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 2b6f446e364..dc2867f9a35 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,21 +1,22 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function V(){}function ws(e){return e()}function Vl(){return Object.create(null)}function se(e){e.forEach(ws)}function so(e){return typeof e=="function"}function _e(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Gn;function oo(e,t){return Gn||(Gn=document.createElement("a")),Gn.href=t,e===Gn.href}function ao(e){return Object.keys(e).length===0}function ro(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ks(e,t,n){e.$$.on_destroy.push(ro(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function mt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Zn(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function co(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Dt(e,t){for(let n=0;n{Kn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function xn(e){e&&e.c()}function Gt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Wt(()=>{const c=o.map(ws).filter(so);u?u.push(...c):se(c),e.$$.on_mount=[]}),d.forEach(Wt)}function Jt(e,t){const n=e.$$;n.fragment!==null&&(se(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function _o(e,t){e.$$.dirty[0]===-1&&(Ut.push(e),mo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const y=v.length?v[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=y)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](y),g&&_o(e,k)),_}):[],f.update(),g=!0,se(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=co(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Se(e.$$.fragment),Gt(e,t.target,t.anchor,t.customElement),Ts()}Bt(c)}class ve{$destroy(){Jt(this,1),this.$destroy=V}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!ao(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function Cs(e,t=V){let n;const i=new Set;function l(d){if(_e(e,d)&&(e=d,n)){const c=!zt.length;for(const f of i)f[1](),zt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var bo=Object.defineProperty,Ce=(e,t)=>{for(var n in t)bo(e,n,{get:t[n],enumerable:!0})},go={};Ce(go,{convertFileSrc:()=>As,invoke:()=>ei,transformCallback:()=>ht});function yo(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function ht(e,t=!1){let n=yo(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function ei(e,t={}){return new Promise((n,i)=>{let l=ht(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=ht(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function As(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function S(e){return ei("tauri",e)}var vo={};Ce(vo,{Child:()=>Ss,Command:()=>ti,EventEmitter:()=>Qn,open:()=>Fi});async function wo(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),S({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:ht(e)}})}var Qn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.prependListener(e,n)}},Ss=class{constructor(e){this.pid=e}async write(e){return S({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return S({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},ti=class extends Qn{constructor(e,t=[],n){super(),this.stdout=new Qn,this.stderr=new Qn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new ti(e,t,n)}static sidecar(e,t=[],n){let i=new ti(e,t,n);return i.options.sidecar=!0,i}async spawn(){return wo(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Ss(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(i)})}),this.spawn().catch(t)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((t,n)=>new Uint8Array([...t,...n,10]),new Uint8Array):e.join(` -`)}};async function Fi(e,t){return S({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var ko={};Ce(ko,{TauriEvent:()=>Ds,emit:()=>ai,listen:()=>Yt,once:()=>Ws});async function Ls(e,t){return S({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Es(e,t,n){await S({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return S({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:ht(n)}}).then(i=>async()=>Ls(e,i))}async function zs(e,t,n){return Ni(e,t,i=>{n(i),Ls(e,i.id).catch(()=>{})})}var Ds=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ds||{});async function Yt(e,t){return Ni(e,null,t)}async function Ws(e,t){return zs(e,null,t)}async function ai(e,t){return Es(e,void 0,t)}var Mo={};Ce(Mo,{CloseRequestedEvent:()=>Hs,LogicalPosition:()=>Os,LogicalSize:()=>ni,PhysicalPosition:()=>nt,PhysicalSize:()=>pt,UserAttentionType:()=>ji,WebviewWindow:()=>_t,WebviewWindowHandle:()=>Rs,WindowManager:()=>Is,appWindow:()=>qe,availableMonitors:()=>Ao,currentMonitor:()=>To,getAll:()=>Ps,getCurrent:()=>qt,primaryMonitor:()=>Co});var ni=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},pt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new ni(this.width/e,this.height/e)}},Os=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},nt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Os(this.x/e,this.y/e)}},ji=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(ji||{});function qt(){return new _t(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ps(){return window.__TAURI_METADATA__.__windows.map(e=>new _t(e.label,{skip:!0}))}var Jl=["tauri://created","tauri://error"],Rs=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ni(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):zs(e,this.label,t)}async emit(e,t){if(Jl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Es(e,this.label,t)}_handleTauriEvent(e,t){return Jl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Is=class extends Rs{async scaleFactor(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async outerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async innerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async outerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async isFullscreen(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async theme(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Hs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Hs=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},_t=class extends Is{constructor(e,t={}){super(e),t!=null&&t.skip||S({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Ps().some(t=>t.label===e)?new _t(e,{skip:!0}):null}},qe;"__TAURI_METADATA__"in window?qe=new _t(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),qe=new _t("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new nt(e.position.x,e.position.y),size:new pt(e.size.width,e.size.height)}}async function To(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function Co(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function Ao(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function So(){return navigator.appVersion.includes("Win")}var Lo={};Ce(Lo,{EOL:()=>Eo,arch:()=>Wo,platform:()=>Fs,tempdir:()=>Oo,type:()=>Do,version:()=>zo});var Eo=So()?`\r +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function V(){}function ws(e){return e()}function Vl(){return Object.create(null)}function se(e){e.forEach(ws)}function lo(e){return typeof e=="function"}function _e(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Jn;function so(e,t){return Jn||(Jn=document.createElement("a")),Jn.href=t,e===Jn.href}function oo(e){return Object.keys(e).length===0}function ao(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ks(e,t,n){e.$$.on_destroy.push(ao(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function mt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function $n(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function uo(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Dt(e,t){for(let n=0;n{Qn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ei(e){e&&e.c()}function Gt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Wt(()=>{const c=o.map(ws).filter(lo);u?u.push(...c):se(c),e.$$.on_mount=[]}),d.forEach(Wt)}function Jt(e,t){const n=e.$$;n.fragment!==null&&(se(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ho(e,t){e.$$.dirty[0]===-1&&(Ut.push(e),po(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const y=v.length?v[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=y)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](y),g&&ho(e,k)),_}):[],f.update(),g=!0,se(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=uo(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Ae(e.$$.fragment),Gt(e,t.target,t.anchor,t.customElement),Ts()}Bt(c)}class ve{$destroy(){Jt(this,1),this.$destroy=V}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!oo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function Cs(e,t=V){let n;const i=new Set;function l(d){if(_e(e,d)&&(e=d,n)){const c=!zt.length;for(const f of i)f[1](),zt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var _o=Object.defineProperty,Se=(e,t)=>{for(var n in t)_o(e,n,{get:t[n],enumerable:!0})},bo={};Se(bo,{convertFileSrc:()=>As,invoke:()=>Xt,transformCallback:()=>ht});function go(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function ht(e,t=!1){let n=go(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function Xt(e,t={}){return new Promise((n,i)=>{let l=ht(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=ht(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function As(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function S(e){return Xt("tauri",e)}var yo={};Se(yo,{Child:()=>Ss,Command:()=>Hi,EventEmitter:()=>Zn,open:()=>Fi});async function vo(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),S({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:ht(e)}})}var Zn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(...t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.prependListener(e,n)}},Ss=class{constructor(e){this.pid=e}async write(e){return S({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return S({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Hi=class extends Zn{constructor(e,t=[],n){super(),this.stdout=new Zn,this.stderr=new Zn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new Hi(e,t,n);return i.options.sidecar=!0,i}async spawn(){return vo(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Ss(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:n.join(` +`),stderr:i.join(` +`)})}),this.spawn().catch(t)})}};async function Fi(e,t){return S({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var wo={};Se(wo,{TauriEvent:()=>Ds,emit:()=>oi,listen:()=>Kt,once:()=>Ws});async function Ls(e,t){return S({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Es(e,t,n){await S({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return S({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:ht(n)}}).then(i=>async()=>Ls(e,i))}async function zs(e,t,n){return Ni(e,t,i=>{n(i),Ls(e,i.id).catch(()=>{})})}var Ds=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ds||{});async function Kt(e,t){return Ni(e,null,t)}async function Ws(e,t){return zs(e,null,t)}async function oi(e,t){return Es(e,void 0,t)}var ko={};Se(ko,{CloseRequestedEvent:()=>Hs,LogicalPosition:()=>Ps,LogicalSize:()=>ti,PhysicalPosition:()=>nt,PhysicalSize:()=>pt,UserAttentionType:()=>ji,WebviewWindow:()=>_t,WebviewWindowHandle:()=>Rs,WindowManager:()=>Is,appWindow:()=>qe,availableMonitors:()=>Co,currentMonitor:()=>Mo,getAll:()=>Os,getCurrent:()=>qt,primaryMonitor:()=>To});var ti=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},pt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new ti(this.width/e,this.height/e)}},Ps=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},nt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Ps(this.x/e,this.y/e)}},ji=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(ji||{});function qt(){return new _t(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Os(){return window.__TAURI_METADATA__.__windows.map(e=>new _t(e.label,{skip:!0}))}var Jl=["tauri://created","tauri://error"],Rs=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ni(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):zs(e,this.label,t)}async emit(e,t){if(Jl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Es(e,this.label,t)}_handleTauriEvent(e,t){return Jl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Is=class extends Rs{async scaleFactor(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async outerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async innerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async outerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async isFullscreen(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Hs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Hs=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},_t=class extends Is{constructor(e,t={}){super(e),t!=null&&t.skip||S({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Os().some(t=>t.label===e)?new _t(e,{skip:!0}):null}},qe;"__TAURI_METADATA__"in window?qe=new _t(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),qe=new _t("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new nt(e.position.x,e.position.y),size:new pt(e.size.width,e.size.height)}}async function Mo(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function To(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function Co(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function Ao(){return navigator.appVersion.includes("Win")}var So={};Se(So,{EOL:()=>Lo,arch:()=>Do,platform:()=>Fs,tempdir:()=>Wo,type:()=>zo,version:()=>Eo});var Lo=Ao()?`\r `:` -`;async function Fs(){return S({__tauriModule:"Os",message:{cmd:"platform"}})}async function zo(){return S({__tauriModule:"Os",message:{cmd:"version"}})}async function Do(){return S({__tauriModule:"Os",message:{cmd:"osType"}})}async function Wo(){return S({__tauriModule:"Os",message:{cmd:"arch"}})}async function Oo(){return S({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Po={};Ce(Po,{getName:()=>js,getTauriVersion:()=>Us,getVersion:()=>Ns,hide:()=>Bs,show:()=>qs});async function Ns(){return S({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function js(){return S({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Us(){return S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function qs(){return S({__tauriModule:"App",message:{cmd:"show"}})}async function Bs(){return S({__tauriModule:"App",message:{cmd:"hide"}})}var Ro={};Ce(Ro,{exit:()=>Vs,relaunch:()=>qi});async function Vs(e=0){return S({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function qi(){return S({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Io(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,P,j,E,M,A,O,T,F;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +`;async function Fs(){return S({__tauriModule:"Os",message:{cmd:"platform"}})}async function Eo(){return S({__tauriModule:"Os",message:{cmd:"version"}})}async function zo(){return S({__tauriModule:"Os",message:{cmd:"osType"}})}async function Do(){return S({__tauriModule:"Os",message:{cmd:"arch"}})}async function Wo(){return S({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Po={};Se(Po,{getName:()=>js,getTauriVersion:()=>Us,getVersion:()=>Ns,hide:()=>Bs,show:()=>qs});async function Ns(){return S({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function js(){return S({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Us(){return S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function qs(){return S({__tauriModule:"App",message:{cmd:"show"}})}async function Bs(){return S({__tauriModule:"App",message:{cmd:"hide"}})}var Oo={};Se(Oo,{exit:()=>Vs,relaunch:()=>qi});async function Vs(e=0){return S({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function qi(){return S({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Ro(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration tests.`,n=h(),i=a("br"),l=h(),o=a("br"),u=h(),d=a("pre"),c=z("App name: "),f=a("code"),g=z(e[2]),k=z(` App version: `),_=a("code"),v=z(e[0]),y=z(` Tauri version: `),b=a("code"),C=z(e[1]),W=z(` -`),I=h(),P=a("br"),j=h(),E=a("div"),M=a("button"),M.textContent="Close application",A=h(),O=a("button"),O.textContent="Relaunch application",r(M,"class","btn"),r(O,"class","btn"),r(E,"class","flex flex-wrap gap-1 shadow-")},m(U,J){m(U,t,J),m(U,n,J),m(U,i,J),m(U,l,J),m(U,o,J),m(U,u,J),m(U,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,v),s(d,y),s(d,b),s(b,C),s(d,W),m(U,I,J),m(U,P,J),m(U,j,J),m(U,E,J),s(E,M),s(E,A),s(E,O),T||(F=[L(M,"click",e[3]),L(O,"click",e[4])],T=!0)},p(U,[J]){J&4&&Q(g,U[2]),J&1&&Q(v,U[0]),J&2&&Q(C,U[1])},i:V,o:V,d(U){U&&p(t),U&&p(n),U&&p(i),U&&p(l),U&&p(o),U&&p(u),U&&p(d),U&&p(I),U&&p(P),U&&p(j),U&&p(E),T=!1,se(F)}}}function Ho(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";js().then(c=>{n(2,o=c)}),Ns().then(c=>{n(0,i=c)}),Us().then(c=>{n(1,l=c)});async function u(){await Vs()}async function d(){await qi()}return[i,l,o,u,d]}class Fo extends ve{constructor(t){super(),ye(this,t,Ho,Io,_e,{})}}var No={};Ce(No,{getMatches:()=>Gs});async function Gs(){return S({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function jo(e){let t,n,i,l,o,u,d,c,f,g,k,_,v;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: +`),I=h(),O=a("br"),j=h(),E=a("div"),M=a("button"),M.textContent="Close application",A=h(),P=a("button"),P.textContent="Relaunch application",r(M,"class","btn"),r(P,"class","btn"),r(E,"class","flex flex-wrap gap-1 shadow-")},m(U,J){m(U,t,J),m(U,n,J),m(U,i,J),m(U,l,J),m(U,o,J),m(U,u,J),m(U,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,v),s(d,y),s(d,b),s(b,C),s(d,W),m(U,I,J),m(U,O,J),m(U,j,J),m(U,E,J),s(E,M),s(E,A),s(E,P),T||(F=[L(M,"click",e[3]),L(P,"click",e[4])],T=!0)},p(U,[J]){J&4&&Q(g,U[2]),J&1&&Q(v,U[0]),J&2&&Q(C,U[1])},i:V,o:V,d(U){U&&p(t),U&&p(n),U&&p(i),U&&p(l),U&&p(o),U&&p(u),U&&p(d),U&&p(I),U&&p(O),U&&p(j),U&&p(E),T=!1,se(F)}}}function Io(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";js().then(c=>{n(2,o=c)}),Ns().then(c=>{n(0,i=c)}),Us().then(c=>{n(1,l=c)});async function u(){await Vs()}async function d(){await qi()}return[i,l,o,u,d]}class Ho extends ve{constructor(t){super(),ye(this,t,Io,Ro,_e,{})}}function Fo(e){let t,n,i,l,o,u,d,c,f,g,k,_,v;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),g=h(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(y,b){m(y,t,b),m(y,n,b),m(y,i,b),m(y,l,b),m(y,o,b),m(y,u,b),m(y,d,b),m(y,c,b),m(y,f,b),m(y,g,b),m(y,k,b),_||(v=L(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(y){y&&p(t),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),y&&p(c),y&&p(f),y&&p(g),y&&p(k),_=!1,v()}}}function Uo(e,t,n){let{onMessage:i}=t;function l(){Gs().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class qo extends ve{constructor(t){super(),ye(this,t,Uo,jo,_e,{onMessage:1})}}function Bo(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){m(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Vo(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("rust-event",i)}),Hi(()=>{l&&l()});function o(){ei("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ei("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){ai("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Go extends ve{constructor(t){super(),ye(this,t,Vo,Bo,_e,{onMessage:3})}}var Jo={};Ce(Jo,{ask:()=>Xs,confirm:()=>Yo,message:()=>Xo,open:()=>Bi,save:()=>Js});async function Bi(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Js(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Xo(e,t){var i;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type}})}async function Xs(e,t){var i;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type}})}async function Yo(e,t){var i;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type}})}var Ko={};Ce(Ko,{BaseDirectory:()=>Xt,Dir:()=>Xt,copyFile:()=>ea,createDir:()=>$o,exists:()=>ia,readBinaryFile:()=>Vi,readDir:()=>Ys,readTextFile:()=>Qo,removeDir:()=>xo,removeFile:()=>ta,renameFile:()=>na,writeBinaryFile:()=>Zo,writeFile:()=>Ii,writeTextFile:()=>Ii});var Xt=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(Xt||{});async function Qo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function Vi(e,t={}){let n=await S({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Ii(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function Zo(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function Ys(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function $o(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function xo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function ea(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function ta(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function na(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function ia(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function la(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,P,j,E,M,A,O;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),g=h(),k=a("label"),k.textContent="Multiple",_=h(),v=a("div"),y=a("input"),b=h(),C=a("label"),C.textContent="Directory",W=h(),I=a("br"),P=h(),j=a("button"),j.textContent="Open dialog",E=h(),M=a("button"),M.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(y,"type","checkbox"),r(y,"id","dialog-directory"),r(C,"for","dialog-directory"),r(j,"class","btn"),r(j,"id","open-dialog"),r(M,"class","btn"),r(M,"id","save-dialog")},m(T,F){m(T,t,F),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),m(T,o,F),m(T,u,F),m(T,d,F),m(T,c,F),s(c,f),f.checked=e[2],s(c,g),s(c,k),m(T,_,F),m(T,v,F),s(v,y),y.checked=e[3],s(v,b),s(v,C),m(T,W,F),m(T,I,F),m(T,P,F),m(T,j,F),m(T,E,F),m(T,M,F),A||(O=[L(n,"input",e[8]),L(l,"input",e[9]),L(f,"change",e[10]),L(y,"change",e[11]),L(j,"click",e[4]),L(M,"click",e[5])],A=!0)},p(T,[F]){F&1&&n.value!==T[0]&&q(n,T[0]),F&2&&l.value!==T[1]&&q(l,T[1]),F&4&&(f.checked=T[2]),F&8&&(y.checked=T[3])},i:V,o:V,d(T){T&&p(t),T&&p(o),T&&p(u),T&&p(d),T&&p(c),T&&p(_),T&&p(v),T&&p(W),T&&p(I),T&&p(P),T&&p(j),T&&p(E),T&&p(M),A=!1,se(O)}}}function sa(e,t){var n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){var o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function oa(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){Bi({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{var C=b,W=C.match(/\S+\.\S+$/g);Vi(C).then(function(I){W&&(C.includes(".png")||C.includes(".jpg"))?sa(new Uint8Array(I),function(P){var j="data:image/png;base64,"+P;l('')}):i(b)}).catch(i(b))}}).catch(i)}function g(){Js({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function v(){d=this.checked,n(2,d)}function y(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,g,i,l,k,_,v,y]}class aa extends ve{constructor(t){super(),ye(this,t,oa,la,_e,{onMessage:6,insecureRenderHtml:7})}}function Xl(e,t,n){const i=e.slice();return i[9]=t[n],i}function Yl(e){let t,n=e[9][0]+"",i;return{c(){t=a("option"),i=z(n),t.__value=e[9][1],t.value=t.__value},m(l,o){m(l,t,o),s(t,i)},p:V,d(l){l&&p(t)}}}function ra(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,P,j=e[2],E=[];for(let M=0;MisNaN(parseInt(_))).map(_=>[_,Xt[_]]);function c(){const _=o.match(/\S+\.\S+$/g),v={dir:Kl()};(_?Vi(o,v):Ys(o,v)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))ua(new Uint8Array(b),function(C){const W="data:image/png;base64,"+C;l('')});else{const C=String.fromCharCode.apply(null,b);l(''),setTimeout(()=>{const W=document.getElementById("file-response");W.value=C,document.getElementById("file-save").addEventListener("click",function(){Ii(o,W.value,{dir:Kl()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=As(o),u)}function g(){o=this.value,n(0,o)}function k(_){$n[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,g,k]}class da extends ve{constructor(t){super(),ye(this,t,ca,ra,_e,{onMessage:5,insecureRenderHtml:6})}}var fa={};Ce(fa,{Body:()=>it,Client:()=>Qs,Response:()=>Ks,ResponseType:()=>Gi,fetch:()=>pa,getClient:()=>ii});var Gi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Gi||{}),it=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new it("Form",t)}static json(e){return new it("Json",e)}static text(e){return new it("Text",e)}static bytes(e){return new it("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Ks=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},Qs=class{constructor(e){this.id=e}async drop(){return S({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),S({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Ks(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ii(e){return S({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Qs(t))}var Oi=null;async function pa(e,t){var n;return Oi===null&&(Oi=await ii()),Oi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Ql(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Zl(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I=e[5],P=[];for(let A=0;AIe(P[A],1,1,()=>{P[A]=null});let E=!e[3]&&ts(),M=!e[3]&&e[8]&&ns();return{c(){t=a("span"),n=a("span"),i=z(e[6]),l=h(),o=a("ul");for(let A=0;A{g[y]=null}),oi(),o=g[l],o?o.p(_,v):(o=g[l]=f[l](_),o.c()),Se(o,1),o.m(t,u))},i(_){d||(Se(o),d=!0)},o(_){Ie(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function ts(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ns(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function _a(e){let t,n,i=e[5].length&&Zl(e);return{c(){i&&i.c(),t=li()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Se(i,1)):(i=Zl(l),i.c(),Se(i,1),i.m(t.parentNode,t)):i&&(si(),Ie(i,1,1,()=>{i=null}),oi())},i(l){n||(Se(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const ba="...";function ga(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,g,k,_;const v=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},y=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(M,"class","input"),r(O,"class","input"),r(E,"class","flex gap-2 children:grow"),r(ne,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(D,B){m(D,t,B),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Dt(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,v),s(t,y),s(t,b),m(D,C,B),m(D,W,B),m(D,I,B),m(D,P,B),m(D,j,B),m(D,E,B),s(E,M),q(M,e[2]),s(E,A),s(E,O),q(O,e[3]),m(D,T,B),m(D,F,B),m(D,U,B),m(D,J,B),s(J,ne),ne.checked=e[5],s(J,ce),m(D,te,B),m(D,Y,B),m(D,oe,B),m(D,ee,B),m(D,H,B),m(D,X,B),m(D,$,B),m(D,be,B),m(D,fe,B),m(D,pe,B),m(D,we,B),Gt(ae,D,B),x=!0,me||(Le=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",Zn(e[6])),L(M,"input",e[11]),L(O,"input",e[12]),L(ne,"change",e[13]),L(X,"click",e[7])],me=!0)},p(D,[B]){B&1&&Dt(n,D[0]),B&2&&q(k,D[1]),B&4&&M.value!==D[2]&&q(M,D[2]),B&8&&O.value!==D[3]&&q(O,D[3]),B&32&&(ne.checked=D[5]);const Ee={};B&16&&(Ee.json=D[4]),ae.$set(Ee)},i(D){x||(Se(ae.$$.fragment,D),x=!0)},o(D){Ie(ae.$$.fragment,D),x=!1},d(D){D&&p(t),D&&p(C),D&&p(W),D&&p(I),D&&p(P),D&&p(j),D&&p(E),D&&p(T),D&&p(F),D&&p(U),D&&p(J),D&&p(te),D&&p(Y),D&&p(oe),D&&p(ee),D&&p(H),D&&p(X),D&&p($),D&&p(be),D&&p(fe),D&&p(pe),D&&p(we),Jt(ae,D),me=!1,se(Le)}}}function va(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const W=await ii().catch(j=>{throw o(j),j}),P={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?P.body=it.json(JSON.parse(l)):l!==""&&(P.body=it.text(l)),W.request(P).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const W=await ii().catch(I=>{throw o(I),I});n(4,f=await W.request({url:"http://localhost:3003",method:"POST",body:it.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:Gi.Text}))}function _(){i=Pi(this),n(0,i)}function v(){l=this.value,n(1,l)}function y(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function C(){g=this.checked,n(5,g)}return e.$$set=W=>{"onMessage"in W&&n(8,o=W.onMessage)},[i,l,d,c,f,g,u,k,o,_,v,y,b,C]}class wa extends ve{constructor(t){super(),ye(this,t,va,ya,_e,{onMessage:8})}}function ka(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",Ma),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function Ma(){new Notification("Notification title",{body:"This is the notification body"})}function Ta(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Ca extends ve{constructor(t){super(),ye(this,t,Ta,ka,_e,{onMessage:0})}}function is(e,t,n){const i=e.slice();return i[69]=t[n],i}function ls(e,t,n){const i=e.slice();return i[72]=t[n],i}function ss(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[40].call(i))},m(f,g){m(f,t,g),m(f,n,g),m(f,i,g),s(i,l);for(let k=0;kupdate --background subcommand.`,n=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),g=h(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(y,b){m(y,t,b),m(y,n,b),m(y,i,b),m(y,l,b),m(y,o,b),m(y,u,b),m(y,d,b),m(y,c,b),m(y,f,b),m(y,g,b),m(y,k,b),_||(v=L(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(y){y&&p(t),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),y&&p(c),y&&p(f),y&&p(g),y&&p(k),_=!1,v()}}}function No(e,t,n){let{onMessage:i}=t;function l(){Xt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class jo extends ve{constructor(t){super(),ye(this,t,No,Fo,_e,{onMessage:1})}}function Uo(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){m(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function qo(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Kt("rust-event",i)}),Ii(()=>{l&&l()});function o(){Xt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Xt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){oi("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Bo extends ve{constructor(t){super(),ye(this,t,qo,Uo,_e,{onMessage:3})}}var Vo={};Se(Vo,{ask:()=>Js,confirm:()=>Jo,message:()=>Go,open:()=>Bi,save:()=>Gs});async function Bi(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Gs(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Go(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Js(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function Jo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}var Xo={};Se(Xo,{BaseDirectory:()=>Yt,Dir:()=>Yt,copyFile:()=>$o,createDir:()=>Qo,exists:()=>ta,readBinaryFile:()=>Vi,readDir:()=>Xs,readTextFile:()=>Yo,removeDir:()=>Zo,removeFile:()=>xo,renameFile:()=>ea,writeBinaryFile:()=>Ko,writeFile:()=>Ri,writeTextFile:()=>Ri});var Yt=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(Yt||{});async function Yo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function Vi(e,t={}){let n=await S({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Ri(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function Ko(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function Xs(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function Qo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function Zo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function $o(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function xo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function ea(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function ta(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function na(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),g=h(),k=a("label"),k.textContent="Multiple",_=h(),v=a("div"),y=a("input"),b=h(),C=a("label"),C.textContent="Directory",W=h(),I=a("br"),O=h(),j=a("button"),j.textContent="Open dialog",E=h(),M=a("button"),M.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(y,"type","checkbox"),r(y,"id","dialog-directory"),r(C,"for","dialog-directory"),r(j,"class","btn"),r(j,"id","open-dialog"),r(M,"class","btn"),r(M,"id","save-dialog")},m(T,F){m(T,t,F),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),m(T,o,F),m(T,u,F),m(T,d,F),m(T,c,F),s(c,f),f.checked=e[2],s(c,g),s(c,k),m(T,_,F),m(T,v,F),s(v,y),y.checked=e[3],s(v,b),s(v,C),m(T,W,F),m(T,I,F),m(T,O,F),m(T,j,F),m(T,E,F),m(T,M,F),A||(P=[L(n,"input",e[8]),L(l,"input",e[9]),L(f,"change",e[10]),L(y,"change",e[11]),L(j,"click",e[4]),L(M,"click",e[5])],A=!0)},p(T,[F]){F&1&&n.value!==T[0]&&q(n,T[0]),F&2&&l.value!==T[1]&&q(l,T[1]),F&4&&(f.checked=T[2]),F&8&&(y.checked=T[3])},i:V,o:V,d(T){T&&p(t),T&&p(o),T&&p(u),T&&p(d),T&&p(c),T&&p(_),T&&p(v),T&&p(W),T&&p(I),T&&p(O),T&&p(j),T&&p(E),T&&p(M),A=!1,se(P)}}}function ia(e,t){var n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){var o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function la(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){Bi({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{var C=b,W=C.match(/\S+\.\S+$/g);Vi(C).then(function(I){W&&(C.includes(".png")||C.includes(".jpg"))?ia(new Uint8Array(I),function(O){var j="data:image/png;base64,"+O;l('')}):i(b)}).catch(i(b))}}).catch(i)}function g(){Gs({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function v(){d=this.checked,n(2,d)}function y(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,g,i,l,k,_,v,y]}class sa extends ve{constructor(t){super(),ye(this,t,la,na,_e,{onMessage:6,insecureRenderHtml:7})}}function Xl(e,t,n){const i=e.slice();return i[9]=t[n],i}function Yl(e){let t,n=e[9][0]+"",i;return{c(){t=a("option"),i=z(n),t.__value=e[9][1],t.value=t.__value},m(l,o){m(l,t,o),s(t,i)},p:V,d(l){l&&p(t)}}}function oa(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j=e[2],E=[];for(let M=0;MisNaN(parseInt(_))).map(_=>[_,Yt[_]]);function c(){const _=o.match(/\S+\.\S+$/g),v={dir:Kl()};(_?Vi(o,v):Xs(o,v)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))aa(new Uint8Array(b),function(C){const W="data:image/png;base64,"+C;l('')});else{const C=String.fromCharCode.apply(null,b);l(''),setTimeout(()=>{const W=document.getElementById("file-response");W.value=C,document.getElementById("file-save").addEventListener("click",function(){Ri(o,W.value,{dir:Kl()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=As(o),u)}function g(){o=this.value,n(0,o)}function k(_){xn[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,g,k]}class ua extends ve{constructor(t){super(),ye(this,t,ra,oa,_e,{onMessage:5,insecureRenderHtml:6})}}var ca={};Se(ca,{Body:()=>it,Client:()=>Ks,Response:()=>Ys,ResponseType:()=>Gi,fetch:()=>da,getClient:()=>ni});var Gi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Gi||{}),it=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new it("Form",t)}static json(e){return new it("Json",e)}static text(e){return new it("Text",e)}static bytes(e){return new it("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Ys=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},Ks=class{constructor(e){this.id=e}async drop(){return S({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),S({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Ys(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ni(e){return S({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Ks(t))}var Wi=null;async function da(e,t){var n;return Wi===null&&(Wi=await ni()),Wi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Ql(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Zl(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I=e[5],O=[];for(let A=0;AIe(O[A],1,1,()=>{O[A]=null});let E=!e[3]&&ts(),M=!e[3]&&e[8]&&ns();return{c(){t=a("span"),n=a("span"),i=z(e[6]),l=h(),o=a("ul");for(let A=0;A{g[y]=null}),si(),o=g[l],o?o.p(_,v):(o=g[l]=f[l](_),o.c()),Ae(o,1),o.m(t,u))},i(_){d||(Ae(o),d=!0)},o(_){Ie(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function ts(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ns(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ma(e){let t,n,i=e[5].length&&Zl(e);return{c(){i&&i.c(),t=ii()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Ae(i,1)):(i=Zl(l),i.c(),Ae(i,1),i.m(t.parentNode,t)):i&&(li(),Ie(i,1,1,()=>{i=null}),si())},i(l){n||(Ae(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const ha="...";function _a(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,g,k,_;const v=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},y=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(M,"class","input"),r(P,"class","input"),r(E,"class","flex gap-2 children:grow"),r(ne,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(D,B){m(D,t,B),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Dt(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,v),s(t,y),s(t,b),m(D,C,B),m(D,W,B),m(D,I,B),m(D,O,B),m(D,j,B),m(D,E,B),s(E,M),q(M,e[2]),s(E,A),s(E,P),q(P,e[3]),m(D,T,B),m(D,F,B),m(D,U,B),m(D,J,B),s(J,ne),ne.checked=e[5],s(J,ce),m(D,te,B),m(D,Y,B),m(D,oe,B),m(D,ee,B),m(D,H,B),m(D,X,B),m(D,$,B),m(D,be,B),m(D,fe,B),m(D,pe,B),m(D,we,B),Gt(ae,D,B),x=!0,me||(Le=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",$n(e[6])),L(M,"input",e[11]),L(P,"input",e[12]),L(ne,"change",e[13]),L(X,"click",e[7])],me=!0)},p(D,[B]){B&1&&Dt(n,D[0]),B&2&&q(k,D[1]),B&4&&M.value!==D[2]&&q(M,D[2]),B&8&&P.value!==D[3]&&q(P,D[3]),B&32&&(ne.checked=D[5]);const Ee={};B&16&&(Ee.json=D[4]),ae.$set(Ee)},i(D){x||(Ae(ae.$$.fragment,D),x=!0)},o(D){Ie(ae.$$.fragment,D),x=!1},d(D){D&&p(t),D&&p(C),D&&p(W),D&&p(I),D&&p(O),D&&p(j),D&&p(E),D&&p(T),D&&p(F),D&&p(U),D&&p(J),D&&p(te),D&&p(Y),D&&p(oe),D&&p(ee),D&&p(H),D&&p(X),D&&p($),D&&p(be),D&&p(fe),D&&p(pe),D&&p(we),Jt(ae,D),me=!1,se(Le)}}}function ga(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const W=await ni().catch(j=>{throw o(j),j}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=it.json(JSON.parse(l)):l!==""&&(O.body=it.text(l)),W.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const W=await ni().catch(I=>{throw o(I),I});n(4,f=await W.request({url:"http://localhost:3003",method:"POST",body:it.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:Gi.Text}))}function _(){i=Pi(this),n(0,i)}function v(){l=this.value,n(1,l)}function y(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function C(){g=this.checked,n(5,g)}return e.$$set=W=>{"onMessage"in W&&n(8,o=W.onMessage)},[i,l,d,c,f,g,u,k,o,_,v,y,b,C]}class ya extends ve{constructor(t){super(),ye(this,t,ga,ba,_e,{onMessage:8})}}function va(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",wa),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function wa(){new Notification("Notification title",{body:"This is the notification body"})}function ka(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Ma extends ve{constructor(t){super(),ye(this,t,ka,va,_e,{onMessage:0})}}function is(e,t,n){const i=e.slice();return i[69]=t[n],i}function ls(e,t,n){const i=e.slice();return i[72]=t[n],i}function ss(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[40].call(i))},m(f,g){m(f,t,g),m(f,n,g),m(f,i,g),s(i,l);for(let k=0;ke[59].call(Ue)),r($e,"class","input"),r($e,"type","number"),r(xe,"class","input"),r(xe,"type","number"),r(je,"class","flex gap-2"),r(et,"class","input grow"),r(et,"id","title"),r(Nt,"class","btn"),r(Nt,"type","submit"),r(ut,"class","flex gap-1"),r(tt,"class","input grow"),r(tt,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ct,"class","flex gap-1"),r(rt,"class","flex flex-col gap-1")},m(w,R){m(w,t,R),m(w,n,R),m(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),m(w,v,R),m(w,y,R),m(w,b,R),m(w,C,R),s(C,W),s(W,I),s(W,P),P.checked=e[3],s(C,j),s(C,E),s(E,M),s(E,A),A.checked=e[2],s(C,O),s(C,T),s(T,F),s(T,U),U.checked=e[4],s(C,J),s(C,ne),s(ne,ce),s(ne,te),te.checked=e[5],s(C,Y),s(C,oe),s(oe,ee),s(oe,H),H.checked=e[6],s(C,X),s(C,$),s($,be),s($,fe),fe.checked=e[7],m(w,pe,R),m(w,we,R),m(w,ae,R),m(w,x,R),s(x,me),s(me,Le),s(Le,D),s(Le,B),q(B,e[14]),s(me,Ee),s(me,ke),s(ke,re),s(ke,de),q(de,e[15]),s(x,ue),s(x,Me),s(Me,He),s(He,We),s(He,Z),q(Z,e[8]),s(Me,N),s(Me,ie),s(ie,G),s(ie,he),q(he,e[9]),s(x,Kt),s(x,Be),s(Be,bt),s(bt,Qt),s(bt,Pe),q(Pe,e[10]),s(Be,Zt),s(Be,gt),s(gt,$t),s(gt,Re),q(Re,e[11]),s(x,xt),s(x,Ve),s(Ve,K),s(K,Ot),s(K,ze),q(ze,e[12]),s(Ve,Pt),s(Ve,lt),s(lt,Rt),s(lt,De),q(De,e[13]),m(w,yt,R),m(w,vt,R),m(w,wt,R),m(w,Ae,R),s(Ae,Fe),s(Fe,Oe),s(Oe,st),s(Oe,It),s(Oe,ot),s(ot,Ht),s(ot,kt),s(Oe,en),s(Oe,tn),s(tn,Xi),s(tn,ri),s(Fe,Yi),s(Fe,Ge),s(Ge,ln),s(Ge,Ki),s(Ge,sn),s(sn,Qi),s(sn,ui),s(Ge,Zi),s(Ge,an),s(an,$i),s(an,ci),s(Ae,xi),s(Ae,Mt),s(Mt,Je),s(Je,un),s(Je,el),s(Je,cn),s(cn,tl),s(cn,di),s(Je,nl),s(Je,fn),s(fn,il),s(fn,fi),s(Mt,ll),s(Mt,Xe),s(Xe,mn),s(Xe,sl),s(Xe,hn),s(hn,ol),s(hn,pi),s(Xe,al),s(Xe,bn),s(bn,rl),s(bn,mi),s(Ae,ul),s(Ae,Tt),s(Tt,Ye),s(Ye,yn),s(Ye,cl),s(Ye,vn),s(vn,dl),s(vn,hi),s(Ye,fl),s(Ye,kn),s(kn,pl),s(kn,_i),s(Tt,ml),s(Tt,Ke),s(Ke,Tn),s(Ke,hl),s(Ke,Cn),s(Cn,_l),s(Cn,bi),s(Ke,bl),s(Ke,Sn),s(Sn,gl),s(Sn,gi),s(Ae,yl),s(Ae,Ct),s(Ct,Qe),s(Qe,En),s(Qe,vl),s(Qe,zn),s(zn,wl),s(zn,yi),s(Qe,kl),s(Qe,Wn),s(Wn,Ml),s(Wn,vi),s(Ct,Tl),s(Ct,Ze),s(Ze,Pn),s(Ze,Cl),s(Ze,Rn),s(Rn,Al),s(Rn,wi),s(Ze,Sl),s(Ze,Hn),s(Hn,Ll),s(Hn,ki),m(w,Mi,R),m(w,Ti,R),m(w,Ci,R),m(w,Ft,R),m(w,Ai,R),m(w,Ne,R),s(Ne,Nn),s(Nn,At),At.checked=e[16],s(Nn,El),s(Ne,zl),s(Ne,jn),s(jn,St),St.checked=e[17],s(jn,Dl),s(Ne,Wl),s(Ne,Un),s(Un,Lt),Lt.checked=e[21],s(Un,Ol),m(w,Si,R),m(w,je,R),s(je,qn),s(qn,Pl),s(qn,Ue);for(let ge=0;ge=1,g,k,_,v=f&&ss(e),y=e[1][e[0]]&&as(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=h(),o=a("button"),o.textContent="New window",u=h(),d=a("br"),c=h(),v&&v.c(),g=h(),y&&y.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(b,C){m(b,t,C),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),v&&v.m(t,null),s(t,g),y&&y.m(t,null),k||(_=[L(i,"input",e[39]),L(o,"click",e[36])],k=!0)},p(b,C){C[0]&4194304&&i.value!==b[22]&&q(i,b[22]),C[0]&2&&(f=Object.keys(b[1]).length>=1),f?v?v.p(b,C):(v=ss(b),v.c(),v.m(t,g)):v&&(v.d(1),v=null),b[1][b[0]]?y?y.p(b,C):(y=as(b),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),v&&v.d(),y&&y.d(),k=!1,se(_)}}}function Sa(e,t,n){let i=qe.label;const l={[qe.label]:qe},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,g=!1,k=!0,_=!1,v=!0,y=!1,b=null,C=null,W=null,I=null,P=null,j=null,E=null,M=null,A=1,O=new nt(E,M),T=new nt(E,M),F=new pt(b,C),U=new pt(b,C),J,ne,ce=!1,te=!0,Y=null,oe=null,ee="default",H=!1,X="Awesome Tauri Example!";function $(){Fi(c)}function be(){l[i].setTitle(X)}function fe(){l[i].hide(),setTimeout(l[i].show,2e3)}function pe(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function we(){Bi({multiple:!1}).then(K=>{typeof K=="string"&&l[i].setIcon(K)})}function ae(){if(!d)return;const K=new _t(d);n(1,l[d]=K,l),K.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then(K=>{n(27,F=K),n(8,b=F.width),n(9,C=F.height)}),l[i].outerSize().then(K=>{n(28,U=K)})}function me(){l[i].innerPosition().then(K=>{n(25,O=K)}),l[i].outerPosition().then(K=>{n(26,T=K),n(14,E=T.x),n(15,M=T.y)})}async function Le(K){!K||(J&&J(),ne&&ne(),ne=await K.listen("tauri://move",me),J=await K.listen("tauri://resize",x))}async function D(){await l[i].minimize(),await l[i].requestUserAttention(ji.Critical),await new Promise(K=>setTimeout(K,3e3)),await l[i].requestUserAttention(null)}function B(){d=this.value,n(22,d)}function Ee(){i=Pi(this),n(0,i),n(1,l)}const ke=()=>l[i].center();function re(){g=this.checked,n(3,g)}function de(){f=this.checked,n(2,f)}function ue(){k=this.checked,n(4,k)}function Me(){_=this.checked,n(5,_)}function He(){v=this.checked,n(6,v)}function We(){y=this.checked,n(7,y)}function Z(){E=le(this.value),n(14,E)}function N(){M=le(this.value),n(15,M)}function ie(){b=le(this.value),n(8,b)}function G(){C=le(this.value),n(9,C)}function he(){W=le(this.value),n(10,W)}function Kt(){I=le(this.value),n(11,I)}function Be(){P=le(this.value),n(12,P)}function bt(){j=le(this.value),n(13,j)}function Qt(){ce=this.checked,n(16,ce)}function Pe(){te=this.checked,n(17,te)}function Zt(){H=this.checked,n(21,H)}function gt(){ee=Pi(this),n(20,ee),n(30,o)}function $t(){Y=le(this.value),n(18,Y)}function Re(){oe=le(this.value),n(19,oe)}function xt(){X=this.value,n(29,X)}function Ve(){c=this.value,n(23,c)}return e.$$set=K=>{"onMessage"in K&&n(38,u=K.onMessage)},e.$$.update=()=>{var K,Ot,ze,Pt,lt,Rt,De,yt,vt,wt,Ae,Fe,Oe,st,It,ot,Ht,at,kt;e.$$.dirty[0]&3&&(l[i],me(),x()),e.$$.dirty[0]&7&&((K=l[i])==null||K.setResizable(f)),e.$$.dirty[0]&11&&(g?(Ot=l[i])==null||Ot.maximize():(ze=l[i])==null||ze.unmaximize()),e.$$.dirty[0]&19&&((Pt=l[i])==null||Pt.setDecorations(k)),e.$$.dirty[0]&35&&((lt=l[i])==null||lt.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(v)),e.$$.dirty[0]&131&&((De=l[i])==null||De.setFullscreen(y)),e.$$.dirty[0]&771&&b&&C&&((yt=l[i])==null||yt.setSize(new pt(b,C))),e.$$.dirty[0]&3075&&(W&&I?(vt=l[i])==null||vt.setMinSize(new ni(W,I)):(wt=l[i])==null||wt.setMinSize(null)),e.$$.dirty[0]&12291&&(P>800&&j>400?(Ae=l[i])==null||Ae.setMaxSize(new ni(P,j)):(Fe=l[i])==null||Fe.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&M!==null&&((Oe=l[i])==null||Oe.setPosition(new nt(E,M))),e.$$.dirty[0]&3&&((st=l[i])==null||st.scaleFactor().then(en=>n(24,A=en))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((ot=l[i])==null||ot.setCursorVisible(te)),e.$$.dirty[0]&1048579&&((Ht=l[i])==null||Ht.setCursorIcon(ee)),e.$$.dirty[0]&786435&&Y!==null&&oe!==null&&((at=l[i])==null||at.setCursorPosition(new nt(Y,oe))),e.$$.dirty[0]&2097155&&((kt=l[i])==null||kt.setIgnoreCursorEvents(H))},[i,l,f,g,k,_,v,y,b,C,W,I,P,j,E,M,ce,te,Y,oe,ee,H,d,c,A,O,T,F,U,X,o,$,be,fe,pe,we,ae,D,u,B,Ee,ke,re,de,ue,Me,He,We,Z,N,ie,G,he,Kt,Be,bt,Qt,Pe,Zt,gt,$t,Re,xt,Ve]}class La extends ve{constructor(t){super(),ye(this,t,Sa,Aa,_e,{onMessage:38},null,[-1,-1,-1])}}var Ea={};Ce(Ea,{isRegistered:()=>Da,register:()=>$s,registerAll:()=>za,unregister:()=>xs,unregisterAll:()=>eo});async function $s(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:ht(t)}})}async function za(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:ht(t)}})}async function Da(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function xs(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function eo(){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function us(e,t,n){const i=e.slice();return i[9]=t[n],i}function cs(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=z(n),l=h(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){m(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function ds(e){let t,n,i,l,o;return{c(){t=a("br"),n=h(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function Wa(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],v=[];for(let b=0;b<_.length;b+=1)v[b]=cs(us(e,_,b));let y=e[1].length>1&&ds(e);return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Register",o=h(),u=a("br"),d=h(),c=a("div");for(let b=0;b1?y?y.p(b,C):(y=ds(b),y.c(),y.m(c,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),mt(v,b),y&&y.d(),g=!1,se(k)}}}function Oa(e,t,n){let i,{onMessage:l}=t;const o=Cs([]);ks(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;$s(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(v=>[...v,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const v=_;xs(v).then(()=>{o.update(y=>y.filter(b=>b!==v)),l(`Shortcut ${v} unregistered`)}).catch(l)}function f(){eo().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class Pa extends ve{constructor(t){super(),ye(this,t,Oa,Wa,_e,{onMessage:6})}}function fs(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=h(),i=a("input"),l=h(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),q(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[L(i,"input",e[14]),L(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,se(d)}}}function Ra(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,P,j,E,M,A,O,T=e[5]&&fs(e);return{c(){t=a("div"),n=a("div"),i=z(`Script: + `),he=a("input"),Qt=h(),Be=a("div"),bt=a("div"),Zt=z(`Min width + `),Oe=a("input"),$t=h(),gt=a("div"),xt=z(`Min height + `),Re=a("input"),en=h(),Ve=a("div"),K=a("div"),Pt=z(`Max width + `),ze=a("input"),Ot=h(),lt=a("div"),Rt=z(`Max height + `),De=a("input"),yt=h(),vt=a("br"),wt=h(),Ce=a("div"),Fe=a("div"),Pe=a("div"),st=a("div"),st.textContent="Inner Size",It=h(),ot=a("span"),Ht=z("Width: "),kt=z(at),tn=h(),nn=a("span"),Xi=z("Height: "),ai=z(ln),Yi=h(),Ge=a("div"),sn=a("div"),sn.textContent="Outer Size",Ki=h(),on=a("span"),Qi=z("Width: "),ri=z(an),Zi=h(),rn=a("span"),$i=z("Height: "),ui=z(un),xi=h(),Mt=a("div"),Je=a("div"),cn=a("div"),cn.textContent="Inner Logical Size",el=h(),dn=a("span"),tl=z("Width: "),ci=z(fn),nl=h(),pn=a("span"),il=z("Height: "),di=z(mn),ll=h(),Xe=a("div"),hn=a("div"),hn.textContent="Outer Logical Size",sl=h(),_n=a("span"),ol=z("Width: "),fi=z(bn),al=h(),gn=a("span"),rl=z("Height: "),pi=z(yn),ul=h(),Tt=a("div"),Ye=a("div"),vn=a("div"),vn.textContent="Inner Position",cl=h(),wn=a("span"),dl=z("x: "),mi=z(kn),fl=h(),Mn=a("span"),pl=z("y: "),hi=z(Tn),ml=h(),Ke=a("div"),Cn=a("div"),Cn.textContent="Outer Position",hl=h(),An=a("span"),_l=z("x: "),_i=z(Sn),bl=h(),Ln=a("span"),gl=z("y: "),bi=z(En),yl=h(),Ct=a("div"),Qe=a("div"),zn=a("div"),zn.textContent="Inner Logical Position",vl=h(),Dn=a("span"),wl=z("x: "),gi=z(Wn),kl=h(),Pn=a("span"),Ml=z("y: "),yi=z(On),Tl=h(),Ze=a("div"),Rn=a("div"),Rn.textContent="Outer Logical Position",Cl=h(),In=a("span"),Al=z("x: "),vi=z(Hn),Sl=h(),Fn=a("span"),Ll=z("y: "),wi=z(Nn),ki=h(),Mi=a("br"),Ti=h(),Ft=a("h4"),Ft.textContent="Cursor",Ci=h(),Ne=a("div"),jn=a("label"),At=a("input"),El=z(` + Grab`),zl=h(),Un=a("label"),St=a("input"),Dl=z(` + Visible`),Wl=h(),qn=a("label"),Lt=a("input"),Pl=z(` + Ignore events`),Ai=h(),je=a("div"),Bn=a("label"),Ol=z(`Icon + `),Ue=a("select");for(let w=0;we[59].call(Ue)),r($e,"class","input"),r($e,"type","number"),r(xe,"class","input"),r(xe,"type","number"),r(je,"class","flex gap-2"),r(et,"class","input grow"),r(et,"id","title"),r(Nt,"class","btn"),r(Nt,"type","submit"),r(ut,"class","flex gap-1"),r(tt,"class","input grow"),r(tt,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ct,"class","flex gap-1"),r(rt,"class","flex flex-col gap-1")},m(w,R){m(w,t,R),m(w,n,R),m(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),m(w,v,R),m(w,y,R),m(w,b,R),m(w,C,R),s(C,W),s(W,I),s(W,O),O.checked=e[3],s(C,j),s(C,E),s(E,M),s(E,A),A.checked=e[2],s(C,P),s(C,T),s(T,F),s(T,U),U.checked=e[4],s(C,J),s(C,ne),s(ne,ce),s(ne,te),te.checked=e[5],s(C,Y),s(C,oe),s(oe,ee),s(oe,H),H.checked=e[6],s(C,X),s(C,$),s($,be),s($,fe),fe.checked=e[7],m(w,pe,R),m(w,we,R),m(w,ae,R),m(w,x,R),s(x,me),s(me,Le),s(Le,D),s(Le,B),q(B,e[14]),s(me,Ee),s(me,ke),s(ke,re),s(ke,de),q(de,e[15]),s(x,ue),s(x,Me),s(Me,He),s(He,We),s(He,Z),q(Z,e[8]),s(Me,N),s(Me,ie),s(ie,G),s(ie,he),q(he,e[9]),s(x,Qt),s(x,Be),s(Be,bt),s(bt,Zt),s(bt,Oe),q(Oe,e[10]),s(Be,$t),s(Be,gt),s(gt,xt),s(gt,Re),q(Re,e[11]),s(x,en),s(x,Ve),s(Ve,K),s(K,Pt),s(K,ze),q(ze,e[12]),s(Ve,Ot),s(Ve,lt),s(lt,Rt),s(lt,De),q(De,e[13]),m(w,yt,R),m(w,vt,R),m(w,wt,R),m(w,Ce,R),s(Ce,Fe),s(Fe,Pe),s(Pe,st),s(Pe,It),s(Pe,ot),s(ot,Ht),s(ot,kt),s(Pe,tn),s(Pe,nn),s(nn,Xi),s(nn,ai),s(Fe,Yi),s(Fe,Ge),s(Ge,sn),s(Ge,Ki),s(Ge,on),s(on,Qi),s(on,ri),s(Ge,Zi),s(Ge,rn),s(rn,$i),s(rn,ui),s(Ce,xi),s(Ce,Mt),s(Mt,Je),s(Je,cn),s(Je,el),s(Je,dn),s(dn,tl),s(dn,ci),s(Je,nl),s(Je,pn),s(pn,il),s(pn,di),s(Mt,ll),s(Mt,Xe),s(Xe,hn),s(Xe,sl),s(Xe,_n),s(_n,ol),s(_n,fi),s(Xe,al),s(Xe,gn),s(gn,rl),s(gn,pi),s(Ce,ul),s(Ce,Tt),s(Tt,Ye),s(Ye,vn),s(Ye,cl),s(Ye,wn),s(wn,dl),s(wn,mi),s(Ye,fl),s(Ye,Mn),s(Mn,pl),s(Mn,hi),s(Tt,ml),s(Tt,Ke),s(Ke,Cn),s(Ke,hl),s(Ke,An),s(An,_l),s(An,_i),s(Ke,bl),s(Ke,Ln),s(Ln,gl),s(Ln,bi),s(Ce,yl),s(Ce,Ct),s(Ct,Qe),s(Qe,zn),s(Qe,vl),s(Qe,Dn),s(Dn,wl),s(Dn,gi),s(Qe,kl),s(Qe,Pn),s(Pn,Ml),s(Pn,yi),s(Ct,Tl),s(Ct,Ze),s(Ze,Rn),s(Ze,Cl),s(Ze,In),s(In,Al),s(In,vi),s(Ze,Sl),s(Ze,Fn),s(Fn,Ll),s(Fn,wi),m(w,ki,R),m(w,Mi,R),m(w,Ti,R),m(w,Ft,R),m(w,Ci,R),m(w,Ne,R),s(Ne,jn),s(jn,At),At.checked=e[16],s(jn,El),s(Ne,zl),s(Ne,Un),s(Un,St),St.checked=e[17],s(Un,Dl),s(Ne,Wl),s(Ne,qn),s(qn,Lt),Lt.checked=e[21],s(qn,Pl),m(w,Ai,R),m(w,je,R),s(je,Bn),s(Bn,Ol),s(Bn,Ue);for(let ge=0;ge=1,g,k,_,v=f&&ss(e),y=e[1][e[0]]&&as(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=h(),o=a("button"),o.textContent="New window",u=h(),d=a("br"),c=h(),v&&v.c(),g=h(),y&&y.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(b,C){m(b,t,C),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),v&&v.m(t,null),s(t,g),y&&y.m(t,null),k||(_=[L(i,"input",e[39]),L(o,"click",e[36])],k=!0)},p(b,C){C[0]&4194304&&i.value!==b[22]&&q(i,b[22]),C[0]&2&&(f=Object.keys(b[1]).length>=1),f?v?v.p(b,C):(v=ss(b),v.c(),v.m(t,g)):v&&(v.d(1),v=null),b[1][b[0]]?y?y.p(b,C):(y=as(b),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),v&&v.d(),y&&y.d(),k=!1,se(_)}}}function Ca(e,t,n){let i=qe.label;const l={[qe.label]:qe},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,g=!1,k=!0,_=!1,v=!0,y=!1,b=null,C=null,W=null,I=null,O=null,j=null,E=null,M=null,A=1,P=new nt(E,M),T=new nt(E,M),F=new pt(b,C),U=new pt(b,C),J,ne,ce=!1,te=!0,Y=null,oe=null,ee="default",H=!1,X="Awesome Tauri Example!";function $(){Fi(c)}function be(){l[i].setTitle(X)}function fe(){l[i].hide(),setTimeout(l[i].show,2e3)}function pe(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function we(){Bi({multiple:!1}).then(K=>{typeof K=="string"&&l[i].setIcon(K)})}function ae(){if(!d)return;const K=new _t(d);n(1,l[d]=K,l),K.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then(K=>{n(27,F=K),n(8,b=F.width),n(9,C=F.height)}),l[i].outerSize().then(K=>{n(28,U=K)})}function me(){l[i].innerPosition().then(K=>{n(25,P=K)}),l[i].outerPosition().then(K=>{n(26,T=K),n(14,E=T.x),n(15,M=T.y)})}async function Le(K){!K||(J&&J(),ne&&ne(),ne=await K.listen("tauri://move",me),J=await K.listen("tauri://resize",x))}async function D(){await l[i].minimize(),await l[i].requestUserAttention(ji.Critical),await new Promise(K=>setTimeout(K,3e3)),await l[i].requestUserAttention(null)}function B(){d=this.value,n(22,d)}function Ee(){i=Pi(this),n(0,i),n(1,l)}const ke=()=>l[i].center();function re(){g=this.checked,n(3,g)}function de(){f=this.checked,n(2,f)}function ue(){k=this.checked,n(4,k)}function Me(){_=this.checked,n(5,_)}function He(){v=this.checked,n(6,v)}function We(){y=this.checked,n(7,y)}function Z(){E=le(this.value),n(14,E)}function N(){M=le(this.value),n(15,M)}function ie(){b=le(this.value),n(8,b)}function G(){C=le(this.value),n(9,C)}function he(){W=le(this.value),n(10,W)}function Qt(){I=le(this.value),n(11,I)}function Be(){O=le(this.value),n(12,O)}function bt(){j=le(this.value),n(13,j)}function Zt(){ce=this.checked,n(16,ce)}function Oe(){te=this.checked,n(17,te)}function $t(){H=this.checked,n(21,H)}function gt(){ee=Pi(this),n(20,ee),n(30,o)}function xt(){Y=le(this.value),n(18,Y)}function Re(){oe=le(this.value),n(19,oe)}function en(){X=this.value,n(29,X)}function Ve(){c=this.value,n(23,c)}return e.$$set=K=>{"onMessage"in K&&n(38,u=K.onMessage)},e.$$.update=()=>{var K,Pt,ze,Ot,lt,Rt,De,yt,vt,wt,Ce,Fe,Pe,st,It,ot,Ht,at,kt;e.$$.dirty[0]&3&&(l[i],me(),x()),e.$$.dirty[0]&7&&((K=l[i])==null||K.setResizable(f)),e.$$.dirty[0]&11&&(g?(Pt=l[i])==null||Pt.maximize():(ze=l[i])==null||ze.unmaximize()),e.$$.dirty[0]&19&&((Ot=l[i])==null||Ot.setDecorations(k)),e.$$.dirty[0]&35&&((lt=l[i])==null||lt.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(v)),e.$$.dirty[0]&131&&((De=l[i])==null||De.setFullscreen(y)),e.$$.dirty[0]&771&&b&&C&&((yt=l[i])==null||yt.setSize(new pt(b,C))),e.$$.dirty[0]&3075&&(W&&I?(vt=l[i])==null||vt.setMinSize(new ti(W,I)):(wt=l[i])==null||wt.setMinSize(null)),e.$$.dirty[0]&12291&&(O>800&&j>400?(Ce=l[i])==null||Ce.setMaxSize(new ti(O,j)):(Fe=l[i])==null||Fe.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&M!==null&&((Pe=l[i])==null||Pe.setPosition(new nt(E,M))),e.$$.dirty[0]&3&&((st=l[i])==null||st.scaleFactor().then(tn=>n(24,A=tn))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((ot=l[i])==null||ot.setCursorVisible(te)),e.$$.dirty[0]&1048579&&((Ht=l[i])==null||Ht.setCursorIcon(ee)),e.$$.dirty[0]&786435&&Y!==null&&oe!==null&&((at=l[i])==null||at.setCursorPosition(new nt(Y,oe))),e.$$.dirty[0]&2097155&&((kt=l[i])==null||kt.setIgnoreCursorEvents(H))},[i,l,f,g,k,_,v,y,b,C,W,I,O,j,E,M,ce,te,Y,oe,ee,H,d,c,A,P,T,F,U,X,o,$,be,fe,pe,we,ae,D,u,B,Ee,ke,re,de,ue,Me,He,We,Z,N,ie,G,he,Qt,Be,bt,Zt,Oe,$t,gt,xt,Re,en,Ve]}class Aa extends ve{constructor(t){super(),ye(this,t,Ca,Ta,_e,{onMessage:38},null,[-1,-1,-1])}}var Sa={};Se(Sa,{isRegistered:()=>Ea,register:()=>Zs,registerAll:()=>La,unregister:()=>$s,unregisterAll:()=>xs});async function Zs(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:ht(t)}})}async function La(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:ht(t)}})}async function Ea(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function $s(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function xs(){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function us(e,t,n){const i=e.slice();return i[9]=t[n],i}function cs(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=z(n),l=h(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){m(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function ds(e){let t,n,i,l,o;return{c(){t=a("br"),n=h(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function za(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],v=[];for(let b=0;b<_.length;b+=1)v[b]=cs(us(e,_,b));let y=e[1].length>1&&ds(e);return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Register",o=h(),u=a("br"),d=h(),c=a("div");for(let b=0;b1?y?y.p(b,C):(y=ds(b),y.c(),y.m(c,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),mt(v,b),y&&y.d(),g=!1,se(k)}}}function Da(e,t,n){let i,{onMessage:l}=t;const o=Cs([]);ks(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;Zs(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(v=>[...v,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const v=_;$s(v).then(()=>{o.update(y=>y.filter(b=>b!==v)),l(`Shortcut ${v} unregistered`)}).catch(l)}function f(){xs().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class Wa extends ve{constructor(t){super(),ye(this,t,Da,za,_e,{onMessage:6})}}function fs(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=h(),i=a("input"),l=h(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),q(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[L(i,"input",e[14]),L(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,se(d)}}}function Pa(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T=e[5]&&fs(e);return{c(){t=a("div"),n=a("div"),i=z(`Script: `),l=a("input"),o=h(),u=a("div"),d=z(`Encoding: `),c=a("input"),f=h(),g=a("div"),k=z(`Working directory: `),_=a("input"),v=h(),y=a("div"),b=z(`Arguments: - `),C=a("input"),W=h(),I=a("div"),P=a("button"),P.textContent="Run",j=h(),E=a("button"),E.textContent="Kill",M=h(),T&&T.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(C,"class","grow input"),r(C,"placeholder","Environment variables"),r(y,"class","flex items-center gap-1"),r(P,"class","btn"),r(E,"class","btn"),r(I,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(F,U){m(F,t,U),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,v),s(t,y),s(y,b),s(y,C),q(C,e[2]),s(t,W),s(t,I),s(I,P),s(I,j),s(I,E),s(t,M),T&&T.m(t,null),A||(O=[L(l,"input",e[10]),L(c,"input",e[11]),L(_,"input",e[12]),L(C,"input",e[13]),L(P,"click",e[6]),L(E,"click",e[7])],A=!0)},p(F,[U]){U&1&&l.value!==F[0]&&q(l,F[0]),U&8&&c.value!==F[3]&&q(c,F[3]),U&2&&_.value!==F[1]&&q(_,F[1]),U&4&&C.value!==F[2]&&q(C,F[2]),F[5]?T?T.p(F,U):(T=fs(F),T.c(),T.m(t,null)):T&&(T.d(1),T=null)},i:V,o:V,d(F){F&&p(t),T&&T.d(),A=!1,se(O)}}}function Ia(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function v(){return f.split(" ").reduce((M,A)=>{let[O,T]=A.split("=");return{...M,[O]:T}},{})}function y(){n(5,_=null);const M=ti.create(l,[...o,d],{cwd:c||null,env:v(),encoding:g||void 0});M.on("close",A=>{u(`command finished with code ${A.code} and signal ${A.signal}`),n(5,_=null)}),M.on("error",A=>u(`command error: "${A}"`)),M.stdout.on("data",A=>u(`command stdout: "${A}"`)),M.stderr.on("data",A=>u(`command stderr: "${A}"`)),M.spawn().then(A=>{n(5,_=A)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(k).catch(u)}function W(){d=this.value,n(0,d)}function I(){g=this.value,n(3,g)}function P(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function E(){k=this.value,n(4,k)}return e.$$set=M=>{"onMessage"in M&&n(9,u=M.onMessage)},[d,c,f,g,k,_,y,b,C,u,W,I,P,j,E]}class Ha extends ve{constructor(t){super(),ye(this,t,Ia,Ra,_e,{onMessage:9})}}var Fa={};Ce(Fa,{checkUpdate:()=>no,installUpdate:()=>to,onUpdaterEvent:()=>Ji});async function Ji(e){return Yt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function to(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error)return t(),i(o.error);if(o.status==="DONE")return t(),n()}Ji(l).then(o=>{e=o}).catch(o=>{throw t(),o}),ai("tauri://update-install").catch(o=>{throw t(),o})})}async function no(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){return t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error)return t(),i(u.error);if(u.status==="UPTODATE")return t(),n({shouldUpdate:!1})}Ws("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ji(o).then(u=>{e=u}).catch(u=>{throw t(),u}),ai("tauri://update").catch(u=>{throw t(),u})})}function Na(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function ja(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Ua(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function qa(e){let t;function n(o,u){return!o[0]&&!o[2]?Ua:!o[1]&&o[2]?ja:Na}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function Ba(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("tauri://update-status",i)}),Hi(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await no();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await to(),i("Installation complete, restart required."),await qi()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class Va extends ve{constructor(t){super(),ye(this,t,Ba,qa,_e,{onMessage:5})}}var Ga={};Ce(Ga,{readText:()=>lo,writeText:()=>io});async function io(e){return S({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function lo(){return S({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Ja(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Write",o=h(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){m(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Xa(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){io(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){lo().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class Ya extends ve{constructor(t){super(),ye(this,t,Xa,Ja,_e,{onMessage:3})}}function Ka(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function Qa(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return dt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Hi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Za extends ve{constructor(t){super(),ye(this,t,Qa,Ka,_e,{onMessage:0})}}function $a(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,se(u)}}}function xa(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{qs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Bs().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class er extends ve{constructor(t){super(),ye(this,t,xa,$a,_e,{onMessage:2})}}function ps(e,t,n){const i=e.slice();return i[32]=t[n],i}function ms(e,t,n){const i=e.slice();return i[35]=t[n],i}function hs(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b;function C(M,A){return M[3]?nr:tr}let W=C(e),I=W(e);function P(M,A){return M[2]?lr:ir}let j=P(e),E=j(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),I.c(),d=h(),c=a("span"),c.innerHTML='
',f=h(),g=a("span"),E.c(),_=h(),v=a("span"),v.innerHTML='
',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(v,"title","Close"),r(v,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(M,A){m(M,t,A),s(t,n),s(t,i),s(t,l),s(l,o),I.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),E.m(g,null),s(l,_),s(l,v),y||(b=[L(o,"click",e[12]),L(c,"click",e[9]),L(g,"click",e[10]),L(v,"click",e[11])],y=!0)},p(M,A){W!==(W=C(M))&&(I.d(1),I=W(M),I&&(I.c(),I.m(o,null))),A[0]&8&&u!==(u=M[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),j!==(j=P(M))&&(E.d(1),E=j(M),E&&(E.c(),E.m(g,null))),A[0]&4&&k!==(k=M[2]?"Restore":"Maximize")&&r(g,"title",k)},d(M){M&&p(t),I.d(),E.d(),y=!1,se(b)}}}function tr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function nr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ir(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function lr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function sr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function or(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function _s(e){let t,n,i,l,o,u,d,c,f;function g(v,y){return v[3]?rr:ar}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=h(),i=a("br"),l=h(),o=a("div"),u=h(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(v,y){m(v,t,y),_.m(t,null),m(v,n,y),m(v,i,y),m(v,l,y),m(v,o,y),m(v,u,y),m(v,d,y),c||(f=L(t,"click",e[12]),c=!0)},p(v,y){k!==(k=g(v))&&(_.d(1),_=k(v),_&&(_.c(),_.m(t,null)))},d(v){v&&p(t),_.d(),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),c=!1,f()}}}function ar(e){let t,n;return{c(){t=z(`Switch to Dark mode - `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function rr(e){let t,n;return{c(){t=z(`Switch to Light mode - `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function ur(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function g(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=z(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,_){m(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function bs(e){let t,n=e[35]&&ur(e);return{c(){n&&n.c(),t=li()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function gs(e){let t,n=e[32].html+"",i;return{c(){t=new fo(!1),i=li(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function cr(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,P,j,E,M,A,O,T,F,U=e[1].label+"",J,ne,ce,te,Y,oe,ee,H,X,$,be,fe,pe,we,ae,x,me,Le,D=e[5]&&hs(e);function B(N,ie){return N[0]?or:sr}let Ee=B(e),ke=Ee(e),re=!e[5]&&_s(e),de=e[7],ue=[];for(let N=0;N{let[P,T]=A.split("=");return{...M,[P]:T}},{})}function y(){n(5,_=null);const M=Hi.create(l,[...o,d],{cwd:c||null,env:v(),encoding:g||void 0});M.on("close",A=>{u(`command finished with code ${A.code} and signal ${A.signal}`),n(5,_=null)}),M.on("error",A=>u(`command error: "${A}"`)),M.stdout.on("data",A=>u(`command stdout: "${A}"`)),M.stderr.on("data",A=>u(`command stderr: "${A}"`)),M.spawn().then(A=>{n(5,_=A)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(k).catch(u)}function W(){d=this.value,n(0,d)}function I(){g=this.value,n(3,g)}function O(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function E(){k=this.value,n(4,k)}return e.$$set=M=>{"onMessage"in M&&n(9,u=M.onMessage)},[d,c,f,g,k,_,y,b,C,u,W,I,O,j,E]}class Ra extends ve{constructor(t){super(),ye(this,t,Oa,Pa,_e,{onMessage:9})}}var Ia={};Se(Ia,{checkUpdate:()=>to,installUpdate:()=>eo,onUpdaterEvent:()=>Ji});async function Ji(e){return Kt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function eo(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Ji(l).then(o=>{e=o}).catch(o=>{throw t(),o}),oi("tauri://update-install").catch(o=>{throw t(),o})})}async function to(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Ws("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ji(o).then(u=>{e=u}).catch(u=>{throw t(),u}),oi("tauri://update").catch(u=>{throw t(),u})})}function Ha(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function Fa(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Na(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ja(e){let t;function n(o,u){return!o[0]&&!o[2]?Na:!o[1]&&o[2]?Fa:Ha}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function Ua(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Kt("tauri://update-status",i)}),Ii(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await to();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await eo(),i("Installation complete, restart required."),await qi()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class qa extends ve{constructor(t){super(),ye(this,t,Ua,ja,_e,{onMessage:5})}}var Ba={};Se(Ba,{readText:()=>io,writeText:()=>no});async function no(e){return S({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function io(){return S({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Va(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Write",o=h(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){m(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Ga(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){no(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){io().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class Ja extends ve{constructor(t){super(),ye(this,t,Ga,Va,_e,{onMessage:3})}}function Xa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function Ya(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return dt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ii(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Ka extends ve{constructor(t){super(),ye(this,t,Ya,Xa,_e,{onMessage:0})}}function Qa(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,se(u)}}}function Za(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{qs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Bs().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class $a extends ve{constructor(t){super(),ye(this,t,Za,Qa,_e,{onMessage:2})}}function ps(e,t,n){const i=e.slice();return i[32]=t[n],i}function ms(e,t,n){const i=e.slice();return i[35]=t[n],i}function hs(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b;function C(M,A){return M[3]?er:xa}let W=C(e),I=W(e);function O(M,A){return M[2]?nr:tr}let j=O(e),E=j(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),I.c(),d=h(),c=a("span"),c.innerHTML='
',f=h(),g=a("span"),E.c(),_=h(),v=a("span"),v.innerHTML='
',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(v,"title","Close"),r(v,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(M,A){m(M,t,A),s(t,n),s(t,i),s(t,l),s(l,o),I.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),E.m(g,null),s(l,_),s(l,v),y||(b=[L(o,"click",e[12]),L(c,"click",e[9]),L(g,"click",e[10]),L(v,"click",e[11])],y=!0)},p(M,A){W!==(W=C(M))&&(I.d(1),I=W(M),I&&(I.c(),I.m(o,null))),A[0]&8&&u!==(u=M[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),j!==(j=O(M))&&(E.d(1),E=j(M),E&&(E.c(),E.m(g,null))),A[0]&4&&k!==(k=M[2]?"Restore":"Maximize")&&r(g,"title",k)},d(M){M&&p(t),I.d(),E.d(),y=!1,se(b)}}}function xa(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function er(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function tr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function nr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ir(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function lr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function _s(e){let t,n,i,l,o,u,d,c,f;function g(v,y){return v[3]?or:sr}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=h(),i=a("br"),l=h(),o=a("div"),u=h(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(v,y){m(v,t,y),_.m(t,null),m(v,n,y),m(v,i,y),m(v,l,y),m(v,o,y),m(v,u,y),m(v,d,y),c||(f=L(t,"click",e[12]),c=!0)},p(v,y){k!==(k=g(v))&&(_.d(1),_=k(v),_&&(_.c(),_.m(t,null)))},d(v){v&&p(t),_.d(),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),c=!1,f()}}}function sr(e){let t,n;return{c(){t=z(`Switch to Dark mode + `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function or(e){let t,n;return{c(){t=z(`Switch to Light mode + `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function ar(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function g(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=z(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,_){m(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function bs(e){let t,n=e[35]&&ar(e);return{c(){n&&n.c(),t=ii()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function gs(e){let t,n=e[32].html+"",i;return{c(){t=new co(!1),i=ii(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function rr(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F,U=e[1].label+"",J,ne,ce,te,Y,oe,ee,H,X,$,be,fe,pe,we,ae,x,me,Le,D=e[5]&&hs(e);function B(N,ie){return N[0]?lr:ir}let Ee=B(e),ke=Ee(e),re=!e[5]&&_s(e),de=e[7],ue=[];for(let N=0;N`,k=h(),_=a("a"),_.innerHTML=`GitHub `,v=h(),y=a("a"),y.innerHTML=`Source - `,b=h(),C=a("br"),W=h(),I=a("div"),P=h(),j=a("br"),E=h(),M=a("div");for(let N=0;N',we=h(),ae=a("div");for(let N=0;N{Jt(G,1)}),oi()}Me?(Y=new Me(He(N)),xn(Y.$$.fragment),Se(Y.$$.fragment,1),Gt(Y,te,null)):Y=null}if(ie[0]&64){We=N[6];let G;for(G=0;G{await confirm("Are you sure?")||H.preventDefault()}),qe.onFileDropEvent(H=>{W(`File drop: ${JSON.stringify(H.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Fo,icon:"i-ph-hand-waving"},{label:"Communication",component:Go,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:qo,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:aa,icon:"i-codicon-multiple-windows"},{label:"File system",component:da,icon:"i-codicon-files"},{label:"HTTP",component:wa,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Ca,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:er,icon:"i-codicon-hubot"},!o&&{label:"Window",component:La,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:Pa,icon:"i-codicon-record-keys"},{label:"Shell",component:Ha,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:Va,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Ya,icon:"i-codicon-clippy"},{label:"WebRTC",component:Za,icon:"i-ph-broadcast"}];let d=u[0];function c(H){n(1,d=H)}let f;dt(async()=>{const H=qt();n(2,f=await H.isMaximized()),Yt("tauri://resize",async()=>{n(2,f=await H.isMaximized())})});function g(){qt().minimize()}async function k(){const H=qt();await H.isMaximized()?H.unmaximize():H.maximize()}let _=!1;async function v(){_||(_=await Xs("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&qt().close())}let y;dt(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),vs(y)});function b(){n(3,y=!y),vs(y)}let C=Cs([]);ks(e,C,H=>n(6,i=H));function W(H){C.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof H=="string"?H:JSON.stringify(H,null,1))+"
"},...X])}function I(H){C.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+H+"
"},...X])}function P(){C.update(()=>[])}let j,E,M;function A(H){M=H.clientY;const X=window.getComputedStyle(j);E=parseInt(X.height,10);const $=fe=>{const pe=fe.clientY-M,we=E-pe;n(4,j.style.height=`${we{document.removeEventListener("mouseup",be),document.removeEventListener("mousemove",$)};document.addEventListener("mouseup",be),document.addEventListener("mousemove",$)}let O;dt(async()=>{n(5,O=await Fs()==="win32")});let T=!1,F,U,J=!1,ne=0,ce=0;const te=(H,X,$)=>Math.min(Math.max(X,H),$);dt(()=>{n(18,F=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",H=>{U.contains(H.target)?n(0,T=!T):T&&!F.contains(H.target)&&n(0,T=!1)}),document.addEventListener("touchstart",H=>{if(U.contains(H.target))return;const X=H.touches[0].clientX;(0{if(J){const X=H.touches[0].clientX;ce=X;const $=(X-ne)/10;F.style.setProperty("--translate-x",`-${te(0,T?0-$:18.75-$,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const H=(ce-ne)/10;n(0,T=T?H>-(18.75/2):H>18.75/2)}J=!1})});const Y=()=>Fi("https://tauri.app/"),oe=H=>{c(H),n(0,T=!1)};function ee(H){$n[H?"unshift":"push"](()=>{j=H,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const H=document.querySelector("#sidebar");H&&dr(H,T)}},[T,d,f,y,j,O,i,u,c,g,k,v,b,C,W,I,P,A,F,Y,oe,ee]}class pr extends ve{constructor(t){super(),ye(this,t,fr,cr,_e,{},null,[-1,-1])}}new pr({target:document.querySelector("#app")}); + `,b=h(),C=a("br"),W=h(),I=a("div"),O=h(),j=a("br"),E=h(),M=a("div");for(let N=0;N',we=h(),ae=a("div");for(let N=0;N{Jt(G,1)}),si()}Me?(Y=new Me(He(N)),ei(Y.$$.fragment),Ae(Y.$$.fragment,1),Gt(Y,te,null)):Y=null}if(ie[0]&64){We=N[6];let G;for(G=0;G{await confirm("Are you sure?")||H.preventDefault()}),qe.onFileDropEvent(H=>{W(`File drop: ${JSON.stringify(H.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Ho,icon:"i-ph-hand-waving"},{label:"Communication",component:Bo,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:jo,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:sa,icon:"i-codicon-multiple-windows"},{label:"File system",component:ua,icon:"i-codicon-files"},{label:"HTTP",component:ya,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Ma,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:$a,icon:"i-codicon-hubot"},!o&&{label:"Window",component:Aa,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:Wa,icon:"i-codicon-record-keys"},{label:"Shell",component:Ra,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:qa,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Ja,icon:"i-codicon-clippy"},{label:"WebRTC",component:Ka,icon:"i-ph-broadcast"}];let d=u[0];function c(H){n(1,d=H)}let f;dt(async()=>{const H=qt();n(2,f=await H.isMaximized()),Kt("tauri://resize",async()=>{n(2,f=await H.isMaximized())})});function g(){qt().minimize()}async function k(){const H=qt();await H.isMaximized()?H.unmaximize():H.maximize()}let _=!1;async function v(){_||(_=await Js("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&qt().close())}let y;dt(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),vs(y)});function b(){n(3,y=!y),vs(y)}let C=Cs([]);ks(e,C,H=>n(6,i=H));function W(H){C.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof H=="string"?H:JSON.stringify(H,null,1))+"
"},...X])}function I(H){C.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+H+"
"},...X])}function O(){C.update(()=>[])}let j,E,M;function A(H){M=H.clientY;const X=window.getComputedStyle(j);E=parseInt(X.height,10);const $=fe=>{const pe=fe.clientY-M,we=E-pe;n(4,j.style.height=`${we{document.removeEventListener("mouseup",be),document.removeEventListener("mousemove",$)};document.addEventListener("mouseup",be),document.addEventListener("mousemove",$)}let P;dt(async()=>{n(5,P=await Fs()==="win32")});let T=!1,F,U,J=!1,ne=0,ce=0;const te=(H,X,$)=>Math.min(Math.max(X,H),$);dt(()=>{n(18,F=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",H=>{U.contains(H.target)?n(0,T=!T):T&&!F.contains(H.target)&&n(0,T=!1)}),document.addEventListener("touchstart",H=>{if(U.contains(H.target))return;const X=H.touches[0].clientX;(0{if(J){const X=H.touches[0].clientX;ce=X;const $=(X-ne)/10;F.style.setProperty("--translate-x",`-${te(0,T?0-$:18.75-$,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const H=(ce-ne)/10;n(0,T=T?H>-(18.75/2):H>18.75/2)}J=!1})});const Y=()=>Fi("https://tauri.app/"),oe=H=>{c(H),n(0,T=!1)};function ee(H){xn[H?"unshift":"push"](()=>{j=H,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const H=document.querySelector("#sidebar");H&&ur(H,T)}},[T,d,f,y,j,P,i,u,c,g,k,v,b,C,W,I,O,A,F,Y,oe,ee]}class dr extends ve{constructor(t){super(),ye(this,t,cr,rr,_e,{},null,[-1,-1])}}new dr({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 9628c538a5a..25b80755296 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -67,6 +67,55 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "anstream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" version = "1.0.69" @@ -82,6 +131,7 @@ dependencies = [ "serde_json", "tauri", "tauri-build", + "tauri-plugin-cli", "tauri-plugin-sample", "tiny_http", "window-shadows", @@ -227,17 +277,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -440,27 +479,31 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.23" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" dependencies = [ - "atty", + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +dependencies = [ + "anstream", + "anstyle", "bitflags", "clap_lex", - "indexmap", "strsim", - "termcolor", - "textwrap", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "cocoa" @@ -499,6 +542,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "combine" version = "4.6.6" @@ -1382,15 +1431,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.2.6" @@ -1619,6 +1659,18 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +[[package]] +name = "is-terminal" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "itoa" version = "0.4.8" @@ -2164,12 +2216,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "overload" version = "0.1.1" @@ -3227,12 +3273,11 @@ dependencies = [ [[package]] name = "tauri" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.8" dependencies = [ "anyhow", "base64 0.21.0", "bytes", - "clap", "cocoa", "dirs-next", "embed_plist", @@ -3293,7 +3338,7 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.3" +version = "2.0.0-alpha.4" dependencies = [ "anyhow", "cargo_toml", @@ -3313,7 +3358,7 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.3" +version = "2.0.0-alpha.4" dependencies = [ "base64 0.21.0", "brotli", @@ -3338,7 +3383,7 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.3" +version = "2.0.0-alpha.4" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3348,6 +3393,19 @@ dependencies = [ "tauri-utils", ] +[[package]] +name = "tauri-plugin-cli" +version = "0.1.0" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=next#0fed10fdcebf659458859c820d1d386a8c136327" +dependencies = [ + "clap", + "log", + "serde", + "serde_json", + "tauri", + "thiserror", +] + [[package]] name = "tauri-plugin-sample" version = "0.1.0" @@ -3361,7 +3419,7 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0-alpha.3" +version = "0.13.0-alpha.4" dependencies = [ "gtk", "http", @@ -3381,7 +3439,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0-alpha.3" +version = "0.13.0-alpha.4" dependencies = [ "cocoa", "gtk", @@ -3400,7 +3458,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.3" +version = "2.0.0-alpha.4" dependencies = [ "aes-gcm", "brotli", @@ -3473,21 +3531,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thin-slice" version = "0.1.1" @@ -3804,6 +3847,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "1.3.0" diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 4deea0951f0..0bf4f3a8ec7 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -19,6 +19,7 @@ tiny_http = "0.11" log = "0.4" #tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } tauri-plugin-sample = { path = "./tauri-plugin-sample/" } +tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } [patch.crates-io] tauri = { path = "../../../core/tauri" } @@ -28,7 +29,6 @@ tauri-build = { path = "../../../core/tauri-build" } path = "../../../core/tauri" features = [ "api-all", - "cli", "global-shortcut", "http-multipart", "icon-ico", diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index c050769ac23..c4fe36f2da6 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -33,6 +33,7 @@ pub fn run() { .build(), )*/ .plugin(tauri_plugin_sample::init()) + .plugin(tauri_plugin_cli::init()) .setup(move |app| { #[cfg(desktop)] tray::create_tray(app)?; diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index fe8e127e688..640cc6613a7 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -11,14 +11,7 @@ "productName": "Tauri API", "version": "1.0.0" }, - "tauri": { - "pattern": { - "use": "isolation", - "options": { - "dir": "../isolation-dist/" - } - }, - "macOSPrivateApi": true, + "plugins": { "cli": { "description": "Tauri API example", "args": [ @@ -33,7 +26,11 @@ "name": "theme", "takesValue": true, "description": "App theme", - "possibleValues": ["light", "dark", "system"] + "possibleValues": [ + "light", + "dark", + "system" + ] }, { "short": "v", @@ -54,7 +51,16 @@ ] } } + } + }, + "tauri": { + "pattern": { + "use": "isolation", + "options": { + "dir": "../isolation-dist/" + } }, + "macOSPrivateApi": true, "bundle": { "active": true, "identifier": "com.tauri.api", diff --git a/examples/api/src/views/Cli.svelte b/examples/api/src/views/Cli.svelte index 9da4aa17eff..6d9da5e004a 100644 --- a/examples/api/src/views/Cli.svelte +++ b/examples/api/src/views/Cli.svelte @@ -1,10 +1,10 @@ diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index d15efad548e..91d8d25efab 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"app","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Get application metadata.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.app`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.app`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.app) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"app\": {\n \"all\": true, // enable all app APIs\n \"show\": true,\n \"hide\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":2,"name":"getName","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":60,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L60"}],"signatures":[{"id":3,"name":"getName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application name."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getName } from '@tauri-apps/api/app';\nconst appName = await getName();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":6,"name":"getTauriVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":80,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L80"}],"signatures":[{"id":7,"name":"getTauriVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the Tauri version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getTauriVersion } from '@tauri-apps/api/app';\nconst tauriVersion = await getTauriVersion();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":4,"name":"getVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L41"}],"signatures":[{"id":5,"name":"getVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getVersion } from '@tauri-apps/api/app';\nconst appVersion = await getVersion();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":10,"name":"hide","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":120,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L120"}],"signatures":[{"id":11,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Hides the application on macOS."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { hide } from '@tauri-apps/api/app';\nawait hide();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":8,"name":"show","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L100"}],"signatures":[{"id":9,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows the application on macOS. This function does not automatically focus any specific app window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { show } from '@tauri-apps/api/app';\nawait show();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[2,6,4,10,8]}],"sources":[{"fileName":"app.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/app.ts#L29"}]},{"id":12,"name":"cli","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Parse arguments from your Command Line Interface.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.cli`"},{"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":13,"name":"ArgMatch","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":15,"name":"occurrences","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Number of occurrences"}]},"sources":[{"fileName":"cli.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L27"}],"type":{"type":"intrinsic","name":"number"}},{"id":14,"name":"value","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"string if takes value\nboolean if flag\nstring[] or null if takes multiple values"}]},"sources":[{"fileName":"cli.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L23"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"boolean"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"groups":[{"title":"Properties","children":[15,14]}],"sources":[{"fileName":"cli.ts","line":17,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L17"}]},{"id":19,"name":"CliMatches","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":20,"name":"args","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"cli.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L42"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"reference","id":13,"name":"ArgMatch"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":21,"name":"subcommand","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"cli.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L43"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":16,"name":"SubcommandMatch"}]}}],"groups":[{"title":"Properties","children":[20,21]}],"sources":[{"fileName":"cli.ts","line":41,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L41"}]},{"id":16,"name":"SubcommandMatch","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":18,"name":"matches","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"cli.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L35"}],"type":{"type":"reference","id":19,"name":"CliMatches"}},{"id":17,"name":"name","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"cli.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L34"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18,17]}],"sources":[{"fileName":"cli.ts","line":33,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L33"}]},{"id":22,"name":"getMatches","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"cli.ts","line":66,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L66"}],"signatures":[{"id":23,"name":"getMatches","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Parse the arguments provided to the current process and get the matches using the configuration defined ["},{"kind":"code","text":"`tauri.cli`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#tauriconfig.cli) in "},{"kind":"code","text":"`tauri.conf.json`"}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getMatches } from '@tauri-apps/api/cli';\nconst matches = await getMatches();\nif (matches.subcommand?.name === 'run') {\n // `./your-app run $ARGS` was executed\n const args = matches.subcommand?.matches.args\n if ('debug' in args) {\n // `./your-app run --debug` was executed\n }\n} else {\n const args = matches.args\n // `./your-app $ARGS` was executed\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":19,"name":"CliMatches"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[13,19,16]},{"title":"Functions","children":[22]}],"sources":[{"fileName":"cli.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/cli.ts#L12"}]},{"id":24,"name":"clipboard","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Read and write to the system clipboard.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.clipboard`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.clipboard`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.clipboard) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"clipboard\": {\n \"all\": true, // enable all Clipboard APIs\n \"writeText\": true,\n \"readText\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":28,"name":"readText","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"clipboard.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/clipboard.ts#L63"}],"signatures":[{"id":29,"name":"readText","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the clipboard content as plain text."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readText } from '@tauri-apps/api/clipboard';\nconst clipboardText = await readText();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":25,"name":"writeText","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"clipboard.ts","line":44,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/clipboard.ts#L44"}],"signatures":[{"id":26,"name":"writeText","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes plain text to the clipboard."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeText, readText } from '@tauri-apps/api/clipboard';\nawait writeText('Tauri is awesome!');\nassert(await readText(), 'Tauri is awesome!');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0."}]}]},"parameters":[{"id":27,"name":"text","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[28,25]}],"sources":[{"fileName":"clipboard.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/clipboard.ts#L29"}]},{"id":30,"name":"dialog","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Native system dialogs for opening and saving files.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.dialog`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.dialog`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.dialog) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"dialog\": {\n \"all\": true, // enable all dialog APIs\n \"ask\": true, // enable dialog ask API\n \"confirm\": true, // enable dialog confirm API\n \"message\": true, // enable dialog message API\n \"open\": true, // enable file open API\n \"save\": true // enable file save API\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":49,"name":"ConfirmDialogOptions","kind":256,"kindString":"Interface","flags":{},"children":[{"id":53,"name":"cancelLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the cancel button."}]},"sources":[{"fileName":"dialog.ts","line":112,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L112"}],"type":{"type":"intrinsic","name":"string"}},{"id":52,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":110,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L110"}],"type":{"type":"intrinsic","name":"string"}},{"id":50,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":106,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L106"}],"type":{"type":"intrinsic","name":"string"}},{"id":51,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":108,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L108"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[53,52,50,51]}],"sources":[{"fileName":"dialog.ts","line":104,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L104"}]},{"id":31,"name":"DialogFilter","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Extension filters for the file dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":33,"name":"extensions","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Extensions to filter, without a "},{"kind":"code","text":"`.`"},{"kind":"text","text":" prefix."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nextensions: ['svg', 'png']\n```"}]}]},"sources":[{"fileName":"dialog.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L48"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":32,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Filter name."}]},"sources":[{"fileName":"dialog.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[33,32]}],"sources":[{"fileName":"dialog.ts","line":38,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L38"}]},{"id":45,"name":"MessageDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":48,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L101"}],"type":{"type":"intrinsic","name":"string"}},{"id":46,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L97"}],"type":{"type":"intrinsic","name":"string"}},{"id":47,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L99"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[48,46,47]}],"sources":[{"fileName":"dialog.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L95"}]},{"id":34,"name":"OpenDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the open dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":37,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path."}]},"sources":[{"fileName":"dialog.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L62"}],"type":{"type":"intrinsic","name":"string"}},{"id":39,"name":"directory","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog is a directory selection or not."}]},"sources":[{"fileName":"dialog.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L66"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":36,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L60"}],"type":{"type":"array","elementType":{"type":"reference","id":31,"name":"DialogFilter"}}},{"id":38,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog allows multiple selection or not."}]},"sources":[{"fileName":"dialog.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L64"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":40,"name":"recursive","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`directory`"},{"kind":"text","text":" is true, indicates that it will be read recursively later.\nDefines whether subdirectories will be allowed on the scope or not."}]},"sources":[{"fileName":"dialog.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L71"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":35,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L58"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[37,39,36,38,40,35]}],"sources":[{"fileName":"dialog.ts","line":56,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L56"}]},{"id":41,"name":"SaveDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the save dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":44,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path.\nIf it's a directory path, the dialog interface will change to that folder.\nIf it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder."}]},"sources":[{"fileName":"dialog.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L89"}],"type":{"type":"intrinsic","name":"string"}},{"id":43,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L83"}],"type":{"type":"array","elementType":{"type":"reference","id":31,"name":"DialogFilter"}}},{"id":42,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L81"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[44,43,42]}],"sources":[{"fileName":"dialog.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L79"}]},{"id":72,"name":"ask","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":257,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L257"}],"signatures":[{"id":73,"name":"ask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" and "},{"kind":"code","text":"`No`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { ask } from '@tauri-apps/api/dialog';\nconst yes = await ask('Are you sure?', 'Tauri');\nconst yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":74,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":75,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":49,"name":"ConfirmDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":76,"name":"confirm","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":293,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L293"}],"signatures":[{"id":77,"name":"confirm","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" and "},{"kind":"code","text":"`Cancel`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { confirm } from '@tauri-apps/api/dialog';\nconst confirmed = await confirm('Are you sure?', 'Tauri');\nconst confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":78,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":79,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":49,"name":"ConfirmDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":68,"name":"message","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":224,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L224"}],"signatures":[{"id":69,"name":"message","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a message dialog with an "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" button."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { message } from '@tauri-apps/api/dialog';\nawait message('Tauri is awesome', 'Tauri');\nawait message('File not found', { title: 'Tauri', type: 'error' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":70,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":71,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":45,"name":"MessageDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":54,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":144,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L144"},{"fileName":"dialog.ts","line":147,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L147"},{"fileName":"dialog.ts","line":150,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L150"},{"fileName":"dialog.ts","line":153,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L153"}],"signatures":[{"id":55,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory selection dialog.\n\nThe selected paths are added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/dialog';\n// Open a selection dialog for image files\nconst selected = await open({\n multiple: true,\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"},{"kind":"text","text":"\nNote that the "},{"kind":"code","text":"`open`"},{"kind":"text","text":" function returns a conditional type depending on the "},{"kind":"code","text":"`multiple`"},{"kind":"text","text":" option:\n- false (default) -> "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":"\n- true -> "},{"kind":"code","text":"`Promise`"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path(s)"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":56,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":34,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":57,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":58,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":145,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L145"}],"type":{"type":"literal","value":false}}],"groups":[{"title":"Properties","children":[58]}],"sources":[{"fileName":"dialog.ts","line":145,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L145"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":59,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":60,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":34,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":61,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":62,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":148,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L148"}],"type":{"type":"literal","value":true}}],"groups":[{"title":"Properties","children":[62]}],"sources":[{"fileName":"dialog.ts","line":148,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L148"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":63,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":64,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":34,"name":"OpenDialogOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"type":"intrinsic","name":"string"}},{"type":"intrinsic","name":"string"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":65,"name":"save","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":193,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L193"}],"signatures":[{"id":66,"name":"save","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory save dialog.\n\nThe selected path is added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { save } from '@tauri-apps/api/dialog';\nconst filePath = await save({\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":67,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":41,"name":"SaveDialogOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[49,31,45,34,41]},{"title":"Functions","children":[72,76,68,54,65]}],"sources":[{"fileName":"dialog.ts","line":31,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/dialog.ts#L31"}]},{"id":80,"name":"event","kind":2,"kindString":"Module","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":82,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":96,"name":"CHECK_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":100,"name":"DOWNLOAD_PROGRESS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":98,"name":"INSTALL_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":95,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":99,"name":"STATUS_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":97,"name":"UPDATE_AVAILABLE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":89,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":85,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":86,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":87,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":92,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":94,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":93,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":88,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":84,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":83,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":90,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":91,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[96,100,98,95,99,97,89,85,86,87,92,94,93,88,84,83,90,91]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L20"}]},{"id":1187,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":1188,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":81,"name":"EventName"}},{"id":1190,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":1191,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":1192,"name":"T"}},{"id":1189,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[1188,1190,1191,1189]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":1192,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":1193,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":1197,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":1194,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":1195,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":1196,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1187,"typeArguments":[{"type":"reference","id":1197,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":81,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":82,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":1198,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":1199,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":1200,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":111,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L112"}],"signatures":[{"id":112,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"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"}]}]},"parameters":[{"id":113,"name":"event","kind":32768,"kindString":"Parameter","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":114,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":101,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L62"}],"signatures":[{"id":102,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"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"}]}]},"typeParameter":[{"id":103,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":104,"name":"event","kind":32768,"kindString":"Parameter","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","id":81,"name":"EventName"}},{"id":105,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":103,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L93"}],"signatures":[{"id":107,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"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"}]}]},"typeParameter":[{"id":108,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":109,"name":"event","kind":32768,"kindString":"Parameter","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","id":81,"name":"EventName"}},{"id":110,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":108,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[82]},{"title":"Interfaces","children":[1187]},{"title":"Type Aliases","children":[1193,81,1198]},{"title":"Functions","children":[111,101,106]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/event.ts#L12"}]},{"id":115,"name":"fs","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the file system.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.fs`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.fs`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.fs) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"fs\": {\n \"all\": true, // enable all FS APIs\n \"readFile\": true,\n \"writeFile\": true,\n \"readDir\": true,\n \"copyFile\": true,\n \"createDir\": true,\n \"removeDir\": true,\n \"removeFile\": true,\n \"renameFile\": true,\n \"exists\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis module prevents path traversal, not allowing absolute paths or parent dir components\n(i.e. \"/usr/path/to/file\" or \"../path/to/file\" paths are not allowed).\nPaths accessed with this API must be relative to one of the "},{"kind":"inline-tag","tag":"@link","text":"base directories","target":116},{"kind":"text","text":"\nso if you need access to arbitrary filesystem paths, you must write such logic on the core layer instead.\n\nThe API has a scope configuration that forces you to restrict the paths that can be accessed using glob patterns.\n\nThe scope configuration is an array of glob patterns describing folder paths that are allowed.\nFor instance, this scope configuration only allows accessing files on the\n*databases* folder of the "},{"kind":"inline-tag","tag":"@link","text":"$APPDATA directory","target":383},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"fs\": {\n \"scope\": [\"$APPDATA/databases/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\n\nNotice the use of the "},{"kind":"code","text":"`$APPDATA`"},{"kind":"text","text":" variable. The value is injected at runtime, resolving to the "},{"kind":"inline-tag","tag":"@link","text":"app data directory","target":383},{"kind":"text","text":".\nThe available variables are:\n"},{"kind":"inline-tag","tag":"@link","text":"`$APPCONFIG`","target":381},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPDATA`","target":383},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPLOCALDATA`","target":385},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$APPCACHE`","target":387},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPLOG`","target":389},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$AUDIO`","target":391},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$CACHE`","target":393},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$CONFIG`","target":395},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DATA`","target":397},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$LOCALDATA`","target":411},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DESKTOP`","target":399},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DOCUMENT`","target":401},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$DOWNLOAD`","target":403},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$EXE`","target":405},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$FONT`","target":407},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$HOME`","target":409},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$PICTURE`","target":413},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$PUBLIC`","target":415},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$RUNTIME`","target":422},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$TEMPLATE`","target":424},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$VIDEO`","target":426},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$RESOURCE`","target":417},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$TEMP`","target":375},{"kind":"text","text":".\n\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access.\n\nNote that this scope applies to **all** APIs on this module."}]},"children":[{"id":156,"name":"Dir","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"fs.ts","line":592,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L592"}],"target":116},{"id":173,"name":"writeFile","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"fs.ts","line":596,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L596"}],"target":165},{"id":116,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":132,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L96"}],"type":{"type":"literal","value":16}},{"id":129,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L93"}],"type":{"type":"literal","value":13}},{"id":130,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L94"}],"type":{"type":"literal","value":14}},{"id":131,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L95"}],"type":{"type":"literal","value":15}},{"id":133,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L97"}],"type":{"type":"literal","value":17}},{"id":117,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L81"}],"type":{"type":"literal","value":1}},{"id":118,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L82"}],"type":{"type":"literal","value":2}},{"id":119,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L83"}],"type":{"type":"literal","value":3}},{"id":120,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":84,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L84"}],"type":{"type":"literal","value":4}},{"id":134,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L99"}],"type":{"type":"literal","value":18}},{"id":122,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":86,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L86"}],"type":{"type":"literal","value":6}},{"id":123,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L87"}],"type":{"type":"literal","value":7}},{"id":135,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":100,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L100"}],"type":{"type":"literal","value":19}},{"id":136,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L101"}],"type":{"type":"literal","value":20}},{"id":137,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":102,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L102"}],"type":{"type":"literal","value":21}},{"id":121,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L85"}],"type":{"type":"literal","value":5}},{"id":124,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L88"}],"type":{"type":"literal","value":8}},{"id":125,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L89"}],"type":{"type":"literal","value":9}},{"id":127,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L91"}],"type":{"type":"literal","value":11}},{"id":138,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":103,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L103"}],"type":{"type":"literal","value":22}},{"id":128,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":92,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L92"}],"type":{"type":"literal","value":12}},{"id":139,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":104,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L104"}],"type":{"type":"literal","value":23}},{"id":126,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L90"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[132,129,130,131,133,117,118,119,120,134,122,123,135,136,137,121,124,125,127,138,128,139,126]}],"sources":[{"fileName":"fs.ts","line":80,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L80"}]},{"id":152,"name":"FileEntry","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":155,"name":"children","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Children of this entry if it's a directory; null otherwise"}]},"sources":[{"fileName":"fs.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L160"}],"type":{"type":"array","elementType":{"type":"reference","id":152,"name":"FileEntry"}}},{"id":154,"name":"name","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Name of the directory/file\ncan be null if the path terminates with "},{"kind":"code","text":"`..`"}]},"sources":[{"fileName":"fs.ts","line":158,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L158"}],"type":{"type":"intrinsic","name":"string"}},{"id":153,"name":"path","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"fs.ts","line":153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L153"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[155,154,153]}],"sources":[{"fileName":"fs.ts","line":152,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L152"}]},{"id":149,"name":"FsBinaryFileOption","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object used to write a binary data to a file."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":151,"name":"contents","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The byte array contents."}]},"sources":[{"fileName":"fs.ts","line":146,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L146"}],"type":{"type":"reference","id":148,"name":"BinaryFileContents"}},{"id":150,"name":"path","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Path to the file to write."}]},"sources":[{"fileName":"fs.ts","line":144,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L144"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[151,150]}],"sources":[{"fileName":"fs.ts","line":142,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L142"}]},{"id":142,"name":"FsDirOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":143,"name":"dir","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L119"}],"type":{"type":"reference","id":116,"name":"BaseDirectory"}},{"id":144,"name":"recursive","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":120,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L120"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[143,144]}],"sources":[{"fileName":"fs.ts","line":118,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L118"}]},{"id":140,"name":"FsOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":141,"name":"dir","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L111"}],"type":{"type":"reference","id":116,"name":"BaseDirectory"}}],"groups":[{"title":"Properties","children":[141]}],"sources":[{"fileName":"fs.ts","line":110,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L110"}]},{"id":145,"name":"FsTextFileOption","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object used to write a UTF-8 string to a file."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":147,"name":"contents","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The UTF-8 string to write to the file."}]},"sources":[{"fileName":"fs.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L132"}],"type":{"type":"intrinsic","name":"string"}},{"id":146,"name":"path","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Path to the file to write."}]},"sources":[{"fileName":"fs.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L130"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[147,146]}],"sources":[{"fileName":"fs.ts","line":128,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L128"}]},{"id":148,"name":"BinaryFileContents","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"fs.ts","line":135,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L135"}],"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"}]}},{"id":194,"name":"copyFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":488,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L488"}],"signatures":[{"id":195,"name":"copyFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Copies a file to a destination."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { copyFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Copy the `$APPCONFIG/app.conf` file to `$APPCONFIG/app.conf.bk`\nawait copyFile('app.conf', 'app.conf.bk', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":196,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":197,"name":"destination","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":198,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":186,"name":"createDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":433,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L433"}],"signatures":[{"id":187,"name":"createDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a directory.\nIf one of the path's parent components doesn't exist\nand the "},{"kind":"code","text":"`recursive`"},{"kind":"text","text":" option isn't set to true, the promise will be rejected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { createDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Create the `$APPDATA/users` directory\nawait createDir('users', { dir: BaseDirectory.AppData, recursive: true });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":188,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":189,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":142,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":208,"name":"exists","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":571,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L571"}],"signatures":[{"id":209,"name":"exists","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Check if a path exists."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exists, BaseDirectory } from '@tauri-apps/api/fs';\n// Check if the `$APPDATA/avatar.png` file exists\nawait exists('avatar.png', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"parameters":[{"id":210,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":211,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":161,"name":"readBinaryFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":199,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L199"}],"signatures":[{"id":162,"name":"readBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Reads a file as byte array."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Read the image file in the `$RESOURCEDIR/avatar.png` path\nconst contents = await readBinaryFile('avatar.png', { dir: BaseDirectory.Resource });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":163,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":164,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":182,"name":"readDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":404,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L404"}],"signatures":[{"id":183,"name":"readDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"List directory files."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Reads the `$APPDATA/users` directory recursively\nconst entries = await readDir('users', { dir: BaseDirectory.AppData, recursive: true });\n\nfunction processEntries(entries) {\n for (const entry of entries) {\n console.log(`Entry: ${entry.path}`);\n if (entry.children) {\n processEntries(entry.children)\n }\n }\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":184,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":185,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":142,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":152,"name":"FileEntry"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":157,"name":"readTextFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":174,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L174"}],"signatures":[{"id":158,"name":"readTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Reads a file as an UTF-8 encoded string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Read the text file in the `$APPCONFIG/app.conf` path\nconst contents = await readTextFile('app.conf', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":159,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":160,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":190,"name":"removeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":461,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L461"}],"signatures":[{"id":191,"name":"removeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes a directory.\nIf the directory is not empty and the "},{"kind":"code","text":"`recursive`"},{"kind":"text","text":" option isn't set to true, the promise will be rejected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { removeDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Remove the directory `$APPDATA/users`\nawait removeDir('users', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":192,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":193,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":142,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":199,"name":"removeFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":517,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L517"}],"signatures":[{"id":200,"name":"removeFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { removeFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Remove the `$APPConfig/app.conf` file\nawait removeFile('app.conf', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":201,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":202,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":203,"name":"renameFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":544,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L544"}],"signatures":[{"id":204,"name":"renameFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Renames a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { renameFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Rename the `$APPDATA/avatar.png` file\nawait renameFile('avatar.png', 'deleted.png', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":205,"name":"oldPath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":206,"name":"newPath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":207,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":140,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":174,"name":"writeBinaryFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":308,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L308"},{"fileName":"fs.ts","line":329,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L329"},{"fileName":"fs.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L341"}],"signatures":[{"id":175,"name":"writeBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a byte array content to a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a binary file to the `$APPDATA/avatar.png` path\nawait writeBinaryFile('avatar.png', new Uint8Array([]), { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":176,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":177,"name":"contents","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":148,"name":"BinaryFileContents"}},{"id":178,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Configuration object."}]},"type":{"type":"reference","id":140,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":179,"name":"writeBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a byte array content to a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a binary file to the `$APPDATA/avatar.png` path\nawait writeBinaryFile({ path: 'avatar.png', contents: new Uint8Array([]) }, { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":180,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The object containing the file path and contents."}]},"type":{"type":"reference","id":149,"name":"FsBinaryFileOption"}},{"id":181,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Configuration object."}]},"type":{"type":"reference","id":140,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":165,"name":"writeTextFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":226,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L226"},{"fileName":"fs.ts","line":244,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L244"},{"fileName":"fs.ts","line":256,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L256"}],"signatures":[{"id":166,"name":"writeTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a UTF-8 text file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a text file to the `$APPCONFIG/app.conf` path\nawait writeTextFile('app.conf', 'file contents', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":167,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":168,"name":"contents","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":169,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":140,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":170,"name":"writeTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a UTF-8 text file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a text file to the `$APPCONFIG/app.conf` path\nawait writeTextFile({ path: 'app.conf', contents: 'file contents' }, { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":171,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":145,"name":"FsTextFileOption"}},{"id":172,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":140,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"References","children":[156,173]},{"title":"Enumerations","children":[116]},{"title":"Interfaces","children":[152,149,142,140,145]},{"title":"Type Aliases","children":[148]},{"title":"Functions","children":[194,186,208,161,182,157,190,199,203,174,165]}],"sources":[{"fileName":"fs.ts","line":75,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/fs.ts#L75"}]},{"id":212,"name":"globalShortcut","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Register global shortcuts.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.globalShortcut`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.globalShortcut`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.globalshortcut) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"globalShortcut\": {\n \"all\": true // enable all global shortcut APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":213,"name":"ShortcutHandler","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":29,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L29"}],"type":{"type":"reflection","declaration":{"id":214,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":29,"character":30,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L29"}],"signatures":[{"id":215,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":216,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":225,"name":"isRegistered","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":101,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L101"}],"signatures":[{"id":226,"name":"isRegistered","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Determines whether the given shortcut is registered by this application or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isRegistered } from '@tauri-apps/api/globalShortcut';\nconst isRegistered = await isRegistered('CommandOrControl+P');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":227,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Array of shortcut definitions, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":217,"name":"register","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":46,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L46"}],"signatures":[{"id":218,"name":"register","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Register a global shortcut."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { register } from '@tauri-apps/api/globalShortcut';\nawait register('CommandOrControl+Shift+C', () => {\n console.log('Shortcut triggered');\n});\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":219,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut definition, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}},{"id":220,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut handler callback - takes the triggered shortcut as argument"}]},"type":{"type":"reference","id":213,"name":"ShortcutHandler"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":221,"name":"registerAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":75,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L75"}],"signatures":[{"id":222,"name":"registerAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Register a collection of global shortcuts."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { registerAll } from '@tauri-apps/api/globalShortcut';\nawait registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (shortcut) => {\n console.log(`Shortcut ${shortcut} triggered`);\n});\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":223,"name":"shortcuts","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Array of shortcut definitions, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":224,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut handler callback - takes the triggered shortcut as argument"}]},"type":{"type":"reference","id":213,"name":"ShortcutHandler"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":228,"name":"unregister","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":123,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L123"}],"signatures":[{"id":229,"name":"unregister","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unregister a global shortcut."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { unregister } from '@tauri-apps/api/globalShortcut';\nawait unregister('CmdOrControl+Space');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":230,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"shortcut definition, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":231,"name":"unregisterAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L143"}],"signatures":[{"id":232,"name":"unregisterAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unregisters all shortcuts registered by the application."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { unregisterAll } from '@tauri-apps/api/globalShortcut';\nawait unregisterAll();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Type Aliases","children":[213]},{"title":"Functions","children":[225,217,221,228,231]}],"sources":[{"fileName":"globalShortcut.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/globalShortcut.ts#L26"}]},{"id":233,"name":"http","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the HTTP client written in Rust.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.http`"},{"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\nThe APIs must be allowlisted on "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"all\": true, // enable all http APIs\n \"request\": true // enable HTTP request API\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis API has a scope configuration that forces you to restrict the URLs and paths that can be accessed using glob patterns.\n\nFor instance, this scope configuration only allows making HTTP requests to the GitHub API for the "},{"kind":"code","text":"`tauri-apps`"},{"kind":"text","text":" organization:\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"scope\": [\"https://api.github.com/repos/tauri-apps/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":329,"name":"ResponseType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":332,"name":"Binary","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":74,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L74"}],"type":{"type":"literal","value":3}},{"id":330,"name":"JSON","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":72,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L72"}],"type":{"type":"literal","value":1}},{"id":331,"name":"Text","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L73"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[332,330,331]}],"sources":[{"fileName":"http.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L71"}]},{"id":260,"name":"Body","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The body object to be used on POST and PUT requests."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":278,"name":"payload","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L95"}],"type":{"type":"intrinsic","name":"unknown"}},{"id":277,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L94"}],"type":{"type":"intrinsic","name":"string"}},{"id":270,"name":"bytes","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":217,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L217"}],"signatures":[{"id":271,"name":"bytes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new byte array body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.bytes(new Uint8Array([1, 2, 3]));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":272,"name":"bytes","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body byte array."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"}]}}],"type":{"type":"reference","id":260,"name":"Body"}}]},{"id":261,"name":"form","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":134,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L134"}],"signatures":[{"id":262,"name":"form","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new form data body. The form data is an object where each key is the entry name,\nand the value is either a string or a file object.\n\nBy default it sets the "},{"kind":"code","text":"`application/x-www-form-urlencoded`"},{"kind":"text","text":" Content-Type header,\nbut you can set it to "},{"kind":"code","text":"`multipart/form-data`"},{"kind":"text","text":" if the Cargo feature "},{"kind":"code","text":"`http-multipart`"},{"kind":"text","text":" is enabled.\n\nNote that a file path must be allowed in the "},{"kind":"code","text":"`fs`"},{"kind":"text","text":" allowlist scope."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nconst body = Body.form({\n key: 'value',\n image: {\n file: '/path/to/file', // either a path or an array buffer of the file contents\n mime: 'image/jpeg', // optional\n fileName: 'image.jpg' // optional\n }\n});\n\n// alternatively, use a FormData:\nconst form = new FormData();\nform.append('key', 'value');\nform.append('image', file, 'image.png');\nconst formBody = Body.form(form);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":263,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body data."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"reference","id":240,"name":"Part"}],"name":"Record","qualifiedName":"Record","package":"typescript"},{"type":"reference","name":"FormData","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/FormData","qualifiedName":"FormData","package":"typescript"}]}}],"type":{"type":"reference","id":260,"name":"Body"}}]},{"id":264,"name":"json","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":185,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L185"}],"signatures":[{"id":265,"name":"json","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new JSON body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.json({\n registered: true,\n name: 'tauri'\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":266,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body JSON object."}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":260,"name":"Body"}}]},{"id":267,"name":"text","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":201,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L201"}],"signatures":[{"id":268,"name":"text","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new UTF-8 string body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.text('The body content as a string');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":269,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body string."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","id":260,"name":"Body"}}]}],"groups":[{"title":"Properties","children":[278,277]},{"title":"Methods","children":[270,261,264,267]}],"sources":[{"fileName":"http.ts","line":93,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L93"}]},{"id":279,"name":"Client","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":283,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L303"}],"type":{"type":"intrinsic","name":"number"}},{"id":312,"name":"delete","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L484"}],"signatures":[{"id":313,"name":"delete","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a DELETE request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.delete('http://localhost:3003/users/1');\n```"}]}]},"typeParameter":[{"id":314,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":315,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":316,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":250,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":314,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":284,"name":"drop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":318,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L318"}],"signatures":[{"id":285,"name":"drop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Drops the client instance."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nawait client.drop();\n```"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":290,"name":"get","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":389,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L389"}],"signatures":[{"id":291,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a GET request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.get('http://localhost:3003/users', {\n timeout: 30,\n // the expected response type\n responseType: ResponseType.JSON\n});\n```"}]}]},"typeParameter":[{"id":292,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":293,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":294,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":250,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":292,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":307,"name":"patch","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":467,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L467"}],"signatures":[{"id":308,"name":"patch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PATCH request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.patch('http://localhost:3003/users/1', {\n body: Body.json({ email: 'contact@tauri.app' })\n});\n```"}]}]},"typeParameter":[{"id":309,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":310,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":311,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":250,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":309,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":295,"name":"post","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":413,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L413"}],"signatures":[{"id":296,"name":"post","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a POST request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.post('http://localhost:3003/users', {\n body: Body.json({\n name: 'tauri',\n password: 'awesome'\n }),\n // in this case the server returns a simple string\n responseType: ResponseType.Text,\n});\n```"}]}]},"typeParameter":[{"id":297,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":298,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":299,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":260,"name":"Body"}},{"id":300,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":250,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":297,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":301,"name":"put","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":443,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L443"}],"signatures":[{"id":302,"name":"put","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PUT request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.put('http://localhost:3003/users/1', {\n body: Body.form({\n file: {\n file: '/home/tauri/avatar.png',\n mime: 'image/png',\n fileName: 'avatar.png'\n }\n })\n});\n```"}]}]},"typeParameter":[{"id":303,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":304,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":305,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":260,"name":"Body"}},{"id":306,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":250,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":303,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":286,"name":"request","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":340,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L340"}],"signatures":[{"id":287,"name":"request","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes an HTTP request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.request({\n method: 'GET',\n url: 'http://localhost:3003/users',\n});\n```"}]}]},"typeParameter":[{"id":288,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":289,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":242,"name":"HttpOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":288,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Properties","children":[283]},{"title":"Methods","children":[312,284,290,307,295,301,286]}],"sources":[{"fileName":"http.ts","line":302,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L302"}]},{"id":317,"name":"Response","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Response object."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":327,"name":"data","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response data."}]},"sources":[{"fileName":"http.ts","line":286,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L286"}],"type":{"type":"reference","name":"T"}},{"id":325,"name":"headers","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response headers."}]},"sources":[{"fileName":"http.ts","line":282,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L282"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":324,"name":"ok","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"A boolean indicating whether the response was successful (status in the range 200–299) or not."}]},"sources":[{"fileName":"http.ts","line":280,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L280"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":326,"name":"rawHeaders","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response raw headers."}]},"sources":[{"fileName":"http.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L284"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":323,"name":"status","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response status code."}]},"sources":[{"fileName":"http.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L278"}],"type":{"type":"intrinsic","name":"number"}},{"id":322,"name":"url","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The request URL."}]},"sources":[{"fileName":"http.ts","line":276,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L276"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[327,325,324,326,323,322]}],"sources":[{"fileName":"http.ts","line":274,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L274"}],"typeParameters":[{"id":328,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":237,"name":"ClientOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":239,"name":"connectTimeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L65"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":234,"name":"Duration"}]}},{"id":238,"name":"maxRedirections","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the maximum number of redirects the client should follow.\nIf set to 0, no redirects will be followed."}]},"sources":[{"fileName":"http.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L64"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[239,238]}],"sources":[{"fileName":"http.ts","line":59,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L59"}]},{"id":234,"name":"Duration","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":236,"name":"nanos","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L53"}],"type":{"type":"intrinsic","name":"number"}},{"id":235,"name":"secs","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L52"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[236,235]}],"sources":[{"fileName":"http.ts","line":51,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L51"}]},{"id":333,"name":"FilePart","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":334,"name":"file","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L81"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":337,"name":"T"}]}},{"id":336,"name":"fileName","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L83"}],"type":{"type":"intrinsic","name":"string"}},{"id":335,"name":"mime","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L82"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[334,336,335]}],"sources":[{"fileName":"http.ts","line":80,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L80"}],"typeParameters":[{"id":337,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":242,"name":"HttpOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object sent to the backend."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":247,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":250,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L250"}],"type":{"type":"reference","id":260,"name":"Body"}},{"id":245,"name":"headers","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L248"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":243,"name":"method","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":246,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L246"}],"type":{"type":"reference","id":241,"name":"HttpVerb"}},{"id":246,"name":"query","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":249,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L249"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":249,"name":"responseType","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":252,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L252"}],"type":{"type":"reference","id":329,"name":"ResponseType"}},{"id":248,"name":"timeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":251,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L251"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":234,"name":"Duration"}]}},{"id":244,"name":"url","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L247"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[247,245,243,246,249,248,244]}],"sources":[{"fileName":"http.ts","line":245,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L245"}]},{"id":251,"name":"FetchOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the "},{"kind":"code","text":"`fetch`"},{"kind":"text","text":" API."}]},"sources":[{"fileName":"http.ts","line":258,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L258"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":242,"name":"HttpOptions"},{"type":"literal","value":"url"}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":241,"name":"HttpVerb","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The request HTTP verb."}]},"sources":[{"fileName":"http.ts","line":229,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L229"}],"type":{"type":"union","types":[{"type":"literal","value":"GET"},{"type":"literal","value":"POST"},{"type":"literal","value":"PUT"},{"type":"literal","value":"DELETE"},{"type":"literal","value":"PATCH"},{"type":"literal","value":"HEAD"},{"type":"literal","value":"OPTIONS"},{"type":"literal","value":"CONNECT"},{"type":"literal","value":"TRACE"}]}},{"id":240,"name":"Part","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"http.ts","line":86,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L86"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"},{"type":"reference","id":333,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"FilePart"}]}},{"id":250,"name":"RequestOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Request options."}]},"sources":[{"fileName":"http.ts","line":256,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L256"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":242,"name":"HttpOptions"},{"type":"union","types":[{"type":"literal","value":"method"},{"type":"literal","value":"url"}]}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":255,"name":"fetch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":531,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L531"}],"signatures":[{"id":256,"name":"fetch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform an HTTP request using the default client."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fetch } from '@tauri-apps/api/http';\nconst response = await fetch('http://localhost:3003/users/2', {\n method: 'GET',\n timeout: 30,\n});\n```"}]}]},"typeParameter":[{"id":257,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":258,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":259,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":251,"name":"FetchOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":317,"typeArguments":[{"type":"reference","id":257,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":252,"name":"getClient","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":507,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L507"}],"signatures":[{"id":253,"name":"getClient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new client using the specified options."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the client instance."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":254,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Client configuration."}]},"type":{"type":"reference","id":237,"name":"ClientOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":279,"name":"Client"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[329]},{"title":"Classes","children":[260,279,317]},{"title":"Interfaces","children":[237,234,333,242]},{"title":"Type Aliases","children":[251,241,240,250]},{"title":"Functions","children":[255,252]}],"sources":[{"fileName":"http.ts","line":46,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/http.ts#L46"}]},{"id":338,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":350,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":351,"name":"clearMocks","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":339,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":340,"name":"mockIPC","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":341,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":342,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":343,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":344,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":345,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":346,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":347,"name":"mockWindows","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":348,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":349,"name":"additionalWindows","kind":32768,"kindString":"Parameter","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":[350,339,346]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/mocks.ts#L5"}]},{"id":352,"name":"notification","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Send toast notifications (brief auto-expiring OS window element) to your user.\nCan also be used with the Notification Web API.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.notification`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.notification`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.notification) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"notification\": {\n \"all\": true // enable all notification APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":353,"name":"Options","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options to send a notification."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":355,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification body."}]},"sources":[{"fileName":"notification.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L38"}],"type":{"type":"intrinsic","name":"string"}},{"id":356,"name":"icon","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification icon."}]},"sources":[{"fileName":"notification.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L40"}],"type":{"type":"intrinsic","name":"string"}},{"id":354,"name":"title","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Notification title."}]},"sources":[{"fileName":"notification.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L36"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[355,356,354]}],"sources":[{"fileName":"notification.ts","line":34,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L34"}]},{"id":357,"name":"Permission","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Possible permission values."}]},"sources":[{"fileName":"notification.ts","line":44,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L44"}],"type":{"type":"union","types":[{"type":"literal","value":"granted"},{"type":"literal","value":"denied"},{"type":"literal","value":"default"}]}},{"id":363,"name":"isPermissionGranted","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":56,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L56"}],"signatures":[{"id":364,"name":"isPermissionGranted","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if the permission to send notifications is granted."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted } from '@tauri-apps/api/notification';\nconst permissionGranted = await isPermissionGranted();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":361,"name":"requestPermission","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":84,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L84"}],"signatures":[{"id":362,"name":"requestPermission","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests the permission to send notifications."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to whether the user granted the permission or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":357,"name":"Permission"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":358,"name":"sendNotification","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":106,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L106"}],"signatures":[{"id":359,"name":"sendNotification","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a notification to the user."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\nif (permissionGranted) {\n sendNotification('Tauri is awesome!');\n sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":360,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":353,"name":"Options"}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Interfaces","children":[353]},{"title":"Type Aliases","children":[357]},{"title":"Functions","children":[363,361,358]}],"sources":[{"fileName":"notification.ts","line":27,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/notification.ts#L27"}]},{"id":365,"name":"os","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides operating system-related utility methods and properties.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.os`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.os`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.os) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"os\": {\n \"all\": true, // enable all Os APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":379,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L43"}],"type":{"type":"union","types":[{"type":"literal","value":"x86"},{"type":"literal","value":"x86_64"},{"type":"literal","value":"arm"},{"type":"literal","value":"aarch64"},{"type":"literal","value":"mips"},{"type":"literal","value":"mips64"},{"type":"literal","value":"powerpc"},{"type":"literal","value":"powerpc64"},{"type":"literal","value":"riscv64"},{"type":"literal","value":"s390x"},{"type":"literal","value":"sparc64"}]}},{"id":378,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":377,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L29"}],"type":{"type":"union","types":[{"type":"literal","value":"linux"},{"type":"literal","value":"darwin"},{"type":"literal","value":"ios"},{"type":"literal","value":"freebsd"},{"type":"literal","value":"dragonfly"},{"type":"literal","value":"netbsd"},{"type":"literal","value":"openbsd"},{"type":"literal","value":"solaris"},{"type":"literal","value":"android"},{"type":"literal","value":"win32"}]}},{"id":366,"name":"EOL","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"The operating system-specific end-of-line marker.\n- "},{"kind":"code","text":"`\\n`"},{"kind":"text","text":" on POSIX\n- "},{"kind":"code","text":"`\\r\\n`"},{"kind":"text","text":" on Windows"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"os.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\n"},{"type":"literal","value":"\r\n"}]},"defaultValue":"..."},{"id":373,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L135"}],"signatures":[{"id":374,"name":"arch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system CPU architecture for which the tauri app was compiled.\nPossible values are "},{"kind":"code","text":"`'x86'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'x86_64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'arm'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'aarch64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'riscv64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'s390x'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'sparc64'`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { arch } from '@tauri-apps/api/os';\nconst archName = await arch();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":379,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":367,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L77"}],"signatures":[{"id":368,"name":"platform","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the operating system platform.\nThe value is set at compile time. Possible values are "},{"kind":"code","text":"`'linux'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'darwin'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'ios'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'freebsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'dragonfly'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'netbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'openbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'solaris'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'android'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'win32'`"}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { platform } from '@tauri-apps/api/os';\nconst platformName = await platform();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":377,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":375,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L154"}],"signatures":[{"id":376,"name":"tempdir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system's default directory for temporary files as a string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempdir } from '@tauri-apps/api/os';\nconst tempdirPath = await tempdir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":371,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L115"}],"signatures":[{"id":372,"name":"type","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"`'Linux'`"},{"kind":"text","text":" on Linux, "},{"kind":"code","text":"`'Darwin'`"},{"kind":"text","text":" on macOS, and "},{"kind":"code","text":"`'Windows_NT'`"},{"kind":"text","text":" on Windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { type } from '@tauri-apps/api/os';\nconst osType = await type();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":378,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":369,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L96"}],"signatures":[{"id":370,"name":"version","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the kernel version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { version } from '@tauri-apps/api/os';\nconst osVersion = await version();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Type Aliases","children":[379,378,377]},{"title":"Variables","children":[366]},{"title":"Functions","children":[373,367,375,371,369]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/os.ts#L26"}]},{"id":380,"name":"path","kind":2,"kindString":"Module","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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":1201,"name":"BaseDirectory","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"path.ts","line":637,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L637"}],"target":116},{"id":429,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides 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":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":526,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L526"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":428,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides 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":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":517,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L517"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":387,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":92,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L92"}],"signatures":[{"id":388,"name":"appCacheDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":381,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L41"}],"signatures":[{"id":382,"name":"appConfigDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":383,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":58,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L58"}],"signatures":[{"id":384,"name":"appDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":385,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":75,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L75"}],"signatures":[{"id":386,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":389,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":504,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L504"}],"signatures":[{"id":390,"name":"appLogDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":391,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":114,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L114"}],"signatures":[{"id":392,"name":"audioDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":445,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":618,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L618"}],"signatures":[{"id":446,"name":"basename","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":447,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":448,"name":"ext","kind":32768,"kindString":"Parameter","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","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":393,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":136,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L136"}],"signatures":[{"id":394,"name":"cacheDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":395,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":158,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L158"}],"signatures":[{"id":396,"name":"configDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":397,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":180,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L180"}],"signatures":[{"id":398,"name":"dataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":399,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":202,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L202"}],"signatures":[{"id":400,"name":"desktopDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":439,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":584,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L584"}],"signatures":[{"id":440,"name":"dirname","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":441,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":401,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":224,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L224"}],"signatures":[{"id":402,"name":"documentDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":403,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":246,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L246"}],"signatures":[{"id":404,"name":"downloadDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":405,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":268,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L268"}],"signatures":[{"id":406,"name":"executableDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":442,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":600,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L600"}],"signatures":[{"id":443,"name":"extname","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":444,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":407,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":290,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L290"}],"signatures":[{"id":408,"name":"fontDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":409,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":312,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L312"}],"signatures":[{"id":410,"name":"homeDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":449,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":632,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L632"}],"signatures":[{"id":450,"name":"isAbsolute","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":451,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":436,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":569,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L569"}],"signatures":[{"id":437,"name":"join","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":438,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":411,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":334,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L334"}],"signatures":[{"id":412,"name":"localDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":433,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":554,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L554"}],"signatures":[{"id":434,"name":"normalize","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":435,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":413,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":356,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L356"}],"signatures":[{"id":414,"name":"pictureDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":415,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":378,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L378"}],"signatures":[{"id":416,"name":"publicDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":430,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":539,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L539"}],"signatures":[{"id":431,"name":"resolve","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":432,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":419,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":415,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L415"}],"signatures":[{"id":420,"name":"resolveResource","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":421,"name":"resourcePath","kind":32768,"kindString":"Parameter","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","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":417,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":395,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L395"}],"signatures":[{"id":418,"name":"resourceDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":422,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":438,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L438"}],"signatures":[{"id":423,"name":"runtimeDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":424,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":460,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L460"}],"signatures":[{"id":425,"name":"templateDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":426,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":482,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L482"}],"signatures":[{"id":427,"name":"videoDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"References","children":[1201]},{"title":"Variables","children":[429,428]},{"title":"Functions","children":[387,381,383,385,389,391,445,393,395,397,399,439,401,403,405,442,407,409,449,436,411,433,413,415,430,419,417,422,424,426]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/path.ts#L26"}]},{"id":452,"name":"process","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform operations on the current process.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.process`"},{"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":453,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/process.ts#L27"}],"signatures":[{"id":454,"name":"exit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits immediately with the given "},{"kind":"code","text":"`exitCode`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exit } from '@tauri-apps/api/process';\nawait exit(1);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":455,"name":"exitCode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The exit code to use."}]},"type":{"type":"intrinsic","name":"number"},"defaultValue":"0"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":456,"name":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/process.ts#L49"}],"signatures":[{"id":457,"name":"relaunch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits the current instance of the app then relaunches it."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { relaunch } from '@tauri-apps/api/process';\nawait relaunch();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[453,456]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/process.ts#L12"}]},{"id":458,"name":"shell","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the system shell.\nAllows you to spawn child processes and manage files and URLs using their default application.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.shell`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.shell`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.shell) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"shell\": {\n \"all\": true, // enable all shell APIs\n \"execute\": true, // enable process spawn APIs\n \"sidecar\": true, // enable spawning sidecars\n \"open\": true // enable opening files/URLs using the default program\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis API has a scope configuration that forces you to restrict the programs and arguments that can be used.\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`open`","target":664},{"kind":"text","text":" API\n\nOn the allowlist, "},{"kind":"code","text":"`open: true`"},{"kind":"text","text":" means that the "},{"kind":"inline-tag","tag":"@link","text":"open","target":664},{"kind":"text","text":" API can be used with any URL,\nas the argument is validated with the "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":" regex.\nYou can change that regex by changing the boolean value to a string, e.g. "},{"kind":"code","text":"`open: ^https://github.com/`"},{"kind":"text","text":".\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`Command`","target":459},{"kind":"text","text":" APIs\n\nThe "},{"kind":"code","text":"`shell`"},{"kind":"text","text":" allowlist object has a "},{"kind":"code","text":"`scope`"},{"kind":"text","text":" field that defines an array of CLIs that can be used.\nEach CLI is a configuration object "},{"kind":"code","text":"`{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`"},{"kind":"text","text":".\n\n- "},{"kind":"code","text":"`name`"},{"kind":"text","text":": the unique identifier of the command, passed to the "},{"kind":"inline-tag","tag":"@link","text":"Command.create function","target":460},{"kind":"text","text":".\nIf it's a sidecar, this must be the value defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > externalBin`"},{"kind":"text","text":".\n- "},{"kind":"code","text":"`cmd`"},{"kind":"text","text":": the program that is executed on this configuration. If it's a sidecar, this value is ignored.\n- "},{"kind":"code","text":"`sidecar`"},{"kind":"text","text":": whether the object configures a sidecar or a system program.\n- "},{"kind":"code","text":"`args`"},{"kind":"text","text":": the arguments that can be passed to the program. By default no arguments are allowed.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" means that any argument list is allowed.\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" means that no arguments are allowed.\n - otherwise an array can be configured. Each item is either a string representing the fixed argument value\n or a "},{"kind":"code","text":"`{ validator: string }`"},{"kind":"text","text":" that defines a regex validating the argument value.\n\n#### Example scope configuration\n\nCLI: "},{"kind":"code","text":"`git commit -m \"the commit message\"`"},{"kind":"text","text":"\n\nConfiguration:\n"},{"kind":"code","text":"```json\n{\n \"scope\": [\n {\n \"name\": \"run-git-commit\",\n \"cmd\": \"git\",\n \"args\": [\"commit\", \"-m\", { \"validator\": \"\\\\S+\" }]\n }\n ]\n}\n```"},{"kind":"text","text":"\nUsage:\n"},{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell'\nCommand.create('run-git-commit', ['commit', '-m', 'the commit message'])\n```"},{"kind":"text","text":"\n\nTrying to execute any API with a program not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":576,"name":"Child","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":577,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"shell.ts","line":346,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L346"}],"signatures":[{"id":578,"name":"new Child","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":579,"name":"pid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":576,"name":"Child"}}]},{"id":580,"name":"pid","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The child process "},{"kind":"code","text":"`pid`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":344,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L344"}],"type":{"type":"intrinsic","name":"number"}},{"id":584,"name":"kill","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L382"}],"signatures":[{"id":585,"name":"kill","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Kills the child process."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":581,"name":"write","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":365,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L365"}],"signatures":[{"id":582,"name":"write","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes "},{"kind":"code","text":"`data`"},{"kind":"text","text":" to the "},{"kind":"code","text":"`stdin`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\nconst child = await command.spawn();\nawait child.write('message');\nawait child.write([0, 1, 2, 3, 4, 5]);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":583,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to write, either a string or a byte array."}]},"type":{"type":"reference","id":668,"name":"IOPayload"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Constructors","children":[577]},{"title":"Properties","children":[580]},{"title":"Methods","children":[584,581]}],"sources":[{"fileName":"shell.ts","line":342,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L342"}]},{"id":459,"name":"Command","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The entry point for spawning child processes.\nIt emits the "},{"kind":"code","text":"`close`"},{"kind":"text","text":" and "},{"kind":"code","text":"`error`"},{"kind":"text","text":" events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\ncommand.on('close', data => {\n console.log(`command finished with code ${data.code} and signal ${data.signal}`)\n});\ncommand.on('error', error => console.error(`command error: \"${error}\"`));\ncommand.stdout.on('data', line => console.log(`command stdout: \"${line}\"`));\ncommand.stderr.on('data', line => console.log(`command stderr: \"${line}\"`));\n\nconst child = await command.spawn();\nconsole.log('pid:', child.pid);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":498,"name":"stderr","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":433,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L433"}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":675,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":497,"name":"stdout","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":431,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L431"}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":675,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":506,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":507,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":508,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":509,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":508,"name":"N"}},{"id":510,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":511,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":512,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":513,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":508,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":595,"name":"EventEmitter.addListener"}}],"inheritedFrom":{"type":"reference","id":594,"name":"EventEmitter.addListener"}},{"id":501,"name":"execute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L564"}],"signatures":[{"id":502,"name":"execute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, waiting for it to finish and collecting all of its output."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst output = await Command.create('echo', 'message').execute();\nassert(output.code === 0);\nassert(output.signal === null);\nassert(output.stdout === 'message');\nassert(output.stderr === '');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process output."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":678,"typeArguments":[{"type":"reference","name":"O"}],"name":"ChildProcess"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":555,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":556,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":557,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":558,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":557,"name":"N"}}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","id":644,"name":"EventEmitter.listenerCount"}}],"inheritedFrom":{"type":"reference","id":643,"name":"EventEmitter.listenerCount"}},{"id":538,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":539,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":540,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":541,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":540,"name":"N"}},{"id":542,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":543,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":544,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":545,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":540,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":627,"name":"EventEmitter.off"}}],"inheritedFrom":{"type":"reference","id":626,"name":"EventEmitter.off"}},{"id":522,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":523,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":524,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":525,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":524,"name":"N"}},{"id":526,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":527,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":528,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":529,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":524,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":611,"name":"EventEmitter.on"}}],"inheritedFrom":{"type":"reference","id":610,"name":"EventEmitter.on"}},{"id":530,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":531,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":532,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":533,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":532,"name":"N"}},{"id":534,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":535,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":536,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":537,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":532,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":619,"name":"EventEmitter.once"}}],"inheritedFrom":{"type":"reference","id":618,"name":"EventEmitter.once"}},{"id":559,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":560,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":561,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":562,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":561,"name":"N"}},{"id":563,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":564,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":565,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":566,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":561,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":648,"name":"EventEmitter.prependListener"}}],"inheritedFrom":{"type":"reference","id":647,"name":"EventEmitter.prependListener"}},{"id":567,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":568,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":569,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":570,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":569,"name":"N"}},{"id":571,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":572,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":573,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":574,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":569,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":656,"name":"EventEmitter.prependOnceListener"}}],"inheritedFrom":{"type":"reference","id":655,"name":"EventEmitter.prependOnceListener"}},{"id":546,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":547,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":548,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":549,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":548,"name":"N"}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":635,"name":"EventEmitter.removeAllListeners"}}],"inheritedFrom":{"type":"reference","id":634,"name":"EventEmitter.removeAllListeners"}},{"id":514,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":515,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":516,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":669,"name":"CommandEvents"}}}],"parameters":[{"id":517,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":516,"name":"N"}},{"id":518,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":519,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":520,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":521,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":516,"name":"N"},"objectType":{"type":"reference","id":669,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":603,"name":"EventEmitter.removeListener"}}],"inheritedFrom":{"type":"reference","id":602,"name":"EventEmitter.removeListener"}},{"id":499,"name":"spawn","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":526,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L526"}],"signatures":[{"id":500,"name":"spawn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, returning a handle to it."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process handle."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":576,"name":"Child"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":460,"name":"create","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":455,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L455"},{"fileName":"shell.ts","line":456,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L456"},{"fileName":"shell.ts","line":461,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L461"},{"fileName":"shell.ts","line":479,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L479"}],"signatures":[{"id":461,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":462,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":463,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":464,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":465,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":466,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":467,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":684,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":468,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":469,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":459,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L459"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[469]}],"sources":[{"fileName":"shell.ts","line":459,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L459"}]}}]}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":470,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":471,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":472,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":473,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":684,"name":"SpawnOptions"}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]},{"id":474,"name":"sidecar","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":487,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L487"},{"fileName":"shell.ts","line":488,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L488"},{"fileName":"shell.ts","line":493,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L493"},{"fileName":"shell.ts","line":511,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L511"}],"signatures":[{"id":475,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":476,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":477,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":478,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":479,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":480,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":481,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":684,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":482,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":483,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":491,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L491"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[483]}],"sources":[{"fileName":"shell.ts","line":491,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L491"}]}}]}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":484,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":485,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":486,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":487,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":684,"name":"SpawnOptions"}}],"type":{"type":"reference","id":459,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]}],"groups":[{"title":"Properties","children":[498,497]},{"title":"Methods","children":[506,501,555,538,522,530,559,567,546,514,499,460,474]}],"sources":[{"fileName":"shell.ts","line":423,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L423"}],"typeParameters":[{"id":575,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":668,"name":"IOPayload"}}],"extendedTypes":[{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":669,"name":"CommandEvents"}],"name":"EventEmitter"}]},{"id":586,"name":"EventEmitter","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":587,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":588,"name":"new EventEmitter","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":589,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":594,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":595,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":596,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":597,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":508,"name":"N"}},{"id":598,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":599,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":600,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":601,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":508,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":643,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":644,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":645,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":646,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":557,"name":"N"}}],"type":{"type":"intrinsic","name":"number"}}]},{"id":626,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":627,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":628,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":629,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":540,"name":"N"}},{"id":630,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":631,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":632,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":633,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":540,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":610,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":611,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":612,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":613,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":524,"name":"N"}},{"id":614,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":615,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":616,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":617,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":524,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":618,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":619,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":620,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":621,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":532,"name":"N"}},{"id":622,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":623,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":624,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":625,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":532,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":647,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":648,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":649,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":650,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":561,"name":"N"}},{"id":651,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":652,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":653,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":654,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":561,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":655,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":656,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":657,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":658,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":569,"name":"N"}},{"id":659,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":660,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":661,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":662,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":569,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":634,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":635,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":636,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":637,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":548,"name":"N"}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]},{"id":602,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":603,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":604,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":605,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":516,"name":"N"}},{"id":606,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":607,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":608,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":609,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":516,"name":"N"},"objectType":{"type":"reference","id":589,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":586,"typeArguments":[{"type":"reference","id":589,"name":"E"}],"name":"EventEmitter"}}]}],"groups":[{"title":"Constructors","children":[587]},{"title":"Methods","children":[594,643,626,610,618,647,655,634,602]}],"sources":[{"fileName":"shell.ts","line":153,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L153"}],"typeParameters":[{"id":663,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"extendedBy":[{"type":"reference","id":459,"name":"Command"}]},{"id":678,"name":"ChildProcess","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":679,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L109"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":680,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L111"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":682,"name":"stderr","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L115"}],"type":{"type":"reference","id":683,"name":"O"}},{"id":681,"name":"stdout","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L113"}],"type":{"type":"reference","id":683,"name":"O"}}],"groups":[{"title":"Properties","children":[679,680,682,681]}],"sources":[{"fileName":"shell.ts","line":107,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L107"}],"typeParameters":[{"id":683,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":668,"name":"IOPayload"}}]},{"id":669,"name":"CommandEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":670,"name":"close","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L394"}],"type":{"type":"reference","id":672,"name":"TerminatedPayload"}},{"id":671,"name":"error","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":395,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L395"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[670,671]}],"sources":[{"fileName":"shell.ts","line":393,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L393"}]},{"id":675,"name":"OutputEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":676,"name":"data","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":399,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L399"}],"type":{"type":"reference","id":677,"name":"O"}}],"groups":[{"title":"Properties","children":[676]}],"sources":[{"fileName":"shell.ts","line":398,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L398"}],"typeParameters":[{"id":677,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":668,"name":"IOPayload"}}]},{"id":684,"name":"SpawnOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":685,"name":"cwd","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Current working directory."}]},"sources":[{"fileName":"shell.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L88"}],"type":{"type":"intrinsic","name":"string"}},{"id":687,"name":"encoding","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Character encoding for stdout/stderr"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"sources":[{"fileName":"shell.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L96"}],"type":{"type":"intrinsic","name":"string"}},{"id":686,"name":"env","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Environment variables. set to "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to clear the process env."}]},"sources":[{"fileName":"shell.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"groups":[{"title":"Properties","children":[685,687,686]}],"sources":[{"fileName":"shell.ts","line":86,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L86"}]},{"id":672,"name":"TerminatedPayload","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Payload for the "},{"kind":"code","text":"`Terminated`"},{"kind":"text","text":" command event."}]},"children":[{"id":673,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":615,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L615"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":674,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":617,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L617"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Properties","children":[673,674]}],"sources":[{"fileName":"shell.ts","line":613,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L613"}]},{"id":668,"name":"IOPayload","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload type"}]},"sources":[{"fileName":"shell.ts","line":621,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L621"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}},{"id":664,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"shell.ts","line":656,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L656"}],"signatures":[{"id":665,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Opens a path or URL with the system's default app,\nor the one specified with "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":".\n\nThe "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":" value must be one of "},{"kind":"code","text":"`firefox`"},{"kind":"text","text":", "},{"kind":"code","text":"`google chrome`"},{"kind":"text","text":", "},{"kind":"code","text":"`chromium`"},{"kind":"text","text":" "},{"kind":"code","text":"`safari`"},{"kind":"text","text":",\n"},{"kind":"code","text":"`open`"},{"kind":"text","text":", "},{"kind":"code","text":"`start`"},{"kind":"text","text":", "},{"kind":"code","text":"`xdg-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`gio`"},{"kind":"text","text":", "},{"kind":"code","text":"`gnome-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`kde-open`"},{"kind":"text","text":" or "},{"kind":"code","text":"`wslview`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/shell';\n// opens the given URL on the default browser:\nawait open('https://github.com/tauri-apps/tauri');\n// opens the given URL using `firefox`:\nawait open('https://github.com/tauri-apps/tauri', 'firefox');\n// opens a file using the default program:\nawait open('/path/to/file');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":666,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path or URL to open.\nThis value is matched against the string regex defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > open`"},{"kind":"text","text":",\nwhich defaults to "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":667,"name":"openWith","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The app to open the file or URL with.\nDefaults to the system default application for the specified path type."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Classes","children":[576,459,586]},{"title":"Interfaces","children":[678,669,675,684,672]},{"title":"Type Aliases","children":[668]},{"title":"Functions","children":[664]}],"sources":[{"fileName":"shell.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/shell.ts#L80"}]},{"id":688,"name":"tauri","kind":2,"kindString":"Module","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":689,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":63,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L63"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":702,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":703,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":704,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":705,"name":"protocol","kind":32768,"kindString":"Parameter","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":697,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":698,"name":"invoke","kind":4096,"kindString":"Call signature","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"}]}]},"typeParameter":[{"id":699,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":700,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":701,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":689,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":699,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":690,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":691,"name":"transformCallback","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":692,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":693,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":694,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":695,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":696,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[689]},{"title":"Functions","children":[702,697,690]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/tauri.ts#L13"}]},{"id":706,"name":"updater","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Customize the auto updater flow.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.updater`"},{"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":711,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":714,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":713,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":712,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[714,713,712]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L31"}]},{"id":715,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":716,"name":"manifest","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":711,"name":"UpdateManifest"}},{"id":717,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[716,717]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L40"}]},{"id":708,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":709,"name":"error","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":710,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":707,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[709,710]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L23"}]},{"id":707,"name":"UpdateStatus","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"updater.ts","line":18,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L18"}],"type":{"type":"union","types":[{"type":"literal","value":"PENDING"},{"type":"literal","value":"ERROR"},{"type":"literal","value":"DONE"},{"type":"literal","value":"UPTODATE"}]}},{"id":726,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":727,"name":"checkUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if an update is available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\n// now run installUpdate() if needed\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Promise resolving to the update status."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":715,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":724,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":725,"name":"installUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Install the update if there's one available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate, installUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\nif (update.shouldUpdate) {\n console.log(`Installing update ${update.manifest?.version}, ${update.manifest?.date}, ${update.manifest.body}`);\n await installUpdate();\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":718,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":719,"name":"onUpdaterEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an updater event."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { onUpdaterEvent } from \"@tauri-apps/api/updater\";\nconst unlisten = await onUpdaterEvent(({ error, status }) => {\n console.log('Updater event', error, status);\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.2"}]}]},"parameters":[{"id":720,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":721,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":722,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":723,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":708,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[711,715,708]},{"title":"Type Aliases","children":[707]},{"title":"Functions","children":[726,724,718]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/updater.ts#L12"}]},{"id":728,"name":"window","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides APIs to create windows, communicate with other windows and manipulate the current window.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.window`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.window`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.window) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"window\": {\n \"all\": true, // enable all window APIs\n \"create\": true, // enable window creation\n \"center\": true,\n \"requestUserAttention\": true,\n \"setResizable\": true,\n \"setTitle\": true,\n \"maximize\": true,\n \"unmaximize\": true,\n \"minimize\": true,\n \"unminimize\": true,\n \"show\": true,\n \"hide\": true,\n \"close\": true,\n \"setDecorations\": true,\n \"setShadow\": true,\n \"setAlwaysOnTop\": true,\n \"setContentProtected\": true,\n \"setSize\": true,\n \"setMinSize\": true,\n \"setMaxSize\": true,\n \"setPosition\": true,\n \"setFullscreen\": true,\n \"setFocus\": true,\n \"setIcon\": true,\n \"setSkipTaskbar\": true,\n \"setCursorGrab\": true,\n \"setCursorVisible\": true,\n \"setCursorIcon\": true,\n \"setCursorPosition\": true,\n \"setIgnoreCursorEvents\": true,\n \"startDragging\": true,\n \"print\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Window events\n\nEvents can be listened to using "},{"kind":"code","text":"`appWindow.listen`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nappWindow.listen(\"my-window-event\", ({ event, payload }) => { });\n```"}]},"children":[{"id":1129,"name":"UserAttentionType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[{"kind":"text","text":"Attention type to request on a window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1130,"name":"Critical","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon until the application is in focus.\n- **Windows:** Flashes both the window and the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":226,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":1131,"name":"Informational","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon once.\n- **Windows:** Flashes the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":232,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[1130,1131]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L220"}]},{"id":1074,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":1075,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":1076,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1077,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1187,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":1074,"name":"CloseRequestedEvent"}}]},{"id":1081,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1961,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":1078,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1956,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":81,"name":"EventName"}},{"id":1080,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1960,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":1079,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1958,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":1084,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":1085,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":1082,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":1083,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[1075]},{"title":"Properties","children":[1081,1078,1080,1079]},{"title":"Methods","children":[1084,1082]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1954"}]},{"id":1110,"name":"LogicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1111,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L164"}],"signatures":[{"id":1112,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1113,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1114,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1110,"name":"LogicalPosition"}}]},{"id":1115,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":1116,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":1117,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[1111]},{"title":"Properties","children":[1115,1116,1117]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L159"}]},{"id":1091,"name":"LogicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1092,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L118"}],"signatures":[{"id":1093,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1094,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1095,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1091,"name":"LogicalSize"}}]},{"id":1098,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":1096,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":1097,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[1092]},{"title":"Properties","children":[1098,1096,1097]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L113"}]},{"id":1118,"name":"PhysicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1119,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L180"}],"signatures":[{"id":1120,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1121,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1122,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1118,"name":"PhysicalPosition"}}]},{"id":1123,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":1124,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":1125,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":1126,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L195"}],"signatures":[{"id":1127,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical position to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst position = await appWindow.innerPosition();\nconst logical = position.toLogical(factor);\n```"}]}]},"parameters":[{"id":1128,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1110,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[1119]},{"title":"Properties","children":[1123,1124,1125]},{"title":"Methods","children":[1126]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L175"}]},{"id":1099,"name":"PhysicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1100,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L134"}],"signatures":[{"id":1101,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1102,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1103,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1099,"name":"PhysicalSize"}}]},{"id":1106,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":1104,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":1105,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":1107,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L149"}],"signatures":[{"id":1108,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical size to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst size = await appWindow.innerSize();\nconst logical = size.toLogical(factor);\n```"}]}]},"parameters":[{"id":1109,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1091,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[1100]},{"title":"Properties","children":[1106,1104,1105]},{"title":"Methods","children":[1107]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L129"}]},{"id":731,"name":"WebviewWindow","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Create new webview windows and get a handle to existing ones.\n\nWindows are identified by a *label* a unique identifier that can be used to reference it later.\nIt may only contain alphanumeric characters "},{"kind":"code","text":"`a-zA-Z`"},{"kind":"text","text":" plus the following special 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":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\n// loading embedded asset:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'path/to/page.html'\n});\n// alternatively, load a remote URL:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'https://github.com/tauri-apps/tauri'\n});\n\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n\n// emit an event to the backend\nawait webview.emit(\"some event\", \"data\");\n// listen to an event from the backend\nconst unlisten = await webview.listen(\"event name\", e => {});\nunlisten();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":735,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":736,"name":"new WebviewWindow","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new WebviewWindow."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst webview = new WebviewWindow('my-label', {\n url: 'https://github.com/tauri-apps/tauri'\n});\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n```"},{"kind":"text","text":"\n\n*"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview."}]}]},"parameters":[{"id":737,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The unique webview window label. Must be alphanumeric: "},{"kind":"code","text":"`a-zA-Z-/:_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":738,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1157,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":731,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":871,"name":"label","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The window label. It is a unique identifier for the window, can be used to reference it later."}]},"sources":[{"fileName":"window.ts","line":316,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":872,"name":"listeners","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Local event listeners."}]},"sources":[{"fileName":"window.ts","line":318,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":1193,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":765,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L780"}],"signatures":[{"id":766,"name":"center","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Centers the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.center();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.center"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.center"}},{"id":790,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":791,"name":"close","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.close();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.close"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.close"}},{"id":883,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L400"}],"signatures":[{"id":884,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend, tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.emit('window-loaded', { loggedIn: true, token: 'authToken' });\n```"}]}]},"parameters":[{"id":885,"name":"event","kind":32768,"kindString":"Parameter","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":886,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Event payload."}]},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}},{"id":788,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":789,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to false."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.hide();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}},{"id":741,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L470"}],"signatures":[{"id":742,"name":"innerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.innerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1118,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}},{"id":745,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L521"}],"signatures":[{"id":746,"name":"innerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the window's client area.\nThe client area is the content of the window, excluding the title bar and borders."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.innerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1099,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}},{"id":755,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L647"}],"signatures":[{"id":756,"name":"isDecorated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current decorated state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst decorated = await appWindow.isDecorated();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is decorated or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}},{"id":749,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L572"}],"signatures":[{"id":750,"name":"isFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst fullscreen = await appWindow.isFullscreen();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}},{"id":753,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L622"}],"signatures":[{"id":754,"name":"isMaximized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst maximized = await appWindow.isMaximized();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is maximized or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}},{"id":751,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L597"}],"signatures":[{"id":752,"name":"isMinimized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current minimized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst minimized = await appWindow.isMinimized();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}},{"id":757,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L672"}],"signatures":[{"id":758,"name":"isResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current resizable state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst resizable = await appWindow.isResizable();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is resizable or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}},{"id":759,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L697"}],"signatures":[{"id":760,"name":"isVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current visible state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst visible = await appWindow.isVisible();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is visible or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}},{"id":873,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L345"}],"signatures":[{"id":874,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.listen('state-changed', (event) => {\n console.log(`Got error: ${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."}]}]},"typeParameter":[{"id":875,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":876,"name":"event","kind":32768,"kindString":"Parameter","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","id":81,"name":"EventName"}},{"id":877,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":875,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}},{"id":776,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L906"}],"signatures":[{"id":777,"name":"maximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Maximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.maximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}},{"id":782,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L981"}],"signatures":[{"id":783,"name":"minimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Minimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.minimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}},{"id":850,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":851,"name":"onCloseRequested","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window close requested. Emitted when the user requests to closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nimport { confirm } from '@tauri-apps/api/dialog';\nconst unlisten = await appWindow.onCloseRequested(async (event) => {\n const confirmed = await confirm('Are you sure?');\n if (!confirmed) {\n // user did not confirm closing the window; let's prevent it\n event.preventDefault();\n }\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.2"}]}]},"parameters":[{"id":852,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":853,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":854,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":855,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1074,"name":"CloseRequestedEvent"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}]}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}},{"id":865,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":866,"name":"onFileDropEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to a file drop event.\nThe listener is triggered when the user hovers the selected files on the window,\ndrops the files or cancels the operation."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFileDropEvent((event) => {\n if (event.payload.type === 'hover') {\n console.log('User hovering', event.payload.paths);\n } else if (event.payload.type === 'drop') {\n console.log('User dropped', event.payload.paths);\n } else {\n console.log('File drop cancelled');\n }\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.2"}]}]},"parameters":[{"id":867,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":1148,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}},{"id":856,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":857,"name":"onFocusChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window focus change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFocusChanged(({ payload: focused }) => {\n console.log('Focus changed, window is focused? ' + focused);\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.2"}]}]},"parameters":[{"id":858,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}},{"id":862,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":863,"name":"onMenuClicked","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the window menu item click. The payload is the item id."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMenuClicked(({ payload: menuId }) => {\n console.log('Menu clicked: ' + menuId);\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.2"}]}]},"parameters":[{"id":864,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}},{"id":847,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":848,"name":"onMoved","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window move."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMoved(({ payload: position }) => {\n console.log('Window moved', position);\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.2"}]}]},"parameters":[{"id":849,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":1118,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}},{"id":844,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":845,"name":"onResized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window resize."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onResized(({ payload: size }) => {\n console.log('Window resized', size);\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.2"}]}]},"parameters":[{"id":846,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":1099,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}},{"id":859,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":860,"name":"onScaleChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window scale change. Emitted when the window's scale factor has changed.\nThe following user actions can cause DPI changes:\n- Changing the display's resolution.\n- Changing the display's scale factor (e.g. in Control Panel on Windows).\n- Moving the window to a display with a different scale factor."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onScaleChanged(({ payload }) => {\n console.log('Scale changed', payload.scaleFactor, payload.size);\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.2"}]}]},"parameters":[{"id":861,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":1145,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}},{"id":868,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":869,"name":"onThemeChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the system theme change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onThemeChanged(({ payload: theme }) => {\n console.log('New theme: ' + theme);\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.2"}]}]},"parameters":[{"id":870,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":1138,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}},{"id":878,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L378"}],"signatures":[{"id":879,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.once('initialized', (event) => {\n console.log(`Window initialized!`);\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."}]}]},"typeParameter":[{"id":880,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":881,"name":"event","kind":32768,"kindString":"Parameter","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":882,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1193,"typeArguments":[{"type":"reference","id":880,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1198,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.once"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.once"}},{"id":743,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L495"}],"signatures":[{"id":744,"name":"outerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.outerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1118,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}},{"id":747,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L547"}],"signatures":[{"id":748,"name":"outerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the entire window.\nThese dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.outerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1099,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}},{"id":767,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L816"}],"signatures":[{"id":768,"name":"requestUserAttention","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests user attention to the window, this has no effect if the application\nis already focused. How requesting for user attention manifests is platform dependent,\nsee "},{"kind":"code","text":"`UserAttentionType`"},{"kind":"text","text":" for details.\n\nProviding "},{"kind":"code","text":"`null`"},{"kind":"text","text":" will unset the request for user attention. Unsetting the request for\nuser attention might not be done automatically by the WM when the window receives input.\n\n#### Platform-specific\n\n- **macOS:** "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect.\n- **Linux:** Urgency levels have the same effect."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.requestUserAttention();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":769,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":1129,"name":"UserAttentionType"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}},{"id":739,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L445"}],"signatures":[{"id":740,"name":"scaleFactor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's monitor scale factor."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}},{"id":798,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":799,"name":"setAlwaysOnTop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setAlwaysOnTop(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":800,"name":"alwaysOnTop","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}},{"id":801,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":802,"name":"setContentProtected","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setContentProtected(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"parameters":[{"id":803,"name":"protected_","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}},{"id":827,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":828,"name":"setCursorGrab","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Grabs the cursor, preventing it from leaving the window.\n\nThere's no guarantee that the cursor will be hidden. You should\nhide it by yourself if you want so.\n\n#### Platform-specific\n\n- **Linux:** Unsupported.\n- **macOS:** This locks the cursor in a fixed location, which looks visually awkward."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorGrab(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":829,"name":"grab","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to grab the cursor icon, "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to release it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}},{"id":833,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":834,"name":"setCursorIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor icon of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorIcon('help');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":835,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":729,"name":"CursorIcon"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}},{"id":836,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":837,"name":"setCursorPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the position of the cursor in window coordinates."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setCursorPosition(new LogicalPosition(600, 300));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":838,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":1118,"name":"PhysicalPosition"},{"type":"reference","id":1110,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}},{"id":830,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":831,"name":"setCursorVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor's visibility.\n\n#### Platform-specific\n\n- **Windows:** The cursor is only hidden within the confines of the window.\n- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is\n outside of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorVisible(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":832,"name":"visible","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`false`"},{"kind":"text","text":", this will hide the cursor. If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", this will show the cursor."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}},{"id":792,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":793,"name":"setDecorations","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setDecorations(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":794,"name":"decorations","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}},{"id":819,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":820,"name":"setFocus","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Bring the window to front and focus."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFocus();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}},{"id":816,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":817,"name":"setFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFullscreen(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":818,"name":"fullscreen","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should go to fullscreen or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}},{"id":821,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":822,"name":"setIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window icon."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIcon('/tauri/awesome.png');\n```"},{"kind":"text","text":"\n\nNote that you need the "},{"kind":"code","text":"`icon-ico`"},{"kind":"text","text":" or "},{"kind":"code","text":"`icon-png`"},{"kind":"text","text":" Cargo features to use this API.\nTo enable it, change your Cargo.toml file:\n"},{"kind":"code","text":"```toml\n[dependencies]\ntauri = { version = \"...\", features = [\"...\", \"icon-png\"] }\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":823,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Icon bytes or path to the icon file."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}},{"id":839,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":840,"name":"setIgnoreCursorEvents","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the cursor events behavior."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIgnoreCursorEvents(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":841,"name":"ignore","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to ignore the cursor events; "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to process them as usual."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}},{"id":810,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":811,"name":"setMaxSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window maximum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is undefined, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMaxSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":812,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":1099,"name":"PhysicalSize"},{"type":"reference","id":1091,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}},{"id":807,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":808,"name":"setMinSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window minimum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is not provided, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, PhysicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMinSize(new PhysicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":809,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":1099,"name":"PhysicalSize"},{"type":"reference","id":1091,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}},{"id":813,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":814,"name":"setPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window outer position."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setPosition(new LogicalPosition(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":815,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new position, in logical or physical pixels."}]},"type":{"type":"union","types":[{"type":"reference","id":1118,"name":"PhysicalPosition"},{"type":"reference","id":1110,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}},{"id":770,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L853"}],"signatures":[{"id":771,"name":"setResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Updates the window resizable flag."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setResizable(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":772,"name":"resizable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}},{"id":795,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":796,"name":"setShadow","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether or not the window should have shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setShadow(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"parameters":[{"id":797,"name":"enable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}},{"id":804,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":805,"name":"setSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resizes the window with a new inner size."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":806,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size."}]},"type":{"type":"union","types":[{"type":"reference","id":1099,"name":"PhysicalSize"},{"type":"reference","id":1091,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}},{"id":824,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":825,"name":"setSkipTaskbar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window icon should be hidden from the taskbar or not.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setSkipTaskbar(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":826,"name":"skip","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"true to hide window icon, false to show it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}},{"id":773,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L880"}],"signatures":[{"id":774,"name":"setTitle","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setTitle('Tauri');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":775,"name":"title","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new title"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}},{"id":786,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":787,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to true."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.show();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.show"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.show"}},{"id":842,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":843,"name":"startDragging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Starts dragging the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.startDragging();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}},{"id":763,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L752"}],"signatures":[{"id":764,"name":"theme","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current theme.\n\n#### Platform-specific\n\n- **macOS:** Theme was introduced on macOS 10.14. Returns "},{"kind":"code","text":"`light`"},{"kind":"text","text":" on macOS 10.13 and below."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst theme = await appWindow.theme();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window theme."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":1138,"name":"Theme"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}},{"id":761,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L722"}],"signatures":[{"id":762,"name":"title","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst title = await appWindow.title();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.title"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.title"}},{"id":780,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L956"}],"signatures":[{"id":781,"name":"toggleMaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Toggles the window maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.toggleMaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}},{"id":778,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L931"}],"signatures":[{"id":779,"name":"unmaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unmaximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unmaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}},{"id":784,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":785,"name":"unminimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unminimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unminimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}},{"id":732,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2063,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":733,"name":"getByLabel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the WebviewWindow for the webview associated with the given label."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst mainWindow = WebviewWindow.getByLabel('main');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist."}]}]},"parameters":[{"id":734,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The webview window label."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":731,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[735]},{"title":"Properties","children":[871,872]},{"title":"Methods","children":[765,790,883,788,741,745,755,749,753,751,757,759,873,776,782,850,865,856,862,847,844,859,868,878,743,747,767,739,798,801,827,833,836,830,792,819,816,821,839,810,807,813,770,795,804,824,773,786,842,763,761,780,778,784,732]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":1140,"name":"Monitor","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Allows you to retrieve information about a given monitor."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1141,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Human-readable name of the monitor"}]},"sources":[{"fileName":"window.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":1143,"name":"position","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"the Top-left corner position of the monitor relative to the larger full screen area."}]},"sources":[{"fileName":"window.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":1118,"name":"PhysicalPosition"}},{"id":1144,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}]},"sources":[{"fileName":"window.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":1142,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The monitor's resolution."}]},"sources":[{"fileName":"window.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":1099,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1141,1143,1144,1142]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L79"}]},{"id":1145,"name":"ScaleFactorChanged","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"The payload for the "},{"kind":"code","text":"`scaleChange`"},{"kind":"text","text":" event."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":1146,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window scale factor."}]},"sources":[{"fileName":"window.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":1147,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window size"}]},"sources":[{"fileName":"window.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":1099,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1146,1147]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L95"}]},{"id":1157,"name":"WindowOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Configuration for the window to create."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1184,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1176,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1159,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1177,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1175,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1180,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1171,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1170,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1163,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":1183,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1167,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":1166,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":1173,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1165,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":1164,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":1168,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1179,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1178,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1185,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2194,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":1181,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2175,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":1138,"name":"Theme"}},{"id":1169,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":1182,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2179,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":1139,"name":"TitleBarStyle"}},{"id":1172,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1158,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":1186,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2198,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":1174,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1162,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":1160,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":1161,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[1184,1176,1159,1177,1175,1180,1171,1170,1163,1183,1167,1166,1173,1165,1164,1168,1179,1178,1185,1181,1169,1182,1172,1158,1186,1174,1162,1160,1161]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2097"}]},{"id":729,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L235"}],"type":{"type":"union","types":[{"type":"literal","value":"default"},{"type":"literal","value":"crosshair"},{"type":"literal","value":"hand"},{"type":"literal","value":"arrow"},{"type":"literal","value":"move"},{"type":"literal","value":"text"},{"type":"literal","value":"wait"},{"type":"literal","value":"help"},{"type":"literal","value":"progress"},{"type":"literal","value":"notAllowed"},{"type":"literal","value":"contextMenu"},{"type":"literal","value":"cell"},{"type":"literal","value":"verticalText"},{"type":"literal","value":"alias"},{"type":"literal","value":"copy"},{"type":"literal","value":"noDrop"},{"type":"literal","value":"grab"},{"type":"literal","value":"grabbing"},{"type":"literal","value":"allScroll"},{"type":"literal","value":"zoomIn"},{"type":"literal","value":"zoomOut"},{"type":"literal","value":"eResize"},{"type":"literal","value":"nResize"},{"type":"literal","value":"neResize"},{"type":"literal","value":"nwResize"},{"type":"literal","value":"sResize"},{"type":"literal","value":"seResize"},{"type":"literal","value":"swResize"},{"type":"literal","value":"wResize"},{"type":"literal","value":"ewResize"},{"type":"literal","value":"nsResize"},{"type":"literal","value":"neswResize"},{"type":"literal","value":"nwseResize"},{"type":"literal","value":"colResize"},{"type":"literal","value":"rowResize"}]}},{"id":1148,"name":"FileDropEvent","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The file drop event types."}]},"sources":[{"fileName":"window.ts","line":103,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":1149,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1151,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1150,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[1151,1150]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":1152,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1154,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1153,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[1154,1153]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":1155,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1156,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[1156]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L106"}]}}]}},{"id":1138,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":1139,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":1090,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2073,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":731,"name":"WebviewWindow"}},{"id":1136,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":1137,"name":"availableMonitors","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the list of all the monitors available on the system."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { availableMonitors } from '@tauri-apps/api/window';\nconst monitors = availableMonitors();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":1140,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":1132,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":1133,"name":"currentMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the monitor on which the window currently resides.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if current monitor can't be detected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { currentMonitor } from '@tauri-apps/api/window';\nconst monitor = currentMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":1140,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":1088,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L293"}],"signatures":[{"id":1089,"name":"getAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets a list of instances of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for all available webview windows."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"array","elementType":{"type":"reference","id":731,"name":"WebviewWindow"}}}]},{"id":1086,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L281"}],"signatures":[{"id":1087,"name":"getCurrent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Get an instance of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for the current webview window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","id":731,"name":"WebviewWindow"}}]},{"id":1134,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":1135,"name":"primaryMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the primary monitor of the system.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if it can't identify any monitor as a primary one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { primaryMonitor } from '@tauri-apps/api/window';\nconst monitor = primaryMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":1140,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[1129]},{"title":"Classes","children":[1074,1110,1091,1118,1099,731]},{"title":"Interfaces","children":[1140,1145,1157]},{"title":"Type Aliases","children":[729,1148,1138,1139]},{"title":"Variables","children":[1090]},{"title":"Functions","children":[1136,1132,1088,1086,1134]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9464d1ab5/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,24,30,80,115,212,233,338,352,365,380,452,458,688,706,728]}]} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"app","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Get application metadata.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.app`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.app`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.app) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"app\": {\n \"all\": true, // enable all app APIs\n \"show\": true,\n \"hide\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":2,"name":"getName","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":60,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L60"}],"signatures":[{"id":3,"name":"getName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application name."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getName } from '@tauri-apps/api/app';\nconst appName = await getName();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":6,"name":"getTauriVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":80,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L80"}],"signatures":[{"id":7,"name":"getTauriVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the Tauri version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getTauriVersion } from '@tauri-apps/api/app';\nconst tauriVersion = await getTauriVersion();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":4,"name":"getVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L41"}],"signatures":[{"id":5,"name":"getVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getVersion } from '@tauri-apps/api/app';\nconst appVersion = await getVersion();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":10,"name":"hide","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":120,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L120"}],"signatures":[{"id":11,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Hides the application on macOS."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { hide } from '@tauri-apps/api/app';\nawait hide();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":8,"name":"show","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L100"}],"signatures":[{"id":9,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows the application on macOS. This function does not automatically focus any specific app window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { show } from '@tauri-apps/api/app';\nawait show();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[2,6,4,10,8]}],"sources":[{"fileName":"app.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/app.ts#L29"}]},{"id":12,"name":"clipboard","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Read and write to the system clipboard.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.clipboard`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.clipboard`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.clipboard) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"clipboard\": {\n \"all\": true, // enable all Clipboard APIs\n \"writeText\": true,\n \"readText\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":16,"name":"readText","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"clipboard.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/clipboard.ts#L63"}],"signatures":[{"id":17,"name":"readText","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the clipboard content as plain text."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readText } from '@tauri-apps/api/clipboard';\nconst clipboardText = await readText();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":13,"name":"writeText","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"clipboard.ts","line":44,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/clipboard.ts#L44"}],"signatures":[{"id":14,"name":"writeText","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes plain text to the clipboard."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeText, readText } from '@tauri-apps/api/clipboard';\nawait writeText('Tauri is awesome!');\nassert(await readText(), 'Tauri is awesome!');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0."}]}]},"parameters":[{"id":15,"name":"text","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[16,13]}],"sources":[{"fileName":"clipboard.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/clipboard.ts#L29"}]},{"id":18,"name":"dialog","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Native system dialogs for opening and saving files.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.dialog`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.dialog`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.dialog) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"dialog\": {\n \"all\": true, // enable all dialog APIs\n \"ask\": true, // enable dialog ask API\n \"confirm\": true, // enable dialog confirm API\n \"message\": true, // enable dialog message API\n \"open\": true, // enable file open API\n \"save\": true // enable file save API\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":37,"name":"ConfirmDialogOptions","kind":256,"kindString":"Interface","flags":{},"children":[{"id":41,"name":"cancelLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the cancel button."}]},"sources":[{"fileName":"dialog.ts","line":112,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L112"}],"type":{"type":"intrinsic","name":"string"}},{"id":40,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":110,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L110"}],"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":106,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L106"}],"type":{"type":"intrinsic","name":"string"}},{"id":39,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":108,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L108"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[41,40,38,39]}],"sources":[{"fileName":"dialog.ts","line":104,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L104"}]},{"id":19,"name":"DialogFilter","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Extension filters for the file dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":21,"name":"extensions","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Extensions to filter, without a "},{"kind":"code","text":"`.`"},{"kind":"text","text":" prefix."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nextensions: ['svg', 'png']\n```"}]}]},"sources":[{"fileName":"dialog.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L48"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":20,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Filter name."}]},"sources":[{"fileName":"dialog.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[21,20]}],"sources":[{"fileName":"dialog.ts","line":38,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L38"}]},{"id":33,"name":"MessageDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":36,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L101"}],"type":{"type":"intrinsic","name":"string"}},{"id":34,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L97"}],"type":{"type":"intrinsic","name":"string"}},{"id":35,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L99"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[36,34,35]}],"sources":[{"fileName":"dialog.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L95"}]},{"id":22,"name":"OpenDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the open dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":25,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path."}]},"sources":[{"fileName":"dialog.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L62"}],"type":{"type":"intrinsic","name":"string"}},{"id":27,"name":"directory","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog is a directory selection or not."}]},"sources":[{"fileName":"dialog.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L66"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":24,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L60"}],"type":{"type":"array","elementType":{"type":"reference","id":19,"name":"DialogFilter"}}},{"id":26,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog allows multiple selection or not."}]},"sources":[{"fileName":"dialog.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L64"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":28,"name":"recursive","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`directory`"},{"kind":"text","text":" is true, indicates that it will be read recursively later.\nDefines whether subdirectories will be allowed on the scope or not."}]},"sources":[{"fileName":"dialog.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L71"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":23,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L58"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[25,27,24,26,28,23]}],"sources":[{"fileName":"dialog.ts","line":56,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L56"}]},{"id":29,"name":"SaveDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the save dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":32,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path.\nIf it's a directory path, the dialog interface will change to that folder.\nIf it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder."}]},"sources":[{"fileName":"dialog.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L89"}],"type":{"type":"intrinsic","name":"string"}},{"id":31,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L83"}],"type":{"type":"array","elementType":{"type":"reference","id":19,"name":"DialogFilter"}}},{"id":30,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L81"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[32,31,30]}],"sources":[{"fileName":"dialog.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L79"}]},{"id":60,"name":"ask","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":257,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L257"}],"signatures":[{"id":61,"name":"ask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" and "},{"kind":"code","text":"`No`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { ask } from '@tauri-apps/api/dialog';\nconst yes = await ask('Are you sure?', 'Tauri');\nconst yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":62,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":63,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":37,"name":"ConfirmDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":64,"name":"confirm","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":293,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L293"}],"signatures":[{"id":65,"name":"confirm","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" and "},{"kind":"code","text":"`Cancel`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { confirm } from '@tauri-apps/api/dialog';\nconst confirmed = await confirm('Are you sure?', 'Tauri');\nconst confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":66,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":67,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":37,"name":"ConfirmDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":56,"name":"message","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":224,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L224"}],"signatures":[{"id":57,"name":"message","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a message dialog with an "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" button."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { message } from '@tauri-apps/api/dialog';\nawait message('Tauri is awesome', 'Tauri');\nawait message('File not found', { title: 'Tauri', type: 'error' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":58,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":59,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":33,"name":"MessageDialogOptions"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":42,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":144,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L144"},{"fileName":"dialog.ts","line":147,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L147"},{"fileName":"dialog.ts","line":150,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L150"},{"fileName":"dialog.ts","line":153,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L153"}],"signatures":[{"id":43,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory selection dialog.\n\nThe selected paths are added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/dialog';\n// Open a selection dialog for image files\nconst selected = await open({\n multiple: true,\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"},{"kind":"text","text":"\nNote that the "},{"kind":"code","text":"`open`"},{"kind":"text","text":" function returns a conditional type depending on the "},{"kind":"code","text":"`multiple`"},{"kind":"text","text":" option:\n- false (default) -> "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":"\n- true -> "},{"kind":"code","text":"`Promise`"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path(s)"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":44,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":22,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":45,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":46,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":145,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L145"}],"type":{"type":"literal","value":false}}],"groups":[{"title":"Properties","children":[46]}],"sources":[{"fileName":"dialog.ts","line":145,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L145"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":47,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":48,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":22,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":49,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":50,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":148,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L148"}],"type":{"type":"literal","value":true}}],"groups":[{"title":"Properties","children":[50]}],"sources":[{"fileName":"dialog.ts","line":148,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L148"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":51,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":52,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":22,"name":"OpenDialogOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"type":"intrinsic","name":"string"}},{"type":"intrinsic","name":"string"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":53,"name":"save","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":193,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L193"}],"signatures":[{"id":54,"name":"save","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory save dialog.\n\nThe selected path is added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { save } from '@tauri-apps/api/dialog';\nconst filePath = await save({\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":55,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":29,"name":"SaveDialogOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[37,19,33,22,29]},{"title":"Functions","children":[60,64,56,42,53]}],"sources":[{"fileName":"dialog.ts","line":31,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/dialog.ts#L31"}]},{"id":68,"name":"event","kind":2,"kindString":"Module","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":70,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":84,"name":"CHECK_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":88,"name":"DOWNLOAD_PROGRESS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":86,"name":"INSTALL_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":83,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":87,"name":"STATUS_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":85,"name":"UPDATE_AVAILABLE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":77,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":73,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":74,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":75,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":80,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":82,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":81,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":76,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":72,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":71,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":78,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":79,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[84,88,86,83,87,85,77,73,74,75,80,82,81,76,72,71,78,79]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L20"}]},{"id":1175,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":1176,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":69,"name":"EventName"}},{"id":1178,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":1179,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":1180,"name":"T"}},{"id":1177,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[1176,1178,1179,1177]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":1180,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":1181,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":1185,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":1182,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":1183,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":1184,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1175,"typeArguments":[{"type":"reference","id":1185,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":69,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":70,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":1186,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":1187,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":1188,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":99,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L112"}],"signatures":[{"id":100,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"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"}]}]},"parameters":[{"id":101,"name":"event","kind":32768,"kindString":"Parameter","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":102,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":89,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L62"}],"signatures":[{"id":90,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"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"}]}]},"typeParameter":[{"id":91,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":92,"name":"event","kind":32768,"kindString":"Parameter","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","id":69,"name":"EventName"}},{"id":93,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":91,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L93"}],"signatures":[{"id":95,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"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"}]}]},"typeParameter":[{"id":96,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":97,"name":"event","kind":32768,"kindString":"Parameter","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","id":69,"name":"EventName"}},{"id":98,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":96,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[70]},{"title":"Interfaces","children":[1175]},{"title":"Type Aliases","children":[1181,69,1186]},{"title":"Functions","children":[99,89,94]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/event.ts#L12"}]},{"id":103,"name":"fs","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the file system.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.fs`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.fs`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.fs) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"fs\": {\n \"all\": true, // enable all FS APIs\n \"readFile\": true,\n \"writeFile\": true,\n \"readDir\": true,\n \"copyFile\": true,\n \"createDir\": true,\n \"removeDir\": true,\n \"removeFile\": true,\n \"renameFile\": true,\n \"exists\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis module prevents path traversal, not allowing absolute paths or parent dir components\n(i.e. \"/usr/path/to/file\" or \"../path/to/file\" paths are not allowed).\nPaths accessed with this API must be relative to one of the "},{"kind":"inline-tag","tag":"@link","text":"base directories","target":104},{"kind":"text","text":"\nso if you need access to arbitrary filesystem paths, you must write such logic on the core layer instead.\n\nThe API has a scope configuration that forces you to restrict the paths that can be accessed using glob patterns.\n\nThe scope configuration is an array of glob patterns describing folder paths that are allowed.\nFor instance, this scope configuration only allows accessing files on the\n*databases* folder of the "},{"kind":"inline-tag","tag":"@link","text":"$APPDATA directory","target":371},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"fs\": {\n \"scope\": [\"$APPDATA/databases/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\n\nNotice the use of the "},{"kind":"code","text":"`$APPDATA`"},{"kind":"text","text":" variable. The value is injected at runtime, resolving to the "},{"kind":"inline-tag","tag":"@link","text":"app data directory","target":371},{"kind":"text","text":".\nThe available variables are:\n"},{"kind":"inline-tag","tag":"@link","text":"`$APPCONFIG`","target":369},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPDATA`","target":371},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPLOCALDATA`","target":373},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$APPCACHE`","target":375},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$APPLOG`","target":377},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$AUDIO`","target":379},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$CACHE`","target":381},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$CONFIG`","target":383},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DATA`","target":385},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$LOCALDATA`","target":399},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DESKTOP`","target":387},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$DOCUMENT`","target":389},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$DOWNLOAD`","target":391},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$EXE`","target":393},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$FONT`","target":395},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$HOME`","target":397},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$PICTURE`","target":401},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$PUBLIC`","target":403},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$RUNTIME`","target":410},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$TEMPLATE`","target":412},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$VIDEO`","target":414},{"kind":"text","text":", "},{"kind":"inline-tag","tag":"@link","text":"`$RESOURCE`","target":405},{"kind":"text","text":",\n"},{"kind":"inline-tag","tag":"@link","text":"`$TEMP`","target":363},{"kind":"text","text":".\n\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access.\n\nNote that this scope applies to **all** APIs on this module."}]},"children":[{"id":144,"name":"Dir","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"fs.ts","line":592,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L592"}],"target":104},{"id":161,"name":"writeFile","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"fs.ts","line":596,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L596"}],"target":153},{"id":104,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":120,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L96"}],"type":{"type":"literal","value":16}},{"id":117,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L93"}],"type":{"type":"literal","value":13}},{"id":118,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L94"}],"type":{"type":"literal","value":14}},{"id":119,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L95"}],"type":{"type":"literal","value":15}},{"id":121,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L97"}],"type":{"type":"literal","value":17}},{"id":105,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L81"}],"type":{"type":"literal","value":1}},{"id":106,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L82"}],"type":{"type":"literal","value":2}},{"id":107,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L83"}],"type":{"type":"literal","value":3}},{"id":108,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":84,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L84"}],"type":{"type":"literal","value":4}},{"id":122,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L99"}],"type":{"type":"literal","value":18}},{"id":110,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":86,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L86"}],"type":{"type":"literal","value":6}},{"id":111,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L87"}],"type":{"type":"literal","value":7}},{"id":123,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":100,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L100"}],"type":{"type":"literal","value":19}},{"id":124,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L101"}],"type":{"type":"literal","value":20}},{"id":125,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":102,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L102"}],"type":{"type":"literal","value":21}},{"id":109,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L85"}],"type":{"type":"literal","value":5}},{"id":112,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L88"}],"type":{"type":"literal","value":8}},{"id":113,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L89"}],"type":{"type":"literal","value":9}},{"id":115,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L91"}],"type":{"type":"literal","value":11}},{"id":126,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":103,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L103"}],"type":{"type":"literal","value":22}},{"id":116,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":92,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L92"}],"type":{"type":"literal","value":12}},{"id":127,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":104,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L104"}],"type":{"type":"literal","value":23}},{"id":114,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"fs.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L90"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[120,117,118,119,121,105,106,107,108,122,110,111,123,124,125,109,112,113,115,126,116,127,114]}],"sources":[{"fileName":"fs.ts","line":80,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L80"}]},{"id":140,"name":"FileEntry","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":143,"name":"children","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Children of this entry if it's a directory; null otherwise"}]},"sources":[{"fileName":"fs.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L160"}],"type":{"type":"array","elementType":{"type":"reference","id":140,"name":"FileEntry"}}},{"id":142,"name":"name","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Name of the directory/file\ncan be null if the path terminates with "},{"kind":"code","text":"`..`"}]},"sources":[{"fileName":"fs.ts","line":158,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L158"}],"type":{"type":"intrinsic","name":"string"}},{"id":141,"name":"path","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"fs.ts","line":153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L153"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[143,142,141]}],"sources":[{"fileName":"fs.ts","line":152,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L152"}]},{"id":137,"name":"FsBinaryFileOption","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object used to write a binary data to a file."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":139,"name":"contents","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The byte array contents."}]},"sources":[{"fileName":"fs.ts","line":146,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L146"}],"type":{"type":"reference","id":136,"name":"BinaryFileContents"}},{"id":138,"name":"path","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Path to the file to write."}]},"sources":[{"fileName":"fs.ts","line":144,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L144"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[139,138]}],"sources":[{"fileName":"fs.ts","line":142,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L142"}]},{"id":130,"name":"FsDirOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":131,"name":"dir","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L119"}],"type":{"type":"reference","id":104,"name":"BaseDirectory"}},{"id":132,"name":"recursive","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":120,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L120"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[131,132]}],"sources":[{"fileName":"fs.ts","line":118,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L118"}]},{"id":128,"name":"FsOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":129,"name":"dir","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"fs.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L111"}],"type":{"type":"reference","id":104,"name":"BaseDirectory"}}],"groups":[{"title":"Properties","children":[129]}],"sources":[{"fileName":"fs.ts","line":110,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L110"}]},{"id":133,"name":"FsTextFileOption","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object used to write a UTF-8 string to a file."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":135,"name":"contents","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The UTF-8 string to write to the file."}]},"sources":[{"fileName":"fs.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L132"}],"type":{"type":"intrinsic","name":"string"}},{"id":134,"name":"path","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Path to the file to write."}]},"sources":[{"fileName":"fs.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L130"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[135,134]}],"sources":[{"fileName":"fs.ts","line":128,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L128"}]},{"id":136,"name":"BinaryFileContents","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"fs.ts","line":135,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L135"}],"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"}]}},{"id":182,"name":"copyFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":488,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L488"}],"signatures":[{"id":183,"name":"copyFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Copies a file to a destination."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { copyFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Copy the `$APPCONFIG/app.conf` file to `$APPCONFIG/app.conf.bk`\nawait copyFile('app.conf', 'app.conf.bk', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":184,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":185,"name":"destination","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":186,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":174,"name":"createDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":433,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L433"}],"signatures":[{"id":175,"name":"createDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a directory.\nIf one of the path's parent components doesn't exist\nand the "},{"kind":"code","text":"`recursive`"},{"kind":"text","text":" option isn't set to true, the promise will be rejected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { createDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Create the `$APPDATA/users` directory\nawait createDir('users', { dir: BaseDirectory.AppData, recursive: true });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":176,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":177,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":130,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":196,"name":"exists","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":571,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L571"}],"signatures":[{"id":197,"name":"exists","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Check if a path exists."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exists, BaseDirectory } from '@tauri-apps/api/fs';\n// Check if the `$APPDATA/avatar.png` file exists\nawait exists('avatar.png', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"parameters":[{"id":198,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":199,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":149,"name":"readBinaryFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":199,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L199"}],"signatures":[{"id":150,"name":"readBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Reads a file as byte array."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Read the image file in the `$RESOURCEDIR/avatar.png` path\nconst contents = await readBinaryFile('avatar.png', { dir: BaseDirectory.Resource });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":151,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":152,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":170,"name":"readDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":404,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L404"}],"signatures":[{"id":171,"name":"readDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"List directory files."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Reads the `$APPDATA/users` directory recursively\nconst entries = await readDir('users', { dir: BaseDirectory.AppData, recursive: true });\n\nfunction processEntries(entries) {\n for (const entry of entries) {\n console.log(`Entry: ${entry.path}`);\n if (entry.children) {\n processEntries(entry.children)\n }\n }\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":172,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":173,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":130,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":140,"name":"FileEntry"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":145,"name":"readTextFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":174,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L174"}],"signatures":[{"id":146,"name":"readTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Reads a file as an UTF-8 encoded string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { readTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Read the text file in the `$APPCONFIG/app.conf` path\nconst contents = await readTextFile('app.conf', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":147,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":148,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":178,"name":"removeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":461,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L461"}],"signatures":[{"id":179,"name":"removeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes a directory.\nIf the directory is not empty and the "},{"kind":"code","text":"`recursive`"},{"kind":"text","text":" option isn't set to true, the promise will be rejected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { removeDir, BaseDirectory } from '@tauri-apps/api/fs';\n// Remove the directory `$APPDATA/users`\nawait removeDir('users', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":180,"name":"dir","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":181,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":130,"name":"FsDirOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":187,"name":"removeFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":517,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L517"}],"signatures":[{"id":188,"name":"removeFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { removeFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Remove the `$APPConfig/app.conf` file\nawait removeFile('app.conf', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":189,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":190,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":191,"name":"renameFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":544,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L544"}],"signatures":[{"id":192,"name":"renameFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Renames a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { renameFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Rename the `$APPDATA/avatar.png` file\nawait renameFile('avatar.png', 'deleted.png', { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":193,"name":"oldPath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":194,"name":"newPath","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":195,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":128,"name":"FsOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":162,"name":"writeBinaryFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":308,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L308"},{"fileName":"fs.ts","line":329,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L329"},{"fileName":"fs.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L341"}],"signatures":[{"id":163,"name":"writeBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a byte array content to a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a binary file to the `$APPDATA/avatar.png` path\nawait writeBinaryFile('avatar.png', new Uint8Array([]), { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":164,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":165,"name":"contents","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":136,"name":"BinaryFileContents"}},{"id":166,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Configuration object."}]},"type":{"type":"reference","id":128,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":167,"name":"writeBinaryFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a byte array content to a file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a binary file to the `$APPDATA/avatar.png` path\nawait writeBinaryFile({ path: 'avatar.png', contents: new Uint8Array([]) }, { dir: BaseDirectory.AppData });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":168,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The object containing the file path and contents."}]},"type":{"type":"reference","id":137,"name":"FsBinaryFileOption"}},{"id":169,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Configuration object."}]},"type":{"type":"reference","id":128,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":153,"name":"writeTextFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"fs.ts","line":226,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L226"},{"fileName":"fs.ts","line":244,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L244"},{"fileName":"fs.ts","line":256,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L256"}],"signatures":[{"id":154,"name":"writeTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a UTF-8 text file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a text file to the `$APPCONFIG/app.conf` path\nawait writeTextFile('app.conf', 'file contents', { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":155,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":156,"name":"contents","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":157,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":128,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}},{"id":158,"name":"writeTextFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes a UTF-8 text file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { writeTextFile, BaseDirectory } from '@tauri-apps/api/fs';\n// Write a text file to the `$APPCONFIG/app.conf` path\nawait writeTextFile({ path: 'app.conf', contents: 'file contents' }, { dir: BaseDirectory.AppConfig });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":159,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":133,"name":"FsTextFileOption"}},{"id":160,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":128,"name":"FsOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"References","children":[144,161]},{"title":"Enumerations","children":[104]},{"title":"Interfaces","children":[140,137,130,128,133]},{"title":"Type Aliases","children":[136]},{"title":"Functions","children":[182,174,196,149,170,145,178,187,191,162,153]}],"sources":[{"fileName":"fs.ts","line":75,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/fs.ts#L75"}]},{"id":200,"name":"globalShortcut","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Register global shortcuts.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.globalShortcut`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.globalShortcut`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.globalshortcut) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"globalShortcut\": {\n \"all\": true // enable all global shortcut APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":201,"name":"ShortcutHandler","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":29,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L29"}],"type":{"type":"reflection","declaration":{"id":202,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":29,"character":30,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L29"}],"signatures":[{"id":203,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":204,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":213,"name":"isRegistered","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":101,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L101"}],"signatures":[{"id":214,"name":"isRegistered","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Determines whether the given shortcut is registered by this application or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isRegistered } from '@tauri-apps/api/globalShortcut';\nconst isRegistered = await isRegistered('CommandOrControl+P');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":215,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Array of shortcut definitions, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":205,"name":"register","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":46,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L46"}],"signatures":[{"id":206,"name":"register","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Register a global shortcut."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { register } from '@tauri-apps/api/globalShortcut';\nawait register('CommandOrControl+Shift+C', () => {\n console.log('Shortcut triggered');\n});\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":207,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut definition, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}},{"id":208,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut handler callback - takes the triggered shortcut as argument"}]},"type":{"type":"reference","id":201,"name":"ShortcutHandler"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":209,"name":"registerAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":75,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L75"}],"signatures":[{"id":210,"name":"registerAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Register a collection of global shortcuts."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { registerAll } from '@tauri-apps/api/globalShortcut';\nawait registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (shortcut) => {\n console.log(`Shortcut ${shortcut} triggered`);\n});\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":211,"name":"shortcuts","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Array of shortcut definitions, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":212,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Shortcut handler callback - takes the triggered shortcut as argument"}]},"type":{"type":"reference","id":201,"name":"ShortcutHandler"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":216,"name":"unregister","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":123,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L123"}],"signatures":[{"id":217,"name":"unregister","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unregister a global shortcut."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { unregister } from '@tauri-apps/api/globalShortcut';\nawait unregister('CmdOrControl+Space');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":218,"name":"shortcut","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"shortcut definition, modifiers and key separated by \"+\" e.g. CmdOrControl+Q"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":219,"name":"unregisterAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"globalShortcut.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L143"}],"signatures":[{"id":220,"name":"unregisterAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unregisters all shortcuts registered by the application."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { unregisterAll } from '@tauri-apps/api/globalShortcut';\nawait unregisterAll();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Type Aliases","children":[201]},{"title":"Functions","children":[213,205,209,216,219]}],"sources":[{"fileName":"globalShortcut.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/globalShortcut.ts#L26"}]},{"id":221,"name":"http","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the HTTP client written in Rust.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.http`"},{"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\nThe APIs must be allowlisted on "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"all\": true, // enable all http APIs\n \"request\": true // enable HTTP request API\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis API has a scope configuration that forces you to restrict the URLs and paths that can be accessed using glob patterns.\n\nFor instance, this scope configuration only allows making HTTP requests to the GitHub API for the "},{"kind":"code","text":"`tauri-apps`"},{"kind":"text","text":" organization:\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"scope\": [\"https://api.github.com/repos/tauri-apps/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":317,"name":"ResponseType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":320,"name":"Binary","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":74,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L74"}],"type":{"type":"literal","value":3}},{"id":318,"name":"JSON","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":72,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L72"}],"type":{"type":"literal","value":1}},{"id":319,"name":"Text","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L73"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[320,318,319]}],"sources":[{"fileName":"http.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L71"}]},{"id":248,"name":"Body","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The body object to be used on POST and PUT requests."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":266,"name":"payload","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L95"}],"type":{"type":"intrinsic","name":"unknown"}},{"id":265,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L94"}],"type":{"type":"intrinsic","name":"string"}},{"id":258,"name":"bytes","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":217,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L217"}],"signatures":[{"id":259,"name":"bytes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new byte array body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.bytes(new Uint8Array([1, 2, 3]));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":260,"name":"bytes","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body byte array."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"}]}}],"type":{"type":"reference","id":248,"name":"Body"}}]},{"id":249,"name":"form","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":134,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L134"}],"signatures":[{"id":250,"name":"form","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new form data body. The form data is an object where each key is the entry name,\nand the value is either a string or a file object.\n\nBy default it sets the "},{"kind":"code","text":"`application/x-www-form-urlencoded`"},{"kind":"text","text":" Content-Type header,\nbut you can set it to "},{"kind":"code","text":"`multipart/form-data`"},{"kind":"text","text":" if the Cargo feature "},{"kind":"code","text":"`http-multipart`"},{"kind":"text","text":" is enabled.\n\nNote that a file path must be allowed in the "},{"kind":"code","text":"`fs`"},{"kind":"text","text":" allowlist scope."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nconst body = Body.form({\n key: 'value',\n image: {\n file: '/path/to/file', // either a path or an array buffer of the file contents\n mime: 'image/jpeg', // optional\n fileName: 'image.jpg' // optional\n }\n});\n\n// alternatively, use a FormData:\nconst form = new FormData();\nform.append('key', 'value');\nform.append('image', file, 'image.png');\nconst formBody = Body.form(form);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":251,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body data."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"reference","id":228,"name":"Part"}],"name":"Record","qualifiedName":"Record","package":"typescript"},{"type":"reference","name":"FormData","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/FormData","qualifiedName":"FormData","package":"typescript"}]}}],"type":{"type":"reference","id":248,"name":"Body"}}]},{"id":252,"name":"json","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":185,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L185"}],"signatures":[{"id":253,"name":"json","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new JSON body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.json({\n registered: true,\n name: 'tauri'\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":254,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body JSON object."}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":248,"name":"Body"}}]},{"id":255,"name":"text","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":201,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L201"}],"signatures":[{"id":256,"name":"text","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new UTF-8 string body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.text('The body content as a string');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":257,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body string."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","id":248,"name":"Body"}}]}],"groups":[{"title":"Properties","children":[266,265]},{"title":"Methods","children":[258,249,252,255]}],"sources":[{"fileName":"http.ts","line":93,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L93"}]},{"id":267,"name":"Client","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":271,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L303"}],"type":{"type":"intrinsic","name":"number"}},{"id":300,"name":"delete","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L484"}],"signatures":[{"id":301,"name":"delete","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a DELETE request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.delete('http://localhost:3003/users/1');\n```"}]}]},"typeParameter":[{"id":302,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":303,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":304,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":238,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":302,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":272,"name":"drop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":318,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L318"}],"signatures":[{"id":273,"name":"drop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Drops the client instance."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nawait client.drop();\n```"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":278,"name":"get","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":389,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L389"}],"signatures":[{"id":279,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a GET request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.get('http://localhost:3003/users', {\n timeout: 30,\n // the expected response type\n responseType: ResponseType.JSON\n});\n```"}]}]},"typeParameter":[{"id":280,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":281,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":282,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":238,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":280,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":295,"name":"patch","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":467,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L467"}],"signatures":[{"id":296,"name":"patch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PATCH request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.patch('http://localhost:3003/users/1', {\n body: Body.json({ email: 'contact@tauri.app' })\n});\n```"}]}]},"typeParameter":[{"id":297,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":298,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":299,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":238,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":297,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":283,"name":"post","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":413,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L413"}],"signatures":[{"id":284,"name":"post","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a POST request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.post('http://localhost:3003/users', {\n body: Body.json({\n name: 'tauri',\n password: 'awesome'\n }),\n // in this case the server returns a simple string\n responseType: ResponseType.Text,\n});\n```"}]}]},"typeParameter":[{"id":285,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":286,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":287,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":248,"name":"Body"}},{"id":288,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":238,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":285,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":289,"name":"put","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":443,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L443"}],"signatures":[{"id":290,"name":"put","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PUT request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.put('http://localhost:3003/users/1', {\n body: Body.form({\n file: {\n file: '/home/tauri/avatar.png',\n mime: 'image/png',\n fileName: 'avatar.png'\n }\n })\n});\n```"}]}]},"typeParameter":[{"id":291,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":292,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":293,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":248,"name":"Body"}},{"id":294,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":238,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":291,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":274,"name":"request","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":340,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L340"}],"signatures":[{"id":275,"name":"request","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes an HTTP request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.request({\n method: 'GET',\n url: 'http://localhost:3003/users',\n});\n```"}]}]},"typeParameter":[{"id":276,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":277,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":230,"name":"HttpOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":276,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Properties","children":[271]},{"title":"Methods","children":[300,272,278,295,283,289,274]}],"sources":[{"fileName":"http.ts","line":302,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L302"}]},{"id":305,"name":"Response","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Response object."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":315,"name":"data","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response data."}]},"sources":[{"fileName":"http.ts","line":286,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L286"}],"type":{"type":"reference","name":"T"}},{"id":313,"name":"headers","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response headers."}]},"sources":[{"fileName":"http.ts","line":282,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L282"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":312,"name":"ok","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"A boolean indicating whether the response was successful (status in the range 200–299) or not."}]},"sources":[{"fileName":"http.ts","line":280,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L280"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":314,"name":"rawHeaders","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response raw headers."}]},"sources":[{"fileName":"http.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L284"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":311,"name":"status","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response status code."}]},"sources":[{"fileName":"http.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L278"}],"type":{"type":"intrinsic","name":"number"}},{"id":310,"name":"url","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The request URL."}]},"sources":[{"fileName":"http.ts","line":276,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L276"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[315,313,312,314,311,310]}],"sources":[{"fileName":"http.ts","line":274,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L274"}],"typeParameters":[{"id":316,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":225,"name":"ClientOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":227,"name":"connectTimeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L65"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":222,"name":"Duration"}]}},{"id":226,"name":"maxRedirections","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the maximum number of redirects the client should follow.\nIf set to 0, no redirects will be followed."}]},"sources":[{"fileName":"http.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L64"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[227,226]}],"sources":[{"fileName":"http.ts","line":59,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L59"}]},{"id":222,"name":"Duration","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":224,"name":"nanos","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L53"}],"type":{"type":"intrinsic","name":"number"}},{"id":223,"name":"secs","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L52"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[224,223]}],"sources":[{"fileName":"http.ts","line":51,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L51"}]},{"id":321,"name":"FilePart","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":322,"name":"file","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L81"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":325,"name":"T"}]}},{"id":324,"name":"fileName","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L83"}],"type":{"type":"intrinsic","name":"string"}},{"id":323,"name":"mime","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L82"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[322,324,323]}],"sources":[{"fileName":"http.ts","line":80,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L80"}],"typeParameters":[{"id":325,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":230,"name":"HttpOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object sent to the backend."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":235,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":250,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L250"}],"type":{"type":"reference","id":248,"name":"Body"}},{"id":233,"name":"headers","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L248"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":231,"name":"method","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":246,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L246"}],"type":{"type":"reference","id":229,"name":"HttpVerb"}},{"id":234,"name":"query","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":249,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L249"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":237,"name":"responseType","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":252,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L252"}],"type":{"type":"reference","id":317,"name":"ResponseType"}},{"id":236,"name":"timeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":251,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L251"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":222,"name":"Duration"}]}},{"id":232,"name":"url","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L247"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[235,233,231,234,237,236,232]}],"sources":[{"fileName":"http.ts","line":245,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L245"}]},{"id":239,"name":"FetchOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the "},{"kind":"code","text":"`fetch`"},{"kind":"text","text":" API."}]},"sources":[{"fileName":"http.ts","line":258,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L258"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":230,"name":"HttpOptions"},{"type":"literal","value":"url"}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":229,"name":"HttpVerb","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The request HTTP verb."}]},"sources":[{"fileName":"http.ts","line":229,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L229"}],"type":{"type":"union","types":[{"type":"literal","value":"GET"},{"type":"literal","value":"POST"},{"type":"literal","value":"PUT"},{"type":"literal","value":"DELETE"},{"type":"literal","value":"PATCH"},{"type":"literal","value":"HEAD"},{"type":"literal","value":"OPTIONS"},{"type":"literal","value":"CONNECT"},{"type":"literal","value":"TRACE"}]}},{"id":228,"name":"Part","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"http.ts","line":86,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L86"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"},{"type":"reference","id":321,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"FilePart"}]}},{"id":238,"name":"RequestOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Request options."}]},"sources":[{"fileName":"http.ts","line":256,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L256"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":230,"name":"HttpOptions"},{"type":"union","types":[{"type":"literal","value":"method"},{"type":"literal","value":"url"}]}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":243,"name":"fetch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":531,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L531"}],"signatures":[{"id":244,"name":"fetch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform an HTTP request using the default client."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fetch } from '@tauri-apps/api/http';\nconst response = await fetch('http://localhost:3003/users/2', {\n method: 'GET',\n timeout: 30,\n});\n```"}]}]},"typeParameter":[{"id":245,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":246,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":247,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":239,"name":"FetchOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":305,"typeArguments":[{"type":"reference","id":245,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":240,"name":"getClient","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":507,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L507"}],"signatures":[{"id":241,"name":"getClient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new client using the specified options."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the client instance."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":242,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Client configuration."}]},"type":{"type":"reference","id":225,"name":"ClientOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":267,"name":"Client"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[317]},{"title":"Classes","children":[248,267,305]},{"title":"Interfaces","children":[225,222,321,230]},{"title":"Type Aliases","children":[239,229,228,238]},{"title":"Functions","children":[243,240]}],"sources":[{"fileName":"http.ts","line":46,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/http.ts#L46"}]},{"id":326,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":338,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":339,"name":"clearMocks","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":327,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":328,"name":"mockIPC","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":329,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":330,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":331,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":332,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":333,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":334,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":335,"name":"mockWindows","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":336,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":337,"name":"additionalWindows","kind":32768,"kindString":"Parameter","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":[338,327,334]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/mocks.ts#L5"}]},{"id":340,"name":"notification","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Send toast notifications (brief auto-expiring OS window element) to your user.\nCan also be used with the Notification Web API.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.notification`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.notification`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.notification) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"notification\": {\n \"all\": true // enable all notification APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":341,"name":"Options","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options to send a notification."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":343,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification body."}]},"sources":[{"fileName":"notification.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L38"}],"type":{"type":"intrinsic","name":"string"}},{"id":344,"name":"icon","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification icon."}]},"sources":[{"fileName":"notification.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L40"}],"type":{"type":"intrinsic","name":"string"}},{"id":342,"name":"title","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Notification title."}]},"sources":[{"fileName":"notification.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L36"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[343,344,342]}],"sources":[{"fileName":"notification.ts","line":34,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L34"}]},{"id":345,"name":"Permission","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Possible permission values."}]},"sources":[{"fileName":"notification.ts","line":44,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L44"}],"type":{"type":"union","types":[{"type":"literal","value":"granted"},{"type":"literal","value":"denied"},{"type":"literal","value":"default"}]}},{"id":351,"name":"isPermissionGranted","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":56,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L56"}],"signatures":[{"id":352,"name":"isPermissionGranted","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if the permission to send notifications is granted."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted } from '@tauri-apps/api/notification';\nconst permissionGranted = await isPermissionGranted();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":349,"name":"requestPermission","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":84,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L84"}],"signatures":[{"id":350,"name":"requestPermission","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests the permission to send notifications."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to whether the user granted the permission or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":345,"name":"Permission"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":346,"name":"sendNotification","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":106,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L106"}],"signatures":[{"id":347,"name":"sendNotification","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a notification to the user."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\nif (permissionGranted) {\n sendNotification('Tauri is awesome!');\n sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":348,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":341,"name":"Options"}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Interfaces","children":[341]},{"title":"Type Aliases","children":[345]},{"title":"Functions","children":[351,349,346]}],"sources":[{"fileName":"notification.ts","line":27,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/notification.ts#L27"}]},{"id":353,"name":"os","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides operating system-related utility methods and properties.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.os`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.os`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.os) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"os\": {\n \"all\": true, // enable all Os APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":367,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L43"}],"type":{"type":"union","types":[{"type":"literal","value":"x86"},{"type":"literal","value":"x86_64"},{"type":"literal","value":"arm"},{"type":"literal","value":"aarch64"},{"type":"literal","value":"mips"},{"type":"literal","value":"mips64"},{"type":"literal","value":"powerpc"},{"type":"literal","value":"powerpc64"},{"type":"literal","value":"riscv64"},{"type":"literal","value":"s390x"},{"type":"literal","value":"sparc64"}]}},{"id":366,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":365,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L29"}],"type":{"type":"union","types":[{"type":"literal","value":"linux"},{"type":"literal","value":"darwin"},{"type":"literal","value":"ios"},{"type":"literal","value":"freebsd"},{"type":"literal","value":"dragonfly"},{"type":"literal","value":"netbsd"},{"type":"literal","value":"openbsd"},{"type":"literal","value":"solaris"},{"type":"literal","value":"android"},{"type":"literal","value":"win32"}]}},{"id":354,"name":"EOL","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"The operating system-specific end-of-line marker.\n- "},{"kind":"code","text":"`\\n`"},{"kind":"text","text":" on POSIX\n- "},{"kind":"code","text":"`\\r\\n`"},{"kind":"text","text":" on Windows"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"os.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\n"},{"type":"literal","value":"\r\n"}]},"defaultValue":"..."},{"id":361,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L135"}],"signatures":[{"id":362,"name":"arch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system CPU architecture for which the tauri app was compiled.\nPossible values are "},{"kind":"code","text":"`'x86'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'x86_64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'arm'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'aarch64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'riscv64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'s390x'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'sparc64'`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { arch } from '@tauri-apps/api/os';\nconst archName = await arch();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":367,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":355,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L77"}],"signatures":[{"id":356,"name":"platform","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the operating system platform.\nThe value is set at compile time. Possible values are "},{"kind":"code","text":"`'linux'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'darwin'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'ios'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'freebsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'dragonfly'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'netbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'openbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'solaris'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'android'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'win32'`"}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { platform } from '@tauri-apps/api/os';\nconst platformName = await platform();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":365,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":363,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L154"}],"signatures":[{"id":364,"name":"tempdir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system's default directory for temporary files as a string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempdir } from '@tauri-apps/api/os';\nconst tempdirPath = await tempdir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":359,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L115"}],"signatures":[{"id":360,"name":"type","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"`'Linux'`"},{"kind":"text","text":" on Linux, "},{"kind":"code","text":"`'Darwin'`"},{"kind":"text","text":" on macOS, and "},{"kind":"code","text":"`'Windows_NT'`"},{"kind":"text","text":" on Windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { type } from '@tauri-apps/api/os';\nconst osType = await type();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":366,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":357,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L96"}],"signatures":[{"id":358,"name":"version","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the kernel version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { version } from '@tauri-apps/api/os';\nconst osVersion = await version();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Type Aliases","children":[367,366,365]},{"title":"Variables","children":[354]},{"title":"Functions","children":[361,355,363,359,357]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/os.ts#L26"}]},{"id":368,"name":"path","kind":2,"kindString":"Module","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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":1189,"name":"BaseDirectory","kind":8388608,"kindString":"Reference","flags":{},"sources":[{"fileName":"path.ts","line":637,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L637"}],"target":104},{"id":417,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides 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":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":526,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L526"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":416,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides 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":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":517,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L517"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":375,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":92,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L92"}],"signatures":[{"id":376,"name":"appCacheDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":369,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L41"}],"signatures":[{"id":370,"name":"appConfigDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":371,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":58,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L58"}],"signatures":[{"id":372,"name":"appDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":373,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":75,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L75"}],"signatures":[{"id":374,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":377,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":504,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L504"}],"signatures":[{"id":378,"name":"appLogDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":379,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":114,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L114"}],"signatures":[{"id":380,"name":"audioDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":433,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":618,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L618"}],"signatures":[{"id":434,"name":"basename","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":435,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":436,"name":"ext","kind":32768,"kindString":"Parameter","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","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":381,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":136,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L136"}],"signatures":[{"id":382,"name":"cacheDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":383,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":158,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L158"}],"signatures":[{"id":384,"name":"configDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":385,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":180,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L180"}],"signatures":[{"id":386,"name":"dataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":387,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":202,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L202"}],"signatures":[{"id":388,"name":"desktopDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":427,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":584,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L584"}],"signatures":[{"id":428,"name":"dirname","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":429,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":389,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":224,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L224"}],"signatures":[{"id":390,"name":"documentDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":391,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":246,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L246"}],"signatures":[{"id":392,"name":"downloadDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":393,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":268,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L268"}],"signatures":[{"id":394,"name":"executableDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":430,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":600,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L600"}],"signatures":[{"id":431,"name":"extname","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":432,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":395,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":290,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L290"}],"signatures":[{"id":396,"name":"fontDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":397,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":312,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L312"}],"signatures":[{"id":398,"name":"homeDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":437,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":632,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L632"}],"signatures":[{"id":438,"name":"isAbsolute","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":439,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":424,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":569,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L569"}],"signatures":[{"id":425,"name":"join","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":426,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":399,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":334,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L334"}],"signatures":[{"id":400,"name":"localDataDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":421,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":554,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L554"}],"signatures":[{"id":422,"name":"normalize","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":423,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":401,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":356,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L356"}],"signatures":[{"id":402,"name":"pictureDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":403,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":378,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L378"}],"signatures":[{"id":404,"name":"publicDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":418,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":539,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L539"}],"signatures":[{"id":419,"name":"resolve","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":420,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":407,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":415,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L415"}],"signatures":[{"id":408,"name":"resolveResource","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":409,"name":"resourcePath","kind":32768,"kindString":"Parameter","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","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":405,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":395,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L395"}],"signatures":[{"id":406,"name":"resourceDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":410,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":438,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L438"}],"signatures":[{"id":411,"name":"runtimeDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":412,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":460,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L460"}],"signatures":[{"id":413,"name":"templateDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":414,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":482,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L482"}],"signatures":[{"id":415,"name":"videoDir","kind":4096,"kindString":"Call signature","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"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"References","children":[1189]},{"title":"Variables","children":[417,416]},{"title":"Functions","children":[375,369,371,373,377,379,433,381,383,385,387,427,389,391,393,430,395,397,437,424,399,421,401,403,418,407,405,410,412,414]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/path.ts#L26"}]},{"id":440,"name":"process","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform operations on the current process.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.process`"},{"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":441,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/process.ts#L27"}],"signatures":[{"id":442,"name":"exit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits immediately with the given "},{"kind":"code","text":"`exitCode`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exit } from '@tauri-apps/api/process';\nawait exit(1);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":443,"name":"exitCode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The exit code to use."}]},"type":{"type":"intrinsic","name":"number"},"defaultValue":"0"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":444,"name":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/process.ts#L49"}],"signatures":[{"id":445,"name":"relaunch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits the current instance of the app then relaunches it."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { relaunch } from '@tauri-apps/api/process';\nawait relaunch();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Functions","children":[441,444]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/process.ts#L12"}]},{"id":446,"name":"shell","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the system shell.\nAllows you to spawn child processes and manage files and URLs using their default application.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.shell`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.shell`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.shell) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"shell\": {\n \"all\": true, // enable all shell APIs\n \"execute\": true, // enable process spawn APIs\n \"sidecar\": true, // enable spawning sidecars\n \"open\": true // enable opening files/URLs using the default program\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Security\n\nThis API has a scope configuration that forces you to restrict the programs and arguments that can be used.\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`open`","target":652},{"kind":"text","text":" API\n\nOn the allowlist, "},{"kind":"code","text":"`open: true`"},{"kind":"text","text":" means that the "},{"kind":"inline-tag","tag":"@link","text":"open","target":652},{"kind":"text","text":" API can be used with any URL,\nas the argument is validated with the "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":" regex.\nYou can change that regex by changing the boolean value to a string, e.g. "},{"kind":"code","text":"`open: ^https://github.com/`"},{"kind":"text","text":".\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`Command`","target":447},{"kind":"text","text":" APIs\n\nThe "},{"kind":"code","text":"`shell`"},{"kind":"text","text":" allowlist object has a "},{"kind":"code","text":"`scope`"},{"kind":"text","text":" field that defines an array of CLIs that can be used.\nEach CLI is a configuration object "},{"kind":"code","text":"`{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`"},{"kind":"text","text":".\n\n- "},{"kind":"code","text":"`name`"},{"kind":"text","text":": the unique identifier of the command, passed to the "},{"kind":"inline-tag","tag":"@link","text":"Command.create function","target":448},{"kind":"text","text":".\nIf it's a sidecar, this must be the value defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > externalBin`"},{"kind":"text","text":".\n- "},{"kind":"code","text":"`cmd`"},{"kind":"text","text":": the program that is executed on this configuration. If it's a sidecar, this value is ignored.\n- "},{"kind":"code","text":"`sidecar`"},{"kind":"text","text":": whether the object configures a sidecar or a system program.\n- "},{"kind":"code","text":"`args`"},{"kind":"text","text":": the arguments that can be passed to the program. By default no arguments are allowed.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" means that any argument list is allowed.\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" means that no arguments are allowed.\n - otherwise an array can be configured. Each item is either a string representing the fixed argument value\n or a "},{"kind":"code","text":"`{ validator: string }`"},{"kind":"text","text":" that defines a regex validating the argument value.\n\n#### Example scope configuration\n\nCLI: "},{"kind":"code","text":"`git commit -m \"the commit message\"`"},{"kind":"text","text":"\n\nConfiguration:\n"},{"kind":"code","text":"```json\n{\n \"scope\": [\n {\n \"name\": \"run-git-commit\",\n \"cmd\": \"git\",\n \"args\": [\"commit\", \"-m\", { \"validator\": \"\\\\S+\" }]\n }\n ]\n}\n```"},{"kind":"text","text":"\nUsage:\n"},{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell'\nCommand.create('run-git-commit', ['commit', '-m', 'the commit message'])\n```"},{"kind":"text","text":"\n\nTrying to execute any API with a program not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":564,"name":"Child","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":565,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"shell.ts","line":346,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L346"}],"signatures":[{"id":566,"name":"new Child","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":567,"name":"pid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":564,"name":"Child"}}]},{"id":568,"name":"pid","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The child process "},{"kind":"code","text":"`pid`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":344,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L344"}],"type":{"type":"intrinsic","name":"number"}},{"id":572,"name":"kill","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L382"}],"signatures":[{"id":573,"name":"kill","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Kills the child process."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":569,"name":"write","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":365,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L365"}],"signatures":[{"id":570,"name":"write","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes "},{"kind":"code","text":"`data`"},{"kind":"text","text":" to the "},{"kind":"code","text":"`stdin`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\nconst child = await command.spawn();\nawait child.write('message');\nawait child.write([0, 1, 2, 3, 4, 5]);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":571,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to write, either a string or a byte array."}]},"type":{"type":"reference","id":656,"name":"IOPayload"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Constructors","children":[565]},{"title":"Properties","children":[568]},{"title":"Methods","children":[572,569]}],"sources":[{"fileName":"shell.ts","line":342,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L342"}]},{"id":447,"name":"Command","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The entry point for spawning child processes.\nIt emits the "},{"kind":"code","text":"`close`"},{"kind":"text","text":" and "},{"kind":"code","text":"`error`"},{"kind":"text","text":" events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\ncommand.on('close', data => {\n console.log(`command finished with code ${data.code} and signal ${data.signal}`)\n});\ncommand.on('error', error => console.error(`command error: \"${error}\"`));\ncommand.stdout.on('data', line => console.log(`command stdout: \"${line}\"`));\ncommand.stderr.on('data', line => console.log(`command stderr: \"${line}\"`));\n\nconst child = await command.spawn();\nconsole.log('pid:', child.pid);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":486,"name":"stderr","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":433,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L433"}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":663,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":485,"name":"stdout","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":431,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L431"}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":663,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":494,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":495,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":496,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":497,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":496,"name":"N"}},{"id":498,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":499,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":500,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":501,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":496,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":583,"name":"EventEmitter.addListener"}}],"inheritedFrom":{"type":"reference","id":582,"name":"EventEmitter.addListener"}},{"id":489,"name":"execute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L564"}],"signatures":[{"id":490,"name":"execute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, waiting for it to finish and collecting all of its output."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst output = await Command.create('echo', 'message').execute();\nassert(output.code === 0);\nassert(output.signal === null);\nassert(output.stdout === 'message');\nassert(output.stderr === '');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process output."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":666,"typeArguments":[{"type":"reference","name":"O"}],"name":"ChildProcess"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":543,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":544,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":545,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":546,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":545,"name":"N"}}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","id":632,"name":"EventEmitter.listenerCount"}}],"inheritedFrom":{"type":"reference","id":631,"name":"EventEmitter.listenerCount"}},{"id":526,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":527,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":528,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":529,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":528,"name":"N"}},{"id":530,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":531,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":532,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":533,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":528,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":615,"name":"EventEmitter.off"}}],"inheritedFrom":{"type":"reference","id":614,"name":"EventEmitter.off"}},{"id":510,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":511,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":512,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":513,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":512,"name":"N"}},{"id":514,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":515,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":516,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":517,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":512,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":599,"name":"EventEmitter.on"}}],"inheritedFrom":{"type":"reference","id":598,"name":"EventEmitter.on"}},{"id":518,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":519,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":520,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":521,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":520,"name":"N"}},{"id":522,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":523,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":524,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":525,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":520,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":607,"name":"EventEmitter.once"}}],"inheritedFrom":{"type":"reference","id":606,"name":"EventEmitter.once"}},{"id":547,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":548,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":549,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":550,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":549,"name":"N"}},{"id":551,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":552,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":553,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":554,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":549,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":636,"name":"EventEmitter.prependListener"}}],"inheritedFrom":{"type":"reference","id":635,"name":"EventEmitter.prependListener"}},{"id":555,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":556,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":557,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":558,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":557,"name":"N"}},{"id":559,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":560,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":561,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":562,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":557,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":644,"name":"EventEmitter.prependOnceListener"}}],"inheritedFrom":{"type":"reference","id":643,"name":"EventEmitter.prependOnceListener"}},{"id":534,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":535,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":536,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":537,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":536,"name":"N"}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":623,"name":"EventEmitter.removeAllListeners"}}],"inheritedFrom":{"type":"reference","id":622,"name":"EventEmitter.removeAllListeners"}},{"id":502,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":503,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":504,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":657,"name":"CommandEvents"}}}],"parameters":[{"id":505,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":504,"name":"N"}},{"id":506,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":507,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":508,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":509,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":504,"name":"N"},"objectType":{"type":"reference","id":657,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":591,"name":"EventEmitter.removeListener"}}],"inheritedFrom":{"type":"reference","id":590,"name":"EventEmitter.removeListener"}},{"id":487,"name":"spawn","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":526,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L526"}],"signatures":[{"id":488,"name":"spawn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, returning a handle to it."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process handle."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":564,"name":"Child"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":448,"name":"create","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":455,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L455"},{"fileName":"shell.ts","line":456,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L456"},{"fileName":"shell.ts","line":461,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L461"},{"fileName":"shell.ts","line":479,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L479"}],"signatures":[{"id":449,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":450,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":451,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":452,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":453,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":454,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":455,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":672,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":456,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":457,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":459,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L459"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[457]}],"sources":[{"fileName":"shell.ts","line":459,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L459"}]}}]}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":458,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":459,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":460,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":461,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":672,"name":"SpawnOptions"}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]},{"id":462,"name":"sidecar","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":487,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L487"},{"fileName":"shell.ts","line":488,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L488"},{"fileName":"shell.ts","line":493,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L493"},{"fileName":"shell.ts","line":511,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L511"}],"signatures":[{"id":463,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":464,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":465,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":466,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":467,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":468,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":469,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":672,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":470,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":471,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":491,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L491"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[471]}],"sources":[{"fileName":"shell.ts","line":491,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L491"}]}}]}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":472,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":473,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":474,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":475,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":672,"name":"SpawnOptions"}}],"type":{"type":"reference","id":447,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]}],"groups":[{"title":"Properties","children":[486,485]},{"title":"Methods","children":[494,489,543,526,510,518,547,555,534,502,487,448,462]}],"sources":[{"fileName":"shell.ts","line":423,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L423"}],"typeParameters":[{"id":563,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":656,"name":"IOPayload"}}],"extendedTypes":[{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":657,"name":"CommandEvents"}],"name":"EventEmitter"}]},{"id":574,"name":"EventEmitter","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":575,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":576,"name":"new EventEmitter","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":577,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":582,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":583,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":584,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":585,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":496,"name":"N"}},{"id":586,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":587,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":588,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":589,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":496,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":631,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":632,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":633,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":634,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":545,"name":"N"}}],"type":{"type":"intrinsic","name":"number"}}]},{"id":614,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":615,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":616,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":617,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":528,"name":"N"}},{"id":618,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":619,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":620,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":621,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":528,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":598,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":599,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":600,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":601,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":512,"name":"N"}},{"id":602,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":603,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":604,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":605,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":512,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":606,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":607,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":608,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":609,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":520,"name":"N"}},{"id":610,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":611,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":612,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":613,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":520,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":635,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":636,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":637,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":638,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":549,"name":"N"}},{"id":639,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":640,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":641,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":642,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":549,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":643,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":644,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":645,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":646,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":557,"name":"N"}},{"id":647,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":648,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":649,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":650,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":557,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":622,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":623,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":624,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":625,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":536,"name":"N"}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]},{"id":590,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":591,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":592,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":593,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":504,"name":"N"}},{"id":594,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":595,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":596,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":597,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":504,"name":"N"},"objectType":{"type":"reference","id":577,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":574,"typeArguments":[{"type":"reference","id":577,"name":"E"}],"name":"EventEmitter"}}]}],"groups":[{"title":"Constructors","children":[575]},{"title":"Methods","children":[582,631,614,598,606,635,643,622,590]}],"sources":[{"fileName":"shell.ts","line":153,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L153"}],"typeParameters":[{"id":651,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"extendedBy":[{"type":"reference","id":447,"name":"Command"}]},{"id":666,"name":"ChildProcess","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":667,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L109"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":668,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L111"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":670,"name":"stderr","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L115"}],"type":{"type":"reference","id":671,"name":"O"}},{"id":669,"name":"stdout","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L113"}],"type":{"type":"reference","id":671,"name":"O"}}],"groups":[{"title":"Properties","children":[667,668,670,669]}],"sources":[{"fileName":"shell.ts","line":107,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L107"}],"typeParameters":[{"id":671,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":656,"name":"IOPayload"}}]},{"id":657,"name":"CommandEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":658,"name":"close","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L394"}],"type":{"type":"reference","id":660,"name":"TerminatedPayload"}},{"id":659,"name":"error","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":395,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L395"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[658,659]}],"sources":[{"fileName":"shell.ts","line":393,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L393"}]},{"id":663,"name":"OutputEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":664,"name":"data","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":399,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L399"}],"type":{"type":"reference","id":665,"name":"O"}}],"groups":[{"title":"Properties","children":[664]}],"sources":[{"fileName":"shell.ts","line":398,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L398"}],"typeParameters":[{"id":665,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":656,"name":"IOPayload"}}]},{"id":672,"name":"SpawnOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":673,"name":"cwd","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Current working directory."}]},"sources":[{"fileName":"shell.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L88"}],"type":{"type":"intrinsic","name":"string"}},{"id":675,"name":"encoding","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Character encoding for stdout/stderr"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"sources":[{"fileName":"shell.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L96"}],"type":{"type":"intrinsic","name":"string"}},{"id":674,"name":"env","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Environment variables. set to "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to clear the process env."}]},"sources":[{"fileName":"shell.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"groups":[{"title":"Properties","children":[673,675,674]}],"sources":[{"fileName":"shell.ts","line":86,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L86"}]},{"id":660,"name":"TerminatedPayload","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Payload for the "},{"kind":"code","text":"`Terminated`"},{"kind":"text","text":" command event."}]},"children":[{"id":661,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":615,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L615"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":662,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":617,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L617"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Properties","children":[661,662]}],"sources":[{"fileName":"shell.ts","line":613,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L613"}]},{"id":656,"name":"IOPayload","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload type"}]},"sources":[{"fileName":"shell.ts","line":621,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L621"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}},{"id":652,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"shell.ts","line":656,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L656"}],"signatures":[{"id":653,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Opens a path or URL with the system's default app,\nor the one specified with "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":".\n\nThe "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":" value must be one of "},{"kind":"code","text":"`firefox`"},{"kind":"text","text":", "},{"kind":"code","text":"`google chrome`"},{"kind":"text","text":", "},{"kind":"code","text":"`chromium`"},{"kind":"text","text":" "},{"kind":"code","text":"`safari`"},{"kind":"text","text":",\n"},{"kind":"code","text":"`open`"},{"kind":"text","text":", "},{"kind":"code","text":"`start`"},{"kind":"text","text":", "},{"kind":"code","text":"`xdg-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`gio`"},{"kind":"text","text":", "},{"kind":"code","text":"`gnome-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`kde-open`"},{"kind":"text","text":" or "},{"kind":"code","text":"`wslview`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/shell';\n// opens the given URL on the default browser:\nawait open('https://github.com/tauri-apps/tauri');\n// opens the given URL using `firefox`:\nawait open('https://github.com/tauri-apps/tauri', 'firefox');\n// opens a file using the default program:\nawait open('/path/to/file');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":654,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path or URL to open.\nThis value is matched against the string regex defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > open`"},{"kind":"text","text":",\nwhich defaults to "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":655,"name":"openWith","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The app to open the file or URL with.\nDefaults to the system default application for the specified path type."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Classes","children":[564,447,574]},{"title":"Interfaces","children":[666,657,663,672,660]},{"title":"Type Aliases","children":[656]},{"title":"Functions","children":[652]}],"sources":[{"fileName":"shell.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/shell.ts#L80"}]},{"id":676,"name":"tauri","kind":2,"kindString":"Module","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":677,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":63,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L63"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":690,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":691,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":692,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":693,"name":"protocol","kind":32768,"kindString":"Parameter","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":685,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":686,"name":"invoke","kind":4096,"kindString":"Call signature","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"}]}]},"typeParameter":[{"id":687,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":688,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":689,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":677,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":687,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":678,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":679,"name":"transformCallback","kind":4096,"kindString":"Call signature","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"}]}]},"parameters":[{"id":680,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":681,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":682,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":683,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":684,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[677]},{"title":"Functions","children":[690,685,678]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/tauri.ts#L13"}]},{"id":694,"name":"updater","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Customize the auto updater flow.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.updater`"},{"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":699,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":702,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":701,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":700,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[702,701,700]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L31"}]},{"id":703,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":704,"name":"manifest","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":699,"name":"UpdateManifest"}},{"id":705,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[704,705]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L40"}]},{"id":696,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":697,"name":"error","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":698,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":695,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[697,698]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L23"}]},{"id":695,"name":"UpdateStatus","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"updater.ts","line":18,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L18"}],"type":{"type":"union","types":[{"type":"literal","value":"PENDING"},{"type":"literal","value":"ERROR"},{"type":"literal","value":"DONE"},{"type":"literal","value":"UPTODATE"}]}},{"id":714,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":715,"name":"checkUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if an update is available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\n// now run installUpdate() if needed\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Promise resolving to the update status."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":703,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":712,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":713,"name":"installUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Install the update if there's one available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate, installUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\nif (update.shouldUpdate) {\n console.log(`Installing update ${update.manifest?.version}, ${update.manifest?.date}, ${update.manifest.body}`);\n await installUpdate();\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":706,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":707,"name":"onUpdaterEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an updater event."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { onUpdaterEvent } from \"@tauri-apps/api/updater\";\nconst unlisten = await onUpdaterEvent(({ error, status }) => {\n console.log('Updater event', error, status);\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.2"}]}]},"parameters":[{"id":708,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":709,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":710,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":711,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":696,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[699,703,696]},{"title":"Type Aliases","children":[695]},{"title":"Functions","children":[714,712,706]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/updater.ts#L12"}]},{"id":716,"name":"window","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides APIs to create windows, communicate with other windows and manipulate the current window.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.window`"},{"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\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.window`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.window) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"window\": {\n \"all\": true, // enable all window APIs\n \"create\": true, // enable window creation\n \"center\": true,\n \"requestUserAttention\": true,\n \"setResizable\": true,\n \"setTitle\": true,\n \"maximize\": true,\n \"unmaximize\": true,\n \"minimize\": true,\n \"unminimize\": true,\n \"show\": true,\n \"hide\": true,\n \"close\": true,\n \"setDecorations\": true,\n \"setShadow\": true,\n \"setAlwaysOnTop\": true,\n \"setContentProtected\": true,\n \"setSize\": true,\n \"setMinSize\": true,\n \"setMaxSize\": true,\n \"setPosition\": true,\n \"setFullscreen\": true,\n \"setFocus\": true,\n \"setIcon\": true,\n \"setSkipTaskbar\": true,\n \"setCursorGrab\": true,\n \"setCursorVisible\": true,\n \"setCursorIcon\": true,\n \"setCursorPosition\": true,\n \"setIgnoreCursorEvents\": true,\n \"startDragging\": true,\n \"print\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Window events\n\nEvents can be listened to using "},{"kind":"code","text":"`appWindow.listen`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nappWindow.listen(\"my-window-event\", ({ event, payload }) => { });\n```"}]},"children":[{"id":1117,"name":"UserAttentionType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[{"kind":"text","text":"Attention type to request on a window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1118,"name":"Critical","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon until the application is in focus.\n- **Windows:** Flashes both the window and the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":226,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":1119,"name":"Informational","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon once.\n- **Windows:** Flashes the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":232,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[1118,1119]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L220"}]},{"id":1062,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":1063,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":1064,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1065,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1175,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":1062,"name":"CloseRequestedEvent"}}]},{"id":1069,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1961,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":1066,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1956,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":69,"name":"EventName"}},{"id":1068,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1960,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":1067,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1958,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":1072,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":1073,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":1070,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":1071,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[1063]},{"title":"Properties","children":[1069,1066,1068,1067]},{"title":"Methods","children":[1072,1070]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1954"}]},{"id":1098,"name":"LogicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1099,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L164"}],"signatures":[{"id":1100,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1101,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1102,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1098,"name":"LogicalPosition"}}]},{"id":1103,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":1104,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":1105,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[1099]},{"title":"Properties","children":[1103,1104,1105]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L159"}]},{"id":1079,"name":"LogicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1080,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L118"}],"signatures":[{"id":1081,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1082,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1083,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1079,"name":"LogicalSize"}}]},{"id":1086,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":1084,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":1085,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[1080]},{"title":"Properties","children":[1086,1084,1085]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L113"}]},{"id":1106,"name":"PhysicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1107,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L180"}],"signatures":[{"id":1108,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1109,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1110,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1106,"name":"PhysicalPosition"}}]},{"id":1111,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":1112,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":1113,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":1114,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L195"}],"signatures":[{"id":1115,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical position to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst position = await appWindow.innerPosition();\nconst logical = position.toLogical(factor);\n```"}]}]},"parameters":[{"id":1116,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1098,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[1107]},{"title":"Properties","children":[1111,1112,1113]},{"title":"Methods","children":[1114]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L175"}]},{"id":1087,"name":"PhysicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1088,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L134"}],"signatures":[{"id":1089,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1090,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1091,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1087,"name":"PhysicalSize"}}]},{"id":1094,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":1092,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":1093,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":1095,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L149"}],"signatures":[{"id":1096,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical size to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst size = await appWindow.innerSize();\nconst logical = size.toLogical(factor);\n```"}]}]},"parameters":[{"id":1097,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1079,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[1088]},{"title":"Properties","children":[1094,1092,1093]},{"title":"Methods","children":[1095]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L129"}]},{"id":719,"name":"WebviewWindow","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Create new webview windows and get a handle to existing ones.\n\nWindows are identified by a *label* a unique identifier that can be used to reference it later.\nIt may only contain alphanumeric characters "},{"kind":"code","text":"`a-zA-Z`"},{"kind":"text","text":" plus the following special 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":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\n// loading embedded asset:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'path/to/page.html'\n});\n// alternatively, load a remote URL:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'https://github.com/tauri-apps/tauri'\n});\n\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n\n// emit an event to the backend\nawait webview.emit(\"some event\", \"data\");\n// listen to an event from the backend\nconst unlisten = await webview.listen(\"event name\", e => {});\nunlisten();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":723,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":724,"name":"new WebviewWindow","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new WebviewWindow."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst webview = new WebviewWindow('my-label', {\n url: 'https://github.com/tauri-apps/tauri'\n});\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n```"},{"kind":"text","text":"\n\n*"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview."}]}]},"parameters":[{"id":725,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The unique webview window label. Must be alphanumeric: "},{"kind":"code","text":"`a-zA-Z-/:_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":726,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1145,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":719,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":859,"name":"label","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The window label. It is a unique identifier for the window, can be used to reference it later."}]},"sources":[{"fileName":"window.ts","line":316,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":860,"name":"listeners","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Local event listeners."}]},"sources":[{"fileName":"window.ts","line":318,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":1181,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":753,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L780"}],"signatures":[{"id":754,"name":"center","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Centers the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.center();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.center"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.center"}},{"id":778,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":779,"name":"close","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.close();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.close"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.close"}},{"id":871,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L400"}],"signatures":[{"id":872,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend, tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.emit('window-loaded', { loggedIn: true, token: 'authToken' });\n```"}]}]},"parameters":[{"id":873,"name":"event","kind":32768,"kindString":"Parameter","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":874,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Event payload."}]},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}},{"id":776,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":777,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to false."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.hide();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}},{"id":729,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L470"}],"signatures":[{"id":730,"name":"innerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.innerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1106,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}},{"id":733,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L521"}],"signatures":[{"id":734,"name":"innerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the window's client area.\nThe client area is the content of the window, excluding the title bar and borders."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.innerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1087,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}},{"id":743,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L647"}],"signatures":[{"id":744,"name":"isDecorated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current decorated state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst decorated = await appWindow.isDecorated();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is decorated or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}},{"id":737,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L572"}],"signatures":[{"id":738,"name":"isFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst fullscreen = await appWindow.isFullscreen();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}},{"id":741,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L622"}],"signatures":[{"id":742,"name":"isMaximized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst maximized = await appWindow.isMaximized();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is maximized or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}},{"id":739,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L597"}],"signatures":[{"id":740,"name":"isMinimized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current minimized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst minimized = await appWindow.isMinimized();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}},{"id":745,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L672"}],"signatures":[{"id":746,"name":"isResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current resizable state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst resizable = await appWindow.isResizable();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is resizable or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}},{"id":747,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L697"}],"signatures":[{"id":748,"name":"isVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current visible state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst visible = await appWindow.isVisible();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is visible or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}},{"id":861,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L345"}],"signatures":[{"id":862,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.listen('state-changed', (event) => {\n console.log(`Got error: ${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."}]}]},"typeParameter":[{"id":863,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":864,"name":"event","kind":32768,"kindString":"Parameter","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","id":69,"name":"EventName"}},{"id":865,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":863,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}},{"id":764,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L906"}],"signatures":[{"id":765,"name":"maximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Maximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.maximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}},{"id":770,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L981"}],"signatures":[{"id":771,"name":"minimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Minimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.minimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}},{"id":838,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":839,"name":"onCloseRequested","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window close requested. Emitted when the user requests to closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nimport { confirm } from '@tauri-apps/api/dialog';\nconst unlisten = await appWindow.onCloseRequested(async (event) => {\n const confirmed = await confirm('Are you sure?');\n if (!confirmed) {\n // user did not confirm closing the window; let's prevent it\n event.preventDefault();\n }\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.2"}]}]},"parameters":[{"id":840,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":841,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":842,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":843,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1062,"name":"CloseRequestedEvent"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}]}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}},{"id":853,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":854,"name":"onFileDropEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to a file drop event.\nThe listener is triggered when the user hovers the selected files on the window,\ndrops the files or cancels the operation."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFileDropEvent((event) => {\n if (event.payload.type === 'hover') {\n console.log('User hovering', event.payload.paths);\n } else if (event.payload.type === 'drop') {\n console.log('User dropped', event.payload.paths);\n } else {\n console.log('File drop cancelled');\n }\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.2"}]}]},"parameters":[{"id":855,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":1136,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}},{"id":844,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":845,"name":"onFocusChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window focus change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFocusChanged(({ payload: focused }) => {\n console.log('Focus changed, window is focused? ' + focused);\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.2"}]}]},"parameters":[{"id":846,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}},{"id":850,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":851,"name":"onMenuClicked","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the window menu item click. The payload is the item id."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMenuClicked(({ payload: menuId }) => {\n console.log('Menu clicked: ' + menuId);\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.2"}]}]},"parameters":[{"id":852,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}},{"id":835,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":836,"name":"onMoved","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window move."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMoved(({ payload: position }) => {\n console.log('Window moved', position);\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.2"}]}]},"parameters":[{"id":837,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":1106,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}},{"id":832,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":833,"name":"onResized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window resize."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onResized(({ payload: size }) => {\n console.log('Window resized', size);\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.2"}]}]},"parameters":[{"id":834,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":1087,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}},{"id":847,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":848,"name":"onScaleChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window scale change. Emitted when the window's scale factor has changed.\nThe following user actions can cause DPI changes:\n- Changing the display's resolution.\n- Changing the display's scale factor (e.g. in Control Panel on Windows).\n- Moving the window to a display with a different scale factor."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onScaleChanged(({ payload }) => {\n console.log('Scale changed', payload.scaleFactor, payload.size);\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.2"}]}]},"parameters":[{"id":849,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":1133,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}},{"id":856,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":857,"name":"onThemeChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the system theme change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onThemeChanged(({ payload: theme }) => {\n console.log('New theme: ' + theme);\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.2"}]}]},"parameters":[{"id":858,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":1126,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}},{"id":866,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L378"}],"signatures":[{"id":867,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.once('initialized', (event) => {\n console.log(`Window initialized!`);\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."}]}]},"typeParameter":[{"id":868,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":869,"name":"event","kind":32768,"kindString":"Parameter","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":870,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1181,"typeArguments":[{"type":"reference","id":868,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1186,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.once"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.once"}},{"id":731,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L495"}],"signatures":[{"id":732,"name":"outerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.outerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1106,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}},{"id":735,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L547"}],"signatures":[{"id":736,"name":"outerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the entire window.\nThese dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.outerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":1087,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}},{"id":755,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L816"}],"signatures":[{"id":756,"name":"requestUserAttention","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests user attention to the window, this has no effect if the application\nis already focused. How requesting for user attention manifests is platform dependent,\nsee "},{"kind":"code","text":"`UserAttentionType`"},{"kind":"text","text":" for details.\n\nProviding "},{"kind":"code","text":"`null`"},{"kind":"text","text":" will unset the request for user attention. Unsetting the request for\nuser attention might not be done automatically by the WM when the window receives input.\n\n#### Platform-specific\n\n- **macOS:** "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect.\n- **Linux:** Urgency levels have the same effect."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.requestUserAttention();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":757,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":1117,"name":"UserAttentionType"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}},{"id":727,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L445"}],"signatures":[{"id":728,"name":"scaleFactor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's monitor scale factor."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}},{"id":786,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":787,"name":"setAlwaysOnTop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setAlwaysOnTop(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":788,"name":"alwaysOnTop","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}},{"id":789,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":790,"name":"setContentProtected","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setContentProtected(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"parameters":[{"id":791,"name":"protected_","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}},{"id":815,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":816,"name":"setCursorGrab","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Grabs the cursor, preventing it from leaving the window.\n\nThere's no guarantee that the cursor will be hidden. You should\nhide it by yourself if you want so.\n\n#### Platform-specific\n\n- **Linux:** Unsupported.\n- **macOS:** This locks the cursor in a fixed location, which looks visually awkward."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorGrab(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":817,"name":"grab","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to grab the cursor icon, "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to release it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}},{"id":821,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":822,"name":"setCursorIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor icon of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorIcon('help');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":823,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":717,"name":"CursorIcon"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}},{"id":824,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":825,"name":"setCursorPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the position of the cursor in window coordinates."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setCursorPosition(new LogicalPosition(600, 300));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":826,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":1106,"name":"PhysicalPosition"},{"type":"reference","id":1098,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}},{"id":818,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":819,"name":"setCursorVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor's visibility.\n\n#### Platform-specific\n\n- **Windows:** The cursor is only hidden within the confines of the window.\n- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is\n outside of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorVisible(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":820,"name":"visible","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`false`"},{"kind":"text","text":", this will hide the cursor. If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", this will show the cursor."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}},{"id":780,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":781,"name":"setDecorations","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setDecorations(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":782,"name":"decorations","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}},{"id":807,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":808,"name":"setFocus","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Bring the window to front and focus."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFocus();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}},{"id":804,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":805,"name":"setFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFullscreen(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":806,"name":"fullscreen","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should go to fullscreen or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}},{"id":809,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":810,"name":"setIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window icon."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIcon('/tauri/awesome.png');\n```"},{"kind":"text","text":"\n\nNote that you need the "},{"kind":"code","text":"`icon-ico`"},{"kind":"text","text":" or "},{"kind":"code","text":"`icon-png`"},{"kind":"text","text":" Cargo features to use this API.\nTo enable it, change your Cargo.toml file:\n"},{"kind":"code","text":"```toml\n[dependencies]\ntauri = { version = \"...\", features = [\"...\", \"icon-png\"] }\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":811,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Icon bytes or path to the icon file."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}},{"id":827,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":828,"name":"setIgnoreCursorEvents","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the cursor events behavior."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIgnoreCursorEvents(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":829,"name":"ignore","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to ignore the cursor events; "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to process them as usual."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}},{"id":798,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":799,"name":"setMaxSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window maximum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is undefined, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMaxSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":800,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":1087,"name":"PhysicalSize"},{"type":"reference","id":1079,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}},{"id":795,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":796,"name":"setMinSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window minimum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is not provided, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, PhysicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMinSize(new PhysicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":797,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":1087,"name":"PhysicalSize"},{"type":"reference","id":1079,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}},{"id":801,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":802,"name":"setPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window outer position."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setPosition(new LogicalPosition(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":803,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new position, in logical or physical pixels."}]},"type":{"type":"union","types":[{"type":"reference","id":1106,"name":"PhysicalPosition"},{"type":"reference","id":1098,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}},{"id":758,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L853"}],"signatures":[{"id":759,"name":"setResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Updates the window resizable flag."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setResizable(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":760,"name":"resizable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}},{"id":783,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":784,"name":"setShadow","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether or not the window should have shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setShadow(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"parameters":[{"id":785,"name":"enable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}},{"id":792,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":793,"name":"setSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resizes the window with a new inner size."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":794,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size."}]},"type":{"type":"union","types":[{"type":"reference","id":1087,"name":"PhysicalSize"},{"type":"reference","id":1079,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}},{"id":812,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":813,"name":"setSkipTaskbar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window icon should be hidden from the taskbar or not.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setSkipTaskbar(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":814,"name":"skip","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"true to hide window icon, false to show it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}},{"id":761,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L880"}],"signatures":[{"id":762,"name":"setTitle","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setTitle('Tauri');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":763,"name":"title","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new title"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}},{"id":774,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":775,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to true."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.show();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.show"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.show"}},{"id":830,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":831,"name":"startDragging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Starts dragging the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.startDragging();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}},{"id":751,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L752"}],"signatures":[{"id":752,"name":"theme","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current theme.\n\n#### Platform-specific\n\n- **macOS:** Theme was introduced on macOS 10.14. Returns "},{"kind":"code","text":"`light`"},{"kind":"text","text":" on macOS 10.13 and below."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst theme = await appWindow.theme();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window theme."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":1126,"name":"Theme"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}},{"id":749,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L722"}],"signatures":[{"id":750,"name":"title","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst title = await appWindow.title();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.title"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.title"}},{"id":768,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L956"}],"signatures":[{"id":769,"name":"toggleMaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Toggles the window maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.toggleMaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}},{"id":766,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L931"}],"signatures":[{"id":767,"name":"unmaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unmaximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unmaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}},{"id":772,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":773,"name":"unminimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unminimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unminimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}},{"id":720,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2063,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":721,"name":"getByLabel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the WebviewWindow for the webview associated with the given label."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst mainWindow = WebviewWindow.getByLabel('main');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist."}]}]},"parameters":[{"id":722,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The webview window label."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":719,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[723]},{"title":"Properties","children":[859,860]},{"title":"Methods","children":[753,778,871,776,729,733,743,737,741,739,745,747,861,764,770,838,853,844,850,835,832,847,856,866,731,735,755,727,786,789,815,821,824,818,780,807,804,809,827,798,795,801,758,783,792,812,761,774,830,751,749,768,766,772,720]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":1128,"name":"Monitor","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Allows you to retrieve information about a given monitor."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1129,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Human-readable name of the monitor"}]},"sources":[{"fileName":"window.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":1131,"name":"position","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"the Top-left corner position of the monitor relative to the larger full screen area."}]},"sources":[{"fileName":"window.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":1106,"name":"PhysicalPosition"}},{"id":1132,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}]},"sources":[{"fileName":"window.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":1130,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The monitor's resolution."}]},"sources":[{"fileName":"window.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":1087,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1129,1131,1132,1130]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L79"}]},{"id":1133,"name":"ScaleFactorChanged","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"The payload for the "},{"kind":"code","text":"`scaleChange`"},{"kind":"text","text":" event."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":1134,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window scale factor."}]},"sources":[{"fileName":"window.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":1135,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window size"}]},"sources":[{"fileName":"window.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":1087,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1134,1135]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L95"}]},{"id":1145,"name":"WindowOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Configuration for the window to create."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":1172,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1164,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1147,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1165,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1163,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1168,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1159,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1158,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1151,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":1171,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1155,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":1154,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":1161,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1153,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":1152,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":1156,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1167,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1166,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1173,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2194,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":1169,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2175,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":1126,"name":"Theme"}},{"id":1157,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":1170,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2179,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":1127,"name":"TitleBarStyle"}},{"id":1160,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1146,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":1174,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2198,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":1162,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1150,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":1148,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":1149,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[1172,1164,1147,1165,1163,1168,1159,1158,1151,1171,1155,1154,1161,1153,1152,1156,1167,1166,1173,1169,1157,1170,1160,1146,1174,1162,1150,1148,1149]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2097"}]},{"id":717,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L235"}],"type":{"type":"union","types":[{"type":"literal","value":"default"},{"type":"literal","value":"crosshair"},{"type":"literal","value":"hand"},{"type":"literal","value":"arrow"},{"type":"literal","value":"move"},{"type":"literal","value":"text"},{"type":"literal","value":"wait"},{"type":"literal","value":"help"},{"type":"literal","value":"progress"},{"type":"literal","value":"notAllowed"},{"type":"literal","value":"contextMenu"},{"type":"literal","value":"cell"},{"type":"literal","value":"verticalText"},{"type":"literal","value":"alias"},{"type":"literal","value":"copy"},{"type":"literal","value":"noDrop"},{"type":"literal","value":"grab"},{"type":"literal","value":"grabbing"},{"type":"literal","value":"allScroll"},{"type":"literal","value":"zoomIn"},{"type":"literal","value":"zoomOut"},{"type":"literal","value":"eResize"},{"type":"literal","value":"nResize"},{"type":"literal","value":"neResize"},{"type":"literal","value":"nwResize"},{"type":"literal","value":"sResize"},{"type":"literal","value":"seResize"},{"type":"literal","value":"swResize"},{"type":"literal","value":"wResize"},{"type":"literal","value":"ewResize"},{"type":"literal","value":"nsResize"},{"type":"literal","value":"neswResize"},{"type":"literal","value":"nwseResize"},{"type":"literal","value":"colResize"},{"type":"literal","value":"rowResize"}]}},{"id":1136,"name":"FileDropEvent","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The file drop event types."}]},"sources":[{"fileName":"window.ts","line":103,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":1137,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1139,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1138,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[1139,1138]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":1140,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1142,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1141,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[1142,1141]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":1143,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1144,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[1144]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L106"}]}}]}},{"id":1126,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":1127,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":1078,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2073,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":719,"name":"WebviewWindow"}},{"id":1124,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":1125,"name":"availableMonitors","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the list of all the monitors available on the system."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { availableMonitors } from '@tauri-apps/api/window';\nconst monitors = availableMonitors();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":1128,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":1120,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":1121,"name":"currentMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the monitor on which the window currently resides.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if current monitor can't be detected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { currentMonitor } from '@tauri-apps/api/window';\nconst monitor = currentMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":1128,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":1076,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L293"}],"signatures":[{"id":1077,"name":"getAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets a list of instances of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for all available webview windows."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"array","elementType":{"type":"reference","id":719,"name":"WebviewWindow"}}}]},{"id":1074,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L281"}],"signatures":[{"id":1075,"name":"getCurrent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Get an instance of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for the current webview window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","id":719,"name":"WebviewWindow"}}]},{"id":1122,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":1123,"name":"primaryMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the primary monitor of the system.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if it can't identify any monitor as a primary one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { primaryMonitor } from '@tauri-apps/api/window';\nconst monitor = primaryMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":1128,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[1117]},{"title":"Classes","children":[1062,1098,1079,1106,1087,719]},{"title":"Interfaces","children":[1128,1133,1145]},{"title":"Type Aliases","children":[717,1136,1126,1127]},{"title":"Variables","children":[1078]},{"title":"Functions","children":[1124,1120,1076,1074,1122]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/06fdcc0ed/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,18,68,103,200,221,326,340,353,368,440,446,676,694,716]}]} \ No newline at end of file diff --git a/tooling/api/src/cli.ts b/tooling/api/src/cli.ts deleted file mode 100644 index 5b39e146fd6..00000000000 --- a/tooling/api/src/cli.ts +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/** - * Parse arguments from your Command Line Interface. - * - * This package is also accessible with `window.__TAURI__.cli` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. - * @module - */ - -import { invokeTauriCommand } from './helpers/tauri' - -/** - * @since 1.0.0 - */ -interface ArgMatch { - /** - * string if takes value - * boolean if flag - * string[] or null if takes multiple values - */ - value: string | boolean | string[] | null - /** - * Number of occurrences - */ - occurrences: number -} - -/** - * @since 1.0.0 - */ -interface SubcommandMatch { - name: string - matches: CliMatches -} - -/** - * @since 1.0.0 - */ -interface CliMatches { - args: Record - subcommand: SubcommandMatch | null -} - -/** - * Parse the arguments provided to the current process and get the matches using the configuration defined [`tauri.cli`](https://tauri.app/v1/api/config/#tauriconfig.cli) in `tauri.conf.json` - * @example - * ```typescript - * import { getMatches } from '@tauri-apps/api/cli'; - * const matches = await getMatches(); - * if (matches.subcommand?.name === 'run') { - * // `./your-app run $ARGS` was executed - * const args = matches.subcommand?.matches.args - * if ('debug' in args) { - * // `./your-app run --debug` was executed - * } - * } else { - * const args = matches.args - * // `./your-app $ARGS` was executed - * } - * ``` - * - * @since 1.0.0 - */ -async function getMatches(): Promise { - return invokeTauriCommand({ - __tauriModule: 'Cli', - message: { - cmd: 'cliMatches' - } - }) -} - -export type { ArgMatch, SubcommandMatch, CliMatches } - -export { getMatches } diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index 9ebdd8e6ba1..af3ac7674c8 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -14,7 +14,6 @@ */ import * as app from './app' -import * as cli from './cli' import * as clipboard from './clipboard' import * as dialog from './dialog' import * as event from './event' @@ -36,7 +35,6 @@ const invoke = tauri.invoke export { invoke, app, - cli, clipboard, dialog, event, diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index ad8bdc1d45c..904148a0b35 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -258,17 +258,6 @@ "$ref": "#/definitions/WindowConfig" } }, - "cli": { - "description": "The CLI configuration.", - "anyOf": [ - { - "$ref": "#/definitions/CliConfig" - }, - { - "type": "null" - } - ] - }, "bundle": { "description": "The bundler configuration.", "default": { @@ -778,252 +767,6 @@ } ] }, - "CliConfig": { - "description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig", - "type": "object", - "properties": { - "description": { - "description": "Command description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "Command long description which will be shown on the help information.", - "type": [ - "string", - "null" - ] - }, - "beforeHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.", - "type": [ - "string", - "null" - ] - }, - "afterHelp": { - "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.", - "type": [ - "string", - "null" - ] - }, - "args": { - "description": "List of arguments for the command", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/CliArg" - } - }, - "subcommands": { - "description": "List of subcommands of this command", - "type": [ - "object", - "null" - ], - "additionalProperties": { - "$ref": "#/definitions/CliConfig" - } - } - }, - "additionalProperties": false - }, - "CliArg": { - "description": "A CLI argument definition.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "short": { - "description": "The short version of the argument, without the preceding -.\n\nNOTE: Any leading `-` characters will be stripped, and only the first non-character will be used as the short version.", - "type": [ - "string", - "null" - ], - "maxLength": 1, - "minLength": 1 - }, - "name": { - "description": "The unique argument name", - "type": "string" - }, - "description": { - "description": "The argument description which will be shown on the help information. Typically, this is a short (one line) description of the arg.", - "type": [ - "string", - "null" - ] - }, - "longDescription": { - "description": "The argument long description which will be shown on the help information. Typically this a more detailed (multi-line) message that describes the argument.", - "type": [ - "string", - "null" - ] - }, - "takesValue": { - "description": "Specifies that the argument takes a value at run time.\n\nNOTE: values for arguments may be specified in any of the following methods - Using a space such as -o value or --option value - Using an equals and no space such as -o=value or --option=value - Use a short and no space such as -ovalue", - "default": false, - "type": "boolean" - }, - "multiple": { - "description": "Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once.\n\nFor example, --opt val1 val2 is allowed, but --opt val1 val2 --opt val3 is not.\n\nNOTE: Setting this requires `takes_value` to be set to true.", - "default": false, - "type": "boolean" - }, - "multipleOccurrences": { - "description": "Specifies that the argument may appear more than once. For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed)\n\nFor example, --opt val1 --opt val2 is allowed, but --opt val1 val2 is not.", - "default": false, - "type": "boolean" - }, - "numberOfValues": { - "description": "Specifies how many values are required to satisfy this argument. For example, if you had a `-f ` argument where you wanted exactly 3 'files' you would set `number_of_values = 3`, and this argument wouldn't be satisfied unless the user provided 3 and only 3 values.\n\n**NOTE:** Does *not* require `multiple_occurrences = true` to be set. Setting `multiple_occurrences = true` would allow `-f -f ` where as *not* setting it would only allow one occurrence of this argument.\n\n**NOTE:** implicitly sets `takes_value = true` and `multiple_values = true`.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "possibleValues": { - "description": "Specifies a list of possible values for this argument. At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "minValues": { - "description": "Specifies the minimum number of values for this argument. For example, if you had a -f `` argument where you wanted at least 2 'files', you would set `minValues: 2`, and this argument would be satisfied if the user provided, 2 or more values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "maxValues": { - "description": "Specifies the maximum number of values are for this argument. For example, if you had a -f `` argument where you wanted up to 3 'files', you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values.", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 0.0 - }, - "required": { - "description": "Sets whether or not the argument is required by default.\n\n- Required by default means it is required, when no other conflicting rules have been evaluated - Conflicting rules take precedence over being required.", - "default": false, - "type": "boolean" - }, - "requiredUnlessPresent": { - "description": "Sets an arg that override this arg's required setting i.e. this arg will be required unless this other argument is present.", - "type": [ - "string", - "null" - ] - }, - "requiredUnlessPresentAll": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless all these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredUnlessPresentAny": { - "description": "Sets args that override this arg's required setting i.e. this arg will be required unless at least one of these other arguments are present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "conflictsWith": { - "description": "Sets a conflicting argument by name i.e. when using this argument, the following argument can't be present and vice versa.", - "type": [ - "string", - "null" - ] - }, - "conflictsWithAll": { - "description": "The same as conflictsWith but allows specifying multiple two-way conflicts per argument.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requires": { - "description": "Tets an argument by name that is required when this one is present i.e. when using this argument, the following argument must be present.", - "type": [ - "string", - "null" - ] - }, - "requiresAll": { - "description": "Sts multiple arguments by names that are required when this one is present i.e. when using this argument, the following arguments must be present.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiresIf": { - "description": "Allows a conditional requirement with the signature [arg, value] the requirement will only become valid if `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requiredIfEq": { - "description": "Allows specifying that an argument is required conditionally with the signature [arg, value] the requirement will only become valid if the `arg`'s value equals `${value}`.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "requireEquals": { - "description": "Requires that options use the --option=val syntax i.e. an equals between the option and associated value.", - "type": [ - "boolean", - "null" - ] - }, - "index": { - "description": "The positional argument index, starting at 1.\n\nThe index refers to position according to other positional argument. It does not define position in the argument list as a whole. When utilized with multiple=true, only the last positional argument may be defined as multiple (i.e. the one with the highest index).", - "type": [ - "integer", - "null" - ], - "format": "uint", - "minimum": 1.0 - } - }, - "additionalProperties": false - }, "BundleConfig": { "description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig", "type": "object",