diff --git a/.all-contributorsrc b/.all-contributorsrc index 325be8578..753598d6c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1841,6 +1841,24 @@ "contributions": [ "code" ] + }, + { + "login": "allcontributors[bot]", + "name": "allcontributors[bot]", + "avatar_url": "https://avatars.githubusercontent.com/in/23186?v=4", + "profile": "https://github.com/apps/allcontributors", + "contributions": [ + "doc" + ] + }, + { + "login": "wandercn", + "name": "wander", + "avatar_url": "https://avatars.githubusercontent.com/u/77320953?v=4", + "profile": "https://www.ffactory.org/", + "contributions": [ + "doc" + ] } ], "contributorsPerLine": 8, diff --git a/README.md b/README.md index 1787e0c70..1ae4001e2 100644 --- a/README.md +++ b/README.md @@ -91,9 +91,12 @@ The installation instructions are on the [official website](https://wails.io/doc ## Sponsors + This project is supported by these kind people / companies: - +

+ +

## FAQ - Is this an alternative to Electron? diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 000000000..c7246260d --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,24 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + +tasks: + check-contributors: + cmds: + - npx -y all-contributors-cli check + + update-contributors: + cmds: + - go run v3/tasks/contribs/main.go + + build-contributors: + cmds: + - npx -y all-contributors-cli generate + + release: + dir: v2/tools/release + cmds: + - go run release.go \ No newline at end of file diff --git a/v2/cmd/wails/internal/version.txt b/v2/cmd/wails/internal/version.txt index d07897c40..fa49670c7 100644 --- a/v2/cmd/wails/internal/version.txt +++ b/v2/cmd/wails/internal/version.txt @@ -1 +1 @@ -v2.3.1 \ No newline at end of file +v2.4.0 \ No newline at end of file diff --git a/v2/tools/release/release.go b/v2/tools/release/release.go index 4c20c8fdc..558299558 100644 --- a/v2/tools/release/release.go +++ b/v2/tools/release/release.go @@ -54,13 +54,13 @@ func main() { } s.CD("../../../website") - runCommand("pnpm", "install") + runCommand("npx", "-y", "pnpm", "install") s.ECHO("Generating new Docs for version: " + newVersion) - runCommand("pnpm", "run", "docusaurus", "docs:version", newVersion) + runCommand("npx", "pnpm", "run", "docusaurus", "docs:version", newVersion) - runCommand("pnpm", "run", "write-translations") + runCommand("npx", "pnpm", "run", "write-translations") // Load the version list/* versionsData, err := os.ReadFile("versions.json") @@ -83,5 +83,5 @@ func main() { s.RM("version-" + oldestVersion + "-sidebars.json") s.CD("..") - runCommand("pnpm", "run", "build") + runCommand("npx", "pnpm", "run", "build") } diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json deleted file mode 100644 index 49cf4687e..000000000 --- a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0-rc.1.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version.label": { - "message": "v2.0.0-rc.1", - "description": "The label for version v2.0.0-rc.1" - }, - "sidebar.docs.category.Getting Started": { - "message": "Getting Started", - "description": "The label for category Getting Started in sidebar docs" - }, - "sidebar.docs.category.Reference": { - "message": "Reference", - "description": "The label for category Reference in sidebar docs" - }, - "sidebar.docs.category.Runtime": { - "message": "Runtime", - "description": "The label for category Runtime in sidebar docs" - }, - "sidebar.docs.category.Community": { - "message": "Community", - "description": "The label for category Community in sidebar docs" - }, - "sidebar.docs.category.Showcase": { - "message": "Showcase", - "description": "The label for category Showcase in sidebar docs" - }, - "sidebar.docs.category.Guides": { - "message": "Guides", - "description": "The label for category Guides in sidebar docs" - }, - "sidebar.docs.category.Tutorials": { - "message": "Tutorials", - "description": "The label for category Tutorials in sidebar docs" - }, - "sidebar.docs.link.Contributing": { - "message": "Contributing", - "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" - } -} diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0.json b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0.json deleted file mode 100644 index 421c838e6..000000000 --- a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.0.0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version.label": { - "message": "v2.0.0", - "description": "The label for version v2.0.0" - }, - "sidebar.docs.category.Getting Started": { - "message": "Getting Started", - "description": "The label for category Getting Started in sidebar docs" - }, - "sidebar.docs.category.Reference": { - "message": "Reference", - "description": "The label for category Reference in sidebar docs" - }, - "sidebar.docs.category.Runtime": { - "message": "Runtime", - "description": "The label for category Runtime in sidebar docs" - }, - "sidebar.docs.category.Community": { - "message": "Community", - "description": "The label for category Community in sidebar docs" - }, - "sidebar.docs.category.Showcase": { - "message": "Showcase", - "description": "The label for category Showcase in sidebar docs" - }, - "sidebar.docs.category.Guides": { - "message": "Guides", - "description": "The label for category Guides in sidebar docs" - }, - "sidebar.docs.category.Tutorials": { - "message": "Tutorials", - "description": "The label for category Tutorials in sidebar docs" - }, - "sidebar.docs.link.Contributing": { - "message": "Contributing", - "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" - } -} diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.1.0.json b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.1.0.json deleted file mode 100644 index f29e6b248..000000000 --- a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.1.0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version.label": { - "message": "v2.1.0", - "description": "The label for version v2.1.0" - }, - "sidebar.docs.category.Getting Started": { - "message": "Getting Started", - "description": "The label for category Getting Started in sidebar docs" - }, - "sidebar.docs.category.Reference": { - "message": "Reference", - "description": "The label for category Reference in sidebar docs" - }, - "sidebar.docs.category.Runtime": { - "message": "Runtime", - "description": "The label for category Runtime in sidebar docs" - }, - "sidebar.docs.category.Community": { - "message": "Community", - "description": "The label for category Community in sidebar docs" - }, - "sidebar.docs.category.Showcase": { - "message": "Showcase", - "description": "The label for category Showcase in sidebar docs" - }, - "sidebar.docs.category.Guides": { - "message": "Guides", - "description": "The label for category Guides in sidebar docs" - }, - "sidebar.docs.category.Tutorials": { - "message": "Tutorials", - "description": "The label for category Tutorials in sidebar docs" - }, - "sidebar.docs.link.Contributing": { - "message": "Contributing", - "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" - } -} diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.2.0.json b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.2.0.json deleted file mode 100644 index 1074035c4..000000000 --- a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.2.0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version.label": { - "message": "v2.2.0", - "description": "The label for version v2.2.0" - }, - "sidebar.docs.category.Getting Started": { - "message": "Getting Started", - "description": "The label for category Getting Started in sidebar docs" - }, - "sidebar.docs.category.Reference": { - "message": "Reference", - "description": "The label for category Reference in sidebar docs" - }, - "sidebar.docs.category.Runtime": { - "message": "Runtime", - "description": "The label for category Runtime in sidebar docs" - }, - "sidebar.docs.category.Community": { - "message": "Community", - "description": "The label for category Community in sidebar docs" - }, - "sidebar.docs.category.Showcase": { - "message": "Showcase", - "description": "The label for category Showcase in sidebar docs" - }, - "sidebar.docs.category.Guides": { - "message": "Guides", - "description": "The label for category Guides in sidebar docs" - }, - "sidebar.docs.category.Tutorials": { - "message": "Tutorials", - "description": "The label for category Tutorials in sidebar docs" - }, - "sidebar.docs.link.Contributing": { - "message": "Contributing", - "description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing" - } -} diff --git a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.3.0.json b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.4.0.json similarity index 94% rename from website/i18n/en/docusaurus-plugin-content-docs/version-v2.3.0.json rename to website/i18n/en/docusaurus-plugin-content-docs/version-v2.4.0.json index 32ec6fb1d..4bda777e9 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/version-v2.3.0.json +++ b/website/i18n/en/docusaurus-plugin-content-docs/version-v2.4.0.json @@ -1,7 +1,7 @@ { "version.label": { - "message": "v2.3.0", - "description": "The label for version v2.3.0" + "message": "v2.4.0", + "description": "The label for version v2.4.0" }, "sidebar.docs.category.Getting Started": { "message": "Getting Started", diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 85% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx index df7ba5dd4..0cd36271a 100644 --- a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx +++ b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx @@ -12,8 +12,7 @@ La [liste définitive](https://github.com/wailsapp/awesome-wails) de liens relat ## Canaux de support -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) +- [Wails Discord Server](https://discord.gg/JDdSxwjhGf) - [Github Issues](https://github.com/wailsapp/wails/issues) - [canal de discussion sur la bêta v2](https://github.com/wailsapp/wails/discussions/828) diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/i18n/fr/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx rename to website/i18n/fr/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx deleted file mode 100644 index 49cb7843b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Discord](https://discord.com/invite/JDdSxwjhGf) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx deleted file mode 100644 index 4a1ebe835..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# EmailIt - -

- -
-

- -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx deleted file mode 100644 index 13c2d8345..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EncryptEasy - -

- -
-

- -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx deleted file mode 100644 index 78cbfca86..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# FileHound Export Utility - -

- -
-

- -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 11247339d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Minecraft Updater - -

- -
-

- -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx deleted file mode 100644 index a7ae8c492..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Modal File Manager - -

- -
-

- -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx deleted file mode 100644 index 534b097ca..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Molley Wallet - -

- -
-

- -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx deleted file mode 100644 index 889d2dd9e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# October - -

- -
-

- -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx deleted file mode 100644 index c3eb79507..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Optimus - -

- -
-

- -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx deleted file mode 100644 index 4cc2c63c9..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Portfall - -

- -
-

- -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx deleted file mode 100644 index 1505ce07a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Restic Browser - -

- -
-

- -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx deleted file mode 100644 index 5223e88cf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# RiftShare - -

- -
-

- -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx deleted file mode 100644 index aaa556f92..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# ScriptBar - -

- -
-

- -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx deleted file mode 100644 index 2d895dc29..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Surge - -

- -
-

- -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx deleted file mode 100644 index 2a2498f40..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wally - -

- -
-

- -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx deleted file mode 100644 index 54cedacea..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wombat - -

- -
-

- -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx deleted file mode 100644 index 178ff0529..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Ytd - -

- -
-

- -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx deleted file mode 100644 index d9a29a6fa..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Templates - -This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide. - -To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]` - -If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used. - -Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs -- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3 -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx deleted file mode 100644 index 3e0df3b68..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Compiling your Project - -From the project directory, run `wails build`. This will compile your project and save the production-ready binary in the `build/bin` directory. - -If you run the binary, you should see the default application: - -
- -
- -
- -For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx deleted file mode 100644 index 54dda5faa..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Developing your Application - -You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - -- Build your application and run it -- Bind your Go code to the frontend so it can be called from Javascript -- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - -To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). - -Coming soon: Tutorial diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx deleted file mode 100644 index 86036d24b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Creating a Project - -## Project Generation - -Now that the CLI is installed, you can generate a new project by using the `wails init` command. - -Pick your favourite framework: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Vue用のJavascriptプロジェクトを生成する場合:

- - wails init -n myproject -t vue - -Typescriptプロジェクトを生成する場合:
- - wails init -n myproject -t vue-ts - -
- - Preact用のJavascriptプロジェクトを生成する場合:

- - wails init -n myproject -t preact - -Typescriptプロジェクトを生成する場合:
- - wails init -n myproject -t preact-ts - -
- - Lit用のJavascriptプロジェクトを生成する場合:

- - wails init -n myproject -t lit - -Typescriptプロジェクトを生成する場合:
- - wails init -n myproject -t lit-ts - -
- - Vanilla用のJavascriptプロジェクトを生成する場合:

- - wails init -n myproject -t vanilla - -Typescriptプロジェクトを生成する場合:
- - wails init -n myproject -t vanilla-ts - -
-
- - - -
- -There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks. - -To see the other options available, you can run `wails init -help`. More details can be found in the [CLI Reference](../reference/cli.mdx#init). - -## Project Layout - -Wails projects have the following layout: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### Project structure rundown - -- `/main.go` - The main application -- `/frontend/` - Frontend project files -- `/build/` - Project build directory -- `/build/appicon.png` - The application icon -- `/build/darwin/` - Mac specific project files -- `/build/windows/` - Windows specific project files -- `/wails.json` - The project configuration -- `/go.mod` - Go module file -- `/go.sum` - Go module checksum file - -The `frontend` directory has nothing specific to Wails and can be any frontend project of your choosing. - -The `build` directory is used during the build process. These files may be updated to customise your builds. If files are removed from the build directory, default versions will be regenerated. - -The default module name in `go.mod` is "changeme". You should change this to something more appropriate. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx deleted file mode 100644 index bfadb7275..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Installation - -## Supported Platforms - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## Dependencies - -Wails has a number of common dependencies that are required before installation: - -- Go 1.17+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://go.dev/doc/install). - -Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: - -- Check Go is installed correctly: `go version` -- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin` - -### NPM - -Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against. - -Run `npm --version` to verify. - -## Platform Specific Dependencies - -You will also need to install platform specific dependencies: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wailsを使用するには、xcodeコマンドラインツールがインストールされている必要があります。 This can be done by running:
- xcode-select --install -
- - Wails requires that the WebView2{" "} - runtime is installed. Some Windows installations will already have this installed. You can check using - the{" "} - wails doctor command (see below). - - - Linux required the standard gcc build tools - plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine - what the installation commands are for your specific distribution. Run wails doctor after - installation - to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the {" "} - Add Linux Distro guide. - -
- - - -## Optional Dependencies - -- [UPX](https://upx.github.io/) for compressing your applications. - -## Installing Wails - -Run `go install github.com/wailsapp/wails/v2/cmd/wails@latest` to install the Wails CLI. - -## System Check - -Running `wails doctor` will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx deleted file mode 100644 index 77ad6d09e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx +++ /dev/null @@ -1,126 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -

- -

- -However, if we request `go.mod`, we will see the following output: - -

- -

- -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -

- -

- -:::warning -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access -to your filesystem. -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx deleted file mode 100644 index c7ca5f6c3..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx +++ /dev/null @@ -1,84 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - - -``` - -:::info Fullscreen - If you allow your application to go fullscreen, this drag functionality will be disabled. -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx deleted file mode 100644 index 4b192c557..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx +++ /dev/null @@ -1,75 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| Value | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - - -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx deleted file mode 100644 index a20ae4131..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx +++ /dev/null @@ -1,113 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -

- -

- -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] - }, - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - }, - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], - "dependsOn":[ - "npm install", - "npm run build" - ] - - }, - ] -} -``` - -:::info Future Enhancement - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx deleted file mode 100644 index 28a224a26..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx +++ /dev/null @@ -1,101 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember -If you add support for a new package manager, don't forget to also update this page! -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx deleted file mode 100644 index c3b920e05..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx +++ /dev/null @@ -1,187 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx deleted file mode 100644 index 49e9cd69c..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx deleted file mode 100644 index dca7e83a3..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx deleted file mode 100644 index 5a47814cc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from 'vue-router' - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}) -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, {useHash: true}) -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx deleted file mode 100644 index a5e4eaae3..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx +++ /dev/null @@ -1,375 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -- name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. Now you need to make two action secrets on GitHub. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx deleted file mode 100644 index df75cbbc7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Templates - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -
- -
- -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx deleted file mode 100644 index b6a73efa5..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx +++ /dev/null @@ -1,137 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -

- -

- -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, ...args).then((result) => { - //do things here -}).catch((error) => { - //handle error -}); -``` - -Workaround: - -```js -var msg = "Hello " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots - //do things here -}).catch((error) => { - //handle error -}); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is *normally* due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx deleted file mode 100644 index 249ec5527..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx +++ /dev/null @@ -1,56 +0,0 @@ -# NSIS installer - -

- -
-

- -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx deleted file mode 100644 index 95db08724..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx +++ /dev/null @@ -1,356 +0,0 @@ ---- -sidebar_position: 20 ---- - -# How does it work? - -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. - -
- -
- -## The Main Application - -### Overview - -The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### Options rundown - -This example has the following options set: - -- `Title` - The text that should appear in the window's title bar -- `Width` & `Height` - The dimensions of the window -- `Assets` - The application's frontend assets -- `OnStartup` - A callback for when the window is created and is about to start loading the frontend assets -- `OnShutdown` - A callback for when the application is about to quit -- `Bind` - A slice of struct instances that we wish to expose to the frontend - -A full list of application options can be found in the [Options Reference](reference/options). - -#### Assets - -The `Assets` option is mandatory as you can't have a Wails application without frontend assets. Those assets can be any files you would expect to find in a web application - html, js, css, svg, png, etc. **There is no requirement to generate asset bundles** - plain files will do. When the application starts, it will attempt to load `index.html` from your assets and the frontend will essentially work as a browser from that point on. It is worth noting that there is no requirement on where in the `embed.FS` the files live. It is likely that the embed path uses a nested directory relative to your main application code, such as `frontend/dist`: - -```go title="main.go" -//go:embed frontend/dist -var assets embed.FS -``` - -At startup, Wails will iterate the embedded files looking for the directory containing `index.html`. All other assets will be loaded relative to this directory. - -As production binaries use the files contained in `embed.FS`, there are no external files required to be shipped with the application. - -When running in development mode using the `wails dev` command, the assets are loaded off disk, and any changes result in a "live reload". The location of the assets will be inferred from the `embed.FS`. - -More details can be found in the [Application Development Guide](guides/application-development.mdx). - -#### Application Lifecycle Callbacks - -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). - -#### Method Binding - -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. - -:::info Note - -Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 - -::: - -In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods - -This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. - -## The Frontend - -### Overview - -The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: - -- Calling bound Go methods -- Calling runtime methods - -### Calling bound Go methods - -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: - -```javascript -// ... -import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // resultを使って何かする - }) - } -``` - -The Typescript declaration file gives you the correct types for the bound methods: - -```ts -export function Greet(arg1:string):Promise; -``` - -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. - -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields! - -:::info Note -Anonymous nested structs are not supported at this time. -::: - -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. - -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. - -Example: We update our `Greet` method to accept a `Person` instead of a string: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -The `wailsjs/go/main/App.js` file will still have the following code: - -```js title="App.js" -export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); -} -``` - -But the `wailsjs/go/main/App.d.ts` file will be updated with the following code: - -```ts title="App.d.ts" -import {main} from '../models'; - -export function Greet(arg1:main.Person):Promise; -``` - -As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: - -```ts title="models.ts" -export namespace main { - - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map(elem => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -So long as you have TypeScript as part of your frontend build configuration, you can use these models in the following way: - -```js title="mycode.js" -import {Greet} from '../wailsjs/go/main/App' - import {main} from '../wailsjs/go/models' - - function generate() { - let person = new main.Person() - person.name = "Peter" - person.age = 27 - Greet(person).then((result) => { - console.log(result) - }) - } -``` - -The combination of generated bindings and TypeScript models makes for a powerful development environment. - -More information on Binding can be found in the [Binding Methods](guides/application-development.mdx#binding-methods) section of the [Application Development Guide](guides/application-development.mdx). - -### Calling runtime methods - -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro). - -[^1]: There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and workarounds for such cases. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx deleted file mode 100644 index ab616d0a6..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -Wails is a project that enables you to write desktop apps using Go and web technologies. - -Consider it a lightweight and fast Electron alternative for Go. You can easily build applications with the flexibility and power of Go, combined with a rich, modern frontend. - -### Features - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- Live development mode using the power of [Vite](https://vite.net/) -- Powerful CLI to easily Create, Build and Package applications -- A rich [runtime library](/docs/next/reference/runtime) -- Applications built with Wails are Apple & Microsoft Store compliant - - -This is [varly](https://varly.app) - a desktop application for MacOS & Windows written using Wails. Not only does it look great, it uses native menus and translucency - everything you'd expect from a modern native app. - -

- - - -

- -### Quick Start Templates - -Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template. - -### Native Elements - -Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications. - -**It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. - -### Go & Javascript Interoperability - -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### Runtime Library - -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. - -### Live Development Experience - -#### Automatic Rebuilds - -When you run your application in "dev" mode, Wails will build your application as a native desktop application, but will read your assets from disk. It will detect any changes to your Go code and automatically rebuild and relaunch your application. - -#### Automatic Reloads - -When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately. - -#### Develop your application in a Browser - -If you prefer to debug and develop in a browser then Wails has you covered. The running application also has a webserver that will run your application in any browser that connects to it. It will even refresh when your assets change on disk. - -### Production-ready Native Binaries - -When you're ready to do the final build of your application, the CLI will compile it down to a single executable, with all the assets bundled into it. On Windows and MacOS, it is possible to create a native package for distribution. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built. - -### Tooling - -The Wails CLI provides a hassle-free way to generate, build and bundle your applications. It will do the heavy lifting of creating icons, compiling your application with optimal settings and delivering a distributable, production ready binary. Choose from a number of starter templates to get up and running quickly! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx deleted file mode 100644 index 5a00db158..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -Example: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -Example: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | false | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::info UPX on Apple Silicon - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - -:::info UPX on Windows - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.17 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx deleted file mode 100644 index 565c8cb48..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx +++ /dev/null @@ -1,266 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -```` It is also possible to dynamically update the menu, by updating the menu struct and calling \[MenuUpdateApplicationMenu\](../reference/runtime/menu.mdx#menuupdateapplicationmenu). - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -- `backspace` -- `tab` -- `return` -- `enter` -- `escape` -- `left` -- `right` -- `up` -- `down` -- `space` -- `delete` -- `home` -- `end` -- `page up` -- `page down` -- `f1` -- `f2` -- `f3` -- `f4` -- `f5` -- `f6` -- `f7` -- `f8` -- `f9` -- `f10` -- `f11` -- `f12` -- `f13` -- `f14` -- `f15` -- `f16` -- `f17` -- `f18` -- `f19` -- `f20` -- `f21` -- `f22` -- `f23` -- `f24` -- `f25` -- `f26` -- `f27` -- `f28` -- `f29` -- `f30` -- `f31` -- `f32` -- `f33` -- `f34` -- `f35` -- `numlock` - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - -Roles are currently supported on Mac only. - -::: - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| Role | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx deleted file mode 100644 index 797ac7932..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx +++ /dev/null @@ -1,627 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Options - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -Type: string - -### Width - -The initial width of the window. - -Name: Width - -### Height - -The initial height of the window. - -Type: [AppearanceType](#appearance-type) - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -Type: int - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -Type: int - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -Type: int - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -Type: bool - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -Type: bool - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -Type: bool - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -Type: bool - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -Type: int -### HideWindowOnClose - -By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead. - -hide the window instead. - -Type: int - -### BackgroundColour - -This value is the default background colour of the window. Default: white - -Type: *options.RGBA Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -Type: int - -### Assets - -The frontend assets to be used by the application. Requires an `index.html` file. - -Name: StartHidden - -### AssetsHandler - - - -The assets handler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the `assets` because the file is not found. - -| Value | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -Type: http.Handler - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -NOTE: On Mac, if no menu is specified, a default menu will be created. ::: - -Type: \*menu.Menu - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: bool - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Name: Assets - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: logger.LogLevel - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -Name: AssetsHandler - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -Name: AssetsHandler - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -Name: AssetsHandler - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -Type: func(ctx context.Context) bool - -### WindowStartState - -Defines how the window should present itself at startup. - -| Value | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -Name: Logger - -### CSSDragProperty - -Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. - -Type: string - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. - -Type: string - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -Default: Logger to Stdout - -### Windows - -This defines [Windows specific options](#windows-specific-options). - -Name: LogLevel - -### Mac - -This defines [Mac specific options](#mac-specific-options). - -Default: `Info` in dev mode, `Error` in production mode - -### Linux - -This defines [Linux specific options](#linux-specific-options). - -Name: LogLevelProduction - -## Windows Specific Options - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: int - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: int - -### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -Type: int - -### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -Type: int - -### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -Type: string - -### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -Type: string - -### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| Value | Description | -| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | *Default*. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -Type: `windows.Theme` - -### CustomTheme - -Name: WindowStartState - -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. - -Type: `windows.CustomTheme` - -#### Name: CustomTheme - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -### Messages - -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. - -Type: `*windows.Messages` - -Customise this for any language you choose to support. - -### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -Type: \*mac.Options - -### OnSuspend - -If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) - -Name: Linux - -### OnResume - -If set, this function will be called when windows resumes from low power mode (suspend/hibernate) - -Name: Linux - -## Mac Specific Options - -### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -Type: bool - - -### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -Name: WindowIsTranslucent - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: int - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: int - -### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -Name: DisableFramelessWindowDecorations - - -#### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance type - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| Value | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### About struct - -```go -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -
- -
- -
- -When clicked, that will open an about message box: - -
- -
- -
- -## Linux Specific Options - -### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -Type: []byte - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx deleted file mode 100644 index 3dc1cf002..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. If this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. If this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx deleted file mode 100644 index 976ca1d80..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -These methods are related to the system browser. - -### BrowserOpenURL - -Opens the given URL in the system browser. - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` - diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx deleted file mode 100644 index bf1dd7246..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Dialog - -This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. - -:::info Javascript - Dialog is currently unsupported in the JS runtime. -::: - -### OpenDirectoryDialog - -Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected directory (blank if the user cancelled) or an error - -### OpenFileDialog - -Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected file (blank if the user cancelled) or an error - -### OpenMultipleFilesDialog - -Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -Returns: Selected files (nil if the user cancelled) or an error - -### SaveFileDialog - -Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions). - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -Returns: The selected file (blank if the user cancelled) or an error - -### MessageDialog - -Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions). - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -Returns: The text of the selected button or an error - -## Options - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| ResolvesAliases | If true, returns the file not the alias | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------------------------------- | --- | --- | --- | -| Type | The type of message dialog, eg question, info... | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| Message | The message to show the user | ✅ | ✅ | ✅ | -| Buttons | A list of button titles | | ✅ | | -| DefaultButton | The button with this text should be treated as default. Bound to `return` | | ✅ | | -| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | ✅ | | - -#### Windows - -Windows has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue" - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -the first button is shown as default: - -
- -
- -
- -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -
- -
- -
- -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -
- -
- -
-
-
- -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx deleted file mode 100644 index 75e8b0a50..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Events - -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. - -### EventsOn - -This method sets up a listener for the given event name. When an event of type `eventName` is [emitted](#EventsEmit), the callback is triggered. Any additional data sent with the emitted event will be passed to the callback. - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### EventsOff - -This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`. - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -This method sets up a listener for the given event name, but will only trigger once. - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### EventsOnMultiple - -This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times. - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### EventsEmit - -This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` - diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx deleted file mode 100644 index 6c02c71cd..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. - -It has utility methods for: - -- [Window](window.mdx) -- [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) -- [Browser](browser.mdx) -- [Log](log.mdx) - -The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks. - -:::info Note - -Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). - -::: - -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. - -### Hide - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -Hides the application. - -:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: - -### Show - -Shows the application. - -:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### Quit - -Quits the application. - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### Environment - -Returns details of the current environment. - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` -JS: -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx deleted file mode 100644 index e5e6ea7ac..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Log - -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: - -- Trace -- Debug -- Info -- Warning -- Error -- Fatal - -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. - -### LogPrint - -Logs the given message as a raw message. - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -Logs the given message as a raw message. - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -Logs the given message at the `Trace` log level. - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -Logs the given message at the `Trace` log level. - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -Logs the given message at the `Debug` log level. - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -Logs the given message at the `Debug` log level. - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -Logs the given message at the `Info` log level. - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -Logs the given message at the `Info` log level. - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -Logs the given message at the `Warning` log level. - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -Logs the given message at the `Warning` log level. - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -Logs the given message at the `Error` log level. - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -Logs the given message at the `Error` log level. - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -Logs the given message at the `Fatal` log level. - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -Logs the given message at the `Fatal` log level. - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -Sets the log level. In Javascript, the number relates to the following log levels: - -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## Using a Custom Logger - -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx deleted file mode 100644 index 226ff2c68..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -These methods are related to the application menu. - -:::info Javascript - Menu is currently unsupported in the JS runtime. -::: - -### MenuSetApplicationMenu - -Sets the application menu to the given [menu](../menus.mdx). - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx deleted file mode 100644 index d33db2cbf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx +++ /dev/null @@ -1,209 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Window - -These methods give control of the application window. - -### WindowSetTitle - -Sets the text in the window title bar. - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -Makes the window full screen. - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -Restores the previous window dimensions and position prior to full screen. - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -Returns true if the window is full screen. - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### WindowCenter - -Centers the window on the monitor the window is currently on. - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowReload - -Performs a "reload" (Reloads current page). - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -Reloads the application frontend. - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windows only. - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -Sets window theme to system default (dark/light). - -### WindowSetLightTheme - -Windows only. - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -Sets window theme to light. - -### WindowSetDarkTheme - -Windows only. - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -Sets window theme to dark. - -### WindowShow - -Shows the window, if it is currently hidden. - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -Hides the window, if it is currently visible. - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -Returns true if the window not minimised, maximised or fullscreen. - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### WindowSetSize - -Sets the width and height of the window. - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -Gets the width and height of the window. - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### WindowSetMinSize - -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -Sets the window AlwaysOnTop or not on top. - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowSetPosition - -Sets the window position relative to the monitor the window is currently on. - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -Gets the window position relative to the monitor the window is currently on. - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### WindowMaximise - -Maximises the window to fill the screen. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -Restores the window to the dimensions and position prior to maximising. - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -Returns true if the window is maximised. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowToggleMaximise - -Toggles between Maximised and UnMaximised. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -Minimises the window. - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -Restores the window to the dimensions and position prior to minimising. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -Returns true if the window is minimised. - -Go: `WindowIsMinimised(ctx context.Context) bool` JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. - -Valid values for R, G, B and A are 0-255. - -Any value that is not 0 will be considered 255. Any value that is not 0 will be considered 255. ::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript Object Definitions - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx deleted file mode 100644 index f4845fdbe..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -
- -
- -
- -:::note This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). ::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. - - - - - diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx deleted file mode 100644 index d1b8e9f98..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - -- Create a new Wails application -- Build the application -- Run the application - -:::note -This tutorial uses Windows as the target platform. Output will vary slightly -depending on your operating system. -::: - -## Create a new Wails application - -To create a new Wails application using the default vanilla JS template, you need to run the following command: - -```bash -wails init -n helloworld -``` - -You should see something similar to the following: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## Build the application - -To build the application, change to the new `helloworld` project directory and run the following command: - -```bash -wails build -``` - -You should see something like the following: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -This has compiled the application and saved it in the `build/bin` directory. - -## Run the application - -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: - -
- -
- -
- -We can run it by simply double-clicking the `helloworld.exe` file. - -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. - -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. - -You should see the application working as expected: - -
- -
-
diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx deleted file mode 100644 index 49cb7843b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Discord](https://discord.com/invite/JDdSxwjhGf) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx deleted file mode 100644 index 3c24c5d7e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Templates - -This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide. - -To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]` - -If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used. - -Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning Attention - - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs -- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3 -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/building.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/building.mdx deleted file mode 100644 index a1f69f033..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Compiling your Project - -From the project directory, run `wails build`. This will compile your project and save the production-ready binary in the `build/bin` directory. - -If you run the binary, you should see the default application: - -```mdx-code-block -
- -
-
-``` - -For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx deleted file mode 100644 index a0075ef69..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Developing your Application - -You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - -- Build your application and run it -- Bind your Go code to the frontend so it can be called from Javascript -- Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - -To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). - -Coming soon: Tutorial diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx deleted file mode 100644 index 3428906ef..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Creating a Project - -## Project Generation - -Now that the CLI is installed, you can generate a new project by using the `wails init` command. - -Pick your favourite framework: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte - -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react - -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks. - -To see the other options available, you can run `wails init -help`. More details can be found in the [CLI Reference](../reference/cli.mdx#init). - -## Project Layout - -Wails projects have the following layout: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### Project structure rundown - -- `/main.go` - The main application -- `/frontend/` - Frontend project files -- `/build/` - Project build directory -- `/build/appicon.png` - The application icon -- `/build/darwin/` - Mac specific project files -- `/build/windows/` - Windows specific project files -- `/wails.json` - The project configuration -- `/go.mod` - Go module file -- `/go.sum` - Go module checksum file - -The `frontend` directory has nothing specific to Wails and can be any frontend project of your choosing. - -The `build` directory is used during the build process. These files may be updated to customise your builds. If files are removed from the build directory, default versions will be regenerated. - -The default module name in `go.mod` is "changeme". You should change this to something more appropriate. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx deleted file mode 100644 index 858100bbe..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Installation - -## Supported Platforms - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## Dependencies - -Wails has a number of common dependencies that are required before installation: - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://go.dev/dl/). - -Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: - -- Check Go is installed correctly: `go version` -- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin` - -### NPM - -Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against. - -Run `npm --version` to verify. - -## Platform Specific Dependencies - -You will also need to install platform specific dependencies: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails requires that the xcode command line tools are installed. This can be - done by running xcode-select --install. - - - Wails requires that the WebView2 runtime is installed. Some Windows installations will already have this installed. You can check using the wails doctor command. - - - Linux required the standard gcc build tools plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run wails doctor after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the Add Linux Distro guide. - - -``` - -## Optional Dependencies - -- [UPX](https://upx.github.io/) for compressing your applications. - -## Installing Wails - -Run `go install github.com/wailsapp/wails/v2/cmd/wails@latest` to install the Wails CLI. - -## System Check - -Running `wails doctor` will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/application-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx deleted file mode 100644 index 40a779381..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,134 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -```mdx-code-block -

- -

-``` - -However, if we request `go.mod`, we will see the following output: - -```mdx-code-block -

- -

-``` - -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -```mdx-code-block -

- -

-``` - -:::warning - - -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access to your filesystem. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx deleted file mode 100644 index a9370f36f..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx +++ /dev/null @@ -1,85 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info Fullscreen - - -If you allow your application to go fullscreen, this drag functionality will be disabled. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frontend.mdx deleted file mode 100644 index 4b192c557..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/frontend.mdx +++ /dev/null @@ -1,75 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| Value | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - - -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx deleted file mode 100644 index 5187065ad..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx +++ /dev/null @@ -1,116 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] - }, - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - }, - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], - "dependsOn":[ - "npm install", - "npm run build" - ] - - }, - ] -} -``` - -:::info Future Enhancement - - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx deleted file mode 100644 index 882f8d258..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,104 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember - - -If you add support for a new package manager, don't forget to also update this page! - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx deleted file mode 100644 index 55b791e61..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx +++ /dev/null @@ -1,187 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/mouse-buttons.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/mouse-buttons.mdx deleted file mode 100644 index 49e9cd69c..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx deleted file mode 100644 index d5c6c5a29..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx +++ /dev/null @@ -1,42 +0,0 @@ -# Obfuscated Builds - -Wails includes support for obfuscating your application using [garble](https://github.com/burrowers/garble). - -To produce an obfuscated build, you can use the `-obfuscate` flag with the `wails build` command: - -```bash -wails build -obfuscated -``` - -To customise the obfuscation settings, you can use the `-garbleargs` flag: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -These settings may be persisted in your [project config](../reference/project-config). - -## How it works - -In a standard build, all bound methods are available in the frontend under the `window.go` variable. When these methods are called, the corresponding backend method is called using the fully qualified function name. When using an obfuscated build, methods are bound using an ID instead of a name. The bindings generated in the `wailsjs` directory use these IDs to call the backend functions. - -:::note - - -To ensure that your application will work in obfuscated mode, you must use the generated bindings under the `wailsjs` directory in your application. - -::: - - -## Example - -Importing the "Greet" method from the bindings like this: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -will ensure that the method will work correctly in obfuscated mode, as the bindings will be regenerated with IDs and the call mechanism updated. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/routing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/routing.mdx deleted file mode 100644 index 5a47814cc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from 'vue-router' - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}) -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, {useHash: true}) -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/signing.mdx deleted file mode 100644 index a5e4eaae3..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/signing.mdx +++ /dev/null @@ -1,375 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -- name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. Now you need to make two action secrets on GitHub. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx deleted file mode 100644 index aa1da16a4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,148 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -```mdx-code-block -

- -

-``` - -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Workaround: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is _normally_ due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows-installer.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows-installer.mdx deleted file mode 100644 index b0b6e9e1f..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS installer - -```mdx-code-block -

- -
-

-``` - -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx deleted file mode 100644 index a0bde09e6..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx +++ /dev/null @@ -1,364 +0,0 @@ ---- -sidebar_position: 20 ---- - -# How does it work? - -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. - -```mdx-code-block -
- -
-``` - -## The Main Application - -### Overview - -The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### Options rundown - -This example has the following options set: - -- `Title` - The text that should appear in the window's title bar -- `Width` & `Height` - The dimensions of the window -- `Assets` - The application's frontend assets -- `OnStartup` - A callback for when the window is created and is about to start loading the frontend assets -- `OnShutdown` - A callback for when the application is about to quit -- `Bind` - A slice of struct instances that we wish to expose to the frontend - -A full list of application options can be found in the [Options Reference](reference/options). - -#### Assets - -The `Assets` option is mandatory as you can't have a Wails application without frontend assets. Those assets can be any files you would expect to find in a web application - html, js, css, svg, png, etc. **There is no requirement to generate asset bundles** - plain files will do. When the application starts, it will attempt to load `index.html` from your assets and the frontend will essentially work as a browser from that point on. It is worth noting that there is no requirement on where in the `embed.FS` the files live. It is likely that the embed path uses a nested directory relative to your main application code, such as `frontend/dist`: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -At startup, Wails will iterate the embedded files looking for the directory containing `index.html`. All other assets will be loaded relative to this directory. - -As production binaries use the files contained in `embed.FS`, there are no external files required to be shipped with the application. - -When running in development mode using the `wails dev` command, the assets are loaded off disk, and any changes result in a "live reload". The location of the assets will be inferred from the `embed.FS`. - -More details can be found in the [Application Development Guide](guides/application-development.mdx). - -#### Application Lifecycle Callbacks - -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). - -#### Method Binding - -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. - -:::info Note - - -Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 - -::: - - -In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods - -This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. - -## The Frontend - -### Overview - -The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: - -- Calling bound Go methods -- Calling runtime methods - -### Calling bound Go methods - -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: - -```javascript -// ... -import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // resultを使って何かする - }) - } -``` - -The Typescript declaration file gives you the correct types for the bound methods: - -```ts -export function Greet(arg1:string):Promise; -``` - -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. - -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields! - -:::info Note - - -Anonymous nested structs are not supported at this time. - -::: - - -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. - -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. - -Example: We update our `Greet` method to accept a `Person` instead of a string: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -The `wailsjs/go/main/App.js` file will still have the following code: - -```js title="App.js" -export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); -} -``` - -But the `wailsjs/go/main/App.d.ts` file will be updated with the following code: - -```ts title="App.d.ts" -import {main} from '../models'; - -export function Greet(arg1:main.Person):Promise; -``` - -As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: - -```ts title="models.ts" -export namespace main { - - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map(elem => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -So long as you have TypeScript as part of your frontend build configuration, you can use these models in the following way: - -```js title="mycode.js" -import {Greet} from '../wailsjs/go/main/App' - import {main} from '../wailsjs/go/models' - - function generate() { - let person = new main.Person() - person.name = "Peter" - person.age = 27 - Greet(person).then((result) => { - console.log(result) - }) - } -``` - -The combination of generated bindings and TypeScript models makes for a powerful development environment. - -More information on Binding can be found in the [Binding Methods](guides/application-development.mdx#binding-methods) section of the [Application Development Guide](guides/application-development.mdx). - -### Calling runtime methods - -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro). - -[^1]: There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and workarounds for such cases. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx deleted file mode 100644 index 8e38bff21..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -Wails is a project that enables you to write desktop apps using Go and web technologies. - -Consider it a lightweight and fast Electron alternative for Go. You can easily build applications with the flexibility and power of Go, combined with a rich, modern frontend. - -### Features - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- Live development mode using the power of [Vite](https://vitejs.dev/) -- Powerful CLI to easily Create, Build and Package applications -- A rich [runtime library](/docs/reference/runtime/intro) -- Applications built with Wails are Apple & Microsoft Store compliant - -This is [varly](https://varly.app) - a desktop application for MacOS & Windows written using Wails. Not only does it look great, it uses native menus and translucency - everything you'd expect from a modern native app. - -```mdx-code-block -

- - - -

-``` - -### Quick Start Templates - -Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template. - -### Native Elements - -Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications. - -**It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. - -### Go & Javascript Interoperability - -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### Runtime Library - -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. - -### Live Development Experience - -#### Automatic Rebuilds - -When you run your application in "dev" mode, Wails will build your application as a native desktop application, but will read your assets from disk. It will detect any changes to your Go code and automatically rebuild and relaunch your application. - -#### Automatic Reloads - -When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately. - -#### Develop your application in a Browser - -If you prefer to debug and develop in a browser then Wails has you covered. The running application also has a webserver that will run your application in any browser that connects to it. It will even refresh when your assets change on disk. - -### Production-ready Native Binaries - -When you're ready to do the final build of your application, the CLI will compile it down to a single executable, with all the assets bundled into it. On Windows and MacOS, it is possible to create a native package for distribution. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built. - -### Tooling - -The Wails CLI provides a hassle-free way to generate, build and bundle your applications. It will do the heavy lifting of creating icons, compiling your application with optimal settings and delivering a distributable, production ready binary. Choose from a number of starter templates to get up and running quickly! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx deleted file mode 100644 index ecb25d43a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -Example: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -Example: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning Attention - - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | | -| -obfuscate | Obfuscate the application using [garble](https://github.com/burrowers/garble) | false | -| -garbleargs | Arguments to pass to garble | `-literals -tiny -seed=random` | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::info UPX on Apple Silicon - - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - - -:::info UPX on Windows - - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx deleted file mode 100644 index a53759904..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -```` It is also possible to dynamically update the menu, by updating the menu struct and calling \[MenuUpdateApplicationMenu\](../reference/runtime/menu.mdx#menuupdateapplicationmenu). - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -| | | | | -|:-----------:|:-----:|:-----:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `f39` | | -| `page down` | `f15` | `f30` | | - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - - -Roles are currently supported on Mac only. - -::: - - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| Role | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx deleted file mode 100644 index 87f94aec5..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx +++ /dev/null @@ -1,666 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Options - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -Name: Title
Type: `string` - -### Width - -The initial width of the window. - -Name: Width
Type: `int`
Default: 1024. - -### Height - -The initial height of the window. - -Name: Height
Type: `int`
Default: 768 - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -Name: DisableResize
Type: `bool` - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -Name: Fullscreen
Type: `bool` - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -Name: Frameless
Type: `bool` - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -Name: MinWidth
Type: `int` - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -Name: MinHeight
Type: `int` - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -Name: MaxWidth
Type: `int` - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -Name: MaxHeight
Type: `int` - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -Name: StartHidden
Type: `bool` - -### HideWindowOnClose - -By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead. - -hide the window instead. - -Name: HideWindowOnClose
Type: `bool` - -### BackgroundColour - -This value is the default background colour of the window. Default: white - -Name: BackgroundColour
Type: `*options.RGBA`
Default: white - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -Name: AlwaysOnTop
Type: `bool` - -### Assets - -The frontend assets to be used by the application. Requires an `index.html` file. - -Name: Assets
Type: `embed.FS` - -### AssetsHandler - - - -The assets handler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the `assets` because the file is not found. - -| Value | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -Name: AssetsHandler
Type: `http.Handler` - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -:::note - - -On Mac, if no menu is specified, a default menu will be created. - -::: - - -Name: Menu
Type: `*menu.Menu` - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Name: Logger
Type: `logger.Logger`
Default: Logs to Stdout - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Name: LogLevel
Type: `logger.LogLevel`
Default: `Info` in dev mode, `Error` in production mode - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Name: LogLevelProduction
Type: `logger.LogLevel`
Default: `Error` - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -Name: OnStartup
Type: `func(ctx context.Context)` - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -Name: OnDomReady
Type: `func(ctx context.Context)` - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -Name: OnShutdown
Type: `func(ctx context.Context)` - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -Name: OnBeforeClose
Type: `func(ctx context.Context) bool` - -### WindowStartState - -Defines how the window should present itself at startup. - -| Value | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -Name: WindowStartState
Type: `options.WindowStartState` - -### CSSDragProperty - -Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. - -Name: CSSDragProperty
Type: `string` - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. - -Name: CSSDragValue
Type: `string` - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -Name: Bind
Type: `[]interface{}` - -### Windows - -This defines [Windows specific options](#windows). - -Name: Windows
Type: `*windows.Options` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Name: WebviewIsTransparent
Type: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent). - -For Windows 11 versions before build 22621, this will use the [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw) method for translucency, which can be slow. For Windows 11 versions after build 22621, this will enable the newer translucency types that are much faster. By default, the type of translucency used will be determined by Windows. To configure this, use the [BackdropType](#BackdropType) option. - -Name: WindowIsTranslucent
Type: `bool` - -#### BackdropType - -:::note - - -Requires Windows 11 build 22621 or later. - -::: - - -Sets the translucency type of the window. This is only applicable if [WindowIsTranslucent](#WindowIsTranslucent) is set to `true`. - -Name: BackdropType
Type `windows.BackdropType` - -The value can be one of the following: - -| Value | Description | -| ------- | ----------------------------------------------------------------------------------------- | -| Auto | Let Windows decide which backdrop to use | -| None | Do not use translucency | -| Acrylic | Use [Acrylic](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) effect | -| Mica | Use [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) effect | -| Tabbed | Use Tabbed. This is a backdrop that is similar to Mica. | - -#### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -Name: DisableWindowIcon
Type: `bool` - -#### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -Name: DisableFramelessWindowDecorations
Type: `bool` - -#### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -Name: WebviewUserDataPath
Type: `string` - -#### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -Name: WebviewBrowserPath
Type: `string` - -#### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| Value | Description | -| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | *Default*. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -Name: Theme
Type: `windows.Theme` - -#### CustomTheme - -:::note - - -Minimum Windows Version: Windows 10/11 2009/21H2 Build 22000 - -::: - - -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. - -Name: CustomTheme
Type: `windows.CustomTheme` - -##### CustomTheme type - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### Messages - -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. - -Name: Messages
Type: `*windows.Messages` - -Customise this for any language you choose to support. - -#### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -Name: ResizeDebounceMS
Type: `uint16` - -#### OnSuspend - -If set, this function will be called when Windows initiates a switch to low power mode (suspend/hibernate) - -Name: OnSuspend
Type: `func()` - -#### OnResume - -If set, this function will be called when Windows resumes from low power mode (suspend/hibernate) - -Name: OnResume
Type: `func()` - -### Mac - -This defines [Mac specific options](#mac). - -Name: Mac
Type: `*mac.Options` - -#### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -Name: TitleBar
Type: [`*mac.TitleBar`](#titlebar-struct) - -##### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -Name: Appearance
Type: [`mac.AppearanceType`](#appearance-type) - -##### Appearance type - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| Value | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Name: WebviewIsTransparent
Type: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Name: WindowIsTranslucent
Type: `bool` - -#### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -Name: About
Type: [`*mac.AboutInfo`](#about-struct) - -##### About struct - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -```mdx-code-block -
- -
-
-``` - -When clicked, that will open an about message box: - -```mdx-code-block -
- -
-
-``` - -### Linux - -This defines [Linux specific options](#linux). - -Name: Linux
Type: `*linux.Options` - -#### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -Name: Icon
Type: `[]byte` - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx deleted file mode 100644 index cc9d01aa6..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/browser.mdx deleted file mode 100644 index c71ec4a3a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -These methods are related to the system browser. - -### BrowserOpenURL - -Opens the given URL in the system browser. - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx deleted file mode 100644 index d2aa9ab6a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Dialog - -This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. - -:::info Javascript - - -Dialog is currently unsupported in the JS runtime. - -::: - - -### OpenDirectoryDialog - -Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected directory (blank if the user cancelled) or an error - -### OpenFileDialog - -Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected file (blank if the user cancelled) or an error - -### OpenMultipleFilesDialog - -Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -Returns: Selected files (nil if the user cancelled) or an error - -### SaveFileDialog - -Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions). - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -Returns: The selected file (blank if the user cancelled) or an error - -### MessageDialog - -Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions). - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -Returns: The text of the selected button or an error - -## Options - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| ResolvesAliases | If true, returns the file not the alias | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------------------------------- | --- | --- | --- | -| Type | The type of message dialog, eg question, info... | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| Message | The message to show the user | ✅ | ✅ | ✅ | -| Buttons | A list of button titles | | ✅ | | -| DefaultButton | The button with this text should be treated as default. Bound to `return` | | ✅ | | -| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | ✅ | | - -#### Windows - -Windows has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue" - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -the first button is shown as default: - -```mdx-code-block -
- -
-
-``` - -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -```mdx-code-block -
- -
-
-``` - -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -```mdx-code-block -
- -
-
-
-
-``` - -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx deleted file mode 100644 index 48d27f996..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Events - -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. - -### EventsOn - -This method sets up a listener for the given event name. When an event of type `eventName` is [emitted](#EventsEmit), the callback is triggered. Any additional data sent with the emitted event will be passed to the callback. - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### EventsOff - -このメソッドは、指定されたイベント名のイベントリスナー設定を解除します。引数の`additionalEventNames`を使用することで、複数のリスナーを一度に解除できます。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -This method sets up a listener for the given event name, but will only trigger once. - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### EventsOnMultiple - -This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times. - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### EventsEmit - -This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx deleted file mode 100644 index 9cbe28096..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. - -ユーティリティメソッドには次のようなものがあります: - -- [Window](window.mdx) -- [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) -- [Browser](browser.mdx) -- [Log](log.mdx) - -The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks. - -:::info Note - - -Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). - -::: - - -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. - -### Hide - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -Hides the application. - -:::info Note - - -Macでこのメソッドを使用すると、標準のMacアプリケーションにおけるメニュー項目の`Hide`と同じ方法で、アプリケーションが非表示になります。 This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. - -::: - - -### Show - -Shows the application. - -:::info Note - - -Macでこのメソッドを使用すると、アプリケーションがフォアグラウンドに戻ります。 For Windows and Linux, this is currently the same as `WindowShow`. - -::: - - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### Quit - -Quits the application. - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### Environment - -Returns details of the current environment. - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx deleted file mode 100644 index e5e6ea7ac..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Log - -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: - -- Trace -- Debug -- Info -- Warning -- Error -- Fatal - -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. - -### LogPrint - -Logs the given message as a raw message. - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -Logs the given message as a raw message. - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -Logs the given message at the `Trace` log level. - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -Logs the given message at the `Trace` log level. - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -Logs the given message at the `Debug` log level. - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -Logs the given message at the `Debug` log level. - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -Logs the given message at the `Info` log level. - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -Logs the given message at the `Info` log level. - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -Logs the given message at the `Warning` log level. - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -Logs the given message at the `Warning` log level. - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -Logs the given message at the `Error` log level. - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -Logs the given message at the `Error` log level. - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -Logs the given message at the `Fatal` log level. - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -Logs the given message at the `Fatal` log level. - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -Sets the log level. In Javascript, the number relates to the following log levels: - -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## Using a Custom Logger - -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx deleted file mode 100644 index 68feb7a3f..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -These methods are related to the application menu. - -:::info Javascript - - -Menu is currently unsupported in the JS runtime. - -::: - - -### MenuSetApplicationMenu - -Sets the application menu to the given [menu](../menus.mdx). - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx deleted file mode 100644 index 6bc4099cb..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx +++ /dev/null @@ -1,215 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Window - -These methods give control of the application window. - -### WindowSetTitle - -Sets the text in the window title bar. - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -Makes the window full screen. - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -Restores the previous window dimensions and position prior to full screen. - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -Returns true if the window is full screen. - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### WindowCenter - -Centers the window on the monitor the window is currently on. - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowReload - -Performs a "reload" (Reloads current page). - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -Reloads the application frontend. - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windows only. - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -Sets window theme to system default (dark/light). - -### WindowSetLightTheme - -Windows only. - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -Sets window theme to light. - -### WindowSetDarkTheme - -Windows only. - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -Sets window theme to dark. - -### WindowShow - -Shows the window, if it is currently hidden. - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -Hides the window, if it is currently visible. - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -Returns true if the window not minimised, maximised or fullscreen. - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### WindowSetSize - -Sets the width and height of the window. - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -Gets the width and height of the window. - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### WindowSetMinSize - -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -Sets the window AlwaysOnTop or not on top. - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowSetPosition - -Sets the window position relative to the monitor the window is currently on. - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -Gets the window position relative to the monitor the window is currently on. - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### WindowMaximise - -Maximises the window to fill the screen. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -Restores the window to the dimensions and position prior to maximising. - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -Returns true if the window is maximised. - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### WindowToggleMaximise - -Toggles between Maximised and UnMaximised. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -Minimises the window. - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -Restores the window to the dimensions and position prior to minimising. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -Returns true if the window is minimised. - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. - -Valid values for R, G, B and A are 0-255. - -:::info Windows - - -On Windows, only alpha values of 0 or 255 are supported. Any value that is not 0 will be considered 255. - -::: - - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript Object Definitions - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx deleted file mode 100644 index 0910a4060..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -```mdx-code-block -
- -
-
-``` - -:::note - - -This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). - -::: - - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - - - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx deleted file mode 100644 index 3e198f06b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - -- Create a new Wails application -- Build the application -- Run the application - -:::note - - -This tutorial uses Windows as the target platform. Output will vary slightly depending on your operating system. - -::: - - -## Create a new Wails application - -To create a new Wails application using the default vanilla JS template, you need to run the following command: - -```bash -wails init -n helloworld -``` - -You should see something similar to the following: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## Build the application - -To build the application, change to the new `helloworld` project directory and run the following command: - -```bash -wails build -``` - -You should see something like the following: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -This has compiled the application and saved it in the `build/bin` directory. - -## Run the application - -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: - -```mdx-code-block -
- -
-
-``` - -We can run it by simply double-clicking the `helloworld.exe` file. - -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. - -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. - -You should see the application working as expected: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx deleted file mode 100644 index d7b068c42..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -sidebar_position: 1 ---- - -# テンプレート - -このページでは、コミュニティがサポートしているテンプレートを紹介しています。 このページに新たにテンプレートを含めたい場合は、このページの下側にある`このページを編集`をクリックして、プルリクエストを出してください。 独自テンプレートの作成方法については、[テンプレート](../guides/templates.mdx)ガイドをご覧ください。 - -これらのテンプレートを使用するには、`wails init -n "プロジェクト名" -t [テンプレートのリンク[@バージョン]]`コマンドを実行してください。 - -バージョンサフィックスが無い場合は、デフォルトで、メインブランチのコードテンプレートが使用されます。 バージョンサフィックスがある場合は、当該バージョンのタグに対応するコードテンプレートが使用されます。 - -例: `wails init -n "プロジェクト名" -t https://github.com/misitebao/wails-template-vue` - -:::warning 注意 - - -**Wailsプロジェクトでは、サードパーティ製テンプレートのメンテナンスは行っておらず、責任も負いません!** - -テンプレートについてよく分からない場合は、`package.json`および`wails.json`を確認し、どのようなスクリプトが実行されるのかや、どのようなパッケージがインストールされるのかを調べてください。 - -::: - - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - Wails template based on Vue ecology (Integrated TypeScript, Dark theme, Internationalization, Single page routing, TailwindCSS) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Viteを使用したVue 3 TypeScript (および機能を追加する手順) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vite、Vuex、Vue Router、SaaS、ESLint + Prettier を使用した Vue 3 TypeScript - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - TypeScript、Sass、ホットリロード、コード分割、i18n を使用した Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - reactjsを使用したテンプレート -- [wails-react-template](https://github.com/flin7/wails-react-template) - ライブ開発をサポートしたReactの最小テンプレート -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - Next.js、TypeScript を使用したテンプレート -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - Svelteを使用したテンプレート -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - SvelteおよびViteを使用したテンプレート -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - TailwindCSS v3を含んだ、SvelteおよびViteを使用したテンプレート -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - SvelteKitを使用したテンプレート - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - 関数型プログラミングと**高速な**ホットリロードを使ったGUIアプリ開発 :tada: :rocket: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - Combine the powers :muscle: of Elm + Tailwind CSS + Wails! Hot reloading supported. - -## ピュアJavaScript (バニラ) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 基本的なJavaScript、HTML、CSSのみを含むテンプレート diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx deleted file mode 100644 index b26c3c546..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# アプリの開発 - -プロジェクトディレクトリのルート上で`wails dev`コマンドを実行すると、アプリを開発モードで起動することができます。 コマンドを実行すると下記の処理が実行されます: - -- アプリをビルドしたのち、起動する -- Goのコードをフロントエンドにバインドし、Javascriptから呼び出せるようにする -- Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- ブラウザからアプリを操作できるようにする[Webサーバ](http://localhost:34115)を立ち上げる。 これにより、任意のブラウザ拡張機能を利用できる。 JavascriptのコンソールからGoのコードを呼び出すこともできる - -アプリ開発を始めるときは、プロジェクトディレクトリ上で`wails dev`コマンドを実行しましょう。 詳しくは、[こちら](../reference/cli.mdx#dev)をご覧ください。 - -近日中にチュートリアルを公開予定です。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx deleted file mode 100644 index 8ce6453d7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# プロジェクトの開始 - -## プロジェクトの生成 - -CLIのインストールが終わったら、`wails init`コマンドで新しいプロジェクトを生成しましょう。 - -好きなフレームワークを選択してください: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte - -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react - -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -様々な機能やフレームワークを提供する[コミュニティテンプレート](../community/templates.mdx)を利用することもできます。 - -プロジェクト生成時に使用可能なオプションを確認するには、`wails init -help`を実行してください。 詳しくは、[CLIリファレンス](../reference/cli.mdx#init)を参照してください。 - -## プロジェクトのディレクトリ構成 - -Wailsのプロジェクトディレクトリの構成は次のとおりです: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### プロジェクトの構造 - -- `/main.go` - アプリのメインコード -- `/frontend/` - フロントエンドのプロジェクトディレクトリ -- `/build/` - ビルドディレクトリ -- `/build/appicon.png` - アプリアイコン -- `/build/darwin/` - Mac固有のプロジェクトディレクトリ -- `/build/windows/` - Windows固有のプロジェクトディレクトリ -- `/wails.json` - プロジェクト構成ファイル -- `/go.mod` - Goモジュール定義ファイル -- `/go.sum` - Goモジュールチェックサムファイル - -`frontend`ディレクトリ内は、Wailsで決まったファイル構成等は無く、お好きなフロントエンドプロジェクトを配置することができます。 - -`build`ディレクトリは、アプリのビルド時に使用されます。 この中のファイルは、ビルドの挙動をカスタマイズするために、適宜ファイル内容を書き換えることができます。 buildディレクトリ内のファイルを削除すると、デフォルトのファイルが再生成されます。 - -`go.mod`のモジュール名は、最初は"changeme"になっています。 このモジュール名は、あなたのプロジェクトに適切な名前に変更しましょう。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx deleted file mode 100644 index 1317c1ec4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -sidebar_position: 1 ---- - -# インストール - -## サポートされているプラットフォーム - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依存関係 - -Wailsをインストールする前に、下記のものを導入しておく必要があります。 - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://go.dev/dl/). - -公式の[Goインストール手順](https://go.dev/doc/install)に従って、Goをインストールしてください。 その際、`PATH`環境変数に`~/go/bin`ディレクトリへのパスが含まれていることも確認してください。 それらが終わったら、ターミナルを再起動し、以下の確認をしてください: - -- Goが正しくインストールされているかを確認する: `go version` -- "~/go/bin"のディレクトリパスがPATH環境変数に含まれているか確認する: `echo $PATH | grep go/bin` - -### NPM - -[Nodeダウンロードページ](https://nodejs.org/ja/download/)からNPMをダウンロードしてください。 最新版を利用することをお勧めします。なぜなら、私たちは最新版に対してテストを実施しているためです。 - -`npm --version`を実行して、インストールが完了しているかを確認してください。 - -## プラットフォーム固有の依存関係 - -開発作業を行うプラットフォームによって、必要な依存関係が存在します: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails requires that the xcode command line tools are installed. This can be - done by running xcode-select --install. - - - Wails requires that the WebView2 runtime is installed. Some Windows installations will already have this installed. You can check using the wails doctor command. - - - Linux required the standard gcc build tools plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run wails doctor after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the Add Linux Distro guide. - - -``` - -## 任意の依存関係 - -- [UPX](https://upx.github.io/)を導入することで、構築したアプリを圧縮できます。 - -## Wailsのインストール - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest`を実行して、Wails CLIをインストールしてください。 - -## システムチェック - -`wails doctor`を実行すると、必要な依存関係が正しくインストールされているかを確認することができます。 正しくインストールされていない場合は、その内容をあなたにお知らせして、どうすれば解決できるかを教えてくれます。 - -## `wails`コマンドが見つからないのですが? - -`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx deleted file mode 100644 index e4c199594..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,134 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -```mdx-code-block -

- -

-``` - -However, if we request `go.mod`, we will see the following output: - -```mdx-code-block -

- -

-``` - -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -```mdx-code-block -

- -

-``` - -:::warning - - -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access to your filesystem. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx deleted file mode 100644 index a9370f36f..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx +++ /dev/null @@ -1,85 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info Fullscreen - - -If you allow your application to go fullscreen, this drag functionality will be disabled. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx deleted file mode 100644 index 29e442c5e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx +++ /dev/null @@ -1,75 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| 値 | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - - -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx deleted file mode 100644 index 7649030a2..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx +++ /dev/null @@ -1,128 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info Future Enhancement - - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx deleted file mode 100644 index 882f8d258..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,104 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember - - -If you add support for a new package manager, don't forget to also update this page! - -::: diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx deleted file mode 100644 index 55b791e61..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx +++ /dev/null @@ -1,187 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx deleted file mode 100644 index 49e9cd69c..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx deleted file mode 100644 index d5c6c5a29..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx +++ /dev/null @@ -1,42 +0,0 @@ -# Obfuscated Builds - -Wails includes support for obfuscating your application using [garble](https://github.com/burrowers/garble). - -To produce an obfuscated build, you can use the `-obfuscate` flag with the `wails build` command: - -```bash -wails build -obfuscated -``` - -To customise the obfuscation settings, you can use the `-garbleargs` flag: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -These settings may be persisted in your [project config](../reference/project-config). - -## How it works - -In a standard build, all bound methods are available in the frontend under the `window.go` variable. When these methods are called, the corresponding backend method is called using the fully qualified function name. When using an obfuscated build, methods are bound using an ID instead of a name. The bindings generated in the `wailsjs` directory use these IDs to call the backend functions. - -:::note - - -To ensure that your application will work in obfuscated mode, you must use the generated bindings under the `wailsjs` directory in your application. - -::: - - -## Example - -Importing the "Greet" method from the bindings like this: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -will ensure that the method will work correctly in obfuscated mode, as the bindings will be regenerated with IDs and the call mechanism updated. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx deleted file mode 100644 index a3444f98e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from 'vue-router' - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}) -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx deleted file mode 100644 index 168efa461..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx +++ /dev/null @@ -1,376 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. It should start with _-----BEGIN CERTIFICATE-----_ and end with _-----END CERTIFICATE-----_. Now you need to make two action secrets on GitHub. Navigate to _Settings -> Secrets -> Actions_ and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx deleted file mode 100644 index e8833fd8d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# テンプレート - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -```mdx-code-block -
- -
-``` - -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx deleted file mode 100644 index c5d62774b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,148 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## `wails`コマンドが見つからないのですが? - -`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。 - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -```mdx-code-block -

- -

-``` - -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Workaround: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is _normally_ due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx deleted file mode 100644 index 11fe0ad9f..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx +++ /dev/null @@ -1,365 +0,0 @@ ---- -sidebar_position: 20 ---- - -# どうやって動いているの? - -Wailsは、webkitフロントエンドを備えた、何の変哲もないGoアプリです。 アプリ全体のうちGoの部分は、アプリのコードと、ウィンドウ制御などの便利な機能を提供するランタイムライブラリで構成されています。 フロントエンドはwebkitウィンドウであり、フロンドエンドアセットをウィンドウ上に表示します。 フロントエンドからも、Javascriptでランタイムライブラリを呼び出すことができます。 そして最終的に、Goのメソッドはフロントエンドにバインドされ、ローカルのJavascriptメソッドであるかのように、フロントエンドから呼び出すことができます。 - -```mdx-code-block -
- -
-``` - -## アプリのメインコード - -### Overview - -アプリは、`wails.Run()`メソッドを1回呼び出すことで、構成することができます。 このメソッドで、アプリのウィンドウサイズやウィンドウタイトル、使用アセットなどを指定することができます。 基本的なアプリを作るコードは次のとおりです: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### オプション - -上記のコードでは、次のオプションが指定されています: - -- `Title` - ウィンドウのタイトルバーに表示されるテキスト -- `Width` & `Height` - ウィンドウの大きさ -- `Assets` - アプリのフロントエンドアセット -- `OnStartup` - ウィンドウが作成され、フロントエンドの読み込みを開始しようとする時のコールバック -- `OnShutdown` - アプリを終了しようとするときのコールバック -- `Bind` - フロントエンドにバインドさせたい構造体インスタンスのスライス - -設定可能なすべてのオプションについては、[オプションのリファレンス](reference/options)をご覧ください。 - -#### Assets - -Wailsでフロントエンドアセット無しのアプリを作成することはできないため、`Assets`オプションは必須オプションです。 アセットには、一般的なWebアプリケーションでよく見かけるような、html、js、css、svg、pngなどのファイルを含めることができます。**アセットバンドルを生成する必要は一切なく**、そのままのファイルを使用できます。 アプリが起動すると、アセット内の`index.html`が読み込まれます。この時点で、フロントエンドはブラウザとして動作するようになります。 `embed.FS`を使ってアセットファイルが格納されたディレクトリを指定しますが、ディレクトリの場所はどこでも構いません。 embedで指定するパスは、`frontend/dist`のように、アプリのメインコードから相対的に見たディレクトリパスになります: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -起動時に、Wailsは`index.html`が含まれるディレクトリを再帰的に探します。 他のすべてのアセットは、当該ディレクトリから相対的に読み込まれます。 - -本番用のバイナリファイルには、`embed.FS`で指定されたアセットファイルが含まれるため、アプリ配布時に、バイナリファイルとは別にアセットファイルを付加させる必要はありません。 - -`wails dev`コマンドを使って開発モードでアプリを起動した場合、アセットはディスクから読み込まれ、アセットファイルが更新されると、自動的にアプリがライブリロードされます。 アセットの場所は、`embed.FS`での指定値から推定されます。 - -詳細は、[アプリ開発ガイド](guides/application-development.mdx)をご覧ください。 - -#### アプリのライフサイクル - -フロントエンドが`index.html`を読み込もうとする直前に、[OnStartup](reference/options.mdx#onstartup)で指定されたメソッドがコールバックされます。 A standard Go context is passed to this method. このメソッドに引数で渡されるContextは、今後、Wailsのラインタイムを呼び出すときに必要になるため、通常は、このContextへの参照を保持しておいてください。 同様に、アプリがシャットダウンされる直前には、[OnShutdown](reference/options.mdx#onshutdown)で指定されたコールバックが呼び出され、Contextも渡されます。 `index.html`に含まれるすべてのアセットが読み込み終わったときに呼び出される[OnDomReady](reference/options.mdx#ondomready)コールバックもあります。これは、Javascriptの[`body onload`](https://www.w3schools.com/jsref/event_onload.asp)イベントと同等のものです。 また、[OnBeforeClose](reference/options.mdx#onbeforeclose)を指定すると、ウィンドウを閉じる(またはアプリを終了する)イベントにフックさせることもできます。 - -#### メソッドのバインド - -`Bind`オプションは、Wailsアプリで最も重要なオプションの1つです。 このオプションでは、フロントエンドに公開する、構造体のメソッドを指定することができます。 構造体は、従来のWebアプリにおける"コントローラ"の立ち位置であるとお考えください。 アプリが起動すると、`Bind`オプションで指定されている構造体を対象に、その中にあるパブリックメソッド(大文字で始まるメソッド名)を探します。そして、フロントエンドのコードからそれらのメソッドを呼び出せるJavascriptが生成されます。 - -:::info 備考 - - -Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 - -::: - - -下記のコードでは、新しく`App`インスタンスを作成し、`wails.Run`関数の`Bind`オプションの中で、そのインスタンスを追加しています: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -構造体は、好きな数だけバインドできます。 `Bind`には、構造体のインスタンスを渡すようにしてください: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -`wails dev`コマンド(または、`wails generate module`コマンド)を実行すると、以下のものを含むフロントエンドモジュールが生成されます: - -- バインドされたすべてのメソッドのJavascript -- バインドされたすべてのメソッドのTypescript宣言 -- バインドされたメソッドの引数または返り値で使用されているGoの構造体のTypescript宣言 - -これにより、強力な型付けがなされたデータ構造を使用して、フロントエンドから簡単にGoのコードを呼び出すことができます。 - -## フロントエンド - -### Overview - -フロントエンドは、webkitによってレンダリングされるファイル群です。 ブラウザとWebサーバが一体となったような動きをします。 使用できるフレームワークやライブラリの制限はほぼありません[^1]。 フロントエンドとGoコードとの相互のやり取りについて、主なポイントは次のとおりです: - -- バインドされたGoメソッドの呼び出し -- ランタイムメソッドの呼び出し - -### バインドされたGoメソッドの呼び出し - -`wails dev`コマンドでアプリを起動すると、Go構造体のJavascriptバインディングが`wailsjs/go`ディレクトリに自動的に生成されます(`wails generate module`コマンドでも生成可能)。 生成されたファイルには、アプリ内のGoパッケージ名が反映されています。 先の例では、`Greet`というパブリックメソッドを持つ`app`をバインドしていました。 この場合、次のようなファイルが生成されることになります: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -ご覧のとおり、`main`パッケージ内の`App`構造体Javascriptバインディングが、それらのメソッドのTypescript型定義と並んで生成されていることが分かります。 フロントエンドから`Greet`メソッドを呼び出すには、単純にメソッドをインポートし、通常のJavascript関数と同じように呼び出してください: - -```javascript -// ... -import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // resultを使って何かする - }) - } -``` - -Typescript型定義ファイルは、バインドされたメソッドの正しい型を提供します: - -```ts -export function Greet(arg1:string):Promise; -``` - -生成されたメソッドはPromiseを返すようになっています。 呼び出しが成功すると、Goからの1番目の返り値が`resolve`ハンドラに渡されます。 呼び出しに失敗したとみなされるのは、Goメソッドの2番目の返り値がerror型で、それがerrorインスタンスを返したときです。 これは、`reject`ハンドラを介して返されます。 先の例では、`Greet`メソッドは`string`型の返り値のみであるため、無効なデータが渡されない限り、Javascript側でrejectハンドラが呼ばれることはありません。 - -すべてのデータ型は、GoとJavascriptの間で正しく解釈されます。 もちろん構造体も正しく解釈されます。 Goから構造体が返された場合、フロントエンドにはJavascriptのクラスとして返されます。 - -:::info 備考 - - -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. - -Anonymous nested structs are not supported at this time. - -::: - - -Goに対して引数として構造体を渡すこともできます。 構造体として取り扱ってほしいJavascriptのマップやクラスを渡すと、構造体に変換されます。 あなたが簡単にこれらのことを把握できるように、`dev`モードでは、バウンドされたGoメソッドで使用されている全構造体の型が定義された、Typescriptモジュールが生成されます。 このモジュールを使用すると、Javascriptネイティブなオブジェクトを構築し、Goコードへ送信することができます。 - -There is also support for Go methods that use structs in their signature. バインドされたメソッドで、引数または返り値として指定されているすべてのGo構造体は、Goのコードラッパーモジュールの一部として生成されたTypescript定義を持っています。 これらを使用することで、GoとJavascriptの間で、同じデータモデルを共有できます。 - -例: `Greet`メソッドを更新して、文字列型の代わりに`Person`型を引数で受け付けてみる: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -`wailsjs/go/main/App.js`ファイルには、次のコードが出力されます: - -```js title="App.js" -export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); -} -``` - -しかし、`wailsjs/go/main/App.d.ts`ファイルは次のコードが出力されます: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -見ると分かるように、"main"名前空間は、新しく生成された"models.ts"ファイルからインポートされています。 このファイルには、バインドされたメソッドで使用されるすべての構造体の型定義が含まれています。 この例では、`Person`構造体の型定義が含まれています。 `models.ts`を確認すれば、モデルがどのように定義されているかが分かります。 - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -フロントエンドのビルド構成にTypescriptを使用している限り、これらのモデルを次のように使用できます: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -生成されたバインディングとTypescriptモデルの組み合わせによって、強力な開発環境を実現させています。 - -バインディングの詳細については、[アプリ開発ガイド](guides/application-development.mdx)の[バインディングメソッド](guides/application-development.mdx#binding-methods)をご覧ください。 - -### ランタイムメソッドの呼び出し - -Javascriptランタイムは`window.runtime`に存在し、イベント発行やロギングなど、さまざまなタスクを実行するためのメソッドが含まれています: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -Javascriptランタイムの詳細については、[ランタイムリファレンス](reference/runtime/intro)をご覧ください。 - -[^1]: まれに、WebViewでサポートされていない機能を使用するライブラリがあります。 ほとんどの場合、それらは代替手段や回避方法がありますので、それらを検討してください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx deleted file mode 100644 index 6ef967609..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# イントロダクション - -Wailsは、Go言語とWeb技術を使用して、デスクトップアプリの構築を可能にするプロジェクトです。 - -"Goの力によって、Electronが軽量かつ高速になったようなもの"、と考えるとよいでしょう。 Goの柔軟性とパワーに、リッチでモダンなフロントエンドを組み合わせたアプリを、簡単に構築することができます。 - -### Features - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- [Vite](https://vitejs.dev/)の力を利用したライブ開発が可能です -- Powerful CLI to easily Create, Build and Package applications -- 豊富な[ランタイムライブラリ](/docs/reference/runtime/intro)を用意しています -- Wailsで構築されたアプリケーションは、Apple StoreおよびMicrosoft Storeに準拠しています - -例えば [varly](https://varly.app) は、Wailsで構築されたMacOS・Windows向けのデスクトップアプリです。 見栄えが良いだけではなく、ネイティブメニューや半透明効果を使用しています。これらは、モダンなネイティブアプリに期待されるものです。 - -```mdx-code-block -

- - - -

-``` - -### クイックスタートテンプレート - -Wailsには、アプリの開発をすばやく始められるように、多数のテンプレートが用意されています。 Svelte、React、Vue、Preact、LitおよびVanilla用で、それぞれのテンプレートがあります。 各テンプレートには、Javascript版とTypescript版が用意されています。 - -### ネイティブ要素 - -Wailsは、ウィンドウ、メニュー、ダイアログなどのネイティブ要素を処理する専用ライブラリを使用するため、見栄えが良く、リッチな機能を備えたデスクトップアプリを構築できます。 - -**ブラウザを埋め込まないため**、無駄なリソースを割きません。 ブラウザを埋め込まない代わりに、OSプラットフォームのネイティブなレンダリングエンジンを使用します。 例えばWindowsの場合、Chromium上でビルトされているMicrosoft Webview2ライブラリを使用します。 - -### GoとJavascriptのやり取り - -Wailsは自動的に、GoのメソッドをJavascriptから利用できるようにするので、フロントエンドからGoのメソッド名を呼び出すことができます。 It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### ランタイムライブラリ - -WailsはGoとJavascriptの両方にランタイムライブラリを提供し、イベント、ロギング、ダイアログなど、モダンなアプリに必要な多くの機能を使うことができます。 - -### ライブ開発 - -#### 自動リビルド - -アプリを"dev"モードで起動すると、Wailsはあなたが書いたコードをネイティブデスクトップアプリとしてビルドしますが、プログラムアセットは常にディスクから読み込む状態になります。 その仕組みにより、アプリ起動中にGoコードが書き換えられると、変更を検出して自動的にアプリがリビルドされ、再起動します。 - -#### 自動リロード - -フロントエンドアセットの変更が検出された場合、起動中のアプリは自動的にリロードされ、変更がすぐに反映されます。 - -#### ブラウザを使った開発 - -If you prefer to debug and develop in a browser then Wails has you covered. ブラウザでのデバッグや開発も、Wailsにお任せください。 起動中のアプリはWebサーバを兼ねており、お好きなブラウザから接続してアプリを操作することができます。 プログラムアセットが書き換わった時はすぐに更新されます。 - -### 本番用のネイティブバイナリ - -アプリを本番用にビルドする準備ができたら、CLIが、アプリを単一の実行可能ファイルへコンパイルし、すべてのアセットをバンドルしてくれます。 WindowsおよびMacOSでは、配布用のネイティブパッケージを作成できます。 パッケージ化に必要なアイコン、info.plist、マニフェストファイルなどは、プロジェクトの一部としてカスタマイズできるため、アプリのビルド方法をフルコントロールできます。 - -### ツール - -Wails CLIを使うことで、簡単にアプリを生成、ビルド、バンドルすることができます。 アイコンの作成、最適なコンパイル構成の設定、本番向けのバイナリ配布など、面倒なことをあなたの代わりに引き受けてくれます。 多数のテンプレートの中から、あなたに合ったものを選んで、すぐに開発を始めましょう! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx deleted file mode 100644 index 460110f03..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -例: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning 注意 - - -**Wailsプロジェクトでは、サードパーティ製テンプレートのメンテナンスは行っておらず、責任も負いません!** - -テンプレートについてよく分からない場合は、`package.json`および`wails.json`を確認し、どのようなスクリプトが実行されるのかや、どのようなパッケージがインストールされるのかを調べてください。 - -::: - - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Goコンパイラに渡すビルドタグ。 値は引用符で囲んでください。 また、スペースまたはカンマで区切ってください(両方は使用しないでください)。 | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | | -| -obfuscate | [garble](https://github.com/burrowers/garble)を使用してアプリケーションを難読化する | false | -| -garbleargs | garbleへ渡す引数 | `-literals -tiny -seed=random` | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::info UPX on Apple Silicon - - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - - -:::info UPX on Windows - - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | デバッグ | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx deleted file mode 100644 index 18020ddb8..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -Menu構造体を更新し、[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu)メソッドを呼び出すことで、メニューを動的に更新することも可能です。 - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -Menuは、MenuItemのコレクションです。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -| | | | | -|:-----------:|:-----:|:-----:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `f39` | | -| `page down` | `f15` | `f30` | | - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - - -Roles are currently supported on Mac only. - -::: - - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| ロール | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx deleted file mode 100644 index 4e4db6f2b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx +++ /dev/null @@ -1,673 +0,0 @@ ---- -sidebar_position: 3 ---- - -# オプション - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - WindowIsTranslucent: false, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -名前: Title
データ型: `string` - -### Width - -The initial width of the window. - -名前: Width
データ型: `int`
デフォルト値: 1024 - -### Height - -The initial height of the window. - -名前: Height
データ型: `int`
デフォルト値: 768 - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -名前: DisableResize
データ型: `bool` - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -名前: Fullscreen
データ型: `bool` - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -名前: Frameless
データ型: `bool` - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -名前: MinWidth
データ型: `int` - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -名前: MinHeight
データ型: `int` - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -名前: MaxWidth
データ型: `int` - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -名前: MaxHeight
データ型: `int` - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -名前: StartHidden
データ型: `bool` - -### HideWindowOnClose - -By default, closing the window will close the application. この設定を`true`にすると、ウィンドウを閉じる操作をした際に、 - -ウィンドウが非表示の状態になります。 - -名前: HideWindowOnClose
データ型: `bool` - -### BackgroundColour - -This value is the default background colour of the window. 例: options.NewRGBA(255,0,0,128) - 50%透過された赤色 - -名前: BackgroundColour
データ型: `*options.RGBA`
デフォルト値: white - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -名前: AlwaysOnTop
データ型: `bool` - -### Assets - -The frontend assets to be used by the application. Requires an `index.html` file. - -名前: Assets
データ型: `embed.FS` - -### AssetsHandler - - - -The assets handler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the `assets` because the file is not found. - -| 値 | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -名前: AssetsHandler
データ型: `http.Handler` - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -:::note - - -Macでは、メニューが指定されていない場合、デフォルトメニューが作成されます。 - -::: - - -名前: Menu
データ型: `*menu.Menu` - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: Logger
データ型: `logger.Logger`
デフォルト値: 標準出力へのロガー - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: LogLevel
データ型: `logger.LogLevel`
デフォルト値: 開発モードの場合は`Info`、本番モードの場合は`Error` - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: LogLevelProduction
データ型: `logger.LogLevel`
デフォルト値: `Error` - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -名前: OnStartup
データ型: `func(ctx context.Context)` - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -名前: OnDomReady
データ型: `func(ctx context.Context)` - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -名前: OnShutdown
データ型: `func(ctx context.Context)` - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -名前: OnBeforeClose
データ型: `func(ctx context.Context) bool` - -### WindowStartState - -Defines how the window should present itself at startup. - -| 値 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -名前: WindowStartState
データ型: `options.WindowStartState` - -### CSSDragProperty - -ウィンドウをドラッグできる要素を特定するためのCSSプロパティ名を設定します。 デフォルト値: `--wails-draggable` - -名前: CSSDragProperty
データ型: `string` - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. デフォルト値: `drag` - -名前: CSSDragValue
データ型: `string` - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -名前: Bind
データ型: `[]interface{}` - -### Windows - -[Windows固有のオプション](#windows)を定義します。 - -名前: Windows
データ型: `*windows.Options` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -名前: WebviewIsTransparent
データ型: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. 多くの場合、[WebviewIsTransparent](#WebviewIsTransparent)と組み合わせて使用されます。 - -ビルド22621より前のWindows 11の場合、半透明を実現させるために[BlurBehind](https://learn.microsoft.com/ja-jp/windows/win32/dwm/blur-ovw)メソッドを使用するため、処理が遅くなる可能性があります。 ビルド22621以降のWindows 11では、より高速な、新しい半透明タイプが有効になります。 デフォルトで使用される半透明タイプは、Windowsにより決定されます。 このタイプを設定するには、[BackdropType](#BackdropType)オプションを使用してください。 - -名前: WindowIsTranslucent
データ型: `bool` - -#### BackdropType - -:::note - - -この設定を適用するには、Windows 11 ビルド22621以降が必要です。 - -::: - - -ウィンドウの半透明タイプを設定します。 この設定は、[WindowIsTranslucent](#WindowIsTranslucent)が`true`に設定されている場合にのみ適用されます。 - -名前: BackdropType
データ型: `windows.BackdropType` - -値は次のいずれかを指定してください: - -| 値 | Description | -| ------- | ----------------------------------------------------------------------------------- | -| Auto | Windowsに背景を決定させる | -| None | 半透明にしない | -| Acrylic | [アクリル](https://learn.microsoft.com/ja-jp/windows/apps/design/style/acrylic)の効果を使用する | -| Mica | [マイカ](https://learn.microsoft.com/ja-jp/windows/apps/design/style/mica)の効果を使用する | -| Tabbed | タブを使用する。 これはマイカに似ている背景です。 | - -#### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -名前: DisableWindowIcon
データ型: `bool` - -#### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -名前: DisableFramelessWindowDecorations
データ型: `bool` - -#### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -名前: WebviewUserDataPath
データ型: `string` - -#### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -名前: WebviewBrowserPath
データ型: `string` - -#### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| 値 | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | _デフォルト値_です。 The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -名前: Theme
データ型: `windows.Theme` - -#### CustomTheme - -:::note - - -サポートされるWindowsの最小バージョン: Windows 10/11 2009/21H2 ビルド22000 - -::: - - -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. - -名前: CustomTheme
データ型: `windows.CustomTheme` - -##### CustomTheme 型 - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### Messages - -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. - -名前: Messages
データ型: `*windows.Messages` - -Customise this for any language you choose to support. - -#### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -名前: ResizeDebounceMS
データ型: `uint16` - -#### OnSuspend - -Windowsがローパワーモード(サスペンド/休止状態) に切り替わると呼び出されるコールバックを設定します。 - -名前: OnSuspend
データ型: `func()` - -#### OnResume - -Windowsがローパワーモード(サスペンド/休止状態) から復帰したときに呼び出されるコールバックを設定します。 - -名前: OnResume
データ型: `func()` - -### Mac - -[Mac固有のオプション](#mac)を定義します。 - -名前: Mac
データ定義: `*mac.Options` - -#### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -名前: TitleBar
データ型: [`*mac.TitleBar`](#titlebar-struct) - -##### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -名前: Appearance
データ型: [`mac.AppearanceType`](#appearance-type) - -##### Appearance 型 - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| 値 | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -名前: WebviewIsTransparent
データ型: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -名前: WindowIsTranslucent
データ型: `bool` - -#### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -名前: About
データ型: [`*mac.AboutInfo`](#about-struct) - -##### About struct - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -```mdx-code-block -
- -
-
-``` - -When clicked, that will open an about message box: - -```mdx-code-block -
- -
-
-``` - -### Linux - -[Linux固有のオプション](#linux)を定義します。 - -名前: Linux
データ型: `*linux.Options` - -#### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -名前: Icon
データ型: `[]byte` - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Some window managers may ignore it, or result in a black window. - -名前: WindowIsTranslucent
データ型: `bool` \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx deleted file mode 100644 index cc9d01aa6..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx deleted file mode 100644 index 39ae7e0a9..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -これらは、システムブラウザに関連したメソッドです。 - -### BrowserOpenURL - -指定されたURLをシステムブラウザで開きます。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx deleted file mode 100644 index 28c91d225..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,304 +0,0 @@ ---- -sidebar_position: 5 ---- - -# ダイアログ - -ランタイムでは、ファイルセレクターやメッセージボックスといったネイティブダイアログへのアクセスを提供しています。 - -:::info Javascript - - -現在、Javascriptランタイムではダイアログをサポートしていません。 - -::: - - -### OpenDirectoryDialog - -ユーザにディレクトリの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返り値: 選択されたディレクトリ(キャンセルされた場合は空) またはエラー - -### OpenFileDialog - -ユーザにファイルの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返り値: 選択されたファイル(キャンセルされた場合は空) またはエラー - -### OpenMultipleFilesDialog - -ユーザに複数ファイルの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返り値: 選択された複数ファイル(キャンセルされた場合はnil) またはエラー - -### SaveFileDialog - -保存の目的でユーザにファイル名を入力選択させるダイアログを開きます。 [SaveDialogOptions](#savedialogoptions)を使用してカスタマイズできます。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返り値: 入力選択されたファイル(キャンセルされた場合は空) またはエラー - -### MessageDialog - -メッセージダイアログを使用してメッセージを表示します。 [MessageDialogOptions](#messagedialogoptions)を使用してカスタマイズできます。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返り値: 選択されたボタンのテキストまたはエラー - -## オプション - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ------------------------- | --- | --- | --- | -| DefaultDirectory | ダイアログが開かれたときに初期表示するディレクトリ | ✅ | ✅ | ✅ | -| DefaultFilename | デフォルトファイル名 | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | ファイルフィルタのリスト | ✅ | ✅ | ✅ | -| ShowHiddenFiles | システムの隠しファイルを表示 | | ✅ | ✅ | -| CanCreateDirectories | ユーザによるディレクトリの作成を許可する | | ✅ | | -| ResolvesAliases | エイリアスではなくファイルパスを返す | | ✅ | | -| TreatPackagesAsDirectories | パッケージへのナビゲーションを許可 | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ------------------------- | --- | --- | --- | -| DefaultDirectory | ダイアログが開かれたときに初期表示するディレクトリ | ✅ | ✅ | ✅ | -| DefaultFilename | デフォルトファイル名 | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | ファイルフィルタのリスト | ✅ | ✅ | ✅ | -| ShowHiddenFiles | システムの隠しファイルを表示 | | ✅ | ✅ | -| CanCreateDirectories | ユーザによるディレクトリの作成を許可する | | ✅ | | -| TreatPackagesAsDirectories | パッケージへのナビゲーションを許可 | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------- | -------------- | --- | --- | -| Type | メッセージダイアログの種類 (質問、情報など) | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| Message | ユーザに表示するメッセージ | ✅ | ✅ | ✅ | -| Buttons | ボタンテキストのリスト | | ✅ | | -| DefaultButton | 指定されたテキストのボタンをデフォルトボタンとして扱う。 Bound to `return`. | ✅[*](#windows) | ✅ | | -| CancelButton | 指定されたテキストのボタンをキャンセルボタンとして扱う。 `escape`キーにバインドされます。 | | ✅ | | - -#### Windows - -Windowsでは、ボタンのカスタマイズができない標準ダイアログタイプがあります。 The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue". - -For Question dialogs, the default button is "Yes" and the cancel button is "No". This can be changed by setting the `DefaultButton` value to `"No"`. - -Example: -```go - result, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Question", - Message: "Do you want to continue?", - DefaultButton: "No", - }) -``` - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -1番目のボタンがデフォルトになります: - -```mdx-code-block -
- -
-
-``` - -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -```mdx-code-block -
- -
-
-``` - -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -```mdx-code-block -
- -
-
-
-
-``` - -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx deleted file mode 100644 index 48893b0b7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# イベント - -Wailsでは、GoまたはJavascriptによって発行および受信できる、一元化されたイベントシステムが用意されています。 必要に応じて、イベント発行時にデータを渡すことも可能です。 イベントリスナーは、そのデータをローカルデータ型で受け取ります。 - -### EventsOn - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定します。 `eventName`という名前のイベントが[発行](#EventsEmit)されると、コールバックがトリガーされます。 イベント発行時にデータも付与されていた場合、そのデータはコールバックに渡されます。 - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### EventsOff - -このメソッドは、指定されたイベント名のイベントリスナー設定を解除します。引数の`additionalEventNames`を使用することで、複数のリスナーを一度に解除できます。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定し、一度だけトリガーさせます。 - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### EventsOnMultiple - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定し、最大`counter`回だけトリガーします。 - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### EventsEmit - -このメソッドは、指定されたイベントを発行します。 必要に応じて、イベント発行時にデータを渡すこともできます。 このメソッドによって、任意のイベントリスナーをトリガーさせることができます。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx deleted file mode 100644 index 855981f03..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# イントロダクション - -ランタイムは、アプリケーションにユーティリティメソッドを提供するライブラリです。 GoとJavascriptの両方にランタイムがあり、どちらにもほぼ同じメソッドが提供されています。 - -ユーティリティメソッドには次のようなものがあります: - -- [ウィンドウ](window.mdx) -- [Menu](menu.mdx) -- [ダイアログ](dialog.mdx) -- [イベント](events.mdx) -- [Browser](browser.mdx) -- [ログ](log.mdx) - -Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポートすることで利用できます。 このパッケージのすべてのメソッドは、1番目の引数でContextを渡す必要があります。 このContextは、[OnStartup](../options.mdx#onstartup)フック、または[OnDomReady](../options.mdx#ondomready)フックからあらかじめ取得しておいてください。 - -:::info 備考 - - -[OnStartup](../options.mdx#onstartup)で提供されるContextは、ウィンドウが別のスレッドで初期化されているため、ランタイムが機能する保証がありません。 起動時にランタイムメソッドを呼び出したい場合は、[OnDomReady](../options.mdx#ondomready)を使用してください。 - -::: - - -Javascriptのランタイムは、`window.runtime`マップを介してフロントエンド上で利用できます。 `dev`モードでは、Typescript型定義を提供するランタイムパッケージが生成されます。 これらは、フロントエンドディレクトリの`wailsjs`ディレクトリに配置しておく必要があります。 - -### 非表示 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -アプリケーションを非表示にします。 - -:::info 備考 - - -Macでこのメソッドを使用すると、標準のMacアプリケーションにおけるメニュー項目の`Hide`と同じ方法で、アプリケーションが非表示になります。 これはウィンドウの非表示とは異なりますが、アプリケーションはフォアグラウンドに残ったままになります。 WindowsおよびLinuxでは、`WindowHide`メソッドと同等です。 - -::: - - -### 表示 - -アプリケーションを表示します。 - -:::info 備考 - - -Macでこのメソッドを使用すると、アプリケーションがフォアグラウンドに戻ります。 WindowsおよびLinuxでは、`WindowShow`メソッドと同等です。 - -::: - - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### 終了 - -アプリケーションを終了します。 - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### 環境 - -現在の環境の詳細情報を取得します。 - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx deleted file mode 100644 index 057aa802a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# ログ - -Wailsでは、GoまたはJavascriptから呼び出すことのできるロギングメカニズムを用意しています。 一般的なロガーと同じように、ログにはいくつかのログレベルがあります: - -- トレース -- デバッグ -- 情報 -- 警告 -- Error -- 致命的 - -ロガーは、設定されている出力ログレベル以上のログメッセージを出力します。 例えば、出力ログレベルを`Debug`に設定した場合、`Trace`以外のすべてのレベルのメッセージが出力されます。 - -### LogPrint - -指定されたメッセージをRawメッセージとしてロギングします。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -指定されたメッセージをRawメッセージとしてロギングします。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -指定されたメッセージを`Trace`ログレベルでロギングします。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -指定されたメッセージを`Trace`ログレベルでロギングします。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -指定されたメッセージを`Debug`ログレベルでロギングします。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -指定されたメッセージを`Debug`ログレベルでロギングします。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -指定されたメッセージを`Info`ログレベルでロギングします。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -指定されたメッセージを`Info`ログレベルでロギングします。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -指定されたメッセージを`Warning`ログレベルでロギングします。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -指定されたメッセージを`Warning`ログレベルでロギングします。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -指定されたメッセージを`Error`ログレベルでロギングします。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -指定されたメッセージを`Error`ログレベルでロギングします。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -指定されたメッセージを`Fatal`ログレベルでロギングします。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -指定されたメッセージを`Fatal`ログレベルでロギングします。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -出力ログレベルを設定します。 Javascriptでは、数値が次のログレベルに対応しています: - -| 値 | ログレベル | -| - | ----- | -| 1 | トレース | -| 2 | デバッグ | -| 3 | 情報 | -| 4 | 警告 | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## カスタムロガーの使用 - -カスタムロガーは、アプリケーションオプションの1つである[Logger](../options.mdx#logger)で指定してあげることで、使用することができます。 カスタムロガーを使用する際の唯一の要件は、`github.com/wailsapp/wails/v2/pkg/logger`で定義されている`logger.Logger`インターフェースを、ロガーに実装することです: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx deleted file mode 100644 index 0d2b40a7d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -これらは、アプリケーションメニューに関連したメソッドです。 - -:::info Javascript - - -現在、Javascriptランタイムではメニューをサポートしていません。 - -::: - - -### MenuSetApplicationMenu - -指定された[menu](../menus.mdx)をアプリケーションメニューとして設定します。 - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -`MenuSetApplicationMenu`に渡されたメニューへの変更を検知し、アプリケーションメニューを更新します。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx deleted file mode 100644 index daa3027fc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx +++ /dev/null @@ -1,223 +0,0 @@ ---- -sidebar_position: 4 ---- - -# ウィンドウ - -アプリケーションウィンドウを制御できるメソッド群です。 - -### WindowSetTitle - -ウィンドウのタイトルバーにテキストを設定します。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -ウィンドウをフルスクリーンにします。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -フルスクリーンにする前のウィンドウサイズおよび位置に戻します。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -ウィンドウがフルスクリーンの場合は、trueを返します。 - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### WindowCenter - -ウィンドウが現在表示されているモニターの中央に、ウィンドウを配置させます。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowExecJS - -Executes arbitrary JS code in the window. - -This method runs the code in the browser asynchronously and returns immediately. If the script causes any errors, they will only be available in the browser console. - -Go: `WindowExecJS(ctx context.Context, js string)` - -### WindowReload - -リロードします。(現在表示されているページをリロード) - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -アプリケーションフロントエンドをリロードします。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windowsのみ使用可能。 - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -ウィンドウのテーマをシステムデフォルト(ダーク/ライト) に設定します。 - -### WindowSetLightTheme - -Windowsのみ使用可能。 - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -ウィンドウのテーマをライトに設定します。 - -### WindowSetDarkTheme - -Windowsのみ使用可能。 - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -ウィンドウのテーマをダークに設定します。 - -### WindowShow - -ウィンドウが非表示になっている場合は、表示させます。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -現在表示されているウィンドウを非表示にします。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -ウィンドウが最小化、最大化、またはフルスクリーンになっていない場合、trueを返します。 - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### WindowSetSize - -ウィンドウの幅と高さを設定します。 - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -ウィンドウの幅と高さを取得します。 - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### WindowSetMinSize - -ウィンドウの最小サイズを設定します。 現在のウィンドウサイズが、指定された最小サイズよりも小さい場合、現在のウィンドウサイズは変更されます。 - -サイズを`0,0`に設定すると、サイズの制約が無効化されます。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -ウィンドウの最大サイズを設定します。 現在のウィンドウサイズが、指定された最大サイズよりも大きい場合、現在のウィンドウサイズは変更されます。 - -サイズを`0,0`に設定すると、サイズの制約が無効化されます。 - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -ウィンドウを常に最前面に表示するかを切り替えます。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetPosition - -現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を設定します。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を取得します。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowMaximise - -ウィンドウを最大化します。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -ウィンドウの最大化を解除し、最大化する前のサイズおよび位置に戻します。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -ウィンドウが最大化している場合はtrueを返します。 - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### WindowToggleMaximise - -最大化の状態を切り替えます。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -ウィンドウを最小化します。 - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -ウィンドウの最小化を解除し、最小化する前のサイズおよび位置に戻します。 - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -ウィンドウが最小化している場合はtrueを返します。 - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -ウィンドウの背景色をRGBAカラー定義で設定します。 この色は、すべての透過ピクセルに対して表示されます。 - -R、G、B、Aの有効な値の範囲は0~255です。 - -:::info Windows - - -Windowsの場合、0または255のアルファ値(A) のみがサポートされています。 0以外の値を指定すると、すべて255とみなされます。 - -::: - - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript型定義 - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx deleted file mode 100644 index 3e198f06b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - -- Create a new Wails application -- Build the application -- Run the application - -:::note - - -This tutorial uses Windows as the target platform. Output will vary slightly depending on your operating system. - -::: - - -## Create a new Wails application - -To create a new Wails application using the default vanilla JS template, you need to run the following command: - -```bash -wails init -n helloworld -``` - -You should see something similar to the following: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## Build the application - -To build the application, change to the new `helloworld` project directory and run the following command: - -```bash -wails build -``` - -You should see something like the following: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -This has compiled the application and saved it in the `build/bin` directory. - -## Run the application - -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: - -```mdx-code-block -
- -
-
-``` - -We can run it by simply double-clicking the `helloworld.exe` file. - -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. - -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. - -You should see the application working as expected: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx deleted file mode 100644 index 4cd13bfa1..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Discord](https://discord.com/invite/JDdSxwjhGf) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 - -## その他のチュートリアルや記事 -- [掲示板を作ってみる](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx deleted file mode 100644 index ee4349843..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -sidebar_position: 1 ---- - -# テンプレート - -このページでは、コミュニティがサポートしているテンプレートを紹介しています。 このページに新たにテンプレートを含めたい場合は、このページの下側にある`このページを編集`をクリックして、プルリクエストを出してください。 独自テンプレートの作成方法については、[テンプレート](../guides/templates.mdx)ガイドをご覧ください。 - -これらのテンプレートを使用するには、`wails init -n "プロジェクト名" -t [テンプレートのリンク[@バージョン]]`コマンドを実行してください。 - -バージョンサフィックスが無い場合は、デフォルトで、メインブランチのコードテンプレートが使用されます。 バージョンサフィックスがある場合は、当該バージョンのタグに対応するコードテンプレートが使用されます。 - -例: `wails init -n "プロジェクト名" -t https://github.com/misitebao/wails-template-vue` - -:::warning 注意 - -**Wailsプロジェクトでは、サードパーティ製テンプレートのメンテナンスは行っておらず、責任も負いません!** - -テンプレートについてよく分からない場合は、`package.json`および`wails.json`を確認し、どのようなスクリプトが実行されるのかや、どのようなパッケージがインストールされるのかを調べてください。 - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - VueのエコシステムをベースにしたWailsテンプレート (TypeScript、ダークテーマ、i18n、シングルページルーティング、TailwindCSSを統合) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Viteを使用したVue 3 TypeScript (および機能を追加する手順) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vite、Vuex、Vue Router、SaaS、ESLint + Prettier を使用した Vue 3 TypeScript -- [wails-template-quasar-js](https://github.com/sgosiaco/wails-template-quasar-js) - A template using JavaScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier) -- [wails-template-quasar-ts](https://github.com/sgosiaco/wails-template-quasar-ts) - A template using TypeScript + Quasar V2 (Vue 3, Vite, Sass, Pinia, ESLint, Prettier, Composition API with <script setup>) - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - TypeScript、Sass、ホットリロード、コード分割、i18n を使用した Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - reactjsを使用したテンプレート -- [wails-react-template](https://github.com/flin7/wails-react-template) - ライブ開発をサポートしたReactの最小テンプレート -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - Next.js、TypeScript を使用したテンプレート -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - React + TypeScript + Vite + TailwindCSSを使用したテンプレート - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - Svelteを使用したテンプレート -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - SvelteおよびViteを使用したテンプレート -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - TailwindCSS v3を含んだ、SvelteおよびViteを使用したテンプレート -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - SvelteKitを使用したテンプレート - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - 関数型プログラミングと**高速な**ホットリロードを使ったGUIアプリ開発 :tada: :rocket: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - Elm + Tailwind CSS + Wailsのパワー:muscle:を組み合わせたテンプレート (ホットリロードサポートあり) - -## ピュアJavaScript (バニラ) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 基本的なJavaScript、HTML、CSSのみを含むテンプレート diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx deleted file mode 100644 index dfab958b4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# プロジェクトのコンパイル - -プロジェクトディレクトリ上で、`wails build`コマンドを実行しましょう。 そうすることで、プロジェクトがコンパイルされ、`build/bin`ディレクトリ内に本番配布用のバイナリが出力されます。 - -バイナリを起動すると、デフォルト仕様のアプリを確認することができます: - -```mdx-code-block -
- -
-
-``` - -コンパイルオプションについて詳しくは、[CLIリファレンス](../reference/cli.mdx#build)をご覧ください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx deleted file mode 100644 index b26c3c546..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# アプリの開発 - -プロジェクトディレクトリのルート上で`wails dev`コマンドを実行すると、アプリを開発モードで起動することができます。 コマンドを実行すると下記の処理が実行されます: - -- アプリをビルドしたのち、起動する -- Goのコードをフロントエンドにバインドし、Javascriptから呼び出せるようにする -- Using the power of [Vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- ブラウザからアプリを操作できるようにする[Webサーバ](http://localhost:34115)を立ち上げる。 これにより、任意のブラウザ拡張機能を利用できる。 JavascriptのコンソールからGoのコードを呼び出すこともできる - -アプリ開発を始めるときは、プロジェクトディレクトリ上で`wails dev`コマンドを実行しましょう。 詳しくは、[こちら](../reference/cli.mdx#dev)をご覧ください。 - -近日中にチュートリアルを公開予定です。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx deleted file mode 100644 index 8ce6453d7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# プロジェクトの開始 - -## プロジェクトの生成 - -CLIのインストールが終わったら、`wails init`コマンドで新しいプロジェクトを生成しましょう。 - -好きなフレームワークを選択してください: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte - -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react - -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -様々な機能やフレームワークを提供する[コミュニティテンプレート](../community/templates.mdx)を利用することもできます。 - -プロジェクト生成時に使用可能なオプションを確認するには、`wails init -help`を実行してください。 詳しくは、[CLIリファレンス](../reference/cli.mdx#init)を参照してください。 - -## プロジェクトのディレクトリ構成 - -Wailsのプロジェクトディレクトリの構成は次のとおりです: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### プロジェクトの構造 - -- `/main.go` - アプリのメインコード -- `/frontend/` - フロントエンドのプロジェクトディレクトリ -- `/build/` - ビルドディレクトリ -- `/build/appicon.png` - アプリアイコン -- `/build/darwin/` - Mac固有のプロジェクトディレクトリ -- `/build/windows/` - Windows固有のプロジェクトディレクトリ -- `/wails.json` - プロジェクト構成ファイル -- `/go.mod` - Goモジュール定義ファイル -- `/go.sum` - Goモジュールチェックサムファイル - -`frontend`ディレクトリ内は、Wailsで決まったファイル構成等は無く、お好きなフロントエンドプロジェクトを配置することができます。 - -`build`ディレクトリは、アプリのビルド時に使用されます。 この中のファイルは、ビルドの挙動をカスタマイズするために、適宜ファイル内容を書き換えることができます。 buildディレクトリ内のファイルを削除すると、デフォルトのファイルが再生成されます。 - -`go.mod`のモジュール名は、最初は"changeme"になっています。 このモジュール名は、あなたのプロジェクトに適切な名前に変更しましょう。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx deleted file mode 100644 index c273f836d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -sidebar_position: 1 ---- - -# インストール - -## サポートされているプラットフォーム - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依存関係 - -Wailsをインストールする前に、下記のものを導入しておく必要があります。 - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://go.dev/dl/). - -公式の[Goインストール手順](https://go.dev/doc/install)に従って、Goをインストールしてください。 その際、`PATH`環境変数に`~/go/bin`ディレクトリへのパスが含まれていることも確認してください。 それらが終わったら、ターミナルを再起動し、以下の確認をしてください: - -- Goが正しくインストールされているかを確認する: `go version` -- "~/go/bin"のディレクトリパスがPATH環境変数に含まれているか確認する: `echo $PATH | grep go/bin` - -### NPM - -[Nodeダウンロードページ](https://nodejs.org/ja/download/)からNPMをダウンロードしてください。 最新版を利用することをお勧めします。なぜなら、私たちは最新版に対してテストを実施しているためです。 - -`npm --version`を実行して、インストールが完了しているかを確認してください。 - -## プラットフォーム固有の依存関係 - -開発作業を行うプラットフォームによって、必要な依存関係が存在します: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails requires that the xcode command line tools are installed. This can be - done by running xcode-select --install. - - - Wails requires that the WebView2 runtime is installed. Some Windows installations will already have this installed. You can check using the wails doctor command. - - - Linux required the standard gcc build tools plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run wails doctor after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the Add Linux Distro guide. - - -``` - -## 任意の依存関係 - -- [UPX](https://upx.github.io/)を導入することで、構築したアプリを圧縮できます。 - -## Wailsのインストール - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest`を実行して、Wails CLIをインストールしてください。 - -Note: If you get an error similar to this: - -```shell -....\Go\pkg\mod\github.com\wailsapp\wails\v2@v2.1.0\pkg\templates\templates.go:28:12: pattern all:ides/*: no matching files found -``` -please check you have Go 1.18+ installed: -```shell -go version -``` - -## システムチェック - -`wails doctor`を実行すると、必要な依存関係が正しくインストールされているかを確認することができます。 正しくインストールされていない場合は、その内容をあなたにお知らせして、どうすれば解決できるかを教えてくれます。 - -## `wails`コマンドが見つからないのですが? - -`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx deleted file mode 100644 index 29e442c5e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx +++ /dev/null @@ -1,75 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| 値 | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - - -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx deleted file mode 100644 index f9b132127..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx +++ /dev/null @@ -1,191 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - AssetServer: &assetserver.Options{ - Assets: assets, - }, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx deleted file mode 100644 index 49e9cd69c..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx deleted file mode 100644 index 9d1d772d0..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx deleted file mode 100644 index a3444f98e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from 'vue-router' - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}) -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx deleted file mode 100644 index 9ab1d8181..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx +++ /dev/null @@ -1,376 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. It should start with _-----BEGIN CERTIFICATE-----_ and end with _-----END CERTIFICATE-----_. Now you need to make two action secrets on GitHub. Navigate to _Settings -> Secrets -> Actions_ and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx deleted file mode 100644 index e8833fd8d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# テンプレート - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -```mdx-code-block -
- -
-``` - -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx deleted file mode 100644 index 250e84e94..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,162 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## `wails`コマンドが見つからないのですが? - -`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。 - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -```mdx-code-block -

- -

-``` - -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Workaround: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is _normally_ due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -If reinstalling Xcode Command Tools still fails, you can check the path where the toolkit is located using: - -`xcode-select -p` - -If `/Applications/Xcode.app/Contents/Developer` is displayed, run `sudo xcode-select --switch /Library/Developer/CommandLineTools` - -Sources: https://github.com/wailsapp/wails/issues/1806 and https://github.com/wailsapp/wails/issues/1140#issuecomment-1290446496 - --- - -## Cannot start service: Host version "x.x.x does not match binary version "x.x.x" - -It's preferable to add `frontend/node_modules` and `frontend/package-lock.json` to your `.gitignore`. Otherwise when opening your repository on another machine that may have different versions of Node installed, you may not be able to run your application. - -If this does happen, simply delete `frontend/node_modules` and `frontend/package-lock.json` and run your `wails build` or `wails dev` command again. \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx deleted file mode 100644 index 88a1698db..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS installer - -```mdx-code-block -

- -
-

-``` - -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the _Bin_ folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx deleted file mode 100644 index b9037aec2..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -sidebar_position: 20 ---- - -# どうやって動いているの? - -Wailsは、webkitフロントエンドを備えた、何の変哲もないGoアプリです。 アプリ全体のうちGoの部分は、アプリのコードと、ウィンドウ制御などの便利な機能を提供するランタイムライブラリで構成されています。 フロントエンドはwebkitウィンドウであり、フロンドエンドアセットをウィンドウ上に表示します。 フロントエンドからも、Javascriptでランタイムライブラリを呼び出すことができます。 そして最終的に、Goのメソッドはフロントエンドにバインドされ、ローカルのJavascriptメソッドであるかのように、フロントエンドから呼び出すことができます。 - -```mdx-code-block -
- -
-``` - -## アプリのメインコード - -### Overview - -アプリは、`wails.Run()`メソッドを1回呼び出すことで、構成することができます。 このメソッドで、アプリのウィンドウサイズやウィンドウタイトル、使用アセットなどを指定することができます。 基本的なアプリを作るコードは次のとおりです: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### オプション - -上記のコードでは、次のオプションが指定されています: - -- `Title` - ウィンドウのタイトルバーに表示されるテキスト -- `Width` & `Height` - ウィンドウの大きさ -- `Assets` - アプリのフロントエンドアセット -- `OnStartup` - ウィンドウが作成され、フロントエンドの読み込みを開始しようとする時のコールバック -- `OnShutdown` - アプリを終了しようとするときのコールバック -- `Bind` - フロントエンドにバインドさせたい構造体インスタンスのスライス - -設定可能なすべてのオプションについては、[オプションのリファレンス](reference/options)をご覧ください。 - -#### Assets - -Wailsでフロントエンドアセット無しのアプリを作成することはできないため、`Assets`オプションは必須オプションです。 アセットには、一般的なWebアプリケーションでよく見かけるような、html、js、css、svg、pngなどのファイルを含めることができます。**アセットバンドルを生成する必要は一切なく**、そのままのファイルを使用できます。 アプリが起動すると、アセット内の`index.html`が読み込まれます。この時点で、フロントエンドはブラウザとして動作するようになります。 `embed.FS`を使ってアセットファイルが格納されたディレクトリを指定しますが、ディレクトリの場所はどこでも構いません。 embedで指定するパスは、`frontend/dist`のように、アプリのメインコードから相対的に見たディレクトリパスになります: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -起動時に、Wailsは`index.html`が含まれるディレクトリを再帰的に探します。 他のすべてのアセットは、当該ディレクトリから相対的に読み込まれます。 - -本番用のバイナリファイルには、`embed.FS`で指定されたアセットファイルが含まれるため、アプリ配布時に、バイナリファイルとは別にアセットファイルを付加させる必要はありません。 - -`wails dev`コマンドを使って開発モードでアプリを起動した場合、アセットはディスクから読み込まれ、アセットファイルが更新されると、自動的にアプリがライブリロードされます。 アセットの場所は、`embed.FS`での指定値から推定されます。 - -詳細は、[アプリ開発ガイド](guides/application-development.mdx)をご覧ください。 - -#### アプリのライフサイクル - -フロントエンドが`index.html`を読み込もうとする直前に、[OnStartup](reference/options.mdx#onstartup)で指定されたメソッドがコールバックされます。 A standard Go context is passed to this method. このメソッドに引数で渡されるContextは、今後、Wailsのラインタイムを呼び出すときに必要になるため、通常は、このContextへの参照を保持しておいてください。 同様に、アプリがシャットダウンされる直前には、[OnShutdown](reference/options.mdx#onshutdown)で指定されたコールバックが呼び出され、Contextも渡されます。 `index.html`に含まれるすべてのアセットが読み込み終わったときに呼び出される[OnDomReady](reference/options.mdx#ondomready)コールバックもあります。これは、Javascriptの[`body onload`](https://www.w3schools.com/jsref/event_onload.asp)イベントと同等のものです。 また、[OnBeforeClose](reference/options.mdx#onbeforeclose)を指定すると、ウィンドウを閉じる(またはアプリを終了する)イベントにフックさせることもできます。 - -#### メソッドのバインド - -`Bind`オプションは、Wailsアプリで最も重要なオプションの1つです。 このオプションでは、フロントエンドに公開する、構造体のメソッドを指定することができます。 構造体は、従来のWebアプリにおける"コントローラ"の立ち位置であるとお考えください。 アプリが起動すると、`Bind`オプションで指定されている構造体を対象に、その中にあるパブリックメソッド(大文字で始まるメソッド名)を探します。そして、フロントエンドのコードからそれらのメソッドを呼び出せるJavascriptが生成されます。 - -:::info 備考 - -Wailsで構造体を正しくバインドするためには、構造体の*インスタンス*をオプションで指定してください。 - -::: - -下記のコードでは、新しく`App`インスタンスを作成し、`wails.Run`関数の`Bind`オプションの中で、そのインスタンスを追加しています: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -構造体は、好きな数だけバインドできます。 `Bind`には、構造体のインスタンスを渡すようにしてください: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -`wails dev`コマンド(または、`wails generate module`コマンド)を実行すると、以下のものを含むフロントエンドモジュールが生成されます: - -- バインドされたすべてのメソッドのJavascript -- バインドされたすべてのメソッドのTypescript宣言 -- バインドされたメソッドの引数または返り値で使用されているGoの構造体のTypescript宣言 - -これにより、強力な型付けがなされたデータ構造を使用して、フロントエンドから簡単にGoのコードを呼び出すことができます。 - -## フロントエンド - -### Overview - -フロントエンドは、webkitによってレンダリングされるファイル群です。 ブラウザとWebサーバが一体となったような動きをします。 使用できるフレームワークやライブラリの制限はほぼありません[^1]。 フロントエンドとGoコードとの相互のやり取りについて、主なポイントは次のとおりです: - -- バインドされたGoメソッドの呼び出し -- ランタイムメソッドの呼び出し - -### バインドされたGoメソッドの呼び出し - -`wails dev`コマンドでアプリを起動すると、Go構造体のJavascriptバインディングが`wailsjs/go`ディレクトリに自動的に生成されます(`wails generate module`コマンドでも生成可能)。 生成されたファイルには、アプリ内のGoパッケージ名が反映されています。 先の例では、`Greet`というパブリックメソッドを持つ`app`をバインドしていました。 この場合、次のようなファイルが生成されることになります: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -ご覧のとおり、`main`パッケージ内の`App`構造体Javascriptバインディングが、それらのメソッドのTypescript型定義と並んで生成されていることが分かります。 フロントエンドから`Greet`メソッドを呼び出すには、単純にメソッドをインポートし、通常のJavascript関数と同じように呼び出してください: - -```javascript -// ... -import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // resultを使って何かする - }) - } -``` - -Typescript型定義ファイルは、バインドされたメソッドの正しい型を提供します: - -```ts -export function Greet(arg1:string):Promise; -``` - -生成されたメソッドはPromiseを返すようになっています。 呼び出しが成功すると、Goからの1番目の返り値が`resolve`ハンドラに渡されます。 呼び出しに失敗したとみなされるのは、Goメソッドの2番目の返り値がerror型で、それがerrorインスタンスを返したときです。 これは、`reject`ハンドラを介して返されます。 先の例では、`Greet`メソッドは`string`型の返り値のみであるため、無効なデータが渡されない限り、Javascript側でrejectハンドラが呼ばれることはありません。 - -すべてのデータ型は、GoとJavascriptの間で正しく解釈されます。 もちろん構造体も正しく解釈されます。 Goから構造体が返された場合、フロントエンドにはJavascriptのクラスとして返されます。 - -:::info 備考 - -Struct fields *must* have a valid `json` tag to be included in the generated Typescript. - -Anonymous nested structs are not supported at this time. - -::: - -Goに対して引数として構造体を渡すこともできます。 構造体として取り扱ってほしいJavascriptのマップやクラスを渡すと、構造体に変換されます。 あなたが簡単にこれらのことを把握できるように、`dev`モードでは、バウンドされたGoメソッドで使用されている全構造体の型が定義された、Typescriptモジュールが生成されます。 このモジュールを使用すると、Javascriptネイティブなオブジェクトを構築し、Goコードへ送信することができます。 - -There is also support for Go methods that use structs in their signature. バインドされたメソッドで、引数または返り値として指定されているすべてのGo構造体は、Goのコードラッパーモジュールの一部として生成されたTypescript定義を持っています。 これらを使用することで、GoとJavascriptの間で、同じデータモデルを共有できます。 - -例: `Greet`メソッドを更新して、文字列型の代わりに`Person`型を引数で受け付けてみる: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -`wailsjs/go/main/App.js`ファイルには、次のコードが出力されます: - -```js title="App.js" -export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); -} -``` - -しかし、`wailsjs/go/main/App.d.ts`ファイルは次のコードが出力されます: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -見ると分かるように、"main"名前空間は、新しく生成された"models.ts"ファイルからインポートされています。 このファイルには、バインドされたメソッドで使用されるすべての構造体の型定義が含まれています。 この例では、`Person`構造体の型定義が含まれています。 `models.ts`を確認すれば、モデルがどのように定義されているかが分かります。 - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -フロントエンドのビルド構成にTypescriptを使用している限り、これらのモデルを次のように使用できます: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -生成されたバインディングとTypescriptモデルの組み合わせによって、強力な開発環境を実現させています。 - -バインディングの詳細については、[アプリ開発ガイド](guides/application-development.mdx)の[バインディングメソッド](guides/application-development.mdx#binding-methods)をご覧ください。 - -### ランタイムメソッドの呼び出し - -Javascriptランタイムは`window.runtime`に存在し、イベント発行やロギングなど、さまざまなタスクを実行するためのメソッドが含まれています: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -Javascriptランタイムの詳細については、[ランタイムリファレンス](reference/runtime/intro)をご覧ください。 - -[^1]: まれに、WebViewでサポートされていない機能を使用するライブラリがあります。 ほとんどの場合、それらは代替手段や回避方法がありますので、それらを検討してください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx deleted file mode 100644 index 6ef967609..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# イントロダクション - -Wailsは、Go言語とWeb技術を使用して、デスクトップアプリの構築を可能にするプロジェクトです。 - -"Goの力によって、Electronが軽量かつ高速になったようなもの"、と考えるとよいでしょう。 Goの柔軟性とパワーに、リッチでモダンなフロントエンドを組み合わせたアプリを、簡単に構築することができます。 - -### Features - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- [Vite](https://vitejs.dev/)の力を利用したライブ開発が可能です -- Powerful CLI to easily Create, Build and Package applications -- 豊富な[ランタイムライブラリ](/docs/reference/runtime/intro)を用意しています -- Wailsで構築されたアプリケーションは、Apple StoreおよびMicrosoft Storeに準拠しています - -例えば [varly](https://varly.app) は、Wailsで構築されたMacOS・Windows向けのデスクトップアプリです。 見栄えが良いだけではなく、ネイティブメニューや半透明効果を使用しています。これらは、モダンなネイティブアプリに期待されるものです。 - -```mdx-code-block -

- - - -

-``` - -### クイックスタートテンプレート - -Wailsには、アプリの開発をすばやく始められるように、多数のテンプレートが用意されています。 Svelte、React、Vue、Preact、LitおよびVanilla用で、それぞれのテンプレートがあります。 各テンプレートには、Javascript版とTypescript版が用意されています。 - -### ネイティブ要素 - -Wailsは、ウィンドウ、メニュー、ダイアログなどのネイティブ要素を処理する専用ライブラリを使用するため、見栄えが良く、リッチな機能を備えたデスクトップアプリを構築できます。 - -**ブラウザを埋め込まないため**、無駄なリソースを割きません。 ブラウザを埋め込まない代わりに、OSプラットフォームのネイティブなレンダリングエンジンを使用します。 例えばWindowsの場合、Chromium上でビルトされているMicrosoft Webview2ライブラリを使用します。 - -### GoとJavascriptのやり取り - -Wailsは自動的に、GoのメソッドをJavascriptから利用できるようにするので、フロントエンドからGoのメソッド名を呼び出すことができます。 It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### ランタイムライブラリ - -WailsはGoとJavascriptの両方にランタイムライブラリを提供し、イベント、ロギング、ダイアログなど、モダンなアプリに必要な多くの機能を使うことができます。 - -### ライブ開発 - -#### 自動リビルド - -アプリを"dev"モードで起動すると、Wailsはあなたが書いたコードをネイティブデスクトップアプリとしてビルドしますが、プログラムアセットは常にディスクから読み込む状態になります。 その仕組みにより、アプリ起動中にGoコードが書き換えられると、変更を検出して自動的にアプリがリビルドされ、再起動します。 - -#### 自動リロード - -フロントエンドアセットの変更が検出された場合、起動中のアプリは自動的にリロードされ、変更がすぐに反映されます。 - -#### ブラウザを使った開発 - -If you prefer to debug and develop in a browser then Wails has you covered. ブラウザでのデバッグや開発も、Wailsにお任せください。 起動中のアプリはWebサーバを兼ねており、お好きなブラウザから接続してアプリを操作することができます。 プログラムアセットが書き換わった時はすぐに更新されます。 - -### 本番用のネイティブバイナリ - -アプリを本番用にビルドする準備ができたら、CLIが、アプリを単一の実行可能ファイルへコンパイルし、すべてのアセットをバンドルしてくれます。 WindowsおよびMacOSでは、配布用のネイティブパッケージを作成できます。 パッケージ化に必要なアイコン、info.plist、マニフェストファイルなどは、プロジェクトの一部としてカスタマイズできるため、アプリのビルド方法をフルコントロールできます。 - -### ツール - -Wails CLIを使うことで、簡単にアプリを生成、ビルド、バンドルすることができます。 アイコンの作成、最適なコンパイル構成の設定、本番向けのバイナリ配布など、面倒なことをあなたの代わりに引き受けてくれます。 多数のテンプレートの中から、あなたに合ったものを選んで、すぐに開発を始めましょう! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx deleted file mode 100644 index 73aa50600..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -例: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning 注意 - -**Wailsプロジェクトでは、サードパーティ製テンプレートのメンテナンスは行っておらず、責任も負いません!** - -テンプレートについてよく分からない場合は、`package.json`および`wails.json`を確認し、どのようなスクリプトが実行されるのかや、どのようなパッケージがインストールされるのかを調べてください。 - -::: - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Goコンパイラに渡すビルドタグ。 値は引用符で囲んでください。 また、スペースまたはカンマで区切ってください(両方は使用しないでください)。 | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | | -| -obfuscate | [garble](https://github.com/burrowers/garble)を使用してアプリケーションを難読化する | false | -| -garbleargs | garbleへ渡す引数 | `-literals -tiny -seed=random` | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::Info -On Mac, the application will be bundled with `Info.plist`, not `Info.dev.plist`. -::: - -:::info UPX on Apple Silicon - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - -:::info UPX on Windows - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime -- On macOS, it will bundle the application into a `.app` file and run it. It will use a `build/darwin/Info.dev.plist` for development. - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | デバッグ | -| -noreload | Disable automatic reload when assets change | | -| -nocolour | Turn off colour cli output | false | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/menus.mdx deleted file mode 100644 index 8322f9731..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/menus.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -Menu構造体を更新し、[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu)メソッドを呼び出すことで、メニューを動的に更新することも可能です。 - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -Menuは、MenuItemのコレクションです。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -| | | | | -|:-----------:|:-----:|:-----:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `f39` | | -| `page down` | `f15` | `f30` | | - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - -Roles are currently supported on Mac only. - -::: - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| ロール | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx deleted file mode 100644 index 0c9753719..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx +++ /dev/null @@ -1,723 +0,0 @@ ---- -sidebar_position: 3 ---- - -# オプション - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import ( - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" - "github.com/wailsapp/wails/v2/pkg/options/linux" - "github.com/wailsapp/wails/v2/pkg/options/mac" - "github.com/wailsapp/wails/v2/pkg/options/windows" -) - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - AssetServer: &assetserver.Options{ - Assets: assets, - Handler: assetsHandler, - Middleware: assetsMidldeware, - }, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - ZoomFactor: 1.0, - IsZoomControlEnabled: false, - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - WindowIsTranslucent: false, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -名前: Title
データ型: `string` - -### Width - -The initial width of the window. - -名前: Width
データ型: `int`
デフォルト値: 1024 - -### Height - -The initial height of the window. - -名前: Height
データ型: `int`
デフォルト値: 768 - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -名前: DisableResize
データ型: `bool` - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -名前: Fullscreen
データ型: `bool` - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -名前: Frameless
データ型: `bool` - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -名前: MinWidth
データ型: `int` - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -名前: MinHeight
データ型: `int` - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -名前: MaxWidth
データ型: `int` - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -名前: MaxHeight
データ型: `int` - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -名前: StartHidden
データ型: `bool` - -### HideWindowOnClose - -By default, closing the window will close the application. この設定を`true`にすると、ウィンドウを閉じる操作をした際に、 - -ウィンドウが非表示の状態になります。 - -名前: HideWindowOnClose
データ型: `bool` - -### BackgroundColour - -This value is the default background colour of the window. 例: options.NewRGBA(255,0,0,128) - 50%透過された赤色 - -名前: BackgroundColour
データ型: `*options.RGBA`
デフォルト値: white - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -名前: AlwaysOnTop
データ型: `bool` - -### Assets - -Deprecated: Please use Assets on [AssetServer specific options](#assetserver). - -### AssetsHandler - -Deprecated: Please use AssetsHandler on [AssetServer specific options](#assetserver). - -### AssetServer - -This defines AssetServer specific options. It allows to customize the AssetServer with static assets, serving assets dynamically with an `http.Handler` or hook into the request chain with an `assetserver.Middleware`. - -Not all features of an `http.Request` are currently supported, please see the following feature matrix: - -| Feature | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | -| WebSockets | ❌ | ❌ | ❌ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -Name: AssetServer
Type: `*assetserver.Options` - -#### Assets - -The static frontend assets to be used by the application. - -A GET request is first tried to be served from this `fs.FS`. If the `fs.FS` returns `os.ErrNotExist` for that file, the request handling will fallback to the [Handler](#handler) and tries to serve the GET request from it. - -If set to nil, all GET requests will be forwarded to [Handler](#handler). - -Name: Assets
Type: `fs.FS` - -#### Handler - -The assets handler is a generic `http.Handler` for fallback handling of assets that can't be found. - -The handler will be called for every GET request that can't be served from [Assets](#assets), due to `os.ErrNotExist`. Furthermore all non GET requests will always be served from this Handler. - -If not defined, the result is the following in cases where the Handler would have been called: -- GET request: `http.StatusNotFound` -- Other request: `http.StatusMethodNotAllowed` - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -名前: AssetsHandler
データ型: `http.Handler` - -#### Middleware - -Middleware is a HTTP Middleware which allows to hook into the AssetServer request chain. It allows to skip the default request handler dynamically, e.g. implement specialized Routing etc. The Middleware is called to build a new `http.Handler` used by the AssetSever and it also receives the default handler used by the AssetServer as an argument. - -If not defined, the default AssetServer request chain is executed. - -Name: Middleware
Type: `assetserver.Middleware` - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -:::note - -Macでは、メニューが指定されていない場合、デフォルトメニューが作成されます。 - -::: - -名前: Menu
データ型: `*menu.Menu` - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: Logger
データ型: `logger.Logger`
デフォルト値: 標準出力へのロガー - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: LogLevel
データ型: `logger.LogLevel`
デフォルト値: 開発モードの場合は`Info`、本番モードの場合は`Error` - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -名前: LogLevelProduction
データ型: `logger.LogLevel`
デフォルト値: `Error` - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -名前: OnStartup
データ型: `func(ctx context.Context)` - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -名前: OnDomReady
データ型: `func(ctx context.Context)` - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -名前: OnShutdown
データ型: `func(ctx context.Context)` - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -名前: OnBeforeClose
データ型: `func(ctx context.Context) bool` - -### WindowStartState - -Defines how the window should present itself at startup. - -| 値 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -名前: WindowStartState
データ型: `options.WindowStartState` - -### CSSDragProperty - -ウィンドウをドラッグできる要素を特定するためのCSSプロパティ名を設定します。 デフォルト値: `--wails-draggable` - -名前: CSSDragProperty
データ型: `string` - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. デフォルト値: `drag` - -名前: CSSDragValue
データ型: `string` - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -名前: Bind
データ型: `[]interface{}` - -### Windows - -[Windows固有のオプション](#windows)を定義します。 - -名前: Windows
データ型: `*windows.Options` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -名前: WebviewIsTransparent
データ型: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. 多くの場合、[WebviewIsTransparent](#WebviewIsTransparent)と組み合わせて使用されます。 - -ビルド22621より前のWindows 11の場合、半透明を実現させるために[BlurBehind](https://learn.microsoft.com/ja-jp/windows/win32/dwm/blur-ovw)メソッドを使用するため、処理が遅くなる可能性があります。 ビルド22621以降のWindows 11では、より高速な、新しい半透明タイプが有効になります。 デフォルトで使用される半透明タイプは、Windowsにより決定されます。 このタイプを設定するには、[BackdropType](#BackdropType)オプションを使用してください。 - -名前: WindowIsTranslucent
データ型: `bool` - -#### BackdropType - -:::note - -この設定を適用するには、Windows 11 ビルド22621以降が必要です。 - -::: - -ウィンドウの半透明タイプを設定します。 この設定は、[WindowIsTranslucent](#WindowIsTranslucent)が`true`に設定されている場合にのみ適用されます。 - -名前: BackdropType
データ型: `windows.BackdropType` - -値は次のいずれかを指定してください: - -| 値 | Description | -| ------- | ----------------------------------------------------------------------------------- | -| Auto | Windowsに背景を決定させる | -| None | 半透明にしない | -| Acrylic | [アクリル](https://learn.microsoft.com/ja-jp/windows/apps/design/style/acrylic)の効果を使用する | -| Mica | [マイカ](https://learn.microsoft.com/ja-jp/windows/apps/design/style/mica)の効果を使用する | -| Tabbed | タブを使用する。 これはマイカに似ている背景です。 | - -#### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -名前: DisableWindowIcon
データ型: `bool` - -#### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -名前: DisableFramelessWindowDecorations
データ型: `bool` - -#### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -名前: WebviewUserDataPath
データ型: `string` - -#### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -名前: WebviewBrowserPath
データ型: `string` - -### ZoomFactor - -Name: ZoomFactor
Type: `float64` - -This defines the zoom factor for the WebView2. This is the option matching the Edge user activated zoom in or out. - -### IsZoomControlEnabled - -Name: IsZoomControlEnabled
Type: `bool` - -This enables the zoom factor to be changed by the user. Please note that the zoom factor can be set in the options while disallowing the user to change it at runtime (f.e. for a kiosk application or similar). - -#### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| 値 | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | _デフォルト値_です。 The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -名前: Theme
データ型: `windows.Theme` - -#### CustomTheme - -:::note - -サポートされるWindowsの最小バージョン: Windows 10/11 2009/21H2 ビルド22000 - -::: - -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. - -名前: CustomTheme
データ型: `windows.CustomTheme` - -##### CustomTheme 型 - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### Messages - -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. - -名前: Messages
データ型: `*windows.Messages` - -Customise this for any language you choose to support. - -#### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -名前: ResizeDebounceMS
データ型: `uint16` - -#### OnSuspend - -Windowsがローパワーモード(サスペンド/休止状態) に切り替わると呼び出されるコールバックを設定します。 - -名前: OnSuspend
データ型: `func()` - -#### OnResume - -Windowsがローパワーモード(サスペンド/休止状態) から復帰したときに呼び出されるコールバックを設定します。 - -名前: OnResume
データ型: `func()` - -### Mac - -[Mac固有のオプション](#mac)を定義します。 - -名前: Mac
データ定義: `*mac.Options` - -#### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -名前: TitleBar
データ型: [`*mac.TitleBar`](#titlebar-struct) - -##### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -名前: Appearance
データ型: [`mac.AppearanceType`](#appearance-type) - -##### Appearance 型 - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| 値 | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -名前: WebviewIsTransparent
データ型: `bool` - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -名前: WindowIsTranslucent
データ型: `bool` - -#### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -名前: About
データ型: [`*mac.AboutInfo`](#about-struct) - -##### About struct - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -```mdx-code-block -
- -
-
-``` - -When clicked, that will open an about message box: - -```mdx-code-block -
- -
-
-``` - -### Linux - -[Linux固有のオプション](#linux)を定義します。 - -名前: Linux
データ型: `*linux.Options` - -#### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -名前: Icon
データ型: `[]byte` - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Some window managers may ignore it, or result in a black window. - -名前: WindowIsTranslucent
データ型: `bool` \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx deleted file mode 100644 index 6084f6682..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. - -The JSON Schema for this file is located [here](https://wails.io/schemas/config.v2.json). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx deleted file mode 100644 index 39ae7e0a9..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -これらは、システムブラウザに関連したメソッドです。 - -### BrowserOpenURL - -指定されたURLをシステムブラウザで開きます。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx deleted file mode 100644 index 997acad0e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -sidebar_position: 5 ---- - -# ダイアログ - -ランタイムでは、ファイルセレクターやメッセージボックスといったネイティブダイアログへのアクセスを提供しています。 - -:::info Javascript - -現在、Javascriptランタイムではダイアログをサポートしていません。 - -::: - -### OpenDirectoryDialog - -ユーザにディレクトリの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返り値: 選択されたディレクトリ(キャンセルされた場合は空) またはエラー - -### OpenFileDialog - -ユーザにファイルの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返り値: 選択されたファイル(キャンセルされた場合は空) またはエラー - -### OpenMultipleFilesDialog - -ユーザに複数ファイルの選択を求めるダイアログを開きます。 [OpenDialogOptions](#opendialogoptions)を使用してカスタマイズできます。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返り値: 選択された複数ファイル(キャンセルされた場合はnil) またはエラー - -### SaveFileDialog - -保存の目的でユーザにファイル名を入力選択させるダイアログを開きます。 [SaveDialogOptions](#savedialogoptions)を使用してカスタマイズできます。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返り値: 入力選択されたファイル(キャンセルされた場合は空) またはエラー - -### MessageDialog - -メッセージダイアログを使用してメッセージを表示します。 [MessageDialogOptions](#messagedialogoptions)を使用してカスタマイズできます。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返り値: 選択されたボタンのテキストまたはエラー - -## オプション - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ------------------------- | --- | --- | --- | -| DefaultDirectory | ダイアログが開かれたときに初期表示するディレクトリ | ✅ | ✅ | ✅ | -| DefaultFilename | デフォルトファイル名 | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | ファイルフィルタのリスト | ✅ | ✅ | ✅ | -| ShowHiddenFiles | システムの隠しファイルを表示 | | ✅ | ✅ | -| CanCreateDirectories | ユーザによるディレクトリの作成を許可する | | ✅ | | -| ResolvesAliases | エイリアスではなくファイルパスを返す | | ✅ | | -| TreatPackagesAsDirectories | パッケージへのナビゲーションを許可 | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ------------------------- | --- | --- | --- | -| DefaultDirectory | ダイアログが開かれたときに初期表示するディレクトリ | ✅ | ✅ | ✅ | -| DefaultFilename | デフォルトファイル名 | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | ファイルフィルタのリスト | ✅ | ✅ | ✅ | -| ShowHiddenFiles | システムの隠しファイルを表示 | | ✅ | ✅ | -| CanCreateDirectories | ユーザによるディレクトリの作成を許可する | | ✅ | | -| TreatPackagesAsDirectories | パッケージへのナビゲーションを許可 | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------- | -------------- | --- | --- | -| Type | メッセージダイアログの種類 (質問、情報など) | ✅ | ✅ | ✅ | -| Title | ダイアログのタイトル | ✅ | ✅ | ✅ | -| Message | ユーザに表示するメッセージ | ✅ | ✅ | ✅ | -| Buttons | ボタンテキストのリスト | | ✅ | | -| DefaultButton | 指定されたテキストのボタンをデフォルトボタンとして扱う。 Bound to `return`. | ✅[*](#windows) | ✅ | | -| CancelButton | 指定されたテキストのボタンをキャンセルボタンとして扱う。 `escape`キーにバインドされます。 | | ✅ | | - -#### Windows - -Windowsでは、ボタンのカスタマイズができない標準ダイアログタイプがあります。 The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue". - -For Question dialogs, the default button is "Yes" and the cancel button is "No". This can be changed by setting the `DefaultButton` value to `"No"`. - -Example: -```go - result, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Question", - Message: "Do you want to continue?", - DefaultButton: "No", - }) -``` - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -1番目のボタンがデフォルトになります: - -```mdx-code-block -
- -
-
-``` - -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -```mdx-code-block -
- -
-
-``` - -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -```mdx-code-block -
- -
-
-
-
-``` - -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx deleted file mode 100644 index 59d19e3ac..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# イベント - -Wailsでは、GoまたはJavascriptによって発行および受信できる、一元化されたイベントシステムが用意されています。 必要に応じて、イベント発行時にデータを渡すことも可能です。 イベントリスナーは、そのデータをローカルデータ型で受け取ります。 - -### EventsOn - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定します。 `eventName`という名前のイベントが[発行](#EventsEmit)されると、コールバックがトリガーされます。 イベント発行時にデータも付与されていた場合、そのデータはコールバックに渡されます。 It returns a function to cancel the listener. - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()`
JS: `EventsOn(eventName string, callback function(optionalData?: any)): () => void` - -### EventsOff - -このメソッドは、指定されたイベント名のイベントリスナー設定を解除します。引数の`additionalEventNames`を使用することで、複数のリスナーを一度に解除できます。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定し、一度だけトリガーさせます。 It returns a function to cancel the listener. - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()`
JS: `EventsOnce(eventName string, callback function(optionalData?: any)): () => void` - -### EventsOnMultiple - -このメソッドは、指定されたイベント名のイベントリスナーを新たに設定し、最大`counter`回だけトリガーします。 It returns a function to cancel the listener. - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int) func()`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int): () => void` - -### EventsEmit - -このメソッドは、指定されたイベントを発行します。 必要に応じて、イベント発行時にデータを渡すこともできます。 このメソッドによって、任意のイベントリスナーをトリガーさせることができます。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx deleted file mode 100644 index 2dc8d1b14..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -sidebar_position: 1 ---- - -# イントロダクション - -ランタイムは、アプリケーションにユーティリティメソッドを提供するライブラリです。 GoとJavascriptの両方にランタイムがあり、どちらにもほぼ同じメソッドが提供されています。 - -ユーティリティメソッドには次のようなものがあります: - -- [ウィンドウ](window.mdx) -- [Menu](menu.mdx) -- [ダイアログ](dialog.mdx) -- [イベント](events.mdx) -- [Browser](browser.mdx) -- [ログ](log.mdx) - -Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポートすることで利用できます。 このパッケージのすべてのメソッドは、1番目の引数でContextを渡す必要があります。 このContextは、[OnStartup](../options.mdx#onstartup)フック、または[OnDomReady](../options.mdx#ondomready)フックからあらかじめ取得しておいてください。 - -:::info 備考 - -[OnStartup](../options.mdx#onstartup)で提供されるContextは、ウィンドウが別のスレッドで初期化されているため、ランタイムが機能する保証がありません。 起動時にランタイムメソッドを呼び出したい場合は、[OnDomReady](../options.mdx#ondomready)を使用してください。 - -::: - -Javascriptのランタイムは、`window.runtime`マップを介してフロントエンド上で利用できます。 `dev`モードでは、Typescript型定義を提供するランタイムパッケージが生成されます。 これらは、フロントエンドディレクトリの`wailsjs`ディレクトリに配置しておく必要があります。 - -### 非表示 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -アプリケーションを非表示にします。 - -:::info 備考 - -Macでこのメソッドを使用すると、標準のMacアプリケーションにおけるメニュー項目の`Hide`と同じ方法で、アプリケーションが非表示になります。 これはウィンドウの非表示とは異なりますが、アプリケーションはフォアグラウンドに残ったままになります。 WindowsおよびLinuxでは、`WindowHide`メソッドと同等です。 - -::: - -### 表示 - -アプリケーションを表示します。 - -:::info 備考 - -Macでこのメソッドを使用すると、アプリケーションがフォアグラウンドに戻ります。 WindowsおよびLinuxでは、`WindowShow`メソッドと同等です。 - -::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### 終了 - -アプリケーションを終了します。 - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### 環境 - -現在の環境の詳細情報を取得します。 - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx deleted file mode 100644 index 057aa802a..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# ログ - -Wailsでは、GoまたはJavascriptから呼び出すことのできるロギングメカニズムを用意しています。 一般的なロガーと同じように、ログにはいくつかのログレベルがあります: - -- トレース -- デバッグ -- 情報 -- 警告 -- Error -- 致命的 - -ロガーは、設定されている出力ログレベル以上のログメッセージを出力します。 例えば、出力ログレベルを`Debug`に設定した場合、`Trace`以外のすべてのレベルのメッセージが出力されます。 - -### LogPrint - -指定されたメッセージをRawメッセージとしてロギングします。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -指定されたメッセージをRawメッセージとしてロギングします。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -指定されたメッセージを`Trace`ログレベルでロギングします。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -指定されたメッセージを`Trace`ログレベルでロギングします。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -指定されたメッセージを`Debug`ログレベルでロギングします。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -指定されたメッセージを`Debug`ログレベルでロギングします。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -指定されたメッセージを`Info`ログレベルでロギングします。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -指定されたメッセージを`Info`ログレベルでロギングします。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -指定されたメッセージを`Warning`ログレベルでロギングします。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -指定されたメッセージを`Warning`ログレベルでロギングします。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -指定されたメッセージを`Error`ログレベルでロギングします。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -指定されたメッセージを`Error`ログレベルでロギングします。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -指定されたメッセージを`Fatal`ログレベルでロギングします。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -指定されたメッセージを`Fatal`ログレベルでロギングします。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -出力ログレベルを設定します。 Javascriptでは、数値が次のログレベルに対応しています: - -| 値 | ログレベル | -| - | ----- | -| 1 | トレース | -| 2 | デバッグ | -| 3 | 情報 | -| 4 | 警告 | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## カスタムロガーの使用 - -カスタムロガーは、アプリケーションオプションの1つである[Logger](../options.mdx#logger)で指定してあげることで、使用することができます。 カスタムロガーを使用する際の唯一の要件は、`github.com/wailsapp/wails/v2/pkg/logger`で定義されている`logger.Logger`インターフェースを、ロガーに実装することです: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx deleted file mode 100644 index 14bad37f4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -これらは、アプリケーションメニューに関連したメソッドです。 - -:::info Javascript - -現在、Javascriptランタイムではメニューをサポートしていません。 - -::: - -### MenuSetApplicationMenu - -指定された[menu](../menus.mdx)をアプリケーションメニューとして設定します。 - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -`MenuSetApplicationMenu`に渡されたメニューへの変更を検知し、アプリケーションメニューを更新します。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx deleted file mode 100644 index e6a227ac9..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -sidebar_position: 4 ---- - -# ウィンドウ - -アプリケーションウィンドウを制御できるメソッド群です。 - -### WindowSetTitle - -ウィンドウのタイトルバーにテキストを設定します。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -ウィンドウをフルスクリーンにします。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -フルスクリーンにする前のウィンドウサイズおよび位置に戻します。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -ウィンドウがフルスクリーンの場合は、trueを返します。 - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### WindowCenter - -ウィンドウが現在表示されているモニターの中央に、ウィンドウを配置させます。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowExecJS - -ウィンドウ内で、任意のJSコードを実行します。 - -このメソッドは、ブラウザ上で非同期にコードを実行し、すぐにリターンされます。 スクリプトでエラーが発生した場合、エラーログはブラウザコンソールでのみ確認できます。 - -Go: `WindowExecJS(ctx context.Context, js string)` - -### WindowReload - -リロードします。(現在表示されているページをリロード) - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -アプリケーションフロントエンドをリロードします。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windowsのみ使用可能。 - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -ウィンドウのテーマをシステムデフォルト(ダーク/ライト) に設定します。 - -### WindowSetLightTheme - -Windowsのみ使用可能。 - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -ウィンドウのテーマをライトに設定します。 - -### WindowSetDarkTheme - -Windowsのみ使用可能。 - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -ウィンドウのテーマをダークに設定します。 - -### WindowShow - -ウィンドウが非表示になっている場合は、表示させます。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -現在表示されているウィンドウを非表示にします。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -ウィンドウが最小化、最大化、またはフルスクリーンになっていない場合、trueを返します。 - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### WindowSetSize - -ウィンドウの幅と高さを設定します。 - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -ウィンドウの幅と高さを取得します。 - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### WindowSetMinSize - -ウィンドウの最小サイズを設定します。 現在のウィンドウサイズが、指定された最小サイズよりも小さい場合、現在のウィンドウサイズは変更されます。 - -サイズを`0,0`に設定すると、サイズの制約が無効化されます。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -ウィンドウの最大サイズを設定します。 現在のウィンドウサイズが、指定された最大サイズよりも大きい場合、現在のウィンドウサイズは変更されます。 - -サイズを`0,0`に設定すると、サイズの制約が無効化されます。 - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -ウィンドウを常に最前面に表示するかを切り替えます。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetPosition - -現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を設定します。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を取得します。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowMaximise - -ウィンドウを最大化します。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -ウィンドウの最大化を解除し、最大化する前のサイズおよび位置に戻します。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -ウィンドウが最大化している場合はtrueを返します。 - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### WindowToggleMaximise - -最大化の状態を切り替えます。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -ウィンドウを最小化します。 - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -ウィンドウの最小化を解除し、最小化する前のサイズおよび位置に戻します。 - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -ウィンドウが最小化している場合はtrueを返します。 - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -ウィンドウの背景色をRGBAカラー定義で設定します。 この色は、すべての透過ピクセルに対して表示されます。 - -R、G、B、Aの有効な値の範囲は0~255です。 - -:::info Windows - -Windowsの場合、0または255のアルファ値(A) のみがサポートされています。 0以外の値を指定すると、すべて255とみなされます。 - -::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript型定義 - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx deleted file mode 100644 index 9928b4785..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx deleted file mode 100644 index dfab958b4..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# プロジェクトのコンパイル - -プロジェクトディレクトリ上で、`wails build`コマンドを実行しましょう。 そうすることで、プロジェクトがコンパイルされ、`build/bin`ディレクトリ内に本番配布用のバイナリが出力されます。 - -バイナリを起動すると、デフォルト仕様のアプリを確認することができます: - -```mdx-code-block -
- -
-
-``` - -コンパイルオプションについて詳しくは、[CLIリファレンス](../reference/cli.mdx#build)をご覧ください。 diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx deleted file mode 100644 index 2a049fd1e..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Angular - -Wailsでは、Angular向けのテンプレートは用意されていませんが、Angular自体を使用することはできます。 - -## 開発モード - -Angularで開発モードを使用するには、`wails.json`で下記のように設定してください: - -```json - "frontend:build": "npx ng build", - "frontend:install": "npm install", - "frontend:dev:watcher": "npx ng serve", - "frontend:dev:serverUrl": "http://localhost:4200", -``` \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx deleted file mode 100644 index 9d1d772d0..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx deleted file mode 100644 index 88a1698db..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS installer - -```mdx-code-block -

- -
-

-``` - -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the _Bin_ folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx deleted file mode 100644 index b783461da..000000000 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - -- Create a new Wails application -- Build the application -- Run the application - -:::note - -This tutorial uses Windows as the target platform. Output will vary slightly depending on your operating system. - -::: - -## Create a new Wails application - -To create a new Wails application using the default vanilla JS template, you need to run the following command: - -```bash -wails init -n helloworld -``` - -You should see something similar to the following: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## Build the application - -To build the application, change to the new `helloworld` project directory and run the following command: - -```bash -wails build -``` - -You should see something like the following: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -This has compiled the application and saved it in the `build/bin` directory. - -## Run the application - -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: - -```mdx-code-block -
- -
-
-``` - -We can run it by simply double-clicking the `helloworld.exe` file. - -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. - -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. - -You should see the application working as expected: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/appendix/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/appendix/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 86% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx index c9a5192df..6b180130b 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx @@ -12,8 +12,7 @@ Wailsに関する[最高のリンク一覧](https://github.com/wailsapp/awesome- ## サポートチャネル -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) +- [Discord](https://discord.com/invite/JDdSxwjhGf) - [Github Issues](https://github.com/wailsapp/wails/issues) - [v2ベータディスカッションボード](https://github.com/wailsapp/wails/discussions/828) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/emailit.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/emailit.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/encrypteasy.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/encrypteasy.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/minecraftupdater.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/minecraftupdater.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/modalfilemanager.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/modalfilemanager.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/mollywallet.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/mollywallet.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/october.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/october.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/optimus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/optimus.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/portfall.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/portfall.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/restic-browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/restic-browser.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/riftshare.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/riftshare.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/scriptbar.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/scriptbar.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/surge.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/surge.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wally.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wally.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wombat.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wombat.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/ytd.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/ytd.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/building.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/building.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/angular.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/angular.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/obfuscated.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/obfuscated.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/overscroll.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/overscroll.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/templates.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/templates.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows-installer.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows-installer.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 66% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx index 0910a4060..60e7ab094 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx @@ -17,27 +17,25 @@ sidebar_position: 20 :::note - -This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). +このチュートリアルは[@tatadan](https://twitter.com/tatadan)の好意により提供されたもので、[Wails Examples Repository](https://github.com/tataDan/wails-v2-examples)の一部を構成しています。 ::: +このチュートリアルでは、Web上から犬の写真を取得し、表示するアプリケーションを開発します。 -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. +### プロジェクトを作成する -### Create the project +では、アプリケーションを作成しましょう。ターミナルで次のコマンドを入力します: `wails init -n dogs-api -t svelte` -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` +注: IDEサポートを追加したい場合は、オプションでこのコマンドの最後に`-ide vscode`または`ide goland`を追加することができます。 -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. +では、cd `dogs-api`をして、プロジェクトファイルの編集を始めましょう。 -Now let's `cd dogs-api` and start editing the project files. +### 未使用のコードを削除する -### Remove unused code +まず、使用しないことがわかっているいくつかの要素を削除することから始めます: -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: +- `app.go`を開き、以下の行を削除してください: ```go // Greet returns a greeting for the given name @@ -46,14 +44,14 @@ func (a *App) Greet(name string) string { } ``` -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file +- `frontend/src/App.svelte`を開き、すべての行を削除します。 +- `frontend/src/assets/images/logo-universal.png`ファイルを削除します。 -### Creating our application +### アプリケーションの作成 -Now let's add our new Go code. +では、新しいGoのコードを追加してみましょう。 -Add the following struct declarations to `app.go` before the function definitions: +`app.go`の関数定義の前に、次の構造体宣言を追加します: ```go type RandomImage struct { @@ -72,7 +70,7 @@ type ImagesByBreed struct { } ``` -Add the following functions to `app.go` (perhaps after the existing function definitions): +以下の関数を`app.go`に追加します(既存の関数定義の後ろに追加するかもしれません): ```go func (a *App) GetRandomImageUrl() string { @@ -137,7 +135,7 @@ func (a *App) GetImageUrlsByBreed(breed string) []string { } ``` -Modify the `import` section of `app.go` to look like this: +`app.go`の`import`セクションを次のように変更します: ```go import ( @@ -151,7 +149,9 @@ import ( ) ``` -Add the following lines to `frontend/src/App.svelte`: +以下の行を`frontend/src/App.svelte`に追加します: + +```html ```html @@ -236,14 +236,12 @@ Add the following lines to `frontend/src/App.svelte`: } ``` - - -### Testing the application +### アプリケーションのテスト -To generate the bindings and test the application, run `wails dev`. +バインディングを生成し、アプリケーションをテストするには、`wails dev`を実行します。 -### Compiling the application +### アプリケーションのコンパイル -To compile the application to a single, production grade binary, run `wails build`. +アプリケーションを単一の、本番用のバイナリにコンパイルするには、`wails build`を実行します。 \ No newline at end of file diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 99% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx rename to website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx index b783461da..f9411527a 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx +++ b/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx @@ -119,4 +119,4 @@ You should see the application working as expected: />
-``` +``` \ No newline at end of file diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx deleted file mode 100644 index 49cb7843b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Discord](https://discord.com/invite/JDdSxwjhGf) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx deleted file mode 100644 index 4a1ebe835..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# EmailIt - -

- -
-

- -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx deleted file mode 100644 index 13c2d8345..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EncryptEasy - -

- -
-

- -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx deleted file mode 100644 index 78cbfca86..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# FileHound Export Utility - -

- -
-

- -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 11247339d..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Minecraft Updater - -

- -
-

- -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx deleted file mode 100644 index a7ae8c492..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Modal File Manager - -

- -
-

- -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx deleted file mode 100644 index 534b097ca..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Molley Wallet - -

- -
-

- -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx deleted file mode 100644 index 889d2dd9e..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# October - -

- -
-

- -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx deleted file mode 100644 index c3eb79507..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Optimus - -

- -
-

- -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx deleted file mode 100644 index 4cc2c63c9..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Portfall - -

- -
-

- -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx deleted file mode 100644 index 1505ce07a..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Restic Browser - -

- -
-

- -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx deleted file mode 100644 index 5223e88cf..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# RiftShare - -

- -
-

- -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx deleted file mode 100644 index aaa556f92..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# ScriptBar - -

- -
-

- -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx deleted file mode 100644 index 2d895dc29..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Surge - -

- -
-

- -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx deleted file mode 100644 index 2a2498f40..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wally - -

- -
-

- -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx deleted file mode 100644 index 54cedacea..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wombat - -

- -
-

- -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx deleted file mode 100644 index 178ff0529..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Ytd - -

- -
-

- -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx deleted file mode 100644 index d9a29a6fa..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Templates - -This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide. - -To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]` - -If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used. - -Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs -- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3 -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS \ No newline at end of file diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/_category_.json deleted file mode 100644 index fad21931a..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Contributing", - "position": 99 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/developing-new-features.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/developing-new-features.mdx deleted file mode 100644 index 57c5b101b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/developing-new-features.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Developing New Features - -We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: - -- Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. -- Before developing, check that the ticket includes the following information: -- The purpose of the enhancement -- What is out of scope for the enhancement -- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details -- Comment on the ticket stating you wish to develop the feature -- Clone the repository and create a branch with the format `feature/_` -- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes -- Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/documenting.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/documenting.mdx deleted file mode 100644 index 06f33914b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/documenting.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 40 ---- - -# Documenting - -This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code. - -We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. - -To set up a local documentation development environment, do the following: - -- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install) -- `cd website` -- `npm install` -- `npm run start` - -After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. - -## Versioning - -We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. - -There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories. - -The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. - -## Languages - -The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. - -### Add new language - -If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/fixing-bugs.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/fixing-bugs.mdx deleted file mode 100644 index 51bd90b74..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/fixing-bugs.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 30 ---- - -# Fixing Bugs - -The process for fixing bugs are as follows: - -- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix -- Before developing, check that the ticket includes the following information: -- The scope of the issue including platforms affected -- The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example -- The output of `wails doctor` -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. -- Comment on the ticket stating you wish to develop a fix -- Clone the repository and create a branch with the format `bugfix/_` -- Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -bugfixes should be discussed as the approach may have unintended side effects. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/helping-others.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/helping-others.mdx deleted file mode 100644 index dcfc6160b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/helping-others.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 50 ---- - -# Helping Others - -A great way to contribute to the project is to help others who are experiencing difficulty. This is normally reported as a ticket or a message on the Wails slack channel. Even just clarifying the issue can really help out. Sometimes, when an issue is discussed and gets resolved, we create a guide out of it to help others who face the same issues. - -To join the Wails discord server, accept the invite [here](https://discord.com/invite/JDdSxwjhGf). - -:::note -Work In Progress -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/setting-up-a-dev-environment.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/setting-up-a-dev-environment.mdx deleted file mode 100644 index b933af9a6..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/setting-up-a-dev-environment.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Setting up a Development Environment - -You can set up a development environment by doing the following: - -- Install the latest versions of Go and Git -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert back to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/testing.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/testing.mdx deleted file mode 100644 index 284eec649..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/testing.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 35 ---- - -# Testing - -Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project: - -- Testing if a bug is reproducible on your local system -- Testing PRs to ensure that they work correctly - -If you chose to test if someone's bug report is reproducible on your local system, then feel free to add a comment on the ticket confirming this with the output of `wails doctor`. - -To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR. - -If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion or on discord. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/ways-of-contributing.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/ways-of-contributing.mdx deleted file mode 100644 index 6b76d99d9..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/ways-of-contributing.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Ways of contributing - -Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. - -There are many ways to contribute to the project: - -- Developing new features -- Fixing bugs -- Testing -- Documenting features -- Writing tutorials / guides -- Helping others on the issues + discussions boards - -Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx deleted file mode 100644 index a74c762d2..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 프로젝트 컴파일 - -프로젝트 디렉토리에서 `wails build`를 실행하세요. 이 작업은 프로젝트를 컴파일한 후 실행파일을 `build/bin` 디렉토리에 저장합니다. - -실행파일을 실행하면 아래와 같은 기본 애플리케이션을 볼 수 있습니다. - -
- -
- -
- -컴파일 옵션에 대한 자세한 내용은 [CLI Reference](../reference/cli.mdx#build)를 참조하세요. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx deleted file mode 100644 index fc9387174..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 애플리케이션 개발 - -프로젝트 디렉토리에서 `wails dev`를 실행하여 개발 모드에서 애플리케이션을 실행할 수 있습니다. 이렇게 하면 다음과 같은 작업이 수행됩니다. - -- 애플리케이션 빌드 및 실행 -- Go 코드를 Javascript에서 호출할 수 있도록 프론트엔드에 바인딩 -- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - -시작하려면 프로젝트 디렉토리에서 `wails dev`를 실행하세요. 더 자세한 정보는 [여기](../reference/cli.mdx#dev)에서 찾을 수 있습니다. - -Coming soon: Tutorial diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx deleted file mode 100644 index 9348ea0a2..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Creating a Project - -## Project Generation - -Now that the CLI is installed, you can generate a new project by using the `wails init` command. - -Pick your favourite framework: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte - -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react - -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
- - - -
- -There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks. - -To see the other options available, you can run `wails init -help`. More details can be found in the [CLI Reference](../reference/cli.mdx#init). - -## Project Layout - -Wails projects have the following layout: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### Project structure rundown - -- `/main.go` - The main application -- `/frontend/` - Frontend project files -- `/build/` - Project build directory -- `/build/appicon.png` - The application icon -- `/build/darwin/` - Mac specific project files -- `/build/windows/` - Windows specific project files -- `/wails.json` - The project configuration -- `/go.mod` - Go module file -- `/go.sum` - Go module checksum file - -The `frontend` directory has nothing specific to Wails and can be any frontend project of your choosing. - -The `build` directory is used during the build process. These files may be updated to customise your builds. If files are removed from the build directory, default versions will be regenerated. - -The default module name in `go.mod` is "changeme". You should change this to something more appropriate. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx deleted file mode 100644 index 1d702d6cc..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 설치하기 - -## 지원되는 플랫폼 - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 의존성 - -Wails는 설치 전에 아래와 같은 몇 가지 공통적인 의존성이 필요합니다. - -- Go 1.17+ -- NPM (Node 15+) - -### Go - -[Go 다운로드 페이지](https://go.dev/doc/install)에서 Go를 다운로드 합니다. - -공식 [Go 설치 지침](https://go.dev/doc/install)에 따라 진행하세요. 또한 `PATH` 환경변수에 `~/go/bin` 디렉토리 경로가 포함되어 있는지 확인해야 합니다. 터미널을 다시 시작하고 아래 내용을 확인하세요. - -- Go 설치 확인: `go version` -- PATH 변수에 "~/go/bin" 확인: `echo $PATH | grep go/bin` - -### NPM - -[Node 다운로드 페이지](https://nodejs.org/en/download/)에서 NPM을 다운로드 합니다. 우리는 일반적으로 최신 버전에서 테스트를 진행하기 때문에 최신 버전 사용을 권장합니다. - -정상적으로 설치된 것을 확인하기 위해 `npm --version`을 실행합니다. - -## 플랫폼에 따른 의존성 - -아래와 같이 플랫폼별 의존성이 있습니다. - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails를 사용하려면 xcode 명령어 라인 도구가 설치되어 있어야 합니다. This can be - done by running:
- xcode-select --install -
- - Wails requires that the{" "} - - WebView2 - {" "} - runtime is installed. Some Windows installations will already have this - installed. You can check using the wails doctor command (see - below). - - - Linux required the standard gcc build tools plus{" "} - libgtk3 and libwebkit. Rather than list a ton of - commands for different distros, Wails can try to determine what the - installation commands are for your specific distribution. Run{" "} - wails doctor after installation to be shown how to install the - dependencies. If your distro/package manager is not supported, please - consult the{" "} - Add Linux Distro guide. - -
- - - -## 선택 설치 - -- [UPX](https://upx.github.io/)는 어플리케이션 압축에 필요합니다. - -## Wails 설치 - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest`을 실행하여 Wails CLI를 설치합니다. - -## 시스템 점검 - -`wails doctor`를 실행하면 의존성이 올바르게 설치되어 있는지 점검할 수 있습니다. 문제가 있는 의존성에 대해서는 문제 해결을 위한 도움을 줄 수 있습니다. - -## `wails` 명령어를 찾을 수 없나요? - -시스템에서 `wails` 명령어를 찾을 수 없는 경우 Go 설치 지침을 잘 따라했는지 확인해보세요. 대부분 사용자 홈 디렉토리에 있는 `go/bin` 디렉토리가 `PATH` 환경변수에 존재하지 않는 경우입니다. 또한 변경사항이 명령 프롬프트에 반영되도록 일반적으로 열려 있는 모든 명령 프롬프트를 닫았다가 다시 열어야 합니다. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx deleted file mode 100644 index 4b68aef22..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx +++ /dev/null @@ -1,126 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -

- -

- -However, if we request `go.mod`, we will see the following output: - -

- -

- -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -

- -

- -:::warning -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access -to your filesystem. -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx deleted file mode 100644 index 4ae507f03..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx +++ /dev/null @@ -1,84 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - - -``` - -:::info Fullscreen -If you allow your application to go fullscreen, this drag functionality will be disabled. -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx deleted file mode 100644 index 5423ea495..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx +++ /dev/null @@ -1,125 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -

- -

- -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info Future Enhancement - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx deleted file mode 100644 index 28a224a26..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx +++ /dev/null @@ -1,101 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember -If you add support for a new package manager, don't forget to also update this page! -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx deleted file mode 100644 index a2f0c4a04..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx +++ /dev/null @@ -1,187 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx deleted file mode 100644 index dca7e83a3..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx deleted file mode 100644 index 8a8e85455..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx +++ /dev/null @@ -1,379 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -- name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* - jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. Now you need to make two action secrets on GitHub. It should start with _-----BEGIN CERTIFICATE-----_ and end with _-----END CERTIFICATE-----_. Navigate to _Settings -> Secrets -> Actions_ and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source": ["./build/bin/app.app"], - "bundle_id": "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign": { - "application_identity": "Developer ID Application: My Name" - } -} -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx deleted file mode 100644 index df75cbbc7..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Templates - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -
- -
- -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx deleted file mode 100644 index 4de561c08..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx +++ /dev/null @@ -1,142 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -

- -

- -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Workaround: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is *normally* due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 \ No newline at end of file diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx deleted file mode 100644 index 21de9a408..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx +++ /dev/null @@ -1,56 +0,0 @@ -# NSIS installer - -

- -
-

- -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the _Bin_ folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx deleted file mode 100644 index f59873eca..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx +++ /dev/null @@ -1,355 +0,0 @@ ---- -sidebar_position: 20 ---- - -# How does it work? - -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. - -
- -
- -## The Main Application - -### Overview - -The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### Options rundown - -This example has the following options set: - -- `Title` - The text that should appear in the window's title bar -- `Width` & `Height` - The dimensions of the window -- `Assets` - The application's frontend assets -- `OnStartup` - A callback for when the window is created and is about to start loading the frontend assets -- `OnShutdown` - A callback for when the application is about to quit -- `Bind` - A slice of struct instances that we wish to expose to the frontend - -A full list of application options can be found in the [Options Reference](reference/options). - -#### Assets - -The `Assets` option is mandatory as you can't have a Wails application without frontend assets. Those assets can be any files you would expect to find in a web application - html, js, css, svg, png, etc. **There is no requirement to generate asset bundles** - plain files will do. When the application starts, it will attempt to load `index.html` from your assets and the frontend will essentially work as a browser from that point on. It is worth noting that there is no requirement on where in the `embed.FS` the files live. It is likely that the embed path uses a nested directory relative to your main application code, such as `frontend/dist`: - -```go title="main.go" -//go:embed frontend/dist -var assets embed.FS -``` - -At startup, Wails will iterate the embedded files looking for the directory containing `index.html`. All other assets will be loaded relative to this directory. - -As production binaries use the files contained in `embed.FS`, there are no external files required to be shipped with the application. - -When running in development mode using the `wails dev` command, the assets are loaded off disk, and any changes result in a "live reload". The location of the assets will be inferred from the `embed.FS`. - -More details can be found in the [Application Development Guide](guides/application-development.mdx). - -#### Application Lifecycle Callbacks - -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). - -#### Method Binding - -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. - -:::info Note - -Wails requires that you pass in an _instance_ of the struct for it to bind it correctly - -::: - -In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods - -This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. - -## The Frontend - -### Overview - -The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: - -- Calling bound Go methods -- Calling runtime methods - -### Calling bound Go methods - -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: - -```javascript -// ... -import { Greet } from "../wailsjs/go/main/App"; - -function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }); -} -``` - -The Typescript declaration file gives you the correct types for the bound methods: - -```ts -export function Greet(arg1: string): Promise; -``` - -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. - -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields! - -:::info Note -Anonymous nested structs are not supported at this time. -::: - -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. - -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. - -Example: We update our `Greet` method to accept a `Person` instead of a string: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -The `wailsjs/go/main/App.js` file will still have the following code: - -```js title="App.js" -export function Greet(arg1) { - return window["go"]["main"]["App"]["Greet"](arg1); -} -``` - -But the `wailsjs/go/main/App.d.ts` file will be updated with the following code: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -So long as you have TypeScript as part of your frontend build configuration, you can use these models in the following way: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -The combination of generated bindings and TypeScript models makes for a powerful development environment. - -More information on Binding can be found in the [Binding Methods](guides/application-development.mdx#binding-methods) section of the [Application Development Guide](guides/application-development.mdx). - -### Calling runtime methods - -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro). - -[^1]: There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and workarounds for such cases. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx deleted file mode 100644 index 4e65f932e..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 소개 - -Wails는 Go 및 웹 기술을 사용하여 데스크톱 앱을 작성할 수 있는 프로젝트입니다. - -Consider it a lightweight and fast Electron alternative for Go. You can easily build applications with the flexibility and power of Go, combined with a rich, modern frontend. - -### 기능 - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- Live development mode using the power of [Vite](https://vite.net/) -- Powerful CLI to easily Create, Build and Package applications -- A rich [runtime library](/docs/next/reference/runtime) -- Applications built with Wails are Apple & Microsoft Store compliant - - -[varly](https://varly.app)는 Wails를 사용하여 작성된 MacOS & Windows용 데스크톱 애플리케이션입니다. 보기 좋을 뿐만 아니라 최신 네이티브 앱에서 바라는 기본 메뉴 구성과 반투명도를 사용합니다. - -

- - - -

- -### 빠른 시작 템플릿 - -Wails에는 애플리케이션을 빠르게 구성하고 실행할 수 있도록 미리 구성된 여러 템플릿이 함께 제공됩니다. Svelte, React, Vue, Preact, Lit, Vanilla와 같은 프레임워크 템플릿들이 있으며, 각 템플릿에는 Javascript와 Typescript 버전이 있습니다. - -### Native Elements - -Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build good-looking, feature rich desktop applications. - -**It does not embed a browser**, so it is resource efficient. Instead, it uses the native rendering engine for the platform. On Windows, this is the new Microsoft Webview2 library, built on Chromium. - -### Go & Javascript Interoperability - -Wails automatically makes your Go methods available to Javascript, so you can call them by name from your frontend! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### Runtime Library - -Wails provides a runtime library, for both Go and Javascript, that handles a lot of the things modern applications need, like Eventing, Logging, Dialogs, etc. - -### Live Development Experience - -#### Automatic Rebuilds - -When you run your application in "dev" mode, Wails will build your application as a native desktop application, but will read your assets from disk. It will detect any changes to your Go code and automatically rebuild and relaunch your application. - -#### Automatic Reloads - -When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately. - -#### Develop your application in a Browser - -If you prefer to debug and develop in a browser then Wails has you covered. The running application also has a webserver that will run your application in any browser that connects to it. It will even refresh when your assets change on disk. - -### Production-ready Native Binaries - -When you're ready to do the final build of your application, the CLI will compile it down to a single executable, with all the assets bundled into it. On Windows and MacOS, it is possible to create a native package for distribution. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built. - -### Tooling - -The Wails CLI provides a hassle-free way to generate, build and bundle your applications. It will do the heavy lifting of creating icons, compiling your application with optimal settings and delivering a distributable, production ready binary. Choose from a number of starter templates to get up and running quickly! diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx deleted file mode 100644 index 5a00db158..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -Example: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -Example: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | false | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::info UPX on Apple Silicon - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - -:::info UPX on Windows - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.17 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx deleted file mode 100644 index 1f849f853..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx +++ /dev/null @@ -1,261 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -It is also possible to dynamically update the menu, by updating the menu struct and calling [MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu). - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -- `backspace` -- `tab` -- `return` -- `enter` -- `escape` -- `left` -- `right` -- `up` -- `down` -- `space` -- `delete` -- `home` -- `end` -- `page up` -- `page down` -- `f1` -- `f2` -- `f3` -- `f4` -- `f5` -- `f6` -- `f7` -- `f8` -- `f9` -- `f10` -- `f11` -- `f12` -- `f13` -- `f14` -- `f15` -- `f16` -- `f17` -- `f18` -- `f19` -- `f20` -- `f21` -- `f22` -- `f23` -- `f24` -- `f25` -- `f26` -- `f27` -- `f28` -- `f29` -- `f30` -- `f31` -- `f32` -- `f33` -- `f34` -- `f35` -- `numlock` - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - -Roles are currently supported on Mac only. - -::: - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| Role | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx deleted file mode 100644 index 7bafbc0fa..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx +++ /dev/null @@ -1,633 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Options - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -Type: `string` - -### Width - -The initial width of the window. - -Type: `int`
Default: 1024. - -### Height - -The initial height of the window. - -Type: `int`
Default: 768 - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -Type: `bool` - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -Type: `bool` - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -Type: `bool` - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -Type: `int` - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -Type: `int` - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -Type: `int` - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -Type: `int` - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -Type: `bool` -### HideWindowOnClose - -By default, closing the window will close the application. Setting this to `true` means closing the window will - -hide the window instead. - -Type: `bool` - -### BackgroundColour - -This value is the default background colour of the window. Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency - -Type: `*options.RGBA`
Default: white - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -Type: `bool` - -### Assets - -The frontend assets to be used by the application. Requires an `index.html` file. - -Type: `embed.FS` - -### AssetsHandler - - - -The assets handler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the `assets` because the file is not found. - -| Value | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -Type: `http.Handler` - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -:::note -On Mac, if no menu is specified, a default menu will be created. -::: - -Type: `*menu.Menu` - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: `logger.Logger`
Default: Logs to Stdout - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: `logger.LogLevel`
Default: `Info` in dev mode, `Error` in production mode - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: `logger.LogLevel`
Default: `Error` - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -Type: `func(ctx context.Context)` - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -Type: `func(ctx context.Context)` - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -Type: `func(ctx context.Context)` - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Title: "Quit?", - Message: "Are you sure you want to quit?", - - Type: ` runtime`.QuestionDialog, - - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -Type: `func(ctx context.Context) bool` - -### WindowStartState - -Defines how the window should present itself at startup. - -| Value | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -Type: `options.WindowStartState` - -### CSSDragProperty - -Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. - -Type: `string` - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. - -Type: `string` - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -Type: `[]interface{}` - -### Windows - -This defines [Windows specific options](#windows-specific-options). - -Type: `*windows.Options` - -### Mac - -This defines [Mac specific options](#mac-specific-options). - -Type: `*mac.Options` - -### Linux - -This defines [Linux specific options](#linux-specific-options). - -Type: `*linux.Options` - -## Windows Specific Options - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: `bool` - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: `bool` - -### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -Type: `bool` - -### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -Type: `bool` - -### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -Type: `string` - -### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -Type: `string` - -### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| Value | Description | -| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | _Default_. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -Type: `windows.Theme` - -### CustomTheme - -:::note -Minimum Windows Version: Windows 10/11 2009/21H2 Build 22000 -::: - -Allows you to specify custom colours for TitleBar, TitleText and Border for both light and dark mode, as well as when the window is active or inactive. - -Type: `windows.CustomTheme` - -#### CustomTheme Type - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -### Messages - -A struct of strings used by the webview2 installer if a valid webview2 runtime is not found. - -Type: `*windows.Messages` - -Customise this for any language you choose to support. - -### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -Type: `uint16` - -### OnSuspend - -If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) - -Type: `func()` - -### OnResume - -If set, this function will be called when windows resumes from low power mode (suspend/hibernate) - -Type: `func()` - -## Mac Specific Options - -### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -Type: [`*mac.TitleBar`](#titlebar-struct) - - -### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -Type: [`AppearanceType`](#appearance-type) - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: `bool` - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: `bool` - -### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -Type: [`About`](#about-struct) - - -#### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance type - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| Value | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### About struct - -```go -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -
- -
- -
- -When clicked, that will open an about message box: - -
- -
- -
- -## Linux Specific Options - -### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -Type: `[]byte` - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx deleted file mode 100644 index 3dc1cf002..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. If this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. If this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx deleted file mode 100644 index 976ca1d80..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -These methods are related to the system browser. - -### BrowserOpenURL - -Opens the given URL in the system browser. - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` - diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx deleted file mode 100644 index ad65257ee..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Dialog - -This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. - -:::info Javascript -Dialog is currently unsupported in the JS runtime. -::: - -### OpenDirectoryDialog - -Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected directory (blank if the user cancelled) or an error - -### OpenFileDialog - -Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected file (blank if the user cancelled) or an error - -### OpenMultipleFilesDialog - -Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -Returns: Selected files (nil if the user cancelled) or an error - -### SaveFileDialog - -Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions). - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -Returns: The selected file (blank if the user cancelled) or an error - -### MessageDialog - -Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions). - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -Returns: The text of the selected button or an error - -## Options - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| ResolvesAliases | If true, returns the file not the alias | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------------------------------- | --- | --- | --- | -| Type | The type of message dialog, eg question, info... | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| Message | The message to show the user | ✅ | ✅ | ✅ | -| Buttons | A list of button titles | | ✅ | | -| DefaultButton | The button with this text should be treated as default. Bound to `return` | | ✅ | | -| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | ✅ | | - -#### Windows - -Windows has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue" - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -the first button is shown as default: - -
- -
- -
- -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -
- -
- -
- -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -
- -
- -
-
-
- -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx deleted file mode 100644 index 75e8b0a50..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Events - -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. - -### EventsOn - -This method sets up a listener for the given event name. When an event of type `eventName` is [emitted](#EventsEmit), the callback is triggered. Any additional data sent with the emitted event will be passed to the callback. - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### EventsOff - -This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`. - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -This method sets up a listener for the given event name, but will only trigger once. - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### EventsOnMultiple - -This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times. - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### EventsEmit - -This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` - diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx deleted file mode 100644 index 6c02c71cd..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. - -It has utility methods for: - -- [Window](window.mdx) -- [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) -- [Browser](browser.mdx) -- [Log](log.mdx) - -The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks. - -:::info Note - -Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). - -::: - -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. - -### Hide - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -Hides the application. - -:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: - -### Show - -Shows the application. - -:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### Quit - -Quits the application. - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### Environment - -Returns details of the current environment. - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` -JS: -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx deleted file mode 100644 index e5e6ea7ac..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Log - -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: - -- Trace -- Debug -- Info -- Warning -- Error -- Fatal - -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. - -### LogPrint - -Logs the given message as a raw message. - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -Logs the given message as a raw message. - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -Logs the given message at the `Trace` log level. - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -Logs the given message at the `Trace` log level. - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -Logs the given message at the `Debug` log level. - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -Logs the given message at the `Debug` log level. - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -Logs the given message at the `Info` log level. - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -Logs the given message at the `Info` log level. - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -Logs the given message at the `Warning` log level. - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -Logs the given message at the `Warning` log level. - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -Logs the given message at the `Error` log level. - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -Logs the given message at the `Error` log level. - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -Logs the given message at the `Fatal` log level. - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -Logs the given message at the `Fatal` log level. - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -Sets the log level. In Javascript, the number relates to the following log levels: - -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## Using a Custom Logger - -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx deleted file mode 100644 index 6a7e06cf9..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -These methods are related to the application menu. - -:::info Javascript -Menu is currently unsupported in the JS runtime. -::: - -### MenuSetApplicationMenu - -Sets the application menu to the given [menu](../menus.mdx). - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx deleted file mode 100644 index d03143161..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Window - -These methods give control of the application window. - -### WindowSetTitle - -Sets the text in the window title bar. - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -Makes the window full screen. - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -Restores the previous window dimensions and position prior to full screen. - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -Returns true if the window is full screen. - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### WindowCenter - -Centers the window on the monitor the window is currently on. - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowReload - -Performs a "reload" (Reloads current page). - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -Reloads the application frontend. - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windows only. - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -Sets window theme to system default (dark/light). - -### WindowSetLightTheme - -Windows only. - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -Sets window theme to light. - -### WindowSetDarkTheme - -Windows only. - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -Sets window theme to dark. - -### WindowShow - -Shows the window, if it is currently hidden. - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -Hides the window, if it is currently visible. - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -Returns true if the window not minimised, maximised or fullscreen. - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### WindowSetSize - -Sets the width and height of the window. - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -Gets the width and height of the window. - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### WindowSetMinSize - -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -Sets the window AlwaysOnTop or not on top. - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowSetPosition - -Sets the window position relative to the monitor the window is currently on. - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -Gets the window position relative to the monitor the window is currently on. - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### WindowMaximise - -Maximises the window to fill the screen. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -Restores the window to the dimensions and position prior to maximising. - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -Returns true if the window is maximised. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowToggleMaximise - -Toggles between Maximised and UnMaximised. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -Minimises the window. - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -Restores the window to the dimensions and position prior to minimising. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -Returns true if the window is minimised. - -Go: `WindowIsMinimised(ctx context.Context) bool` JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. - -Valid values for R, G, B and A are 0-255. - -Any value that is not 0 will be considered 255. :::info Windows -On Windows, only alpha values of 0 or 255 are supported. -::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript Object Definitions - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx deleted file mode 100644 index f4845fdbe..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -
- -
- -
- -:::note This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). ::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. - - - - - diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx deleted file mode 100644 index d1b8e9f98..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: - -- Create a new Wails application -- Build the application -- Run the application - -:::note -This tutorial uses Windows as the target platform. Output will vary slightly -depending on your operating system. -::: - -## Create a new Wails application - -To create a new Wails application using the default vanilla JS template, you need to run the following command: - -```bash -wails init -n helloworld -``` - -You should see something similar to the following: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## Build the application - -To build the application, change to the new `helloworld` project directory and run the following command: - -```bash -wails build -``` - -You should see something like the following: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -This has compiled the application and saved it in the `build/bin` directory. - -## Run the application - -If we view the `build/bin` directory in Windows Explorer, we should see our project binary: - -
- -
- -
- -We can run it by simply double-clicking the `helloworld.exe` file. - -On Mac, Wails generates a `helloworld.app` file which can be run by double-clicking it. - -On Linux, you can run the application using `./helloworld` from the `build/bin` directory. - -You should see the application working as expected: - -
- -
-
diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx deleted file mode 100644 index 3f9ebf2fc..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 - -## Other Tutorials and Articles -- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx deleted file mode 100644 index 9928b4785..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx deleted file mode 100644 index f74282283..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx +++ /dev/null @@ -1,127 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info Future Enhancement - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx deleted file mode 100644 index 8b25c1575..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,103 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember - -If you add support for a new package manager, don't forget to also update this page! - -::: diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/links.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/links.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/emailit.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/emailit.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/modalfilemanager.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/modalfilemanager.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/mollywallet.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/mollywallet.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/october.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/october.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/restic-browser.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/restic-browser.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/riftshare.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/riftshare.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/scriptbar.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/scriptbar.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/surge.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/surge.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wally.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wally.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/ytd.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/ytd.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/dynamic-assets.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/dynamic-assets.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/frameless.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/frameless.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/ides.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/ides.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux-distro-support.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux-distro-support.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/manual-builds.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/manual-builds.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/vscode.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/vscode.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx rename to website/i18n/ko/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx deleted file mode 100644 index 73173e15b..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,136 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - Handler: NewFileLoader(), - }, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -```mdx-code-block -

- -

-``` - -However, if we request `go.mod`, we will see the following output: - -```mdx-code-block -

- -

-``` - -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -```mdx-code-block -

- -

-``` - -:::warning - -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access to your filesystem. - -::: diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx deleted file mode 100644 index 4a3de2a61..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener("mousedown", handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx deleted file mode 100644 index 21f7875e3..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx +++ /dev/null @@ -1,40 +0,0 @@ -# Obfuscated Builds - -Wails includes support for obfuscating your application using [garble](https://github.com/burrowers/garble). - -To produce an obfuscated build, you can use the `-obfuscate` flag with the `wails build` command: - -```bash -wails build -obfuscated -``` - -To customise the obfuscation settings, you can use the `-garbleargs` flag: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -These settings may be persisted in your [project config](../reference/project-config). - -## How it works - -In a standard build, all bound methods are available in the frontend under the `window.go` variable. When these methods are called, the corresponding backend method is called using the fully qualified function name. When using an obfuscated build, methods are bound using an ID instead of a name. The bindings generated in the `wailsjs` directory use these IDs to call the backend functions. - -:::note - -To ensure that your application will work in obfuscated mode, you must use the generated bindings under the `wailsjs` directory in your application. - -::: - -## Example - -Importing the "Greet" method from the bindings like this: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -will ensure that the method will work correctly in obfuscated mode, as the bindings will be regenerated with IDs and the call mechanism updated. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx deleted file mode 100644 index 9d1d772d0..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx deleted file mode 100644 index 790e3107f..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# Templates - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -```mdx-code-block -
- -
-``` - -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx deleted file mode 100644 index 1af16f774..000000000 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -```mdx-code-block -
- -
-
-``` - -:::note - -This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). - -::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 84% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx index f3cbf4a91..d061c0ee0 100644 --- a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx +++ b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx @@ -12,8 +12,7 @@ A [lista definitiva](https://github.com/wailsapp/awesome-wails) dos links relaci ## Canais de Suporte -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) +- [Discord](https://discord.com/invite/JDdSxwjhGf) - [Github Issues](https://github.com/wailsapp/wails/issues) - [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/emailit.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/emailit.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/overscroll.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/overscroll.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/dogsapi.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/dogsapi.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/helloworld.mdx b/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/helloworld.mdx rename to website/i18n/pt/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx deleted file mode 100644 index 4a3a89e87..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Links - -This page serves as a list for community related links. Please submit a PR (click `Edit this page` at the bottom) to submit links. - -## Awesome Wails - -The [definitive list](https://github.com/wailsapp/awesome-wails) of links related to Wails. - -## Support Channels - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) - -## Social Media - -- [Twitter](https://twitter.com/wailsapp) -- [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx deleted file mode 100644 index 4a1ebe835..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# EmailIt - -

- -
-

- -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx deleted file mode 100644 index 13c2d8345..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EncryptEasy - -

- -
-

- -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx deleted file mode 100644 index 78cbfca86..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# FileHound Export Utility - -

- -
-

- -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 11247339d..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Minecraft Updater - -

- -
-

- -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx deleted file mode 100644 index a7ae8c492..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Modal File Manager - -

- -
-

- -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx deleted file mode 100644 index 534b097ca..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Molley Wallet - -

- -
-

- -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx deleted file mode 100644 index 889d2dd9e..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# October - -

- -
-

- -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx deleted file mode 100644 index c3eb79507..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Optimus - -

- -
-

- -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx deleted file mode 100644 index 4cc2c63c9..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Portfall - -

- -
-

- -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx deleted file mode 100644 index 1505ce07a..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Restic Browser - -

- -
-

- -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx deleted file mode 100644 index 5223e88cf..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# RiftShare - -

- -
-

- -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx deleted file mode 100644 index aaa556f92..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# ScriptBar - -

- -
-

- -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx deleted file mode 100644 index 2d895dc29..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Surge - -

- -
-

- -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx deleted file mode 100644 index 2a2498f40..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wally - -

- -
-

- -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx deleted file mode 100644 index 54cedacea..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wombat - -

- -
-

- -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx deleted file mode 100644 index 178ff0529..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Ytd - -

- -
-

- -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx deleted file mode 100644 index d9a29a6fa..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Templates - -This page serves as a list for community supported templates. Please submit a PR (click `Edit this page` at the bottom) to include your templates. To build your own template, please see the [Templates](../guides/templates.mdx) guide. - -To use these templates, run `wails init -n "Your Project Name" -t [the link below[@version]]` - -If there is no version suffix, the main branch code template is used by default. If there is a version suffix, the code template corresponding to the tag of this version is used. - -Example: `wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - A template using Vite,Vue and Vue-Router(Support both JavaScript and TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - Vue 3 TypeScript with Vite (and instructions to add features) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - Vue 3 TypeScript with Vite, Vuex, Vue Router, Sass, and ESLint + Prettier - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - Angular with TypeScript, Sass, Hot-Reload, Code-Splitting and i18n - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - A template using reactjs -- [wails-react-template](https://github.com/flin7/wails-react-template) - A minimal template for React that supports live development -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - A template using Svelte -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - A template using Svelte and Vite -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - A template using Svelte and Vite with TailwindCSS v3 -- [wails-sveltekit-template](https://github.com/h8gi/wails-sveltekit-template) - A template using SvelteKit - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS \ No newline at end of file diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx deleted file mode 100644 index 3e0df3b68..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Compiling your Project - -From the project directory, run `wails build`. This will compile your project and save the production-ready binary in the `build/bin` directory. - -If you run the binary, you should see the default application: - -
- -
- -
- -For more details on compilation options, please refer to the [CLI Reference](../reference/cli.mdx#build). diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx deleted file mode 100644 index 54dda5faa..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Developing your Application - -You can run your application in development mode by running `wails dev` from your project directory. This will do the following things: - -- Build your application and run it -- Bind your Go code to the frontend so it can be called from Javascript -- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console - -To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev). - -Coming soon: Tutorial diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx deleted file mode 100644 index 94e330c47..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Creating a Project - -## Project Generation - -Now that the CLI is installed, you can generate a new project by using the `wails init` command. - -Pick your favourite framework: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
- - - -
- -There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks. - -To see the other options available, you can run `wails init -help`. More details can be found in the [CLI Reference](../reference/cli.mdx#init). - -## Project Layout - -Wails projects have the following layout: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### Project structure rundown - -- `/main.go` - The main application -- `/frontend/` - Frontend project files -- `/build/` - Project build directory -- `/build/appicon.png` - The application icon -- `/build/darwin/` - Mac specific project files -- `/build/windows/` - Windows specific project files -- `/wails.json` - The project configuration -- `/go.mod` - Go module file -- `/go.sum` - Go module checksum file - -The `frontend` directory has nothing specific to Wails and can be any frontend project of your choosing. - -The `build` directory is used during the build process. These files may be updated to customise your builds. If files are removed from the build directory, default versions will be regenerated. - -The default module name in `go.mod` is "changeme". You should change this to something more appropriate. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx deleted file mode 100644 index 5c37d84ff..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Installation - -## Supported Platforms - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## Dependencies - -Wails has a number of common dependencies that are required before installation: - -- Go 1.17+ -- NPM (Node 15+) - -### Go - -Download Go from the [Go Downloads Page](https://go.dev/doc/install). - -Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks: - -- Check Go is installed correctly: `go version` -- Check "~/go/bin" is in your PATH variable: `echo $PATH | grep go/bin` - -### NPM - -Download NPM from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against. - -Run `npm --version` to verify. - -## Platform Specific Dependencies - -You will also need to install platform specific dependencies: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails requires that the xcode command line tools are installed. This can be done by running:
- xcode-select --install -
- - Wails requires that the WebView2{" "} - runtime is installed. Some Windows installations will already have this installed. You can check using - the{" "} - wails doctor command (see below). - - - Linux required the standard gcc build tools - plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine - what the installation commands are for your specific distribution. Run wails doctor after - installation - to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the {" "} - Add Linux Distro guide. - -
- - - -## Optional Dependencies - -- [UPX](https://upx.github.io/) for compressing your applications. - -## Installing Wails - -Run `go install github.com/wailsapp/wails/v2/cmd/wails@latest` to install the Wails CLI. - -## System Check - -Running `wails doctor` will check if you have the correct dependencies installed. If not, it will advise on what is missing and help on how to rectify any problems. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx deleted file mode 100644 index a618076f1..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# Application Development - -There are no hard and fast rules for developing applications with Wails, but there are some basic guidelines. - -## Application Setup - -The pattern used by the default templates are that `main.go` is used for configuring and running the application, whilst `app.go` is used for defining the application logic. - -The `app.go` file will define a struct that has 2 methods which act as hooks into the main application: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- The startup method is called as soon as Wails allocates the resources it needs and is a good place for creating resources, setting up event listeners and anything else the application needs at startup. It is given a `context.Context` which is usually saved in a struct field. This context is needed for calling the [runtime](../reference/runtime/intro.mdx). If this method returns an error, the application will terminate. In dev mode, the error will be output to the console. - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. - -The `main.go` file generally consists of a single call to `wails.Run()`, which accepts the application configuration. The pattern used by the templates is that before the call to `wails.Run()`, an instance of the struct we defined in `app.go` is created and saved in a variable called `app`. This configuration is where we add our callbacks: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -More information on application lifecycle hooks can be found [here](../howdoesitwork.mdx#application-lifecycle-callbacks). - -## Binding Methods - -It is likely that you will want to call Go methods from the frontend. This is normally done by adding public methods to the already defined struct in `app.go`: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -In the main application configuration, the `Bind` key is where we can tell Wails what we want to bind: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -This will bind all public methods in our `App` struct (it will never bind the startup and shutdown methods). - -### Dealing with context when binding multiple structs - -If you want to bind methods for multiple structs but want each struct to keep a reference to the context so that you can use the runtime functions, a good pattern is to pass the context from the `OnStartup` method to your struct instances : - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## Application Menu - -Wails supports adding a menu to your application. This is done by passing a [Menu](../reference/menus.mdx#menu) struct to application config. It's common to use a method that returns a Menu, and even more common for that to be a method on the `App` struct used for the lifecycle hooks. - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## Assets - -The great thing about the way Wails v2 handles assets is that it doesn't! The only thing you need to give Wails is an `embed.FS`. How you get to that is entirely up to you. You can use vanilla html/css/js files like the vanilla template. You could have some complicated build system, it doesn't matter. - -When `wails build` is run, it will check the `wails.json` project file at the project root. There are 2 keys in the project file that are read: - -- "frontend:install" -- "frontend:build" - -The first, if given, will be executed in the `frontend` directory to install the node modules. The second, if given, will be executed in the `frontend` directory to build the frontend project. - -If these 2 keys aren't given, then Wails does absolutely nothing with the frontend. It is only expecting that `embed.FS`. - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## Built in Dev Server - -Running `wails dev` will start the built in dev server which will start a file watcher in your project directory. By default, if any file changes, wails checks if it was an application file (default: `.go`, configurable with `-e` flag). If it was, then it will rebuild your application and relaunch it. If the changed file was in the assets, it will issue a reload after a short amount of time. - -The dev server uses a technique called "debouncing" which means it doesn't reload straight away, as there may be multiple files changed in a short amount of time. When a trigger occurs, it waits for a set amount of time before issuing a reload. If another trigger happens, it resets to the wait time again. By default this value is `100ms`. If this value doesn't work for your project, it can be configured using the `-debounce` flag. If used, this value will be saved to your project config and become the default. - -## External Dev Server - -Some frameworks come with their own live-reloading server, however they will not be able to take advantage of the Wails Go bindings. In this scenario, it is best to run a watcher script that rebuilds the project into the build directory, which Wails will be watching. For an example, see the default svelte template that uses [rollup](https://rollupjs.org/guide/en/). For [create-react-app](https://create-react-app.dev/), it's possible to use [this script](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) to achieve a similar result. - -## Go Module - -The default Wails templates generate a `go.mod` file that contains the module name "changeme". You should change this to something more appropriate after project generation. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx deleted file mode 100644 index b81cc79dc..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# Bleeding Edge - -## Overview - -Wails is in constant development and new releases are regularly "tagged". This usually happens when all the newer code on `master` has been tested and confirmed working. If you need a bugfix or feature that has not yet made it to a release, it's possible to use the latest "bleeding edge" version using the following steps: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## Testing a Branch - -If you want to test a branch, follow the instructions above, but ensure you switch the branch you want to test before installing: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx deleted file mode 100644 index 77ad6d09e..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx +++ /dev/null @@ -1,126 +0,0 @@ -# Dynamic Assets - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -

- -

- -However, if we request `go.mod`, we will see the following output: - -

- -

- -This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -

- -

- -:::warning -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access -to your filesystem. -::: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx deleted file mode 100644 index c7ca5f6c3..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx +++ /dev/null @@ -1,84 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - - -``` - -:::info Fullscreen - If you allow your application to go fullscreen, this drag functionality will be disabled. -::: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx deleted file mode 100644 index 4b192c557..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx +++ /dev/null @@ -1,75 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| Value | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - - -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx deleted file mode 100644 index a20ae4131..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx +++ /dev/null @@ -1,113 +0,0 @@ -# IDEs - -Wails aims to provide a great development experience. To that aim, we now support generating IDE specific configuration to provide smoother project setup. - -Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but aim to support other IDEs such as Goland. - -## Visual Studio Code - -

- -

- -When generating a project using the `-ide vscode` flags, IDE files will be created alongside the other project files. These files are placed into the `.vscode` directory and provide the correct configuration for debugging your application. - -The 2 files generated are `tasks.json` and `launch.json`. Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] - }, - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - }, - ] -} -``` - -### Configuring the install and build steps - -The `tasks.json` file is simple for the default project as there is no `npm install` or `npm run build` step needed. For projects that have a frontend build step, such as the svelte template, we would need to edit `tasks.json` to add the install and build steps: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], - "dependsOn":[ - "npm install", - "npm run build" - ] - - }, - ] -} -``` - -:::info Future Enhancement - -In the future, we hope to generate a `tasks.json` that includes the install and build steps automatically. - -::: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx deleted file mode 100644 index 28a224a26..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx +++ /dev/null @@ -1,101 +0,0 @@ -# Linux Distro Support - -## Overview - -Wails offers Linux support but providing installation instructions for all available distributions is an impossible task. Instead, Wails tries to determine if the packages you need to develop applications are available via your system's package manager. Currently, we support the following package managers: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## Adding package names - -There may be circumstances where your distro uses one of the supported package managers but the package name is different. For example, you may use an Ubuntu derivative, but the package name for gtk may be different. Wails attempts to find the correct package by iterating through a list of package names. The list of packages are stored in the packagemanager specific file in the `v2/internal/system/packagemanager` directory. In our example, this would be `v2/internal/system/packagemanager/apt.go`. - -In this file, the list of packages are defined by the `Packages()` method: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -Let's assume that in our linux distro, `libgtk-3` is packaged under the name `lib-gtk3-dev`. We could add support for this by adding the following line: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## Adding new package managers - -To add a new package manager, perform the following steps: - -- Create a new file in `v2/internal/system/packagemanager` called `.go`, where `` is the name of the package manager. -- Define a struct that conforms to the package manager interface defined in `pm.go`: - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` should return the name of the package manager -- `Packages()` should return a `packagemap`, that provides candidate filenames for dependencies -- `PackageInstalled()` should return `true` if the given package is installed -- `PackageAvailable()` should return `true` if the given package is not installed but available for installation -- `InstallCommand()` should return the exact command to install the given package name - -Take a look at the other package managers code to get an idea how this works. - -:::info Remember -If you add support for a new package manager, don't forget to also update this page! -::: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx deleted file mode 100644 index 2dff1a91b..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx +++ /dev/null @@ -1,189 +0,0 @@ -# Migrating from v1 - -## Overview - -Wails v2 is a significant change from v1. This document aims to highlight the changes and the steps in migrating an existing project. - -### Creating the Application - -In v1, the main application is created using `wails.CreateApp`, bindings are added with `app.Bind`, then the application is run using `app.Run()`. - -Example: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -In v2, there is just a single method, `wails.Run()`, that accepts [application options](../reference/options.mdx#application-options). - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### Binding - -In v1, it was possible to bind both arbitrary functions and structs. In v2, this has been simplified to only binding structs. The struct instances that were previously passed to the `Bind()` method in v1, are now specified in the `Bind` field of the [application options](../reference/options.mdx#application-options): - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -In v1, bound methods were available to the frontend at `window.backend`. This has changed to `window.go`.`` - -### Application Lifecycle - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [OnStartup](../reference/options.mdx#onstartup) -- [OnShutdown](../reference/options.mdx#onshutdown) -- [OnDomReady](../reference/options.mdx#ondomready) - -Note: [OnDomReady](../reference/options.mdx#ondomready) replaces the `wails:ready` system event in v1. - -These methods can be standard functions, but a common practice is to have them part of a struct: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### Runtime - -The runtime in v2 is much richer than v1 with support for menus, window manipulation and better dialogs. The signature of the methods has changed slightly - please refer the the [Runtime Reference](../reference/runtime/intro.mdx). - -In v1, the [runtime](../reference/runtime/intro.mdx) was available via a struct passed to `WailsInit()`. In v2, the runtime has been moved out to its own package. Each method in the runtime takes the `context.Context` that is passed to the [OnStartup](../reference/options.mdx#onstartup) method. - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} -} -} - -``` - -### Assets - -The _biggest_ change in v2 is how assets are handled. - -In v1, assets were passed via 2 application options: - -- `JS` - The application's Javascript -- `CSS` - The application's CSS - -This meant that the responsibility of generating a single JS and CSS file was on the developer. This essentially required the use of complicated packers such as webpack. - -In v2, Wails makes no assumptions about your frontend assets, just like a webserver. All of your application assets are passed to the application options as an `embed.FS`. - -**This means there is no requirement to bundle your assets, encode images as Base64 or attempt the dark art of bundler configuration to use custom fonts**. - -At startup, Wails will scan the given `embed.FS` for `index.html` and use its location as the root path for all the other application assets - just like a webserver would. - -Example: An application has the following project layout. All final assets are placed in the `frontend/dist` directory: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -Those assets may be used by the application by simply creating an `embed.FS`: - -```go title="Assets Example" -//go:embed frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -Of course, bundlers can be used if you wish to. The only requirement is to pass the final application assets directory to Wails using an `embed.FS` in the `Assets` key of the [application options](../reference/options.mdx#application-options). - -### Project Configuration - -In v1, the project configuration was stored in the `project.json` file in the project root. In v2, the project configuration is stored in the `wails.json` file in the project root. - -The format of the file is slightly different. Here is a comparison: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | --------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. This is only needed for some more advanced asset configurations. | - -

diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx deleted file mode 100644 index 49e9cd69c..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# Mouse Buttons - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx deleted file mode 100644 index dca7e83a3..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Overscroll - -[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx deleted file mode 100644 index 5a47814cc..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from 'vue-router' - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}) -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, {useHash: true}) -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx deleted file mode 100644 index 5d8f9a35e..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx +++ /dev/null @@ -1,377 +0,0 @@ -# Code Signing - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -- name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* - jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. Now you need to make two action secrets on GitHub. It should start with *-----BEGIN CERTIFICATE-----* and end with *-----END CERTIFICATE-----*. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx deleted file mode 100644 index df75cbbc7..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Templates - -Wails generates projects from pre-created templates. In v1, this was a difficult to maintain set of projects that were subject to going out of date. In v2, to empower the community, a couple of new features have been added for templates: - -- Ability to generate projects from [Remote Templates](../reference/cli.mdx#remote-templates) -- Tooling to help create your own templates - -## Creating Templates - -To create a template, you can use the `wails generate template` command. To generate a default template, run: - -`wails generate template -name mytemplate` - -This creates the directory "mytemplate" with default files: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### Template Overview - -The default template consists of the following files and directories: - -| Filename / Dir | Description | -| --------------- | -------------------------------------------- | -| NEXTSTEPS.md | Instructions on how to complete the template | -| README.md | The README published with the template | -| app.tmpl.go | `app.go` template file | -| frontend/ | The directory containing frontend assets | -| go.mod.tmpl | `go.mod` template file | -| main.tmpl.go | `main.go` template file | -| template.json | The template metadata | -| wails.tmpl.json | `wails.json` template file | - -At this point it is advisable to follow the steps in `NEXTSTEPS.md`. - -## Creating a Template from an Existing Project - -It's possible to create a template from an existing frontend project by passing the path to the project when generating the template. We will now walk through how to create a Vue 3 template: - -- Install the vue cli: `npm install -g @vue/cli` -- Create the default project: `vue create vue3-base` - - Select `Default (Vue 3) ([Vue 3] babel, eslint)` -- After the project has been generated, run: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- The template may now be customised as specified in the `NEXTSTEPS.md` file -- Once the files are ready, it can be tested by running: `wails init -n my-vue3-project -t .\wails-vue3-template\` -- To test the new project, run: `cd my-vue3-project` then `wails build` -- Once the project has compiled, run it: `.\build\bin\my-vue3-project.exe` -- You should have a fully functioning Vue3 application: - -
- -
- -## Publishing Templates - -Publishing a template is simply pushing the files to GitHub. The following best practice is encouraged: - -- Remove any unwanted files and directories (such as `.git`) from your frontend directory -- Ensure that `template.json` is complete, especially `helpurl` -- Push the files to GitHub -- Create a PR on the [Community Templates](../community/templates.mdx) page -- Announce the template on the [Template Announcement](https://github.com/wailsapp/wails/discussions/825) discussion board diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx deleted file mode 100644 index b6a73efa5..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx +++ /dev/null @@ -1,137 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. - -## My application is displaying a white/blank screen - -Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -

- -

- -it's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, ...args).then((result) => { - //do things here -}).catch((error) => { - //handle error -}); -``` - -Workaround: - -```js -var msg = "Hello " -var args = ["Go", "JS"] -window.go.main.App.TestFunc(msg, args).then((result) => { //without the 3 dots - //do things here -}).catch((error) => { - //handle error -}); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is *normally* due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 \ No newline at end of file diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx deleted file mode 100644 index ed258656d..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx deleted file mode 100644 index 249ec5527..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx +++ /dev/null @@ -1,56 +0,0 @@ -# NSIS installer - -

- -
-

- -Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). - -## Installing NSIS - -### Windows - -The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page. - -If you use the chocolatey package manager, run the following script: - -``` -choco install nsis -``` - -If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. [Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. - -### Linux - -The `nsis` package should be available through your distribution's package manager. - -### MacOS - -NSIS is available to install through homebrew: `brew install nsis`. - -## Generating the installer - -When a new project is created, Wails generates the NSIS configuration files in `build/windows/installer`. The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -To generate an installer for your application, use the `-nsis` flag with `wails build`: - -``` -wails build -nsis -``` - -The installer will now be available in the `build/bin` directory. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx deleted file mode 100644 index 0063b47a6..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx +++ /dev/null @@ -1,356 +0,0 @@ ---- -sidebar_position: 20 ---- - -# How does it work? - -A Wails application is a standard Go application, with a webkit frontend. The Go part of the application consists of the application code and a runtime library that provides a number of useful operations, like controlling the application window. The frontend is a webkit window that will display the frontend assets. Also available to the frontend is a Javascript version of the runtime library. Finally, it is possible to bind Go methods to the frontend, and these will appear as Javascript methods that can be called, just as if they were local Javascript methods. - -
- -
- -## The Main Application - -### Overview - -The main application consists of a single call to `wails.Run()`. It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. A basic application might look like this: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### Options rundown - -This example has the following options set: - -- `Title` - The text that should appear in the window's title bar -- `Width` & `Height` - The dimensions of the window -- `Assets` - The application's frontend assets -- `OnStartup` - A callback for when the window is created and is about to start loading the frontend assets -- `OnShutdown` - A callback for when the application is about to quit -- `Bind` - A slice of struct instances that we wish to expose to the frontend - -A full list of application options can be found in the [Options Reference](reference/options). - -#### Assets - -The `Assets` option is mandatory as you can't have a Wails application without frontend assets. Those assets can be any files you would expect to find in a web application - html, js, css, svg, png, etc. **There is no requirement to generate asset bundles** - plain files will do. When the application starts, it will attempt to load `index.html` from your assets and the frontend will essentially work as a browser from that point on. It is worth noting that there is no requirement on where in the `embed.FS` the files live. It is likely that the embed path uses a nested directory relative to your main application code, such as `frontend/dist`: - -```go title="main.go" -//go:embed frontend/dist -var assets embed.FS -``` - -At startup, Wails will iterate the embedded files looking for the directory containing `index.html`. All other assets will be loaded relative to this directory. - -As production binaries use the files contained in `embed.FS`, there are no external files required to be shipped with the application. - -When running in development mode using the `wails dev` command, the assets are loaded off disk, and any changes result in a "live reload". The location of the assets will be inferred from the `embed.FS`. - -More details can be found in the [Application Development Guide](guides/application-development.mdx). - -#### Application Lifecycle Callbacks - -Just before the frontend is about to load `index.html`, a callback is made to the function provided in [OnStartup](reference/options.mdx#onstartup). A standard Go context is passed to this method. This context is required when calling the runtime so a standard pattern is to save a reference to in this method. Just before the application shuts down, the [OnShutdown](reference/options.mdx#onshutdown) callback is called in the same way, again with the context. There is also an [OnDomReady](reference/options.mdx#ondomready) callback for when the frontend has completed loading all assets in `index.html` and is equivalent of the [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) event in Javascript. It is also possible to hook into the window close (or application quit) event by setting the option [OnBeforeClose](reference/options.mdx#onbeforeclose). - -#### Method Binding - -The `Bind` option is one of the most important options in a Wails application. It specifies which struct methods to expose to the frontend. Think of structs like "controllers" in a traditional web application. When the application starts, it examines the struct instances listed in the `Bind` field in the options, determines which methods are public (starts with an uppercase letter) and will generate Javascript versions of those methods that can be called by the frontend code. - -:::info Note - -Wails requires that you pass in an *instance* of the struct for it to bind it correctly - -::: - -In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - -- Javascript bindings for all bound methods -- Typescript declarations for all bound methods -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods - -This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. - -## The Frontend - -### Overview - -The frontend is a collection of files rendered by webkit. It's like a browser and webserver in one. There is virtually[^1] no limit to which frameworks or libraries you can use. The main points of interaction between the frontend and your Go code are: - -- Calling bound Go methods -- Calling runtime methods - -### Calling bound Go methods - -When you run your application with `wails dev`, it will automatically generate Javascript bindings for your structs in a directory called `wailsjs/go` (You can also do this by running `wails generate module`). The generated files mirror the package names in your application. In the example above, we bind `app`, which has one public method `Greet`. This will lead to the generation of the following files: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: - -```javascript -// ... -import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }) - } -``` - -The Typescript declaration file gives you the correct types for the bound methods: - -```ts -export function Greet(arg1:string):Promise; -``` - -The generated methods return a Promise. A successful call will result in the first return value from the Go call to be passed to the `resolve` handler. An unsuccessful call is when a Go method that has an error type as it's second return value, passes an error instance back to the caller. This is passed back via the `reject` handler. In the example above, `Greet` only returns a `string` so the Javascript call will never reject - unless invalid data is passed to it. - -All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call, it will be returned to your frontend as a Javascript class. Note: If you wish to use structs, you **must** define `json` struct tags for your fields! - -:::info Note -Anonymous nested structs are not supported at this time. -::: - -It is possible to send structs back to Go. Any Javascript map/class passed as an argument that is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode, a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible to construct and send native Javascript objects to the Go code. - -There is also support for Go methods that use structs in their signature. All Go structs specified by a bound method (either as parameters or return types) will have Typescript versions auto generated as part of the Go code wrapper module. Using these, it's possible to share the same data model between Go and Javascript. - -Example: We update our `Greet` method to accept a `Person` instead of a string: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -The `wailsjs/go/main/App.js` file will still have the following code: - -```js title="App.js" -export function Greet(arg1) { - return window['go']['main']['App']['Greet'](arg1); -} -``` - -But the `wailsjs/go/main/App.d.ts` file will be updated with the following code: - -```ts title="App.d.ts" -import {main} from '../models'; - -export function Greet(arg1:main.Person):Promise; -``` - -As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: - -```ts title="models.ts" -export namespace main { - - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map(elem => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -So long as you have TypeScript as part of your frontend build configuration, you can use these models in the following way: - -```js title="mycode.js" -import {Greet} from '../wailsjs/go/main/App' - import {main} from '../wailsjs/go/models' - - function generate() { - let person = new main.Person() - person.name = "Peter" - person.age = 27 - Greet(person).then((result) => { - console.log(result) - }) - } -``` - -The combination of generated bindings and TypeScript models makes for a powerful development environment. - -More information on Binding can be found in the [Binding Methods](guides/application-development.mdx#binding-methods) section of the [Application Development Guide](guides/application-development.mdx). - -### Calling runtime methods - -The Javascript runtime is located at `window.runtime` and contains many methods to do various tasks such as emit an event or perform logging operations: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro). - -[^1]: There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and workarounds for such cases. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx deleted file mode 100644 index 5a832a69e..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Введение - -Wails - это проект, позволяющий писать настольные приложения с использованием Go и web технологий. - -Считайте, что это легкая и быстрая альтернатива Electron для Go. Вы можете легко создавать приложения с гибкостью и мощностью Go, в сочетании с богатым современным фронтендом. - -### Features - -- Native Menus, Dialogs, Theming and Translucency -- Windows, macOS and linux support -- Built in templates for Svelte, React, Preact, Vue, Lit and Vanilla JS -- Easily call Go methods from Javascript -- Automatic Go struct to Typescript model generation -- No CGO or external DLLs required on Windows -- Live development mode using the power of [Vite](https://vite.net/) -- Powerful CLI to easily Create, Build and Package applications -- A rich [runtime library](/docs/next/reference/runtime) -- Applications built with Wails are Apple & Microsoft Store compliant - - -Например, [varly](https://varly.app) - настольное приложение для MacOS & Windows, написанное с помощью Wails. Оно не только великолепно выглядит, но и использует системные меню и полупрозрачность - все, что можно ожидать от современного нативного приложения. - -

- - - -

- -### Шаблоны для быстрого начала - -Wails поставляется с рядом предварительно настроенных шаблонов, которые позволяют вам быстро создать и запустить ваше приложение. Есть шаблоны для следующих фреймворков: Svelte, React, Vue, Preact, Lit и Vanilla. Для каждого шаблона есть и Javascript и Typescript версия. - -### Системные элементы - -Wails использует специально созданную библиотеку для обработки системных элементов, таких как окна, меню, диалоги и так далее, чтобы вы могли создавать хорошо выглядящие, богатые функционалом приложения. - -**It does not embed a browser**, so it is resource efficient. Вместо этого он использует нативный движок отрисовки для необходимой платформы. На Windows это новая библиотека Microsoft Webview2, основанная на Chromium. - -### Взаимодействие Go & Javascript - -Wails автоматически делает ваши методы на Go доступными в Javascript, чтобы вы могли вызывать их по имени! It even generates Typescript models for the structs used by your Go methods, so you can pass the same data structures between Go and Javascript. - -### Библиотека среды выполнения - -Wails предоставляет библиотеку среды выполнения для Go и Javascript, которая справляется со многими вещями, нужными для современный приложений, например, работа с событими, логирование, диалоги и так далее. - -### Опыт разработки в реальном времени - -#### Автоматическая пересборка - -Когда вы запускаете ваше приложение в режиме разработки, Wails будет собирать его, но читать ресурсы с диска. Он будет отслеживать любые изменения в вашем коде на Go и автоматически пересобирать и перезапускать приложение. - -#### Автоматическая перезагрузка - -When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately. - -#### Разрабатывайте приложение в браузере - -Если вы предпочитаете отладку и разработку в браузере, то Wails это умеет. Запущенное приложение также имеет веб-сервер который будет запускать ваше приложение в любом браузере который к нему прилоединится. Он будет перезапускаться когда ресурсы на вашем диске изменятся. - -### Бинарные файлы, готовые к выпуску - -Когда вы готовы сделать финальную сборку вашего приложения, CLI соберет всё в один исполняемый файл со всеми ресурсами внутри. На Windows и MacOS есть возможность создать нативный установочный пакет для распространения. The assets used in packaging (icon, info.plist, manifest file, etc) are part of your project and may be customised, giving you total control over how your applications are built. - -### Инструментарий - -Wails CLI предоставляет легкий способ генерировать, собирать и упаковывать ваши приложения. Оно создаст иконки, соберет ваше приложение с оптимальными параметрами и создаст готовый для распространения исполняемый файл. Выберите из нескольких стартовых шаблонов для быстрого старта! diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx deleted file mode 100644 index 5a00db158..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -sidebar_position: 2 ---- - -# CLI - -The Wails CLI has a number of commands that are used for managing your projects. All commands are run in the following way: - -`wails ` - -## init - -`wails init` is used for generating projects. - -| Flag | Description | Default | -|:------------------ |:----------------------------------------------------------------------------------------------------------------------- |:-------------------:| -| -n "project name" | Name of the project. **Mandatory**. | | -| -d "project dir" | Project directory to create | Name of the project | -| -g | Initialise git repository | | -| -l | List available project templates | | -| -q | Suppress output to console | | -| -t "template name" | The project template to use. This can be the name of a default template or a URL to a remote template hosted on github. | vanilla | -| -ide | Generate IDE project files | | -| -f | Force build application | false | - -Example: `wails init -n test -d mytestproject -g -ide vscode -q` - -This will generate a a project called "test" in the "mytestproject" directory, initialise git, generate vscode project files and do so silently. - -More information on using IDEs with Wails can be found [here](../guides/ides.mdx). - -### Remote Templates - -Remote templates (hosted on GitHub) are supported and can be installed by using the template's project URL. - -Example: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -A list of community maintained templates can be found [here](../community/templates.mdx) - -:::warning Attention - -**The Wails project does not maintain, is not responsible nor liable for 3rd party templates!** - -If you are unsure about a template, inspect `package.json` and `wails.json` for what scripts are run and what packages are installed. - -::: - -## build - -`wails build` is used for compiling your project to a production-ready binary. - -| Flag | Description | Default | -|:-------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------- | -| -platform | Build for the given (comma delimited) [platforms](../reference/cli.mdx#platforms) eg. `windows/arm64`. Note, if you do not give the architecture, `runtime.GOARCH` is used. | platform = `GOOS` environment variable if given else `runtime.GOOS`.
arch = `GOARCH` envrionment variable if given else `runtime.GOARCH`. | -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -nopackage | Do not package application | | -| -o filename | Output filename | | -| -s | Skip building the frontend | false | -| -f | Force build application | false | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -upx | Compress final binary using "upx" | | -| -upxflags | Flags to pass to upx | | -| -v int | Verbosity level (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 installer strategy: download,embed,browser,error | download | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -debug | Retains debug information in the application. Allows the use of the devtools in the application window | false | -| -trimpath | Remove all file system paths from the resulting executable. | false | -| -race | Build with Go's race detector | false | -| -windowsconsole | Keep the console window for Windows builds | false | - -For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide. - -If you prefer to build using standard Go tooling, please consult the [Manual Builds](../guides/manual-builds.mdx) guide. - -Example: - -`wails build -clean -o myproject.exe` - -:::info UPX on Apple Silicon - -There are [issues](https://github.com/upx/upx/issues/446) with using UPX with Apple Silicon. - -::: - -:::info UPX on Windows - -Some Antivirus vendors false positively mark `upx` compressed binaries as virus, see [issue](https://github.com/upx/upx/issues/437). - -::: - -### Platforms - -Supported platforms are: - -| Platform | Description | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## doctor - -`wails doctor` will run diagnostics to ensure that your system is ready for development. - -Example: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.17 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## dev - -`wails dev` is used to run your application in a "live development" mode. This means: - -- The application's `go.mod` will be updated to use the same version of Wails as the CLI -- The application is compiled and run automatically -- A watcher is started and will trigger a rebuild of your dev app if it detects changes to your go files -- A webserver is started on `http://localhost:34115` which serves your application (not just frontend) over http. This allows you to use your favourite browser development extensions -- All application assets are loaded from disk. If they are changed, the application will automatically reload (not rebuild). All connected browsers will also reload -- A JS module is generated that provides the following: - - Javascript wrappers of your Go methods with autogenerated JSDoc, providing code hinting - - TypeScript versions of your Go structs, that can be constructed and passed to your go methods -- A second JS module is generated that provides a wrapper + TS declaration for the runtime - -| Flag | Description | Default | -|:---------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--------------------- | -| -assetdir "./path/to/assets" | Serve assets from the given directory instead of using the provided asset FS | Value in `wails.json` | -| -browser | Opens a browser to `http://localhost:34115` on startup | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -e | Extensions to trigger rebuilds (comma separated) | go | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | Disable automatic reload when assets change | | -| -nogen | Disable generate module | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | -| -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | -| -devserver "host:port" | The address to bind the wails dev server to | "localhost:34115" | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -appargs "args" | Arguments passed to the application in shell style | | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -race | Build with Go's race detector | false | -| -s | Skip building the frontend | false | - -Example: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -This command will do the following: - -- Build the application and run it (more details [here](../guides/manual-builds.mdx) -- Generate the Wails JS modules in `./frontend/src` -- Watch for updates to files in `./frontend/dist` and reload on any change -- Open a browser and connect to the application - -There is more information on using this feature with existing framework scripts [here](../guides/application-development.mdx#live-reloading). - -## generate - -### template - -Wails uses templates for project generation. The `wails generate template` command helps scaffold a template so that it may be used for generating projects. - -| Flag | Description | -|:---------------- |:------------------------------------------- | -| -name | The template name (Mandatory) | -| -frontend "path" | Path to frontend project to use in template | - -For more details on creating templates, consult the [Templates guide](../guides/templates.mdx). - -### module - -The `wails generate module` command allows you to manually generate the `wailsjs` directory for your application. - -## update - -`wails update` will update the version of the Wails CLI. - -| Flag | Description | -|:------------------ |:------------------------------------- | -| -pre | Update to latest pre-release version | -| -version "version" | Install a specific version of the CLI | - -## version - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx deleted file mode 100644 index 565c8cb48..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx +++ /dev/null @@ -1,266 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Menus - -It is possible to add an application menu to Wails projects. This is achieved by defining a [Menu](#menu) struct and setting it in the [`Menu`](../reference/options.mdx#menu) application config, or by calling the runtime method [MenuSetApplicationMenu](../reference/runtime/menu.mdx#menusetapplicationmenu). - -An example of how to create a menu: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -```` It is also possible to dynamically update the menu, by updating the menu struct and calling \[MenuUpdateApplicationMenu\](../reference/runtime/menu.mdx#menuupdateapplicationmenu). - -The example above uses helper methods, however it's possible to build the menu structs manually. - -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -For the Application menu, each MenuItem represents a single menu such as "Edit". - -A simple helper method is provided for building menus: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -This makes the layout of the code more like that of a menu without the need to add the menu items manually after creating them. Alternatively, you can just create the menu items and add them to the menu manually. - -## MenuItem - -A MenuItem represents an item within a Menu. - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| Field | Type | Notes | -| ----------- | ------------------------------------ | ------------------------------------------------------------- | -| Label | string | The menu text | -| Accelerator | [\*keys.Accelerator](#accelerator) | Key binding for this menu item | -| Type | [Type](#type) | Type of MenuItem | -| Disabled | bool | Disables the menu item | -| Hidden | bool | Hides this menu item | -| Checked | bool | Adds check to item (Checkbox & Radio types) | -| SubMenu | [\*Menu](#menu) | Sets the submenu | -| Click | [Callback](#callback) | Callback function when menu clicked | -| Role | string | Defines a [role](#role) for this menu item. Mac only for now. | - -### Accelerator - -Accelerators (sometimes called keyboard shortcuts) define a binding between a keystroke and a menu item. Wails defines an Accelerator as a combination or key + [Modifier](#modifier). They are available in the `"github.com/wailsapp/wails/v2/pkg/menu/keys"` package. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -Keys are any single character on a keyboard with the exception of `+`, which is defined as `plus`. Some keys cannot be represented as characters so there are a set of named characters that may be used: - -- `backspace` -- `tab` -- `return` -- `enter` -- `escape` -- `left` -- `right` -- `up` -- `down` -- `space` -- `delete` -- `home` -- `end` -- `page up` -- `page down` -- `f1` -- `f2` -- `f3` -- `f4` -- `f5` -- `f6` -- `f7` -- `f8` -- `f9` -- `f10` -- `f11` -- `f12` -- `f13` -- `f14` -- `f15` -- `f16` -- `f17` -- `f18` -- `f19` -- `f20` -- `f21` -- `f22` -- `f23` -- `f24` -- `f25` -- `f26` -- `f27` -- `f28` -- `f29` -- `f30` -- `f31` -- `f32` -- `f33` -- `f34` -- `f35` -- `numlock` - -Wails also supports parsing accelerators using the same syntax as Electron. This is useful for storing accelerators in config files. - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### Modifier - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -Modifiers can be combined using `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -Each menu item must have a type and there are 5 types available: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -For convenience, helper methods are provided to quickly create a menu item: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -You can also create menu items directly on a menu by using the "Add" helpers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -A note on radio groups: A radio group is defined as a number of radio menu items that are next to each other in the menu. This means that you do not need to group items together as it is automatic. However, that also means you cannot have 2 radio groups next to each other - there must be a non-radio item between them. - -### Callback - -Each menu item may have a callback that is executed when the item is clicked: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -The function is given a `CallbackData` struct which indicates which menu item triggered the callback. This is useful when using radio groups that may share a callback. - -### Role - -:::info Roles - -Roles are currently supported on Mac only. - -::: - -A menu item may have a role, which is essentially a pre-defined menu item. We currently support the following roles: - -| Role | Description | -| ------------ | ------------------------------------------------------------------------ | -| AppMenuRole | The standard Mac application menu. Can be created using `menu.AppMenu()` | -| EditMenuRole | The standard Mac edit menu. Can be created using `menu.EditMenu()` | diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx deleted file mode 100644 index 90620aa77..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx +++ /dev/null @@ -1,627 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Options - -## Application Options - -The `Options.App` struct contains the application configuration. It is passed to the `wails.Run()` method: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### Title - -The text shown in the window's title bar. - -Type: string - -### Width - -The initial width of the window. - -Name: Width - -### Height - -Type: int - -Type: [AppearanceType](#appearance-type) - -### DisableResize - -By default, the main window is resizable. Setting this to `true` will keep it a fixed size. - -Type: int - -### Fullscreen - -Setting this to `true` will make the window fullscreen at startup. - -Type: int - -### Frameless - -When set to `true`, the window will have no borders or title bar. Also see [Frameless Windows](../guides/frameless.mdx). - -Type: int - -### MinWidth - -This sets the minimum width for the window. If the value given in `Width` is less than this value, the window will be set to `MinWidth` by default. - -Type: bool - -### MinHeight - -This sets the minimum height for the window. If the value given in `Height` is less than this value, the window will be set to `MinHeight` by default. - -Type: bool - -### MaxWidth - -This sets the maximum width for the window. If the value given in `Width` is more than this value, the window will be set to `MaxWidth` by default. - -Type: bool - -### MaxHeight - -This sets the maximum height for the window. If the value given in `Height` is more than this value, the window will be set to `MaxHeight` by default. - -Type: bool - -### StartHidden - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -Type: int -### HideWindowOnClose - -By default, closing the window will close the application. Setting this to `true` means closing the window will hide the window instead. - -hide the window instead. - -Type: int - -### BackgroundColour - -This value is the default background colour of the window. Default: white - -Type: *options.RGBA Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency - -### AlwaysOnTop - -Indicates that the window should stay above other windows when losing focus. - -Type: int - -### Assets - -The frontend assets to be used by the application. Requires an `index.html` file. - -Name: StartHidden - -### AssetsHandler - - - -When set to `true`, the application will be hidden until [WindowShow](../reference/runtime/window.mdx#windowshow) is called. - -| Value | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. - -Type: http.Handler - -### Menu - -The menu to be used by the application. More details about Menus in the [Menu Reference](../reference/runtime/menu.mdx). - -NOTE: On Mac, if no menu is specified, a default menu will be created. ::: - -Type: \*menu.Menu - -### Logger - -The logger to be used by the application. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: bool - -### LogLevel - -The default log level. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Name: Assets - -### LogLevelProduction - -The default log level for production builds. More details about logging in the [Log Reference](../reference/runtime/log.mdx). - -Type: logger.LogLevel - -### OnStartup - -This callback is called after the frontend has been created, but before `index.html` has been loaded. It is given the application context. - -Name: AssetsHandler - -### OnDomReady - -This callback is called after the frontend has loaded `index.html` and its resources. It is given the application context. - -Name: AssetsHandler - -### OnShutdown - -This callback is called after the frontend has been destroyed, just before the application terminates. It is given the application context. - -Name: AssetsHandler - -### OnBeforeClose - -If this callback is set, it will be called when the application is about to quit, either by clicking the window close button or calling `runtime.Quit`. Returning true will cause the application to continue, false will continue shutdown as normal. This is good for confirming with the user that they wish to exit the program. - -Example: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -Type: func(ctx context.Context) bool - -### WindowStartState - -Defines how the window should present itself at startup. - -| Value | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -Name: Logger - -### CSSDragProperty - -Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. - -Type: string - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. - -Type: string - -### Bind - -A slice of struct instances defining methods that need to be bound to the frontend. - -Default: Logger to Stdout - -### Windows - -This defines [Windows specific options](#windows-specific-options). - -Name: LogLevel - -### Mac - -This defines [Mac specific options](#mac-specific-options). - -Default: `Info` in dev mode, `Error` in production mode - -### Linux - -This defines [Linux specific options](#linux-specific-options). - -Name: LogLevelProduction - -## Windows Specific Options - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: int - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: int - -### DisableWindowIcon - -Setting this to `true` will remove the icon in the top left corner of the title bar. - -Type: int - -### DisableFramelessWindowDecorations - -Setting this to `true` will remove the window decorations in [Frameless](#Frameless) mode. This means there will be no 'Aero Shadow' and no 'Rounded Corners' shown for the window. Please note that 'Rounded Corners' are only supported on Windows 11. - -Type: int - -### WebviewUserDataPath - -This defines the path where the WebView2 stores the user data. If empty `%APPDATA%\[BinaryName.exe]` will be used. - -Type: string - -### WebviewBrowserPath - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -Type: string - -### Theme - -Minimum Windows Version: Windows 10 2004/20H1 - -This defines the theme that the application should use: - -| Value | Description | -| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | *Default*. The theme will be based on the system default. If the user changes their theme, the application will update to use the new setting | -| Dark | The application will use a dark theme exclusively | -| Light | The application will use a light theme exclusively | - -Type: `windows.Theme` - -### CustomTheme - -Name: WindowStartState - -Type: options.WindowStartState - -Type: `windows.CustomTheme` - -#### Name: CustomTheme - -The CustomTheme struct uses `int32` to specify the colour values. These are in the standard(!) Windows format of: `0x00BBGGAA`. A helper function is provided to do RGB conversions into this format: `windows.RGB(r,g,b uint8)`. - -NOTE: Any value not provided will default to black. - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -Example: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -### Messages - -Name: Windows - -Type: `*windows.Messages` - -Customise this for any language you choose to support. - -### ResizeDebounceMS - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. - -Type: \*mac.Options - -### OnSuspend - -If set, this function will be called when windows initiates a switch to low power mode (suspend/hibernate) - -Name: Linux - -### OnResume - -If set, this function will be called when windows resumes from low power mode (suspend/hibernate) - -Name: Linux - -## Mac Specific Options - -### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -Type: bool - - -### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -Name: WindowIsTranslucent - -### WebviewIsTransparent - -Setting this to `true` will make the webview background transparent when an alpha value of `0` is used. This means that if you use `rgba(0,0,0,0)` for `background-color` in your CSS, the host window will show through. Often combined with [WindowIsTranslucent](#WindowIsTranslucent) to make frosty-looking applications. - -Type: int - -### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Often combined with [WebviewIsTransparent](#WebviewIsTransparent) to make frosty-looking applications. - -Type: int - -### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -Name: DisableFramelessWindowDecorations - - -#### Titlebar struct - -The titlebar of the application can be customised by using the TitleBar options: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| TitlebarAppearsTransparent | Makes the titlebar transparent. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | Hides the title of the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | Makes the webview fill the entire window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | Adds a default toolbar to the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | Removes the line beneath the toolbar. [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| Setting | Example | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -Example: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### Appearance type - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| Value | Description | -| ----------------------------------------------------- | --------------------------------------------------------------- | -| DefaultAppearance | DefaultAppearance uses the default system value | -| NSAppearanceNameAqua | The standard light system appearance | -| NSAppearanceNameDarkAqua | The standard dark system appearance | -| NSAppearanceNameVibrantLight | The light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastAqua | A high-contrast version of the standard light system appearance | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | A high-contrast version of the standard dark system appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | A high-contrast version of the light vibrant appearance | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | A high-contrast version of the dark vibrant appearance | - -Example: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### About struct - -```go -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -If these settings are provided, an "About" menu item will appear in the app menu (when using the `AppMenu` role). Given this configuration: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -
- -
- -
- -When clicked, that will open an about message box: - -
- -
- -
- -## Linux Specific Options - -### Icon - -Sets up the icon representing the window. This icon is used when the window is minimized (also known as iconified). - -Type: []byte - -Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. On others, the icon is not used at all, so your mileage may vary. - -NOTE: Gnome on Wayland at least does not display this icon. To have a application icon there, a `.desktop` file has to be used. On KDE it should work. - -The icon should be provided in whatever size it was naturally drawn; that is, don’t scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx deleted file mode 100644 index 3dc1cf002..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Project Config - -The project config resides in the `wails.json` file in the project directory. The structure of the config is: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. If this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. If this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']" -} -``` - -This file is read by the Wails CLI when running `wails build` or `wails dev`. - -The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx deleted file mode 100644 index 976ca1d80..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -sidebar_position: 7 ---- - -# Browser - -These methods are related to the system browser. - -### BrowserOpenURL - -Opens the given URL in the system browser. - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` - diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx deleted file mode 100644 index bf1dd7246..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Dialog - -This part of the runtime provides access to native dialogs, such as File Selectors and Message boxes. - -:::info Javascript - Dialog is currently unsupported in the JS runtime. -::: - -### OpenDirectoryDialog - -Opens a dialog that prompts the user to select a directory. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected directory (blank if the user cancelled) or an error - -### OpenFileDialog - -Opens a dialog that prompts the user to select a file. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -Returns: Selected file (blank if the user cancelled) or an error - -### OpenMultipleFilesDialog - -Opens a dialog that prompts the user to select multiple files. Can be customised using [OpenDialogOptions](#opendialogoptions). - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -Returns: Selected files (nil if the user cancelled) or an error - -### SaveFileDialog - -Opens a dialog that prompts the user to select a filename for the purposes of saving. Can be customised using [SaveDialogOptions](#savedialogoptions). - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -Returns: The selected file (blank if the user cancelled) or an error - -### MessageDialog - -Displays a message using a message dialog. Can be customised using [MessageDialogOptions](#messagedialogoptions). - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -Returns: The text of the selected button or an error - -## Options - -### OpenDialogOptions - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| ResolvesAliases | If true, returns the file not the alias | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### SaveDialogOptions - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| Field | Description | Win | Mac | Lin | -| -------------------------- | ---------------------------------------------- | --- | --- | --- | -| DefaultDirectory | The directory the dialog will show when opened | ✅ | ✅ | ✅ | -| DefaultFilename | The default filename | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | A list of file filters | ✅ | ✅ | ✅ | -| ShowHiddenFiles | Show files hidden by the system | | ✅ | ✅ | -| CanCreateDirectories | Allow user to create directories | | ✅ | | -| TreatPackagesAsDirectories | Allow navigating into packages | | ✅ | | - -### MessageDialogOptions - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| Field | Description | Win | Mac | Lin | -| ------------- | ------------------------------------------------------------------------- | --- | --- | --- | -| Type | The type of message dialog, eg question, info... | ✅ | ✅ | ✅ | -| Title | Title for the dialog | ✅ | ✅ | ✅ | -| Message | The message to show the user | ✅ | ✅ | ✅ | -| Buttons | A list of button titles | | ✅ | | -| DefaultButton | The button with this text should be treated as default. Bound to `return` | | ✅ | | -| CancelButton | The button with this text should be treated as cancel. Bound to `escape` | | ✅ | | - -#### Windows - -Windows has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No", "Try Again" or "Continue" - -#### Linux - -Linux has standard dialog types in which the buttons are not customisable. The value returned will be one of: "Ok", "Cancel", "Yes", "No" - -#### Mac - -A message dialog on Mac may specify up to 4 buttons. If no `DefaultButton` or `CancelButton` is given, the first button is considered default and is bound to the `return` key. - -For the following code: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -the first button is shown as default: - -
- -
- -
- -And if we specify `DefaultButton` to be "two": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -the second button is shown as default. When `return` is pressed, the value "two" is returned. - -
- -
- -
- -If we now specify `CancelButton` to be "three": - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -the button with "three" is shown at the bottom of the dialog. When `escape` is pressed, the value "three" is returned: - -
- -
- -
-
-
- -#### DialogType - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### FileFilter - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Linux - -Linux allows you to use multiple file filters in dialog boxes. Each FileFilter will show up as a separate entry in the dialog: - -
- -
- -
-
-
- -#### Mac - -Mac dialogs only have the concept of a single set of patterns to filter files. If multiple FileFilters are provided, Wails will use all the Patterns defined. - -Example: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -This will result in the Open File dialog using `*.png,*.jpg,*.mov,*.mp4` as a filter. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx deleted file mode 100644 index 75e8b0a50..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Events - -The Wails runtime provides a unified events system, where events can be emitted or received by either Go or Javascript. Optionally, data may be passed with the events. Listeners will receive the data in the local data types. - -### EventsOn - -This method sets up a listener for the given event name. When an event of type `eventName` is [emitted](#EventsEmit), the callback is triggered. Any additional data sent with the emitted event will be passed to the callback. - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### EventsOff - -This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`. - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### EventsOnce - -This method sets up a listener for the given event name, but will only trigger once. - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### EventsOnMultiple - -This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times. - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### EventsEmit - -This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` - diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx deleted file mode 100644 index 6c02c71cd..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -The runtime is a library that provides utility methods for your application. There is both a Go and Javascript runtime and the aim is to try and keep them at parity where possible. - -It has utility methods for: - -- [Window](window.mdx) -- [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) -- [Browser](browser.mdx) -- [Log](log.mdx) - -The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks. - -:::info Note - -Whilst the context will be provided to the [OnStartup](../options.mdx#onstartup) method, there's no guarantee the runtime will work in this method as the window is initialising in a different thread. If you wish to call runtime methods at startup, use [OnDomReady](../options.mdx#ondomready). - -::: - -The Javascript library is available to the frontend via the `window.runtime` map. There is a runtime package generated when using `dev` mode that provides Typescript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. - -### Hide - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -Hides the application. - -:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: - -### Show - -Shows the application. - -:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### Quit - -Quits the application. - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### Environment - -Returns details of the current environment. - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### EnvironmentInfo - -Go: -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` -JS: -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx deleted file mode 100644 index e5e6ea7ac..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Log - -The Wails runtime provides a logging mechanism that may be called from Go or Javascript. Like most loggers, there are a number of log levels: - -- Trace -- Debug -- Info -- Warning -- Error -- Fatal - -The logger will output any log message at the current, or higher, log level. Example: The `Debug` log level will output all messages except `Trace` messages. - -### LogPrint - -Logs the given message as a raw message. - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### LogPrintf - -Logs the given message as a raw message. - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### LogTrace - -Logs the given message at the `Trace` log level. - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### LogTracef - -Logs the given message at the `Trace` log level. - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### LogDebug - -Logs the given message at the `Debug` log level. - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### LogDebugf - -Logs the given message at the `Debug` log level. - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### LogInfo - -Logs the given message at the `Info` log level. - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### LogInfof - -Logs the given message at the `Info` log level. - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### LogWarning - -Logs the given message at the `Warning` log level. - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### LogWarningf - -Logs the given message at the `Warning` log level. - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### LogError - -Logs the given message at the `Error` log level. - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### LogErrorf - -Logs the given message at the `Error` log level. - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### LogFatal - -Logs the given message at the `Fatal` log level. - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### LogFatalf - -Logs the given message at the `Fatal` log level. - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### LogSetLogLevel - -Sets the log level. In Javascript, the number relates to the following log levels: - -| Value | Log Level | -| ----- | --------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## Using a Custom Logger - -A custom logger may be used by providing it using the [Logger](../options.mdx#logger) application option. The only requirement is that the logger implements the `logger.Logger` interface defined in `github.com/wailsapp/wails/v2/pkg/logger`: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx deleted file mode 100644 index 226ff2c68..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Menu - -These methods are related to the application menu. - -:::info Javascript - Menu is currently unsupported in the JS runtime. -::: - -### MenuSetApplicationMenu - -Sets the application menu to the given [menu](../menus.mdx). - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### MenuUpdateApplicationMenu - -Updates the application menu, picking up any changes to the menu passed to `MenuSetApplicationMenu`. - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx deleted file mode 100644 index 3316a45f9..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx +++ /dev/null @@ -1,211 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Window - -These methods give control of the application window. - -### WindowSetTitle - -Sets the text in the window title bar. - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### WindowFullscreen - -Makes the window full screen. - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### WindowUnfullscreen - -Restores the previous window dimensions and position prior to full screen. - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### WindowIsFullscreen - -Returns true if the window is full screen. - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### WindowCenter - -Centers the window on the monitor the window is currently on. - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### WindowReload - -Performs a "reload" (Reloads current page). - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### WindowReloadApp - -Reloads the application frontend. - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### WindowSetSystemDefaultTheme - -Windows only. - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -Sets window theme to system default (dark/light). - -### WindowSetLightTheme - -Windows only. - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -Sets window theme to light. - -### WindowSetDarkTheme - -Windows only. - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -Sets window theme to dark. - -### WindowShow - -Shows the window, if it is currently hidden. - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### WindowHide - -Hides the window, if it is currently visible. - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### WindowIsNormal - -Returns true if the window not minimised, maximised or fullscreen. - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### WindowSetSize - -Sets the width and height of the window. - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### WindowGetSize - -Gets the width and height of the window. - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### WindowSetMinSize - -Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetMaxSize - -Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### WindowSetAlwaysOnTop - -Sets the window AlwaysOnTop or not on top. - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### WindowSetPosition - -Sets the window position relative to the monitor the window is currently on. - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### WindowGetPosition - -Gets the window position relative to the monitor the window is currently on. - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### WindowMaximise - -Maximises the window to fill the screen. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowUnmaximise - -Restores the window to the dimensions and position prior to maximising. - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### WindowIsMaximised - -Returns true if the window is maximised. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowToggleMaximise - -Toggles between Maximised and UnMaximised. - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### WindowMinimise - -Minimises the window. - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### WindowUnminimise - -Restores the window to the dimensions and position prior to minimising. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -Returns true if the window is minimised. - -Go: `WindowIsMinimised(ctx context.Context) bool` JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. - -Valid values for R, G, B and A are 0-255. - -Any value that is not 0 will be considered 255. :::info Windows -On Windows, only alpha values of 0 or 255 are supported. -::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript Object Definitions - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx deleted file mode 100644 index f4845fdbe..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -
- -
- -
- -:::note This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). ::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. - - - - - diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx deleted file mode 100644 index ee2814292..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx +++ /dev/null @@ -1,118 +0,0 @@ ---- -sidebar_position: 10 ---- - -# Hello World - -Цель этого урока — запустить наиболее базовое приложение, использующее Wails. Вы сможете: - -- Создавать новое Wails приложение -- Собирать приложение -- Запускать приложение - -:::note -В этом уроке в качестве целевой платформы используется Windows. Вывод будет варьироваться в -зависимости от вашей операционной системы. -::: - -## Создавать новое Wails приложение - -Чтобы создать новое Wails приложение, использующее стандартный шаблон JS, вам нужно выполнить следующую команду: - -```bash -wails init -n helloworld -``` - -Вы должны увидеть что-то похожее на следующее: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -Это создаст новый каталог под названием `helloworld` в текущей директории. В этом каталоге вы найдете несколько файлов: - -``` -build/ - Содержит файлы сборки + собранное приложение -frontend/ - Содержит файлы интерфейса -app.go - Содержит код приложения -main.go - Основная программа с настройками приложения -wails.json - Файл настройки проекта -go.mod - Файл модуля Go -go.sum - Файл контрольной суммы модуля Go -``` - -## Собирать приложение - -Чтобы собрать приложение, перейдите в новую директорию `helloworld` и запустите следующую команду: - -```bash -wails build -``` - -Вы должны увидеть что-то похожее на следующее: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -Приложение собрано и сохранено в папке `build/bin`. - -## Запускать приложение - -Если мы откроем папку `build/bin` в Проводнике, то увидим исполняемый файл проекта: - -
- -
- -
- -Мы можем запустить его, просто дважды щелкнув по файлу `helloworld.exe`. - -На Mac, Wails генерирует файл `helloworld.app` который может быть запущен двойным щелчком. - -На Linux вы можете запустить приложение с помощью файла `./helloworld` из папки `build/bin`. - -Вы должны видеть приложение, работающее так, как ожидалось: - -
- -
-
diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx deleted file mode 100644 index 3845736f4..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx +++ /dev/null @@ -1,87 +0,0 @@ -# Frameless Applications - -Wails supports application that have no frames. This can be achieved by using the [frameless](../reference/options.mdx#frameless) field in [Application Options](../reference/options.mdx#application-options). - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info Fullscreen - -If you allow your application to go fullscreen, this drag functionality will be disabled. - -::: diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx deleted file mode 100644 index ac087ee45..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx +++ /dev/null @@ -1,72 +0,0 @@ -# Frontend - -## Script Injection - -When Wails serves your `index.html`, by default, it will inject 2 script entries into the `` tag to load `/wails/ipc.js` and `/wails/runtime.js`. These files install the bindings and runtime respectively. - -The code below shows where these are injected by default: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - -``` - -### Overriding Default Script Injection - -To provide more flexibility to developers, there is a meta tag that may be used to customise this behaviour: - -```html - -``` - -The options are as follows: - -| Value | Description | -| ------------------- | ------------------------------------------------ | -| noautoinjectruntime | Disable the autoinjection of `/wails/runtime.js` | -| noautoinjectipc | Disable the autoinjection of `/wails/ipc.js` | -| noautoinject | Disable all autoinjection of scripts | - -Multiple options may be used provided they are comma seperated. - -This code is perfectly valid and operates the same as the autoinjection version: - -```html - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - -``` diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx deleted file mode 100644 index 229c282bf..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx deleted file mode 100644 index dcf192d33..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# Manual Builds - -The Wails CLI does a lot of heavy lifting for the project, but sometimes it's desirable to manually build your project. This document will discuss the different operations the CLI does and how this may be achieved in different ways. - -## Build Process - -When either `wails build` or `wails dev` are used, the Wails CLI performs a common build process: - - - Install frontend dependencies - - Build frontend project - - Generate build assets - - Compile application - - [optional] Compress application - -### Install frontend dependencies - -#### CLI Steps - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is an install command in the key `frontend:install` -- If there isn't, it skips this step -- If there is, it checks if `package.json` exists in the frontend directory. If it doesn't exist, it skips this step -- An MD5 sum is generated from the `package.json` file contents -- It checks for the existence of `package.json.md5` and if it exists, will compare the contents of it (an MD5 sum) with the one generated to see if the contents have changed. If they are the same, this step is skipped -- If `package.json.md5` does not exist, it creates it using the generated MD5 sum -- If a build is now required, or `node_modules` does not exist, or the `-f` flag is given, the install command is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm install`. - -### Build frontend project - -#### Wails CLI - -- If the `-s` flag is given, this step is skipped -- Checks `wails.json` to see if there is a build command in the key `frontend:build` -- If there isn't, it skips this step -- If there is, it is executed in the frontend directory - -#### Manual Steps - -This step could be done from the command line or a script with `npm run build` or whatever the frontend build script is. - -### Generate assets - -#### Wails CLI - -- If `-nopackage` flag is set, this stage is skipped -- If the `build/appicon.png` file does not exist, a default one is created -- For Windows, see [Bundling for Windows](#windows) -- If `build/windows/icon.ico` does not exist, it will create it from the `build/appicon.png` image. - -##### Windows - -- If `build/windows/icon.ico` does not exist, it will create it from `build/appicon.png` using icon sizes of 256, 128, 64, 48, 32 and 16. This is done using [winicon](https://github.com/leaanthony/winicon). -- If the `build/windows/.manifest` file does not exist, it creates it from a default version. -- Compiles the application as a production build (above) -- Uses [winres](https://github.com/tc-hib/winres) to bundle the icon and manifest into a `.syso` file ready for linking. - -#### Manual Steps - -- Create `icon.ico` using the [winicon](https://github.com/leaanthony/winicon) CLI tool (or any other tool). -- Create / Update a `.manifest` file for your application -- Use the [winres CLI](https://github.com/tc-hib/go-winres) to generate a `.syso` file. - -### Compile application - -#### Wails CLI - -- If the `-clean` flag is provided, the `build` directory is deleted and recreated -- For `wails dev`, the following default Go flags are used: `-tags dev -gcflags "all=-N -l"` -- For `wails build`, the following default Go flags are used: `-tags desktop,production -ldflags "-w -s"` - - On Windows, `-ldflags "-w -h -H windowsgui"` -- Additional tags passed to the CLI using `-tags` are added to the defaults -- Additional ldflags passed to the CLI using `-ldflags` are added to the defaults -- The `-o` flag is passed through -- The Go compiler specified by `-compiler` will be used for compilation - -#### Manual steps - -- For dev build, the minimum command would be: `go build -tags dev -gcflags "all=-N -l"` -- For production build, the minimum command would be: `go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- Ensure that you compile in the same directory as the `.syso` file - -### Compress application - -#### Wails CLI - -- If the `-upx` flag has been given, the `upx` program will be run to compress the application with the default settings -- If `-upxflags` is also passed, these flags are used instead of the default ones - -#### Manual steps - -- Run `upx [flags]` manually to compress the application. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx deleted file mode 100644 index 821808c0b..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -This page has miscellaneous guides related to developing Wails applications for Windows. - -## Handling the WebView2 Runtime Dependency - -Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency. - -By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old). The four options are: - -1. Download -2. Embed -3. Browser -4. Error - -### Download - -This option will prompt the user that no suitable runtime has been found and then offer to download and run the official bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run. - -### Embed - -This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the application will offer to run the bootstrapper. This adds ~150k to the binary size. - -### Browser - -This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation up to the user. - -### Error - -If no suitable runtime is found, an error is given to the user and no further action taken. - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx deleted file mode 100644 index 1af16f774..000000000 --- a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -```mdx-code-block -
- -
-
-``` - -:::note - -This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). - -::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/pt/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/manual-builds.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/manual-builds.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/i18n/ru/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx rename to website/i18n/ru/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx deleted file mode 100644 index 90c365a3d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/links.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 链接 - -此页面用于列出社区相关的链接。 请提交 PR(点击页面底部的`编辑此页`)增加链接。 - -## 了不起的 Wails - -Wails 相关的[优秀列表](https://github.com/wailsapp/awesome-wails)。 - -## 支持的通道 - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 测试版讨论板](https://github.com/wailsapp/wails/discussions/828) - -## 社交媒体 - -- [Twitter](https://twitter.com/wailsapp) -- [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号:1067173054 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx deleted file mode 100644 index 4a1ebe835..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/emailit.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# EmailIt - -

- -
-

- -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx deleted file mode 100644 index 9b2e5f8ac..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EncryptEasy - -

- -
-

- -**[cryptEasy](https://www.encrypteasy.app) 是一个管理您和您所有的联系人密钥的简单易用的 PGP 加密工具。 加密应该是简单的。 使用Wails开发。** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx deleted file mode 100644 index 78cbfca86..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/filehound.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# FileHound Export Utility - -

- -
-

- -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 11247339d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Minecraft Updater - -

- -
-

- -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx deleted file mode 100644 index a7ae8c492..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Modal File Manager - -

- -
-

- -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx deleted file mode 100644 index 534b097ca..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Molley Wallet - -

- -
-

- -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx deleted file mode 100644 index 889d2dd9e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/october.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# October - -

- -
-

- -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx deleted file mode 100644 index c3eb79507..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/optimus.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Optimus - -

- -
-

- -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx deleted file mode 100644 index 4cc2c63c9..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/portfall.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Portfall - -

- -
-

- -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx deleted file mode 100644 index 1505ce07a..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Restic Browser - -

- -
-

- -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx deleted file mode 100644 index 5223e88cf..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/riftshare.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# RiftShare - -

- -
-

- -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx deleted file mode 100644 index aaa556f92..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# ScriptBar - -

- -
-

- -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx deleted file mode 100644 index 2d895dc29..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/surge.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Surge - -

- -
-

- -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx deleted file mode 100644 index 2a2498f40..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wally.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wally - -

- -
-

- -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx deleted file mode 100644 index 54cedacea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/wombat.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Wombat - -

- -
-

- -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx deleted file mode 100644 index 178ff0529..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/showcase/ytd.mdx +++ /dev/null @@ -1,8 +0,0 @@ -# Ytd - -

- -
-

- -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx deleted file mode 100644 index 8b98f7115..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/templates.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 模板 - -此页面用作社区支持的模板列表。 请提交一个包含您的模板的 PR(点击页面底部的`编辑此页`)。 要构建您自己的模板,请参考[模板](../guides/templates)指南。 - -要使用这些模板,请运行 `wails init -n "您的项目名" -t [下面的链接[@版本]]` - -如果不带版本后缀,默认使用的是主分支代码模板,如果带有版本后缀,则使用该版本对应标签的代码模板。 If there is a version suffix, the code template corresponding to the tag of this version is used. - -示例:`wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue@v2.0.0-beta.3` - -:::warning 注意 - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json`和`wails.json` 中安装的模块和运行的脚本。 - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vite、Vue 和 Vue-Router 的 Wails 模板(同时支持 JavaScript 和 TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - 使用 Vite 的 Vue 3 TypeScript(以及添加功能的说明) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - 使用 Vite, Vuex, Vue Router, Sass, 和 ESLint + Prettier 的 Vue 3 TypeScript - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - 带有 TypeScript, Sass, 热重载, 代码拆分和 i18n 的 Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板 -- [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板 -- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板 - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - 基于 Svelte 的模板 -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - 使用 Svelte 和 Vite 的模板 -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - 使用 Svelte 和 Vite 和 TailwindCSS v3 的模板 -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - 基于 Next.js + TypeScript 的模板 - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - A template with nothing but just basic JavaScript, HTML, and CSS \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx deleted file mode 100644 index 38bf5d47d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/building.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 编译您的项目 - -从项目目录,运行`wails build`。 这将编译您的项目并将构建的可用于生产的二进制文件保存在 `build/bin` 目录中。 - -如果您运行二进制文件,您应该会看到默认应用程序: - -
- -
- -
- -有关编译选项的更多详细信息,请参阅[构建命令](../reference/cli#构建)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx deleted file mode 100644 index a9e165543..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 开发您的应用程序 - -您可以通过运行`wails dev`从项目目录在开发模式下运行您的应用程序。 这将执行以下操作: - -- 构建您的应用程序并运行它 -- 监听 Go 文件中的修改并在更改时重新构建/重新运行 -- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change -- 设置将通过浏览器为您的应用程序提供服务的[网络服务器](http://localhost:34115)。 这允许您使用您喜欢的浏览器扩展。 您甚至可以从控制台调用 Go 代码。 - -首先,在项目目录中运行`wails dev`。 可以在[此处](../reference/cli#开发)找到有关这方面的更多信息。 - -即将提供:教程 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx deleted file mode 100644 index e43d5f7d1..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 创建项目 - -## 项目生成 - -现在 CLI 已安装,您可以使用`wails init`命令生成一个新项目。 - -选择您最喜欢的框架: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Generate a Svelte project using Javascript with:

- - wails init -n myproject -t svelte -If you would rather use Typescript:
- - wails init -n myproject -t svelte-ts - -
- - Generate a React project using Javascript with:

- - wails init -n myproject -t react -If you would rather use Typescript:
- - wails init -n myproject -t react-ts - -
- - Generate a Vue project using Javascript with:

- - wails init -n myproject -t vue - -If you would rather use Typescript:
- - wails init -n myproject -t vue-ts - -
- - Generate a Preact project using Javascript with:

- - wails init -n myproject -t preact - -If you would rather use Typescript:
- - wails init -n myproject -t preact-ts - -
- - Generate a Lit project using Javascript with:

- - wails init -n myproject -t lit - -If you would rather use Typescript:
- - wails init -n myproject -t lit-ts - -
- - Generate a Vanilla project using Javascript with:

- - wails init -n myproject -t vanilla - -If you would rather use Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
- - - -
- -Wails 项目具有以下布局: - -要查看其他可用选项,您可以运行 `wails init -help`。 更多详细信息可以在 [初始化命令](../reference/cli#初始化)中找到。 - -## 项目布局 - -Wails 项目有以下布局: - -``` -. -. -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### 项目结构概要 - -- `/main.go` - 主应用 -- `/frontend/` - 前端项目文件 -- `/build/` - 项目构建目录 -- `/wails.json` - 项目配置 -- `/go.mod` - Go mod 文件 -- `/go.sum` - Go mod 校验文件 -- `/build/windows/` - Windows 特定的项目文件 -- `/go.mod` - Go module file -- `/go.sum` - Go module checksum file - -`frontend`目录没有特定于 Wails 的内容,可以是您选择的任何前端项目。 - -`build`目录在构建过程中使用。 这些文件可以修改以自定义您的构建。 如果文件从构建目录中删除,将重新生成默认版本。 - -`go.mod`中的默认模块名称是“changeme”。 您应该将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx deleted file mode 100644 index bbef43c3c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/gettingstarted/installation.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 安装 - -## 支持的平台 - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依赖 - -Wails 有许多安装前需要的常见依赖项: - -- Go 1.17+ -- NPM (Node 15+) - -### Go - -从[Go 下载页面](https://golang.org/dl/)下载 Go。 - -确保您遵守官方的[Go 安装说明](https://golang.org/doc/install#install)。 您还需要确保您的 `PATH` 环境变量包含您的 `~/go/bin` 目录路径。 重启终端并执行以下命令检查: - -- 检查 Go 是否安装正确: `go version` -- 检查 "~/go/bin" 是否在您的 PATH 变量中: `echo $PATH | grep go/bin` - -### NPM - -从[Node 下载页面](https://nodejs.org/en/download/)下载 NPM。 最好使用最新版本,因为这是我们通常会测试的版本。 - -运行 `npm --version` 进行验证。 - -## 平台指定依赖关系 - -您还需要安装指定平台的依赖项: - - - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails 需要安装 xcode 命令行工具。 This can be - done by running:
- xcode-select --install -
- - Wails requires that the WebView2{" "} - runtime is installed. Some Windows installations will already have this installed. You can check using - the{" "} - wails doctor command (see below). Some Windows installations will already have this installed. You can check using - the{" "} - wails doctor command (see below). Some Windows installations will already have this - installed. You can check using the wails doctor command (see - below). - - - Linux required the standard gcc build tools - plus libgtk3 and libwebkit. - Rather than list a ton of commands for different distros, Wails can try to determine - what the installation commands are for your specific distribution. Run wails doctor after - installation - to be shown how to install the dependencies. - If your distro/package manager is not supported, please consult the {" "} - Add Linux Distro guide. - Rather than list a ton of commands for different distros, Wails can try to determine - what the installation commands are for your specific distribution. Run wails doctor after - installation - to be shown how to install the dependencies. - If your distro/package manager is not supported, please consult the {" "} - Add Linux Distro guide. Rather than list a ton of - commands for different distros, Wails can try to determine what the - installation commands are for your specific distribution. Run{" "} - wails doctor after installation to be shown how to install the - dependencies. If your distro/package manager is not supported, please - consult the{" "} - Add Linux Distro guide. - -
- - - -## 可选依赖 - -- [UPX](https://upx.github.io/) 用于压缩您的应用程序。 - -## 安装 Wails - -运行 `go install github.com/wailsapp/wails/v2/cmd/wails@latest` 安装 Wails CLI。 - -## 系统检查 - -运行 `wails doctor` 将检查您是否安装了正确的依赖项。 如果没有,它会就缺少的内容提供建议以帮助纠正问题。 - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx deleted file mode 100644 index 76e93b17a..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# 应用开发 - -使用 Wails 开发应用程序没有硬性规定,但有一些基本准则。 - -## 应用程序设置 - -默认模板使用 `main.go` 配置和运行应用程序, 同时`app.go`用于定义应用程序逻辑. - -`app.go`文件将定义一个结构体,该结构体有 2 个方法作为主应用程序的回调: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- `startup`方法会在 Wails 分配它需要的资源后立即调用,这是创建资源、设置事件侦听器以及应用程序在启动时需要的任何其他内容的好地方。 它提供了一个`context.Context`, 通常保存在结构字段中。 调用[运行时](../reference/runtime/intro)需要此`context.Context`。 如果此方法返回错误,则应用程序将终止。 在开发模式下,错误会输出到控制台。 - -- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks. This is a good place to deallocate memory and perform any shutdown tasks. - -`main.go`文件通常由对`wails.Run()`的单个调用组成,它接受应用程序配置。 模板使用的模式是,在调用`wails.Run()`之前, 我们创建并保存一个在`app.go`中定义的结构体的实例在名`app`的变量中。 这个配置是我们添加回调的地方: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -可以在[此处](../howdoesitwork#应用程序生命周期回调)找到有关应用程序生命周期回调的更多信息。 - -## 绑定方法 - -您可能希望从前端调用 Go 方法。 这通常是通过向`app.go`中已经定义的结构体中添加公共方法来实现的: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Printf("Hello %s!", name) -} -``` - -在主应用程序中,`Bind`字段告诉我们 Wails 想要绑定什么: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -这将绑定`App`结构中的所有公共方法(它永远不会绑定 startup 和 shutdown 方法)。 - -### Dealing with context when binding multiple structs - -可以在[此处](../howdoesitwork#方法绑定)找到有关绑定的更多信息。 - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -More information on Binding can be found [here](../howdoesitwork.mdx#method-binding). - -## 应用程序菜单 - -Wails 支持向您的应用程序添加菜单。 这是通过将 [菜单](../reference/menus#菜单) 结构体传递给应用程序配置来完成的。 常见做法是使用一个返回菜单的方法,更常见的是用作生命周期回调的 `App` 结构体上的方法。 - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## 资源 - -Wails v2 处理资源的方式的伟大之处在于它没有! 您唯一需要给 Wails 的是一个 `embed.FS`, 如何做到这一点完全取决于您。 How you get to that is entirely up to you. 您可以像 vanilla 模板一样使用 vanilla html/css/js 文件。 您可能有一些复杂的构建系统,但这并不影响。 - -当运行`wails build`时,它会检查项目根目录的`wails.json`文件。 文件中有 2 个字段会被读取: - -- "frontend:install" -- "frontend:build" - -第一个,如果有给定,将在`frontend`目录中执行以安装 node 模块。 第二个,如果有给定,将在`frontend`目录中执行以构建前端项目。 - -如果没有给出这两个字段,那么 Wails 不会对前端做任何操作。 它仅仅被用作`embed.FS`。 - -### AssetsHandler - -A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option. - -## 内置开发服务器 - -运行`wails dev`将启动内置的开发服务器,它将在您的项目目录中启动一个文件监听器。 默认情况下,如果有任何文件更改,wails 会检查它是否是应用程序文件(默认:.go,可使用`-e`标志配置)。 如果是,那么它将重新构建您的应用程序并重新启动它。 如果更改的文件在`assetdir`目录中,它会在很短的时间后重新加载。 - -开发服务器使用一种称为“防抖”的技术,这意味着它不会立即重新加载,因为可能会在短时间内更改多个文件。 当触发发生时,它会在发出重新加载之前等待一定的时间。 如果发生另一个触发,它会再次重置为等待时间。 默认情况下,此值为 100ms。 如果此值不适用于您的项目,则可以使用`-debounce`标志进行配置。 如果使用,此值将保存到您的项目配置中并成为默认值。 - -## 外部开发服务器 - -一些框架带有自己的实时重新加载服务器,但是它们将无法利用 Wails Go 绑定。 在这种情况下,最好运行一个监听脚本,将项目重新构建到构建目录中,Wails 将监视该目录。 有关示例,请参阅使用[rollup](https://rollupjs.org/guide/en/)的默认 svelte 模板。 对于[create-react-app](https://create-react-app.dev/),可以使用[此脚本](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd)来实现类似的结果。 - -## Go 模块 - -默认的 Wails 模板会生成一个包含模块名称“changeme”的`go.mod`文件。 您应该在项目生成后将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx deleted file mode 100644 index 8fad99fde..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# 前沿风险技术 - -## 概述 - -Wails 一直在开发中,新版本会定期“标记”。 这通常发生在`master`分支上所有较新的代码都经过测试并确认有效时。 如果您需要尚未发布的错误修复或功能,可以通过以下步骤使用最新的“前沿风险”版本: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -注意:您将项目克隆到的目录现在将被称为“clonedir”。 - -Wails CLI 现在将是最新版本。 - -### Updating your project - -To update projects to use the latest version of the Wails library, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -示例: - -在 Windows 上: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -在'nix 上: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## 测试一个分支 - -如果要测试一个分支,请按照上面的说明进行操作,但请确保在安装之前切换要测试的分支: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. - -## Testing a PR - -If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com: Please replace `[IDofThePR]` with the ID of the PR shown on github.com: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -Make sure you [update your project](#updating-your-project) as described above. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx deleted file mode 100644 index c28d70e9d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/dynamic-assets.mdx +++ /dev/null @@ -1,130 +0,0 @@ -# 动态资源 - -If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. - -By installing a custom AssetsHandler, you can serve your own assets using a custom asset server. - -## Example - -In our example project, we will create a simple assets handler which will load files off disk: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -When we run the application in dev mode using `wails dev`, we will see the following output: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file. - -If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -This will generate an error in the devtools. This will generate an error in the devtools. This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler: - -

- -

- -However, if we request `go.mod`, we will see the following output: - -

- -

- -This technique can be used to load images directly into the page. This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: This technique can be used to load images directly into the page. This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image: - -```html - -``` - -with: - -```html - -``` - -Then we would see the following: - -

- -

- -:::warning -Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access -to your filesystem. -::: It is recommended that you properly manage access -to your filesystem. -::: It is recommended that you properly manage access -to your filesystem. -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx deleted file mode 100644 index 126a36c38..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frameless.mdx +++ /dev/null @@ -1,84 +0,0 @@ -# 无边框应用 - -Wails supports application that have no frames. 这可以通过使用[应用程序参数选项](../reference/options#应用程序参数选项)中的[无边框](../reference/options#无边框)字段来实现。 - -Wails offers a simple solution for dragging the window: Any HTML element that has the CSS style `--wails-draggable:drag` will act as a "drag handle". This property applies to all child elements. If you need to indicate that a nested element should not drag, then use the attribute '--wails-draggable:no-drag' on that element. - - -```html - - - - - - - -
- - -
-
- - - - -``` - -For some projects, using a CSS variable may not be possible due to dynamic styling. In this case, you can use the `CSSDragProperty` and `CSSDragValue` application options to define a property and value that will be used to indicate draggable regions: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - - -``` - -:::info 全屏 -如果您允许应用程序全屏显示,则此拖动功能将被禁用。 -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx deleted file mode 100644 index 789e834b8..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/frontend.mdx +++ /dev/null @@ -1,72 +0,0 @@ -# 前端 - -## 脚本注入 - -当 Wails 为您的`index.html`提供服务时,默认情况下,它会将 2 个脚本注入``标签以加载`/wails/ipc.js`和`/wails/runtime.js`。 这些文件分别安装绑定和运行时。 - -下面的代码显示了这些默认注入的位置: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - -``` - -### 覆盖默认脚本注入 - -为了给开发人员提供更大的灵活性,有一个`meta`标签可用于自定义此行为: - -```html - -``` - -选项如下: - -| 值 | 描述 | -| ------------------- | -------------------------- | -| noautoinjectruntime | 禁用自动注入 `/wails/runtime.js` | -| noautoinjectipc | 禁用自动注入 `/wails/ipc.js` | -| noautoinject | 禁用所有脚本自动注入 | - -可以使用多个选项,前提是它们以逗号分隔。 - -此代码完全有效并且与自动注入版本的操作相同: - -```html - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx deleted file mode 100644 index 0ae681f0f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/ides.mdx +++ /dev/null @@ -1,110 +0,0 @@ -# 集成开发环境 - -Wails 旨在提供出色的开发体验。 为此,我们现在支持生成 IDE 特定配置以提供更顺畅的项目设置。 - -目前,我们支持[Visual Studio Code](https://code.visualstudio.com/),但我们希望尽快支持其他 IDE,例如 Goland。 - -## Visual Studio Code - -

- -

- -使用`-ide vscode`标志生成项目时,IDE 文件将与其他项目文件一起创建。 这些文件放置在`.vscode`目录中,并为调试应用程序提供正确的配置。 - -生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: 生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project: 生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project: 生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project: 生成的 2 个文件是`tasks.json`和`launch.json`. 以下是为默认 vanilla 项目生成的文件: Below are the files generated for the default vanilla project: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/myproject.exe"] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {}, - "args": ["-assetdir", "frontend/src"] - } - ] -} -``` - -### 配置安装和构建步骤 - -`tasks.json`文件对于默认项目很简单,因为不需要`npm install`或`npm run build`的步骤。 对于具有前端构建步骤的项目,例如 svelte 模板,我们需要编辑`tasks.json`以添加安装和构建步骤: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": ["build", "-tags", "dev", "-gcflags", "all=-N -l", "-o", "build/bin/vscode.exe"], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info 功能改善 - -在未来,我们希望生成一个自动包含安装和构建步骤的`tasks.json`。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx deleted file mode 100644 index 2ee209e03..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux-distro-support.mdx +++ /dev/null @@ -1,101 +0,0 @@ -# Linux 发行版支持 - -## 概述 - -Wails 提供 Linux 支持,但为所有可用发行版提供安装说明是一项不可能完成的任务。 相反,Wails 会尝试确定您开发应用程序所需的包是否可以通过系统的包管理器获得。 目前,我们支持以下包管理器: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## 添加包名 - -在某些情况下,您的发行版使用受支持的包管理器之一,但包名称不同。 例如,您可能使用 Ubuntu 衍生产品,但 gtk 的包名称可能不同。 Wails 尝试通过遍历包名称列表来找到正确的包。 包列表存储在`v2/internal/system/packagemanager` 目录中的包管理器特定文件中。 在我们的示例中,将是`v2/internal/system/packagemanager/apt.go`。 - -在此文件中,包列表由以下`Packages()`方法定义: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -假设在我们的 linux 发行版中,libgtk-3 以 lib-gtk3-dev 的名称打包。 我们可以通过添加以下行来添加对此的支持: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## 添加新的包管理器 - -要添加新的包管理器,请执行以下步骤: - -- 在`v2/internal/system/packagemanager`中创建一个名为`.go`的新文件,其中``是包管理器的名称。 -- 定义一个符合`pm.go`中定义的包管理器接口的结构体。 - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` 应该返回包管理器的名称 -- `Packages()` 应该返回一个`packagemap`,它为依赖项提供候选文件名 -- `PackageInstalled()` 如果安装了指定的包,应该返回`true` -- `PackageAvailable()` 如果指定的软件包未安装但可以安装,则应返回`true` -- `InstallCommand()` 应该返回确切的命令来安装指定的包名 - -查看其他包管理器代码以了解其工作原理。 - -:::info 记住 -如果您添加了对新包管理器的支持,请不要忘记更新此页面! -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx deleted file mode 100644 index 073e207b2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -This page has miscellaneous guides related to developing Wails applications for Linux. - -## Video tag doesn't fire "ended" event - -When using a video tag, the "ended" event is not fired when the video is finished playing. This is a bug in WebkitGTK, however you can use the following workaround to fix it: This is a bug in WebkitGTK, however you can use the following workaround to fix it: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -Source: [Lyimmi](https://github.com/Lyimmi) on the [discussions board](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx deleted file mode 100644 index 3472cb91a..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# 手动构建 - -Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项目。 本文档将讨论 CLI 执行的不同操作以及如何以不同方式实现这一点。 - -## 构建过程 - -当使用`wails build`或`wails dev`时,Wails CLI 会执行一个通用的构建过程: - - - 安装前端依赖 - - 构建前端项目 - - 生成构建资源 - - 编译应用程序 - - [可选]压缩应用程序 - -### 安装前端依赖 - -#### 命令行步骤 - -- 如果给出了`-s`标志,则跳过此步骤 -- 检查`wails.json`中是否有安装命令`frontend:install` -- 如果没有,则跳过此步骤 -- 如果有,则检查前端目录中是否存在`package.json`。 如果不存在,则跳过这一步 -- 从`package.json`文件内容生成 MD5 -- 它检查`package.json.md5`是否存在,如果存在,则将其内容(MD5 sum)与生成的内容进行比较,以查看内容是否已更改。 如果相同,则跳过此步骤 -- 如果`package.json.md5`不存在,则使用生成的 MD5 sum 创建它 -- 如果现在需要构建,或者`node_modules`不存在,或者给出了`-f`标志,则在前端目录中执行安装命令 - -#### 手动步骤 - -这一步可以从命令行或带有`npm install`的前端脚本完成. - -### 构建前端项目 - -#### Wails 命令行 - -- 如果给出了`-s`标志,则跳过此步骤 -- 检查`wails.json`中是否有构建命令`frontend:build` -- 如果没有,则跳过此步骤 -- 如果有,就在 frontend 目录下执行它 - -#### 手动步骤 - -这一步可以从命令行或带有前端构建脚本`npm run build`的脚本或任何前端构建脚本完成。 - -### 生成资源 - -#### Wails 命令行 - -- 如果设置了`-nopackage`标志,则跳过此阶段 -- 如果`build/appicon.png`文件不存在,则创建一个默认文件 -- 对于 Windows,请参阅[Windows](#windows) -- 如果`build/windows/icon.ico`不存在,它将从`build/appicon.png`图像创建它。 - -##### Windows - -- 如果`build/windows/icon.ico`不存在,它将从`build/appicon.png`创建 256、128、64、48、32 和 16 大小的图标。 这是使用[winicon](https://github.com/leaanthony/winicon)完成的。 -- 如果`build/windows/.manifest`文件不存在,它会从默认版本创建它。 -- 将应用程序编译为生产版本(如上所述)。 -- 使用[winres](https://github.com/tc-hib/winres)将 icon 和 manifest 打包到一个`.syso`文件。 - -#### 手动步骤 - -- 使用[winicon](https://github.com/leaanthony/winicon)命令行工具或者其他工具创建`icon.ico` -- 为您的应用程序创建或者更新`.manifest`文件 -- 使用[winres 命令行](https://github.com/tc-hib/go-winres)生成一个`.syso`文件 - -### 编译应用程序 - -#### Wails 命令行 - -- 如果提供了`-clean`标志,则删除并重新创建`build`目录 -- 对于`wails dev`,使用以下默认 Go 标志:`-tags dev -gcflags "all=-N -l"` -- 对于`wails build`,使用以下默认 Go 标志:`-tags desktop,production -ldflags "-w -s"` - - 在 Windows 上, `-ldflags "-w -h -H windowsgui"` -- 使用`-tags`传递给命令行的其他`tags`被添加到默认值中 -- 使用`-ldflags`传递给命令行的其他`ldflags`将添加到默认值中 -- 传递`-o`标志 -- 指定的`-compiler`将用于 Go 编译器 - -#### 手动步骤 - -- 开发环境构建,最简单的命令是: `go build -tags dev -gcflags "all=-N -l"` -- 生产环境构建,最简单的命令是:`go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- 确保在与`.syso`文件相同的目录中进行编译 - -### 压缩应用程序 - -#### Wails 命令行 - -- 如果已给出`-upx`标志,则`upx`程序将运行以使用默认设置压缩应用程序 -- 如果也传递了`-upxflags`标志,则使用这些标志而不是默认 - -#### 手动步骤 - -- 手动运行`upx [flags]`以压缩应用程序。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx deleted file mode 100644 index 426c6cba6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/migrating.mdx +++ /dev/null @@ -1,205 +0,0 @@ -# 从 v1 迁移 - -## 概述 - -Wails v2 与 v1 相比有重大变化。 本文档旨在重点介绍迁移现有项目的更改和步骤。 - -### 创建应用程序 - -在 v1 中,使用`wails.CreateApp`来创建主应用程序,使用`app.Bind`来添加绑定,然后使用`app.Run()`运行应用程序。 - -示例: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -在 v2 中,只有一个方法`wails.Run()`接受[应用程序参数选项](../reference/options#应用程序参数选项)。 - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### 绑定 - -在 v1 中,可以绑定任意函数和结构。 在 v2 中,这已被简化为仅绑定结构。 以前传递给 v1`Bind()`中的方法的结构实例现在在[应用程序参数选项](../reference/options#应用程序参数选项)`Bind`字段中指定: - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -在 v1 中,绑定方法在`window.backend`中。 这已更改为`window.go`。 - -### 应用程序生命周期 - -In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options): - -- [应用启动回调](../reference/options.mdx#onstartup) -- [应用退出回调](../reference/options.mdx#onshutdown) -- [前端 Dom 加载完成回调](../reference/options.mdx#ondomready) - -注意:[前端 Dom 加载完成回调](../reference/options#前端-dom-加载完成回调)替换了 v1 中的 `wails:ready` 系统事件。 - -这些方法可以是标准函数,但通常的做法是将它们作为结构的一部分: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### 运行时 - -v2 中的运行时比 v1 丰富得多,支持菜单、窗口操作和更好的对话框。 方法的签名略有变化 - 请参阅[运行时](../reference/runtime/intro)。 - -在 v1 中,[运行时](../reference/runtime/intro)可通过传递给`WailsInit()`. 在 v2 中,运行时已移出到它自己的包。 In v2, the runtime has been moved out to its own package. 运行时中的每个方法都采用`context.Context`传递给了[应用启动回调](../reference/options#应用启动回调)方法。 - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} -} -} - -``` - -### 资源 - -在 v2 最大的变化是资源的处理方式。 - -在 v1 中,资源通过 2 个应用程序参数选项传递: - -- `JS` - 应用程序的 Javascript -- `CSS` - 应用程序的 CSS - -这意味着生成单个 JS 和 CSS 文件的责任在于开发人员。 这本质上需要使用繁琐的打包程序,例如 webpack。 - -在 v2 中,Wails 不对您的前端资源做任何预设,就像网络服务器一样。 您的所有应用程序资源都作为`embed.FS`. - -这意味着不需要打包您的资源、将图像编码为 Base64 或尝试使用奇葩的打包工具配置来使用自定义字体。 - -在启动时,Wails 将扫描给定的`embed.FS`的`index.html`并将其位置用作所有其他应用程序资源的根路径 - 就像网络服务器一样。 - -示例:应用程序具有以下项目布局。 所有最终资源都放在 `frontend/dist`目录中: - -```shell -. -. -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -应用程序可以通过简单地创建一个`embed.FS`来使用这些资源: - -```go title="Assets Example" -//go:embed frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -当然,如果您愿意,也可以使用打包工具。 唯一的要求是在 Wails 中使用`embed.FS`,将最终的程序资源目录传递给[应用程序参数选项](../reference/options#应用程序参数选项)的`Assets`键。 - -### 项目配置 - -在 v1 中,项目配置存储在项目根的 `project.json` 文件中。 在 v2 中,项目配置存储在项目根部的 `wails.json` 文件中。 - -文件的格式略有不同。 下面是区别: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. 这只需要一些更重要的资源配置。 | - -

diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx deleted file mode 100644 index dcb5b582d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# 鼠标按钮 - -The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: - -```javascript -window.addEventListener('mousedown', handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -Reference: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx deleted file mode 100644 index 4262f1f84..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 滚动超出 - -[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) 是当您滚动超出页面内容边界时有时会获得的“弹跳效果”。 这在移动应用程序中很常见。 这可以使用 CSS 禁用: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx deleted file mode 100644 index 910290a98..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/routing.mdx +++ /dev/null @@ -1,49 +0,0 @@ -# 路由 - -路由是一种在应用程序中切换视图的流行方式。 此页面提供了有关如何执行此操作的一些指导。 - -## Vue - -在 Vue 中推荐的路由方法是[Hash 模式](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from "vue-router"; - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - // .... - ], -}); - ], -}); -``` - -## Angular - -在 Angular 中推荐的路由方法是[HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies/#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx deleted file mode 100644 index 94a7614fb..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/signing.mdx +++ /dev/null @@ -1,575 +0,0 @@ -# 代码签名 - -This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions. - -## Windows - -First off you need a code signing certificate. First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine. First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine. - -It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. - -First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: Here is a small workflow template: Here is a small workflow template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* - name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -You should now have your .txt file with the base64 encoded certificate. It should start with _-----BEGIN CERTIFICATE-----_ and end with _-----END CERTIFICATE-----_. Now you need to make two action secrets on GitHub. Navigate to _Settings -> Secrets -> Actions_ and create the two following secrets: - -- **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text. -- **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password. - -Now we're ready to implement the signing in our workflow using one of the two methods: - -### Method 1: signing with commands - -This method uses PowerShell commands to sign our app, and leaves you control over the entire signing process. - -After the `"Build Wails app"` step, we can add the following step to our workflow: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line: - -- **signing algorithm**: usually sha256. -- **timestamping server**: URL to the timestamping server to use with your certificate. -- **path to binary**: path to the binary you want to sign. - -Given that our Wails config has `outputfilename` set to "app.exe" and that we have a certificate from SSL.com, this would be our workflow: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - - name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### Method 2: automatically signing with Action - -It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). - ---- - -## MacOS - -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: - -```bash -base64 Certificates.p12 | pbcopy -``` - -Now you're ready to create some GitHub project secrets, just as with Windows: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** with the contents of your newly copied base64 certificate. -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password. -- **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage). - -Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: Here is a small template: Here is a small template: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide. - -After the `Build Wails app` step, add the following to the workflow: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source" : ["./build/bin/app.app"], - "bundle_id" : "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign" :{ - "application_identity" : "Developer ID Application: My Name" - } - } -``` - -Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [ windows-latest, macos-latest ] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). - -Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: Here's an example `Info.plist` file: Here's an example `Info.plist` file: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -Now we're ready to add the signing step in our workflow after building the Wails app: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -Please note that signing binaries with Apple could take anywhere from minutes to hours. - -## Combined workflow file: - -Here is our GitHub workflow file with Windows + macOS combined: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -# End notes - -This guide inspired by the RiftShare project and its workflow, which is highly recommended to check out [here](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml). diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx deleted file mode 100644 index 5dba260b8..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/templates.mdx +++ /dev/null @@ -1,102 +0,0 @@ -# 模板 - -Wails 从预先创建的模板生成项目。 在 v1 中,这是一组难以维护的项目,这些项目可能会过时。 在 v2 中,为了增强社区的能力,为模板添加了一些新功能: - -- 能够从[远程模板](../reference/cli#远程模板)生成项目 -- 帮助创建自己的模板的工具 - -## 创建模板 - -要创建模板,您可以使用`wails generate template`命令。 要生成默认模板,请运行: - -`wails generate template -name mytemplate` - -这将使用默认文件创建“mytemplate”目录: - -```shell title=mytemplate/ -. -. -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### 模板概述 - -默认模板包含以下文件和目录: - -| 文件名 / 目录 | 描述 | -| --------------- | ----------------- | -| NEXTSTEPS.md | 有关如何完成模板的说明 | -| README.md | 随模板发布的 README | -| app.tmpl.go | `app.go` 模板文件 | -| frontend/ | 包含前端资源的目录 | -| go.mod.tmpl | `go.mod` 模板文件 | -| main.tmpl.go | `main.go` 模板文件 | -| template.json | 模板元数据 | -| wails.tmpl.json | `wails.json` 模板文件 | - -此时,建议按照`NEXTSTEPS.md`中的步骤操作。 - -## 从现有项目创建模板 - -通过在生成模板时将路径传递给项目,可以从现有的前端项目创建模板。 我们现在将介绍如何创建 Vue 3 模板: - -- 安装 vue cli: `npm install -g @vue/cli` -- 创建默认项目:`vue create vue3-base` - - 选择 `Default (Vue 3) ([Vue 3] babel, eslint)` -- 项目生成后,运行: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- 现在可以按照`NEXTSTEPS.md`中指定的方式定制模板。 -- 一旦文件准备完毕,就可以通过运行命令来测试它:`wails init -n my-vue3-project -t .\wails-vue3-template\` -- 要测试新项目,请运行:`cd my-vue3-project` then `wails build` -- 项目编译完成后,运行它:`.\build\bin\my-vue3-project.exe` -- 您应该有了一个功能齐全的 Vue3 应用程序: - -
- -
- -## 发布模板 - -发布模板只是将文件推送到 GitHub。 鼓励以下最佳实践: - -- 从前端目录中删除任何不需要的文件和目录(例如:.git) -- 确保`template.json`完整,尤其是`helpurl` -- 将文件推送到 GitHub -- 在[社区模板](../community/templates)页面上创建 PR -- 在[模板公告](https://github.com/wailsapp/wails/discussions/825)讨论板上发布模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx deleted file mode 100644 index bf338f32f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/troubleshooting.mdx +++ /dev/null @@ -1,142 +0,0 @@ -# Troubleshooting - -An assortment of troubleshooting tips. - -## The `wails` command appears to be missing? - -If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. - -## My application is displaying a white/blank screen - -检查您的应用程序是否在正确目录中包含资源。 Check that your application includes the assets from the correct directory. In your `main.go` file, you will have something similar to the following code: - -```go -//go:embed frontend/dist -var assets embed.FS -``` - -Check that `frontend/dist` contains your application assets. - -### Mac - -If this happens on Mac, try adding the following to your `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac application not valid - -If your built application looks like this in finder: - -

- -

- -It's likely that your application's `info.plist` is invalid. Update the file in `build/.app/Contents/info.plist` and check if the data is valid, EG check the binary name is correct. To persist the changes, copy the file back to the `build/darwin` directory. - -## Cannot call backend method from frontend with variadic arguments - -If you have a backend method defined with variadic parameters, eg: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -calling this method from the frontend like this will fail: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Workaround: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -Credit: https://github.com/wailsapp/wails/issues/1186 - -## I'm having getting proxy errors when trying to install Wails - -If you are getting errors like this: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -it's probably because the official Go Proxy is being blocked (Users in China have reported this). The solution is to set up the proxy manually, eg: 解决方案是手动设置代理,例如: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -Source: https://github.com/wailsapp/wails/issues/1233 - -## The generated Typescript doesn't have the correct types - -Sometimes the generated Typescript doesn't have the correct types. Sometimes the generated Typescript doesn't have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types). - -## When I navigate away from `index.html`, I am unable to call methods on the frontend - -If you navigate away from `index.html` to a new html file, the context will be lost. If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to: - -```html - - - - -``` - -Source: https://github.com/wailsapp/wails/discussions/1512 - -## I get `too many open files` errors on my Mac when I run `wails dev` - -By default, macOS will only allow you to open a maximum of 256 files. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. This can affect the `wails dev` command. This limit can be increased by running: `ulimit -n 1024` in the terminal. - -FSNotify is [looking to move to Apple's fsevents](https://github.com/fsnotify/fsnotify/issues/11) for Mac. If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). If this isn't completed soon, we will create our own implementation, tracked [here](https://github.com/wailsapp/wails/issues/1733). - -## My Mac app gives me weird compilation errors - -A few users have reported seeing compilation errors such as the following: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -This is *normally* due to a mismatch with the OS version you are running and the version of the XCode Command Line Tools installed. If you see an error like this, try upgrading your XCode Command Line Tools to the latest version. - -Source: https://github.com/wailsapp/wails/issues/1806 \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx deleted file mode 100644 index 9911a286c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/vscode.mdx +++ /dev/null @@ -1,118 +0,0 @@ - -# Visual Studio Code - -This page is for miscellaneous tips and tricks when using Visual Studio Code with Wails. - -## Vetur Configuration - -Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Many thanks to [@Lyimmi](https://github.com/Lyimmi) for this tip. Originally posted [here](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349). - -Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. Vetur is a popular plugin for Visual Studio Code that provides syntax highlighting and code completion for Vue projects. When loading a Wails project in VSCode, Vetur will throw an error as it is expecting to find the frontend project in the root directory. To fix this, you can do the following: To fix this, you can do the following: - -Create a file named `vetur.config.js` in the project's root. - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -Next, configure `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -This should enable you to now use Vetur as expected. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx deleted file mode 100644 index 5eb5b7d1f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows-installer.mdx +++ /dev/null @@ -1,56 +0,0 @@ -# NSIS 安装程序 - -

- -
-

- -Wails 支持使用[NSIS 安装程序](https://nsis.sourceforge.io/)生成 Windows 安装程序。 - -## 安装 NSIS - -### Windows - -安装程序可在[NSIS 下载页面](https://nsis.sourceforge.io/Download)上找到。 - -如果您使用 chocolatey 包管理器,请运行以下脚本: - -``` -choco install nsis -``` - -如果手动安装 NSIS,则需要将 NSIS 安装目录中包含`makensis.exe`的*Bin*目录添加到 PATH 中。 [这是](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) 一个关于如何在 Windows 上添加到 PATH 的好教程。 - -### Linux - -应该可以通过您的发行版的软件包管理器获得`nsis`包。 - -### MacOS - -NSIS 可通 homebrew 安装:`brew install nsis`。 - -## 生成安装程序 - -创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: 创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: 创建新项目时,Wails 从`installer/info.json`中读取配置数据并使用项目的`wails.json`的 Info 部分,在`build/windows/installer`中生成 NSIS 配置文件: The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section: - -```json - // ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -要为您的应用程序生成安装程序,请使用`wails build`的`-nsis`标志: - -``` -wails build -nsis -``` - -现在可用安装程序将生成在`build/bin`目录中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx deleted file mode 100644 index 93f89b44c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows 系统 - -此页面包含了在 Windows 上开发 Wails 应用程序相关的其他指南。 - -## 处理 WebView2 运行时依赖 - -为 Windows 构建 Wails 应用程序时对 Microsoft [WebView2 运行时](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)有要求。 默认情况下,Windows 11 会安装它,但有些机器不会。 Wails 提供了一种简单的方法来处理这种依赖关系。 - -通过在构建时使用`-webview2`标志,您可以决定在未检测到合适的运行时的时候(包括安装的运行时是否太旧)应用程序将执行的操作。 四个选项是: - -1. Download(下载) -2. Embed(内嵌) -3. Browser(浏览器) -4. Error(错误) - -### Download(下载) - -此选项将提示用户在未找到合适的运行时时,提供从 Microsoft 的 WebView2 官方站点下载并运行引导程序。 如果用户继续,官方引导程序将被下载并运行。 - -### Embed(内嵌) - -此选项将官方引导程序嵌入到应用程序中。 如果没有找到合适的运行时,应用程序将提供并运行引导程序。 这将使二进制大小增加约 150k。 - -### Browser(浏览器) - -此选项将提示用户没有找到合适的运行时时,提供打开浏览器到 WebView2 官方页面,可以下载和安装引导程序。 然后应用程序将会退出,安装的操作留给用户。 - -### Error(错误) - -如果未找到合适的运行时间,则会向用户显示错误并且不采取进一步措施。 - -## Fixed version runtime - -Another way of dealing with webview2 dependency is shipping it yourself. Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/ru-ru/microsoft-edge/webview2/#download-section) and bundle or download it with your application. Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) and bundle or download it with your application. - -Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails. - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime. - -## Spawning other programs - -When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window, you can use the following code: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -Solution provided by [sithembiso](https://github.com/sithembiso) on the [discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172). diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx deleted file mode 100644 index 297b4087b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/howdoesitwork.mdx +++ /dev/null @@ -1,435 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 它是如何工作的? - -Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 Javascript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 Javascript 方法,就像它们是原生 Javascript 方法一样。 - -
- -
- -## 主应用程序 - -### 概述 - -主应用程序由对`wails.Run()`的调用组成。 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 基本应用程序可能如下所示: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### 选项概要 - -此示例设置了以下选项: - -- `Title` - 应该出现在窗口标题栏中的文本 -- `Width&Height`- 窗口的尺寸 -- `Assets` - 应用程序的前端资源 -- `OnStartup` - 创建窗口并即将开始加载前端资源时的回调 -- `OnShutdown` - 应用程序即将退出时的回调 -- `Bind` - 我们希望向前端暴露的一部分结构体实例 - -完整的应用程序参数选项列表可以在[参数选项](./reference/options)中找到。 - -#### 资产 - -`Assets` 选项是必须的,因为您不能拥有没有前端资源的 Wails 应用程序。 这些资源可以是您希望在 Web 应用程序中找到的任何文件 - html、js、css、svg、png 等。 **不需要生成资源包** - 纯文件即可。 当应用程序启动时,它将尝试从您的资源中加载`index.html`,并且那时起前端基本上将作为浏览器工作。 值得注意的是`embed.FS`对文件所在的位置没有要求。 嵌入路径很可能使用了相对于您的主应用程序代码的嵌套目录,例如 `frontend/dist`: - -```go title="main.go" -//go:embed frontend/dist -var assets embed.FS -``` - -启动时,Wails 将遍历嵌入的文件,寻找包含的`index.html`。 所有其他资源将相对于该目录加载。 - -由于可用于生产的二进制文件使用包含在`embed.FS`中的文件,因此应用程序不需要附带任何外部文件。 - -当使用`wails dev`命令在“开发”模式下,资源从磁盘加载,任何更改都会导致“实时重新加载”。 资产的位置将从 `embed.FS` 推断。 - -更多细节可以在[应用程序开发指南](./guides/application-development)中找到。 - -#### 应用程序生命周期回调 - -在即将加载前端`index.html`之前,对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go 上下文被传递给这个方法。 调用运行时需要此上下文,因此标准方式是保存此时对它的引用。 在应用程序关闭之前,再次使用上下文以同样的方式调用 [应用退出回调](./reference/options#应用退出回调)。 当前端完成加载`index.html`中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 Javascript 中的`body onload`事件。 还可以通过设置 [关闭应用程序之前回调](./reference/options#关闭应用程序之前回调) 选项来控制窗口关闭(或应用程序退出)事件。 - -#### 方法绑定 - -`Bind`选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构方法。 想到传统的 web 应用程序中的 "Controllers" 。 当应用程序启动时,它会检查 `Bind` 中列出的结构实例, 确定哪些方法是公开的(以大写字母开头),并将生成前端可以调用的那些方法的 Javascript 版本。 - -:::info 注意 - -Wails 要求您传入结构的 _实例_ 才能正确绑定它 - -::: - -在此示例中,我们创建一个新`App`实例,然后将此实例添加到`wails.Run`中的`Bind`选项: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -您可以绑定任意数量的结构体。 只需确保创建它的一个实例并将其传递给 `Bind`: - -```go {8-10} - //... - //... - ... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) -... - -``` - -When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following: - -- 调用绑定的 Go 方法 -- 调用运行时方法 -- Typescript definitions for all Go structs used as inputs or outputs by the bound methods - -This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures. - -## 前端 - -### 概述 - -前端是由 webkit 渲染的文件集合。 这就像浏览器和网络服务器合二为一。 您可以使用的框架或库[^1]几乎没有限制。 前端和 Go 代码之间的主要交互点是: - -- 调用绑定的 Go 方法 -- 调用运行时方法 - -### 调用绑定的 Go 方法 - -在`wails dev`模式下运行应用程序时,会生成一个 javascript 模块,该模块用 JSDoc 注释包装这些方法。 这确实有助于开发,尤其是因为大多数 IDE 将处理 JSDoc 以提供代码完成和类型提示。 该模块名为`go` 并在`wailsjsdir`标志指定的目录中生成。 The generated files mirror the package names in your application. 在上面的例子中,我们绑定 `app`,它有一个公开方法 `Greet`。 在上面的例子中,我们绑定 `app`,它有一个公开方法 `Greet`。 This will lead to the generation of the following files: - -```bash -window.go.main.App.Greet("Bill").then((result) => { - console.log("The greeting is: " + result); - }) -``` - -Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function: 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 Javascript 函数一样调用它: - -```javascript -// ... -// ... -// ... - // ... - import {Greet} from '../wailsjs/go/main/App' - - function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }) - } -``` - -The Typescript declaration file gives you the correct types for the bound methods: - -```ts -const go = { - main: { - App: { - /** - * Greet - * @param {Person} arg1 - Go Type: string - * @returns {Promise} - Go Type: string - */ - Greet: (arg1) => { - return window.go.main.App.Greet(arg1); - }, - }, - }, -}; -export default go; -``` - -这些方法返回一个 Promise。 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 一个不成功的调用是将一个 Go 方法的第二个错误类型返回值通过`reject`传递回调用者。 这通过 `reject` 处理程序传回。 This is passed back via the `reject` handler. 在上面的例子中,Greet 只返回一个字符串,所以 `Javascript` 调用永远不会`reject` - 除非将无效数据传递给它。 - -所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 `Javascript` Map 返回到您的前端。 注意:如果您想使用结构体,您必须为您的结构体字段定义`json` 标签! - -:::info 注意 -目前不支持嵌套匿名结构体。 -::: - -也可以将结构体发送回 Go。 任何作为期望结构的参数传递的 Javascript Map 都将转换为该结构类型。 为了使这个过程更容易,在 `开发`模式下,会生成一个 TypeScript 模块,定义绑定方法中使用的所有结构类型。 使用此模块,可以构建原生 Javascript 对象并将其发送到 Go 代码。 - -还额外支持在其签名中使用结构的 Go 方法。 所有由绑定方法指定的 Go 结构体(作为参数或返回类型)都将自动生成 Typescript 版本作为 Go 代码包装器模块的一部分。 使用这些,可以在 Go 和 Javascript 之间共享相同的数据模型。 - -此外`bindings.js`,还有一个名为`models.ts`的文件. 这包含我们 Go 结构体的 TypeScript 形式: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -只要您将 TypeScript 作为前端构建配置的一部分,您就可以通过以下方式使用这些模型: - -```js title="App.js" -export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } -} -export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } -} -``` - -JSDoc 和 TypeScript 生成模型的组合构成了一个强大的开发环境。 - -```ts title="App.d.ts" -import go from "./wailsjs/go/bindings"; -import { Person } from "./wailsjs/go/models"; - -let name = ""; - -function greet(name) { - let p = new Person(); - p.name = name; - p.age = 42; - go.main.App.Greet(p).then((result) => { - console.log(result); - }); -} -``` - -As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined: 该文件包含我们绑定方法使用的所有结构定义。 在这个示例中,这是一个 `Person` 结构体。 如果我们查看 `models.ts`,我们可以看到模型是如何定义的: - -```ts title="models.ts" -export namespace main { - - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map(elem => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -可以在[运行时参考](./reference/runtime/intro)中找到有关 JS 运行时的更多详细信息。 - -```js title="mycode.js" -const go = { - main: { - App: { - /** - * Greet - * @param {Person} arg1 - Go Type: main.Person - * @returns {Promise} - Go Type: string - */ - Greet: (arg1) => { - return window.go.main.App.Greet(arg1); - }, - }, - }, -}; -export default go; -``` - -The combination of generated bindings and TypeScript models makes for a powerful development environment. - -关于绑定的更多信息可以在[应用程序开发指南](./guides/application-development)的[绑定方法](./guides/application-development#绑定方法)一节中找到。 - -### 调用运行时方法 - -Javascript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro). - -[^1]: 有一小部分库使用了 WebView 中不支持的功能。 对于这种情况,通常有替代方案和解决方法。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx deleted file mode 100644 index 8c191a7aa..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/introduction.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 - -将它看作为 Go 的快并且轻量的 Electron 替代品。 您可以使用 Go 的灵活性和强大功能,结合丰富的现代前端,轻松的构建应用程序。 - -### 功能 - -- 原生菜单、对话框、主题和半透明 -- Windows、macOS 和 linux 支持 -- 内置 Svelte、React 、Preact 、Vue、Lit 和 Vanilla JS 的模板 -- 从 Javascript 轻松调用 Go 方法 -- 自动将Go结构体转换为TypeScript模块 -- Windows 上不需要 CGO 或外部 DLL -- 使用 [Vite ](https://vite.net/) 的实时开发模式 -- 可以轻松创建、构建和打包应用的强大命令行工具 -- 丰富的 [运行时库](/docs/next/reference/runtime) -- Applications built with Wails are Apple & Microsoft Store compliant - - -这是 [varly](https://varly.app) - 一个使用 Wails 编写的 MacOS 和 Windows 桌面应用。 它不仅看起来很强,它使用原生菜单和半透明 - 你希望从现代原生应用中得到的一切 - -

- - - -

- -### 快速启动模板 - -Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 Javascript 和 Typescript 版本。 - -### 原生元素 - -Wails 使用专门构建的库来处理窗口、菜单、对话框等原生元素,因此您可以构建美观、功能丰富的桌面应用程序。 - -**它不嵌入浏览器**,因此性能高。 相反,它使用平台的原生渲染引擎。 在 Windows 上,是基于 Chromium 构建的新 Microsoft Webview2 库。 - -### Go 和 Javascript 互操作 - -Wails 自动使您的 Go 方法可用于 Javascript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 Typescript 版本,因此您可以在 Go 和 Javascript 之间传递相同的数据结构。 - -### 运行时库 - -当检测到您的应用程序资源发生更改时,您正在运行的应用程序将“重新加载”,几乎立即反馈您的更改。 - -### 实时开发体验 - -#### 自动重新构建 - -当您在“开发”模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。 它将检测您的 Go 代码的任何更改并自动重新构建和重新启动您的应用程序。 - -#### 自动重新加载 - -当检测到对您的应用程序资产的更改时,您正在运行的应用程序将“重新加载”,几乎立即反映您的更改 - -#### 在浏览器中开发您的应用程序 - -如果您更喜欢在浏览器中调试和开发,那么 Wails 可以满足您的需求。 正在运行的应用程序还有一个网络服务器,它将在连接到它的任何浏览器中运行您的应用程序。 当您的资源在磁盘上发生变化时,它会刷新。 - -### 可用于生产的原生二进制文件 - -当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。 在 Windows 和 MacOS 上,可以创建用于分发的原生包。 使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。 - -### 工具 - -Wails CLI 提供了一种简单的方法来生成、构建和打包您的应用程序。 它将完成创建图标的繁重工作,使用最佳设置编译您的应用程序,并提供可分发的、可用于生产的二进制文件。 可以从许多入门模板中进行选择,以快速启动和运行! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx deleted file mode 100644 index 41b1a9926..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/cli.mdx +++ /dev/null @@ -1,252 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 命令行 - -Wails CLI 有许多用于管理项目的命令。 所有命令都以此方式运行: - -`wails <命令> <标志>` - -## 初始化 - -`wails init` 用于生成项目。 - -| 标志 | 描述 | 默认 | -|:--------- |:---------------------------------------------- |:-------:| -| -n "项目名称" | 项目名称。 **强制必填** | | -| -d "项目目录" | 要创建的项目目录 | 项目名 | -| -g | 初始化 git 存储库 | | -| -l | 可用项目模板列表 | | -| -q | 禁止输出到控制台 | | -| -t "模板名称" | 要使用的项目模板。 这可能是默认模板的名称或在 github 上托管的远程模板的 URL 。 | vanilla | -| -ide | 生成 IDE 项目文件 | | -| -f | 强制构建应用 | 否 | - -示例: `wails init -n test -d mytestproject -g -ide vscode -q` - -这将在 "mytestproject" 目录生成一个名为 "test" 的项目,初始化 git,生成 vscode 项目文件并静默执行。 - -可以在[此处](../guides/ides)找到有关在 Wails 中使用 IDE 的更多信息。 - -### 远程模板 - -支持远程模板(托管在 GitHub 上)并且可以使用模板项目的 URL 进行安装。 - -示例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -可以在[此处](../community/templates)找到社区维护的模板列表 - -:::warning 注意 - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不信任某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - -## 构建 - -`wails build`用于将您的项目编译为生产可用的二进制文件。 - -| 标志 | 描述 | 默认 | -|:-------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |:--------------------------- | -| -platform | 为指定的[平台](../reference/cli#平台)(逗号分割)构建,例如:`windows/arm64`。 `windows/arm64`. `windows/arm64`. 注意,如果没有指定架构,则使用`runtime.GOARCH`。 `windows/arm64`. 注意,如果没有指定架构,则使用`runtime.GOARCH`。 | runtime.GOOS/runtime.GOARCH | -| -clean | 清理`build/bin`目录 | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -nopackage | 不打包应用程序 | | -| -o filename | 输出文件名 | | -| -s | 跳过前端构建 | 否 | -| -f | 强制构建应用 | 否 | -| -tags "额外标签" | 传递给编译器构建标签(引号和空格分隔) | | -| -upx | 使用“upx”压缩最终二进制文件 | | -| -upxflags | 传递给 upx 的标志 | | -| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 安装程序策略:download,embed,browser,error. | download | -| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | | -| -debug | 在应用程序中保留调试信息 在应用程序中保留调试信息 Allows the use of the devtools in the application window | 否 | -| -trimpath | Remove all file system paths from the resulting executable. | 否 | -| -race | Build with Go's race detector | 否 | -| -platform "platform" | Keep the console window for Windows builds | 否 | - -有关`webview2`标志的详细描述,请参阅[Windows 系统](../guides/windows)指南。 - -如果您更喜欢使用标准 Go 工具进行构建,请参阅[手动构建](../guides/manual-builds)指南。 - -示例: - -`wails build -clean -o myproject.exe` - -:::info 苹果芯片上的 UPX - -在苹果芯片上使用 UPX 相关的[问题](https://github.com/upx/upx/issues/446)。 - -::: - -:::info Windows 上的 UPX - -一些防病毒软件供应商误将`upx`压缩的二进制文件标记为病毒,请查看相关[问题](https://github.com/upx/upx/issues/437)。 - -::: - -### 平台 - -支持的平台有: - -| 平台 | 描述 | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## 诊断检查 - -`wails doctor` 将运行诊断程序以确保您的系统已准备好进行开发。 - -示例: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.17 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 -*docker N/A Installed 20.10.6 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.17 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 -*docker N/A Installed 20.10.6 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## 开发 - -`wails dev` 用于以 "实时开发" 模式运行您的应用。 这意味着: - -- 应用程序的`go.mod`将被更新为与 Wails CLI 版本相同的版本 -- 应用程序被编译并自动运行 -- 一个观察者被启动,如果它检测到您的 go 文件的变化,它将触发您的开发应用程序的重新构建 -- 启动一个网络服务器`http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。 这允许您使用您喜欢的浏览器开发扩展 -- 所有应用程序资源都从磁盘加载。 如果它们被更改,应用程序将自动重新加载(而不是重新构建)。 所有连接的浏览器也将重新加载 -- 生成的 JS 模块提供以下内容: - - 带有自动生成的 JSDoc 的 Go 方法的 Javascript 包装器,提供代码提示 - - 您的 Go 结构体的 TypeScript 版本,可以构造并传递给您的 Go 方法 -- 生成第二个 JS 模块,为运行时提供包装器 + TS 声明 - -| 标志 | 描述 | 默认 | -|:------------------------------ |:-------------------------------------------------------------------------------------------------------------------------------- |:------------------------ | -| -assetdir "./path/to/assets" | 编译资源的路径 | `wails.json`中的值 | -| -browser | 在启动时打开浏览器到`http://localhost:34115` | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -e | 触发重新构建的扩展(逗号分隔) | go | -| -reloaddirs | 触发重新加载的附加目录(逗号分隔) | `wails.json`中的值 | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -tags "额外标签" | 传递给编译器构建标签(引号和空格分隔) | | -| -loglevel "日志级别" | 要使用的日志级别 - Trace, Debug, Info, Warning, Error | Debug | -| -noreload | 资源更改时禁用自动重新加载 | | -| -nogen | 详细级别 (0 - silent, 1 - standard, 2 - verbose) | | -| -v | 生成生成的 Wails JS 模块的目录 | 1 | -| -wailsjsdir | 检测到资源更改后等待重新加载的时间 | `wails.json`中的值 | -| -debounce | 将 wails 开发服务器绑定到的地址 | "http://localhost:34115" | -| -frontenddevserverurl "url 地址" | 使用第三方开发服务器提供资源,比如 Vite | "localhost:34115" | -| -frontenddevserverurl "url" | 以 shell 样式传递给应用程序的参数 | "" | -| -appargs "args" | 目标平台/架构 | | -| -save | 将指定的 `assetdir`、 `reloaddirs`、 `wailsjsdir`、 `debounce` 、 `devserver` 和 `frontenddevserverurl` 标志的值保存到 `wails.json` 以成为后续调用的默认值。 | | -| -race | Build with Go's race detector | 否 | -| -s | 跳过前端构建 | 否 | - -示例: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -此命令将执行以下操作: - -- 构建应用程序并运行它(更多细节在[这里](../guides/manual-builds)) -- 在`./frontend/src`中生成 Wails JS 模块 -- 监听`./frontend/dist`中文件的更新并在更改时重新加载 -- 打开浏览器并连接到应用程序 - -[此处](../guides/application-development)提供了有关将此功能与现有框架脚本一起使用的更多信息。 - -## 生成 - -### 模板 - -Wails 使用模板来生成项目。 `wails generate template`命令有助于构建模板,以使它可以用于生成项目。 - -| 标志 | 描述 | -|:-------------- |:--------------- | -| -name | 模板名称(必填) | -| -frontend "路径" | 要在模板中使用的前端项目的路径 | - -有关创建模板的更多详细信息,请参阅[模板指南](../guides/templates)。 - -### module - -`wails update` 将更新 Wails CLI 的版本。 - -## 更新 - -`wails version` 仅输出当前的 CLI 版本。 - -| 标志 | 描述 | -|:------------- |:----------- | -| -pre | 更新到最新的预发布版本 | -| -version "版本" | 安装指定版本的 CLI | - -## 版本 - -`wails version` will simply output the current CLI version. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx deleted file mode 100644 index f486cb1e3..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/menus.mdx +++ /dev/null @@ -1,277 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 应用菜单 - -It is possible to add an application menu to Wails projects. 可以通过定义 [菜单](#菜单) 结构并设置 [`Menu`](../reference/options#菜单) 选项或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 可以通过定义 [菜单](#菜单) 结构并设置 [`Menu`](../reference/options#菜单) 选项或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 - -也可以通过更新菜单结构并调用[更新应用程序菜单](../reference/runtime/menu#更新应用程序菜单)来动态更新菜单 。 - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -```` - -It is also possible to dynamically update the menu, by updating the menu struct and calling -[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu). - -The example above uses helper methods, however it's possible to build the menu structs manually. - -type Menu struct { - Items []*MenuItem -} -``` - -示例: - -上面的示例使用快捷方法,但是可以手动构建菜单结构。 - -## Menu - -A Menu is a collection of MenuItems: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -示例: - -上面的示例使用快捷方法,但是可以手动构建菜单结构。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -这使得代码的布局更像是菜单的布局,而无需在创建菜单项后手动添加它们。 或者,您可以只创建菜单项并手动将它们添加到菜单中。 - -## 菜单 - -对于应用程序菜单,每个菜单项代表一个菜单,例如“编辑”。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| 字段 | Type | 注解 | -| ----------- | ------------------------------------ | --------------------------- | -| Label | string | 菜单文字 | -| Accelerator | [\*keys.Accelerator](#accelerator) | 此菜单项的键绑定 | -| Type | [Type](#type) | 菜单项的类型 | -| Disabled | bool | 禁用菜单项 | -| Hidden | bool | 隐藏此菜单项 | -| Checked | bool | 向菜单项设置选中 (复选框和单选类型) | -| SubMenu | [\*Menu](#menu) | 设置子菜单 | -| Click | [Callback](#callback) | 单击菜单时的回调函数 | -| Role | string | 定义此菜单项的[角色](#角色)。 暂时只支持 Mac | - -### Accelerator - -加速器(有时称为键盘快捷键)定义了按键和菜单项之间的绑定。 Wails 将加速器定义为一个组合或键 + [修饰符](#修饰符)。 它们在`"github.com/wailsapp/wails/v2/pkg/menu/keys"`包中可用。 - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -键是键盘上除了`+`的任何字符,它被定义为`加号`。 有些键不能表示为字符,因此可以使用一组命名字符: - -- `backspace` -- `tab` -- `return` -- `enter` -- `escape` -- `left` -- `right` -- `up` -- `down` -- `space` -- `delete` -- `home` -- `end` -- `page up` -- `page down` -- `f1` -- `f2` -- `f3` -- `f4` -- `f5` -- `f6` -- `f7` -- `f8` -- `f9` -- `f10` -- `f11` -- `f12` -- `f13` -- `f14` -- `f15` -- `f16` -- `f17` -- `f18` -- `f19` -- `f20` -- `f21` -- `f22` -- `f23` -- `f24` -- `f25` -- `f26` -- `f27` -- `f28` -- `f29` -- `f30` -- `f31` -- `f32` -- `f33` -- `f34` -- `f35` -- `numlock` - -Wails 还支持使用与 Electron 相同的语法来解析加速器。 这对于在配置文件中存储加速器很有用。 - -Example: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### 修饰符 - -The following modifiers are keys that may be used in combination with the accelerator key: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -A number of helper methods are available to create Accelerators using modifiers: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### Type - -以下修饰符是可以与加速键组合使用的键: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -许多快捷方法可用于使用修饰符创建加速器: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -myMenu := menu.NewMenuFromItems( - menu.SubMenu("File", menu.NewMenuFromItems( - menu.Text("&Open", keys.CmdOrCtrl("o"), openFile), - menu.Separator(), - menu.Text("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }), - )), - ) - - runtime.MenuSetApplicationMenu(myMenu) -``` - -修饰符可以结合`keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`使用: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *MenuItem -``` - -关于单选菜单组的说明:单选菜单组定义为菜单中相邻的多个单选菜单项。 这意味着您不需要将项目分组在一起,因为它是自动的。 然而,这也意味着您不能有两个相邻的单选菜单组-它们之间必须有一个非单选菜单项。 - -### Callback - -为方便起见,提供了快捷方法来快速创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -给函数一个`CallbackData`结构体,它指示哪个菜单项触发了回调。 这在使用可能共享回调的单选菜单组时很有用。 - -### Role - -每个菜单项都可能有一个回调,在单击该项时会执行该回调: - -目前仅 Mac 支持角色。 - -::: - -一个菜单项可能有一个角色,它本质上是一个预定义的菜单项。 我们目前支持以下角色: - -| Role | 描述 | -| ------------ | -------------------------------------- | -| AppMenuRole | 标准的 Mac 应用程序菜单。 可以使用`menu.AppMenu()`创建 | -| EditMenuRole | 标准的 Mac 编辑菜单。 可以使用`menu.EditMenu()`创建 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx deleted file mode 100644 index 5235e6fa0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/options.mdx +++ /dev/null @@ -1,644 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 参数选项 - -## 应用程序参数选项 - -该`Options.App`结构包含应用程序配置。 它被传递给`wails.Run()`方法: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### 标题 - -窗口标题栏中显示的文本。 - -类型:string - -### 宽度 - -窗口的初始宽度。 - -名称:Width - -### 高度 - -窗口的初始高度。 - -类型:`windows.Theme` - -### 禁用调整窗口尺寸 - -默认情况下,主窗口可调整大小。 将此设置为 `true` 将使其保持固定大小。 - -类型:int - -### Fullscreen - -将此设置为 `true` 将在启动时使窗口全屏。 - -类型:int - -### 无边框 - -设置为`true`时,窗口将没有边框或标题栏。 另请参阅[无边框窗口](../guides/frameless)。 - -类型:int - -### 最小宽度 - -这将设置窗口的最小宽度。 如果给出的值`Width`小于这个值,窗口将被设置为`MinWidth`默认值。 - -类型:bool - -### 最小高度 - -这将设置窗口的最小高度。 如果给出的值`Height`小于这个值,窗口将被设置为`MinHeight`默认值。 - -类型:bool - -### 最大宽度 - -这将设置窗口的最大宽度。 如果给出的值`Width`大于这个值,窗口将被设置为`MaxWidth`默认值。 - -类型:bool - -### 最大高度 - -这将设置窗口的最大高度。 如果给出的值`Height`大于这个值,窗口将被设置为`MaxHeight`默认值。 - -类型:bool - -### 启动时隐藏窗口 - -设置为`true`时,应用程序将被隐藏,直到调用[显示窗口](../reference/runtime/window#显示窗口)。 - -类型:int -### 关闭时隐藏窗口 - -默认情况下,关闭窗口将关闭应用程序。 将此设置为`true`意味着关闭窗口将隐藏窗口。 - -窗口在失去焦点时应保持在其他窗口之上。 - -类型:int - -### RGBA - -This value is the default background colour of the window. Default: white 类型:int (0xRRGGBBAA) 示例:0xFF000088 - 透明度为 50% 的红色 - -Type: `*options.RGBA`
Default: white - -### 窗口固定在最顶层 - -窗口在失去焦点时应保持在其他窗口之上。 - -类型:int - -### 资源 - -应用程序要使用的前端资源。 需要一个`index.html`文件。 - -名称:StartHidden - -### 菜单 - - - -注意:在 Mac 上,如果未指定菜单,则将创建默认菜单。 - -| 值 | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support. - -NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension. Vite serves the index.html on every path, that does not contain a file extension. - -类型:[AppearanceType](#外观类型) - -### 日志 - -应用程序要使用的菜单。 [菜单参考](../reference/runtime/menu)中有关菜单的更多详细信息。 - -:::note -On Mac, if no menu is specified, a default menu will be created. -::: - -This value is the default background colour of the window. Default: white Default: white - -### 日志级别 - -应用程序要使用的记录器。 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。 - -类型:bool - -### 应用启动回调 - -默认日志级别。 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。 - -名称:Assets - -### 前端 Dom 加载完成回调 - -The default log level for production builds. 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。 有关日志记录的更多详细信息,请参阅[日志参考](../reference/runtime/log)。 - -类型:logger.Logger - -### 应用退出回调 - -此回调在前端创建之后调用,但在`index.html`加载之前调用。 它提供了应用程序上下文。 - -类型:\*menu.Menu - -### 关闭应用程序之前回调 - -在前端加载完毕`index.html`及其资源后调用此回调。 它提供了应用程序上下文。 - -类型:\*menu.Menu - -### 窗口启动状态 - -在前端被销毁之后,应用程序终止之前,调用此回调。 它提供了应用程序上下文。 - -类型:\*menu.Menu - -### 绑定 - -如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 Returning true will cause the application to continue, false will continue shutdown as normal. 这有助于与用户确认他们希望退出程序。 这有助于与用户确认他们希望退出程序。 - -名称:Mac - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - 类型: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -``` - -类型:func(ctx context.Context) - -### WindowStartState - -名称:Linux - -| 值 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -默认值:在开发模式下是`Info`,在生产模式下是`Error`。 - -### CSSDragProperty - -Indicates the CSS property to use to identify which elements can be used to drag the window. Default: `--wails-draggable`. - -类型:string - -### CSSDragValue - -Indicates what value the `CSSDragProperty` style should have to drag the window. Default: `drag`. - -类型:string - -### Bind - -名称:WebviewIsTransparent - -名称:OnStartup - -### Windows - -名称:WindowIsTranslucent - -名称:LogLevel - -### Mac - -名称:DisableWindowIcon - -类型:func(ctx context.Context) - -### Linux - -名称:DisableFramelessWindowDecorations - -名称:OnShutdown - -## Windows 特定选项 - -### 禁用窗口图标 - -设置为 `true` 时将使 WebView 背景透明。 这意味着如果你使用`rgba(0,0,0,0)`,主窗口将显示。 通常与[窗口半透明](#窗口半透明)结合使用以制作冰霜效果的应用程序。 - -类型:int - -### 禁用无边框窗口装饰 - -将此设置为 `true` 将使窗口半透明。 通常与[网页透明](#网页透明) 结合使用以制作冰霜效果的应用程序。 - -类型:int - -### Webview 用户数据路径 - -这定义了应用程序应该使用的主题: - -类型:int - -### 主题 - -将此设置为`true`将移除[无边框](#无边框)模式下的窗口装饰。 这意味着将不会有`Aero 阴影` 和 `圆角`显示在窗口上。 请注意,`圆角`只在 Windows 11 上支持。 - -类型:int - -### 自定义主题 - -这定义了 WebView2 存储用户数据的路径。 如果为空将使用`%APPDATA%\[BinaryName.exe]`。 - -类型:string - -### 消息 - -This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used. If empty, webview2 installed in the system will be used. - -Important information about distribution of fixed version runtime: - -- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -类型:string - -### 标题栏 - -TitleBar 结构提供了配置标题栏外观的能力。 - -名称:Appearance - -| 值 | 描述 | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| SystemDefault | _默认_. 主题将基于系统默认值。 The theme will be based on the system default. The theme will be based on the system default. 如果用户更改了他们的主题,应用程序将更新以使用新设置 The theme will be based on the system default. 如果用户更改了他们的主题,应用程序将更新以使用新设置 The theme will be based on the system default. 如果用户更改了他们的主题,应用程序将更新以使用新设置 | -| Dark | 该应用程序将只使用深色主题 | -| Light | 从样式掩码中移除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)。 | - -类型:[\*mac.TitleBar](#标题栏结构) - -### 外观 - -类型:\*mac.Options - -类型:bool - -Appearance 用于根据 Apple 的 [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) 名称设置应用程序的样式。 - -#### 外观 - -CustomTheme 结构使用 `int32` 指定颜色值. 这些是非标准 Windows 格式: `0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。 - -名称:WindowIsTranslucent - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -名称:Mac - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -### 网页透明 - -一个如果找不到有效的 webview2 运行时,webview2 安装程序所使用的字符串结构。 - -名称:About - -您可以选择支持的任意语言定制此选项。 - -### 窗口半透明 - -ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can. The default value (0) will perform redraws as fast as it can. - -Type: \*mac.Options - -### 关于 - -您可以指定应用程序的[外观](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)。 - -类型:bool - -### OnResume - -“关于”菜单项将出现在应用程序菜单中: - -类型:bool - -## Mac 特定选项 - -### TitleBar - -The TitleBar struct provides the ability to configure the look and feel of the title bar. - -类型:bool - - -### Appearance - -Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names. - -类型:string - -### 禁用窗口图标 - -设置为 `true` 时将使 WebView 背景透明。 这意味着如果你使用`rgba(0,0,0,0)`,主窗口将显示。 通常与[窗口半透明](#窗口半透明)结合使用以制作冰霜效果的应用程序。 - -类型:int - -### 禁用无边框窗口装饰 - -将此设置为 `true` 将使窗口半透明。 通常与[网页透明](#网页透明) 结合使用以制作冰霜效果的应用程序。 - -类型:int - -### About - -This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role. - -名称:CustomTheme - - -#### 标题栏结构 - -预设的标题栏设置可用: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| 设置 | 描述 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| TitlebarAppearsTransparent | 使标题栏透明。 This has the effect of hiding the titlebar and the content fill the window. This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | 隐藏窗口的标题。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask | -| FullSizeContent | 使 webview 填满整个窗口。 [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | 向窗口添加默认工具栏。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | 删除工具栏下方的线条。 [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -Preconfigured titlebar settings are available: - -| 值 | 描述 | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -名称:Mac - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar. - -#### 外观类型 - -You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc). - -| 值 | 描述 | -| ----------------------------------------------------- | --------------- | -| DefaultAppearance | 使用默认系统值 | -| NSAppearanceNameAqua | 标准日间系统外观 | -| NSAppearanceNameDarkAqua | 标准黑夜系统外观 | -| NSAppearanceNameVibrantLight | 轻盈灵动的外观 | -| NSAppearanceNameAccessibilityHighContrastAqua | 标准白天系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | 标准黑夜系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | 轻盈灵动外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | 深色活力外观的高对比度版本 | - -名称:Mac - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### 关于结构 - -```go -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -如果提供了这些设置,“关于”菜单项将出现在应用程序菜单中(使用`AppMenu` role 时)。 建议这样配置: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -The "About" menu item will appear in the app menu: - -
- -
- -
- -When clicked, that will open an about message box: - -
- -
- -
- -## Linux 特定选项 - -### Icon - -设置代表窗口的图标。 当窗口最小化(也称为图标化)时使用此图标。 - -名称:Appearance - -一些窗口管理器或桌面环境也可能将其放置在窗口框架中,或在其他上下文中显示。 在其他情况下,根本不使用该图标,因此您的预计情况可能会有所不同。 - -注意:Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。 - -图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx deleted file mode 100644 index a491fb3d5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/project-config.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 项目配置 - -项目配置在项目目录中的`wails.json`文件中。 配置的结构是: - -```json -{ - "name": "[项目名称]", - "assetdir": "[资源目录的相对路径]", - "reloaddirs": "[触发重新加载的附加目录(逗号分隔),这仅用于一些重要资源配置]", - "frontend:install": "[安装 node 依赖的命令,在 frontend 目录下运行 - 通常是 `npm install`]", - "frontend:build": "[构建资源的命令,在 frontend 目录下运行 - 通常是 `npm run build`]", - "frontend:dev": "[此命令已被 frontend:dev:build 替代。 If frontend:dev:build is not specified will falls back to this command. If frontend:dev:build is not specified will falls back to this command. 如果没有指定 frontend:dev:build 将回退到该命令,如果此命令也没有指定将回退到 frontend:build]", - "frontend:dev:build": "[此命令等效于开发模式中的 frontend:build,如果没有指定则回退到 frontend:dev]", - "frontend:dev:install": "[此命令等效于开发模式中的 frontend:install,如果没有指定则只有 frontend:install]", - "frontend:dev:watcher": "[此命令在 `wails dev` 上的单独进程中运行。 If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. 对第 3 方观察者有用]", - "frontend:dev:serverUrl": "[使用第三方开发服务器提供资源,比如 Vite", - "wailsjsdir": "[自动生成的JS模块将被创建的目录的相对路径]", - "version": "[项目配置版本]", - "outputfilename": "[二进制文件的名称]", - "debounceMS": 100, // 在检测到资源更改时,开发服务器等待重新加载的时间 - "devServer": "[将 wails 开发服务器绑定到的地址。 默认:localhost:34115]", - "appargs": "[在dev模式下以shell样式传递给应用程序的参数]", - "runNonNativeBuildHooks": false, // 定义构建钩子是否应该运行,尽管它们是为主机操作系统以外的操作系统定义的。 - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - "postBuildHooks": { - "GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - "postBuildHooks": { - "GOOS/GOARCH": "[在构建指定的 GOOS/GOARCH 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 - ]", - "GOOS/*": "[在构建指定的 GOOS 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 'GOOS/GOARCH'钩子在'GOOS/*'和'*/*'钩子之前执行。 ]", - "GOOS/*": "[在构建指定的 GOOS 后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 'GOOS/*'钩子在'*/*'钩子之前执行。 ]", - "*/*": "[每次构建后将执行的命令:${platform} 替换为'GOOS/GOARCH',${bin} 替换为编译后的二进制文件的路径。 - ]" - }, - "info": { - // 用于填充 manifests 和 version 信息的数据。 - "companyName": "[公司名称。 默认: [项目名]]", - "productName": "[产品名称。 默认: [项目名]]", - "productVersion": "[产品的版本。 默认: '1.0.0']", - "copyright": "[产品的版权。 默认: 'Copyright.........']", - "comments": "[该应用程序的简短注释。 默认: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': 每个架构一个安装程序。 'single': 适用于所有正在构建的架构的单一通用安装程序。 默认: 'multiple']" -} -``` - -该文件将在运行`wails build`或`wails dev`时,由 Wails CLI 读取。 - -`wails build/dev`命令中的`assetdir`、`reloaddirs`、`wailsjsdir`、`debounceMS`、`devserver`和`frontenddevserverurl`标志将覆盖项目配置并作为后续运行的默认值。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx deleted file mode 100644 index 7a3679fe9..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/browser.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -sidebar_position: 7 ---- - -# 浏览器 - -这些方法与系统浏览器相关。 - -### 浏览器打开 URL - -使用系统默认浏览器打开给定的 URL。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` - diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx deleted file mode 100644 index efffe260b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/dialog.mdx +++ /dev/null @@ -1,283 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 对话框 - -运行时的这一部分提供对原生对话框的调用,例如文件选择器和消息框。 - -:::info Javascript -JS 运行时当前不支持对话框。 -::: - -### 打开选择目录对话框 - -打开一个对话框,提示用户选择目录。 可以使用 [打开选择文件对话框参数选项](#打开选择文件对话框参数选项)进行自定义。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选目录(如果用户取消则为空白)或错误 - -### 打开选择文件对话框 - -打开一个对话框,提示用户选择文件。 可以使用 [打开选择文件对话框参数选项](#打开选择文件对话框参数选项)进行自定义。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 打开选择多个文件对话框 - -打开一个对话框,提示用户选择多个文件。 可以使用 [打开选择文件对话框参数选项](#打开选择文件对话框参数选项)进行自定义。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返回值: 选定的文件(如果用户取消则为零)或错误 - -### 保存文件对话框 - -打开一个对话框,提示用户选择文件名以进行保存。 可以使用[保存文件对话框参数选项](#保存文件对话框参数选项)自定义。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 消息对话框 - -使用消息对话框显示消息。 可以使用[消息对话框参数选项](#消息对话框参数选项)进行自定义。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返回值: 所选按钮的文本或错误 - -## 参数选项 - -### 打开选择文件对话框参数选项 - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ------------------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| ResolvesAliases | 如果为 true,则返回文件而不是别名 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 保存文件对话框参数选项 - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ----------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 消息对话框参数选项 - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| ------------- | ----------------------------------- | --- | --- | --- | -| Type | 消息对话框的类型,例如问题、信息... | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| Message | 向用户显示的消息 | ✅ | ✅ | ✅ | -| Buttons | 按钮标题列表 | | ✅ | | -| DefaultButton | 带有此文本的按钮应被视为默认按钮。 Bound to `return` | | ✅ | | -| CancelButton | 带有此文本的按钮应被视为取消。 Bound to `escape` | | ✅ | | - -#### Windows - -Windows 具有标准对话框类型,其中的按钮不可自定义。 返回的值将是以下之一:"Ok"、"Cancel"、"Abort"、"Retry"、"Ignore"、"Yes"、"No"、"Try Again"或"Continue" - -#### Linux - -Linux 有标准的对话框类型,其中的按钮是不可定制的。 返回的值将是以下之一:“Ok”、“Cancel”、“Yes”、“No” - -#### Mac - -Mac 上的消息对话框最多可以指定 4 个按钮。 如果没有`DefaultButton`或`CancelButton`给出,第一个按钮被认为是默认的并绑定到`return`键。 - -对于以下代码: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -第一个按钮显示为默认值: - -
- -
- -
- -如果我们指定`DefaultButton`为“two”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -第二个按钮显示为默认值。 当 `return` 被按下时,则返回数值“two”。 - -
- -
- -
- -如果我们现在指定`CancelButton`为“three”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -带有“three”的按钮显示在对话框的底部。 当`escape`被按下时,则返回值“three”: - -
- -
- -
-
-
- -#### 对话框类型 - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### 文件过滤 - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -
- -
- -
-
-
- -#### Linux - -Linux 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -
- -
- -
-
-
- -#### Mac - -Mac 对话框只有一组模式来过滤文件的概念。 如果提供了多个 FileFilters,Wails 将使用所有定义的模式。 - -示例: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -这将导致使用`*.png,*.jpg,*.mov,*.mp4`作为过滤器打开文件对话框。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx deleted file mode 100644 index 8d21f7bee..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/events.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 事件 - -Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 Javascript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 - -### 添加事件侦听器 - -此方法为给定的事件名称设置一个侦听器。 当一个`eventName`类型的事件被[触发指定事件](#触发指定事件)时,回调被触发。 与触发事件一起发送的任何其他数据都将传递给回调。 - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### 移除事件侦听器 - -This method unregisters the listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`. - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### 添加只触发一次的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但只会触发一次。 - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### 添加指定对多触发次数的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但最多只能触发`counter`次。 - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### 触发指定事件 - -此方法触发指定的事件。 可选数据可以与事件一起传递。 这将触发任何事件侦听器。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` - diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx deleted file mode 100644 index 24f60593f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/intro.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 介绍 - -运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。 - -It has utility methods for: - -- [Window](window.mdx) -- [Menu](menu.mdx) -- [Dialog](dialog.mdx) -- [Events](events.mdx) -- [Browser](browser.mdx) -- [Log](log.mdx) - -Go 运行时可通过导入`github.com/wailsapp/wails/v2/pkg/runtime`。 此包中的所有方法都将 context 作为第一个参数。 此 context 应该从 [应用启动回调](../options.mdx#onstartup) 或 [前端 Dom 加载完成回调](../options.mdx#ondomready) 钩子获得。 - -:::info 注意 - -虽然上下文将提供给[应用启动回调](../../reference/options#应用启动回调)方法,但不能保证运行时将在此方法中工作,因为窗口正在不同的线程中初始化。 如果您希望在启动时调用运行时方法,请使用[前端 Dom 加载完成回调](../../reference/options#前端-dom-加载完成回调)方法。 - -::: - -Javascript 库可通过`window.runtime`提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 Typescript 声明。 这应该位于您的前端目录中的`wailsjs`目录中。 - -### 隐藏 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -隐藏应用程序。 - -:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. ::: - -### 环境 - -Shows the application. - -:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: :::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. ::: For Windows and Linux, this is currently the same as `WindowShow`. ::: ::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### Quit - -Quits the application. - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### Environment - -Returns details of the current environment. - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### 环境信息 - -Go: -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` -JS: -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx deleted file mode 100644 index 2b717aa52..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 日志 - -Wails 运行时提供了一种可以从 Go 或 Javascript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: - -- Trace -- Debug -- Info -- Warning -- Error -- Fatal - -记录器将输出当前或更高日志级别的任何日志消息。 示例:`Debug`日志级别将输出除`Trace`消息之外的所有消息。 - -### 打印日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### 格式化打印日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### Trace 日志 - -在`Trace`日志级别记录给定的消息。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### 格式化 Trace 日志 - -在`Trace`日志级别记录给定的消息。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### Debug 日志 - -在`Debug`日志级别记录给定的消息。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### 格式化 Debug 日志 - -在`Debug`日志级别记录给定的消息。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### 格式化 Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### Warning 日志 - -在`Warning`日志级别记录给定的消息。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### 格式化 Warning 日志 - -在`Warning`日志级别记录给定的消息。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### Error 日志 - -在`Error`日志级别记录给定的消息。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### 格式化 Error 日志 - -在`Error`日志级别记录给定的消息。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### Fatal 日志 - -在`Fatal`日志级别记录给定的消息。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### 格式化 Fatal 日志 - -在`Fatal`日志级别记录给定的消息。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### 设置日志级别 - -设置日志级别。 在 Javascript 中,该数字与以下日志级别有关: - -| 值 | 日志等级 | -| - | ------- | -| 1 | Trace | -| 2 | Debug | -| 3 | Info | -| 4 | Warning | -| 5 | Error | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## 使用自定义日志 - -可以通过使用应用程序参数选项 [日志](../../reference/options#日志) 提供自定义记录器来使用它。 唯一的要求是记录器实现了在`github.com/wailsapp/wails/v2/pkg/logger`里`logger.Logger`定义的接口: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx deleted file mode 100644 index 4ce2b368e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/menu.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 菜单 - -这些方法与应用程序菜单相关。 - -:::info Javascript - Menu is currently unsupported in the JS runtime. -::: ::: -::: ::: - -### 设置应用程序菜单 - -Sets the application menu to the given [menu](../menus.mdx). - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### 更新应用程序菜单 - -将应用程序菜单设置为给定的[应用菜单](../../reference/menus)。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx deleted file mode 100644 index e26776d0c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/reference/runtime/window.mdx +++ /dev/null @@ -1,213 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 窗口 - -这些方法可以控制应用程序窗口。 - -### 窗口标题 - -设置窗口标题栏中的文本。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### 窗口全屏 - -使窗口全屏。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### 窗口取消全屏 - -在全屏之前恢复先前的窗口尺寸和位置。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### 窗口居中 - -使窗口在当前窗口所在的监视器上居中。 - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### 窗口居中 - -使窗口在当前窗口所在的监视器上居中。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### 窗口重新加载 - -执行“重新加载”(重新加载 index.html) - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### 窗口设置系统默认主题 - -仅限 Windows。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -### 窗口设置深色主题 - -JS 方法签名: `WindowSetLightTheme()` - -JS 方法签名: `WindowSetLightTheme()` - -仅限 Windows。 - -### 显示窗口 - -JS 方法签名: `WindowSetLightTheme()` - -JS 方法签名: `WindowSetLightTheme()` - -仅限 Windows。 - -### 隐藏窗口 - -JS 方法签名: `WindowSetLightTheme()` - -隐藏窗口(如果当前可见)。 - -如果窗口当前处于隐藏状态,则显示该窗口。 - -### 设置窗口尺寸 - -隐藏窗口(如果当前可见)。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### 获取窗口尺寸 - -设置窗口的宽度和高度。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### 设置窗口最大尺寸 - -Returns true if the window not minimised, maximised or fullscreen. - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### 设置窗口最小尺寸 - -获取窗口的宽度和高度。 - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### 设置窗口最大尺寸 - -Gets the width and height of the window. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### 设置窗口位置 - -设置最小窗口大小。 如果窗口当前小于给定尺寸,将调整窗口大小。 - -Setting a size of `0,0` will disable this constraint. - -获取相对于窗口当前所在显示器的窗口位置。 - -### 获取窗口位置 - -设置最大窗口大小。 如果窗口当前大于给定尺寸,将调整窗口大小。 - -Setting a size of `0,0` will disable this constraint. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### 窗口最大化 - -获取相对于窗口当前所在显示器的窗口位置。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### 窗口取消最大化 - -最大化窗口以填满屏幕。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### 窗口最大化切换 - -将窗口恢复到最大化之前的尺寸和位置。 - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### 窗口最小化 - -在最大化和最大化之间切换。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### 窗口取消最小化 - -最小化窗口。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### 尺寸 - -Returns true if the window is maximised. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### 窗口设置 RGBA - -将窗口恢复到最小化之前的尺寸和位置。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### 位置 - -窗口 - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -### 尺寸 - -Restores the window to the dimensions and position prior to minimising. - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### WindowIsMinimised - -Returns true if the window is minimised. - -Go: `WindowIsMinimised(ctx context.Context) bool` JS: `WindowIsMinimised() bool` - -### WindowSetBackgroundColour - -将窗口的背景颜色设置为给定的 RGBA 颜色定义。 此颜色将显示所有透明像素。 - -Valid values for R, G, B and A are 0-255. - -:::info Windows -On Windows, only alpha values of 0 or 255 are supported. -任何不为 0 的值都将被视为 255。 -任何不为 0 的值都将被视为 255。 -::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript 对象定义 - -### Position - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx deleted file mode 100644 index f4845fdbe..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/dogsapi.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -sidebar_position: 20 ---- - -# Dogs API - -
- -
- -
- -:::note This tutorial has been kindly provided by [@tatadan](https://twitter.com/tatadan) and forms part of their [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples). ::: - -In this tutorial we are going to develop an application that retrieves photos of dogs from the web and then displays them. - -### Create the project - -Let's create the application. From a terminal enter: `wails init -n dogs-api -t svelte` - -Note: We could optionally add `-ide vscode` or `-ide goland` to the end of this command if you wanted to add IDE support. - -Now let's `cd dogs-api` and start editing the project files. - -### Remove unused code - -We will start by removing some elements that we know we will not use: - -- Open `app.go` and remove the following lines: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- Open `frontend/src/App.svelte` and delete all lines. -- Delete the `frontend/src/assets/images/logo-universal.png` file - -### Creating our application - -Now let's add our new Go code. - -Add the following struct declarations to `app.go` before the function definitions: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -Add the following functions to `app.go` (perhaps after the existing function definitions): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -Modify the `import` section of `app.go` to look like this: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -Add the following lines to `frontend/src/App.svelte`: - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - -### Testing the application - -To generate the bindings and test the application, run `wails dev`. - -### Compiling the application - -To compile the application to a single, production grade binary, run `wails build`. - - - - - diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx deleted file mode 100644 index 034c44fd6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/tutorials/helloworld.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 你好世界 - -本教程的目的是让你使用最基本的 软件来运行和使用Wails。 你将可以: - -- 创建一个新的Wails应用 -- 构建应用 -- 运行应用 - -:::note -本教程使用 Windows 作为目标平台。 根据您的操作系统,输出会略有不同。 -::: - -## 创建一个新Wails应用 - -使用默认的vanilla JS模板创建新的Wails程序, 您需要运行这个指令: - -```bash -wails init -n helloworld -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -这将在当前目录中创建一个名为 `helloworld` 的新目录。 在这个目录中,您会找到一些文件: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## 构建应用 - -要构建应用程序,请切换到新的 `helloword` 项目目录并运行以下命令: - -```bash -wails build -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -这有一个已经编译了的应用程序保存在 `build/bin` 目录中。 - -## 运行应用 - -如果我们在 Windows 文件管理器中查看 `build/bin` 目录,我们应该看到我们的项目二进制文件: - -
- -
- -
- -我们可以通过简单的双击 `helloworld.exe` 文件来运行它。 - -在 Mac 上,Wails 生成一个 `helloworld.app` 文件,可以通过双击来运行。 - -在 Linux 上,您可以从 `build/bin` 目录使用 `/helloword` 运行应用程序。 - -您应该看到应用程序正常工作: - -
- -
-
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/appendix/_category_.json deleted file mode 100644 index 1374f0d55..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/_category_.json deleted file mode 100644 index 9827bf0c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "社区", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx deleted file mode 100644 index b62a6f2ee..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/links.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 链接 - -此页面用于列出社区相关的链接。 请提交 PR(点击页面底部的 `编辑此页`)增加链接。 - -## Awesome Wails - -Wails 相关的 [优秀列表](https://github.com/wailsapp/awesome-wails)。 - -## 支持的频道 - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 测试版讨论板](https://github.com/wailsapp/wails/discussions/828) - -## 社交媒体 - -- [Twitter](https://twitter.com/wailsapp) -- [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号:1067173054 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx deleted file mode 100644 index 133fc48b9..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/templates.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 模板 - -此页面用作社区支持的模板列表。 请提交一个包含您的模板的 PR(点击页面底部的 `编辑此页`)。 要构建您自己的模板,请参考 [模板](../guides/templates) 指南。 - -要使用这些模板,请运行 `wails init -n "您的项目名" -t [下面的链接[@版本]]` - -如果不带版本后缀,默认使用的是主分支代码模板。 如果带有版本后缀,则使用该版本对应标签的代码模板。 - -示例:`wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning 注意 - - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vite、Vue 和 Vue-Router 的 Wails 模板(同时支持 JavaScript 和 TypeScript) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - 使用 Vite 的 Vue 3 TypeScript(以及添加功能的说明) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - 使用 Vite, Vuex, Vue Router, Sass, 和 ESLint + Prettier 的 Vue 3 TypeScript - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - 带有 TypeScript, Sass, 热重载, 代码拆分和 i18n 的 Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板 -- [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板 -- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板 - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - 基于 Svelte 的模板 -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - 使用 Svelte 和 Vite 的模板 -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - 使用 Svelte 和 Vite 和 TailwindCSS v3 的模板 -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - 基于 Next.js + TypeScript 的模板 - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - 使用函数式编程和 **快速** 的热重载设置开发您的 GUI 应用程序 :tada: :rocket: - -## Pure JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 一个只有基本 JavaScript、HTML 和 CSS 的模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/developing-new-features.mdx deleted file mode 100644 index 9fc9025bd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/developing-new-features.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 开发新功能 - -We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: The process for adding new features are as follows: - -- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. -- Before developing, check that the ticket includes the following information: -- The purpose of the enhancement -- What is out of scope for the enhancement -- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details -- Comment on the ticket stating you wish to develop the feature -- Clone the repository and create a branch with the format `feature/_` -- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes -- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/documenting.mdx deleted file mode 100644 index 84e472903..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/documenting.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 40 ---- - -# 文档 - -This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code. - -We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. - -To set up a local documentation development environment, do the following: - -- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install) -- `cd website` -- `npm install` -- `npm run start` - -After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. - -## Versioning - -We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. - -There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories. - -The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. - -## Languages - -The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. - -### Add new language - -If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/fixing-bugs.mdx deleted file mode 100644 index 01eceeccd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/fixing-bugs.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_position: 30 ---- - -# 修复漏洞 - -The process for fixing bugs are as follows: - -- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix -- Before developing, check that the ticket includes the following information: -- The scope of the issue including platforms affected -- The steps to reproduce. The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example -- The output of `wails doctor` -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. -- Comment on the ticket stating you wish to develop a fix -- Clone the repository and create a branch with the format `bugfix/_` -- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -bugfixes should be discussed as the approach may have unintended side effects. -::: ::: -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/setting-up-a-dev-environment.mdx deleted file mode 100644 index 1133e275d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/setting-up-a-dev-environment.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 设置开发环境 - -You can set up a development environment by doing the following: - -- Install the latest versions of Go and Git -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert back to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/ways-of-contributing.mdx deleted file mode 100644 index 3bbe9a889..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/contributing/ways-of-contributing.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 贡献方式 - -Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. - -There are many ways to contribute to the project: - -- Developing new features -- Fixing bugs -- Testing -- Documenting features -- Writing tutorials / guides -- Helping others on the issues + discussions boards - -Guides for these have been created in their own sections. Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx deleted file mode 100644 index 1343a8a89..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 开发您的应用程序 - -您可以通过从项目目录运行 `wails dev` 在开发模式下运行您的应用程序。 这将执行以下操作: - -- 构建您的应用程序并运行它 -- 将您的 Go 代码绑定到前端,以便可以从 Javascript 调用它 -- 使用 [Vite](https://vitejs.dev/) 的强大功能,将监视您的 Go 文件中的修改并在更改时重新构建/重新运行 -- 启动一个 [网络服务器](http://localhost:34115) 通过浏览器为您的应用程序提供服务。 这使您可以使用自己喜欢的浏览器扩展。你甚至可以从控制台调用你的 Go 代码。 您甚至可以从控制台调用 Go 代码。 - -首先,在项目目录中运行 `wails dev`。 可以在 [此处](../reference/cli#开发) 找到有关这方面的更多信息。 - -即将提供:教程 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx deleted file mode 100644 index e789438b0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 创建项目 - -## 项目生成 - -现在 CLI 已安装,您可以使用 `wails init` 命令生成一个新项目。 - -选择您最喜欢的框架: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - 使用 Javascript 生成一个 Svelte 项目:

- - wails init -n myproject -t svelte - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t svelte-ts - -
- - 使用 Javascript 生成一个 React 项目:

- - wails init -n myproject -t react - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t react-ts - -
- - 使用 Javascript 生成一个 Vue 项目:

- - wails init -n myproject -t vue - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vue-ts - -
- - 使用 Javascript 生成一个 Preact 项目:

- - wails init -n myproject -t preact - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t preact-ts - -
- - 使用 Javascript 生成一个 Lit 项目:

- - wails init -n myproject -t lit - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t lit-ts - -
- - 使用 Javascript 生成一个 Vanilla 项目:

- - wails init -n myproject -t vanilla - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -还有提供不同功能和框架的 [社区模板](../community/templates.mdx)。 - -要查看其他可用选项,您可以运行 `wails init -help`。 更多详细信息可以在 [初始化命令](../reference/cli#初始化) 中找到。 - -## 项目布局 - -Wails 项目有以下布局: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### 项目结构概要 - -- `/main.go` - 主应用 -- `/frontend/` - 前端项目文件 -- `/build/` - 项目构建目录 -- `/build/appicon.png` - 应用程序图标 -- `/build/darwin/` - Mac 特定的项目文件 -- `/build/windows/` - Windows 特定的项目文件 -- `/wails.json` - 项目配置 -- `/go.mod` - Go module 文件 -- `/go.sum` - Go module 校验文件 - -`frontend` 目录没有特定于 Wails 的内容,可以是您选择的任何前端项目。 - -`build` 目录在构建过程中使用。 这些文件可以修改以自定义您的构建。 如果从 build 目录中删除文件,将重新生成默认版本。 - -`go.mod` 中的默认模块名称是“changeme”。 您应该将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx deleted file mode 100644 index 73cd8bb61..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 安装 - -## 支持的平台 - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依赖 - -Wails 有许多安装前需要的常见依赖项: - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -从 [Go 下载页面](https://go.dev/dl/) 下载 Go。 - -确保您遵守官方的 [Go 安装说明](https://golang.org/doc/install#install)。 您还需要确保您的 `PATH` 环境变量包含您的 `~/go/bin` 目录路径。 重启终端并执行以下命令检查: - -- 检查 Go 是否安装正确: `go version` -- 检查 "~/go/bin" 是否在您的 PATH 变量中: `echo $PATH | grep go/bin` - -### NPM - -从 [Node 下载页面](https://nodejs.org/en/download/) 下载 NPM。 最好使用最新版本,因为这是我们通常会测试的版本。 - -运行 `npm --version` 进行验证。 - -## 平台特定依赖关系 - -您还需要安装平台特定的依赖项: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails 要求安装 xcode 命令行工具。 这可以通过运行 xcode-select --install 来完成。 - - - Wails 要求安装 WebView2 运行时。 一些 Windows 安装已经安装了这个。 您可以使用 wails doctor 命令进行检查。 - - - Linux 需要标准 gcc 构建工具以及 libgtk3libwebkit。 与其为不同的发行版列出大量命令,Wails 可以尝试确定针对您的特定发行版的安装命令。 安装后运行 wails doctor 以显示如何安装依赖项。 如果您的发行版/包管理器不受支持,请参阅 添加Linux发行版指南。 - - -``` - -## 可选依赖 - -- [UPX](https://upx.github.io/) 用于压缩您的应用程序。 - -## 安装 Wails - -运行 `go install github.com/wailsapp/wails/v2/cmd/wails@latest` 安装 Wails CLI。 - -## 系统检查 - -运行 `wails doctor` 将检查您是否安装了正确的依赖项。 如果没有,它会就缺少的内容提供建议以帮助纠正问题。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx deleted file mode 100644 index 2030d04f2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# 前沿风险技术 - -## 概述 - -Wails 一直在开发中,新版本会定期“标记”。 这通常发生在 `master` 分支上所有较新的代码都经过测试并确认有效时。 如果您需要尚未发布的错误修复或功能,可以通过以下步骤使用最新的“前沿风险”版本: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -注意:您将项目克隆到的目录现在将被称为“clonedir”。 - -现在,Wails CLI 将是最新版本。 - -### 更新您的项目 - -要更新项目以使用最新版本的 Wails 库,请更新项目 `go.mod` 并确保以下行位于文件底部: - -`replace github.com/wailsapp/wails/v2 => ` - -示例: - -在 Windows 上:`replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -在'nix 上:`replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -要恢复到稳定版本,请运行: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## 测试一个分支 - -如果要测试一个分支,请按照上面的说明进行操作,但请确保在安装之前切换要测试的分支: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 - -## 测试 PR - -如果您想测试 PR,请按照上面的说明进行操作,但请确保在安装前获取 PR 并切换分支。 请替换 `[IDofThePR]` 为 github.com 上显示的 PR 的 ID: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx deleted file mode 100644 index 98833d772..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,134 +0,0 @@ -# 动态资产 - -如果你想为你的前端动态加载或生成资产,你可以使用 [AssetsHandler 选项](../reference/options#资产处理程序) 来实现。 AssetsHandler 是一个通用的 `http.Handler`,对于资产服务器上的任何非 GET 请求以及由于找不到文件而无法从捆绑资产提供服务的 GET 请求,都会调用它。 - -通过安装自定义 AssetsHandler,您可以使用自定义资产服务器提供您自己的资产。 - -## 示例 - -在我们的示例项目中,我们将创建一个简单的资产处理程序,它将从磁盘加载文件: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -当我们在开发模式使用 `wails dev` 运行应用程序时,我们将看到以下输出: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -如您所见,当默认资产服务器无法提供 `favicon.ico` 文件时,将调用资产处理程序。 - -如果您右键单击主应用程序并选择“检查”以调出开发工具,您可以通过在控制台中输入以下内容来测试此功能: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -这将在 devtools 中产生错误。 我们可以看到错误是我们所期望的,由我们的自定义资产处理程序返回: - -```mdx-code-block -

- -

-``` - -但是,如果我们请求 `go.mod`,我们将看到以下输出: - -```mdx-code-block -

- -

-``` - -此技术可用于将图像直接加载到页面中。 如果我们更新了默认的 vanilla 模板并替换了 logo 图像: - -```html - -``` - -和: - -```html - -``` - -然后我们会看到以下内容: - -```mdx-code-block -

- -

-``` - -:::warning - - -以这种方式暴露您的文件系统是一种安全风险。 建议您正确管理对文件系统的访问。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx deleted file mode 100644 index cda133e4a..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/frameless.mdx +++ /dev/null @@ -1,85 +0,0 @@ -# 无边框应用 - -Wails 支持无边框应用程序。 这可以通过使用 [应用程序参数选项](../reference/options#应用程序参数选项) 中的 [无边框](../reference/options#无边框) 字段来实现。 - -Wails 为拖动窗口提供了一个简单的解决方案:任何具有 `--wails-draggable:drag` CSS 样式的 HTML 元素都将充当“拖动句柄”。 此属性适用于所有子元素。 如果您需要指示嵌套元素不应拖动,则在该元素上使用“--wails-draggable:no-drag”属性。 - -```html - - - - - - - -
- - -
-
- - - - -``` - -对于一些项目,由于动态样式,可能无法使用 CSS 变量。 在这种情况下,您可以使用 `CSSDragProperty` 和 `CSSDragValue` 应用程序选项来定义将用于指示可拖动区域的属性和值: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info 全屏 - - -如果您允许您的应用程序全屏显示,则此拖动功能将被禁用。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx deleted file mode 100644 index faf959b1c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/ides.mdx +++ /dev/null @@ -1,128 +0,0 @@ -# 集成开发环境 - -Wails 旨在提供出色的开发体验。 为此,我们现在支持生成 IDE 特定配置以提供更顺畅的项目设置。 - -目前,我们支持 [Visual Studio Code](https://code.visualstudio.com/),但我们希望尽快支持其他 IDE,例如 Goland。 - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -使用 `-ide vscode` 标志生成项目时,IDE 文件将与其他项目文件一起创建。 这些文件放置在 `.vscode` 目录中,并为调试应用程序提供正确的配置。 - -生成的 2 个文件是 `tasks.json` 和 `launch.json`。 以下是为默认 vanilla 项目生成的文件: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### 配置安装和构建步骤 - -`tasks.json` 文件对于默认项目很简单,因为不需要 `npm install` 或 `npm run build` 的步骤。 对于具有前端构建步骤的项目,例如 svelte 模板,我们需要编辑 `tasks.json` 以添加安装和构建步骤: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info 功能增强 - - -将来,我们希望生成一个 `tasks.json` 自动包含安装和构建步骤的文件。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx deleted file mode 100644 index 60a23bef5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,104 +0,0 @@ -# Linux 发行版支持 - -## 概述 - -Wails 提供 Linux 支持,但为所有可用发行版提供安装说明是一项不可能完成的任务。 相反,Wails 会尝试确定您开发应用程序所需的包是否可以通过系统的包管理器获得。 目前,我们支持以下包管理器: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## 添加包名 - -在某些情况下,您的发行版使用受支持的包管理器之一,但包名称不同。 例如,您可能使用 Ubuntu 衍生产品,但 gtk 的包名称可能不同。 Wails 尝试通过遍历包名称列表来找到正确的包。 包列表存储在 `v2/internal/system/packagemanager` 目录中的包管理器特定文件中。 在我们的示例中,是 `v2/internal/system/packagemanager/apt.go`。 - -在此文件中,包列表由以下 `Packages()` 方法定义: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -假设在我们的 linux 发行版中,`libgtk-3` 以 `lib-gtk3-dev` 的名称打包。 我们可以通过添加以下行来添加对此的支持: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## 添加新的包管理器 - -要添加新的包管理器,请执行以下步骤: - -- 在 `v2/internal/system/packagemanager` 中创建一个名为 `.go` 的新文件,其中 `` 是包管理器的名称。 -- 定义一个符合 `pm.go` 中定义的包管理器接口的结构体。 - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` 应该返回包管理器的名称 -- `Packages()` 应该返回一个 `packagemap`,它为依赖项提供候选文件名 -- `PackageInstalled()` 如果安装了指定的包,应该返回`true` -- `PackageAvailable()` 如果指定的软件包未安装但可以安装,则应返回`true` -- `InstallCommand()` 应该返回确切的命令来安装指定的包名 - -查看其他包管理器代码以了解其工作原理。 - -:::info 记住 - - -如果您添加了对新包管理器的支持,请不要忘记更新此页面! - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx deleted file mode 100644 index d7707847f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/migrating.mdx +++ /dev/null @@ -1,189 +0,0 @@ -# 从 v1 迁移 - -## 概述 - -Wails v2 与 v1 相比有重大变化。 本文档旨在重点介绍迁移现有项目的更改和步骤。 - -### 创建应用程序 - -在 v1 中,使用 `wails.CreateApp` 来创建主应用程序,使用 `app.Bind` 来添加绑定,然后使用 `app.Run()` 运行应用程序。 - -示例: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -在 v2 中,只有一个 `wails.Run()` 方法接受 [应用程序参数选项](../reference/options#应用程序参数选项)。 - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### 绑定 - -在 v1 中,可以绑定任意函数和结构。 在 v2 中,这已被简化为仅绑定结构体。 以前 v1 传递给 `Bind()` 中的方法的结构实例现在在 [应用程序参数选项 ](../reference/options#应用程序参数选项)`Bind` 字段中指定: - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -在 v1 中,绑定方法可用于前端的 `window.backend`。 这已更改为 `window.go`。 - -### 应用程序生命周期 - -在 v1 中,绑定结构中有 2 个特殊方法:`WailsInit()` 和 `WailsShutdown()`。 作为应用程序选项的一部分,这些已被 3 个生命周期钩子替换: - -- [应用启动回调](../reference/options.mdx#onstartup) -- [应用退出回调](../reference/options.mdx#onshutdown) -- [前端 Dom 加载完成回调](../reference/options.mdx#ondomready) - -注意:[ 前端 Dom 加载完成回调](../reference/options#前端-dom-加载完成回调)替换了 v1 中的 `wails:ready` 系统事件。 - -这些方法可以是标准函数,但通常的做法是让它们成为结构的一部分: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### 运行时 - -v2 中的运行时比 v1 丰富得多,支持菜单、窗口操作和更好的对话框。 方法的签名略有变化 - 请参阅 [运行时](../reference/runtime/intro)。 - -在 v1 中,[运行时](../reference/runtime/intro) 可通过传递给 `WailsInit()`。 在 v2 中,运行时已移出到它自己的包。 运行时中的每个方法都采用 `context.Context` 传递给了 [应用启动回调](../reference/options#应用启动回调)方法。 - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} -} -} - -``` - -### 资产 - -在 v2 最大的变化是资源的处理方式。 - -在 v1 中,资源通过 2 个应用程序参数选项传递: - -- `JS` - 应用程序的 Javascript -- `CSS` - 应用程序的 CSS - -这意味着生成单个 JS 和 CSS 文件的责任在于开发人员。 这本质上需要使用繁琐的打包程序,例如 webpack。 - -在 v2 中,Wails 不对您的前端资源做任何预设,就像网络服务器一样。 您的所有应用程序资源都作为 `embed.FS`。 - -**这意味着不需要捆绑您的资产、将图像编码为 Base64 或尝试使用捆绑器配置的黑暗艺术来使用自定义字体**。 - -在启动时,Wails 将扫描给定的`embed.FS`的`index.html`并将其位置用作所有其他应用程序资源的根路径 - 就像网络服务器一样。 - -示例:应用程序具有以下项目布局。 所有最终资源都放在 `frontend/dist`目录中: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -应用程序可以通过简单地创建一个 `embed.FS` 来使用这些资源: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -当然,如果您愿意,也可以使用打包工具。 唯一的要求是在 Wails 中使用 `embed.FS` 将最终的程序资源目录传递给 [应用程序参数选项](../reference/options#应用程序参数选项) 的 `Assets` 键。 - -### 项目配置 - -在 v1 中,项目配置存储在项目根的 `project.json` 文件中。 在 v2 中,项目配置存储在项目根部的 `wails.json` 文件中。 - -文件的格式略有不同。 下面是区别: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. 这只需要一些更重要的资源配置。 | - -

diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx deleted file mode 100644 index aa5814f54..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/obfuscated.mdx +++ /dev/null @@ -1,42 +0,0 @@ -# 混淆构建 - -Wails 支持使用 [garble](https://github.com/burrowers/garble) 来混淆您的应用程序。 - -要生成混淆构建,您可以将 `-obfuscate` 标志与 `wails build` 命令一起使用: - -```bash -wails build -obfuscated -``` - -要自定义混淆设置,您可以使用以下 `-garbleargs` 标志: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -这些设置可能会保留在您的 [项目配置](../reference/project-config) 中。 - -## 工作原理 - -在标准构建中,所有绑定的方法都在前端的 `window.go` 变量下可用。 调用这些方法时,会使用完全限定的函数名调用相应的后端方法。 使用混淆构建时,使用 ID 而不是绑定方法的名称。 目录中生成的绑定 `wailsjs` 使用这些 ID 调用后端函数。 - -:::note - - -为确保您的应用程序在混淆模式下工作,您必须使用 `wailsjs` 应用程序目录下生成的绑定。 - -::: - - -## 示例 - -从绑定中导入“Greet” 方法,如下所示: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -将确保该方法在混淆模式下正常工作,因为绑定将使用 ID 重新生成并更新调用机制。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx deleted file mode 100644 index aaf13ab63..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,148 +0,0 @@ -# 故障排除 - -各种故障排除技巧。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 - -## 我的应用程序正在显示白屏/空白屏幕 - -检查您的应用程序是否包含正确目录中的资产。 在您的 `main.go` 文件中,您将拥有类似于以下代码的内容: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -检查它是否 `frontend/dist` 包含您的应用程序资产。 - -### Mac - -如果在 Mac 上发生这种情况,请尝试将以下内容添加到您的 `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -参考:https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac 应用程序无效 - -如果您构建的应用程序在 finder 中如下所示: - -```mdx-code-block -

- -

-``` - -您的申请很可能 `info.plist` 是无效的。 更新 `build/.app/Contents/info.plist`文件 并检查数据是否有效,比如:检查二进制名称是否正确。 要保留更改,请将文件复制回 `build/darwin` 目录。 - -## 无法使用可变参数 - -如果您有使用可变参数定义的后端方法,例如: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -像这样从前端调用此方法将失败: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -解决方法: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -致谢:https://github.com/wailsapp/wails/issues/1186 - -## 我正在尝试安装Wails时获取代理错误 - -如果您遇到这样的错误: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -这可能是因为官方 Go Proxy 被阻止(中国用户报告了这一点)。 解决方案是手动设置代理,例如: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -来源:https://github.com/wailsapp/wails/issues/1233 - -## 没有生成正确的 Typescript 类型 - -有时生成的 Typescript 没有正确的类型。 `ts_type` 为了缓解这种情况,可以使用 struct 标签指定应该生成哪些类型。 有关详细信息,请阅读 [此](https://github.com/tkrajina/typescriptify-golang-structs#custom-types) 内容。 - -## 当我离开 `index.html`时,我无法在前端调用方法 - -如果您导航 `index.html` 到一个新的 html 文件,上下文将会丢失。 这可以通过将以下导入添加到 `` 您导航到的任何新页面的部分来解决: - -```html - - - - -``` - -来源:https://github.com/wailsapp/wails/discussions/1512 - -## 运行 `wails dev` 出现 `too many open files` 错误 - -默认情况下,macOS 最多只能打开 256 个文件。 这会影响 `wails dev` 命令 可以通过在终端中运行:`ulimit -n 1024` 来增加此限制。 - -FSNotify 正在 [寻求转移到苹果](https://github.com/fsnotify/fsnotify/issues/11)。 如果这不能很快完成,我们将创建自己的实现,在 [此处](https://github.com/wailsapp/wails/issues/1733) 跟踪。 - -## 我的 Mac 应用程序给了我奇怪的编译错误 - -一些用户报告看到编译错误,如下所示: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -这 _通常_ 是由于您正在运行的操作系统版本和安装的 XCode 命令行工具的版本不匹配。 如果您看到这样的错误,请尝试将您的 XCode 命令行工具升级到最新版本。 - -来源:https://github.com/wailsapp/wails/issues/1806 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx deleted file mode 100644 index 1e47ea8bb..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/howdoesitwork.mdx +++ /dev/null @@ -1,363 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 它是如何工作的? - -Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 Javascript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 Javascript 方法,就像它们是原生 Javascript 方法一样。 - -```mdx-code-block -
- -
-``` - -## 主应用程序 - -### 概述 - -主应用程序由对 `wails.Run()` 的调用组成。 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 基本应用程序可能如下所示: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### 选项概要 - -此示例设置了以下选项: - -- `Title` - 应该出现在窗口标题栏中的文本 -- `Width` & `Height` - 窗口的尺寸 -- `Assets` - 应用程序的前端资产 -- `OnStartup` - 创建窗口并即将开始加载前端资源时的回调 -- `OnShutdown` - 应用程序即将退出时的回调 -- `Bind` - 我们希望向前端暴露的一部分结构体实例 - -完整的应用程序参数选项列表可以在 [参数选项](./reference/options) 中找到。 - -#### 资产 - -`Assets` 选项是必须的,因为您不能拥有没有前端资产的 Wails 应用程序。 这些资产可以是您希望在 Web 应用程序中找到的任何文件 - html、js、css、svg、png 等。 **不需要生成资源包** - 普通文件即可。 当应用程序启动时,它将尝试从您的资产中加载 `index.html`,并且那时起前端基本上将作为浏览器工作。 值得注意的是 `embed.FS` 对文件所在的位置没有要求。 嵌入路径很可能使用了相对于您的主应用程序代码的嵌套目录,例如 `frontend/dist`: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -启动时,Wails 将遍历嵌入的文件,寻找包含的 `index.html`。 所有其他资源将相对于该目录加载。 - -由于可用于生产的二进制文件使用包含在 `embed.FS` 中的文件,因此应用程序不需要附带任何外部文件。 - -在开发模式下使用 `wails dev` 命令,资产从磁盘加载,任何更改都会导致“实时重新加载”。 资产的位置将从 `embed.FS` 推断。 - -更多细节可以在 [应用开发指南](./guides/application-development) 中找到。 - -#### 应用程序生命周期回调 - -在即将加载前端 `index.html` 之前,会对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go context 被传递给这个方法。 调用运行时需要此 context ,因此标准模式是在此方法中保存对它的引用。 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 当前端加载完 `index.html` 中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 Javascript 中的 [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) 事件。 还可以通过设置 [应用关闭前回调](./reference/options#应用关闭前回调) 选项来控制窗口关闭(或应用程序退出)事件。 - -#### 方法绑定 - -`Bind` 选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构体方法。 想想传统 web 应用程序中的 "Controllers" 之类的结构 。 当应用程序启动时,它会检查 `Bind` 字段中列出的结构体实例, 确定哪些方法是公开的(以大写字母开头),并生成前端可以调用的这些方法的 Javascript 版本。 - -:::info 注意 - - -Wails 要求您传入结构体的 _实例_ 以使其正确绑定 - -::: - - -在此示例中,我们创建一个新的 `App` 实例,然后将此实例添加到 `wails.Run` 中的 `Bind` 选项: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -您可以绑定任意数量的结构体。 只需确保创建它的实例并将其传递给 `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -当您运行 `wails dev`(或 `wails generate module`)时,将生成一个前端模块,其中包含以下内容: - -- 所有绑定方法的 Javascript 绑定 -- 所有绑定方法的 Typescript 声明 -- 绑定方法用作输入或输出的所有 Go 结构的 Typescript 声明 - -这使得使用相同的强类型数据结构从前端调用 Go 代码变得异常简单。 - -## 前端 - -### 概述 - -前端是由 webkit 渲染的文件集合。 这就合二为一的浏览器和网络服务器。 您可以使用的框架或库[^1]几乎没有限制。 前端和 Go 代码之间的主要交互点是: - -- 调用绑定的 Go 方法 -- 调用运行时方法 - -### 调用绑定的 Go 方法 - -当您使用 `wails dev` 运行应用程序时,它将自动在名为 `wailsjs/go` 的目录中为您的结构体生成 Javascript 绑定(您也可以通过运行 `wails generate module` 来执行此操作)。 生成的文件反映了应用程序中的包名称。 在上面的例子中,我们绑定了有公开方法 `Greet` 的 `app`。 这将导致生成以下文件: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -在这里我们可以看到有一个 `main` 包,其中包含绑定 `App` 结构体的 Javascript 绑定,以及这些方法的 Typescript 声明文件。 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 Javascript 函数一样调用它: - -```javascript -// ... -import { Greet } from "../wailsjs/go/main/App"; - -function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }); -} -``` - -Typescript 声明文件为您提供了绑定方法的正确类型: - -```ts -export function Greet(arg1: string): Promise; -``` - -生成的方法返回一个 Promise 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 不成功的调用是当 Go 方法的第二个返回值具有错误类型时,将错误实例传递回调用者。 这通过 `reject` 处理程序传回的。 在上面的示例中,`Greet` 只返回一个 `string`,因此 Javascript 调用永远不会 reject - 除非将无效数据传递给它。 - -所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 Javascript 类返回到您的前端。 注意:如果您想使用结构体,您 **必须** 为您的结构体字段定义 `json` 标签! - -:::info 注意 - - -目前不支持嵌套匿名结构体。 - -::: - - -也可以将结构体发送回 Go。 作为期望的结构体的参数传递的任何 Javascript map/class 都将转换为该结构体类型。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 使用此模块,可以构建原生 Javascript 对象并将其发送到 Go 代码。 - -还支持在其签名中使用结构的 Go 方法。 绑定方法(作为参数或返回类型)指定的所有 Go 结构体都将作为 Go 代码包装器模块的一部分自动生成 Typescript 版本。 使用这些,可以在 Go 和 Javascript 之间共享相同的数据模型。 - -示例:我们更新 `Greet` 方法以接受一个 `Person` 而不是字符串: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -`wailsjs/go/main/App.js` 文件仍将包含以下代码: - -```js title="App.js" -export function Greet(arg1) { - return window["go"]["main"]["App"]["Greet"](arg1); -} -``` - -但是 `wailsjs/go/main/App.d.ts` 文件将使用以下代码进行更新: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -正如我们所见,“main”命名空间是从一个新的“models.ts”文件中导入的。 该文件包含我们绑定方法使用的所有结构体定义。 在此示例中,这是一个 `Person` 结构。 如果我们查看 `models.ts`,我们可以看到模型是如何定义的: - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -只要您将 TypeScript 作为前端构建配置的一部分,您就可以通过以下方式使用这些模型: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -生成的绑定和 TypeScript 模型的结合构成了一个强大的开发环境。 - -有关绑定的更多信息,请参见 [应用开发指南](guides/application-development.mdx) 的 [绑定方法](guides/application-development.mdx#绑定方法) 部分。 - -### 调用运行时方法 - -Javascript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -更多关于 JS 运行时的细节可以在 [运行时参考](reference/runtime/intro) 中找到。 - -[^1]: 有一小部分库使用了 WebView 中不支持的功能。 对于这种情况,通常有替代方案和解决方法。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx deleted file mode 100644 index b4ea09b34..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 - -将它看作为 Go 的快并且轻量的 Electron 替代品。 您可以使用 Go 的灵活性和强大功能,结合丰富的现代前端,轻松的构建应用程序。 - -### 功能 - -- 原生菜单、对话框、主题和半透明 -- Windows、macOS 和 linux 支持 -- 内置 Svelte、React 、Preact 、Vue、Lit 和 Vanilla JS 的模板 -- 从 Javascript 轻松调用 Go 方法 -- 自动将Go结构体转换为TypeScript模块 -- Windows 上不需要 CGO 或外部 DLL -- 使用 [Vite ](https://vitejs.dev/) 的实时开发模式 -- 可以轻松创建、构建和打包应用的强大命令行工具 -- 丰富的 [运行时库](/docs/reference/runtime/intro) -- 使用 Wails 构建的应用程序兼容 Apple & Microsoft 商店 - -这是 [varly](https://varly.app) - 一个使用 Wails 编写的 MacOS 和 Windows 桌面应用。 它不仅看起来很强,它使用原生菜单和半透明 - 你希望从现代原生应用中得到的一切 - -```mdx-code-block -

- - - -

-``` - -### 快速启动模板 - -Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 Javascript 和 Typescript 版本。 - -### 原生元素 - -Wails 使用专门构建的库来处理窗口、菜单、对话框等原生元素,因此您可以构建美观、功能丰富的桌面应用程序。 - -**它不嵌入浏览器**,因此性能高。 相反,它使用平台的原生渲染引擎。 在 Windows 上,是基于 Chromium 构建的新 Microsoft Webview2 库。 - -### Go 和 Javascript 互操作 - -Wails 自动使您的 Go 方法可用于 Javascript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 Typescript 版本,因此您可以在 Go 和 Javascript 之间传递相同的数据结构。 - -### 运行时库 - -当检测到您的应用程序资源发生更改时,您正在运行的应用程序将“重新加载”,几乎立即反馈您的更改。 - -### 实时开发体验 - -#### 自动重新构建 - -当您在“开发”模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。 它将检测您的 Go 代码的任何更改并自动重新构建和重新启动您的应用程序。 - -#### 自动重新加载 - -当检测到对您的应用程序资产的更改时,您正在运行的应用程序将“重新加载”,几乎立即反映您的更改 - -#### 在浏览器中开发您的应用程序 - -如果您更喜欢在浏览器中调试和开发,那么 Wails 可以满足您的需求。 正在运行的应用程序还有一个网络服务器,它将在连接到它的任何浏览器中运行您的应用程序。 当您的资源在磁盘上发生变化时,它会刷新。 - -### 可用于生产的原生二进制文件 - -当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。 在 Windows 和 MacOS 上,可以创建用于分发的原生包。 使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。 - -### 工具 - -Wails CLI 提供了一种简单的方法来生成、构建和打包您的应用程序。 它将完成创建图标的繁重工作,使用最佳设置编译您的应用程序,并提供可分发的、可用于生产的二进制文件。 可以从许多入门模板中进行选择,以快速启动和运行! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx deleted file mode 100644 index 4f483e8fd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 命令行 - -Wails CLI 有许多用于管理项目的命令。 所有命令都以此方式运行: - -`wails <命令> <标志>` - -## 初始化 - -`wails init` 用于生成项目。 - -| 标志 | 描述 | 默认 | -|:--------- |:---------------------------------------------- |:-------:| -| -n "项目名称" | 项目名称。 **强制必填** | | -| -d "项目目录" | 要创建的项目目录 | 项目名 | -| -g | 初始化 git 存储库 | | -| -l | 可用项目模板列表 | | -| -q | 禁止输出到控制台 | | -| -t "模板名称" | 要使用的项目模板。 这可能是默认模板的名称或托管在 github 上的远程模板的 URL 。 | vanilla | -| -ide | 生成 IDE 项目文件 | | -| -f | 强制构建应用 | false | - -示例: `wails init -n test -d mytestproject -g -ide vscode -q` - -这将在 "mytestproject" 目录生成一个名为 "test" 的项目,初始化 git,生成 vscode 项目文件并静默执行。 - -可以在 [此处](../guides/ides) 找到有关在 Wails 中使用 IDE 的更多信息。 - -### 远程模板 - -支持远程模板(托管在 GitHub )并且可以使用模板项目的 URL 进行安装。 - -示例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -可以在 [此处](../community/templates.mdx) 找到社区维护的模板列表 - -:::warning 注意 - - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - - -## 构建 - -`wails build` 用于将您的项目编译为生产可用的二进制文件。 - -| 标志 | 描述 | 默认 | -|:--------------- |:-------------------------------------------------------------------------------------------- |:--------------------------------------------------------------------------------------------------------- | -| -platform | 为指定的 [平台](../reference/cli#平台)(逗号分割)构建,例如: `windows/arm64`。 注意,如果不给出架构,则使用 `runtime.GOARCH`。 | 如果给定环境变量 platform = `GOOS` 否则等于 `runtime.GOOS`。
如果给定环境变量 arch = `GOARCH` 否则等于 `runtime.GOARCH`. | -| -clean | 清理 `build/bin` 目录 | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -nopackage | 不打包应用程序 | | -| -o 文件名 | 输出文件名 | | -| -s | 跳过前端构建 | false | -| -f | 强制构建应用 | false | -| -tags "额外标签" | 构建标签以传递给 Go 编译器。 必须引用。 空格或逗号(但不能同时使用)分隔 | | -| -upx | 使用 “upx” 压缩最终二进制文件 | | -| -upxflags | 传递给 upx 的标志 | | -| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 安装策略:download,embed,browser,error. | download | -| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | | -| -debug | 在应用程序中保留调试信息。 允许在应用程序窗口中使用 devtools | false | -| -trimpath | 从生成的可执行文件中删除所有文件系统路径。 | false | -| -race | 使用 Go 的竞态检测器构建 | false | -| -windowsconsole | 保留Windows构建控制台窗口 | | -| -obfuscate | 使用 [garble](https://github.com/burrowers/garble) 混淆应用程序 | false | -| -garbleargs | 传递给 garble 的参数 | `-literals -tiny -seed=random` | - -有关 `webview2` 标志的详细描述,请参阅 [Windows 系统指南](../guides/windows)。 - -如果您更喜欢使用标准 Go 工具进行构建,请参阅 [手动构建指南](../guides/manual-builds)。 - -示例: - -`wails build -clean -o myproject.exe` - -:::info 苹果芯片上的 UPX - - -在苹果芯片上使用 UPX 相关的 [问题](https://github.com/upx/upx/issues/446)。 - -::: - - -:::info Windows 上的 UPX - - -一些防病毒软件供应商误将 `upx` 压缩的二进制文件标记为病毒,请查看相关 [问题](https://github.com/upx/upx/issues/437)。 - -::: - - -### 平台 - -支持的平台有: - -| 平台 | 描述 | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## 诊断检查 - -`wails doctor` 将运行诊断程序以确保您的系统已准备好进行开发。 - -示例: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## 开发 - -`wails dev` 用于以 "实时开发" 模式运行您的应用。 这意味着: - -- 应用程序的 `go.mod` 将被更新为与 Wails CLI 相同的版本 -- 应用程序被编译并自动运行 -- 一个观察者被启动,如果它检测到您的 go 文件的变化,它将触发您的开发应用程序的重新构建 -- 启动一个网络服务器 `http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。 这允许您使用您喜欢的浏览器开发扩展 -- 所有应用程序资源都从磁盘加载。 如果它们被更改,应用程序将自动重新加载(而不是重新构建)。 所有连接的浏览器也将重新加载 -- 生成的 JS 模块提供以下内容: - - 带有自动生成的 JSDoc 的 Go 方法的 Javascript 包装器,提供代码提示 - - 您的 Go 结构体的 TypeScript 版本,可以构造并传递给您的 Go 方法 -- 生成的第二个 JS 模块,为运行时提供包装器 + TS 声明 - -| 标志 | 描述 | 默认 | -|:---------------------------- |:-------------------------------------------------------------------------------------------------------------------------------- |:----------------- | -| -assetdir "./path/to/assets" | 从给定目录提供资产,而不是使用提供的资产 FS | `wails.json` 中的值 | -| -browser | 在启动时打开浏览器到 `http://localhost:34115` | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -e | 触发重新构建的扩展(逗号分隔) | go | -| -reloaddirs | 触发重新加载的附加目录(逗号分隔) | `wails.json` 中的值 | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -tags "额外标签" | 传递给编译器的构建标签(引号和空格分隔) | | -| -loglevel "日志级别" | 要使用的日志级别 - Trace, Debug, Info, Warning, Error | Debug(调试) | -| -noreload | 资产更改时禁用自动重新加载 | | -| -nogen | 禁用生成模块 | | -| -v | 详细级别 (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | 生成生成的Wails JS模块的目录 | `wails.json` 中的值 | -| -debounce | 检测到资产更改后等待重新加载的时间 | 100 (毫秒) | -| -devserver "host:port" | 将 wails 开发服务器绑定到的地址 | "localhost:34115" | -| -frontenddevserverurl "url" | 使用 3rd 方开发服务器 url 提供资产,例如:Vite | "" | -| -appargs "参数" | 以 shell 样式传递给应用程序的参数 | | -| -save | 将指定的 `assetdir`、 `reloaddirs`、 `wailsjsdir`、 `debounce` 、 `devserver` 和 `frontenddevserverurl` 标志的值保存到 `wails.json` 以成为后续调用的默认值。 | | -| -race | 使用 Go 的竞态检测器构建 | false | -| -s | 跳过前端构建 | false | - -示例: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -此命令将执行以下操作: - -- 构建应用程序并运行它(更多细节在 [这里](../guides/manual-builds)) -- 在 `./frontend/src` 中生成 Wails JS 模块 -- 监听 `./frontend/dist` 中文件的更新并在更改时重新加载 -- 打开浏览器并连接到应用程序 - -有更多关于在现有框架脚本中使用此功能的 [信息](../guides/application-development.mdx#live-reloading)。 - -## 生成 - -### 模板 - -Wails 使用模板来生成项目。 `wails generate template` 命令有助于构建模板,以使它可以用于生成项目。 - -| 标志 | 描述 | -|:-------------- |:--------------- | -| -name | 模板名称(必填) | -| -frontend "路径" | 要在模板中使用的前端项目的路径 | - -有关创建模板的更多详细信息,请参阅 [模板指南](../guides/templates)。 - -### 模块 - -`wails generate module` 命令允许您为应用程序手动生成 `wailsjs` 目录。 - -## 更新 - -`wails update` 将更新 Wails CLI 的版本。 - -| 标志 | 描述 | -|:------------- |:----------- | -| -pre | 更新到最新的预发布版本 | -| -version "版本" | 安装指定版本的 CLI | - -## 版本 - -`wails version` 仅输出当前的 CLI 版本。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx deleted file mode 100644 index 17233e8c6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/menus.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 菜单 - -可以将应用程序菜单添加到 Wails 项目。 可以通过定义一个 [菜单结构体](#菜单结构体) 并设置 [`菜单选项`](../reference/options#菜单) 或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 - -如何创建菜单的示例: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -也可以通过更新菜单结构体并调用 [更新应用程序菜单](../reference/runtime/menu#更新应用程序菜单) 来动态更新菜单 。 - -上面的示例使用辅助方法,但是可以手动构建菜单结构。 - -## 菜单结构体 - -Menu 是 MenuItem 的集合: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -对于应用程序菜单,每个 MenuItem 代表一个菜单,例如“编辑”。 - -提供了一个简单的辅助方法来构建菜单: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -这使得代码的布局更像菜单的布局,而无需在创建菜单项后手动添加它们。 或者,您可以只创建菜单项并将它们手动添加到菜单中。 - -## 菜单项结构体 - -MenuItem 表示菜单中的一个项目。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| 字段 | 类型 | 注解 | -| ----------- | ------------------------------------ | ---------------------------- | -| Label | string | 菜单文字 | -| Accelerator | [\*keys.Accelerator](#accelerator) | 此菜单项的键绑定 | -| 类型 | [类型](#type) | 菜单项的类型 | -| Disabled | bool | 禁用菜单项 | -| Hidden | bool | 隐藏此菜单项 | -| Checked | bool | 添加检查项目 (复选框和单选类型) | -| SubMenu | [\*Menu](#menu) | 设置子菜单 | -| Click | [Callback](#callback) | 单击菜单时的回调函数 | -| Role | string | 定义此菜单项的 [角色](#角色)。 暂时只支持 Mac | - -### 快捷键 - -加速器(有时称为键盘快捷键)定义了按键和菜单项之间的绑定。 Wails 将加速器定义为一个组合或键 + [修饰符](#修饰符)。 它们在 `"github.com/wailsapp/wails/v2/pkg/menu/keys"` 包中提供。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -键是键盘上除了`+`的任何字符,它被定义为`加号`。 有些键不能表示为字符,因此可以使用一组命名字符: - -| | | | | -|:-----------:|:-----:|:---------:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `page up` | | -| `page down` | `f15` | `f30` | | - -Wails 还支持使用与 Electron 相同的语法来解析加速器。 这对于将加速器存储在配置文件中很有用。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### 修饰符 - -以下修饰符是可以与加速键结合使用的键: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -许多辅助方法可用于使用修饰符创建加速器: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -可以使用 `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)` 用以下方式组合修饰符 : - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### 类型 - -每个菜单项必须有一个类型,有 5 种类型可用: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -为方便起见,提供了帮助方法来快速创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -您还可以使用“添加”助手直接在菜单上创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -关于单选组的说明:单选组被定义为在菜单中彼此相邻的多个单选菜单项。 这意味着您不需要将项目组合在一起,因为它是自动的。 但是,这也意味着您不能有 2 个彼此相邻的无线电组 - 它们之间必须有一个非无线电项目。 - -### 回调 - -每个菜单项都可能有一个回调,在单击该项时执行: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -该函数被赋予一个 `CallbackData` 结构,该结构指示哪个菜单项触发了回调。 这在使用可能共享回调的单选菜单组时很有用。这在使用可能共享回调的单选组时很有用。 - -### 角色 - -:::info 角色 - - -目前仅 Mac 支持角色。 - -::: - - -一个菜单项可能有一个角色,它本质上是一个预定义的菜单项。 我们目前支持以下角色: - -| 角色 | 描述 | -| ------------ | ---------------------------------------- | -| AppMenuRole | 标准的 Mac 应用程序菜单。 可以使用 `menu.AppMenu()` 创建 | -| EditMenuRole | 标准的 Mac 编辑菜单。 可以使用 `menu.EditMenu()` 创建 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx deleted file mode 100644 index 861606924..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/options.mdx +++ /dev/null @@ -1,682 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 参数选项 - -## 应用程序参数选项 - -该 `Options.App` 结构包含应用程序配置。 它被传递给 `wails.Run()` 方法: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### 标题 - -窗口标题栏中显示的文本。 - -名称:Title
类型:`string` - -### 宽度 - -窗口的初始宽度。 - -名称:Width
类型:`int`
默认值:1024. - -### 高度 - -窗口的初始高度。 - -名称:Height
类型:`int`
默认值:768 - -### 禁用调整窗口尺寸 - -默认情况下,主窗口可调整大小。 将此设置为 `true` 将使其保持固定大小。 - -名称:DisableResize
类型:`bool` - -### 全屏 - -将此设置为 `true` 将在启动时使窗口全屏。 - -名称:Fullscreen
类型:`bool` - -### 无边框 - -设置为`true`时,窗口将没有边框或标题栏。 另请参阅 [无边框窗口](../guides/frameless)。 - -名称:Frameless
类型:`bool` - -### 最小宽度 - -这将设置窗口的最小宽度。 如果给出的值 `Width` 小于这个值,窗口将被设置为 `MinWidth` 默认值。 - -名称:MinWidth
类型:`int` - -### 最小高度 - -这将设置窗口的最小高度。 如果给出的值 `Height` 小于这个值,窗口将被设置为 `MinHeight` 默认值。 - -名称:MinHeight
类型:`int` - -### 最大宽度 - -这将设置窗口的最大宽度。 如果给出的值 `Width` 大于这个值,窗口将被设置为 `MaxWidth` 默认值。 - -名称:MaxWidth
类型:`int` - -### 最大高度 - -这将设置窗口的最大高度。 如果给出的值 `Height` 大于这个值,窗口将被设置为 `MaxHeight` 默认值。 - -名称:MaxHeight
类型:`int` - -### 启动时隐藏窗口 - -设置为 `true` 时,应用程序将被隐藏,直到调用 [显示窗口](../reference/runtime/window#显示窗口)。 - -名称:StartHidden
类型:`bool` - -### 关闭时隐藏窗口 - -默认情况下,关闭窗口将关闭应用程序。 将此设置为 `true` 意味着关闭窗口将隐藏窗口。 - -隐藏窗口。 - -名称:HideWindowOnClose
类型:`bool` - -### 背景颜色 - -此值是窗口的默认背景颜色。 示例:options.NewRGBA(255,0,0,128) - 红色,透明度为 50% - -名称:BackgroundColour
类型:`*options.RGBA`
默认值:white - -### 窗口固定在最顶层 - -窗口在失去焦点时应保持在其他窗口之上。 - -名称:AlwaysOnTop
类型:`bool` - -### 资产 - -应用程序要使用的前端资源。 需要一个 `index.html` 文件。 - -名称:Assets
类型:`embed.FS` - -### 资产处理程序 - - - -资产处理程序是一个通用的 `http.Handler` ,对于资产服务器上的任何非 GET 请求和 `assets` 由于找不到文件而无法从 GET 请求提供服务的 GET 请求都将被调用。 - -| 值 | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -注意:Linux 当前非常有限,因为目标是 WebKit2GTK 版本 < 2.36.0。 将来,一些特性将通过引入 WebKit2GTK 2.36.0+ 支持来支持。 - -注意:当与前端 DevServer 结合使用时,可能会有一些限制,例如。 Vite 在不包含文件扩展名的每个路径上提供 index.html。 - -名称:AssetsHandler
类型:`http.Handler` - -### 菜单 - -应用程序要使用的菜单。 [菜单参考](../reference/runtime/menu) 中有关菜单的更多详细信息。 - -:::note - - -在 Mac 上,如果未指定菜单,将创建一个默认菜单。 - -::: - - -名称:Menu
类型:`*menu.Menu` - -### 日志 - -应用程序要使用的记录器。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:Logger
类型:`logger.Logger`
默认值:Logs to Stdout - -### 日志级别 - -默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevel
类型:`logger.LogLevel`
默认值:开发模式为 `Info`, 生产模式为 `Error` - -### 生产日志级别 - -生产构建的默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevelProduction
类型:`logger.LogLevel`
默认值:`Error` - -### 应用启动回调 - -此回调在前端创建之后调用,但在 `index.html` 加载之前调用。 它提供了应用程序上下文。 - -名称:OnStartup
类型:`func(ctx context.Context)` - -### 前端 Dom 加载完成回调 - -在前端加载完毕 `index.html` 及其资源后调用此回调。 它提供了应用程序上下文。 - -名称:OnDomReady
类型:`func(ctx context.Context)` - -### 应用退出回调 - -在前端被销毁之后,应用程序终止之前,调用此回调。 它提供了应用程序上下文。 - -名称:OnShutdown
类型:`func(ctx context.Context)` - -### 应用关闭前回调 - -如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 返回 true 将导致应用程序继续,false 将继续正常关闭。 这有助于与用户确认他们希望退出程序。 - -示例: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -名称:OnBeforeClose
类型:`func(ctx context.Context) bool` - -### 窗口启动状态 - -定义窗口在启动时应如何呈现。 - -| 值 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -名称:WindowStartState
类型:`options.WindowStartState` - -### CSSDragProperty - -指示用于标识哪些元素可用于拖动窗口的 CSS 属性。 默认值:`--wails-draggable` - -名称:CSSDragProperty
类型:`string` - -### CSSDragValue - -指示 `CSSDragProperty` 样式应该具有什么值才能拖动窗口。 默认值:`drag` - -名称:CSSDragValue
类型:`string` - -### 绑定 - -定义需要绑定到前端的方法的结构实例切片。 - -名称:Bind
类型:`[]interface{}` - -### Windows - -这定义了 [Windows 特定的选项](#windows)。 - -名称:Windows
类型:`*windows.Options` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与 [Webview 透明](#webview-透明) 结合使用。 - -对于 build 22621 之前的 Windows 11 版本,将使用 [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw) 方法来实现半透明,这可能会很慢。 对于构建 build 22621 之后的 Windows 11 版本,这将启用速度更快的新半透明类型。 默认情况下,使用的半透明类型将由 Windows 确定。 要对此进行配置,请使用 [背景类型](#背景类型) 选项。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 背景类型 - -:::note - - -需要 Windows 11 build 22621 或更高版本。 - -::: - - -设置窗口的半透明类型。 这仅在 [窗口半透明](#窗口半透明) 设置为 `true` 时适用。 - -名称:BackdropType
类型:`windows.BackdropType` - -值可以是以下之一: - -| 值 | 描述 | -| ------- | -------------------------------------------------------------------------------- | -| Auto | 让 Windows 决定使用哪个背景 | -| None | 不要使用半透明 | -| Acrylic | 使用 [亚克力](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) 效果 | -| Mica | 使用 [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) 效果 | -| Tabbed | 使用 Tabbed。 这是一个类似于 Mica 的背景。 | - -#### 禁用窗口图标 - -将此设置为 `true` 将删除标题栏左上角的图标。 - -名称:DisableWindowIcon
类型:`bool` - -#### 禁用无边框窗口装饰 - -将此设置为 `true` 将移除 [无边框](#无边框) 模式下的窗口装饰。 这意味着将不会有`Aero 阴影` 和 `圆角`显示在窗口上。 请注意,'圆角' 只在 Windows 11 上支持。 - -名称:DisableFramelessWindowDecorations
类型:`bool` - -#### Webview 用户数据路径 - -这定义了 WebView2 存储用户数据的路径。 如果为空将使用 `%APPDATA%\[BinaryName.exe]`。 - -名称:WebviewUserDataPath
类型:`string` - -#### Webview 浏览器路径 - -这定义了带有 WebView2 可执行文件和库的目录的路径 如果为空,则使用系统中安装的 webview2 - -有关固定版本运行时分发的重要信息: - -- [如何获取和提取运行时](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [固定版本的已知问题](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [WebView2 Runtime 固定版本的路径不应包含 \Edge\Application](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -名称:WebviewBrowserPath
类型:`string` - -#### 主题 - -最低 Windows 版本:Windows 10 2004/20H1 - -这定义了应用程序应该使用的主题: - -| 值 | 描述 | -| ------------- | -------------------------------------------- | -| SystemDefault | _默认_。 主题将基于系统默认值。 如果用户更改了他们的主题,应用程序将更新以使用新设置 | -| Dark | 该应用程序将只使用深色主题 | -| Light | 该应用程序将专门使用浅色主题 | - -名称:Theme
类型:`windows.Theme` - -#### 自定义主题 - -:::note - - -最低 Windows 版本:Windows 10/11 2009/21H2 Build 22000 - -::: - - -允许您为浅色和深色模式以及窗口处于活动或非活动状态的 TitleBar、TitleText 和 Border 指定自定义颜色。 - -名称:CustomTheme
类型:`windows.CustomTheme` - -##### 自定义主题类型 - -CustomTheme 结构体使用 `int32` 指定颜色值。 它们采用标准(!)Windows 格式:`0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。 - -注意:任何未提供的值都将默认为黑色。 - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -示例: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### 消息 - -一个如果找不到有效的 webview2 运行时,webview2 安装程序所使用的字符串结构。 - -名称:Messages
类型:`*windows.Messages` - -您可以选择支持的任意语言定制此选项。 - -#### 重置尺寸防抖间隔 - -ResizeDebounceMS 是调整窗口大小时去抖动 webview2 重绘的时间量。 默认值 (0) 将尽可能快地执行重绘。 - -名称:ResizeDebounceMS
类型:`uint16` - -#### 待机回调 - -如果设置,当 Windows 启动切换到低功耗模式(挂起/休眠)时将调用此函数 - -名称:OnSuspend
类型:`func()` - -#### 恢复回调 - -如果设置,当 Windows 从低功耗模式(挂起/休眠)恢复时将调用此函数 - -名称:OnResume
类型:`func()` - -### Mac - -这定义了 [Mac 特定的选项](#mac)。 - -名称:Mac
类型:`*mac.Options` - -#### 标题栏 - -TitleBar 结构提供了配置标题栏外观的能力。 - -名称:TitleBar
类型:[`*mac.TitleBar`](#标题栏结构体) - -##### 标题栏结构体 - -可以使用 TitleBar 选项自定义应用程序的标题栏: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| 设置 | 描述 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| TitlebarAppearsTransparent | 使标题栏透明。 这具有隐藏标题栏和内容填充窗口的效果。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | 隐藏窗口的标题。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | 从 style mask 中删除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) | -| FullSizeContent | 使 webview 填满整个窗口。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | 向窗口添加默认工具栏。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | 删除工具栏下方的线条。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -预配置的标题栏设置可用: - -| 设置 | 示例 | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -示例: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -单击 [此处](https://github.com/lukakerr/NSWindowStyles) 获取有关自定义标题栏的一些灵感。 - -#### 外观 - -Appearance 用于根据 Apple 的 [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) 名称设置您的应用程序的样式。 - -名称:Appearance
类型:[`mac.AppearanceType`](#外观类型) - -##### 外观类型 - -您可以指定应用程序的 [外观](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)。 - -| 值 | 描述 | -| ----------------------------------------------------- | --------------- | -| DefaultAppearance | 使用默认系统值 | -| NSAppearanceNameAqua | 标准日间系统外观 | -| NSAppearanceNameDarkAqua | 标准黑夜系统外观 | -| NSAppearanceNameVibrantLight | 轻盈灵动的外观 | -| NSAppearanceNameAccessibilityHighContrastAqua | 标准白天系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | 标准黑夜系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | 轻盈灵动外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | 深色活力外观的高对比度版本 | - -示例: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明-1) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与[Webview 透明](#webview-透明) 结合使用以制作冰霜效果的应用程序。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 关于 - -此配置允许您在“AppMenu”角色创建的应用程序菜单中设置“关于”菜单项的标题、消息和图标。 - -名称:About
类型:[`*mac.AboutInfo`](#关于结构体) - -##### 关于结构体 - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -如果提供了这些设置,“关于”菜单项将出现在应用程序菜单中(使用`AppMenu` role 时)。 建议这样配置: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -“关于”菜单项将出现在应用程序菜单中: - -```mdx-code-block -
- -
-
-``` - -单击后,将打开一个关于消息框: - -```mdx-code-block -
- -
-
-``` - -### Linux - -这定义了 [Linux 特定的选项](#linux)。 - -名称:Linux
类型:`*linux.Options` - -#### 图标 - -设置代表窗口的图标。 当窗口最小化(也称为图标化)时使用此图标。 - -名称:Icon
类型:`[]byte` - -一些窗口管理器或桌面环境也可能将其放置在窗口框架中,或在其他上下文中显示。 在其他情况下,根本不使用该图标,因此您的预计情况可能会有所不同。 - -注意:Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。 - -图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx deleted file mode 100644 index a21d26b5d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/project-config.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 项目配置 - -项目配置在项目目录中的 `wails.json` 文件中。 配置的结构是: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -该文件将在运行 `wails build` 或 `wails dev` 时,由 Wails CLI 读取。 - -`wails build/dev` 命令中的 `assetdir`、`reloaddirs`、`wailsjsdir`、`debounceMS`、`devserver` 和 `frontenddevserverurl` 标志将覆盖项目配置并作为后续运行的默认值。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx deleted file mode 100644 index e99d6d50d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 对话框 - -运行时的这一部分提供对原生对话框的调用,例如文件选择器和消息框。 - -:::info Javascript - - -JS 运行时当前不支持对话框。 - -::: - - -### 打开选择目录对话框 - -打开一个对话框,提示用户选择目录。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选目录(如果用户取消则为空白)或错误 - -### 打开选择文件对话框 - -打开一个对话框,提示用户选择文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 打开选择多文件对话框 - -打开一个对话框,提示用户选择多个文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返回值: 选定的文件(如果用户取消则为 nil)或错误 - -### 保存文件对话框 - -打开一个对话框,提示用户选择文件名以进行保存。 可以使用 [保存文件对话框参数选项](#保存文件对话框参数选项) 自定义。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 消息对话框 - -使用消息对话框显示消息。 可以使用 [消息对话框参数选项](#消息对话框参数选项) 进行自定义。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返回值: 所选按钮的文本或错误 - -## 参数选项 - -### 打开选择文件对话框参数选项 - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ------------------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| ResolvesAliases | 如果为 true,则返回文件而不是别名 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 保存文件对话框参数选项 - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ----------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 消息对话框参数选项 - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| ------------- | ------------------------------ | --- | --- | --- | -| 类型 | 消息对话框的类型,例如问题、信息... | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| Message | 向用户显示的消息 | ✅ | ✅ | ✅ | -| Buttons | 按钮标题列表 | | ✅ | | -| DefaultButton | 带有此文本的按钮应被视为默认按钮。 绑定到 `return` | | ✅ | | -| CancelButton | 带有此文本的按钮应被视为取消。 绑定到 `escape` | | ✅ | | - -#### Windows - -Windows 具有标准对话框类型,其中的按钮不可自定义。 返回的值将是以下之一:"Ok"、"Cancel"、"Abort"、"Retry"、"Ignore"、"Yes"、"No"、"Try Again"或"Continue" - -#### Linux - -Linux 有标准的对话框类型,其中的按钮是不可定制的。 返回的值将是以下之一:“Ok”、“Cancel”、“Yes”、“No” - -#### Mac - -Mac 上的消息对话框最多可以指定 4 个按钮。 如果没有 `DefaultButton` 或 `CancelButton` 给出,第一个按钮被认为是默认的并绑定到 `return` 键。 - -对于以下代码: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -第一个按钮显示为默认值: - -```mdx-code-block -
- -
-
-``` - -如果我们指定 `DefaultButton` 为“two”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -第二个按钮显示为默认值。 当 `return` 被按下时,则返回数值“two”。 - -```mdx-code-block -
- -
-
-``` - -如果我们现在指定`CancelButton`为“three”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -带有“three”的按钮显示在对话框的底部。 当 `escape` 被按下时,则返回值“three”: - -```mdx-code-block -
- -
-
-
-
-``` - -#### 对话框类型 - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### 文件过滤 - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac 对话框只有一组模式来过滤文件的概念。 如果提供了多个 FileFilters,Wails 将使用所有定义的模式。 - -示例: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -这将导致使用 `*.png,*.jpg,*.mov,*.mp4` 作为过滤器打开文件对话框。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx deleted file mode 100644 index 478eef71b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 事件 - -Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 Javascript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 - -### 添加事件侦听器 - -此方法为给定的事件名称设置一个侦听器。 当 [触发指定事件](#触发指定事件) 名为 `eventName` 类型的事件时,将触发回调。 与触发事件一起发送的任何其他数据都将传递给回调。 - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### 移除事件侦听器 - -此方法取消注册给定事件名称的侦听器,可选地,可以通过 `additionalEventNames` 取消注册多个侦听器。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### 添加只触发一次的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但只会触发一次。 - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### 添加指定对多触发次数的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但最多只能触发 `counter` 次。 - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### 触发指定事件 - -此方法触发指定的事件。 可选数据可以与事件一起传递。 这将触发任意事件侦听器。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx deleted file mode 100644 index 444b4195b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。 - -它具有以下实用方法: - -- [窗口](window.mdx) -- [菜单](menu.mdx) -- [对话框](dialog.mdx) -- [事件](events.mdx) -- [浏览器](browser.mdx) -- [日志](log.mdx) - -Go 运行时可通过导入 `github.com/wailsapp/wails/v2/pkg/runtime` 获取。 此包中的所有方法都将 context 作为第一个参数。 此 context 应该从 [应用启动回调](../options.mdx#onstartup) 或 [前端 Dom 加载完成回调](../options.mdx#ondomready) 回调方法中获取。 - -:::info 注意 - - -虽然上下文将提供给 [应用启动回调](../../reference/options#应用启动回调) 方法,但不能保证运行时将在此方法中工作,因为窗口正在不同的线程中初始化。 如果您希望在启动时调用运行时方法,请使用 [前端 Dom 加载完成回调](../../reference/options#前端-dom-加载完成回调) 方法。 - -::: - - -Javascript 库可通过 `window.runtime` 提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 Typescript 声明。 这应该位于您的前端目录的`wailsjs`目录中。 - -### 隐藏 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -隐藏应用程序。 - -:::info 注意 - - -` Hide` 在 Mac 上,这将以与标准 Mac 应用程序中的菜单项相同的方式隐藏应用程序。 这与隐藏窗口不同,但应用程序仍处于前台。 对于 Windows 和 Linux,这与 `WindowHide` 相同。 - -::: - - -### 显示 - -显示应用程序。 - -:::info 注意 - - -在 Mac 上,这会将应用程序带回前台。 对于 Windows 和 Linux,这目前与 `WindowShow` 相同。 - -::: - - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### 退出 - -退出应用程序。 - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### 环境 - -返回当前环境的详细信息。 - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### 环境信息 - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx deleted file mode 100644 index d88b29e5e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 日志 - -Wails 运行时提供了一种可以从 Go 或 Javascript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: - -- Trace(追踪) -- Debug(调试) -- Info(信息) -- Warning(警告) -- Error(错误) -- Fatal(致命) - -记录器将输出当前或更高日志级别的任何日志消息。 示例:`Debug`日志级别将输出除`Trace`消息之外的所有消息。 - -### Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### 格式化 Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### 格式化 Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### 格式化 Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### 格式化 Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### 格式化 Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### 格式化 Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### 格式化 Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### 设置日志级别 - -设置日志级别。 在 Javascript 中,该数字与以下日志级别有关: - -| 值 | 日志等级 | -| - | ----------- | -| 1 | Trace(追踪) | -| 2 | Debug(调试) | -| 3 | Info(信息) | -| 4 | Warning(警告) | -| 5 | Error(报错) | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## 使用自定义日志 - -可以通过使用应用程序参数选项 [日志](../../reference/options#日志) 提供自定义记录器来使用它。 唯一的要求是记录器实现在 `github.com/wailsapp/wails/v2/pkg/logger` 里 `logger.Logger` 定义的接口: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx deleted file mode 100644 index 63f8793cd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 菜单 - -这些方法与应用程序菜单相关。 - -:::info Javascript - - -JS 运行时当前不支持菜单。 - -::: - - -### 设置应用程序菜单 - -将应用程序菜单设置为给定的 [菜单](../menus.mdx)。 - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### 更新应用程序菜单 - -获取传递给 `MenuSetApplicationMenu` 的菜单的任意更改更新应用程序菜单。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx deleted file mode 100644 index 78952445b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/window.mdx +++ /dev/null @@ -1,215 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 窗口 - -这些方法可以控制应用程序窗口。 - -### 窗口标题 - -设置窗口标题栏中的文本。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### 窗口全屏 - -使窗口全屏。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### 窗口取消全屏 - -恢复全屏之前的先前窗口尺寸和位置。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### 窗口是否全屏 - -如果窗口是全屏的,则返回 true。 - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### 窗口居中 - -使窗口在当前窗口所在的监视器上居中。 - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### 窗口重新加载 - -执行“重新加载”(重新加载当前页面)。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### 重新加载应用程序前端。 - -重新加载应用程序前端。 - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### 窗口设置系统默认主题 - -仅限 Windows。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -将窗口主题设置为系统默认值(暗/亮)。 - -### 窗口设置浅色主题 - -仅限 Windows。 - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -将窗口主题设置为浅色。 - -### 窗口设置深色主题 - -仅限 Windows。 - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -将窗口主题设置为深色。 - -### 显示窗口 - -显示窗口,如果它当前是隐藏的。 - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -### 隐藏窗口 - -如果当前可见,则隐藏窗口。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### 窗口是否为正常 - -如果窗口未最小化、最大化或全屏,则返回 true。 - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### 设置窗口尺寸 - -设置窗口的宽度和高度。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### 获取窗口尺寸 - -获取窗口的宽度和高度。 - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### 设置窗口最小尺寸 - -设置窗口最小尺寸。 如果窗口当前小于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### 设置窗口最大尺寸 - -设置窗口最大尺寸。 如果窗口当前大于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### 设置窗口置顶 - -设置窗口置顶或取消置顶。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### 设置窗口位置 - -设置相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### 获取窗口位置 - -获取相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### 窗口最大化 - -最大化窗口以填满屏幕。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### 窗口取消最大化 - -将窗口恢复到最大化之前的尺寸和位置。 - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### 窗口是否最大化 - -如果窗口最大化,则返回 true。 - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### 窗口最大化切换 - -在最大化和未最大化之间切换。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### 窗口最小化。 - -最小化窗口。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### 窗口取消最小化 - -将窗口恢复到最小化之前的尺寸和位置。 - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### 窗口是否最小化 - -如果窗口最小化,则返回 true。 - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### 窗口设置背景色 - -将窗口的背景颜色设置为给定的 RGBA 颜色定义。 这种颜色将显示所有透明像素。 - -R、G、B 和 A 的有效值为 0-255。 - -:::info Windows - - -在 Windows 上,仅支持 0 或 255 的 alpha 值。 任何非 0 的值都将被视为 255。 - -::: - - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript 对象定义 - -### Position(位置) - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size(尺寸) - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx deleted file mode 100644 index 38f5f7233..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 狗狗 API - -```mdx-code-block -
- -
-
-``` - -:::note - - -本教程由 [@tatadan](https://twitter.com/tatadan) 友情提供,是他们的 [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples) 的一部分。 - -::: - - -在本教程中,我们将开发一个应用程序,从网络上检索狗的照片,然后显示它们。 - -### 创建项目 - -让我们创建应用程序。 从终端输入:` wails init -n dogs-api -t svelte` - -注意:如果您想添加 IDE 支持,我们可以选择在此命令的末尾添加 `-ide vscode` 或 `-ide goland`。 - -现在让我们 `cd dogs-api` 开始编辑项目文件。 - -### 删除未使用的代码 - -我们将从删除一些我们知道不会使用的元素开始: - -- 打开 `app.go` 并删除以下行: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- 打开 `frontend/src/App.svelte` 并删除所有行。 -- 删除 `frontend/src/assets/images/logo-universal.png` 文件 - -### 创建应用程序 - -现在让我们添加新的 Go 代码。 - -在函数定义之前添加以下结构声明到 `app.go`: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -将以下函数添加到 `app.go`(可能在现有函数定义之后): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -将 `app.go` 的 `import` 部分修改为如下所示: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -将以下行添加到 `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - - - -### 创建应用程序 - -要生成绑定并测试应用程序,请运行 `wails dev`。 - -### 编译应用程序 - -要将应用程序编译为单个可用于生产的二进制文件,请运行 `wails build`。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx deleted file mode 100644 index 596703d1c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 你好世界 - -本教程的目的是让您使用 Wails 启动并运行最基本的应用程序。 你将可以: - -- 创建一个新的 Wails 应用 -- 构建应用 -- 运行应用 - -:::note - - -本教程使用 Windows 作为目标平台。 根据您的操作系统,输出会略有不同。 - -::: - - -## 创建一个新的 Wails 应用 - -使用默认的 vanilla JS 模板创建新的 Wails 程序, 您需要运行这个指令: - -```bash -wails init -n helloworld -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -这将在当前目录中创建一个名为 `helloworld` 的新目录。 在此目录中,您将找到许多文件: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## 构建应用 - -要构建应用程序,请切换到新的 `helloword` 项目目录并运行以下命令: - -```bash -wails build -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -这已经编译了应用程序并将其保存在 `build/bin` 目录中。 - -## 运行应用 - -如果我们在 Windows 文件管理器中查看 `build/bin` 目录,我们应该看到我们的项目二进制文件: - -```mdx-code-block -
- -
-
-``` - -我们可以通过简单的双击 `helloworld.exe` 文件来运行它。 - -在 Mac 上,Wails 生成一个 `helloworld.app` 文件,可以通过双击来运行。 - -在 Linux 上,您可以从 `build/bin` 目录使用 `./helloword` 运行应用程序。 - -您应该看到应用程序正常工作: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json deleted file mode 100644 index 1374f0d55..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json deleted file mode 100644 index 9827bf0c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "社区", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/riftshare.mdx deleted file mode 100644 index 6224bbf89..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## 功能 - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx deleted file mode 100644 index 8e9f51284..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/templates.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 模板 - -此页面用作社区支持的模板列表。 请提交一个包含您的模板的 PR(点击页面底部的 `编辑此页`)。 要构建您自己的模板,请参考 [模板](../guides/templates) 指南。 - -要使用这些模板,请运行 `wails init -n "您的项目名" -t [下面的链接[@版本]]` - -如果不带版本后缀,默认使用的是主分支代码模板。 如果带有版本后缀,则使用该版本对应标签的代码模板。 - -示例:`wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning 注意 - - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vue 生态的 Wails 模板(集成 TypeScript、黑暗主题、国际化、单页路由、TailwindCSS) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - 使用 Vite 的 Vue 3 TypeScript(以及添加功能的说明) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - 使用 Vite, Vuex, Vue Router, Sass, 和 ESLint + Prettier 的 Vue 3 TypeScript - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - 带有 TypeScript, Sass, 热重载, 代码拆分和 i18n 的 Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板 -- [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板 -- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板 -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - 一个 React + TypeScript + Vite + TailwindCSS 模板 - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - 基于 Svelte 的模板 -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - 使用 Svelte 和 Vite 的模板 -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - 使用 Svelte 和 Vite 和 TailwindCSS v3 的模板 -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - 基于 Next.js + TypeScript 的模板 - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - 使用函数式编程和 **快速** 的热重载设置开发您的 GUI 应用程序 :tada: :rocket: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - 结合 Elm + Tailwind CSS + Wails 的力量 :muscle: ! 支持热重载。 - -## 纯 JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 一个只有基本 JavaScript、HTML 和 CSS 的模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/developing-new-features.mdx deleted file mode 100644 index 9fc9025bd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/developing-new-features.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 开发新功能 - -We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: The process for adding new features are as follows: - -- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. -- Before developing, check that the ticket includes the following information: -- The purpose of the enhancement -- What is out of scope for the enhancement -- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details -- Comment on the ticket stating you wish to develop the feature -- Clone the repository and create a branch with the format `feature/_` -- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes -- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/documenting.mdx deleted file mode 100644 index 84e472903..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/documenting.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 40 ---- - -# 文档 - -This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code. - -We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. - -To set up a local documentation development environment, do the following: - -- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install) -- `cd website` -- `npm install` -- `npm run start` - -After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. - -## Versioning - -We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. - -There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories. - -The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. - -## Languages - -The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. - -### Add new language - -If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/fixing-bugs.mdx deleted file mode 100644 index 01eceeccd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/fixing-bugs.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_position: 30 ---- - -# 修复漏洞 - -The process for fixing bugs are as follows: - -- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix -- Before developing, check that the ticket includes the following information: -- The scope of the issue including platforms affected -- The steps to reproduce. The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example -- The output of `wails doctor` -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. -- Comment on the ticket stating you wish to develop a fix -- Clone the repository and create a branch with the format `bugfix/_` -- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -bugfixes should be discussed as the approach may have unintended side effects. -::: ::: -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/setting-up-a-dev-environment.mdx deleted file mode 100644 index 1133e275d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/setting-up-a-dev-environment.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 设置开发环境 - -You can set up a development environment by doing the following: - -- Install the latest versions of Go and Git -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert back to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/ways-of-contributing.mdx deleted file mode 100644 index 3bbe9a889..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/contributing/ways-of-contributing.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 贡献方式 - -Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. - -There are many ways to contribute to the project: - -- Developing new features -- Fixing bugs -- Testing -- Documenting features -- Writing tutorials / guides -- Helping others on the issues + discussions boards - -Guides for these have been created in their own sections. Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/building.mdx deleted file mode 100644 index c4fe879bc..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 编译您的项目 - -从项目目录,运行 `wails build`。 这将编译您的项目并将构建的可用于生产的二进制文件保存在 `build/bin` 目录中。 - -如果您运行二进制文件,您应该会看到默认应用程序: - -```mdx-code-block -
- -
-
-``` - -有关编译选项的更多详细信息,请参阅 [构建命令](../reference/cli#构建)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx deleted file mode 100644 index e681d5940..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 开发您的应用程序 - -您可以通过从项目目录运行 `wails dev` 在开发模式下运行您的应用程序。 这将执行以下操作: - -- 构建您的应用程序并运行它 -- 将您的 Go 代码绑定到前端,以便可以从 Javascript 调用它 -- 使用 [Vite](https://vitejs.dev/) 的强大功能,将监视您的 Go 文件中的修改并在更改时重新构建/重新运行 -- 启动一个 [网络服务器](http://localhost:34115) 通过浏览器为您的应用程序提供服务。 这使您可以使用自己喜欢的浏览器扩展。 你甚至可以从控制台调用你的 Go 代码。 - -首先,在项目目录中运行 `wails dev`。 可以在 [此处](../reference/cli#开发) 找到有关这方面的更多信息。 - -即将提供:教程 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx deleted file mode 100644 index e789438b0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 创建项目 - -## 项目生成 - -现在 CLI 已安装,您可以使用 `wails init` 命令生成一个新项目。 - -选择您最喜欢的框架: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - 使用 Javascript 生成一个 Svelte 项目:

- - wails init -n myproject -t svelte - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t svelte-ts - -
- - 使用 Javascript 生成一个 React 项目:

- - wails init -n myproject -t react - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t react-ts - -
- - 使用 Javascript 生成一个 Vue 项目:

- - wails init -n myproject -t vue - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vue-ts - -
- - 使用 Javascript 生成一个 Preact 项目:

- - wails init -n myproject -t preact - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t preact-ts - -
- - 使用 Javascript 生成一个 Lit 项目:

- - wails init -n myproject -t lit - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t lit-ts - -
- - 使用 Javascript 生成一个 Vanilla 项目:

- - wails init -n myproject -t vanilla - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -还有提供不同功能和框架的 [社区模板](../community/templates.mdx)。 - -要查看其他可用选项,您可以运行 `wails init -help`。 更多详细信息可以在 [初始化命令](../reference/cli#初始化) 中找到。 - -## 项目布局 - -Wails 项目有以下布局: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### 项目结构概要 - -- `/main.go` - 主应用 -- `/frontend/` - 前端项目文件 -- `/build/` - 项目构建目录 -- `/build/appicon.png` - 应用程序图标 -- `/build/darwin/` - Mac 特定的项目文件 -- `/build/windows/` - Windows 特定的项目文件 -- `/wails.json` - 项目配置 -- `/go.mod` - Go module 文件 -- `/go.sum` - Go module 校验文件 - -`frontend` 目录没有特定于 Wails 的内容,可以是您选择的任何前端项目。 - -`build` 目录在构建过程中使用。 这些文件可以修改以自定义您的构建。 如果从 build 目录中删除文件,将重新生成默认版本。 - -`go.mod` 中的默认模块名称是“changeme”。 您应该将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx deleted file mode 100644 index 73cd8bb61..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 安装 - -## 支持的平台 - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依赖 - -Wails 有许多安装前需要的常见依赖项: - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -从 [Go 下载页面](https://go.dev/dl/) 下载 Go。 - -确保您遵守官方的 [Go 安装说明](https://golang.org/doc/install#install)。 您还需要确保您的 `PATH` 环境变量包含您的 `~/go/bin` 目录路径。 重启终端并执行以下命令检查: - -- 检查 Go 是否安装正确: `go version` -- 检查 "~/go/bin" 是否在您的 PATH 变量中: `echo $PATH | grep go/bin` - -### NPM - -从 [Node 下载页面](https://nodejs.org/en/download/) 下载 NPM。 最好使用最新版本,因为这是我们通常会测试的版本。 - -运行 `npm --version` 进行验证。 - -## 平台特定依赖关系 - -您还需要安装平台特定的依赖项: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails 要求安装 xcode 命令行工具。 这可以通过运行 xcode-select --install 来完成。 - - - Wails 要求安装 WebView2 运行时。 一些 Windows 安装已经安装了这个。 您可以使用 wails doctor 命令进行检查。 - - - Linux 需要标准 gcc 构建工具以及 libgtk3libwebkit。 与其为不同的发行版列出大量命令,Wails 可以尝试确定针对您的特定发行版的安装命令。 安装后运行 wails doctor 以显示如何安装依赖项。 如果您的发行版/包管理器不受支持,请参阅 添加Linux发行版指南。 - - -``` - -## 可选依赖 - -- [UPX](https://upx.github.io/) 用于压缩您的应用程序。 - -## 安装 Wails - -运行 `go install github.com/wailsapp/wails/v2/cmd/wails@latest` 安装 Wails CLI。 - -## 系统检查 - -运行 `wails doctor` 将检查您是否安装了正确的依赖项。 如果没有,它会就缺少的内容提供建议以帮助纠正问题。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx deleted file mode 100644 index df6ef37db..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# 应用开发 - -使用 Wails 开发应用程序没有硬性规定,但有一些基本准则。 - -## 应用程序设置 - -默认模板使用 `main.go` 配置和运行应用程序, 同时`app.go` 用于定义应用程序逻辑. - -`app.go`文件将定义一个结构体,该结构体有 2 个方法作为主应用程序的回调: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- 一旦 Wails 分配了它需要的资源,就会调用 startup 方法,它是创建资源、设置事件侦听器以及应用程序在启动时需要的任何其他东西的好地方。 它提供了一个 `context.Context`, 通常保存在一个结构体字段中。 调用 [运行时](../reference/runtime/intro) 需要此`context.Context`。 如果此方法返回错误,则应用程序将终止。 在开发模式下,错误会输出到控制台。 - -- Shutdown 方法将在关闭过程结束时由 Wails 调用。 这是释放内存和执行关闭任务的好地方。 - -`main.go` 文件通常由对`wails.Run()`的单个调用组成,它接受应用程序配置。 模板使用的模式是,在调用 `wails.Run()` 之前, 我们创建并保存一个在 `app.go` 中定义的结构体的实例在名为 `app` 的变量中。 这个配置是我们添加回调的地方: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -可以在 [此处](../howdoesitwork#应用程序生命周期回调) 找到有关应用程序生命周期回调的更多信息。 - -## 绑定方法 - -您可能希望从前端调用 Go 方法。 这通常是通过向 `app.go` 中已经定义的结构体中添加公共方法来实现的: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -在主应用程序中,`Bind` 字段是我们告诉 Wails 想要绑定什么: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -这将绑定 `App` 结构中的所有公共方法(它永远不会绑定 startup 和 shutdown 方法)。 - -### 绑定多个结构体时处理 context - -如果您想为多个结构绑定方法,但希望每个结构都保留对 context 的引用,以便您可以使用运行时函数,一个好的方式是将上下文从 `OnStartup` 方法传递给您的结构实例: - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -可以在 [此处](../howdoesitwork.mdx#method-binding) 找到有关绑定的更多信息。 - -## 应用程序菜单 - -Wails 支持向您的应用程序添加菜单。 这是通过将 [菜单结构体](../reference/menus#菜单结构体) 传递给应用程序配置来完成的。 常见做法是使用一个返回菜单的方法,更常见的是用作生命周期回调的 `App` 结构体上的方法。 - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## 资产 - -Wails v2 处理资源的方式的伟大之处在于它不需要处理! 您唯一需要给 Wails 的是一个 `embed.FS`。 你如何做到这一点完全取决于你。 您可以像 vanilla 模板一样使用 vanilla html/css/js 文件。 您可能有一些复杂的构建系统,但这并不影响。 - -运行 `wails build` 时,它会检查项目根目录的 `wails.json` 文件。 文件中有 2 个字段会被读取: - -- "frontend:install" -- "frontend:build" - -第一个,如果有给定,将在 `frontend` 目录中执行以安装 node 模块。 第二个,如果有给定,将在 `frontend` 目录中执行以构建前端项目。 - -如果没有给出这两个字段,那么 Wails 不会对前端做任何操作。 它仅仅被用作 `embed.FS`。 - -### 资产处理程序 - -Wails v2 应用程序可以选择在 `options.App` 中定义一个 `http.Handler`,它允许连接到 AssetServer 以动态创建文件或处理 POST/PUT 请求。 GET 请求总是首先由 `assets` FS 处理。 如果 FS 没有找到请求的文件,请求将被转发到 `http.Handler` 服务。 如果指定,除了 GET 以外的任何请求都将由 `AssetsHandler` 直接处理。 也可以仅通过将 `nil` 指定为 `Assets` 选项来使用 `AssetsHandler`。 - -## 内置开发服务器 - -运行 `wails dev` 将启动内置的开发服务器,它将在您的项目目录中启动一个文件监听器。 默认情况下,如果有任何文件更改,wails 会检查它是否是应用程序文件(默认:.go,可使用 `-e` 标志配置)。 如果是,那么它将重新构建您的应用程序并重新启动它。 如果更改的文件在 assetdir 目录中,它会在很短的时间后重新加载。 - -开发服务器使用一种称为“防抖”的技术,这意味着它不会立即重新加载,因为可能会在短时间内更改多个文件。 当触发发生时,它会在发出重新加载之前等待一定的时间。 如果发生另一个触发,它会再次重置为等待时间。 默认情况下,此值为 100ms。 如果此值不适用于您的项目,则可以使用 `-debounce` 标志进行配置。 如果使用,此值将保存到您的项目配置中并成为默认值。 - -## 外部开发服务器 - -一些框架带有自己的实时重新加载服务器,但是它们将无法利用 Wails Go 绑定。 在这种情况下,最好运行一个监听脚本,将项目重新构建到构建目录中,Wails 将监视该目录。 有关示例,请参阅使用 [rollup](https://rollupjs.org/guide/en/) 的默认 svelte 模板。 对于 [create-react-app](https://create-react-app.dev/),可以使用 [此脚本](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) 来实现类似的结果。 - -## Go 模块 - -默认的 Wails 模板会生成一个包含模块名称“changeme”的 `go.mod` 文件。 您应该在项目生成后将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx deleted file mode 100644 index 2030d04f2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# 前沿风险技术 - -## 概述 - -Wails 一直在开发中,新版本会定期“标记”。 这通常发生在 `master` 分支上所有较新的代码都经过测试并确认有效时。 如果您需要尚未发布的错误修复或功能,可以通过以下步骤使用最新的“前沿风险”版本: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -注意:您将项目克隆到的目录现在将被称为“clonedir”。 - -现在,Wails CLI 将是最新版本。 - -### 更新您的项目 - -要更新项目以使用最新版本的 Wails 库,请更新项目 `go.mod` 并确保以下行位于文件底部: - -`replace github.com/wailsapp/wails/v2 => ` - -示例: - -在 Windows 上:`replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -在'nix 上:`replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -要恢复到稳定版本,请运行: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## 测试一个分支 - -如果要测试一个分支,请按照上面的说明进行操作,但请确保在安装之前切换要测试的分支: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 - -## 测试 PR - -如果您想测试 PR,请按照上面的说明进行操作,但请确保在安装前获取 PR 并切换分支。 请替换 `[IDofThePR]` 为 github.com 上显示的 PR 的 ID: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx deleted file mode 100644 index 98833d772..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,134 +0,0 @@ -# 动态资产 - -如果你想为你的前端动态加载或生成资产,你可以使用 [AssetsHandler 选项](../reference/options#资产处理程序) 来实现。 AssetsHandler 是一个通用的 `http.Handler`,对于资产服务器上的任何非 GET 请求以及由于找不到文件而无法从捆绑资产提供服务的 GET 请求,都会调用它。 - -通过安装自定义 AssetsHandler,您可以使用自定义资产服务器提供您自己的资产。 - -## 示例 - -在我们的示例项目中,我们将创建一个简单的资产处理程序,它将从磁盘加载文件: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - Assets: assets, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - AssetsHandler: NewFileLoader(), - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -当我们在开发模式使用 `wails dev` 运行应用程序时,我们将看到以下输出: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -如您所见,当默认资产服务器无法提供 `favicon.ico` 文件时,将调用资产处理程序。 - -如果您右键单击主应用程序并选择“检查”以调出开发工具,您可以通过在控制台中输入以下内容来测试此功能: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -这将在 devtools 中产生错误。 我们可以看到错误是我们所期望的,由我们的自定义资产处理程序返回: - -```mdx-code-block -

- -

-``` - -但是,如果我们请求 `go.mod`,我们将看到以下输出: - -```mdx-code-block -

- -

-``` - -此技术可用于将图像直接加载到页面中。 如果我们更新了默认的 vanilla 模板并替换了 logo 图像: - -```html - -``` - -和: - -```html - -``` - -然后我们会看到以下内容: - -```mdx-code-block -

- -

-``` - -:::warning - - -以这种方式暴露您的文件系统是一种安全风险。 建议您正确管理对文件系统的访问。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx deleted file mode 100644 index cda133e4a..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frameless.mdx +++ /dev/null @@ -1,85 +0,0 @@ -# 无边框应用 - -Wails 支持无边框应用程序。 这可以通过使用 [应用程序参数选项](../reference/options#应用程序参数选项) 中的 [无边框](../reference/options#无边框) 字段来实现。 - -Wails 为拖动窗口提供了一个简单的解决方案:任何具有 `--wails-draggable:drag` CSS 样式的 HTML 元素都将充当“拖动句柄”。 此属性适用于所有子元素。 如果您需要指示嵌套元素不应拖动,则在该元素上使用“--wails-draggable:no-drag”属性。 - -```html - - - - - - - -
- - -
-
- - - - -``` - -对于一些项目,由于动态样式,可能无法使用 CSS 变量。 在这种情况下,您可以使用 `CSSDragProperty` 和 `CSSDragValue` 应用程序选项来定义将用于指示可拖动区域的属性和值: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - Assets: assets, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info 全屏 - - -如果您允许您的应用程序全屏显示,则此拖动功能将被禁用。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx deleted file mode 100644 index 7c4246863..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/frontend.mdx +++ /dev/null @@ -1,72 +0,0 @@ -# 前端 - -## 脚本注入 - -当 Wails 为您的 `index.html` 提供服务时,默认情况下,它会将 2 个脚本注入 `` 标签以加载 `/wails/ipc.js` 和 `/wails/runtime.js`。 这些文件分别安装绑定和运行时。 - -下面的代码显示了这些默认注入的位置: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - -``` - -### 覆盖默认脚本注入 - -为了给开发人员提供更大的灵活性,有一个 meta 标签可用于自定义此行为: - -```html - -``` - -选项如下: - -| 值 | 描述 | -| ------------------- | -------------------------- | -| noautoinjectruntime | 禁用自动注入 `/wails/runtime.js` | -| noautoinjectipc | 禁用自动注入 `/wails/ipc.js` | -| noautoinject | 禁用所有脚本自动注入 | - -可以使用多个选项,前提是它们以逗号分隔。 - -此代码完全有效并且与自动注入版本的操作相同: - -```html - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx deleted file mode 100644 index faf959b1c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/ides.mdx +++ /dev/null @@ -1,128 +0,0 @@ -# 集成开发环境 - -Wails 旨在提供出色的开发体验。 为此,我们现在支持生成 IDE 特定配置以提供更顺畅的项目设置。 - -目前,我们支持 [Visual Studio Code](https://code.visualstudio.com/),但我们希望尽快支持其他 IDE,例如 Goland。 - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -使用 `-ide vscode` 标志生成项目时,IDE 文件将与其他项目文件一起创建。 这些文件放置在 `.vscode` 目录中,并为调试应用程序提供正确的配置。 - -生成的 2 个文件是 `tasks.json` 和 `launch.json`。 以下是为默认 vanilla 项目生成的文件: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### 配置安装和构建步骤 - -`tasks.json` 文件对于默认项目很简单,因为不需要 `npm install` 或 `npm run build` 的步骤。 对于具有前端构建步骤的项目,例如 svelte 模板,我们需要编辑 `tasks.json` 以添加安装和构建步骤: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info 功能增强 - - -将来,我们希望生成一个 `tasks.json` 自动包含安装和构建步骤的文件。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx deleted file mode 100644 index 60a23bef5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,104 +0,0 @@ -# Linux 发行版支持 - -## 概述 - -Wails 提供 Linux 支持,但为所有可用发行版提供安装说明是一项不可能完成的任务。 相反,Wails 会尝试确定您开发应用程序所需的包是否可以通过系统的包管理器获得。 目前,我们支持以下包管理器: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## 添加包名 - -在某些情况下,您的发行版使用受支持的包管理器之一,但包名称不同。 例如,您可能使用 Ubuntu 衍生产品,但 gtk 的包名称可能不同。 Wails 尝试通过遍历包名称列表来找到正确的包。 包列表存储在 `v2/internal/system/packagemanager` 目录中的包管理器特定文件中。 在我们的示例中,是 `v2/internal/system/packagemanager/apt.go`。 - -在此文件中,包列表由以下 `Packages()` 方法定义: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -假设在我们的 linux 发行版中,`libgtk-3` 以 `lib-gtk3-dev` 的名称打包。 我们可以通过添加以下行来添加对此的支持: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## 添加新的包管理器 - -要添加新的包管理器,请执行以下步骤: - -- 在 `v2/internal/system/packagemanager` 中创建一个名为 `.go` 的新文件,其中 `` 是包管理器的名称。 -- 定义一个符合 `pm.go` 中定义的包管理器接口的结构体。 - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` 应该返回包管理器的名称 -- `Packages()` 应该返回一个 `packagemap`,它为依赖项提供候选文件名 -- `PackageInstalled()` 如果安装了指定的包,应该返回`true` -- `PackageAvailable()` 如果指定的软件包未安装但可以安装,则应返回`true` -- `InstallCommand()` 应该返回确切的命令来安装指定的包名 - -查看其他包管理器代码以了解其工作原理。 - -:::info 记住 - - -如果您添加了对新包管理器的支持,请不要忘记更新此页面! - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx deleted file mode 100644 index dfcdc5fb2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -此页面包含与开发适用于 Linux 的 Wails 应用程序相关的其他指南。 - -## video 标签不能触发 "ended" 事件 - -使用视频标签时,视频播放完毕后不会触发“结束”事件。 这是 WebkitGTK 中的一个错误,但是您可以使用以下解决方法来修复它: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -资料来源:[讨论板](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) 上的 [Lyimmi](https://github.com/Lyimmi) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/manual-builds.mdx deleted file mode 100644 index 83de0fdfd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# 手动构建 - -Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项目。 本文档将讨论 CLI 执行的不同操作以及如何以不同方式实现这一点。 - -## 构建过程 - -当使用 `wails build` 或 `wails dev` 时,Wails CLI 会执行一个通用的构建过程: - - - 安装前端依赖 - - 构建前端项目 - - 生成构建资产 - - 编译应用程序 - - [可选]压缩应用程序 - -### 安装前端依赖 - -#### 命令行步骤 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有安装命令 `frontend:install` -- 如果没有,则跳过此步骤 -- 如果有,则检查前端目录中是否存在 `package.json`。 如果不存在,则跳过这一步 -- 从 `package.json` 文件内容生成 MD5 -- 检查 `package.json.md5` 是否存在,如果存在,则将其内容(MD5 sum)与生成的内容进行比较,以查看内容是否已更改。 如果相同,则跳过此步骤 -- 如果 `package.json.md5` 不存在,则使用生成的 MD5 并创建它 -- 如果现在需要构建,或者 `node_modules` 不存在,或者给出了`-f` 标志,则在前端目录中执行安装命令 - -#### 手动步骤 - -这一步可以从命令行或带有 `npm install` 的前端脚本完成. - -### 构建前端项目 - -#### Wails 命令行 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有构建命令 `frontend:build` -- 如果没有,则跳过此步骤 -- 如果有,就在 frontend 目录下执行它 - -#### 手动步骤 - -这一步可以从命令行或带有前端构建脚本 `npm run build` 的脚本或任何前端构建脚本完成。 - -### 生成资产 - -#### Wails 命令行 - -- 如果设置了`-nopackage` 标志,则跳过此阶段 -- 如果 `build/appicon.png` 文件不存在,则创建一个默认文件 -- 对于 Windows,请参阅 [ Windows](#windows) -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 图像创建它。 - -##### Windows - -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 创建 256、128、64、48、32 和 16 大小的图标。 这是使用 [winicon](https://github.com/leaanthony/winicon) 完成的。 -- 如果 `build/windows/.manifest` 文件不存在,它会从默认版本创建它。 -- 将应用程序编译为生产版本(如上所述)。 -- 使用 [winres](https://github.com/tc-hib/winres) 将 icon 和 manifest 打包到一个 `.syso` 文件。 - -#### 手动步骤 - -- 使用[winicon](https://github.com/leaanthony/winicon)命令行工具或者其他工具创建`icon.ico` -- 为您的应用程序创建或者更新 `.manifest` 文件 -- 使用 [winres 命令行](https://github.com/tc-hib/go-winres) 生成一个 `.syso` 文件 - -### 编译应用程序 - -#### Wails 命令行 - -- 如果提供了 `-clean` 标志,则删除并重新创建 `build` 目录 -- 对于 `wails dev`,使用以下默认 Go 标志:`-tags dev -gcflags "all=-N -l"` -- 对于 `wails build`,使用以下默认 Go 标志:`-tags desktop,production -ldflags "-w -s"` - - 在 Windows 上,是 `-ldflags "-w -h -H windowsgui"` -- 传递给 CLI 的附加标签使用 `-tags` 添​​加到默认值中 -- 传递给 CLI 的附加 `ldflags-ldflags` 添加到默认值 -- 传递 `-o` 标志 -- 将使用指定的 Go 编译器 `-compiler` 进行编译 - -#### 手动步骤 - -- 对于 dev 构建,最少的命令是:`go build -tags dev -gcflags "all=-N -l"` -- 对于生产构建,最少的命令是:`go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- 确保在与 `.syso` 文件相同的目录中进行编译 - -### 压缩应用程序 - -#### Wails 命令行 - -- 如果 `-upx` 已给出标志,将运行 `upx` 程序以使用默认设置压缩应用程序 -- 如果也传递了 `-upxflags` 标志,则使用这些标志而不是默认 - -#### 手动步骤 - -- 手动运行 `upx [flags]` 以压缩应用程序。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx deleted file mode 100644 index d7707847f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/migrating.mdx +++ /dev/null @@ -1,189 +0,0 @@ -# 从 v1 迁移 - -## 概述 - -Wails v2 与 v1 相比有重大变化。 本文档旨在重点介绍迁移现有项目的更改和步骤。 - -### 创建应用程序 - -在 v1 中,使用 `wails.CreateApp` 来创建主应用程序,使用 `app.Bind` 来添加绑定,然后使用 `app.Run()` 运行应用程序。 - -示例: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -在 v2 中,只有一个 `wails.Run()` 方法接受 [应用程序参数选项](../reference/options#应用程序参数选项)。 - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - Assets: assets, - Bind: []interface{}{ - basic, - }, - }) -``` - -### 绑定 - -在 v1 中,可以绑定任意函数和结构。 在 v2 中,这已被简化为仅绑定结构体。 以前 v1 传递给 `Bind()` 中的方法的结构实例现在在 [应用程序参数选项 ](../reference/options#应用程序参数选项)`Bind` 字段中指定: - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -在 v1 中,绑定方法可用于前端的 `window.backend`。 这已更改为 `window.go`。 - -### 应用程序生命周期 - -在 v1 中,绑定结构中有 2 个特殊方法:`WailsInit()` 和 `WailsShutdown()`。 作为应用程序选项的一部分,这些已被 3 个生命周期钩子替换: - -- [应用启动回调](../reference/options.mdx#onstartup) -- [应用退出回调](../reference/options.mdx#onshutdown) -- [前端 Dom 加载完成回调](../reference/options.mdx#ondomready) - -注意:[ 前端 Dom 加载完成回调](../reference/options#前端-dom-加载完成回调)替换了 v1 中的 `wails:ready` 系统事件。 - -这些方法可以是标准函数,但通常的做法是让它们成为结构的一部分: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### 运行时 - -v2 中的运行时比 v1 丰富得多,支持菜单、窗口操作和更好的对话框。 方法的签名略有变化 - 请参阅 [运行时](../reference/runtime/intro)。 - -在 v1 中,[运行时](../reference/runtime/intro) 可通过传递给 `WailsInit()`。 在 v2 中,运行时已移出到它自己的包。 运行时中的每个方法都采用 `context.Context` 传递给了 [应用启动回调](../reference/options#应用启动回调)方法。 - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} -} -} - -``` - -### 资产 - -在 v2 最大的变化是资源的处理方式。 - -在 v1 中,资源通过 2 个应用程序参数选项传递: - -- `JS` - 应用程序的 Javascript -- `CSS` - 应用程序的 CSS - -这意味着生成单个 JS 和 CSS 文件的责任在于开发人员。 这本质上需要使用繁琐的打包程序,例如 webpack。 - -在 v2 中,Wails 不对您的前端资源做任何预设,就像网络服务器一样。 您的所有应用程序资源都作为 `embed.FS`。 - -**这意味着不需要捆绑您的资产、将图像编码为 Base64 或尝试使用捆绑器配置的黑暗艺术来使用自定义字体**。 - -在启动时,Wails 将扫描给定的`embed.FS`的`index.html`并将其位置用作所有其他应用程序资源的根路径 - 就像网络服务器一样。 - -示例:应用程序具有以下项目布局。 所有最终资源都放在 `frontend/dist`目录中: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -应用程序可以通过简单地创建一个 `embed.FS` 来使用这些资源: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - Assets: assets, - }) -} -``` - -当然,如果您愿意,也可以使用打包工具。 唯一的要求是在 Wails 中使用 `embed.FS` 将最终的程序资源目录传递给 [应用程序参数选项](../reference/options#应用程序参数选项) 的 `Assets` 键。 - -### 项目配置 - -在 v1 中,项目配置存储在项目根的 `project.json` 文件中。 在 v2 中,项目配置存储在项目根部的 `wails.json` 文件中。 - -文件的格式略有不同。 下面是区别: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. 这只需要一些更重要的资源配置。 | - -

diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx deleted file mode 100644 index 13e54ec46..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# 鼠标按钮 - -Wails 运行时拦截鼠标单击以确定无框窗口是否需要调整大小或需要移动窗口。 有人询问如何检测鼠标点击何时发生,因为 `window.onclick` 没有正确报告鼠标按钮。 下面的代码展示了如何检测鼠标点击: - -```javascript -window.addEventListener("mousedown", handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -参考:https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx deleted file mode 100644 index aa5814f54..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/obfuscated.mdx +++ /dev/null @@ -1,42 +0,0 @@ -# 混淆构建 - -Wails 支持使用 [garble](https://github.com/burrowers/garble) 来混淆您的应用程序。 - -要生成混淆构建,您可以将 `-obfuscate` 标志与 `wails build` 命令一起使用: - -```bash -wails build -obfuscated -``` - -要自定义混淆设置,您可以使用以下 `-garbleargs` 标志: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -这些设置可能会保留在您的 [项目配置](../reference/project-config) 中。 - -## 工作原理 - -在标准构建中,所有绑定的方法都在前端的 `window.go` 变量下可用。 调用这些方法时,会使用完全限定的函数名调用相应的后端方法。 使用混淆构建时,使用 ID 而不是绑定方法的名称。 目录中生成的绑定 `wailsjs` 使用这些 ID 调用后端函数。 - -:::note - - -为确保您的应用程序在混淆模式下工作,您必须使用 `wailsjs` 应用程序目录下生成的绑定。 - -::: - - -## 示例 - -从绑定中导入“Greet” 方法,如下所示: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -将确保该方法在混淆模式下正常工作,因为绑定将使用 ID 重新生成并更新调用机制。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/overscroll.mdx deleted file mode 100644 index 64673dafd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 滚动超出 - -[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) 是当您滚动超出页面内容边界时有时会获得的“弹跳效果”。 这在移动应用程序中很常见。 这可以使用 CSS 禁用: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx deleted file mode 100644 index b1b4c6690..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# 路由 - -路由是一种在应用程序中切换视图的流行方式。 此页面提供了有关如何执行此操作的一些指导。 - -## Vue - -在 Vue 中推荐的路由方法是 [Hash 模式](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from "vue-router"; - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}); -``` - -## Angular - -在 Angular 中推荐的路由方法是 [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies/#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -React 中推荐的路由方法是 [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx deleted file mode 100644 index 7ce7dc9b2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/signing.mdx +++ /dev/null @@ -1,387 +0,0 @@ -# 代码签名 - -这是有关如何在 MacOS 和 Windows 上对使用 Wails 生成的二进制文件进行签名的指南。 该指南将针对 CI 环境,更具体地说是 GitHub Actions。 - -## Windows - -首先,您需要一个代码签名证书。 如果您还没有,Microsoft 的信息页面会 [在此处](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate) 列出一些提供商。 请注意,除非您需要编写内核级软件,例如设备驱动程序,否则不需要 EV 证书。 为了签署你的 Wails 应用程序,一个标准的代码签名证书就可以了。 - -在针对自动构建系统之前,与您的证书提供商核实如何在您的本地计算机上签署您的二进制文件可能是一个好主意,这样您就知道是否有任何特殊要求。 例如,[这里](https://www.ssl.com/how-to/using-your-code-signing-certificate/) 是 SSL.com 的 Windows 代码签名指南。 如果您知道如何在本地签名,则可以更轻松地解决 CI 环境中的任何潜在问题。 例如,SSL.com 代码签名证书需要 [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) 的 `/tr` 标志, 而其他提供商可能只需要 `/tr` 标志来提供时间戳服务器。 用于签署 [此类](https://github.com/Dana-Prajea/code-sign-action) Windows 二进制文件的流行 GitHub Actions 不支持 SignTool.exe 上的 `/tr` 标志。 因此,本指南将重点介绍使用 PowerShell 命令手动签署我们的应用程序,但如果您愿意,可以使用类似 [代码签名操作](https://github.com/Dana-Prajea/code-sign-action) 的操作。 - -首先,让我们确保我们能够在我们的 GitHub CI 中构建我们的 Wails 应用程序。 这是一个小型工作流模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -接下来,我们需要让 GitHub 工作流访问我们的签名证书。 这是通过将您的 .pfx 或 .p12 证书编码为 base64 字符串来完成的。 要在 PowerShell 中执行此操作,您可以使用以下命令,假设您的证书名为“my-cert.p12”: - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -您现在应该拥有带有 base64 编码证书的 .txt 文件。 它应该以 _-----BEGIN CERTIFICATE-----_ 开头并以 _-----END CERTIFICATE-----_ 结尾。 现在你需要在 GitHub 上创建两个 action secret。 导航到 _Settings -> Secrets -> Actions_ 并创建以下两个 secrets: - -- **WIN_SIGNING_CERT** 您的 base64 编码证书文本的内容。 -- **WIN_SIGNING_CERT_PASSWORD** 您的证书密码的内容。 - -现在我们准备好使用以下两种方法之一在我们的工作流程中实现签名: - -### 方法一:使用命令签名 - -此方法使用 PowerShell 命令对我们的应用程序进行签名,并让您控制整个签名过程。 - -在该 `"Build Wails app"` 步骤之后,我们可以将以下步骤添加到我们的工作流程中: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -此脚本为您的证书文件创建一个新目录,从我们的 base64 密钥创建证书文件,将其转换为 .pfx 文件,最后对二进制文件进行签名。 最后一行需要替换以下变量: - -- **签名算法**:通常是 sha256。 -- **时间戳服务器**:与您的证书一起使用的时间戳服务器的 URL。 -- **二进制路径**:要签名的二进制文件的路径。 - -鉴于我们的 Wails 配置将 `outputfilename` 设置为“app.exe”并且我们拥有来自 SSL.com 的证书,这将是我们的工作流程: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### 方法二:Action自动签名 - -可以使用像 [这样](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 的 Windows 代码签名操作,但请注意,它需要证书的 SHA1 哈希和证书名称。 查看如何在 Action 的 [市场](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 上配置它的示例。 - ---- - -## MacOS - -首先,您需要 Apple 提供的代码签名证书。 如果您没有,简单的谷歌搜索将帮助您获得一个。 获得证书后,您需要将其导出并将其编码为 base64。 本 [教程](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) 向您展示了如何以简单的方式做到这一点。 导出 .p12 证书文件后,您可以使用以下命令将其编码为 base64,如教程中所示: - -```bash -base64 Certificates.p12 | pbcopy -``` - -现在您已准备好创建一些 GitHub 项目 secrets,就像在 Windows 中一样: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** 您新复制的 base64 证书的内容。 -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** 与您的证书密码的内容。 -- **APPLE_PASSWORD** 包含您可以在 [此处](https://appleid.apple.com/account/manage) 生成的 Apple-ID 帐户的应用程序特定密码的内容。 - -让我们确保我们能够在我们的 GitHub Action 工作流程中构建我们的 Wails 应用程序。 这是一个小模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -对于 macOS 上的代码签名,[gon](https://github.com/mitchellh/gon) 是一个非常方便的工具,用于代码签名和与 Apple 服务器通信,也是用 Go 编写的,将在本指南中使用。 - -在 `Build Wails 应用` 步骤之后,将以下内容添加到工作流中: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source": ["./build/bin/app.app"], - "bundle_id": "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign": { - "application_identity": "Developer ID Application: My Name" - } -} -``` - -其中 `source` 是您的 Wails 二进制文件,`bundle_id` 是您的捆绑包 ID,`apple_id` 包含您之前创建的 Apple ID 用户名和 App-Specific 密码,`sign.application_identity` 是您的身份,您可以通过运行以下命令找到它: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -在此文件中,您可以配置应用所需的权利,例如 如果您的应用使用相机,相机权限。 在 [此处](https://developer.apple.com/documentation/bundleresources/entitlements) 阅读有关权利的更多信息。 - -确保您已使用您在 `gon-sign.json` 中输入的相同包 ID 更新了 `Info.plist` 文件。 这是一个示例 `Info.plist` 文件: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -现在我们准备好在构建 Wails 应用程序后在我们的工作流程中添加签名步骤: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -请注意,与 Apple 签署二进制文件可能需要几分钟到几小时。 - -## 组合工作流文件: - -这是我们结合了 Windows + macOS 的 GitHub 工作流文件: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - - name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -# 尾注 - -本指南受 RiftShare 项目及其工作流程的启发,强烈建议在 [此处](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml) 查看。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx deleted file mode 100644 index 7f701203d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# 模板 - -Wails 从预先创建的模板生成项目。 在 v1 中,这是一组难以维护的项目,这些项目可能会过时。 在 v2 中,为了增强社区的能力,为模板添加了一些新功能: - -- 能够从 [远程模板](../reference/cli#远程模板) 生成项目 -- 帮助创建自己的模板的工具 - -## 创建模板 - -要创建模板,您可以使用 `wails generate template` 命令。 要生成默认模板,请运行: - -`wails generate template -name mytemplate` - -这将使用默认文件创建“mytemplate”目录: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### 模板概述 - -默认模板包含以下文件和目录: - -| 文件名 / 目录 | 描述 | -| --------------- | ----------------- | -| NEXTSTEPS.md | 有关如何完成模板的说明 | -| README.md | 随模板发布的 README | -| app.tmpl.go | `app.go` 模板文件 | -| frontend/ | 包含前端资源的目录 | -| go.mod.tmpl | `go.mod` 模板文件 | -| main.tmpl.go | `main.go` 模板文件 | -| template.json | 模板元数据 | -| wails.tmpl.json | `wails.json` 模板文件 | - -此时,建议按照 `NEXTSTEPS.md` 中的步骤操作。 - -## 从现有项目创建模板 - -通过在生成模板时将路径传递给项目,可以从现有的前端项目创建模板。 我们现在将介绍如何创建 Vue 3 模板: - -- 安装 vue cli: `npm install -g @vue/cli` -- 创建默认项目:`vue create vue3-base` - - 选择 `Default (Vue 3) ([Vue 3] babel, eslint)` -- 项目生成后,运行: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- 现在可以按照 `NEXTSTEPS.md` 中指定的方式定制模板。 -- 一旦文件准备完毕,就可以通过运行命令来测试它:`wails init -n my-vue3-project -t .\wails-vue3-template\` -- 要测试新项目,请运行:`cd my-vue3-project` then `wails build` -- 项目编译完成后,运行它:`.\build\bin\my-vue3-project.exe` -- 您应该有了一个功能齐全的 Vue3 应用程序: - -```mdx-code-block -
- -
-``` - -## 发布模板 - -发布模板只是将文件推送到 GitHub。 鼓励以下最佳实践: - -- 从前端目录中删除任何不需要的文件和目录(例如:.git) -- 确保 `template.json` 完整,尤其是 `helpurl` -- 将文件推送到 GitHub -- 在 [社区模板](../community/templates) 页面上创建 PR -- 在 [模板公告](https://github.com/wailsapp/wails/discussions/825) 讨论板上发布模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx deleted file mode 100644 index aaf13ab63..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,148 +0,0 @@ -# 故障排除 - -各种故障排除技巧。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 - -## 我的应用程序正在显示白屏/空白屏幕 - -检查您的应用程序是否包含正确目录中的资产。 在您的 `main.go` 文件中,您将拥有类似于以下代码的内容: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -检查它是否 `frontend/dist` 包含您的应用程序资产。 - -### Mac - -如果在 Mac 上发生这种情况,请尝试将以下内容添加到您的 `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -参考:https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac 应用程序无效 - -如果您构建的应用程序在 finder 中如下所示: - -```mdx-code-block -

- -

-``` - -您的申请很可能 `info.plist` 是无效的。 更新 `build/.app/Contents/info.plist`文件 并检查数据是否有效,比如:检查二进制名称是否正确。 要保留更改,请将文件复制回 `build/darwin` 目录。 - -## 无法使用可变参数 - -如果您有使用可变参数定义的后端方法,例如: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -像这样从前端调用此方法将失败: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -解决方法: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -致谢:https://github.com/wailsapp/wails/issues/1186 - -## 我正在尝试安装Wails时获取代理错误 - -如果您遇到这样的错误: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -这可能是因为官方 Go Proxy 被阻止(中国用户报告了这一点)。 解决方案是手动设置代理,例如: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -来源:https://github.com/wailsapp/wails/issues/1233 - -## 没有生成正确的 Typescript 类型 - -有时生成的 Typescript 没有正确的类型。 `ts_type` 为了缓解这种情况,可以使用 struct 标签指定应该生成哪些类型。 有关详细信息,请阅读 [此](https://github.com/tkrajina/typescriptify-golang-structs#custom-types) 内容。 - -## 当我离开 `index.html`时,我无法在前端调用方法 - -如果您导航 `index.html` 到一个新的 html 文件,上下文将会丢失。 这可以通过将以下导入添加到 `` 您导航到的任何新页面的部分来解决: - -```html - - - - -``` - -来源:https://github.com/wailsapp/wails/discussions/1512 - -## 运行 `wails dev` 出现 `too many open files` 错误 - -默认情况下,macOS 最多只能打开 256 个文件。 这会影响 `wails dev` 命令 可以通过在终端中运行:`ulimit -n 1024` 来增加此限制。 - -FSNotify 正在 [寻求转移到苹果](https://github.com/fsnotify/fsnotify/issues/11)。 如果这不能很快完成,我们将创建自己的实现,在 [此处](https://github.com/wailsapp/wails/issues/1733) 跟踪。 - -## 我的 Mac 应用程序给了我奇怪的编译错误 - -一些用户报告看到编译错误,如下所示: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -这 _通常_ 是由于您正在运行的操作系统版本和安装的 XCode 命令行工具的版本不匹配。 如果您看到这样的错误,请尝试将您的 XCode 命令行工具升级到最新版本。 - -来源:https://github.com/wailsapp/wails/issues/1806 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx deleted file mode 100644 index ea2d1b99d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -此页面提供在使用带有 Wails 的 Visual Studio Code 时的各种提示和技巧。 - -## Vetur 配置 - -非常感谢 [@Lyimmi](https://github.com/Lyimmi) 的这个提示。 最初张贴 [在这里](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349)。 - -Vetur 是一个流行的 Visual Studio Code 插件,它为 Vue 项目提供语法高亮和代码完成。 在 VSCode 中加载 Wails 项目时,Vetur 会抛出错误,因为它期望在根目录中找到前端项目。 要解决此问题,您可以执行以下操作: - -在项目根目录创建一个以 `vetur.config.js` 命名的文件。 - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -接下来,配置 `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -这应该使您现在可以按预期使用 Vetur。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows-installer.mdx deleted file mode 100644 index 02c73c16c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS 安装程序 - -```mdx-code-block -

- -
-

-``` - -Wails 支持使用 [NSIS 安装程序](https://nsis.sourceforge.io/) 生成 Windows 安装程序。 - -## 安装 NSIS - -### Windows - -安装程序可在 [NSIS 下载页面](https://nsis.sourceforge.io/Download) 上找到。 - -如果您使用 chocolatey 包管理器,请运行以下脚本: - -``` -choco install nsis -``` - -如果手动安装 NSIS,则需要将 NSIS 安装目录中包含 `makensis.exe` 的 *Bin* 目录添加到 PATH 中。 [这是](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) 一个关于如何在 Windows 上添加到 PATH 的好教程。 - -### Linux - -应该可以通过您的发行版的软件包管理器获得 `nsis` 包。 - -### MacOS - -NSIS 可通 homebrew 安装:`brew install nsis`。 - -## 生成安装程序 - -创建新项目时,Wails 会在 `build/windows/installer` 中生成 NSIS 配置文件。 从 `installer/info.json` 读取配置数据,并配置为使用项目的 `wails.json` 信息部分: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -要为您的应用程序生成安装程序,请使用 `wails build` 的 `-nsis` 标志: - -``` -wails build -nsis -``` - -现在可用安装程序将生成在 `build/bin` 目录中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows.mdx deleted file mode 100644 index 0fc857c81..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -此页面包含了在 Windows 上开发 Wails 应用程序相关的其他指南。 - -## 处理 WebView2 运行时依赖 - -为 Windows 构建 Wails 应用程序时对 Microsoft [WebView2 运行时](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) 有要求。 默认情况下,Windows 11 会安装它,但有些机器不会。 Wails 提供了一种简单的方法来处理这种依赖关系。 - -通过在构建时使用 `-webview2` 标志, 您可以决定在未检测到合适的运行时的时候(包括安装的运行时是否太旧)应用程序将执行的操作。 四个选项是: - -1. Download(下载) -2. Embed(内嵌) -3. Browser(浏览器) -4. Error(报错) - -### Download(下载) - -此选项将提示用户在未找到合适的运行时时,提供从 Microsoft 的 WebView2 官方站点下载并运行引导程序。 如果用户继续,官方引导程序将被下载并运行。 - -### Embed(内嵌) - -此选项将官方引导程序嵌入到应用程序中。 如果没有找到合适的运行时,应用程序将提供并运行引导程序。 这将使二进制大小增加约 150k。 - -### Browser(浏览器) - -此选项将提示用户没有找到合适的运行时时,提供打开浏览器到 WebView2 官方页面,可以下载和安装引导程序。 然后应用程序将会退出,安装的操作留给用户。 - -### Error(报错) - -如果未找到合适的运行时间,则会向用户显示错误并且不采取进一步措施。 - -## 固定版本运行时 - -处理 webview2 依赖的另一种方法是自己发送。 您可以下载 [固定版本的运行时](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) 并将其捆绑或与您的应用程序一起下载。 - -此外,您应该在启动 wails 时在结构体 `windows.Options` 中指定 webview2 运行时的固定版本的路径。 - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -注意:当 `WebviewBrowserPath` 指定时,`error` 策略将在最小要求版本不匹配或运行时路径无效的情况下被强制执行。 - -## 创建其他程序 - -当生成其他程序(例如脚本)时,您将看到屏幕上出现该窗口。 要隐藏窗口,可以使用以下代码: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -[sithembiso](https://github.com/sithembiso) 在 [讨论板](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172) 上提供的解决方案。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx deleted file mode 100644 index 87cc5c397..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/howdoesitwork.mdx +++ /dev/null @@ -1,365 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 它是如何工作的? - -Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 Javascript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 Javascript 方法,就像它们是原生 Javascript 方法一样。 - -```mdx-code-block -
- -
-``` - -## 主应用程序 - -### 概述 - -主应用程序由对 `wails.Run()` 的调用组成。 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 基本应用程序可能如下所示: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### 选项概要 - -此示例设置了以下选项: - -- `Title` - 应该出现在窗口标题栏中的文本 -- `Width` & `Height` - 窗口的尺寸 -- `Assets` - 应用程序的前端资产 -- `OnStartup` - 创建窗口并即将开始加载前端资源时的回调 -- `OnShutdown` - 应用程序即将退出时的回调 -- `Bind` - 我们希望向前端暴露的一部分结构体实例 - -完整的应用程序参数选项列表可以在 [参数选项](./reference/options) 中找到。 - -#### 资产 - -`Assets` 选项是必须的,因为您不能拥有没有前端资产的 Wails 应用程序。 这些资产可以是您希望在 Web 应用程序中找到的任何文件 - html、js、css、svg、png 等。 **不需要生成资源包** - 普通文件即可。 当应用程序启动时,它将尝试从您的资产中加载 `index.html`,并且那时起前端基本上将作为浏览器工作。 值得注意的是 `embed.FS` 对文件所在的位置没有要求。 嵌入路径很可能使用了相对于您的主应用程序代码的嵌套目录,例如 `frontend/dist`: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -启动时,Wails 将遍历嵌入的文件,寻找包含的 `index.html`。 所有其他资源将相对于该目录加载。 - -由于可用于生产的二进制文件使用包含在 `embed.FS` 中的文件,因此应用程序不需要附带任何外部文件。 - -在开发模式下使用 `wails dev` 命令,资产从磁盘加载,任何更改都会导致“实时重新加载”。 资产的位置将从 `embed.FS` 推断。 - -更多细节可以在 [应用开发指南](./guides/application-development) 中找到。 - -#### 应用程序生命周期回调 - -在即将加载前端 `index.html` 之前,会对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go context 被传递给这个方法。 调用运行时需要此 context ,因此标准模式是在此方法中保存对它的引用。 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 当前端加载完 `index.html` 中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 Javascript 中的 [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) 事件。 还可以通过设置 [应用关闭前回调](./reference/options#应用关闭前回调) 选项来控制窗口关闭(或应用程序退出)事件。 - -#### 方法绑定 - -`Bind` 选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构体方法。 想想传统 web 应用程序中的 "Controllers" 之类的结构 。 当应用程序启动时,它会检查 `Bind` 字段中列出的结构体实例, 确定哪些方法是公开的(以大写字母开头),并生成前端可以调用的这些方法的 Javascript 版本。 - -:::info 注意 - - -Wails 要求您传入结构体的 _实例_ 以使其正确绑定 - -::: - - -在此示例中,我们创建一个新的 `App` 实例,然后将此实例添加到 `wails.Run` 中的 `Bind` 选项: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -您可以绑定任意数量的结构体。 只需确保创建它的实例并将其传递给 `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - Assets: &assets, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -当您运行 `wails dev`(或 `wails generate module`)时,将生成一个前端模块,其中包含以下内容: - -- 所有绑定方法的 Javascript 绑定 -- 所有绑定方法的 Typescript 声明 -- 绑定方法用作输入或输出的所有 Go 结构的 Typescript 声明 - -这使得使用相同的强类型数据结构从前端调用 Go 代码变得异常简单。 - -## 前端 - -### 概述 - -前端是由 webkit 渲染的文件集合。 这就合二为一的浏览器和网络服务器。 您可以使用的框架或库[^1]几乎没有限制。 前端和 Go 代码之间的主要交互点是: - -- 调用绑定的 Go 方法 -- 调用运行时方法 - -### 调用绑定的 Go 方法 - -当您使用 `wails dev` 运行应用程序时,它将自动在名为 `wailsjs/go` 的目录中为您的结构体生成 Javascript 绑定(您也可以通过运行 `wails generate module` 来执行此操作)。 生成的文件反映了应用程序中的包名称。 在上面的例子中,我们绑定了有公开方法 `Greet` 的 `app`。 这将导致生成以下文件: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -在这里我们可以看到有一个 `main` 包,其中包含绑定 `App` 结构体的 Javascript 绑定,以及这些方法的 Typescript 声明文件。 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 Javascript 函数一样调用它: - -```javascript -// ... -import { Greet } from "../wailsjs/go/main/App"; - -function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }); -} -``` - -Typescript 声明文件为您提供了绑定方法的正确类型: - -```ts -export function Greet(arg1: string): Promise; -``` - -生成的方法返回一个 Promise 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 不成功的调用是当 Go 方法的第二个返回值具有错误类型时,将错误实例传递回调用者。 这通过 `reject` 处理程序传回的。 在上面的示例中,`Greet` 只返回一个 `string`,因此 Javascript 调用永远不会 reject - 除非将无效数据传递给它。 - -所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 Javascript 类返回到您的前端。 - -:::info 注意 - - -结构体字段 *必须* 具有有效的 `json` 标签,以包含在生成的 TypeScript 中。 - -目前不支持嵌套匿名结构体。 - -::: - - -也可以将结构体发送回 Go。 作为期望的结构体的参数传递的任何 Javascript map/class 都将转换为该结构体类型。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 使用此模块,可以构建原生 Javascript 对象并将其发送到 Go 代码。 - -还支持在其签名中使用结构的 Go 方法。 绑定方法(作为参数或返回类型)指定的所有 Go 结构体都将作为 Go 代码包装器模块的一部分自动生成 Typescript 版本。 使用这些,可以在 Go 和 Javascript 之间共享相同的数据模型。 - -示例:我们更新 `Greet` 方法以接受一个 `Person` 而不是字符串: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -`wailsjs/go/main/App.js` 文件仍将包含以下代码: - -```js title="App.js" -export function Greet(arg1) { - return window["go"]["main"]["App"]["Greet"](arg1); -} -``` - -但是 `wailsjs/go/main/App.d.ts` 文件将使用以下代码进行更新: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -正如我们所见,“main”命名空间是从一个新的“models.ts”文件中导入的。 该文件包含我们绑定方法使用的所有结构体定义。 在此示例中,这是一个 `Person` 结构。 如果我们查看 `models.ts`,我们可以看到模型是如何定义的: - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -只要您将 TypeScript 作为前端构建配置的一部分,您就可以通过以下方式使用这些模型: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -生成的绑定和 TypeScript 模型的结合构成了一个强大的开发环境。 - -有关绑定的更多信息,请参见 [应用开发指南](guides/application-development.mdx) 的 [绑定方法](guides/application-development.mdx#绑定方法) 部分。 - -### 调用运行时方法 - -Javascript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -更多关于 JS 运行时的细节可以在 [运行时参考](reference/runtime/intro) 中找到。 - -[^1]: 有一小部分库使用了 WebView 中不支持的功能。 对于这种情况,通常有替代方案和解决方法。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx deleted file mode 100644 index b4ea09b34..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 - -将它看作为 Go 的快并且轻量的 Electron 替代品。 您可以使用 Go 的灵活性和强大功能,结合丰富的现代前端,轻松的构建应用程序。 - -### 功能 - -- 原生菜单、对话框、主题和半透明 -- Windows、macOS 和 linux 支持 -- 内置 Svelte、React 、Preact 、Vue、Lit 和 Vanilla JS 的模板 -- 从 Javascript 轻松调用 Go 方法 -- 自动将Go结构体转换为TypeScript模块 -- Windows 上不需要 CGO 或外部 DLL -- 使用 [Vite ](https://vitejs.dev/) 的实时开发模式 -- 可以轻松创建、构建和打包应用的强大命令行工具 -- 丰富的 [运行时库](/docs/reference/runtime/intro) -- 使用 Wails 构建的应用程序兼容 Apple & Microsoft 商店 - -这是 [varly](https://varly.app) - 一个使用 Wails 编写的 MacOS 和 Windows 桌面应用。 它不仅看起来很强,它使用原生菜单和半透明 - 你希望从现代原生应用中得到的一切 - -```mdx-code-block -

- - - -

-``` - -### 快速启动模板 - -Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 Javascript 和 Typescript 版本。 - -### 原生元素 - -Wails 使用专门构建的库来处理窗口、菜单、对话框等原生元素,因此您可以构建美观、功能丰富的桌面应用程序。 - -**它不嵌入浏览器**,因此性能高。 相反,它使用平台的原生渲染引擎。 在 Windows 上,是基于 Chromium 构建的新 Microsoft Webview2 库。 - -### Go 和 Javascript 互操作 - -Wails 自动使您的 Go 方法可用于 Javascript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 Typescript 版本,因此您可以在 Go 和 Javascript 之间传递相同的数据结构。 - -### 运行时库 - -当检测到您的应用程序资源发生更改时,您正在运行的应用程序将“重新加载”,几乎立即反馈您的更改。 - -### 实时开发体验 - -#### 自动重新构建 - -当您在“开发”模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。 它将检测您的 Go 代码的任何更改并自动重新构建和重新启动您的应用程序。 - -#### 自动重新加载 - -当检测到对您的应用程序资产的更改时,您正在运行的应用程序将“重新加载”,几乎立即反映您的更改 - -#### 在浏览器中开发您的应用程序 - -如果您更喜欢在浏览器中调试和开发,那么 Wails 可以满足您的需求。 正在运行的应用程序还有一个网络服务器,它将在连接到它的任何浏览器中运行您的应用程序。 当您的资源在磁盘上发生变化时,它会刷新。 - -### 可用于生产的原生二进制文件 - -当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。 在 Windows 和 MacOS 上,可以创建用于分发的原生包。 使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。 - -### 工具 - -Wails CLI 提供了一种简单的方法来生成、构建和打包您的应用程序。 它将完成创建图标的繁重工作,使用最佳设置编译您的应用程序,并提供可分发的、可用于生产的二进制文件。 可以从许多入门模板中进行选择,以快速启动和运行! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx deleted file mode 100644 index 60af66588..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 命令行 - -Wails CLI 有许多用于管理项目的命令。 所有命令都以此方式运行: - -`wails <命令> <标志>` - -## 初始化 - -`wails init` 用于生成项目。 - -| 标志 | 描述 | 默认 | -|:--------- |:---------------------------------------------- |:-------:| -| -n "项目名称" | 项目名称。 **强制必填** | | -| -d "项目目录" | 要创建的项目目录 | 项目名 | -| -g | 初始化 git 存储库 | | -| -l | 可用项目模板列表 | | -| -q | 禁止输出到控制台 | | -| -t "模板名称" | 要使用的项目模板。 这可能是默认模板的名称或托管在 github 上的远程模板的 URL 。 | vanilla | -| -ide | 生成 IDE 项目文件 | | -| -f | 强制构建应用 | false | - -示例: `wails init -n test -d mytestproject -g -ide vscode -q` - -这将在 "mytestproject" 目录生成一个名为 "test" 的项目,初始化 git,生成 vscode 项目文件并静默执行。 - -可以在 [此处](../guides/ides) 找到有关在 Wails 中使用 IDE 的更多信息。 - -### 远程模板 - -支持远程模板(托管在 GitHub )并且可以使用模板项目的 URL 进行安装。 - -示例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -可以在 [此处](../community/templates.mdx) 找到社区维护的模板列表 - -:::warning 注意 - - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - - -## 构建 - -`wails build` 用于将您的项目编译为生产可用的二进制文件。 - -| 标志 | 描述 | 默认 | -|:--------------- |:------------------------------------------------------------------------------------------------------------- |:---------------------------------------------------------------------------------------------------------- | -| -platform | 为指定的 [平台](../reference/cli#平台)(逗号分割)构建,例如: `windows/arm64`。 `windows/arm64`。 注意,如果不给出架构,则使用 `runtime.GOARCH`。 | 如果给定环境变量 platform = `GOOS` 否则等于 `runtime.GOOS`。
如果给定环境变量 arch = `GOARCH` 否则等于 `runtime.GOARCH`. | -| -clean | 清理 `build/bin` 目录 | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -nopackage | 不打包应用程序 | | -| -o 文件名 | 输出文件名 | | -| -s | 跳过前端构建 | false | -| -f | 强制构建应用 | false | -| -tags "额外标签" | 构建标签以传递给 Go 编译器。 必须引用。 空格或逗号(但不能同时使用)分隔 | | -| -upx | 使用 “upx” 压缩最终二进制文件 | | -| -upxflags | 传递给 upx 的标志 | | -| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 安装策略:download,embed,browser,error. | download | -| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | | -| -debug | 在应用程序中保留调试信息。 允许在应用程序窗口中使用 devtools | false | -| -trimpath | 从生成的可执行文件中删除所有文件系统路径。 | false | -| -race | 使用 Go 的竞态检测器构建 | false | -| -windowsconsole | 保留Windows构建控制台窗口 | | -| -obfuscate | 使用 [garble](https://github.com/burrowers/garble) 混淆应用程序 | false | -| -garbleargs | 传递给 garble 的参数 | `-literals -tiny -seed=random` | - -有关 `webview2` 标志的详细描述,请参阅 [Windows 系统指南](../guides/windows)。 - -如果您更喜欢使用标准 Go 工具进行构建,请参阅 [手动构建指南](../guides/manual-builds)。 - -示例: - -`wails build -clean -o myproject.exe` - -:::info 苹果芯片上的 UPX - - -在苹果芯片上使用 UPX 相关的 [问题](https://github.com/upx/upx/issues/446)。 - -::: - - -:::info Windows 上的 UPX - - -一些防病毒软件供应商误将 `upx` 压缩的二进制文件标记为病毒,请查看相关 [问题](https://github.com/upx/upx/issues/437)。 - -::: - - -### 平台 - -支持的平台有: - -| 平台 | 描述 | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## 诊断检查 - -`wails doctor` 将运行诊断程序以确保您的系统已准备好进行开发。 - -示例: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## 开发 - -`wails dev` 用于以 "实时开发" 模式运行您的应用。 这意味着: - -- 应用程序的 `go.mod` 将被更新为与 Wails CLI 相同的版本 -- 应用程序被编译并自动运行 -- 一个观察者被启动,如果它检测到您的 go 文件的变化,它将触发您的开发应用程序的重新构建 -- 启动一个网络服务器 `http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。 这允许您使用您喜欢的浏览器开发扩展 -- 所有应用程序资源都从磁盘加载。 如果它们被更改,应用程序将自动重新加载(而不是重新构建)。 所有连接的浏览器也将重新加载 -- 生成的 JS 模块提供以下内容: - - 带有自动生成的 JSDoc 的 Go 方法的 Javascript 包装器,提供代码提示 - - 您的 Go 结构体的 TypeScript 版本,可以构造并传递给您的 Go 方法 -- 生成的第二个 JS 模块,为运行时提供包装器 + TS 声明 - -| 标志 | 描述 | 默认 | -|:---------------------------- |:-------------------------------------------------------------------------------------------------------------------------------- |:----------------- | -| -assetdir "./path/to/assets" | 从给定目录提供资产,而不是使用提供的资产 FS | `wails.json` 中的值 | -| -browser | 在启动时打开浏览器到 `http://localhost:34115` | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -e | 触发重新构建的扩展(逗号分隔) | go | -| -reloaddirs | 触发重新加载的附加目录(逗号分隔) | `wails.json` 中的值 | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -tags "额外标签" | 传递给编译器的构建标签(引号和空格分隔) | | -| -loglevel "日志级别" | 要使用的日志级别 - Trace, Debug, Info, Warning, Error | Debug(调试) | -| -noreload | 资产更改时禁用自动重新加载 | | -| -nogen | 禁用生成模块 | | -| -v | 详细级别 (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | 生成生成的Wails JS模块的目录 | `wails.json` 中的值 | -| -debounce | 检测到资产更改后等待重新加载的时间 | 100 (毫秒) | -| -devserver "host:port" | 将 wails 开发服务器绑定到的地址 | "localhost:34115" | -| -frontenddevserverurl "url" | 使用 3rd 方开发服务器 url 提供资产,例如:Vite | "" | -| -appargs "参数" | 以 shell 样式传递给应用程序的参数 | | -| -save | 将指定的 `assetdir`、 `reloaddirs`、 `wailsjsdir`、 `debounce` 、 `devserver` 和 `frontenddevserverurl` 标志的值保存到 `wails.json` 以成为后续调用的默认值。 | | -| -race | 使用 Go 的竞态检测器构建 | false | -| -s | 跳过前端构建 | false | - -示例: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -此命令将执行以下操作: - -- 构建应用程序并运行它(更多细节在 [这里](../guides/manual-builds)) -- 在 `./frontend/src` 中生成 Wails JS 模块 -- 监听 `./frontend/dist` 中文件的更新并在更改时重新加载 -- 打开浏览器并连接到应用程序 - -有更多关于在现有框架脚本中使用此功能的 [信息](../guides/application-development.mdx#live-reloading)。 - -## 生成 - -### 模板 - -Wails 使用模板来生成项目。 `wails generate template` 命令有助于构建模板,以使它可以用于生成项目。 - -| 标志 | 描述 | -|:-------------- |:--------------- | -| -name | 模板名称(必填) | -| -frontend "路径" | 要在模板中使用的前端项目的路径 | - -有关创建模板的更多详细信息,请参阅 [模板指南](../guides/templates)。 - -### 模块 - -`wails generate module` 命令允许您为应用程序手动生成 `wailsjs` 目录。 - -## 更新 - -`wails update` 将更新 Wails CLI 的版本。 - -| 标志 | 描述 | -|:------------- |:----------- | -| -pre | 更新到最新的预发布版本 | -| -version "版本" | 安装指定版本的 CLI | - -## 版本 - -`wails version` 仅输出当前的 CLI 版本。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx deleted file mode 100644 index d89fe06e0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/menus.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 菜单 - -可以将应用程序菜单添加到 Wails 项目。 可以通过定义一个 [菜单结构体](#菜单结构体) 并设置 [`菜单选项`](../reference/options#菜单) 或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 - -如何创建菜单的示例: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -也可以通过更新菜单结构体并调用 [更新应用程序菜单](../reference/runtime/menu#更新应用程序菜单) 来动态更新菜单 。 - -上面的示例使用辅助方法,但是可以手动构建菜单结构。 - -## 菜单结构体 - -Menu 是 MenuItem 的集合: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -对于应用程序菜单,每个 MenuItem 代表一个菜单,例如“编辑”。 - -提供了一个简单的辅助方法来构建菜单: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -这使得代码的布局更像菜单的布局,而无需在创建菜单项后手动添加它们。 或者,您可以只创建菜单项并将它们手动添加到菜单中。 - -## 菜单项结构体 - -MenuItem 表示菜单中的一个项目。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| 字段 | 类型 | 注解 | -| ----------- | ------------------------------------ | ---------------------------- | -| Label | string | 菜单文字 | -| Accelerator | [\*keys.Accelerator](#accelerator) | 此菜单项的键绑定 | -| 类型 | [类型](#type) | 菜单项的类型 | -| Disabled | bool | 禁用菜单项 | -| Hidden | bool | 隐藏此菜单项 | -| Checked | bool | 添加检查项目 (复选框和单选类型) | -| SubMenu | [\*Menu](#menu) | 设置子菜单 | -| Click | [Callback](#callback) | 单击菜单时的回调函数 | -| Role | string | 定义此菜单项的 [角色](#角色)。 暂时只支持 Mac | - -### 快捷键 - -加速器(有时称为键盘快捷键)定义了按键和菜单项之间的绑定。 Wails 将加速器定义为一个组合或键 + [修饰符](#修饰符)。 它们在 `"github.com/wailsapp/wails/v2/pkg/menu/keys"` 包中提供。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -键是键盘上除了`+`的任何字符,它被定义为`加号`。 有些键不能表示为字符,因此可以使用一组命名字符: - -| | | | | -|:-----------:|:-----:|:---------:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `page up` | | -| `page down` | `f15` | `f30` | | - -Wails 还支持使用与 Electron 相同的语法来解析加速器。 这对于将加速器存储在配置文件中很有用。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### 修饰符 - -以下修饰符是可以与加速键结合使用的键: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -许多辅助方法可用于使用修饰符创建加速器: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -可以使用 `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)` 用以下方式组合修饰符 : - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### 类型 - -每个菜单项必须有一个类型,有 5 种类型可用: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -为方便起见,提供了帮助方法来快速创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -您还可以使用“添加”助手直接在菜单上创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -关于单选组的说明:单选组被定义为在菜单中彼此相邻的多个单选菜单项。 这意味着您不需要将项目组合在一起,因为它是自动的。 但是,这也意味着您不能有 2 个彼此相邻的无线电组 - 它们之间必须有一个非无线电项目。 - -### 回调 - -每个菜单项都可能有一个回调,在单击该项时执行: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -该函数被赋予一个 `CallbackData` 结构,该结构指示哪个菜单项触发了回调。 这在使用可能共享回调的单选组时很有用。 - -### 角色 - -:::info 角色 - - -目前仅 Mac 支持角色。 - -::: - - -一个菜单项可能有一个角色,它本质上是一个预定义的菜单项。 我们目前支持以下角色: - -| 角色 | 描述 | -| ------------ | ---------------------------------------- | -| AppMenuRole | 标准的 Mac 应用程序菜单。 可以使用 `menu.AppMenu()` 创建 | -| EditMenuRole | 标准的 Mac 编辑菜单。 可以使用 `menu.EditMenu()` 创建 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx deleted file mode 100644 index a4e511216..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/options.mdx +++ /dev/null @@ -1,689 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 参数选项 - -## 应用程序参数选项 - -该 `Options.App` 结构包含应用程序配置。 它被传递给 `wails.Run()` 方法: - -```go title="Example" -import "github.com/wailsapp/wails/v2/pkg/options" - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - Assets: assets, - AssetsHandler: assetsHandler, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - WindowIsTranslucent: false, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### 标题 - -窗口标题栏中显示的文本。 - -名称:Title
类型:`string` - -### 宽度 - -窗口的初始宽度。 - -名称:Width
类型:`int`
默认值:1024. - -### 高度 - -窗口的初始高度。 - -名称:Height
类型:`int`
默认值:768 - -### 禁用调整窗口尺寸 - -默认情况下,主窗口可调整大小。 将此设置为 `true` 将使其保持固定大小。 - -名称:DisableResize
类型:`bool` - -### 全屏 - -将此设置为 `true` 将在启动时使窗口全屏。 - -名称:Fullscreen
类型:`bool` - -### 无边框 - -设置为`true`时,窗口将没有边框或标题栏。 另请参阅 [无边框窗口](../guides/frameless)。 - -名称:Frameless
类型:`bool` - -### 最小宽度 - -这将设置窗口的最小宽度。 如果给出的值 `Width` 小于这个值,窗口将被设置为 `MinWidth` 默认值。 - -名称:MinWidth
类型:`int` - -### 最小高度 - -这将设置窗口的最小高度。 如果给出的值 `Height` 小于这个值,窗口将被设置为 `MinHeight` 默认值。 - -名称:MinHeight
类型:`int` - -### 最大宽度 - -这将设置窗口的最大宽度。 如果给出的值 `Width` 大于这个值,窗口将被设置为 `MaxWidth` 默认值。 - -名称:MaxWidth
类型:`int` - -### 最大高度 - -这将设置窗口的最大高度。 如果给出的值 `Height` 大于这个值,窗口将被设置为 `MaxHeight` 默认值。 - -名称:MaxHeight
类型:`int` - -### 启动时隐藏窗口 - -设置为 `true` 时,应用程序将被隐藏,直到调用 [显示窗口](../reference/runtime/window#显示窗口)。 - -名称:StartHidden
类型:`bool` - -### 关闭时隐藏窗口 - -默认情况下,关闭窗口将关闭应用程序。 将此设置为 `true` 意味着关闭窗口将隐藏窗口。 - -隐藏窗口。 - -名称:HideWindowOnClose
类型:`bool` - -### 背景颜色 - -此值是窗口的默认背景颜色。 示例:options.NewRGBA(255,0,0,128) - 红色,透明度为 50% - -名称:BackgroundColour
类型:`*options.RGBA`
默认值:white - -### 窗口固定在最顶层 - -窗口在失去焦点时应保持在其他窗口之上。 - -名称:AlwaysOnTop
类型:`bool` - -### 资产 - -应用程序要使用的前端资源。 需要一个 `index.html` 文件。 - -名称:Assets
类型:`embed.FS` - -### 资产处理程序 - - - -资产处理程序是一个通用的 `http.Handler` ,对于资产服务器上的任何非 GET 请求和 `assets` 由于找不到文件而无法从 GET 请求提供服务的 GET 请求都将被调用。 - -| 值 | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | - -注意:Linux 当前非常有限,因为目标是 WebKit2GTK 版本 < 2.36.0。 将来,一些特性将通过引入 WebKit2GTK 2.36.0+ 支持来支持。 - -注意:当与前端 DevServer 结合使用时,可能会有一些限制,例如。 Vite 在不包含文件扩展名的每个路径上提供 index.html。 - -名称:AssetsHandler
类型:`http.Handler` - -### 菜单 - -应用程序要使用的菜单。 [菜单参考](../reference/runtime/menu) 中有关菜单的更多详细信息。 - -:::note - - -在 Mac 上,如果未指定菜单,将创建一个默认菜单。 - -::: - - -名称:Menu
类型:`*menu.Menu` - -### 日志 - -应用程序要使用的记录器。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:Logger
类型:`logger.Logger`
默认值:Logs to Stdout - -### 日志级别 - -默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevel
类型:`logger.LogLevel`
默认值:开发模式为 `Info`, 生产模式为 `Error` - -### 生产日志级别 - -生产构建的默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevelProduction
类型:`logger.LogLevel`
默认值:`Error` - -### 应用启动回调 - -此回调在前端创建之后调用,但在 `index.html` 加载之前调用。 它提供了应用程序上下文。 - -名称:OnStartup
类型:`func(ctx context.Context)` - -### 前端 Dom 加载完成回调 - -在前端加载完毕 `index.html` 及其资源后调用此回调。 它提供了应用程序上下文。 - -名称:OnDomReady
类型:`func(ctx context.Context)` - -### 应用退出回调 - -在前端被销毁之后,应用程序终止之前,调用此回调。 它提供了应用程序上下文。 - -名称:OnShutdown
类型:`func(ctx context.Context)` - -### 应用关闭前回调 - -如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 返回 true 将导致应用程序继续,false 将继续正常关闭。 这有助于与用户确认他们希望退出程序。 - -示例: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -名称:OnBeforeClose
类型:`func(ctx context.Context) bool` - -### 窗口启动状态 - -定义窗口在启动时应如何呈现。 - -| 值 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -名称:WindowStartState
类型:`options.WindowStartState` - -### CSSDragProperty - -指示用于标识哪些元素可用于拖动窗口的 CSS 属性。 默认值:`--wails-draggable` - -名称:CSSDragProperty
类型:`string` - -### CSSDragValue - -指示 `CSSDragProperty` 样式应该具有什么值才能拖动窗口。 默认值:`drag` - -名称:CSSDragValue
类型:`string` - -### 绑定 - -定义需要绑定到前端的方法的结构实例切片。 - -名称:Bind
类型:`[]interface{}` - -### Windows - -这定义了 [Windows 特定的选项](#windows)。 - -名称:Windows
类型:`*windows.Options` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与 [Webview 透明](#webview-透明) 结合使用。 - -对于 build 22621 之前的 Windows 11 版本,将使用 [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw) 方法来实现半透明,这可能会很慢。 对于构建 build 22621 之后的 Windows 11 版本,这将启用速度更快的新半透明类型。 默认情况下,使用的半透明类型将由 Windows 确定。 要对此进行配置,请使用 [背景类型](#背景类型) 选项。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 背景类型 - -:::note - - -需要 Windows 11 build 22621 或更高版本。 - -::: - - -设置窗口的半透明类型。 这仅在 [窗口半透明](#窗口半透明) 设置为 `true` 时适用。 - -名称:BackdropType
类型:`windows.BackdropType` - -值可以是以下之一: - -| 值 | 描述 | -| ------- | -------------------------------------------------------------------------------- | -| Auto | 让 Windows 决定使用哪个背景 | -| None | 不要使用半透明 | -| Acrylic | 使用 [亚克力](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) 效果 | -| Mica | 使用 [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) 效果 | -| Tabbed | 使用 Tabbed。 这是一个类似于 Mica 的背景。 | - -#### 禁用窗口图标 - -将此设置为 `true` 将删除标题栏左上角的图标。 - -名称:DisableWindowIcon
类型:`bool` - -#### 禁用无边框窗口装饰 - -将此设置为 `true` 将移除 [无边框](#无边框) 模式下的窗口装饰。 这意味着将不会有`Aero 阴影` 和 `圆角`显示在窗口上。 请注意,'圆角' 只在 Windows 11 上支持。 - -名称:DisableFramelessWindowDecorations
类型:`bool` - -#### Webview 用户数据路径 - -这定义了 WebView2 存储用户数据的路径。 如果为空将使用 `%APPDATA%\[BinaryName.exe]`。 - -名称:WebviewUserDataPath
类型:`string` - -#### Webview 浏览器路径 - -这定义了带有 WebView2 可执行文件和库的目录的路径 如果为空,则使用系统中安装的 webview2 - -有关固定版本运行时分发的重要信息: - -- [如何获取和提取运行时](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [固定版本的已知问题](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [WebView2 Runtime 固定版本的路径不应包含 \Edge\Application](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -名称:WebviewBrowserPath
类型:`string` - -#### 主题 - -最低 Windows 版本:Windows 10 2004/20H1 - -这定义了应用程序应该使用的主题: - -| 值 | 描述 | -| ------------- | -------------------------------------------- | -| SystemDefault | _默认_。 主题将基于系统默认值。 如果用户更改了他们的主题,应用程序将更新以使用新设置 | -| Dark | 该应用程序将只使用深色主题 | -| Light | 该应用程序将专门使用浅色主题 | - -名称:Theme
类型:`windows.Theme` - -#### 自定义主题 - -:::note - - -最低 Windows 版本:Windows 10/11 2009/21H2 Build 22000 - -::: - - -允许您为浅色和深色模式以及窗口处于活动或非活动状态的 TitleBar、TitleText 和 Border 指定自定义颜色。 - -名称:CustomTheme
类型:`windows.CustomTheme` - -##### 自定义主题类型 - -CustomTheme 结构体使用 `int32` 指定颜色值。 它们采用标准(!)Windows 格式:`0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。 - -注意:任何未提供的值都将默认为黑色。 - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -示例: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### 消息 - -一个如果找不到有效的 webview2 运行时,webview2 安装程序所使用的字符串结构。 - -名称:Messages
类型:`*windows.Messages` - -您可以选择支持的任意语言定制此选项。 - -#### 重置尺寸防抖间隔 - -ResizeDebounceMS 是调整窗口大小时去抖动 webview2 重绘的时间量。 默认值 (0) 将尽可能快地执行重绘。 - -名称:ResizeDebounceMS
类型:`uint16` - -#### 待机回调 - -如果设置,当 Windows 启动切换到低功耗模式(挂起/休眠)时将调用此函数 - -名称:OnSuspend
类型:`func()` - -#### 恢复回调 - -如果设置,当 Windows 从低功耗模式(挂起/休眠)恢复时将调用此函数 - -名称:OnResume
类型:`func()` - -### Mac - -这定义了 [Mac 特定的选项](#mac)。 - -名称:Mac
类型:`*mac.Options` - -#### 标题栏 - -TitleBar 结构提供了配置标题栏外观的能力。 - -名称:TitleBar
类型:[`*mac.TitleBar`](#标题栏结构体) - -##### 标题栏结构体 - -可以使用 TitleBar 选项自定义应用程序的标题栏: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| 设置 | 描述 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| TitlebarAppearsTransparent | 使标题栏透明。 这具有隐藏标题栏和内容填充窗口的效果。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | 隐藏窗口的标题。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | 从 style mask 中删除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) | -| FullSizeContent | 使 webview 填满整个窗口。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | 向窗口添加默认工具栏。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | 删除工具栏下方的线条。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -预配置的标题栏设置可用: - -| 设置 | 示例 | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -示例: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -单击 [此处](https://github.com/lukakerr/NSWindowStyles) 获取有关自定义标题栏的一些灵感。 - -#### 外观 - -Appearance 用于根据 Apple 的 [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) 名称设置您的应用程序的样式。 - -名称:Appearance
类型:[`mac.AppearanceType`](#外观类型) - -##### 外观类型 - -您可以指定应用程序的 [外观](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)。 - -| 值 | 描述 | -| ----------------------------------------------------- | --------------- | -| DefaultAppearance | 使用默认系统值 | -| NSAppearanceNameAqua | 标准日间系统外观 | -| NSAppearanceNameDarkAqua | 标准黑夜系统外观 | -| NSAppearanceNameVibrantLight | 轻盈灵动的外观 | -| NSAppearanceNameAccessibilityHighContrastAqua | 标准白天系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | 标准黑夜系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | 轻盈灵动外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | 深色活力外观的高对比度版本 | - -示例: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明-1) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与[Webview 透明](#webview-透明) 结合使用以制作冰霜效果的应用程序。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 关于 - -此配置允许您在“AppMenu”角色创建的应用程序菜单中设置“关于”菜单项的标题、消息和图标。 - -名称:About
类型:[`*mac.AboutInfo`](#关于结构体) - -##### 关于结构体 - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -如果提供了这些设置,“关于”菜单项将出现在应用程序菜单中(使用`AppMenu` role 时)。 建议这样配置: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -“关于”菜单项将出现在应用程序菜单中: - -```mdx-code-block -
- -
-
-``` - -单击后,将打开一个关于消息框: - -```mdx-code-block -
- -
-
-``` - -### Linux - -这定义了 [Linux 特定的选项](#linux)。 - -名称:Linux
类型:`*linux.Options` - -#### 图标 - -设置代表窗口的图标。 当窗口最小化(也称为图标化)时使用此图标。 - -名称:Icon
类型:`[]byte` - -一些窗口管理器或桌面环境也可能将其放置在窗口框架中,或在其他上下文中显示。 在其他情况下,根本不使用该图标,因此您的预计情况可能会有所不同。 - -注意:Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。 - -图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。 - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 某些窗口管理员可能忽略它,或导致黑窗口。 - -名称:WindowIsTranslucent
类型:`bool` \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx deleted file mode 100644 index a21d26b5d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/project-config.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 项目配置 - -项目配置在项目目录中的 `wails.json` 文件中。 配置的结构是: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -该文件将在运行 `wails build` 或 `wails dev` 时,由 Wails CLI 读取。 - -`wails build/dev` 命令中的 `assetdir`、`reloaddirs`、`wailsjsdir`、`debounceMS`、`devserver` 和 `frontenddevserverurl` 标志将覆盖项目配置并作为后续运行的默认值。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx deleted file mode 100644 index 26b81b958..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# 浏览器 - -这些方法与系统浏览器相关。 - -### 浏览器打开 URL - -使用系统默认浏览器打开给定的 URL。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx deleted file mode 100644 index 169a288f2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,304 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 对话框 - -运行时的这一部分提供对原生对话框的调用,例如文件选择器和消息框。 - -:::info Javascript - - -JS 运行时当前不支持对话框。 - -::: - - -### 打开选择目录对话框 - -打开一个对话框,提示用户选择目录。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选目录(如果用户取消则为空白)或错误 - -### 打开选择文件对话框 - -打开一个对话框,提示用户选择文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 打开选择多文件对话框 - -打开一个对话框,提示用户选择多个文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返回值: 选定的文件(如果用户取消则为 nil)或错误 - -### 保存文件对话框 - -打开一个对话框,提示用户选择文件名以进行保存。 可以使用 [保存文件对话框参数选项](#保存文件对话框参数选项) 自定义。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 消息对话框 - -使用消息对话框显示消息。 可以使用 [消息对话框参数选项](#消息对话框参数选项) 进行自定义。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返回值: 所选按钮的文本或错误 - -## 参数选项 - -### 打开选择文件对话框参数选项 - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ------------------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| ResolvesAliases | 如果为 true,则返回文件而不是别名 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 保存文件对话框参数选项 - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ----------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 消息对话框参数选项 - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| ------------- | ------------------------------ | -------------- | --- | --- | -| 类型 | 消息对话框的类型,例如问题、信息... | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| Message | 向用户显示的消息 | ✅ | ✅ | ✅ | -| Buttons | 按钮标题列表 | | ✅ | | -| DefaultButton | 带有此文本的按钮应被视为默认按钮。 必定 `return`。 | ✅[*](#windows) | ✅ | | -| CancelButton | 带有此文本的按钮应被视为取消。 必定 `escape` | | ✅ | | - -#### Windows - -Windows 具有标准对话框类型,其中的按钮不可自定义。 返回的值将是以下之一:"Ok"、"Cancel"、"Abort"、"Retry"、"Ignore"、"Yes"、"No"、"Try Again"或"Continue"。 - -对于问题对话框,默认按钮是 “是”,取消按钮是 “否”。 可以通过将 `默认按钮` 值设置为 `"否"` 来改变这一点。 - -示例: -```go - result, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Question", - Message: "Do you want to continue?", - DefaultButton: "No", - }) -``` - -#### Linux - -Linux 有标准的对话框类型,其中的按钮是不可定制的。 返回的值将是以下之一:“Ok”、“Cancel”、“Yes”、“No” - -#### Mac - -Mac 上的消息对话框最多可以指定 4 个按钮。 如果没有 `DefaultButton` 或 `CancelButton` 给出,第一个按钮被认为是默认的并绑定到 `return` 键。 - -对于以下代码: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -第一个按钮显示为默认值: - -```mdx-code-block -
- -
-
-``` - -如果我们指定 `DefaultButton` 为“two”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -第二个按钮显示为默认值。 当 `return` 被按下时,则返回数值“two”。 - -```mdx-code-block -
- -
-
-``` - -如果我们现在指定`CancelButton`为“three”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -带有“three”的按钮显示在对话框的底部。 当 `escape` 被按下时,则返回值“three”: - -```mdx-code-block -
- -
-
-
-
-``` - -#### 对话框类型 - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### 文件过滤 - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac 对话框只有一组模式来过滤文件的概念。 如果提供了多个 FileFilters,Wails 将使用所有定义的模式。 - -示例: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -这将导致使用 `*.png,*.jpg,*.mov,*.mp4` 作为过滤器打开文件对话框。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx deleted file mode 100644 index 478eef71b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 事件 - -Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 Javascript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 - -### 添加事件侦听器 - -此方法为给定的事件名称设置一个侦听器。 当 [触发指定事件](#触发指定事件) 名为 `eventName` 类型的事件时,将触发回调。 与触发事件一起发送的任何其他数据都将传递给回调。 - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOn(eventName string, callback function(optionalData?: any))` - -### 移除事件侦听器 - -此方法取消注册给定事件名称的侦听器,可选地,可以通过 `additionalEventNames` 取消注册多个侦听器。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### 添加只触发一次的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但只会触发一次。 - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{}))`
JS: `EventsOnce(eventName string, callback function(optionalData?: any))` - -### 添加指定对多触发次数的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但最多只能触发 `counter` 次。 - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int)`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int)` - -### 触发指定事件 - -此方法触发指定的事件。 可选数据可以与事件一起传递。 这将触发任意事件侦听器。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx deleted file mode 100644 index c491166b9..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。 - -它具有以下实用方法: - -- [窗口](window.mdx) -- [菜单](menu.mdx) -- [对话框](dialog.mdx) -- [事件](events.mdx) -- [浏览器](browser.mdx) -- [日志](log.mdx) - -Go 运行时可通过导入 `github.com/wailsapp/wails/v2/pkg/runtime` 获取。 此包中的所有方法都将 context 作为第一个参数。 此 context 应该从 [应用启动回调](../options.mdx#onstartup) 或 [前端 Dom 加载完成回调](../options.mdx#ondomready) 回调方法中获取。 - -:::info 注意 - - -虽然上下文将提供给 [应用启动回调](../../reference/options#应用启动回调) 方法,但不能保证运行时将在此方法中工作,因为窗口正在不同的线程中初始化。 如果您希望在启动时调用运行时方法,请使用 [前端 Dom 加载完成回调](../../reference/options#前端-dom-加载完成回调) 方法。 - -::: - - -Javascript 库可通过 `window.runtime` 提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 Typescript 声明。 这应该位于您的前端目录的`wailsjs`目录中。 - -### 隐藏 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -隐藏应用程序。 - -:::info 注意 - - -`Hide` 在 Mac 上,这将以与标准 Mac 应用程序中的菜单项相同的方式隐藏应用程序。 这与隐藏窗口不同,但应用程序仍处于前台。 对于 Windows 和 Linux,这与 `WindowHide` 相同。 - -::: - - -### 显示 - -显示应用程序。 - -:::info 注意 - - -在 Mac 上,这会将应用程序带回前台。 对于 Windows 和 Linux,这目前与 `WindowShow` 相同。 - -::: - - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### 退出 - -退出应用程序。 - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### 环境 - -返回当前环境的详细信息。 - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### 环境信息 - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx deleted file mode 100644 index d88b29e5e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 日志 - -Wails 运行时提供了一种可以从 Go 或 Javascript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: - -- Trace(追踪) -- Debug(调试) -- Info(信息) -- Warning(警告) -- Error(错误) -- Fatal(致命) - -记录器将输出当前或更高日志级别的任何日志消息。 示例:`Debug`日志级别将输出除`Trace`消息之外的所有消息。 - -### Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### 格式化 Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### 格式化 Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### 格式化 Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### 格式化 Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### 格式化 Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### 格式化 Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### 格式化 Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### 设置日志级别 - -设置日志级别。 在 Javascript 中,该数字与以下日志级别有关: - -| 值 | 日志等级 | -| - | ----------- | -| 1 | Trace(追踪) | -| 2 | Debug(调试) | -| 3 | Info(信息) | -| 4 | Warning(警告) | -| 5 | Error(报错) | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## 使用自定义日志 - -可以通过使用应用程序参数选项 [日志](../../reference/options#日志) 提供自定义记录器来使用它。 唯一的要求是记录器实现在 `github.com/wailsapp/wails/v2/pkg/logger` 里 `logger.Logger` 定义的接口: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx deleted file mode 100644 index 63f8793cd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 菜单 - -这些方法与应用程序菜单相关。 - -:::info Javascript - - -JS 运行时当前不支持菜单。 - -::: - - -### 设置应用程序菜单 - -将应用程序菜单设置为给定的 [菜单](../menus.mdx)。 - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### 更新应用程序菜单 - -获取传递给 `MenuSetApplicationMenu` 的菜单的任意更改更新应用程序菜单。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx deleted file mode 100644 index 1cd1d14a4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/window.mdx +++ /dev/null @@ -1,223 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 窗口 - -这些方法可以控制应用程序窗口。 - -### 窗口标题 - -设置窗口标题栏中的文本。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### 窗口全屏 - -使窗口全屏。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### 窗口取消全屏 - -恢复全屏之前的先前窗口尺寸和位置。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### 窗口是否全屏 - -如果窗口是全屏的,则返回 true。 - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### 窗口居中 - -使窗口在当前窗口所在的监视器上居中。 - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### 窗口执行JS代码 - -在窗口中执行任意 JS 代码。 - -此方法在浏览器中异步运行代码并立即返回。 如果脚本导致任何错误,它们将只在浏览器控制台中可用。 - -Go: `WindowExecJS(ctx context.Context, js string)` - -### 窗口重新加载 - -执行“重新加载”(重新加载当前页面)。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### 重新加载应用程序前端。 - -重新加载应用程序前端。 - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### 窗口设置系统默认主题 - -仅限 Windows。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -将窗口主题设置为系统默认值(暗/亮)。 - -### 窗口设置浅色主题 - -仅限 Windows。 - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -将窗口主题设置为浅色。 - -### 窗口设置深色主题 - -仅限 Windows。 - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -将窗口主题设置为深色。 - -### 显示窗口 - -显示窗口,如果它当前是隐藏的。 - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -### 隐藏窗口 - -如果当前可见,则隐藏窗口。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### 窗口是否为正常 - -如果窗口未最小化、最大化或全屏,则返回 true。 - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### 设置窗口尺寸 - -设置窗口的宽度和高度。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### 获取窗口尺寸 - -获取窗口的宽度和高度。 - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### 设置窗口最小尺寸 - -设置窗口最小尺寸。 如果窗口当前小于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### 设置窗口最大尺寸 - -设置窗口最大尺寸。 如果窗口当前大于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### 设置窗口置顶 - -设置窗口置顶或取消置顶。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### 设置窗口位置 - -设置相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### 获取窗口位置 - -获取相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### 窗口最大化 - -最大化窗口以填满屏幕。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### 窗口取消最大化 - -将窗口恢复到最大化之前的尺寸和位置。 - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### 窗口是否最大化 - -如果窗口最大化,则返回 true。 - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### 窗口最大化切换 - -在最大化和未最大化之间切换。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### 窗口最小化。 - -最小化窗口。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### 窗口取消最小化 - -将窗口恢复到最小化之前的尺寸和位置。 - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### 窗口是否最小化 - -如果窗口最小化,则返回 true。 - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### 窗口设置背景色 - -将窗口的背景颜色设置为给定的 RGBA 颜色定义。 这种颜色将显示所有透明像素。 - -R、G、B 和 A 的有效值为 0-255。 - -:::info Windows - - -在 Windows 上,仅支持 0 或 255 的 alpha 值。 任何非 0 的值都将被视为 255。 - -::: - - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript 对象定义 - -### Position(位置) - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size(尺寸) - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx deleted file mode 100644 index 110870ac5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,249 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 狗狗 API - -```mdx-code-block -
- -
-
-``` - -:::note - - -本教程由 [@tatadan](https://twitter.com/tatadan) 友情提供,是他们的 [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples) 的一部分。 - -::: - - -在本教程中,我们将开发一个应用程序,从网络上检索狗的照片,然后显示它们。 - -### 创建项目 - -让我们创建应用程序。 从终端输入:`wails init -n dogs-api -t svelte` - -注意:如果您想添加 IDE 支持,我们可以选择在此命令的末尾添加 `-ide vscode` 或 `-ide goland`。 - -现在让我们 `cd dogs-api` 开始编辑项目文件。 - -### 删除未使用的代码 - -我们将从删除一些我们知道不会使用的元素开始: - -- 打开 `app.go` 并删除以下行: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- 打开 `frontend/src/App.svelte` 并删除所有行。 -- 删除 `frontend/src/assets/images/logo-universal.png` 文件 - -### 创建应用程序 - -现在让我们添加新的 Go 代码。 - -在函数定义之前添加以下结构声明到 `app.go`: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -将以下函数添加到 `app.go`(可能在现有函数定义之后): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -将 `app.go` 的 `import` 部分修改为如下所示: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -将以下行添加到 `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - - - -### 创建应用程序 - -要生成绑定并测试应用程序,请运行 `wails dev`。 - -### 编译应用程序 - -要将应用程序编译为单个可用于生产的二进制文件,请运行 `wails build`。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx deleted file mode 100644 index 596703d1c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 你好世界 - -本教程的目的是让您使用 Wails 启动并运行最基本的应用程序。 你将可以: - -- 创建一个新的 Wails 应用 -- 构建应用 -- 运行应用 - -:::note - - -本教程使用 Windows 作为目标平台。 根据您的操作系统,输出会略有不同。 - -::: - - -## 创建一个新的 Wails 应用 - -使用默认的 vanilla JS 模板创建新的 Wails 程序, 您需要运行这个指令: - -```bash -wails init -n helloworld -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -这将在当前目录中创建一个名为 `helloworld` 的新目录。 在此目录中,您将找到许多文件: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## 构建应用 - -要构建应用程序,请切换到新的 `helloword` 项目目录并运行以下命令: - -```bash -wails build -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -这已经编译了应用程序并将其保存在 `build/bin` 目录中。 - -## 运行应用 - -如果我们在 Windows 文件管理器中查看 `build/bin` 目录,我们应该看到我们的项目二进制文件: - -```mdx-code-block -
- -
-
-``` - -我们可以通过简单的双击 `helloworld.exe` 文件来运行它。 - -在 Mac 上,Wails 生成一个 `helloworld.app` 文件,可以通过双击来运行。 - -在 Linux 上,您可以从 `build/bin` 目录使用 `./helloword` 运行应用程序。 - -您应该看到应用程序正常工作: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json deleted file mode 100644 index 1374f0d55..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json deleted file mode 100644 index 9827bf0c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "社区", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx deleted file mode 100644 index efd963510..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/links.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 链接 - -此页面用于列出社区相关的链接。 请提交 PR(点击页面底部的 `编辑此页`)增加链接。 - -## Awesome Wails - -Wails 相关的 [优秀列表](https://github.com/wailsapp/awesome-wails)。 - -## 支持的频道 - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 测试版讨论板](https://github.com/wailsapp/wails/discussions/828) - -## 社交媒体 - -- [Twitter](https://twitter.com/wailsapp) -- [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号:1067173054 - -## 其他教程和文章 -- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx deleted file mode 100644 index 134365aaf..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/filehound.mdx +++ /dev/null @@ -1,16 +0,0 @@ -# FileHound Export Utility - -```mdx-code-block -

- -
-

-``` - -[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities. - -The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. - -Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2 - -Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/riftshare.mdx deleted file mode 100644 index 6224bbf89..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## 功能 - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx deleted file mode 100644 index c3d10598e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/community/templates.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 模板 - -此页面用作社区支持的模板列表。 请提交一个包含您的模板的 PR(点击页面底部的 `编辑此页`)。 要构建您自己的模板,请参考 [模板](../guides/templates) 指南。 - -要使用这些模板,请运行 `wails init -n "您的项目名" -t [下面的链接[@版本]]` - -如果不带版本后缀,默认使用的是主分支代码模板。 如果带有版本后缀,则使用该版本对应标签的代码模板。 - -示例:`wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue` - -:::warning 注意 - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - -## Vue - -- [wails-template-vue](https://github.com/misitebao/wails-template-vue) - 基于 Vue 生态的 Wails 模板(集成 TypeScript、黑暗主题、国际化、单页路由、TailwindCSS) -- [wails-vite-vue-ts](https://github.com/codydbentley/wails-vite-vue-ts) - 使用 Vite 的 Vue 3 TypeScript(以及添加功能的说明) -- [wails-vite-vue-the-works](https://github.com/codydbentley/wails-vite-vue-the-works) - 使用 Vite, Vuex, Vue Router, Sass, 和 ESLint + Prettier 的 Vue 3 TypeScript -- [wails-template-quasar-js](https://github.com/sgosiaco/wails-template-quasar-js) - 使用 JavaScript + Quasar V2(Vue 3, Vite, Sass, Pinia, ESLint, Prettier)的模板 -- [wails-template-quasar-ts](https://github.com/sgosiaco/wails-template-quasar-ts) - 使用 TypeScript + Quasar V2(Vue 3、Vite、Sass、Pinia、ESLint、Prettier、带 <script setup> 的Composition API)的模板 - -## Angular - -- [wails-angular-template](https://github.com/TAINCER/wails-angular-template) - 带有 TypeScript, Sass, 热重载, 代码拆分和 i18n 的 Angular - -## React - -- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - 基于 reactjs 的模板 -- [wails-react-template](https://github.com/flin7/wails-react-template) - 基于 React 并支持实时开发模式的轻量级模板 -- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - 基于 Vite + React + TypeScript 的模板 -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - 一个 React + TypeScript + Vite + TailwindCSS 模板 - -## Svelte - -- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - 基于 Svelte 的模板 -- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - 使用 Svelte 和 Vite 的模板 -- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - 使用 Svelte 和 Vite 和 TailwindCSS v3 的模板 -- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - 基于 Next.js + TypeScript 的模板 - -## Solid - -- [wails-template-vite-solid-js](https://github.com/xijaja/wails-template-solid-js) - 基于 Solid + Js + Vite 的模版 -- [wails-template-vite-solid-ts](https://github.com/xijaja/wails-template-solid-ts) - 基于 Solid + Ts + Vite 的模版 - -## Elm - -- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - 使用函数式编程和 **快速** 的热重载设置开发您的 GUI 应用程序 :tada: :rocket: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - 结合 Elm + Tailwind CSS + Wails 的力量 :muscle: ! 支持热重载。 - -## 纯 JavaScript (Vanilla) - -- [wails-pure-js-template](https://github.com/KiddoV/wails-pure-js-template) - 一个只有基本 JavaScript、HTML 和 CSS 的模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/developing-new-features.mdx deleted file mode 100644 index 9fc9025bd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/developing-new-features.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 开发新功能 - -We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: The process for adding new features are as follows: - -- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. -- Before developing, check that the ticket includes the following information: -- The purpose of the enhancement -- What is out of scope for the enhancement -- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details -- Comment on the ticket stating you wish to develop the feature -- Clone the repository and create a branch with the format `feature/_` -- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes -- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/documenting.mdx deleted file mode 100644 index 84e472903..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/documenting.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 40 ---- - -# 文档 - -This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code. - -We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. - -To set up a local documentation development environment, do the following: - -- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install) -- `cd website` -- `npm install` -- `npm run start` - -After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. - -## Versioning - -We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. - -There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories. - -The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. - -## Languages - -The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. - -### Add new language - -If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/fixing-bugs.mdx deleted file mode 100644 index 01eceeccd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/fixing-bugs.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_position: 30 ---- - -# 修复漏洞 - -The process for fixing bugs are as follows: - -- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix -- Before developing, check that the ticket includes the following information: -- The scope of the issue including platforms affected -- The steps to reproduce. The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example -- The output of `wails doctor` -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. -- Comment on the ticket stating you wish to develop a fix -- Clone the repository and create a branch with the format `bugfix/_` -- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -bugfixes should be discussed as the approach may have unintended side effects. -::: ::: -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/setting-up-a-dev-environment.mdx deleted file mode 100644 index 1133e275d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/setting-up-a-dev-environment.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 设置开发环境 - -You can set up a development environment by doing the following: - -- Install the latest versions of Go and Git -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert back to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/ways-of-contributing.mdx deleted file mode 100644 index 3bbe9a889..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/contributing/ways-of-contributing.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 贡献方式 - -Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. - -There are many ways to contribute to the project: - -- Developing new features -- Fixing bugs -- Testing -- Documenting features -- Writing tutorials / guides -- Helping others on the issues + discussions boards - -Guides for these have been created in their own sections. Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx deleted file mode 100644 index c4fe879bc..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 编译您的项目 - -从项目目录,运行 `wails build`。 这将编译您的项目并将构建的可用于生产的二进制文件保存在 `build/bin` 目录中。 - -如果您运行二进制文件,您应该会看到默认应用程序: - -```mdx-code-block -
- -
-
-``` - -有关编译选项的更多详细信息,请参阅 [构建命令](../reference/cli#构建)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx deleted file mode 100644 index e681d5940..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/development.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 开发您的应用程序 - -您可以通过从项目目录运行 `wails dev` 在开发模式下运行您的应用程序。 这将执行以下操作: - -- 构建您的应用程序并运行它 -- 将您的 Go 代码绑定到前端,以便可以从 Javascript 调用它 -- 使用 [Vite](https://vitejs.dev/) 的强大功能,将监视您的 Go 文件中的修改并在更改时重新构建/重新运行 -- 启动一个 [网络服务器](http://localhost:34115) 通过浏览器为您的应用程序提供服务。 这使您可以使用自己喜欢的浏览器扩展。 你甚至可以从控制台调用你的 Go 代码。 - -首先,在项目目录中运行 `wails dev`。 可以在 [此处](../reference/cli#开发) 找到有关这方面的更多信息。 - -即将提供:教程 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx deleted file mode 100644 index e789438b0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/firstproject.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 创建项目 - -## 项目生成 - -现在 CLI 已安装,您可以使用 `wails init` 命令生成一个新项目。 - -选择您最喜欢的框架: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - 使用 Javascript 生成一个 Svelte 项目:

- - wails init -n myproject -t svelte - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t svelte-ts - -
- - 使用 Javascript 生成一个 React 项目:

- - wails init -n myproject -t react - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t react-ts - -
- - 使用 Javascript 生成一个 Vue 项目:

- - wails init -n myproject -t vue - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vue-ts - -
- - 使用 Javascript 生成一个 Preact 项目:

- - wails init -n myproject -t preact - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t preact-ts - -
- - 使用 Javascript 生成一个 Lit 项目:

- - wails init -n myproject -t lit - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t lit-ts - -
- - 使用 Javascript 生成一个 Vanilla 项目:

- - wails init -n myproject -t vanilla - -如果您更愿意使用 Typescript:
- - wails init -n myproject -t vanilla-ts - -
-
-``` - -
- -还有提供不同功能和框架的 [社区模板](../community/templates.mdx)。 - -要查看其他可用选项,您可以运行 `wails init -help`。 更多详细信息可以在 [初始化命令](../reference/cli#初始化) 中找到。 - -## 项目布局 - -Wails 项目有以下布局: - -``` -. -├── build/ -│ ├── appicon.png -│ ├── darwin/ -│ └── windows/ -├── frontend/ -├── go.mod -├── go.sum -├── main.go -└── wails.json -``` - -### 项目结构概要 - -- `/main.go` - 主应用 -- `/frontend/` - 前端项目文件 -- `/build/` - 项目构建目录 -- `/build/appicon.png` - 应用程序图标 -- `/build/darwin/` - Mac 特定的项目文件 -- `/build/windows/` - Windows 特定的项目文件 -- `/wails.json` - 项目配置 -- `/go.mod` - Go module 文件 -- `/go.sum` - Go module 校验文件 - -`frontend` 目录没有特定于 Wails 的内容,可以是您选择的任何前端项目。 - -`build` 目录在构建过程中使用。 这些文件可以修改以自定义您的构建。 如果从 build 目录中删除文件,将重新生成默认版本。 - -`go.mod` 中的默认模块名称是“changeme”。 您应该将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx deleted file mode 100644 index 224730636..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/gettingstarted/installation.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 安装 - -## 支持的平台 - -- Windows 10/11 AMD64/ARM64 -- MacOS 10.13+ AMD64 -- MacOS 11.0+ ARM64 -- Linux AMD64/ARM64 - -## 依赖 - -Wails 有许多安装前需要的常见依赖项: - -- Go 1.18+ -- NPM (Node 15+) - -### Go - -从 [Go 下载页面](https://go.dev/dl/) 下载 Go。 - -确保您遵守官方的 [Go 安装说明](https://golang.org/doc/install#install)。 您还需要确保您的 `PATH` 环境变量包含您的 `~/go/bin` 目录路径。 重启终端并执行以下命令检查: - -- 检查 Go 是否安装正确: `go version` -- 检查 "~/go/bin" 是否在您的 PATH 变量中: `echo $PATH | grep go/bin` - -### NPM - -从 [Node 下载页面](https://nodejs.org/en/download/) 下载 NPM。 最好使用最新版本,因为这是我们通常会测试的版本。 - -运行 `npm --version` 进行验证。 - -## 平台特定依赖关系 - -您还需要安装平台特定的依赖项: - -```mdx-code-block -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - Wails 要求安装 xcode 命令行工具。 这可以通过运行 xcode-select --install 来完成。 - - - Wails 要求安装 WebView2 运行时。 一些 Windows 安装已经安装了这个。 您可以使用 wails doctor 命令进行检查。 - - - Linux 需要标准 gcc 构建工具以及 libgtk3libwebkit。 与其为不同的发行版列出大量命令,Wails 可以尝试确定针对您的特定发行版的安装命令。 安装后运行 wails doctor 以显示如何安装依赖项。 如果您的发行版/包管理器不受支持,请参阅 添加Linux发行版指南。 - - -``` - -## 可选依赖 - -- [UPX](https://upx.github.io/) 用于压缩您的应用程序。 - -## 安装 Wails - -运行 `go install github.com/wailsapp/wails/v2/cmd/wails@latest` 安装 Wails CLI。 - -注意:如果您遇到了类似于以下内容的错误: - -```shell -....\Go\pkg\mod\github.com\wailsapp\wails\v2@v2.1.0\pkg\templates\templates.go:28:12: pattern all:ides/*: no matching files found -``` -请检查您是否已安装 Go 1.18+ ︰ -```shell -go version -``` - -## 系统检查 - -运行 `wails doctor` 将检查您是否安装了正确的依赖项。 如果没有,它会就缺少的内容提供建议以帮助纠正问题。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx deleted file mode 100644 index df6ef37db..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# 应用开发 - -使用 Wails 开发应用程序没有硬性规定,但有一些基本准则。 - -## 应用程序设置 - -默认模板使用 `main.go` 配置和运行应用程序, 同时`app.go` 用于定义应用程序逻辑. - -`app.go`文件将定义一个结构体,该结构体有 2 个方法作为主应用程序的回调: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- 一旦 Wails 分配了它需要的资源,就会调用 startup 方法,它是创建资源、设置事件侦听器以及应用程序在启动时需要的任何其他东西的好地方。 它提供了一个 `context.Context`, 通常保存在一个结构体字段中。 调用 [运行时](../reference/runtime/intro) 需要此`context.Context`。 如果此方法返回错误,则应用程序将终止。 在开发模式下,错误会输出到控制台。 - -- Shutdown 方法将在关闭过程结束时由 Wails 调用。 这是释放内存和执行关闭任务的好地方。 - -`main.go` 文件通常由对`wails.Run()`的单个调用组成,它接受应用程序配置。 模板使用的模式是,在调用 `wails.Run()` 之前, 我们创建并保存一个在 `app.go` 中定义的结构体的实例在名为 `app` 的变量中。 这个配置是我们添加回调的地方: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -可以在 [此处](../howdoesitwork#应用程序生命周期回调) 找到有关应用程序生命周期回调的更多信息。 - -## 绑定方法 - -您可能希望从前端调用 Go 方法。 这通常是通过向 `app.go` 中已经定义的结构体中添加公共方法来实现的: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -在主应用程序中,`Bind` 字段是我们告诉 Wails 想要绑定什么: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -这将绑定 `App` 结构中的所有公共方法(它永远不会绑定 startup 和 shutdown 方法)。 - -### 绑定多个结构体时处理 context - -如果您想为多个结构绑定方法,但希望每个结构都保留对 context 的引用,以便您可以使用运行时函数,一个好的方式是将上下文从 `OnStartup` 方法传递给您的结构实例: - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -可以在 [此处](../howdoesitwork.mdx#method-binding) 找到有关绑定的更多信息。 - -## 应用程序菜单 - -Wails 支持向您的应用程序添加菜单。 这是通过将 [菜单结构体](../reference/menus#菜单结构体) 传递给应用程序配置来完成的。 常见做法是使用一个返回菜单的方法,更常见的是用作生命周期回调的 `App` 结构体上的方法。 - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## 资产 - -Wails v2 处理资源的方式的伟大之处在于它不需要处理! 您唯一需要给 Wails 的是一个 `embed.FS`。 你如何做到这一点完全取决于你。 您可以像 vanilla 模板一样使用 vanilla html/css/js 文件。 您可能有一些复杂的构建系统,但这并不影响。 - -运行 `wails build` 时,它会检查项目根目录的 `wails.json` 文件。 文件中有 2 个字段会被读取: - -- "frontend:install" -- "frontend:build" - -第一个,如果有给定,将在 `frontend` 目录中执行以安装 node 模块。 第二个,如果有给定,将在 `frontend` 目录中执行以构建前端项目。 - -如果没有给出这两个字段,那么 Wails 不会对前端做任何操作。 它仅仅被用作 `embed.FS`。 - -### 资产处理程序 - -Wails v2 应用程序可以选择在 `options.App` 中定义一个 `http.Handler`,它允许连接到 AssetServer 以动态创建文件或处理 POST/PUT 请求。 GET 请求总是首先由 `assets` FS 处理。 如果 FS 没有找到请求的文件,请求将被转发到 `http.Handler` 服务。 如果指定,除了 GET 以外的任何请求都将由 `AssetsHandler` 直接处理。 也可以仅通过将 `nil` 指定为 `Assets` 选项来使用 `AssetsHandler`。 - -## 内置开发服务器 - -运行 `wails dev` 将启动内置的开发服务器,它将在您的项目目录中启动一个文件监听器。 默认情况下,如果有任何文件更改,wails 会检查它是否是应用程序文件(默认:.go,可使用 `-e` 标志配置)。 如果是,那么它将重新构建您的应用程序并重新启动它。 如果更改的文件在 assetdir 目录中,它会在很短的时间后重新加载。 - -开发服务器使用一种称为“防抖”的技术,这意味着它不会立即重新加载,因为可能会在短时间内更改多个文件。 当触发发生时,它会在发出重新加载之前等待一定的时间。 如果发生另一个触发,它会再次重置为等待时间。 默认情况下,此值为 100ms。 如果此值不适用于您的项目,则可以使用 `-debounce` 标志进行配置。 如果使用,此值将保存到您的项目配置中并成为默认值。 - -## 外部开发服务器 - -一些框架带有自己的实时重新加载服务器,但是它们将无法利用 Wails Go 绑定。 在这种情况下,最好运行一个监听脚本,将项目重新构建到构建目录中,Wails 将监视该目录。 有关示例,请参阅使用 [rollup](https://rollupjs.org/guide/en/) 的默认 svelte 模板。 对于 [create-react-app](https://create-react-app.dev/),可以使用 [此脚本](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) 来实现类似的结果。 - -## Go 模块 - -默认的 Wails 模板会生成一个包含模块名称“changeme”的 `go.mod` 文件。 您应该在项目生成后将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx deleted file mode 100644 index 2030d04f2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/bleeding-edge.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# 前沿风险技术 - -## 概述 - -Wails 一直在开发中,新版本会定期“标记”。 这通常发生在 `master` 分支上所有较新的代码都经过测试并确认有效时。 如果您需要尚未发布的错误修复或功能,可以通过以下步骤使用最新的“前沿风险”版本: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -注意:您将项目克隆到的目录现在将被称为“clonedir”。 - -现在,Wails CLI 将是最新版本。 - -### 更新您的项目 - -要更新项目以使用最新版本的 Wails 库,请更新项目 `go.mod` 并确保以下行位于文件底部: - -`replace github.com/wailsapp/wails/v2 => ` - -示例: - -在 Windows 上:`replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -在'nix 上:`replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -要恢复到稳定版本,请运行: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` - -## 测试一个分支 - -如果要测试一个分支,请按照上面的说明进行操作,但请确保在安装之前切换要测试的分支: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git checkout -b branch-to-test --track origin/branch-to-test` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 - -## 测试 PR - -如果您想测试 PR,请按照上面的说明进行操作,但请确保在安装前获取 PR 并切换分支。 请替换 `[IDofThePR]` 为 github.com 上显示的 PR 的 ID: - -- `git clone https://github.com/wailsapp/wails` -- `cd wails` -- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]` -- `git checkout test/pr-[IDofThePR]` -- `git reset --hard HEAD` -- `cd v2/cmd/wails` -- `go install` - -确保如上所述 [更新您的项目](#更新您的项目)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx deleted file mode 100644 index 7c4246863..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/frontend.mdx +++ /dev/null @@ -1,72 +0,0 @@ -# 前端 - -## 脚本注入 - -当 Wails 为您的 `index.html` 提供服务时,默认情况下,它会将 2 个脚本注入 `` 标签以加载 `/wails/ipc.js` 和 `/wails/runtime.js`。 这些文件分别安装绑定和运行时。 - -下面的代码显示了这些默认注入的位置: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - -``` - -### 覆盖默认脚本注入 - -为了给开发人员提供更大的灵活性,有一个 meta 标签可用于自定义此行为: - -```html - -``` - -选项如下: - -| 值 | 描述 | -| ------------------- | -------------------------- | -| noautoinjectruntime | 禁用自动注入 `/wails/runtime.js` | -| noautoinjectipc | 禁用自动注入 `/wails/ipc.js` | -| noautoinject | 禁用所有脚本自动注入 | - -可以使用多个选项,前提是它们以逗号分隔。 - -此代码完全有效并且与自动注入版本的操作相同: - -```html - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx deleted file mode 100644 index dfcdc5fb2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -此页面包含与开发适用于 Linux 的 Wails 应用程序相关的其他指南。 - -## video 标签不能触发 "ended" 事件 - -使用视频标签时,视频播放完毕后不会触发“结束”事件。 这是 WebkitGTK 中的一个错误,但是您可以使用以下解决方法来修复它: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -资料来源:[讨论板](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) 上的 [Lyimmi](https://github.com/Lyimmi) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx deleted file mode 100644 index 83de0fdfd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# 手动构建 - -Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项目。 本文档将讨论 CLI 执行的不同操作以及如何以不同方式实现这一点。 - -## 构建过程 - -当使用 `wails build` 或 `wails dev` 时,Wails CLI 会执行一个通用的构建过程: - - - 安装前端依赖 - - 构建前端项目 - - 生成构建资产 - - 编译应用程序 - - [可选]压缩应用程序 - -### 安装前端依赖 - -#### 命令行步骤 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有安装命令 `frontend:install` -- 如果没有,则跳过此步骤 -- 如果有,则检查前端目录中是否存在 `package.json`。 如果不存在,则跳过这一步 -- 从 `package.json` 文件内容生成 MD5 -- 检查 `package.json.md5` 是否存在,如果存在,则将其内容(MD5 sum)与生成的内容进行比较,以查看内容是否已更改。 如果相同,则跳过此步骤 -- 如果 `package.json.md5` 不存在,则使用生成的 MD5 并创建它 -- 如果现在需要构建,或者 `node_modules` 不存在,或者给出了`-f` 标志,则在前端目录中执行安装命令 - -#### 手动步骤 - -这一步可以从命令行或带有 `npm install` 的前端脚本完成. - -### 构建前端项目 - -#### Wails 命令行 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有构建命令 `frontend:build` -- 如果没有,则跳过此步骤 -- 如果有,就在 frontend 目录下执行它 - -#### 手动步骤 - -这一步可以从命令行或带有前端构建脚本 `npm run build` 的脚本或任何前端构建脚本完成。 - -### 生成资产 - -#### Wails 命令行 - -- 如果设置了`-nopackage` 标志,则跳过此阶段 -- 如果 `build/appicon.png` 文件不存在,则创建一个默认文件 -- 对于 Windows,请参阅 [ Windows](#windows) -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 图像创建它。 - -##### Windows - -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 创建 256、128、64、48、32 和 16 大小的图标。 这是使用 [winicon](https://github.com/leaanthony/winicon) 完成的。 -- 如果 `build/windows/.manifest` 文件不存在,它会从默认版本创建它。 -- 将应用程序编译为生产版本(如上所述)。 -- 使用 [winres](https://github.com/tc-hib/winres) 将 icon 和 manifest 打包到一个 `.syso` 文件。 - -#### 手动步骤 - -- 使用[winicon](https://github.com/leaanthony/winicon)命令行工具或者其他工具创建`icon.ico` -- 为您的应用程序创建或者更新 `.manifest` 文件 -- 使用 [winres 命令行](https://github.com/tc-hib/go-winres) 生成一个 `.syso` 文件 - -### 编译应用程序 - -#### Wails 命令行 - -- 如果提供了 `-clean` 标志,则删除并重新创建 `build` 目录 -- 对于 `wails dev`,使用以下默认 Go 标志:`-tags dev -gcflags "all=-N -l"` -- 对于 `wails build`,使用以下默认 Go 标志:`-tags desktop,production -ldflags "-w -s"` - - 在 Windows 上,是 `-ldflags "-w -h -H windowsgui"` -- 传递给 CLI 的附加标签使用 `-tags` 添​​加到默认值中 -- 传递给 CLI 的附加 `ldflags-ldflags` 添加到默认值 -- 传递 `-o` 标志 -- 将使用指定的 Go 编译器 `-compiler` 进行编译 - -#### 手动步骤 - -- 对于 dev 构建,最少的命令是:`go build -tags dev -gcflags "all=-N -l"` -- 对于生产构建,最少的命令是:`go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- 确保在与 `.syso` 文件相同的目录中进行编译 - -### 压缩应用程序 - -#### Wails 命令行 - -- 如果 `-upx` 已给出标志,将运行 `upx` 程序以使用默认设置压缩应用程序 -- 如果也传递了 `-upxflags` 标志,则使用这些标志而不是默认 - -#### 手动步骤 - -- 手动运行 `upx [flags]` 以压缩应用程序。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx deleted file mode 100644 index c248d1f50..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/migrating.mdx +++ /dev/null @@ -1,193 +0,0 @@ -# 从 v1 迁移 - -## 概述 - -Wails v2 与 v1 相比有重大变化。 本文档旨在重点介绍迁移现有项目的更改和步骤。 - -### 创建应用程序 - -在 v1 中,使用 `wails.CreateApp` 来创建主应用程序,使用 `app.Bind` 来添加绑定,然后使用 `app.Run()` 运行应用程序。 - -示例: - -```go title="v1" - app := wails.CreateApp(&wails.AppConfig{ - Title: "MyApp", - Width: 1024, - Height: 768, - JS: js, - CSS: css, - Colour: "#131313", - }) - app.Bind(basic) - app.Run() -``` - -在 v2 中,只有一个 `wails.Run()` 方法接受 [应用程序参数选项](../reference/options#应用程序参数选项)。 - -```go title="v2" - err := wails.Run(&options.App{ - Title: "MyApp", - Width: 800, - Height: 600, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - basic, - }, - }) -``` - -### 绑定 - -在 v1 中,可以绑定任意函数和结构。 在 v2 中,这已被简化为仅绑定结构体。 以前 v1 传递给 `Bind()` 中的方法的结构实例现在在 [应用程序参数选项 ](../reference/options#应用程序参数选项)`Bind` 字段中指定: - -```go title="v1" - app := wails.CreateApp(/* options */) - app.Bind(basic) -``` - -```go title="v2" - err := wails.Run(&options.App{ - /* other options */ - Bind: []interface{}{ - basic, - }, - }) -``` - -在 v1 中,绑定方法可用于前端的 `window.backend`。 这已更改为 `window.go`。 - -### 应用程序生命周期 - -在 v1 中,绑定结构中有 2 个特殊方法:`WailsInit()` 和 `WailsShutdown()`。 作为应用程序选项的一部分,这些已被 3 个生命周期钩子替换: - -- [应用启动回调](../reference/options.mdx#onstartup) -- [应用退出回调](../reference/options.mdx#onshutdown) -- [前端 Dom 加载完成回调](../reference/options.mdx#ondomready) - -注意:[ 前端 Dom 加载完成回调](../reference/options#前端-dom-加载完成回调)替换了 v1 中的 `wails:ready` 系统事件。 - -这些方法可以是标准函数,但通常的做法是让它们成为结构的一部分: - -```go title="v2" - basic := NewBasicApp() - err := wails.Run(&options.App{ - /* Other Options */ - OnStartup: basic.startup, - OnShutdown: basic.shutdown, - OnDomReady: basic.domready, - }) -... -type Basic struct { - ctx context.Context -} -func (b *Basic) startup(ctx context.Context) { - b.ctx = ctx -} -... -``` - -### 运行时 - -v2 中的运行时比 v1 丰富得多,支持菜单、窗口操作和更好的对话框。 方法的签名略有变化 - 请参阅 [运行时](../reference/runtime/intro)。 - -在 v1 中,[运行时](../reference/runtime/intro) 可通过传递给 `WailsInit()`。 在 v2 中,运行时已移出到它自己的包。 运行时中的每个方法都采用 `context.Context` 传递给了 [应用启动回调](../reference/options#应用启动回调)方法。 - -```go title="Runtime Example" -package main - -import "github.com/wailsapp/wails/v2/pkg/runtime" - -type Basic struct { - ctx context.Context -} - -// startup is called at application startup -func (a *App) startup(ctx context.Context) { - a.ctx = ctx - runtime.LogInfo(ctx, "Application Startup called!") -} -} -} - -``` - -### 资产 - -在 v2 最大的变化是资源的处理方式。 - -在 v1 中,资源通过 2 个应用程序参数选项传递: - -- `JS` - 应用程序的 Javascript -- `CSS` - 应用程序的 CSS - -这意味着生成单个 JS 和 CSS 文件的责任在于开发人员。 这本质上需要使用繁琐的打包程序,例如 webpack。 - -在 v2 中,Wails 不对您的前端资源做任何预设,就像网络服务器一样。 您的所有应用程序资源都作为 `embed.FS`。 - -**这意味着不需要捆绑您的资产、将图像编码为 Base64 或尝试使用捆绑器配置的黑暗艺术来使用自定义字体**。 - -在启动时,Wails 将扫描给定的`embed.FS`的`index.html`并将其位置用作所有其他应用程序资源的根路径 - 就像网络服务器一样。 - -示例:应用程序具有以下项目布局。 所有最终资源都放在 `frontend/dist`目录中: - -```shell -. -├── build/ -├── frontend/ -│ └── dist/ -│ ├── index.html -│ ├── main.js -│ ├── main.css -│ └── logo.svg -├── main.go -└── wails.json -``` - -应用程序可以通过简单地创建一个 `embed.FS` 来使用这些资源: - -```go title="Assets Example" -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - err := wails.Run(&options.App{ - /* Other Options */ - AssetServer: &assetserver.Options{ - Assets: assets, - }, - }) -} -``` - -当然,如果您愿意,也可以使用打包工具。 唯一的要求是在 Wails 中使用 `embed.FS` 将最终的程序资源目录传递给 [应用程序参数选项](../reference/options#应用程序参数选项) 的 `Assets` 键。 - -### 项目配置 - -在 v1 中,项目配置存储在项目根的 `project.json` 文件中。 在 v2 中,项目配置存储在项目根部的 `wails.json` 文件中。 - -文件的格式略有不同。 下面是区别: - -

- -| v1 | v2 | Notes | -| ------------------ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | name | | -| description | | Removed | -| author / name | author / name | | -| author / email | author / email | | -| version | version | | -| binaryname | outputfilename | Changed | -| frontend / dir | | Removed | -| frontend / install | frontend:install | Changed | -| frontend / build | frontend:build | Changed | -| frontend / bridge | | Removed | -| frontend / serve | | Removed | -| tags | | Removed | -| | wailsjsdir | The directory to generate wailsjs modules | -| | assetdir | The directory of the compiled frontend assets for `dev` mode. This is normally inferred and could be left empty. | -| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. 这只需要一些更重要的资源配置。 | - -

diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx deleted file mode 100644 index 13e54ec46..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# 鼠标按钮 - -Wails 运行时拦截鼠标单击以确定无框窗口是否需要调整大小或需要移动窗口。 有人询问如何检测鼠标点击何时发生,因为 `window.onclick` 没有正确报告鼠标按钮。 下面的代码展示了如何检测鼠标点击: - -```javascript -window.addEventListener("mousedown", handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -参考:https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx deleted file mode 100644 index 64673dafd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 滚动超出 - -[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) 是当您滚动超出页面内容边界时有时会获得的“弹跳效果”。 这在移动应用程序中很常见。 这可以使用 CSS 禁用: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx deleted file mode 100644 index b1b4c6690..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# 路由 - -路由是一种在应用程序中切换视图的流行方式。 此页面提供了有关如何执行此操作的一些指导。 - -## Vue - -在 Vue 中推荐的路由方法是 [Hash 模式](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from "vue-router"; - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}); -``` - -## Angular - -在 Angular 中推荐的路由方法是 [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies/#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -React 中推荐的路由方法是 [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx deleted file mode 100644 index 7ce7dc9b2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/signing.mdx +++ /dev/null @@ -1,387 +0,0 @@ -# 代码签名 - -这是有关如何在 MacOS 和 Windows 上对使用 Wails 生成的二进制文件进行签名的指南。 该指南将针对 CI 环境,更具体地说是 GitHub Actions。 - -## Windows - -首先,您需要一个代码签名证书。 如果您还没有,Microsoft 的信息页面会 [在此处](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate) 列出一些提供商。 请注意,除非您需要编写内核级软件,例如设备驱动程序,否则不需要 EV 证书。 为了签署你的 Wails 应用程序,一个标准的代码签名证书就可以了。 - -在针对自动构建系统之前,与您的证书提供商核实如何在您的本地计算机上签署您的二进制文件可能是一个好主意,这样您就知道是否有任何特殊要求。 例如,[这里](https://www.ssl.com/how-to/using-your-code-signing-certificate/) 是 SSL.com 的 Windows 代码签名指南。 如果您知道如何在本地签名,则可以更轻松地解决 CI 环境中的任何潜在问题。 例如,SSL.com 代码签名证书需要 [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) 的 `/tr` 标志, 而其他提供商可能只需要 `/tr` 标志来提供时间戳服务器。 用于签署 [此类](https://github.com/Dana-Prajea/code-sign-action) Windows 二进制文件的流行 GitHub Actions 不支持 SignTool.exe 上的 `/tr` 标志。 因此,本指南将重点介绍使用 PowerShell 命令手动签署我们的应用程序,但如果您愿意,可以使用类似 [代码签名操作](https://github.com/Dana-Prajea/code-sign-action) 的操作。 - -首先,让我们确保我们能够在我们的 GitHub CI 中构建我们的 Wails 应用程序。 这是一个小型工作流模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -接下来,我们需要让 GitHub 工作流访问我们的签名证书。 这是通过将您的 .pfx 或 .p12 证书编码为 base64 字符串来完成的。 要在 PowerShell 中执行此操作,您可以使用以下命令,假设您的证书名为“my-cert.p12”: - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -您现在应该拥有带有 base64 编码证书的 .txt 文件。 它应该以 _-----BEGIN CERTIFICATE-----_ 开头并以 _-----END CERTIFICATE-----_ 结尾。 现在你需要在 GitHub 上创建两个 action secret。 导航到 _Settings -> Secrets -> Actions_ 并创建以下两个 secrets: - -- **WIN_SIGNING_CERT** 您的 base64 编码证书文本的内容。 -- **WIN_SIGNING_CERT_PASSWORD** 您的证书密码的内容。 - -现在我们准备好使用以下两种方法之一在我们的工作流程中实现签名: - -### 方法一:使用命令签名 - -此方法使用 PowerShell 命令对我们的应用程序进行签名,并让您控制整个签名过程。 - -在该 `"Build Wails app"` 步骤之后,我们可以将以下步骤添加到我们的工作流程中: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -此脚本为您的证书文件创建一个新目录,从我们的 base64 密钥创建证书文件,将其转换为 .pfx 文件,最后对二进制文件进行签名。 最后一行需要替换以下变量: - -- **签名算法**:通常是 sha256。 -- **时间戳服务器**:与您的证书一起使用的时间戳服务器的 URL。 -- **二进制路径**:要签名的二进制文件的路径。 - -鉴于我们的 Wails 配置将 `outputfilename` 设置为“app.exe”并且我们拥有来自 SSL.com 的证书,这将是我们的工作流程: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### 方法二:Action自动签名 - -可以使用像 [这样](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 的 Windows 代码签名操作,但请注意,它需要证书的 SHA1 哈希和证书名称。 查看如何在 Action 的 [市场](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 上配置它的示例。 - ---- - -## MacOS - -首先,您需要 Apple 提供的代码签名证书。 如果您没有,简单的谷歌搜索将帮助您获得一个。 获得证书后,您需要将其导出并将其编码为 base64。 本 [教程](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) 向您展示了如何以简单的方式做到这一点。 导出 .p12 证书文件后,您可以使用以下命令将其编码为 base64,如教程中所示: - -```bash -base64 Certificates.p12 | pbcopy -``` - -现在您已准备好创建一些 GitHub 项目 secrets,就像在 Windows 中一样: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** 您新复制的 base64 证书的内容。 -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** 与您的证书密码的内容。 -- **APPLE_PASSWORD** 包含您可以在 [此处](https://appleid.apple.com/account/manage) 生成的 Apple-ID 帐户的应用程序特定密码的内容。 - -让我们确保我们能够在我们的 GitHub Action 工作流程中构建我们的 Wails 应用程序。 这是一个小模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -对于 macOS 上的代码签名,[gon](https://github.com/mitchellh/gon) 是一个非常方便的工具,用于代码签名和与 Apple 服务器通信,也是用 Go 编写的,将在本指南中使用。 - -在 `Build Wails 应用` 步骤之后,将以下内容添加到工作流中: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source": ["./build/bin/app.app"], - "bundle_id": "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign": { - "application_identity": "Developer ID Application: My Name" - } -} -``` - -其中 `source` 是您的 Wails 二进制文件,`bundle_id` 是您的捆绑包 ID,`apple_id` 包含您之前创建的 Apple ID 用户名和 App-Specific 密码,`sign.application_identity` 是您的身份,您可以通过运行以下命令找到它: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -在此文件中,您可以配置应用所需的权利,例如 如果您的应用使用相机,相机权限。 在 [此处](https://developer.apple.com/documentation/bundleresources/entitlements) 阅读有关权利的更多信息。 - -确保您已使用您在 `gon-sign.json` 中输入的相同包 ID 更新了 `Info.plist` 文件。 这是一个示例 `Info.plist` 文件: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -现在我们准备好在构建 Wails 应用程序后在我们的工作流程中添加签名步骤: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -请注意,与 Apple 签署二进制文件可能需要几分钟到几小时。 - -## 组合工作流文件: - -这是我们结合了 Windows + macOS 的 GitHub 工作流文件: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - - name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -# 尾注 - -本指南受 RiftShare 项目及其工作流程的启发,强烈建议在 [此处](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml) 查看。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx deleted file mode 100644 index 7f701203d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# 模板 - -Wails 从预先创建的模板生成项目。 在 v1 中,这是一组难以维护的项目,这些项目可能会过时。 在 v2 中,为了增强社区的能力,为模板添加了一些新功能: - -- 能够从 [远程模板](../reference/cli#远程模板) 生成项目 -- 帮助创建自己的模板的工具 - -## 创建模板 - -要创建模板,您可以使用 `wails generate template` 命令。 要生成默认模板,请运行: - -`wails generate template -name mytemplate` - -这将使用默认文件创建“mytemplate”目录: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### 模板概述 - -默认模板包含以下文件和目录: - -| 文件名 / 目录 | 描述 | -| --------------- | ----------------- | -| NEXTSTEPS.md | 有关如何完成模板的说明 | -| README.md | 随模板发布的 README | -| app.tmpl.go | `app.go` 模板文件 | -| frontend/ | 包含前端资源的目录 | -| go.mod.tmpl | `go.mod` 模板文件 | -| main.tmpl.go | `main.go` 模板文件 | -| template.json | 模板元数据 | -| wails.tmpl.json | `wails.json` 模板文件 | - -此时,建议按照 `NEXTSTEPS.md` 中的步骤操作。 - -## 从现有项目创建模板 - -通过在生成模板时将路径传递给项目,可以从现有的前端项目创建模板。 我们现在将介绍如何创建 Vue 3 模板: - -- 安装 vue cli: `npm install -g @vue/cli` -- 创建默认项目:`vue create vue3-base` - - 选择 `Default (Vue 3) ([Vue 3] babel, eslint)` -- 项目生成后,运行: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- 现在可以按照 `NEXTSTEPS.md` 中指定的方式定制模板。 -- 一旦文件准备完毕,就可以通过运行命令来测试它:`wails init -n my-vue3-project -t .\wails-vue3-template\` -- 要测试新项目,请运行:`cd my-vue3-project` then `wails build` -- 项目编译完成后,运行它:`.\build\bin\my-vue3-project.exe` -- 您应该有了一个功能齐全的 Vue3 应用程序: - -```mdx-code-block -
- -
-``` - -## 发布模板 - -发布模板只是将文件推送到 GitHub。 鼓励以下最佳实践: - -- 从前端目录中删除任何不需要的文件和目录(例如:.git) -- 确保 `template.json` 完整,尤其是 `helpurl` -- 将文件推送到 GitHub -- 在 [社区模板](../community/templates) 页面上创建 PR -- 在 [模板公告](https://github.com/wailsapp/wails/discussions/825) 讨论板上发布模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx deleted file mode 100644 index f0dee12e4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/troubleshooting.mdx +++ /dev/null @@ -1,162 +0,0 @@ -# 故障排除 - -各种故障排除技巧。 - -## `wails` 命令好像不见了? - -如果您的系统报告缺少 `wails` 命令,请确保您已正确遵循 Go 安装指南。 通常,这意味着您的用户 home 目录中的 `go/bin` 目录不在 `PATH` 环境变量中。 通常情况下还需要关闭并重新打开任何已打开的命令提示符,以便安装程序对环境所做的更改反映在命令提示符中。 - -## 我的应用程序正在显示白屏/空白屏幕 - -检查您的应用程序是否包含正确目录中的资产。 在您的 `main.go` 文件中,您将拥有类似于以下代码的内容: - -```go -//go:embed all:frontend/dist -var assets embed.FS -``` - -检查它是否 `frontend/dist` 包含您的应用程序资产。 - -### Mac - -如果在 Mac 上发生这种情况,请尝试将以下内容添加到您的 `Info.plist`: - -```xml -NSAppTransportSecurity - - NSAllowsLocalNetworking - - -``` - -参考:https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433 - -## Mac 应用程序无效 - -如果您构建的应用程序在 finder 中如下所示: - -```mdx-code-block -

- -

-``` - -您的申请很可能 `info.plist` 是无效的。 更新 `build/.app/Contents/info.plist`文件 并检查数据是否有效,比如:检查二进制名称是否正确。 要保留更改,请将文件复制回 `build/darwin` 目录。 - -## 无法使用可变参数 - -如果您有使用可变参数定义的后端方法,例如: - -```go -func (a *App) TestFunc(msg string, args ...interface{}) error { - // Code -} -``` - -像这样从前端调用此方法将失败: - -```js -var msg = "Hello: "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, ...args) - .then((result) => { - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -解决方法: - -```js -var msg = "Hello "; -var args = ["Go", "JS"]; -window.go.main.App.TestFunc(msg, args) - .then((result) => { - //without the 3 dots - //do things here - }) - .catch((error) => { - //handle error - }); -``` - -致谢:https://github.com/wailsapp/wails/issues/1186 - -## 我正在尝试安装Wails时获取代理错误 - -如果您遇到这样的错误: - -``` -"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -``` - -这可能是因为官方 Go Proxy 被阻止(中国用户报告了这一点)。 解决方案是手动设置代理,例如: - -``` -go env -w GO111MODULE=on -go env -w GOPROXY=https://goproxy.cn,direct -``` - -来源:https://github.com/wailsapp/wails/issues/1233 - -## 没有生成正确的 Typescript 类型 - -有时生成的 Typescript 没有正确的类型。 `ts_type` 为了缓解这种情况,可以使用 struct 标签指定应该生成哪些类型。 有关详细信息,请阅读 [此](https://github.com/tkrajina/typescriptify-golang-structs#custom-types) 内容。 - -## 当我离开 `index.html`时,我无法在前端调用方法 - -如果您导航 `index.html` 到一个新的 html 文件,上下文将会丢失。 这可以通过将以下导入添加到 `` 您导航到的任何新页面的部分来解决: - -```html - - - - -``` - -来源:https://github.com/wailsapp/wails/discussions/1512 - -## 运行 `wails dev` 出现 `too many open files` 错误 - -默认情况下,macOS 最多只能打开 256 个文件。 这会影响 `wails dev` 命令 可以通过在终端中运行:`ulimit -n 1024` 来增加此限制。 - -FSNotify 正在 [寻求转移到苹果](https://github.com/fsnotify/fsnotify/issues/11)。 如果这不能很快完成,我们将创建自己的实现,在 [此处](https://github.com/wailsapp/wails/issues/1733) 跟踪。 - -## 我的 Mac 应用程序给了我奇怪的编译错误 - -一些用户报告看到编译错误,如下所示: - -```shell -# github.com/wailsapp/wails/v2/internal/frontend/desktop/darwin -In file included from ../../pkg/mod/github.com/wailsapp/wails/v2@v2.0.0-beta.44.2/internal/frontend/desktop/darwin/callbacks.go:9: -In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString -- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - ~~~~~~~~~~~~~~ ^ ~ -/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT' - #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A))) -``` - -这 _通常_ 是由于您正在运行的操作系统版本和安装的 XCode 命令行工具的版本不匹配。 如果您看到这样的错误,请尝试将您的 XCode 命令行工具升级到最新版本。 - -如果重新安装 Xcode 命令工具仍然失败,您可以通过以下方式检查工具包所在的路径: - -`xcode-select -p` - -如果显示 `/Applications/Xcode.app/Contents/Developer` ,运行 `sudo xcode-select --twitter /Library/Developer/CommandLineTools` - -来源:https://github.com/wailsapp/wails/issues/1806 和 https://github.com/wailsapp/wails/issues/1140#issuecomment-1290446496 - --- - -## 无法启动服务:主机版本“x.x.x”与二进制版本“x.x.x”不匹配 - -最好将 `frontend/node_modules` 和 `frontend/package-lock.json` 添加到您的 `.gitignore` 中。 否则,当在另一台可能安装了不同版本 Node 的机器上打开您的存储库时,您可能无法运行您的应用程序。 - -如果发生这种情况,只需删除 `frontend/node_modules` 和 `frontend/package-lock.json` 并再次运行 `wails build` 或 `wails dev` 命令。 \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx deleted file mode 100644 index ea2d1b99d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -此页面提供在使用带有 Wails 的 Visual Studio Code 时的各种提示和技巧。 - -## Vetur 配置 - -非常感谢 [@Lyimmi](https://github.com/Lyimmi) 的这个提示。 最初张贴 [在这里](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349)。 - -Vetur 是一个流行的 Visual Studio Code 插件,它为 Vue 项目提供语法高亮和代码完成。 在 VSCode 中加载 Wails 项目时,Vetur 会抛出错误,因为它期望在根目录中找到前端项目。 要解决此问题,您可以执行以下操作: - -在项目根目录创建一个以 `vetur.config.js` 命名的文件。 - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -接下来,配置 `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -这应该使您现在可以按预期使用 Vetur。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx deleted file mode 100644 index 02c73c16c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS 安装程序 - -```mdx-code-block -

- -
-

-``` - -Wails 支持使用 [NSIS 安装程序](https://nsis.sourceforge.io/) 生成 Windows 安装程序。 - -## 安装 NSIS - -### Windows - -安装程序可在 [NSIS 下载页面](https://nsis.sourceforge.io/Download) 上找到。 - -如果您使用 chocolatey 包管理器,请运行以下脚本: - -``` -choco install nsis -``` - -如果手动安装 NSIS,则需要将 NSIS 安装目录中包含 `makensis.exe` 的 *Bin* 目录添加到 PATH 中。 [这是](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) 一个关于如何在 Windows 上添加到 PATH 的好教程。 - -### Linux - -应该可以通过您的发行版的软件包管理器获得 `nsis` 包。 - -### MacOS - -NSIS 可通 homebrew 安装:`brew install nsis`。 - -## 生成安装程序 - -创建新项目时,Wails 会在 `build/windows/installer` 中生成 NSIS 配置文件。 从 `installer/info.json` 读取配置数据,并配置为使用项目的 `wails.json` 信息部分: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -要为您的应用程序生成安装程序,请使用 `wails build` 的 `-nsis` 标志: - -``` -wails build -nsis -``` - -现在可用安装程序将生成在 `build/bin` 目录中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx deleted file mode 100644 index 0fc857c81..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -此页面包含了在 Windows 上开发 Wails 应用程序相关的其他指南。 - -## 处理 WebView2 运行时依赖 - -为 Windows 构建 Wails 应用程序时对 Microsoft [WebView2 运行时](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) 有要求。 默认情况下,Windows 11 会安装它,但有些机器不会。 Wails 提供了一种简单的方法来处理这种依赖关系。 - -通过在构建时使用 `-webview2` 标志, 您可以决定在未检测到合适的运行时的时候(包括安装的运行时是否太旧)应用程序将执行的操作。 四个选项是: - -1. Download(下载) -2. Embed(内嵌) -3. Browser(浏览器) -4. Error(报错) - -### Download(下载) - -此选项将提示用户在未找到合适的运行时时,提供从 Microsoft 的 WebView2 官方站点下载并运行引导程序。 如果用户继续,官方引导程序将被下载并运行。 - -### Embed(内嵌) - -此选项将官方引导程序嵌入到应用程序中。 如果没有找到合适的运行时,应用程序将提供并运行引导程序。 这将使二进制大小增加约 150k。 - -### Browser(浏览器) - -此选项将提示用户没有找到合适的运行时时,提供打开浏览器到 WebView2 官方页面,可以下载和安装引导程序。 然后应用程序将会退出,安装的操作留给用户。 - -### Error(报错) - -如果未找到合适的运行时间,则会向用户显示错误并且不采取进一步措施。 - -## 固定版本运行时 - -处理 webview2 依赖的另一种方法是自己发送。 您可以下载 [固定版本的运行时](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) 并将其捆绑或与您的应用程序一起下载。 - -此外,您应该在启动 wails 时在结构体 `windows.Options` 中指定 webview2 运行时的固定版本的路径。 - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -注意:当 `WebviewBrowserPath` 指定时,`error` 策略将在最小要求版本不匹配或运行时路径无效的情况下被强制执行。 - -## 创建其他程序 - -当生成其他程序(例如脚本)时,您将看到屏幕上出现该窗口。 要隐藏窗口,可以使用以下代码: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -[sithembiso](https://github.com/sithembiso) 在 [讨论板](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172) 上提供的解决方案。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx deleted file mode 100644 index 7370af8a0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/howdoesitwork.mdx +++ /dev/null @@ -1,369 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 它是如何工作的? - -Wails 应用程序是一个带有一个 webkit 前端的标准的 Go 应用程序。 应用程序的 Go 部分由应用程序代码和一个运行时库组成, 该库提供了许多有用的操作,例如控制应用程序窗口。 前端是一个 webkit 窗口,将显示前端资源。 前端还可以使用运行时库的 Javascript 版本。 最后,可以将 Go 方法绑定到前端,这些将显示为可以调用的 Javascript 方法,就像它们是原生 Javascript 方法一样。 - -```mdx-code-block -
- -
-``` - -## 主应用程序 - -### 概述 - -主应用程序由对 `wails.Run()` 的调用组成。 它接受描述应用程序窗口大小、窗口标题、要使用的资源等应用程序配置。 基本应用程序可能如下所示: - -```go title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (b *App) startup(ctx context.Context) { - b.ctx = ctx -} - -func (b *App) shutdown(ctx context.Context) {} - -func (b *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -### 选项概要 - -此示例设置了以下选项: - -- `Title` - 应该出现在窗口标题栏中的文本 -- `Width` & `Height` - 窗口的尺寸 -- `Assets` - 应用程序的前端资产 -- `OnStartup` - 创建窗口并即将开始加载前端资源时的回调 -- `OnShutdown` - 应用程序即将退出时的回调 -- `Bind` - 我们希望向前端暴露的一部分结构体实例 - -完整的应用程序参数选项列表可以在 [参数选项](./reference/options) 中找到。 - -#### 资产 - -`Assets` 选项是必须的,因为您不能拥有没有前端资产的 Wails 应用程序。 这些资产可以是您希望在 Web 应用程序中找到的任何文件 - html、js、css、svg、png 等。 **不需要生成资源包** - 普通文件即可。 当应用程序启动时,它将尝试从您的资产中加载 `index.html`,并且那时起前端基本上将作为浏览器工作。 值得注意的是 `embed.FS` 对文件所在的位置没有要求。 嵌入路径很可能使用了相对于您的主应用程序代码的嵌套目录,例如 `frontend/dist`: - -```go title="main.go" -//go:embed all:frontend/dist -var assets embed.FS -``` - -启动时,Wails 将遍历嵌入的文件,寻找包含的 `index.html`。 所有其他资源将相对于该目录加载。 - -由于可用于生产的二进制文件使用包含在 `embed.FS` 中的文件,因此应用程序不需要附带任何外部文件。 - -在开发模式下使用 `wails dev` 命令,资产从磁盘加载,任何更改都会导致“实时重新加载”。 资产的位置将从 `embed.FS` 推断。 - -更多细节可以在 [应用开发指南](./guides/application-development) 中找到。 - -#### 应用程序生命周期回调 - -在即将加载前端 `index.html` 之前,会对 [应用启动回调](./reference/options#应用启动回调) 中提供的函数进行调用。 一个标准的 Go context 被传递给这个方法。 调用运行时需要此 context ,因此标准模式是在此方法中保存对它的引用。 在应用程序关闭之前,以同样的方式调用 [应用退出回调](./reference/options#应用退出回调),并再次使用上下文 当前端加载完 `index.html` 中所有资源时,还有一个 [前端 Dom 加载完成回调](./reference/options#前端-dom-加载完成回调) ,相当于 Javascript 中的 [`body onload`](https://www.w3schools.com/jsref/event_onload.asp) 事件。 还可以通过设置 [应用关闭前回调](./reference/options#应用关闭前回调) 选项来控制窗口关闭(或应用程序退出)事件。 - -#### 方法绑定 - -`Bind` 选项是 Wails 应用程序中最重要的参数选项之一。 它指定向前端暴露哪些结构体方法。 想想传统 web 应用程序中的 "Controllers" 之类的结构 。 当应用程序启动时,它会检查 `Bind` 字段中列出的结构体实例, 确定哪些方法是公开的(以大写字母开头),并生成前端可以调用的这些方法的 Javascript 版本。 - -:::info 注意 - -Wails 要求您传入结构体的 _实例_ 以使其正确绑定 - -::: - -在此示例中,我们创建一个新的 `App` 实例,然后将此实例添加到 `wails.Run` 中的 `Bind` 选项: - -```go {16,24} title="main.go" -package main - -import ( - "embed" - "log" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - - app := &App{} - - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - - -type App struct { - ctx context.Context -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -您可以绑定任意数量的结构体。 只需确保创建它的实例并将其传递给 `Bind`: - -```go {8-10} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Bind: []interface{}{ - app, - &mystruct1{}, - &mystruct2{}, - }, - }) - -``` - -当您运行 `wails dev`(或 `wails generate module`)时,将生成一个前端模块,其中包含以下内容: - -- 所有绑定方法的 Javascript 绑定 -- 所有绑定方法的 Typescript 声明 -- 绑定方法用作输入或输出的所有 Go 结构的 Typescript 声明 - -这使得使用相同的强类型数据结构从前端调用 Go 代码变得异常简单。 - -## 前端 - -### 概述 - -前端是由 webkit 渲染的文件集合。 这就合二为一的浏览器和网络服务器。 您可以使用的框架或库[^1]几乎没有限制。 前端和 Go 代码之间的主要交互点是: - -- 调用绑定的 Go 方法 -- 调用运行时方法 - -### 调用绑定的 Go 方法 - -当您使用 `wails dev` 运行应用程序时,它将自动在名为 `wailsjs/go` 的目录中为您的结构体生成 Javascript 绑定(您也可以通过运行 `wails generate module` 来执行此操作)。 生成的文件反映了应用程序中的包名称。 在上面的例子中,我们绑定了有公开方法 `Greet` 的 `app`。 这将导致生成以下文件: - -```bash -wailsjs - └─go - └─main - ├─App.d.ts - └─App.js -``` - -在这里我们可以看到有一个 `main` 包,其中包含绑定 `App` 结构体的 Javascript 绑定,以及这些方法的 Typescript 声明文件。 要从我们的前端调用 `Greet`,我们只需导入该方法并像普通的 Javascript 函数一样调用它: - -```javascript -// ... -import { Greet } from "../wailsjs/go/main/App"; - -function doGreeting(name) { - Greet(name).then((result) => { - // Do something with result - }); -} -``` - -Typescript 声明文件为您提供了绑定方法的正确类型: - -```ts -export function Greet(arg1: string): Promise; -``` - -生成的方法返回一个 Promise 成功的调用将导致 Go 调用的第一个返回值被传递给 `resolve` 处理程序。 不成功的调用是当 Go 方法的第二个返回值具有错误类型时,将错误实例传递回调用者。 这通过 `reject` 处理程序传回的。 在上面的示例中,`Greet` 只返回一个 `string`,因此 Javascript 调用永远不会 reject - 除非将无效数据传递给它。 - -所有数据类型都在 Go 和 Javascript 之间正确转换。 包括结构体。 如果您从 Go 调用返回一个结构体,它将作为 Javascript 类返回到您的前端。 - -:::info 注意 - -结构体字段 *必须* 具有有效的 `json` 标签,以包含在生成的 TypeScript 中。 - -目前不支持嵌套匿名结构体。 - -::: - -也可以将结构体发送回 Go。 作为期望的结构体的参数传递的任何 Javascript map/class 都将转换为该结构体类型。 为了使这个过程更容易,在 `开发` 模式下,会生成一个 TypeScript 模块,声明绑定方法中使用的所有结构体类型。 使用此模块,可以构建原生 Javascript 对象并将其发送到 Go 代码。 - -还支持在其签名中使用结构的 Go 方法。 绑定方法(作为参数或返回类型)指定的所有 Go 结构体都将作为 Go 代码包装器模块的一部分自动生成 Typescript 版本。 使用这些,可以在 Go 和 Javascript 之间共享相同的数据模型。 - -示例:我们更新 `Greet` 方法以接受一个 `Person` 而不是字符串: - -```go title="main.go" -type Person struct { - Name string `json:"name"` - Age uint8 `json:"age"` - Address *Address `json:"address"` -} - -type Address struct { - Street string `json:"street"` - Postcode string `json:"postcode"` -} - -func (a *App) Greet(p Person) string { - return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age) -} -``` - -`wailsjs/go/main/App.js` 文件仍将包含以下代码: - -```js title="App.js" -export function Greet(arg1) { - return window["go"]["main"]["App"]["Greet"](arg1); -} -``` - -但是 `wailsjs/go/main/App.d.ts` 文件将使用以下代码进行更新: - -```ts title="App.d.ts" -import { main } from "../models"; - -export function Greet(arg1: main.Person): Promise; -``` - -正如我们所见,“main”命名空间是从一个新的“models.ts”文件中导入的。 该文件包含我们绑定方法使用的所有结构体定义。 在此示例中,这是一个 `Person` 结构。 如果我们查看 `models.ts`,我们可以看到模型是如何定义的: - -```ts title="models.ts" -export namespace main { - export class Address { - street: string; - postcode: string; - - static createFrom(source: any = {}) { - return new Address(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.street = source["street"]; - this.postcode = source["postcode"]; - } - } - export class Person { - name: string; - age: number; - address?: Address; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ("string" === typeof source) source = JSON.parse(source); - this.name = source["name"]; - this.age = source["age"]; - this.address = this.convertValues(source["address"], Address); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice) { - return (a as any[]).map((elem) => this.convertValues(elem, classs)); - } else if ("object" === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } -} -``` - -只要您将 TypeScript 作为前端构建配置的一部分,您就可以通过以下方式使用这些模型: - -```js title="mycode.js" -import { Greet } from "../wailsjs/go/main/App"; -import { main } from "../wailsjs/go/models"; - -function generate() { - let person = new main.Person(); - person.name = "Peter"; - person.age = 27; - Greet(person).then((result) => { - console.log(result); - }); -} -``` - -生成的绑定和 TypeScript 模型的结合构成了一个强大的开发环境。 - -有关绑定的更多信息,请参见 [应用开发指南](guides/application-development.mdx) 的 [绑定方法](guides/application-development.mdx#绑定方法) 部分。 - -### 调用运行时方法 - -Javascript 运行时位于`window.runtime`并包含许多方法来执行各种任务,例如发出事件或执行日志记录操作: - -```js title="mycode.js" -window.runtime.EventsEmit("my-event", 1); -``` - -更多关于 JS 运行时的细节可以在 [运行时参考](reference/runtime/intro) 中找到。 - -[^1]: 有一小部分库使用了 WebView 中不支持的功能。 对于这种情况,通常有替代方案和解决方法。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx deleted file mode 100644 index b4ea09b34..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/introduction.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -Wails 是一个可让您使用 Go 和 Web 技术编写桌面应用的项目。 - -将它看作为 Go 的快并且轻量的 Electron 替代品。 您可以使用 Go 的灵活性和强大功能,结合丰富的现代前端,轻松的构建应用程序。 - -### 功能 - -- 原生菜单、对话框、主题和半透明 -- Windows、macOS 和 linux 支持 -- 内置 Svelte、React 、Preact 、Vue、Lit 和 Vanilla JS 的模板 -- 从 Javascript 轻松调用 Go 方法 -- 自动将Go结构体转换为TypeScript模块 -- Windows 上不需要 CGO 或外部 DLL -- 使用 [Vite ](https://vitejs.dev/) 的实时开发模式 -- 可以轻松创建、构建和打包应用的强大命令行工具 -- 丰富的 [运行时库](/docs/reference/runtime/intro) -- 使用 Wails 构建的应用程序兼容 Apple & Microsoft 商店 - -这是 [varly](https://varly.app) - 一个使用 Wails 编写的 MacOS 和 Windows 桌面应用。 它不仅看起来很强,它使用原生菜单和半透明 - 你希望从现代原生应用中得到的一切 - -```mdx-code-block -

- - - -

-``` - -### 快速启动模板 - -Wails 带有许多预配置的模板,可让您快速启动和运行应用程序。 有以下框架的模板:Svelte、React、Vue、Preact、Lit 和 Vanilla。 每个模板都有 Javascript 和 Typescript 版本。 - -### 原生元素 - -Wails 使用专门构建的库来处理窗口、菜单、对话框等原生元素,因此您可以构建美观、功能丰富的桌面应用程序。 - -**它不嵌入浏览器**,因此性能高。 相反,它使用平台的原生渲染引擎。 在 Windows 上,是基于 Chromium 构建的新 Microsoft Webview2 库。 - -### Go 和 Javascript 互操作 - -Wails 自动使您的 Go 方法可用于 Javascript,因此您可以从前端按名称调用它们! 它甚至会生成 Go 方法使用的结构体的 Typescript 版本,因此您可以在 Go 和 Javascript 之间传递相同的数据结构。 - -### 运行时库 - -当检测到您的应用程序资源发生更改时,您正在运行的应用程序将“重新加载”,几乎立即反馈您的更改。 - -### 实时开发体验 - -#### 自动重新构建 - -当您在“开发”模式下运行您的应用程序时,Wails 会将您的应用程序构建为原生桌面应用程序,但会从磁盘读取您的资源。 它将检测您的 Go 代码的任何更改并自动重新构建和重新启动您的应用程序。 - -#### 自动重新加载 - -当检测到对您的应用程序资产的更改时,您正在运行的应用程序将“重新加载”,几乎立即反映您的更改 - -#### 在浏览器中开发您的应用程序 - -如果您更喜欢在浏览器中调试和开发,那么 Wails 可以满足您的需求。 正在运行的应用程序还有一个网络服务器,它将在连接到它的任何浏览器中运行您的应用程序。 当您的资源在磁盘上发生变化时,它会刷新。 - -### 可用于生产的原生二进制文件 - -当您准备好完成应用程序的最终构建时,CLI 会将其编译为单个可执行文件,并将所有资源打包到其中。 在 Windows 和 MacOS 上,可以创建用于分发的原生包。 使用打包工具后生成的资源(图标、info.plist、清单文件等)是您项目的一部分,可以自定义,让您完全控制应用程序的构建方式。 - -### 工具 - -Wails CLI 提供了一种简单的方法来生成、构建和打包您的应用程序。 它将完成创建图标的繁重工作,使用最佳设置编译您的应用程序,并提供可分发的、可用于生产的二进制文件。 可以从许多入门模板中进行选择,以快速启动和运行! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx deleted file mode 100644 index b9db1b135..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/cli.mdx +++ /dev/null @@ -1,229 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 命令行 - -Wails CLI 有许多用于管理项目的命令。 所有命令都以此方式运行: - -`wails <命令> <标志>` - -## 初始化 - -`wails init` 用于生成项目。 - -| 标志 | 描述 | 默认 | -|:--------- |:---------------------------------------------- |:-------:| -| -n "项目名称" | 项目名称。 **强制必填** | | -| -d "项目目录" | 要创建的项目目录 | 项目名 | -| -g | 初始化 git 存储库 | | -| -l | 可用项目模板列表 | | -| -q | 禁止输出到控制台 | | -| -t "模板名称" | 要使用的项目模板。 这可能是默认模板的名称或托管在 github 上的远程模板的 URL 。 | vanilla | -| -ide | 生成 IDE 项目文件 | | -| -f | 强制构建应用 | false | - -示例: `wails init -n test -d mytestproject -g -ide vscode -q` - -这将在 "mytestproject" 目录生成一个名为 "test" 的项目,初始化 git,生成 vscode 项目文件并静默执行。 - -可以在 [此处](../guides/ides) 找到有关在 Wails 中使用 IDE 的更多信息。 - -### 远程模板 - -支持远程模板(托管在 GitHub )并且可以使用模板项目的 URL 进行安装。 - -示例: `wails init -n test -t https://github.com/leaanthony/testtemplate[@v1.0.0]` - -可以在 [此处](../community/templates.mdx) 找到社区维护的模板列表 - -:::warning 注意 - -**Wails 项目不维护也不对第 3 方模板负责** - -如果您不确定某个模板,请检查 `package.json` 和 `wails.json` 中安装的模块和运行的脚本。 - -::: - -## 构建 - -`wails build` 用于将您的项目编译为生产可用的二进制文件。 - -| 标志 | 描述 | 默认 | -|:--------------- |:------------------------------------------------------------------------------------------------------------- |:---------------------------------------------------------------------------------------------------------- | -| -platform | 为指定的 [平台](../reference/cli#平台)(逗号分割)构建,例如: `windows/arm64`。 `windows/arm64`。 注意,如果不给出架构,则使用 `runtime.GOARCH`。 | 如果给定环境变量 platform = `GOOS` 否则等于 `runtime.GOOS`。
如果给定环境变量 arch = `GOARCH` 否则等于 `runtime.GOARCH`. | -| -clean | 清理 `build/bin` 目录 | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -nopackage | 不打包应用程序 | | -| -o 文件名 | 输出文件名 | | -| -s | 跳过前端构建 | false | -| -f | 强制构建应用 | false | -| -tags "额外标签" | 构建标签以传递给 Go 编译器。 必须引用。 空格或逗号(但不能同时使用)分隔 | | -| -upx | 使用 “upx” 压缩最终二进制文件 | | -| -upxflags | 传递给 upx 的标志 | | -| -v int | 详细级别 (0 - silent, 1 - default, 2 - verbose) | 1 | -| -webview2 | WebView2 安装策略:download,embed,browser,error. | download | -| -u | 更新项目的 `go.mod` 以使用与 CLI 相同版本的 Wails | | -| -debug | 在应用程序中保留调试信息。 允许在应用程序窗口中使用 devtools | false | -| -trimpath | 从生成的可执行文件中删除所有文件系统路径。 | false | -| -race | 使用 Go 的竞态检测器构建 | false | -| -windowsconsole | 保留Windows构建控制台窗口 | | -| -obfuscate | 使用 [garble](https://github.com/burrowers/garble) 混淆应用程序 | false | -| -garbleargs | 传递给 garble 的参数 | `-literals -tiny -seed=random` | - -有关 `webview2` 标志的详细描述,请参阅 [Windows 系统指南](../guides/windows)。 - -如果您更喜欢使用标准 Go 工具进行构建,请参阅 [手动构建指南](../guides/manual-builds)。 - -示例: - -`wails build -clean -o myproject.exe` - -:::Info -在 Mac 上,应用程序将与 `Info.plist` 捆绑在一起,而不是 `Info.dev.plist`。 -::: - -:::info 苹果芯片上的 UPX - -在苹果芯片上使用 UPX 相关的 [问题](https://github.com/upx/upx/issues/446)。 - -::: - -:::info Windows 上的 UPX - -一些防病毒软件供应商误将 `upx` 压缩的二进制文件标记为病毒,请查看相关 [问题](https://github.com/upx/upx/issues/437)。 - -::: - -### 平台 - -支持的平台有: - -| 平台 | 描述 | -|:---------------- |:--------------------------------------------- | -| darwin | MacOS + architecture of build machine | -| darwin/amd64 | MacOS 10.13+ AMD64 | -| darwin/arm64 | MacOS 11.0+ ARM64 | -| darwin/universal | MacOS AMD64+ARM64 universal application | -| windows | Windows 10/11 + architecture of build machine | -| windows/amd64 | Windows 10/11 AMD64 | -| windows/arm64 | Windows 10/11 ARM64 | -| linux | Linux + architecture of build machine | -| linux/amd64 | Linux AMD64 | -| linux/arm64 | Linux ARM64 | - -## 诊断检查 - -`wails doctor` 将运行诊断程序以确保您的系统已准备好进行开发。 - -示例: - -``` -Wails CLI v2.0.0-beta - -Scanning system - Please wait (this may take a long time)...Done. - -System ------- -OS: Windows 10 Pro -Version: 2009 (Build: 19043) -ID: 21H1 -Go Version: go1.18 -Platform: windows -Architecture: amd64 - -Dependency Package Name Status Version ----------- ------------ ------ ------- -WebView2 N/A Installed 93.0.961.52 -npm N/A Installed 6.14.15 -*upx N/A Installed upx 3.96 - -* - Optional Dependency - -Diagnosis ---------- -Your system is ready for Wails development! - -``` - -## 开发 - -`wails dev` 用于以 "实时开发" 模式运行您的应用。 这意味着: - -- 应用程序的 `go.mod` 将被更新为与 Wails CLI 相同的版本 -- 应用程序被编译并自动运行 -- 一个观察者被启动,如果它检测到您的 go 文件的变化,它将触发您的开发应用程序的重新构建 -- 启动一个网络服务器 `http://localhost:34115`,通过 http 为您的应用程序(不仅仅是前端)提供服务。 这允许您使用您喜欢的浏览器开发扩展 -- 所有应用程序资源都从磁盘加载。 如果它们被更改,应用程序将自动重新加载(而不是重新构建)。 所有连接的浏览器也将重新加载 -- 生成的 JS 模块提供以下内容: - - 带有自动生成的 JSDoc 的 Go 方法的 Javascript 包装器,提供代码提示 - - 您的 Go 结构体的 TypeScript 版本,可以构造并传递给您的 Go 方法 -- 生成的第二个 JS 模块,为运行时提供包装器 + TS 声明 -- 在 macOS 上,它会将应用程序打包到一个 `.app` 文件并运行它。 开发模式它将使用 `build/darwin/Info.dev.plist` 。 - -| 标志 | 描述 | 默认 | -|:---------------------------- |:-------------------------------------------------------------------------------------------------------------------------------- |:----------------- | -| -assetdir "./path/to/assets" | 从给定目录提供资产,而不是使用提供的资产 FS | `wails.json` 中的值 | -| -browser | 在启动时打开浏览器到 `http://localhost:34115` | | -| -compiler "编译器" | 使用不同的 go 编译器来构建,例如 go1.15beta1 | go | -| -e | 触发重新构建的扩展(逗号分隔) | go | -| -reloaddirs | 触发重新加载的附加目录(逗号分隔) | `wails.json` 中的值 | -| -ldflags "标志" | 传递给编译器的额外 ldflags | | -| -tags "额外标签" | 传递给编译器的构建标签(引号和空格分隔) | | -| -loglevel "日志级别" | 要使用的日志级别 - Trace, Debug, Info, Warning, Error | Debug(调试) | -| -noreload | 资产更改时禁用自动重新加载 | | -| -nocolour | 关闭彩色命令行输出 | false | -| -nogen | 禁用生成模块 | | -| -v | 详细级别 (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | 生成生成的Wails JS模块的目录 | `wails.json` 中的值 | -| -debounce | 检测到资产更改后等待重新加载的时间 | 100 (毫秒) | -| -devserver "host:port" | 将 wails 开发服务器绑定到的地址 | "localhost:34115" | -| -frontenddevserverurl "url" | 使用 3rd 方开发服务器 url 提供资产,例如:Vite | "" | -| -appargs "参数" | 以 shell 样式传递给应用程序的参数 | | -| -save | 将指定的 `assetdir`、 `reloaddirs`、 `wailsjsdir`、 `debounce` 、 `devserver` 和 `frontenddevserverurl` 标志的值保存到 `wails.json` 以成为后续调用的默认值。 | | -| -race | 使用 Go 的竞态检测器构建 | false | -| -s | 跳过前端构建 | false | - -示例: - -`wails dev -assetdir ./frontend/dist -wailsjsdir ./frontend/src -browser` - -此命令将执行以下操作: - -- 构建应用程序并运行它(更多细节在 [这里](../guides/manual-builds)) -- 在 `./frontend/src` 中生成 Wails JS 模块 -- 监听 `./frontend/dist` 中文件的更新并在更改时重新加载 -- 打开浏览器并连接到应用程序 - -有更多关于在现有框架脚本中使用此功能的 [信息](../guides/application-development.mdx#live-reloading)。 - -## 生成 - -### 模板 - -Wails 使用模板来生成项目。 `wails generate template` 命令有助于构建模板,以使它可以用于生成项目。 - -| 标志 | 描述 | -|:-------------- |:--------------- | -| -name | 模板名称(必填) | -| -frontend "路径" | 要在模板中使用的前端项目的路径 | - -有关创建模板的更多详细信息,请参阅 [模板指南](../guides/templates)。 - -### 模块 - -`wails generate module` 命令允许您为应用程序手动生成 `wailsjs` 目录。 - -## 更新 - -`wails update` 将更新 Wails CLI 的版本。 - -| 标志 | 描述 | -|:------------- |:----------- | -| -pre | 更新到最新的预发布版本 | -| -version "版本" | 安装指定版本的 CLI | - -## 版本 - -`wails version` 仅输出当前的 CLI 版本。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx deleted file mode 100644 index 5942d832c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/options.mdx +++ /dev/null @@ -1,739 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 参数选项 - -## 应用程序参数选项 - -该 `Options.App` 结构包含应用程序配置。 它被传递给 `wails.Run()` 方法: - -```go title="Example" -import ( - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" - "github.com/wailsapp/wails/v2/pkg/options/linux" - "github.com/wailsapp/wails/v2/pkg/options/mac" - "github.com/wailsapp/wails/v2/pkg/options/windows" -) - -func main() { - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - DisableResize: false, - Fullscreen: false, - Frameless: true, - MinWidth: 400, - MinHeight: 400, - MaxWidth: 1280, - MaxHeight: 1024, - StartHidden: false, - HideWindowOnClose: false, - BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 255}, - AlwaysOnTop: false, - AssetServer: &assetserver.Options{ - Assets: assets, - Handler: assetsHandler, - Middleware: assetsMidldeware, - }, - Menu: app.applicationMenu(), - Logger: nil, - LogLevel: logger.DEBUG, - LogLevelProduction: logger.ERROR, - OnStartup: app.startup, - OnDomReady: app.domready, - OnShutdown: app.shutdown, - OnBeforeClose: app.beforeClose, - WindowStartState: options.Maximised, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - ZoomFactor: 1.0, - IsZoomControlEnabled: false, - Bind: []interface{}{ - app, - }, - Windows: &windows.Options{ - WebviewIsTransparent: false, - WindowIsTranslucent: false, - BackdropType: windows.Mica, - DisableWindowIcon: false, - DisableFramelessWindowDecorations: false, - WebviewUserDataPath: "", - WebviewBrowserPath: "", - Theme: windows.SystemDefault, - CustomTheme: &windows.ThemeSettings{ - DarkModeTitleBar: windows.RGB(20, 20, 20), - DarkModeTitleText: windows.RGB(200, 200, 200), - DarkModeBorder: windows.RGB(20, 0, 20), - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - }, - // User messages that can be customised - Messages *windows.Messages - // OnSuspend is called when Windows enters low power mode - OnSuspend func() - // OnResume is called when Windows resumes from low power mode - OnResume func() - }, - Mac: &mac.Options{ - TitleBar: &mac.TitleBar{ - TitlebarAppearsTransparent: true, - HideTitle: false, - HideTitleBar: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: true, - }, - Appearance: mac.NSAppearanceNameDarkAqua, - WebviewIsTransparent: true, - WindowIsTranslucent: false, - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - Linux: &linux.Options{ - Icon: icon, - WindowIsTranslucent: false, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -### 标题 - -窗口标题栏中显示的文本。 - -名称:Title
类型:`string` - -### 宽度 - -窗口的初始宽度。 - -名称:Width
类型:`int`
默认值:1024. - -### 高度 - -窗口的初始高度。 - -名称:Height
类型:`int`
默认值:768 - -### 禁用调整窗口尺寸 - -默认情况下,主窗口可调整大小。 将此设置为 `true` 将使其保持固定大小。 - -名称:DisableResize
类型:`bool` - -### 全屏 - -将此设置为 `true` 将在启动时使窗口全屏。 - -名称:Fullscreen
类型:`bool` - -### 无边框 - -设置为`true`时,窗口将没有边框或标题栏。 另请参阅 [无边框窗口](../guides/frameless)。 - -名称:Frameless
类型:`bool` - -### 最小宽度 - -这将设置窗口的最小宽度。 如果给出的值 `Width` 小于这个值,窗口将被设置为 `MinWidth` 默认值。 - -名称:MinWidth
类型:`int` - -### 最小高度 - -这将设置窗口的最小高度。 如果给出的值 `Height` 小于这个值,窗口将被设置为 `MinHeight` 默认值。 - -名称:MinHeight
类型:`int` - -### 最大宽度 - -这将设置窗口的最大宽度。 如果给出的值 `Width` 大于这个值,窗口将被设置为 `MaxWidth` 默认值。 - -名称:MaxWidth
类型:`int` - -### 最大高度 - -这将设置窗口的最大高度。 如果给出的值 `Height` 大于这个值,窗口将被设置为 `MaxHeight` 默认值。 - -名称:MaxHeight
类型:`int` - -### 启动时隐藏窗口 - -设置为 `true` 时,应用程序将被隐藏,直到调用 [显示窗口](../reference/runtime/window#显示窗口)。 - -名称:StartHidden
类型:`bool` - -### 关闭时隐藏窗口 - -默认情况下,关闭窗口将关闭应用程序。 将此设置为 `true` 意味着关闭窗口将隐藏窗口。 - -隐藏窗口。 - -名称:HideWindowOnClose
类型:`bool` - -### 背景颜色 - -此值是窗口的默认背景颜色。 示例:options.NewRGBA(255,0,0,128) - 红色,透明度为 50% - -名称:BackgroundColour
类型:`*options.RGBA`
默认值:white - -### 窗口固定在最顶层 - -窗口在失去焦点时应保持在其他窗口之上。 - -名称:AlwaysOnTop
类型:`bool` - -### 资产 - -已弃用:请在 [AssetServer 特定选项](#资产服务器) 上使用资产。 - -### 资产处理程序 - -已弃用:请在 [AssetServer 特定选项](#资产服务器) 上使用资产处理程序。 - -### 资产服务器 - -这定义了资产服务器特定的选项。 它允许使用静态资产自定义资产服务器,使用 `http.Handler` 动态地提供资产或使用 `assetsserver.Middleware` 钩到请求链。 - -并非当前支持 `http.Request` 的所有功能,请参阅以下功能矩阵: - -| 功能 | Win | Mac | Lin | -| ----------------------- | --- | --- | --- | -| GET | ✅ | ✅ | ✅ | -| POST | ✅ | ✅ | ❌ | -| PUT | ✅ | ✅ | ❌ | -| PATCH | ✅ | ✅ | ❌ | -| DELETE | ✅ | ✅ | ❌ | -| Request Headers | ✅ | ✅ | ❌ | -| Request Body | ✅ | ✅ | ❌ | -| Request Body Streaming | ❌ | ❌ | ❌ | -| Response StatusCodes | ✅ | ✅ | ❌ | -| Response Headers | ✅ | ✅ | ❌ | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ❌ | ✅ | -| WebSockets | ❌ | ❌ | ❌ | - -注意:Linux 当前非常有限,因为目标是 WebKit2GTK 版本 < 2.36.0。 将来,一些特性将通过引入 WebKit2GTK 2.36.0+ 支持来支持。 - -名称: AssetServer
类型: `*assetserver.Options` - -#### 资产 - -应用程序要使用的静态前端资产。 - -首先尝试从 `fs.FS` 提供 GET 请求。 如果 `fs.FS` 为该文件返回 `os.ErrNotExist`,则请求处理将回退到 [处理程序](#处理程序) 并尝试服务来自它的 GET 请求。 - -如果设置为 nil,则所有 GET 请求都将转发给 [处理程序](#处理程序)。 - -名称: Assets
类型: `fs.FS` - -#### 处理程序 - -资产处理程序是一个通用的 `http.Handler`,用于对无法找到的资产进行后备处理。 - -由于 `os.ErrNotExist`,对于每个无法从 [资产](#资产) 提供服务的 GET 请求,都会调用该处理程序。 此外,所有非 GET 请求将始终从此处理程序提供服务。 - -如果未定义,则调用处理程序的结果如下: -- GET 请求: `http.StatusNotFound` -- 其他请求: `http.StatusMethodNotAllowed` - -注意:当与前端 DevServer 结合使用时,可能会有一些限制,例如。 Vite 在不包含文件扩展名的每个路径上提供 index.html。 - -名称:AssetsHandler
类型:`http.Handler` - -#### 中间件 - -中间件是一个 HTTP 中间件,它允许挂钩到资产服务器请求链。 它允许动态跳过默认请求处理程序,例如实现专门的路由等。 调用中间件来构建资产服务器使用的新 `http.Handler`,它还接收资产服务器使用的默认处理程序作为参数。 - -如果未定义,则执行默认的资产服务器请求链。 - -名称: Middleware
类型: `assetserver.Middleware` - -### 菜单 - -应用程序要使用的菜单。 [菜单参考](../reference/runtime/menu) 中有关菜单的更多详细信息。 - -:::note - -在 Mac 上,如果未指定菜单,将创建一个默认菜单。 - -::: - -名称:Menu
类型:`*menu.Menu` - -### 日志 - -应用程序要使用的记录器。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:Logger
类型:`logger.Logger`
默认值:Logs to Stdout - -### 日志级别 - -默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevel
类型:`logger.LogLevel`
默认值:开发模式为 `Info`, 生产模式为 `Error` - -### 生产日志级别 - -生产构建的默认日志级别。 有关日志记录的更多详细信息,请参阅 [日志参考](../reference/runtime/log)。 - -名称:LogLevelProduction
类型:`logger.LogLevel`
默认值:`Error` - -### 应用启动回调 - -此回调在前端创建之后调用,但在 `index.html` 加载之前调用。 它提供了应用程序上下文。 - -名称:OnStartup
类型:`func(ctx context.Context)` - -### 前端 Dom 加载完成回调 - -在前端加载完毕 `index.html` 及其资源后调用此回调。 它提供了应用程序上下文。 - -名称:OnDomReady
类型:`func(ctx context.Context)` - -### 应用退出回调 - -在前端被销毁之后,应用程序终止之前,调用此回调。 它提供了应用程序上下文。 - -名称:OnShutdown
类型:`func(ctx context.Context)` - -### 应用关闭前回调 - -如果设置了此回调,它将在通过单击窗口关闭按钮或调用`runtime.Quit`即将退出应用程序时被调用. 返回 `true` 将导致应用程序继续,`false` 将继续正常关闭。 返回 true 将导致应用程序继续,false 将继续正常关闭。 这有助于与用户确认他们希望退出程序。 - -示例: - -```go title=windowsapp.go -func (b *App) beforeClose(ctx context.Context) (prevent bool) { - dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Quit?", - Message: "Are you sure you want to quit?", - }) - - if err != nil { - return false - } - return dialog != "Yes" -} -``` - -名称:OnBeforeClose
类型:`func(ctx context.Context) bool` - -### 窗口启动状态 - -定义窗口在启动时应如何呈现。 - -| 值 | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -名称:WindowStartState
类型:`options.WindowStartState` - -### CSSDragProperty - -指示用于标识哪些元素可用于拖动窗口的 CSS 属性。 默认值:`--wails-draggable` - -名称:CSSDragProperty
类型:`string` - -### CSSDragValue - -指示 `CSSDragProperty` 样式应该具有什么值才能拖动窗口。 默认值:`drag` - -名称:CSSDragValue
类型:`string` - -### 绑定 - -定义需要绑定到前端的方法的结构实例切片。 - -名称:Bind
类型:`[]interface{}` - -### Windows - -这定义了 [Windows 特定的选项](#windows)。 - -名称:Windows
类型:`*windows.Options` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与 [Webview 透明](#webview-透明) 结合使用。 - -对于 build 22621 之前的 Windows 11 版本,将使用 [BlurBehind](https://learn.microsoft.com/en-us/windows/win32/dwm/blur-ovw) 方法来实现半透明,这可能会很慢。 对于构建 build 22621 之后的 Windows 11 版本,这将启用速度更快的新半透明类型。 默认情况下,使用的半透明类型将由 Windows 确定。 要对此进行配置,请使用 [背景类型](#背景类型) 选项。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 背景类型 - -:::note - -需要 Windows 11 build 22621 或更高版本。 - -::: - -设置窗口的半透明类型。 这仅在 [窗口半透明](#窗口半透明) 设置为 `true` 时适用。 - -名称:BackdropType
类型:`windows.BackdropType` - -值可以是以下之一: - -| 值 | 描述 | -| ------- | -------------------------------------------------------------------------------- | -| Auto | 让 Windows 决定使用哪个背景 | -| None | 不要使用半透明 | -| Acrylic | 使用 [亚克力](https://learn.microsoft.com/en-us/windows/apps/design/style/acrylic) 效果 | -| Mica | 使用 [Mica](https://learn.microsoft.com/en-us/windows/apps/design/style/mica) 效果 | -| Tabbed | 使用 Tabbed。 这是一个类似于 Mica 的背景。 | - -#### 禁用窗口图标 - -将此设置为 `true` 将删除标题栏左上角的图标。 - -名称:DisableWindowIcon
类型:`bool` - -#### 禁用无边框窗口装饰 - -将此设置为 `true` 将移除 [无边框](#无边框) 模式下的窗口装饰。 这意味着将不会有`Aero 阴影` 和 `圆角`显示在窗口上。 请注意,'圆角' 只在 Windows 11 上支持。 - -名称:DisableFramelessWindowDecorations
类型:`bool` - -#### Webview 用户数据路径 - -这定义了 WebView2 存储用户数据的路径。 如果为空将使用 `%APPDATA%\[BinaryName.exe]`。 - -名称:WebviewUserDataPath
类型:`string` - -#### Webview 浏览器路径 - -这定义了带有 WebView2 可执行文件和库的目录的路径 如果为空,则使用系统中安装的 webview2 - -有关固定版本运行时分发的重要信息: - -- [如何获取和提取运行时](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode) -- [固定版本的已知问题](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version) -- [WebView2 Runtime 固定版本的路径不应包含 \Edge\Application](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions) - -名称:WebviewBrowserPath
类型:`string` - -### 缩放比例 - -名称:ZoomFactor
类型:`float64` - -这定义了 WebView2 的缩放比例。 这是匹配 Edge 用户激活放大或缩小的选项 - -### 启用缩放比例 - -名称:IsZoomControlEnabled
类型:`bool` - -这将允许用户更改缩放比例。 请注意,可以在选项中设置缩放比例,但不允许在运行时更改它。 适用于屏幕固定的或类似的应用程序。 - -#### 主题 - -最低 Windows 版本:Windows 10 2004/20H1 - -这定义了应用程序应该使用的主题: - -| 值 | 描述 | -| ------------- | -------------------------------------------- | -| SystemDefault | _默认_。 主题将基于系统默认值。 如果用户更改了他们的主题,应用程序将更新以使用新设置 | -| Dark | 该应用程序将只使用深色主题 | -| Light | 该应用程序将专门使用浅色主题 | - -名称:Theme
类型:`windows.Theme` - -#### 自定义主题 - -:::note - -最低 Windows 版本:Windows 10/11 2009/21H2 Build 22000 - -::: - -允许您为浅色和深色模式以及窗口处于活动或非活动状态的 TitleBar、TitleText 和 Border 指定自定义颜色。 - -名称:CustomTheme
类型:`windows.CustomTheme` - -##### 自定义主题类型 - -CustomTheme 结构体使用 `int32` 指定颜色值。 它们采用标准(!)Windows 格式:`0x00BBGGAA`。 These are in the standard(!) Windows format of: `0x00BBGGAA`. 提供了一个辅助函数来将 RGB 转换为这种格式:`windows.RGB(r,g,b uint8)`。 - -注意:任何未提供的值都将默认为黑色。 - -```go -type ThemeSettings struct { - DarkModeTitleBar int32 - DarkModeTitleBarInactive int32 - DarkModeTitleText int32 - DarkModeTitleTextInactive int32 - DarkModeBorder int32 - DarkModeBorderInactive int32 - LightModeTitleBar int32 - LightModeTitleBarInactive int32 - LightModeTitleText int32 - LightModeTitleTextInactive int32 - LightModeBorder int32 - LightModeBorderInactive int32 -} -``` - -示例: - -```go - CustomTheme: &windows.ThemeSettings{ - // Theme to use when window is active - DarkModeTitleBar: windows.RGB(255, 0, 0), // Red - DarkModeTitleText: windows.RGB(0, 255, 0), // Green - DarkModeBorder: windows.RGB(0, 0, 255), // Blue - LightModeTitleBar: windows.RGB(200, 200, 200), - LightModeTitleText: windows.RGB(20, 20, 20), - LightModeBorder: windows.RGB(200, 200, 200), - // Theme to use when window is inactive - DarkModeTitleBarInactive: windows.RGB(128, 0, 0), - DarkModeTitleTextInactive: windows.RGB(0, 128, 0), - DarkModeBorderInactive: windows.RGB(0, 0, 128), - LightModeTitleBarInactive: windows.RGB(100, 100, 100), - LightModeTitleTextInactive: windows.RGB(10, 10, 10), - LightModeBorderInactive: windows.RGB(100, 100, 100), - }, -``` - -#### 消息 - -一个如果找不到有效的 webview2 运行时,webview2 安装程序所使用的字符串结构。 - -名称:Messages
类型:`*windows.Messages` - -您可以选择支持的任意语言定制此选项。 - -#### 重置尺寸防抖间隔 - -ResizeDebounceMS 是调整窗口大小时去抖动 webview2 重绘的时间量。 默认值 (0) 将尽可能快地执行重绘。 - -名称:ResizeDebounceMS
类型:`uint16` - -#### 待机回调 - -如果设置,当 Windows 启动切换到低功耗模式(挂起/休眠)时将调用此函数 - -名称:OnSuspend
类型:`func()` - -#### 恢复回调 - -如果设置,当 Windows 从低功耗模式(挂起/休眠)恢复时将调用此函数 - -名称:OnResume
类型:`func()` - -### Mac - -这定义了 [Mac 特定的选项](#mac)。 - -名称:Mac
类型:`*mac.Options` - -#### 标题栏 - -TitleBar 结构提供了配置标题栏外观的能力。 - -名称:TitleBar
类型:[`*mac.TitleBar`](#标题栏结构体) - -##### 标题栏结构体 - -可以使用 TitleBar 选项自定义应用程序的标题栏: - -```go -type TitleBar struct { - TitlebarAppearsTransparent bool - HideTitle bool - HideTitleBar bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool -} -``` - -| 设置 | 描述 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| TitlebarAppearsTransparent | 使标题栏透明。 这具有隐藏标题栏和内容填充窗口的效果。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) | -| HideTitle | 隐藏窗口的标题。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) | -| HideTitleBar | 从 style mask 中删除 [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) | -| FullSizeContent | 使 webview 填满整个窗口。 [苹果文档](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) | -| UseToolbar | 向窗口添加默认工具栏。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) | -| HideToolbarSeparator | 删除工具栏下方的线条。 [苹果文档](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) | - -预配置的标题栏设置可用: - -| 设置 | 示例 | -| --------------------------- | ---------------------------------------------- | -| `mac.TitleBarDefault()` | ![](/img/reference/titlebar-default.webp) | -| `mac.TitleBarHidden()` | ![](/img/reference/titlebar-hidden.webp) | -| `mac.TitleBarHiddenInset()` | ![](/img/reference/titlebar-hidden-inset.webp) | - -示例: - -```go -Mac: &mac.Options{ - TitleBar: mac.TitleBarHiddenInset(), -} -``` - -单击 [此处](https://github.com/lukakerr/NSWindowStyles) 获取有关自定义标题栏的一些灵感。 - -#### 外观 - -Appearance 用于根据 Apple 的 [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) 名称设置您的应用程序的样式。 - -名称:Appearance
类型:[`mac.AppearanceType`](#外观类型) - -##### 外观类型 - -您可以指定应用程序的 [外观](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)。 - -| 值 | 描述 | -| ----------------------------------------------------- | --------------- | -| DefaultAppearance | 使用默认系统值 | -| NSAppearanceNameAqua | 标准日间系统外观 | -| NSAppearanceNameDarkAqua | 标准黑夜系统外观 | -| NSAppearanceNameVibrantLight | 轻盈灵动的外观 | -| NSAppearanceNameAccessibilityHighContrastAqua | 标准白天系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastDarkAqua | 标准黑夜系统外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantLight | 轻盈灵动外观的高对比度版本 | -| NSAppearanceNameAccessibilityHighContrastVibrantDark | 深色活力外观的高对比度版本 | - -示例: - -```go -Mac: &mac.Options{ - Appearance: mac.NSAppearanceNameDarkAqua, -} -``` - -#### Webview 透明 - -当使用 `alpha` 值 `0` 时,将此设置为 true 将使 webview 背景透明。 这意味着如果您在 CSS 中使用 `rgba(0,0,0,0)` 作为 `background-color`,则主机窗口将显示出来。 通常与 [窗口半透明](#窗口半透明-1) 结合使用以制作看起来冷冰冰的应用程序。 - -名称:WebviewIsTransparent
类型:`bool` - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 通常与[Webview 透明](#webview-透明) 结合使用以制作冰霜效果的应用程序。 - -名称:WindowIsTranslucent
类型:`bool` - -#### 关于 - -此配置允许您在“AppMenu”角色创建的应用程序菜单中设置“关于”菜单项的标题、消息和图标。 - -名称:About
类型:[`*mac.AboutInfo`](#关于结构体) - -##### 关于结构体 - -```go - -type AboutInfo struct { - Title string - Message string - Icon []byte -} -``` - -如果提供了这些设置,“关于”菜单项将出现在应用程序菜单中(使用`AppMenu` role 时)。 建议这样配置: - -```go -//go:embed build/appicon.png -var icon []byte - -func main() { - err := wails.Run(&options.App{ - ... - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) - Mac: &mac.Options{ - About: &mac.AboutInfo{ - Title: "My Application", - Message: "© 2021 Me", - Icon: icon, - }, - }, - }) -``` - -“关于”菜单项将出现在应用程序菜单中: - -```mdx-code-block -
- -
-
-``` - -单击后,将打开一个关于消息框: - -```mdx-code-block -
- -
-
-``` - -### Linux - -这定义了 [Linux 特定的选项](#linux)。 - -名称:Linux
类型:`*linux.Options` - -#### 图标 - -设置代表窗口的图标。 当窗口最小化(也称为图标化)时使用此图标。 - -名称:Icon
类型:`[]byte` - -一些窗口管理器或桌面环境也可能将其放置在窗口框架中,或在其他上下文中显示。 在其他情况下,根本不使用该图标,因此您的预计情况可能会有所不同。 - -注意:Wayland 上的 Gnome 至少不显示此图标。 要在那里有一个应用程序图标,必须使用一个`.desktop`文件。 在 KDE 上它应该可以工作。 - -图标应该以自然绘制的任何尺寸提供;也就是说,在传递图像之前不要缩放图像。 缩放将延迟到当所需的最终尺寸已知的最后一刻,以获得最佳质量。 - -#### 窗口半透明 - -将此设置为 `true` 将使窗口半透明。 某些窗口管理员可能忽略它,或导致黑窗口。 - -名称:WindowIsTranslucent
类型:`bool` \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx deleted file mode 100644 index 092988431..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/project-config.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 项目配置 - -项目配置在项目目录中的 `wails.json` 文件中。 配置的结构是: - -```json -{ - "name": "[The project name]", - "assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", - "reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", - "frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", - "frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", - "frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", - "frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", - "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", - "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]", - "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", - "wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", - "version": "[Project config version]", - "outputfilename": "[The name of the binary]", - "debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets - "devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", - "appargs": "[Arguments passed to the application in shell style when in dev mode]", - "runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "preBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" - }, - "postBuildHooks": { - "GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]", - "GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]", - "*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]" - }, - "info": { // Data used to populate manifests and version info. - "companyName": "[The company name. Default: [The project name]]", - "productName": "[The product name. Default: [The project name]]", - "productVersion": "[The version of the product. Default: '1.0.0']", - "copyright": "[The copyright of the product. Default: 'Copyright.........']", - "comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" - }, - "nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", - "obfuscated": "[Whether the app should be obfuscated. Default: false]", - "garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" -} -``` - -该文件将在运行 `wails build` 或 `wails dev` 时,由 Wails CLI 读取。 - -`wails build/dev` 命令中的 `assetdir`、`reloaddirs`、`wailsjsdir`、`debounceMS`、`devserver` 和 `frontenddevserverurl` 标志将覆盖项目配置并作为后续运行的默认值。 - -此文件的 JSON 模型位于 [此处](https://wails.io/schemas/config.v2.json)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx deleted file mode 100644 index 26b81b958..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# 浏览器 - -这些方法与系统浏览器相关。 - -### 浏览器打开 URL - -使用系统默认浏览器打开给定的 URL。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx deleted file mode 100644 index 11c03cdd4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/dialog.mdx +++ /dev/null @@ -1,302 +0,0 @@ ---- -sidebar_position: 5 ---- - -# 对话框 - -运行时的这一部分提供对原生对话框的调用,例如文件选择器和消息框。 - -:::info Javascript - -JS 运行时当前不支持对话框。 - -::: - -### 打开选择目录对话框 - -打开一个对话框,提示用户选择目录。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选目录(如果用户取消则为空白)或错误 - -### 打开选择文件对话框 - -打开一个对话框,提示用户选择文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 打开选择多文件对话框 - -打开一个对话框,提示用户选择多个文件。 可以使用 [ 打开选择文件对话框参数选项](#打开选择文件对话框参数选项) 进行自定义。 - -Go: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)` - -返回值: 选定的文件(如果用户取消则为 nil)或错误 - -### 保存文件对话框 - -打开一个对话框,提示用户选择文件名以进行保存。 可以使用 [保存文件对话框参数选项](#保存文件对话框参数选项) 自定义。 - -Go: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)` - -返回值: 所选文件(如果用户取消则为空白)或错误 - -### 消息对话框 - -使用消息对话框显示消息。 可以使用 [消息对话框参数选项](#消息对话框参数选项) 进行自定义。 - -Go: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)` - -返回值: 所选按钮的文本或错误 - -## 参数选项 - -### 打开选择文件对话框参数选项 - -```go -type OpenDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - ResolvesAliases bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ------------------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| ResolvesAliases | 如果为 true,则返回文件而不是别名 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 保存文件对话框参数选项 - -```go -type SaveDialogOptions struct { - DefaultDirectory string - DefaultFilename string - Title string - Filters []FileFilter - ShowHiddenFiles bool - CanCreateDirectories bool - TreatPackagesAsDirectories bool -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| -------------------------- | ----------- | --- | --- | --- | -| DefaultDirectory | 对话框打开时显示的目录 | ✅ | ✅ | ✅ | -| DefaultFilename | 默认文件名 | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| [Filters](#filefilter) | 文件过滤器列表 | ✅ | ✅ | ✅ | -| ShowHiddenFiles | 显示系统隐藏的文件 | | ✅ | ✅ | -| CanCreateDirectories | 允许用户创建目录 | | ✅ | | -| TreatPackagesAsDirectories | 允许导航到包 | | ✅ | | - -### 消息对话框参数选项 - -```go -type MessageDialogOptions struct { - Type DialogType - Title string - Message string - Buttons []string - DefaultButton string - CancelButton string -} -``` - -| 字段 | 描述 | Win | Mac | Lin | -| ------------- | ------------------------------ | -------------- | --- | --- | -| 类型 | 消息对话框的类型,例如问题、信息... | ✅ | ✅ | ✅ | -| Title | 对话框的标题 | ✅ | ✅ | ✅ | -| Message | 向用户显示的消息 | ✅ | ✅ | ✅ | -| Buttons | 按钮标题列表 | | ✅ | | -| DefaultButton | 带有此文本的按钮应被视为默认按钮。 必定 `return`。 | ✅[*](#windows) | ✅ | | -| CancelButton | 带有此文本的按钮应被视为取消。 必定 `escape` | | ✅ | | - -#### Windows - -Windows 具有标准对话框类型,其中的按钮不可自定义。 返回的值将是以下之一:"Ok"、"Cancel"、"Abort"、"Retry"、"Ignore"、"Yes"、"No"、"Try Again"或"Continue"。 - -对于问题对话框,默认按钮是 “是”,取消按钮是 “否”。 可以通过将 `默认按钮` 值设置为 `"否"` 来改变这一点。 - -示例: -```go - result, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{ - Type: runtime.QuestionDialog, - Title: "Question", - Message: "Do you want to continue?", - DefaultButton: "No", - }) -``` - -#### Linux - -Linux 有标准的对话框类型,其中的按钮是不可定制的。 返回的值将是以下之一:“Ok”、“Cancel”、“Yes”、“No” - -#### Mac - -Mac 上的消息对话框最多可以指定 4 个按钮。 如果没有 `DefaultButton` 或 `CancelButton` 给出,第一个按钮被认为是默认的并绑定到 `return` 键。 - -对于以下代码: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, -}) -``` - -第一个按钮显示为默认值: - -```mdx-code-block -
- -
-
-``` - -如果我们指定 `DefaultButton` 为“two”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", -}) -``` - -第二个按钮显示为默认值。 当 `return` 被按下时,则返回数值“two”。 - -```mdx-code-block -
- -
-
-``` - -如果我们现在指定`CancelButton`为“three”: - -```go -selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ - Title: "It's your turn!", - Message: "Select a number", - Buttons: []string{"one", "two", "three", "four"}, - DefaultButton: "two", - CancelButton: "three", -}) -``` - -带有“three”的按钮显示在对话框的底部。 当 `escape` 被按下时,则返回值“three”: - -```mdx-code-block -
- -
-
-
-
-``` - -#### 对话框类型 - -```go -const ( - InfoDialog DialogType = "info" - WarningDialog DialogType = "warning" - ErrorDialog DialogType = "error" - QuestionDialog DialogType = "question" - ) -``` - -### 文件过滤 - -```go -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png" -} -``` - -#### Windows - -Windows 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Linux - -Linux 允许您在对话框中使用多个文件过滤器。 每个 FileFilter 将在对话框中显示为一个单独的条目: - -```mdx-code-block -
- -
-
-
-
-``` - -#### Mac - -Mac 对话框只有一组模式来过滤文件的概念。 如果提供了多个 FileFilters,Wails 将使用所有定义的模式。 - -示例: - -```go - selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{ - Title: "Select File", - Filters: []runtime.FileFilter{ - { - DisplayName: "Images (*.png;*.jpg)", - Pattern: "*.png;*.jpg", - }, { - DisplayName: "Videos (*.mov;*.mp4)", - Pattern: "*.mov;*.mp4", - }, - }, - }) -``` - -这将导致使用 `*.png,*.jpg,*.mov,*.mp4` 作为过滤器打开文件对话框。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx deleted file mode 100644 index 748a2eaa7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/events.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 事件 - -Wails 运行时提供了一个统一的事件系统,其中事件可以由 Go 或 Javascript 发出或接收。 可选地,数据可以与事件一起传递。 侦听器将接收本地数据类型中的数据。 - -### 添加事件侦听器 - -此方法为给定的事件名称设置一个侦听器。 当 [触发指定事件](#触发指定事件) 名为 `eventName` 类型的事件时,将触发回调。 与触发事件一起发送的任何其他数据都将传递给回调。 它返回 一个函数来取消侦听器。 - -Go: `EventsOn(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()`
JS: `EventsOn(eventName string, callback function(optionalData?: any)): () => void` - -### 移除事件侦听器 - -此方法取消注册给定事件名称的侦听器,可选地,可以通过 `additionalEventNames` 取消注册多个侦听器。 - -Go: `EventsOff(ctx context.Context, eventName string, additionalEventNames ...string)`
JS: `EventsOff(eventName string, ...additionalEventNames)` - -### 添加只触发一次的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但只会触发一次。 它返回 一个函数来取消侦听器。 - -Go: `EventsOnce(ctx context.Context, eventName string, callback func(optionalData ...interface{})) func()`
JS: `EventsOnce(eventName string, callback function(optionalData?: any)): () => void` - -### 添加指定对多触发次数的事件侦听器 - -此方法为给定的事件名称设置一个侦听器,但最多只能触发 `counter` 次。 它返回 一个函数来取消侦听器。 - -Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optionalData ...interface{}), counter int) func()`
JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), counter int): () => void` - -### 触发指定事件 - -此方法触发指定的事件。 可选数据可以与事件一起传递。 这将触发任意事件侦听器。 - -Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx deleted file mode 100644 index efd387cb4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/intro.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 简介 - -运行时是一个为应用程序提供实用方法的库。 有 Go 和 Javascript 运行时,目的是在可能的情况下尝试使它们保持一致。 - -它具有以下实用方法: - -- [窗口](window.mdx) -- [菜单](menu.mdx) -- [对话框](dialog.mdx) -- [事件](events.mdx) -- [浏览器](browser.mdx) -- [日志](log.mdx) - -Go 运行时可通过导入 `github.com/wailsapp/wails/v2/pkg/runtime` 获取。 此包中的所有方法都将 context 作为第一个参数。 此 context 应该从 [应用启动回调](../options.mdx#onstartup) 或 [前端 Dom 加载完成回调](../options.mdx#ondomready) 回调方法中获取。 - -:::info 注意 - -虽然上下文将提供给 [应用启动回调](../../reference/options#应用启动回调) 方法,但不能保证运行时将在此方法中工作,因为窗口正在不同的线程中初始化。 如果您希望在启动时调用运行时方法,请使用 [前端 Dom 加载完成回调](../../reference/options#前端-dom-加载完成回调) 方法。 - -::: - -Javascript 库可通过 `window.runtime` 提供给前端。 使用 `开发` 模式时会生成一个运行时包,该包为运行时提供 Typescript 声明。 这应该位于您的前端目录的`wailsjs`目录中。 - -### 隐藏 - -Go: `Hide(ctx context.Context)`
JS: `Hide()` - -隐藏应用程序。 - -:::info 注意 - -`Hide` 在 Mac 上,这将以与标准 Mac 应用程序中的菜单项相同的方式隐藏应用程序。 这与隐藏窗口不同,但应用程序仍处于前台。 对于 Windows 和 Linux,这与 `WindowHide` 相同。 - -::: - -### 显示 - -显示应用程序。 - -:::info 注意 - -在 Mac 上,这会将应用程序带回前台。 对于 Windows 和 Linux,这目前与 `WindowShow` 相同。 - -::: - -Go: `Show(ctx context.Context)`
JS: `Show()` - -### 退出 - -退出应用程序。 - -Go: `Quit(ctx context.Context)`
JS: `Quit()` - -### 环境 - -返回当前环境的详细信息。 - -Go: `Environment(ctx context.Context) EnvironmentInfo`
JS: `Environment(): Promise` - -#### 环境信息 - -Go: - -```go -type EnvironmentInfo struct { - BuildType string - Platform string - Arch string -} -``` - -JS: - -```ts -interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx deleted file mode 100644 index d88b29e5e..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/log.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- - -# 日志 - -Wails 运行时提供了一种可以从 Go 或 Javascript 调用的日志记录机制。 像大多数记录器一样,有许多日志级别: - -- Trace(追踪) -- Debug(调试) -- Info(信息) -- Warning(警告) -- Error(错误) -- Fatal(致命) - -记录器将输出当前或更高日志级别的任何日志消息。 示例:`Debug`日志级别将输出除`Trace`消息之外的所有消息。 - -### Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrint(ctx context.Context, message string)`
JS: `LogPrint(message: string)` - -### 格式化 Print 日志 - -将给定的消息记录为原始消息。 - -Go: `LogPrintf(ctx context.Context, format string, args ...interface{})`
- -### Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTrace(ctx context.Context, message string)`
JS: `LogTrace(message: string)` - -### 格式化 Trace 日志 - -在 `Trace` 日志级别记录给定的消息。 - -Go: `LogTracef(ctx context.Context, format string, args ...interface{})`
- -### Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebug(ctx context.Context, message string)`
JS: `LogDebug(message: string)` - -### 格式化 Debug 日志 - -在 `Debug` 日志级别记录给定的消息。 - -Go: `LogDebugf(ctx context.Context, format string, args ...interface{})`
- -### Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfo(ctx context.Context, message string)`
JS: `LogInfo(message: string)` - -### 格式化 Info 日志 - -在`Info`日志级别记录给定的消息。 - -Go: `LogInfof(ctx context.Context, format string, args ...interface{})`
- -### Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarning(ctx context.Context, message string)`
JS: `LogWarning(message: string)` - -### 格式化 Warning 日志 - -在 `Warning` 日志级别记录给定的消息。 - -Go: `LogWarningf(ctx context.Context, format string, args ...interface{})`
- -### Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogError(ctx context.Context, message string)`
JS: `LogError(message: string)` - -### 格式化 Error 日志 - -在 `Error` 日志级别记录给定的消息。 - -Go: `LogErrorf(ctx context.Context, format string, args ...interface{})`
- -### Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatal(ctx context.Context, message string)`
JS: `LogFatal(message: string)` - -### 格式化 Fatal 日志 - -在 `Fatal` 日志级别记录给定的消息。 - -Go: `LogFatalf(ctx context.Context, format string, args ...interface{})`
- -### 设置日志级别 - -设置日志级别。 在 Javascript 中,该数字与以下日志级别有关: - -| 值 | 日志等级 | -| - | ----------- | -| 1 | Trace(追踪) | -| 2 | Debug(调试) | -| 3 | Info(信息) | -| 4 | Warning(警告) | -| 5 | Error(报错) | - -Go: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS: `LogSetLogLevel(level: number)` - -## 使用自定义日志 - -可以通过使用应用程序参数选项 [日志](../../reference/options#日志) 提供自定义记录器来使用它。 唯一的要求是记录器实现在 `github.com/wailsapp/wails/v2/pkg/logger` 里 `logger.Logger` 定义的接口: - -```go title="logger.go" -type Logger interface { - Print(message string) - Trace(message string) - Debug(message string) - Info(message string) - Warning(message string) - Error(message string) - Fatal(message string) -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx deleted file mode 100644 index b7decffde..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/menu.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 菜单 - -这些方法与应用程序菜单相关。 - -:::info Javascript - -JS 运行时当前不支持菜单。 - -::: - -### 设置应用程序菜单 - -将应用程序菜单设置为给定的 [菜单](../menus.mdx)。 - -Go: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)` - -### 更新应用程序菜单 - -获取传递给 `MenuSetApplicationMenu` 的菜单的任意更改更新应用程序菜单。 - -Go: `MenuUpdateApplicationMenu(ctx context.Context)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx deleted file mode 100644 index 7ce68957f..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/runtime/window.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 窗口 - -这些方法可以控制应用程序窗口。 - -### 窗口标题 - -设置窗口标题栏中的文本。 - -Go: `WindowSetTitle(ctx context.Context, title string)`
JS: `WindowSetTitle(title: string)` - -### 窗口全屏 - -使窗口全屏。 - -Go: `WindowFullscreen(ctx context.Context)`
JS: `WindowFullscreen()` - -### 窗口取消全屏 - -恢复全屏之前的先前窗口尺寸和位置。 - -Go: `WindowUnfullscreen(ctx context.Context)`
JS: `WindowUnfullscreen()` - -### 窗口是否全屏 - -如果窗口是全屏的,则返回 true。 - -Go: `WindowIsFullscreen(ctx context.Context) bool`
JS: `WindowIsFullscreen() bool` - -### 窗口居中 - -使窗口在当前窗口所在的监视器上居中。 - -Go: `WindowCenter(ctx context.Context)`
JS: `WindowCenter()` - -### 窗口执行JS代码 - -在窗口中执行任意 JS 代码。 - -此方法在浏览器中异步运行代码并立即返回。 如果脚本导致任何错误,它们将只在浏览器控制台中可用。 - -Go: `WindowExecJS(ctx context.Context, js string)` - -### 窗口重新加载 - -执行“重新加载”(重新加载当前页面)。 - -Go: `WindowReload(ctx context.Context)`
JS: `WindowReload()` - -### 重新加载应用程序前端。 - -重新加载应用程序前端。 - -Go: `WindowReloadApp(ctx context.Context)`
JS: `WindowReloadApp()` - -### 窗口设置系统默认主题 - -仅限 Windows。 - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS: `WindowSetSystemDefaultTheme()` - -将窗口主题设置为系统默认值(暗/亮)。 - -### 窗口设置浅色主题 - -仅限 Windows。 - -Go: `WindowSetLightTheme(ctx context.Context)`
JS: `WindowSetLightTheme()` - -将窗口主题设置为浅色。 - -### 窗口设置深色主题 - -仅限 Windows。 - -Go: `WindowSetDarkTheme(ctx context.Context)`
JS: `WindowSetDarkTheme()` - -将窗口主题设置为深色。 - -### 显示窗口 - -显示窗口,如果它当前是隐藏的。 - -Go: `WindowShow(ctx context.Context)`
JS: `WindowShow()` - -### 隐藏窗口 - -如果当前可见,则隐藏窗口。 - -Go: `WindowHide(ctx context.Context)`
JS: `WindowHide()` - -### 窗口是否为正常 - -如果窗口未最小化、最大化或全屏,则返回 true。 - -Go: `WindowIsNormal(ctx context.Context) bool`
JS: `WindowIsNormal() bool` - -### 设置窗口尺寸 - -设置窗口的宽度和高度。 - -Go: `WindowSetSize(ctx context.Context, width int, height int)`
JS: `WindowSetSize(size: Size)` - -### 获取窗口尺寸 - -获取窗口的宽度和高度。 - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
JS: `WindowGetSize() : Size` - -### 设置窗口最小尺寸 - -设置窗口最小尺寸。 如果窗口当前小于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS: `WindowSetMinSize(size: Size)` - -### 设置窗口最大尺寸 - -设置窗口最大尺寸。 如果窗口当前大于给定尺寸,将调整窗口大小。 - -设置大小 `0,0` 将禁用此约束。 - -Go: `WindowSetMaxSize(ctx context.Context, width int, height int)`
JS: `WindowSetMaxSize(size: Size)` - -### 设置窗口置顶 - -设置窗口置顶或取消置顶。 - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### 设置窗口位置 - -设置相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
JS: `WindowSetPosition(position: Position)` - -### 获取窗口位置 - -获取相对于窗口当前所在监视器的窗口位置。 - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS: `WindowGetPosition() : Position` - -### 窗口最大化 - -最大化窗口以填满屏幕。 - -Go: `WindowMaximise(ctx context.Context)`
JS: `WindowMaximise()` - -### 窗口取消最大化 - -将窗口恢复到最大化之前的尺寸和位置。 - -Go: `WindowUnmaximise(ctx context.Context)`
JS: `WindowUnmaximise()` - -### 窗口是否最大化 - -如果窗口最大化,则返回 true。 - -Go: `WindowIsMaximised(ctx context.Context) bool`
JS: `WindowIsMaximised() bool` - -### 窗口最大化切换 - -在最大化和未最大化之间切换。 - -Go: `WindowToggleMaximise(ctx context.Context)`
JS: `WindowToggleMaximise()` - -### 窗口最小化。 - -最小化窗口。 - -Go: `WindowMinimise(ctx context.Context)`
JS: `WindowMinimise()` - -### 窗口取消最小化 - -将窗口恢复到最小化之前的尺寸和位置。 - -Go: `WindowUnminimise(ctx context.Context)`
JS: `WindowUnminimise()` - -### 窗口是否最小化 - -如果窗口最小化,则返回 true。 - -Go: `WindowIsMinimised(ctx context.Context) bool`
JS: `WindowIsMinimised() bool` - -### 窗口设置背景色 - -将窗口的背景颜色设置为给定的 RGBA 颜色定义。 这种颜色将显示所有透明像素。 - -R、G、B 和 A 的有效值为 0-255。 - -:::info Windows - -在 Windows 上,仅支持 0 或 255 的 alpha 值。 任何非 0 的值都将被视为 255。 - -::: - -Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
JS: `WindowSetBackgroundColour(R, G, B, A)` - -## Typescript 对象定义 - -### Position(位置) - -```ts -interface Position { - x: number; - y: number; -} -``` - -### Size(尺寸) - -```ts -interface Size { - w: number; - h: number; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json deleted file mode 100644 index 1374f0d55..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json deleted file mode 100644 index 9827bf0c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "社区", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx deleted file mode 100644 index efd963510..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/links.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 链接 - -此页面用于列出社区相关的链接。 请提交 PR(点击页面底部的 `编辑此页`)增加链接。 - -## Awesome Wails - -Wails 相关的 [优秀列表](https://github.com/wailsapp/awesome-wails)。 - -## 支持的频道 - -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) -- [Github Issues](https://github.com/wailsapp/wails/issues) -- [v2 测试版讨论板](https://github.com/wailsapp/wails/discussions/828) - -## 社交媒体 - -- [Twitter](https://twitter.com/wailsapp) -- [Wails 中文社区 QQ 群](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - 群号:1067173054 - -## 其他教程和文章 -- [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx deleted file mode 100644 index 6224bbf89..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## 功能 - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/developing-new-features.mdx deleted file mode 100644 index 9fc9025bd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/developing-new-features.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 开发新功能 - -We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows: The process for adding new features are as follows: - -- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours. -- Before developing, check that the ticket includes the following information: -- The purpose of the enhancement -- What is out of scope for the enhancement -- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason) -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details -- Comment on the ticket stating you wish to develop the feature -- Clone the repository and create a branch with the format `feature/_` -- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes -- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: Not all ideas will be selected so it's best to have discussion -on the ticket first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/documenting.mdx deleted file mode 100644 index 84e472903..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/documenting.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 40 ---- - -# 文档 - -This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's _as important_ as the code. - -We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. - -To set up a local documentation development environment, do the following: - -- [Install npm](https://docs.npmjs.com/cli/v8/configuring-npm/install) -- `cd website` -- `npm install` -- `npm run start` - -After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser. - -## Versioning - -We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that. - -There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories. - -The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory. - -## Languages - -The default documents of the Wails project are English documents. We use the "crowdin" tool to translate documents in other languages and synchronize them to the website. You can [join our project](https://crowdin.com/project/wails) and submit your translations to make contributions. - -### Add new language - -If you want to add a new language to the documentation, please follow the prompts to [fill in and submit an Issue](https://github.com/wailsapp/wails/issues/new?assignees=&labels=documentation&template=documentation.yml). After being confirmed by the maintainer, we will add the language to the "crowdin" and you will then be able to submit your translation. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/fixing-bugs.mdx deleted file mode 100644 index 01eceeccd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/fixing-bugs.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -sidebar_position: 30 ---- - -# 修复漏洞 - -The process for fixing bugs are as follows: - -- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix -- Before developing, check that the ticket includes the following information: -- The scope of the issue including platforms affected -- The steps to reproduce. The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example -- The output of `wails doctor` -- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. -- Comment on the ticket stating you wish to develop a fix -- Clone the repository and create a branch with the format `bugfix/_` -- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested. -- Once all the testing is completed, please update the status of the PR from draft and leave a message. - -:::note -There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all -bugfixes should be discussed as the approach may have unintended side effects. -::: ::: -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: ::: -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/setting-up-a-dev-environment.mdx deleted file mode 100644 index 1133e275d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/setting-up-a-dev-environment.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 设置开发环境 - -You can set up a development environment by doing the following: - -- Install the latest versions of Go and Git -- `git clone https://github.com/wailsapp/wails` -- `cd wails/v2/cmd/wails` -- `go install` - -NOTE: The directory that you cloned the project into will now be called "clonedir". - -The Wails CLI will now be at the very latest version. - -To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file: - -`replace github.com/wailsapp/wails/v2 => ` - -Example: - -On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2` - -On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2` - -To revert back to a stable version, run: - -`go install github.com/wailsapp/wails/v2/cmd/wails@latest` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/ways-of-contributing.mdx deleted file mode 100644 index 3bbe9a889..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/contributing/ways-of-contributing.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -sidebar_position: 1 ---- - -# 贡献方式 - -Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. - -There are many ways to contribute to the project: - -- Developing new features -- Fixing bugs -- Testing -- Documenting features -- Writing tutorials / guides -- Helping others on the issues + discussions boards - -Guides for these have been created in their own sections. Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx deleted file mode 100644 index c4fe879bc..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/building.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar_position: 6 ---- - -# 编译您的项目 - -从项目目录,运行 `wails build`。 这将编译您的项目并将构建的可用于生产的二进制文件保存在 `build/bin` 目录中。 - -如果您运行二进制文件,您应该会看到默认应用程序: - -```mdx-code-block -
- -
-
-``` - -有关编译选项的更多详细信息,请参阅 [构建命令](../reference/cli#构建)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx deleted file mode 100644 index e5061a6ea..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/angular.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Angular - -虽然 Wails 没有 Angular 模板,但可以将 Angular 与 Wails 一起使用。 - -## 开发模式 - -要让开发模式与 Angular 一起工作,您需要将以下内容添加到您的 `wails.json` 中: - -```json - "frontend:build": "npx ng build", - "frontend:install": "npm install", - "frontend:dev:watcher": "npx ng serve", - "frontend:dev:serverUrl": "http://localhost:4200", -``` \ No newline at end of file diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx deleted file mode 100644 index df6ef37db..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/application-development.mdx +++ /dev/null @@ -1,194 +0,0 @@ -# 应用开发 - -使用 Wails 开发应用程序没有硬性规定,但有一些基本准则。 - -## 应用程序设置 - -默认模板使用 `main.go` 配置和运行应用程序, 同时`app.go` 用于定义应用程序逻辑. - -`app.go`文件将定义一个结构体,该结构体有 2 个方法作为主应用程序的回调: - -```go title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} -``` - -- 一旦 Wails 分配了它需要的资源,就会调用 startup 方法,它是创建资源、设置事件侦听器以及应用程序在启动时需要的任何其他东西的好地方。 它提供了一个 `context.Context`, 通常保存在一个结构体字段中。 调用 [运行时](../reference/runtime/intro) 需要此`context.Context`。 如果此方法返回错误,则应用程序将终止。 在开发模式下,错误会输出到控制台。 - -- Shutdown 方法将在关闭过程结束时由 Wails 调用。 这是释放内存和执行关闭任务的好地方。 - -`main.go` 文件通常由对`wails.Run()`的单个调用组成,它接受应用程序配置。 模板使用的模式是,在调用 `wails.Run()` 之前, 我们创建并保存一个在 `app.go` 中定义的结构体的实例在名为 `app` 的变量中。 这个配置是我们添加回调的地方: - -```go {3,9,10} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -可以在 [此处](../howdoesitwork#应用程序生命周期回调) 找到有关应用程序生命周期回调的更多信息。 - -## 绑定方法 - -您可能希望从前端调用 Go 方法。 这通常是通过向 `app.go` 中已经定义的结构体中添加公共方法来实现的: - -```go {16-18} title="app.go" -type App struct { - ctx context.Context -} - -func NewApp() *App { - return &App{} -} - -func (a *App) startup(ctx context.Context) { - a.ctx = ctx -} - -func (a *App) shutdown(ctx context.Context) { -} - -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s!", name) -} -``` - -在主应用程序中,`Bind` 字段是我们告诉 Wails 想要绑定什么: - -```go {11-13} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -这将绑定 `App` 结构中的所有公共方法(它永远不会绑定 startup 和 shutdown 方法)。 - -### 绑定多个结构体时处理 context - -如果您想为多个结构绑定方法,但希望每个结构都保留对 context 的引用,以便您可以使用运行时函数,一个好的方式是将上下文从 `OnStartup` 方法传递给您的结构实例: - -```go -func main() { - - app := NewApp() - otherStruct := NewOtherStruct() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: func(ctx context.Context){ - app.SetContext(ctx) - otherStruct.SetContext(ctx) - }, - OnShutdown: app.shutdown, - Bind: []interface{}{ - app, - otherStruct - }, - }) - if err != nil { - log.Fatal(err) - } -} -``` - -可以在 [此处](../howdoesitwork.mdx#method-binding) 找到有关绑定的更多信息。 - -## 应用程序菜单 - -Wails 支持向您的应用程序添加菜单。 这是通过将 [菜单结构体](../reference/menus#菜单结构体) 传递给应用程序配置来完成的。 常见做法是使用一个返回菜单的方法,更常见的是用作生命周期回调的 `App` 结构体上的方法。 - -```go {11} title="main.go" -func main() { - - app := NewApp() - - err := wails.Run(&options.App{ - Title: "My App", - Width: 800, - Height: 600, - OnStartup: app.startup, - OnShutdown: app.shutdown, - Menu: app.menu(), - Bind: []interface{}{ - app, - }, - }) - if err != nil { - log.Fatal(err) - } -} - -``` - -## 资产 - -Wails v2 处理资源的方式的伟大之处在于它不需要处理! 您唯一需要给 Wails 的是一个 `embed.FS`。 你如何做到这一点完全取决于你。 您可以像 vanilla 模板一样使用 vanilla html/css/js 文件。 您可能有一些复杂的构建系统,但这并不影响。 - -运行 `wails build` 时,它会检查项目根目录的 `wails.json` 文件。 文件中有 2 个字段会被读取: - -- "frontend:install" -- "frontend:build" - -第一个,如果有给定,将在 `frontend` 目录中执行以安装 node 模块。 第二个,如果有给定,将在 `frontend` 目录中执行以构建前端项目。 - -如果没有给出这两个字段,那么 Wails 不会对前端做任何操作。 它仅仅被用作 `embed.FS`。 - -### 资产处理程序 - -Wails v2 应用程序可以选择在 `options.App` 中定义一个 `http.Handler`,它允许连接到 AssetServer 以动态创建文件或处理 POST/PUT 请求。 GET 请求总是首先由 `assets` FS 处理。 如果 FS 没有找到请求的文件,请求将被转发到 `http.Handler` 服务。 如果指定,除了 GET 以外的任何请求都将由 `AssetsHandler` 直接处理。 也可以仅通过将 `nil` 指定为 `Assets` 选项来使用 `AssetsHandler`。 - -## 内置开发服务器 - -运行 `wails dev` 将启动内置的开发服务器,它将在您的项目目录中启动一个文件监听器。 默认情况下,如果有任何文件更改,wails 会检查它是否是应用程序文件(默认:.go,可使用 `-e` 标志配置)。 如果是,那么它将重新构建您的应用程序并重新启动它。 如果更改的文件在 assetdir 目录中,它会在很短的时间后重新加载。 - -开发服务器使用一种称为“防抖”的技术,这意味着它不会立即重新加载,因为可能会在短时间内更改多个文件。 当触发发生时,它会在发出重新加载之前等待一定的时间。 如果发生另一个触发,它会再次重置为等待时间。 默认情况下,此值为 100ms。 如果此值不适用于您的项目,则可以使用 `-debounce` 标志进行配置。 如果使用,此值将保存到您的项目配置中并成为默认值。 - -## 外部开发服务器 - -一些框架带有自己的实时重新加载服务器,但是它们将无法利用 Wails Go 绑定。 在这种情况下,最好运行一个监听脚本,将项目重新构建到构建目录中,Wails 将监视该目录。 有关示例,请参阅使用 [rollup](https://rollupjs.org/guide/en/) 的默认 svelte 模板。 对于 [create-react-app](https://create-react-app.dev/),可以使用 [此脚本](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd) 来实现类似的结果。 - -## Go 模块 - -默认的 Wails 模板会生成一个包含模块名称“changeme”的 `go.mod` 文件。 您应该在项目生成后将其更改为更合适的内容。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx deleted file mode 100644 index 3162ccb88..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/dynamic-assets.mdx +++ /dev/null @@ -1,136 +0,0 @@ -# 动态资产 - -如果你想为你的前端动态加载或生成资产,你可以使用 [AssetsHandler 选项](../reference/options#资产处理程序) 来实现。 AssetsHandler 是一个通用的 `http.Handler`,对于资产服务器上的任何非 GET 请求以及由于找不到文件而无法从捆绑资产提供服务的 GET 请求,都会调用它。 - -通过安装自定义 AssetsHandler,您可以使用自定义资产服务器提供您自己的资产。 - -## 示例 - -在我们的示例项目中,我们将创建一个简单的资产处理程序,它将从磁盘加载文件: - -```go title=main.go {16-35,49} -package main - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" - "net/http" - "os" - "strings" -) - -//go:embed all:frontend/dist -var assets embed.FS - -type FileLoader struct { - http.Handler -} - -func NewFileLoader() *FileLoader { - return &FileLoader{} -} - -func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) { - var err error - requestedFilename := strings.TrimPrefix(req.URL.Path, "/") - println("Requesting file:", requestedFilename) - fileData, err := os.ReadFile(requestedFilename) - if err != nil { - res.WriteHeader(http.StatusBadRequest) - res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename))) - } - - res.Write(fileData) -} - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "helloworld", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - Handler: NewFileLoader(), - }, - BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255}, - OnStartup: app.startup, - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -当我们在开发模式使用 `wails dev` 运行应用程序时,我们将看到以下输出: - -``` -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' -DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler -Requesting file: favicon.ico -``` - -如您所见,当默认资产服务器无法提供 `favicon.ico` 文件时,将调用资产处理程序。 - -如果您右键单击主应用程序并选择“检查”以调出开发工具,您可以通过在控制台中输入以下内容来测试此功能: - -``` -let response = await fetch('does-not-exist.txt'); -``` - -这将在 devtools 中产生错误。 我们可以看到错误是我们所期望的,由我们的自定义资产处理程序返回: - -```mdx-code-block -

- -

-``` - -但是,如果我们请求 `go.mod`,我们将看到以下输出: - -```mdx-code-block -

- -

-``` - -此技术可用于将图像直接加载到页面中。 如果我们更新了默认的 vanilla 模板并替换了 logo 图像: - -```html - -``` - -和: - -```html - -``` - -然后我们会看到以下内容: - -```mdx-code-block -

- -

-``` - -:::warning - -以这种方式暴露您的文件系统是一种安全风险。 建议您正确管理对文件系统的访问。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx deleted file mode 100644 index 50b89b33b..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frameless.mdx +++ /dev/null @@ -1,87 +0,0 @@ -# 无边框应用 - -Wails 支持无边框应用程序。 这可以通过使用 [应用程序参数选项](../reference/options#应用程序参数选项) 中的 [无边框](../reference/options#无边框) 字段来实现。 - -Wails 为拖动窗口提供了一个简单的解决方案:任何具有 `--wails-draggable:drag` CSS 样式的 HTML 元素都将充当“拖动句柄”。 此属性适用于所有子元素。 如果您需要指示嵌套元素不应拖动,则在该元素上使用“--wails-draggable:no-drag”属性。 - -```html - - - - - - - -
- - -
-
- - - - -``` - -对于一些项目,由于动态样式,可能无法使用 CSS 变量。 在这种情况下,您可以使用 `CSSDragProperty` 和 `CSSDragValue` 应用程序选项来定义将用于指示可拖动区域的属性和值: - -```go title=main.go -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "alwaysontop", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - Frameless: true, - CSSDragProperty: "widows", - CSSDragValue: "1", - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err) - } -} -``` - -```html title=index.html - - - - - - alwaysontop - - -
- - - -``` - -:::info 全屏 - -如果您允许您的应用程序全屏显示,则此拖动功能将被禁用。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx deleted file mode 100644 index 7c4246863..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/frontend.mdx +++ /dev/null @@ -1,72 +0,0 @@ -# 前端 - -## 脚本注入 - -当 Wails 为您的 `index.html` 提供服务时,默认情况下,它会将 2 个脚本注入 `` 标签以加载 `/wails/ipc.js` 和 `/wails/runtime.js`。 这些文件分别安装绑定和运行时。 - -下面的代码显示了这些默认注入的位置: - -```html - - - injection example - - - - - - - -
Please enter your name below 👇
-
- - -
- - - - -``` - -### 覆盖默认脚本注入 - -为了给开发人员提供更大的灵活性,有一个 meta 标签可用于自定义此行为: - -```html - -``` - -选项如下: - -| 值 | 描述 | -| ------------------- | -------------------------- | -| noautoinjectruntime | 禁用自动注入 `/wails/runtime.js` | -| noautoinjectipc | 禁用自动注入 `/wails/ipc.js` | -| noautoinject | 禁用所有脚本自动注入 | - -可以使用多个选项,前提是它们以逗号分隔。 - -此代码完全有效并且与自动注入版本的操作相同: - -```html - - - injection example - - - - - - -
Please enter your name below 👇
-
- - -
- - - - - - -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx deleted file mode 100644 index a7642a7c0..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/ides.mdx +++ /dev/null @@ -1,127 +0,0 @@ -# 集成开发环境 - -Wails 旨在提供出色的开发体验。 为此,我们现在支持生成 IDE 特定配置以提供更顺畅的项目设置。 - -目前,我们支持 [Visual Studio Code](https://code.visualstudio.com/),但我们希望尽快支持其他 IDE,例如 Goland。 - -## Visual Studio Code - -```mdx-code-block -

- -

-``` - -使用 `-ide vscode` 标志生成项目时,IDE 文件将与其他项目文件一起创建。 这些文件放置在 `.vscode` 目录中,并为调试应用程序提供正确的配置。 - -生成的 2 个文件是 `tasks.json` 和 `launch.json`。 以下是为默认 vanilla 项目生成的文件: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/myproject.exe" - ] - } - ] -} -``` - -```json title="launch.json" -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Wails: Debug myproject", - "type": "go", - "request": "launch", - "mode": "exec", - "program": "${workspaceFolder}/build/bin/myproject.exe", - "preLaunchTask": "build", - "cwd": "${workspaceFolder}", - "env": {} - } - ] -} -``` - -### 配置安装和构建步骤 - -`tasks.json` 文件对于默认项目很简单,因为不需要 `npm install` 或 `npm run build` 的步骤。 对于具有前端构建步骤的项目,例如 svelte 模板,我们需要编辑 `tasks.json` 以添加安装和构建步骤: - -```json title="tasks.json" -{ - "version": "2.0.0", - "tasks": [ - { - "label": "npm install", - "type": "npm", - "script": "install", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "npm run build", - "type": "npm", - "script": "build", - "options": { - "cwd": "${workspaceFolder}/frontend" - }, - "presentation": { - "clear": true, - "panel": "shared", - "showReuseMessage": false - }, - "problemMatcher": [] - }, - { - "label": "build", - "type": "shell", - "options": { - "cwd": "${workspaceFolder}" - }, - "command": "go", - "args": [ - "build", - "-tags", - "dev", - "-gcflags", - "all=-N -l", - "-o", - "build/bin/vscode.exe" - ], - "dependsOn": ["npm install", "npm run build"] - } - ] -} -``` - -:::info 功能增强 - -将来,我们希望生成一个 `tasks.json` 自动包含安装和构建步骤的文件。 - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx deleted file mode 100644 index f282894e4..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux-distro-support.mdx +++ /dev/null @@ -1,103 +0,0 @@ -# Linux 发行版支持 - -## 概述 - -Wails 提供 Linux 支持,但为所有可用发行版提供安装说明是一项不可能完成的任务。 相反,Wails 会尝试确定您开发应用程序所需的包是否可以通过系统的包管理器获得。 目前,我们支持以下包管理器: - -- apt -- dnf -- emerge -- eopkg -- nixpkgs -- pacman -- zypper - -## 添加包名 - -在某些情况下,您的发行版使用受支持的包管理器之一,但包名称不同。 例如,您可能使用 Ubuntu 衍生产品,但 gtk 的包名称可能不同。 Wails 尝试通过遍历包名称列表来找到正确的包。 包列表存储在 `v2/internal/system/packagemanager` 目录中的包管理器特定文件中。 在我们的示例中,是 `v2/internal/system/packagemanager/apt.go`。 - -在此文件中,包列表由以下 `Packages()` 方法定义: - -```go -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -假设在我们的 linux 发行版中,`libgtk-3` 以 `lib-gtk3-dev` 的名称打包。 我们可以通过添加以下行来添加对此的支持: - -```go {5} -func (a *Apt) Packages() packagemap { - return packagemap{ - "libgtk-3": []*Package{ - {Name: "libgtk-3-dev", SystemPackage: true, Library: true}, - {Name: "lib-gtk3-dev", SystemPackage: true, Library: true}, - }, - "libwebkit": []*Package{ - {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true}, - }, - "gcc": []*Package{ - {Name: "build-essential", SystemPackage: true}, - }, - "pkg-config": []*Package{ - {Name: "pkg-config", SystemPackage: true}, - }, - "npm": []*Package{ - {Name: "npm", SystemPackage: true}, - }, - "docker": []*Package{ - {Name: "docker.io", SystemPackage: true, Optional: true}, - }, - } -} -``` - -## 添加新的包管理器 - -要添加新的包管理器,请执行以下步骤: - -- 在 `v2/internal/system/packagemanager` 中创建一个名为 `.go` 的新文件,其中 `` 是包管理器的名称。 -- 定义一个符合 `pm.go` 中定义的包管理器接口的结构体。 - -```go -type PackageManager interface { - Name() string - Packages() packagemap - PackageInstalled(*Package) (bool, error) - PackageAvailable(*Package) (bool, error) - InstallCommand(*Package) string -} -``` - -- `Name()` 应该返回包管理器的名称 -- `Packages()` 应该返回一个 `packagemap`,它为依赖项提供候选文件名 -- `PackageInstalled()` 如果安装了指定的包,应该返回`true` -- `PackageAvailable()` 如果指定的软件包未安装但可以安装,则应返回`true` -- `InstallCommand()` 应该返回确切的命令来安装指定的包名 - -查看其他包管理器代码以了解其工作原理。 - -:::info 记住 - -如果您添加了对新包管理器的支持,请不要忘记更新此页面! - -::: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx deleted file mode 100644 index dfcdc5fb2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/linux.mdx +++ /dev/null @@ -1,18 +0,0 @@ -# Linux - -此页面包含与开发适用于 Linux 的 Wails 应用程序相关的其他指南。 - -## video 标签不能触发 "ended" 事件 - -使用视频标签时,视频播放完毕后不会触发“结束”事件。 这是 WebkitGTK 中的一个错误,但是您可以使用以下解决方法来修复它: - -```js -videoTag.addEventListener("timeupdate", (event) => { - if (event.target.duration - event.target.currentTime < 0.2) { - let ended = new Event("ended"); - event.target.dispatchEvent(ended); - } -}); -``` - -资料来源:[讨论板](https://github.com/wailsapp/wails/issues/1729#issuecomment-1212291275) 上的 [Lyimmi](https://github.com/Lyimmi) diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx deleted file mode 100644 index 83de0fdfd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/manual-builds.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# 手动构建 - -Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项目。 本文档将讨论 CLI 执行的不同操作以及如何以不同方式实现这一点。 - -## 构建过程 - -当使用 `wails build` 或 `wails dev` 时,Wails CLI 会执行一个通用的构建过程: - - - 安装前端依赖 - - 构建前端项目 - - 生成构建资产 - - 编译应用程序 - - [可选]压缩应用程序 - -### 安装前端依赖 - -#### 命令行步骤 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有安装命令 `frontend:install` -- 如果没有,则跳过此步骤 -- 如果有,则检查前端目录中是否存在 `package.json`。 如果不存在,则跳过这一步 -- 从 `package.json` 文件内容生成 MD5 -- 检查 `package.json.md5` 是否存在,如果存在,则将其内容(MD5 sum)与生成的内容进行比较,以查看内容是否已更改。 如果相同,则跳过此步骤 -- 如果 `package.json.md5` 不存在,则使用生成的 MD5 并创建它 -- 如果现在需要构建,或者 `node_modules` 不存在,或者给出了`-f` 标志,则在前端目录中执行安装命令 - -#### 手动步骤 - -这一步可以从命令行或带有 `npm install` 的前端脚本完成. - -### 构建前端项目 - -#### Wails 命令行 - -- 如果给出了 `-s` 标志,则跳过此步骤 -- 检查 `wails.json` 中是否有构建命令 `frontend:build` -- 如果没有,则跳过此步骤 -- 如果有,就在 frontend 目录下执行它 - -#### 手动步骤 - -这一步可以从命令行或带有前端构建脚本 `npm run build` 的脚本或任何前端构建脚本完成。 - -### 生成资产 - -#### Wails 命令行 - -- 如果设置了`-nopackage` 标志,则跳过此阶段 -- 如果 `build/appicon.png` 文件不存在,则创建一个默认文件 -- 对于 Windows,请参阅 [ Windows](#windows) -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 图像创建它。 - -##### Windows - -- 如果 `build/windows/icon.ico` 不存在,它将从 `build/appicon.png` 创建 256、128、64、48、32 和 16 大小的图标。 这是使用 [winicon](https://github.com/leaanthony/winicon) 完成的。 -- 如果 `build/windows/.manifest` 文件不存在,它会从默认版本创建它。 -- 将应用程序编译为生产版本(如上所述)。 -- 使用 [winres](https://github.com/tc-hib/winres) 将 icon 和 manifest 打包到一个 `.syso` 文件。 - -#### 手动步骤 - -- 使用[winicon](https://github.com/leaanthony/winicon)命令行工具或者其他工具创建`icon.ico` -- 为您的应用程序创建或者更新 `.manifest` 文件 -- 使用 [winres 命令行](https://github.com/tc-hib/go-winres) 生成一个 `.syso` 文件 - -### 编译应用程序 - -#### Wails 命令行 - -- 如果提供了 `-clean` 标志,则删除并重新创建 `build` 目录 -- 对于 `wails dev`,使用以下默认 Go 标志:`-tags dev -gcflags "all=-N -l"` -- 对于 `wails build`,使用以下默认 Go 标志:`-tags desktop,production -ldflags "-w -s"` - - 在 Windows 上,是 `-ldflags "-w -h -H windowsgui"` -- 传递给 CLI 的附加标签使用 `-tags` 添​​加到默认值中 -- 传递给 CLI 的附加 `ldflags-ldflags` 添加到默认值 -- 传递 `-o` 标志 -- 将使用指定的 Go 编译器 `-compiler` 进行编译 - -#### 手动步骤 - -- 对于 dev 构建,最少的命令是:`go build -tags dev -gcflags "all=-N -l"` -- 对于生产构建,最少的命令是:`go build -tags desktop,production -ldflags "-w -s -H windowsgui"` -- 确保在与 `.syso` 文件相同的目录中进行编译 - -### 压缩应用程序 - -#### Wails 命令行 - -- 如果 `-upx` 已给出标志,将运行 `upx` 程序以使用默认设置压缩应用程序 -- 如果也传递了 `-upxflags` 标志,则使用这些标志而不是默认 - -#### 手动步骤 - -- 手动运行 `upx [flags]` 以压缩应用程序。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx deleted file mode 100644 index 13e54ec46..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/mouse-buttons.mdx +++ /dev/null @@ -1,25 +0,0 @@ -# 鼠标按钮 - -Wails 运行时拦截鼠标单击以确定无框窗口是否需要调整大小或需要移动窗口。 有人询问如何检测鼠标点击何时发生,因为 `window.onclick` 没有正确报告鼠标按钮。 下面的代码展示了如何检测鼠标点击: - -```javascript -window.addEventListener("mousedown", handleMouseButtonDown); - -function handleMouseButtonDown(event) { - if (event.button === 0) { - // left mouse button - } else if (event.button === 1) { - // middle mouse button - } else if (event.button === 2) { - // right mouse button - } else if (event.button === 3) { - // back mouse button - } else if (event.button === 4) { - // forward mouse button - } else { - // other mouse button - } -} -``` - -参考:https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx deleted file mode 100644 index c37150a40..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/obfuscated.mdx +++ /dev/null @@ -1,40 +0,0 @@ -# 混淆构建 - -Wails 支持使用 [garble](https://github.com/burrowers/garble) 来混淆您的应用程序。 - -要生成混淆构建,您可以将 `-obfuscate` 标志与 `wails build` 命令一起使用: - -```bash -wails build -obfuscated -``` - -要自定义混淆设置,您可以使用以下 `-garbleargs` 标志: - -```bash -wails build -obfuscated -garbleargs "-literals -tiny -seed=myrandomseed" -``` - -这些设置可能会保留在您的 [项目配置](../reference/project-config) 中。 - -## 工作原理 - -在标准构建中,所有绑定的方法都在前端的 `window.go` 变量下可用。 调用这些方法时,会使用完全限定的函数名调用相应的后端方法。 使用混淆构建时,使用 ID 而不是绑定方法的名称。 目录中生成的绑定 `wailsjs` 使用这些 ID 调用后端函数。 - -:::note - -为确保您的应用程序在混淆模式下工作,您必须使用 `wailsjs` 应用程序目录下生成的绑定。 - -::: - -## 示例 - -从绑定中导入“Greet” 方法,如下所示: - -```js -import { Greet } from "../../wailsjs/go/main/App"; - -// snip -Greet("World"); -``` - -将确保该方法在混淆模式下正常工作,因为绑定将使用 ID 重新生成并更新调用机制。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx deleted file mode 100644 index 64673dafd..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/overscroll.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 滚动超出 - -[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) 是当您滚动超出页面内容边界时有时会获得的“弹跳效果”。 这在移动应用程序中很常见。 这可以使用 CSS 禁用: - -```css -html { - height: 100%; - overflow: hidden; -} -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx deleted file mode 100644 index b1b4c6690..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# 路由 - -路由是一种在应用程序中切换视图的流行方式。 此页面提供了有关如何执行此操作的一些指导。 - -## Vue - -在 Vue 中推荐的路由方法是 [Hash 模式](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from "vue-router"; - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}); -``` - -## Angular - -在 Angular 中推荐的路由方法是 [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies/#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -React 中推荐的路由方法是 [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx deleted file mode 100644 index 7ce7dc9b2..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/signing.mdx +++ /dev/null @@ -1,387 +0,0 @@ -# 代码签名 - -这是有关如何在 MacOS 和 Windows 上对使用 Wails 生成的二进制文件进行签名的指南。 该指南将针对 CI 环境,更具体地说是 GitHub Actions。 - -## Windows - -首先,您需要一个代码签名证书。 如果您还没有,Microsoft 的信息页面会 [在此处](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate) 列出一些提供商。 请注意,除非您需要编写内核级软件,例如设备驱动程序,否则不需要 EV 证书。 为了签署你的 Wails 应用程序,一个标准的代码签名证书就可以了。 - -在针对自动构建系统之前,与您的证书提供商核实如何在您的本地计算机上签署您的二进制文件可能是一个好主意,这样您就知道是否有任何特殊要求。 例如,[这里](https://www.ssl.com/how-to/using-your-code-signing-certificate/) 是 SSL.com 的 Windows 代码签名指南。 如果您知道如何在本地签名,则可以更轻松地解决 CI 环境中的任何潜在问题。 例如,SSL.com 代码签名证书需要 [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) 的 `/tr` 标志, 而其他提供商可能只需要 `/tr` 标志来提供时间戳服务器。 用于签署 [此类](https://github.com/Dana-Prajea/code-sign-action) Windows 二进制文件的流行 GitHub Actions 不支持 SignTool.exe 上的 `/tr` 标志。 因此,本指南将重点介绍使用 PowerShell 命令手动签署我们的应用程序,但如果您愿意,可以使用类似 [代码签名操作](https://github.com/Dana-Prajea/code-sign-action) 的操作。 - -首先,让我们确保我们能够在我们的 GitHub CI 中构建我们的 Wails 应用程序。 这是一个小型工作流模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -接下来,我们需要让 GitHub 工作流访问我们的签名证书。 这是通过将您的 .pfx 或 .p12 证书编码为 base64 字符串来完成的。 要在 PowerShell 中执行此操作,您可以使用以下命令,假设您的证书名为“my-cert.p12”: - -```PowerShell -certutil -encode .\my-cert.p12 my-cert-base64.txt -``` - -您现在应该拥有带有 base64 编码证书的 .txt 文件。 它应该以 _-----BEGIN CERTIFICATE-----_ 开头并以 _-----END CERTIFICATE-----_ 结尾。 现在你需要在 GitHub 上创建两个 action secret。 导航到 _Settings -> Secrets -> Actions_ 并创建以下两个 secrets: - -- **WIN_SIGNING_CERT** 您的 base64 编码证书文本的内容。 -- **WIN_SIGNING_CERT_PASSWORD** 您的证书密码的内容。 - -现在我们准备好使用以下两种方法之一在我们的工作流程中实现签名: - -### 方法一:使用命令签名 - -此方法使用 PowerShell 命令对我们的应用程序进行签名,并让您控制整个签名过程。 - -在该 `"Build Wails app"` 步骤之后,我们可以将以下步骤添加到我们的工作流程中: - -```yaml -- name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' - -``` - -此脚本为您的证书文件创建一个新目录,从我们的 base64 密钥创建证书文件,将其转换为 .pfx 文件,最后对二进制文件进行签名。 最后一行需要替换以下变量: - -- **签名算法**:通常是 sha256。 -- **时间戳服务器**:与您的证书一起使用的时间戳服务器的 URL。 -- **二进制路径**:要签名的二进制文件的路径。 - -鉴于我们的 Wails 配置将 `outputfilename` 设置为“app.exe”并且我们拥有来自 SSL.com 的证书,这将是我们的工作流程: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -### 方法二:Action自动签名 - -可以使用像 [这样](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 的 Windows 代码签名操作,但请注意,它需要证书的 SHA1 哈希和证书名称。 查看如何在 Action 的 [市场](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) 上配置它的示例。 - ---- - -## MacOS - -首先,您需要 Apple 提供的代码签名证书。 如果您没有,简单的谷歌搜索将帮助您获得一个。 获得证书后,您需要将其导出并将其编码为 base64。 本 [教程](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) 向您展示了如何以简单的方式做到这一点。 导出 .p12 证书文件后,您可以使用以下命令将其编码为 base64,如教程中所示: - -```bash -base64 Certificates.p12 | pbcopy -``` - -现在您已准备好创建一些 GitHub 项目 secrets,就像在 Windows 中一样: - -- **APPLE_DEVELOPER_CERTIFICATE_P12_BASE64** 您新复制的 base64 证书的内容。 -- **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** 与您的证书密码的内容。 -- **APPLE_PASSWORD** 包含您可以在 [此处](https://appleid.apple.com/account/manage) 生成的 Apple-ID 帐户的应用程序特定密码的内容。 - -让我们确保我们能够在我们的 GitHub Action 工作流程中构建我们的 Wails 应用程序。 这是一个小模板: - -```yaml -name: "example" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -对于 macOS 上的代码签名,[gon](https://github.com/mitchellh/gon) 是一个非常方便的工具,用于代码签名和与 Apple 服务器通信,也是用 Go 编写的,将在本指南中使用。 - -在 `Build Wails 应用` 步骤之后,将以下内容添加到工作流中: - -```yaml -- name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon -``` - -Now we need to configure some gon config files in our `build/darwin` directory: - -1. gon-sign.json: - -```json -{ - "source": ["./build/bin/app.app"], - "bundle_id": "app.myapp", - "apple_id": { - "username": "my-appleid@email.com", - "password": "@env:APPLE_PASSWORD" - }, - "sign": { - "application_identity": "Developer ID Application: My Name" - } -} -``` - -其中 `source` 是您的 Wails 二进制文件,`bundle_id` 是您的捆绑包 ID,`apple_id` 包含您之前创建的 Apple ID 用户名和 App-Specific 密码,`sign.application_identity` 是您的身份,您可以通过运行以下命令找到它: - -```bash -security find-identity -v -p codesigning -``` - -2. entitlements.plist: - -```plist - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - com.apple.security.files.downloads.read-write - - - -``` - -在此文件中,您可以配置应用所需的权利,例如 如果您的应用使用相机,相机权限。 在 [此处](https://developer.apple.com/documentation/bundleresources/entitlements) 阅读有关权利的更多信息。 - -确保您已使用您在 `gon-sign.json` 中输入的相同包 ID 更新了 `Info.plist` 文件。 这是一个示例 `Info.plist` 文件: - -```plist - - - CFBundlePackageTypeAPPL - CFBundleNameMyApp - CFBundleExecutableapp - CFBundleIdentifierapp.myapp - CFBundleVersion0.1.0 - CFBundleGetInfoStringMy app is cool and nice and chill and - CFBundleShortVersionString0.1.0 - CFBundleIconFileiconfile - LSMinimumSystemVersion10.13.0 - NSHighResolutionCapabletrue - LSApplicationCategoryTypepublic.app-category.utilities - NSHumanReadableCopyright© Me - -``` - -现在我们准备好在构建 Wails 应用程序后在我们的工作流程中添加签名步骤: - -```yaml -- name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -- name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json -``` - -请注意,与 Apple 签署二进制文件可能需要几分钟到几小时。 - -## 组合工作流文件: - -这是我们结合了 Windows + macOS 的 GitHub 工作流文件: - -```yaml -name: "example combined" -on: - workflow_dispatch: - # This Action only starts when you go to Actions and manually run the workflow. - -jobs: - package: - strategy: - matrix: - platform: [windows-latest, macos-latest] - go-version: [1.18] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - - name: Get Wails - run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - - name: Build Wails app - run: | - wails build - - name: MacOS download gon for code signing and app notarization - if: matrix.platform == 'macos-latest' - run: | - brew install mitchellh/gon/gon - - name: Import Code-Signing Certificates for macOS - if: matrix.platform == 'macos-latest' - uses: Apple-Actions/import-codesign-certs@v1 - with: - # The certificates in a PKCS12 file encoded as a base64 string - p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - # The password used to import the PKCS12 file. - p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - - name: Sign our macOS binary - if: matrix.platform == 'macos-latest' - run: | - echo "Signing Package" - gon -log-level=info ./build/darwin/gon-sign.json - - name: Sign Windows binaries - if: matrix.platform == 'windows-latest' - run: | - echo "Creating certificate file" - New-Item -ItemType directory -Path certificate - Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' - certutil -decode certificate\certificate.txt certificate\certificate.pfx - echo "Signing our binaries" - & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\Monitor.exe - - name: upload artifacts macOS - if: matrix.platform == 'macos-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-macos - path: build/bin/* - - name: upload artifacts windows - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v2 - with: - name: wails-binaries-windows - path: build/bin/* -``` - -# 尾注 - -本指南受 RiftShare 项目及其工作流程的启发,强烈建议在 [此处](https://github.com/achhabra2/riftshare/blob/main/.github/workflows/build.yaml) 查看。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx deleted file mode 100644 index 7f701203d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/templates.mdx +++ /dev/null @@ -1,97 +0,0 @@ -# 模板 - -Wails 从预先创建的模板生成项目。 在 v1 中,这是一组难以维护的项目,这些项目可能会过时。 在 v2 中,为了增强社区的能力,为模板添加了一些新功能: - -- 能够从 [远程模板](../reference/cli#远程模板) 生成项目 -- 帮助创建自己的模板的工具 - -## 创建模板 - -要创建模板,您可以使用 `wails generate template` 命令。 要生成默认模板,请运行: - -`wails generate template -name mytemplate` - -这将使用默认文件创建“mytemplate”目录: - -```shell title=mytemplate/ -. -|-- NEXTSTEPS.md -|-- README.md -|-- app.tmpl.go -|-- frontend -| `-- dist -| |-- assets -| | |-- fonts -| | | |-- OFL.txt -| | | `-- nunito-v16-latin-regular.woff2 -| | `-- images -| | `-- logo-dark.svg -| |-- index.html -| |-- main.css -| `-- main.js -|-- go.mod.tmpl -|-- main.tmpl.go -|-- template.json -`-- wails.tmpl.json -``` - -### 模板概述 - -默认模板包含以下文件和目录: - -| 文件名 / 目录 | 描述 | -| --------------- | ----------------- | -| NEXTSTEPS.md | 有关如何完成模板的说明 | -| README.md | 随模板发布的 README | -| app.tmpl.go | `app.go` 模板文件 | -| frontend/ | 包含前端资源的目录 | -| go.mod.tmpl | `go.mod` 模板文件 | -| main.tmpl.go | `main.go` 模板文件 | -| template.json | 模板元数据 | -| wails.tmpl.json | `wails.json` 模板文件 | - -此时,建议按照 `NEXTSTEPS.md` 中的步骤操作。 - -## 从现有项目创建模板 - -通过在生成模板时将路径传递给项目,可以从现有的前端项目创建模板。 我们现在将介绍如何创建 Vue 3 模板: - -- 安装 vue cli: `npm install -g @vue/cli` -- 创建默认项目:`vue create vue3-base` - - 选择 `Default (Vue 3) ([Vue 3] babel, eslint)` -- 项目生成后,运行: - -```shell -> wails generate template -name wails-vue3-template -frontend .\vue3-base\ -Extracting base template files... -Migrating existing project files to frontend directory... -Updating package.json data... -Renaming package.json -> package.tmpl.json... -Updating package-lock.json data... -Renaming package-lock.json -> package-lock.tmpl.json... -``` - -- 现在可以按照 `NEXTSTEPS.md` 中指定的方式定制模板。 -- 一旦文件准备完毕,就可以通过运行命令来测试它:`wails init -n my-vue3-project -t .\wails-vue3-template\` -- 要测试新项目,请运行:`cd my-vue3-project` then `wails build` -- 项目编译完成后,运行它:`.\build\bin\my-vue3-project.exe` -- 您应该有了一个功能齐全的 Vue3 应用程序: - -```mdx-code-block -
- -
-``` - -## 发布模板 - -发布模板只是将文件推送到 GitHub。 鼓励以下最佳实践: - -- 从前端目录中删除任何不需要的文件和目录(例如:.git) -- 确保 `template.json` 完整,尤其是 `helpurl` -- 将文件推送到 GitHub -- 在 [社区模板](../community/templates) 页面上创建 PR -- 在 [模板公告](https://github.com/wailsapp/wails/discussions/825) 讨论板上发布模板 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx deleted file mode 100644 index ea2d1b99d..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/vscode.mdx +++ /dev/null @@ -1,82 +0,0 @@ - -# Visual Studio Code - -此页面提供在使用带有 Wails 的 Visual Studio Code 时的各种提示和技巧。 - -## Vetur 配置 - -非常感谢 [@Lyimmi](https://github.com/Lyimmi) 的这个提示。 最初张贴 [在这里](https://github.com/wailsapp/wails/issues/1791#issuecomment-1228158349)。 - -Vetur 是一个流行的 Visual Studio Code 插件,它为 Vue 项目提供语法高亮和代码完成。 在 VSCode 中加载 Wails 项目时,Vetur 会抛出错误,因为它期望在根目录中找到前端项目。 要解决此问题,您可以执行以下操作: - -在项目根目录创建一个以 `vetur.config.js` 命名的文件。 - -```javascript -// vetur.config.js -/** @type {import('vls').VeturConfig} */ -module.exports = { - // **optional** default: `{}` - // override vscode settings - // Notice: It only affects the settings used by Vetur. - settings: { - "vetur.useWorkspaceDependencies": true, - "vetur.experimental.templateInterpolationService": true - }, - // **optional** default: `[{ root: './' }]` - // support monorepos - projects: [ - { - // **required** - // Where is your project? - // It is relative to `vetur.config.js`. - // root: './packages/repo1', - root: './frontend', - // **optional** default: `'package.json'` - // Where is `package.json` in the project? - // We use it to determine the version of vue. - // It is relative to root property. - package: './package.json', - // **optional** - // Where is TypeScript config file in the project? - // It is relative to root property. - tsconfig: './tsconfig.json', - // **optional** default: `'./.vscode/vetur/snippets'` - // Where is vetur custom snippets folders? - snippetFolder: './.vscode/vetur/snippets', - // **optional** default: `[]` - // Register globally Vue component glob. - // If you set it, you can get completion by that components. - // It is relative to root property. - // Notice: It won't actually do it. You need to use `require.context` or `Vue.component` - globalComponents: [ - './src/components/**/*.vue' - ] - } - ] -} -``` - -接下来,配置 `frontend/tsconfig.json`: - -```javascript -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "outFile": "../../built/local/tsc.js", - "allowJs": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts" - ], - "include": [ - "src/**/*", - "wailsjs/**/*.ts" - ] -} -``` -这应该使您现在可以按预期使用 Vetur。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx deleted file mode 100644 index 02c73c16c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows-installer.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# NSIS 安装程序 - -```mdx-code-block -

- -
-

-``` - -Wails 支持使用 [NSIS 安装程序](https://nsis.sourceforge.io/) 生成 Windows 安装程序。 - -## 安装 NSIS - -### Windows - -安装程序可在 [NSIS 下载页面](https://nsis.sourceforge.io/Download) 上找到。 - -如果您使用 chocolatey 包管理器,请运行以下脚本: - -``` -choco install nsis -``` - -如果手动安装 NSIS,则需要将 NSIS 安装目录中包含 `makensis.exe` 的 *Bin* 目录添加到 PATH 中。 [这是](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) 一个关于如何在 Windows 上添加到 PATH 的好教程。 - -### Linux - -应该可以通过您的发行版的软件包管理器获得 `nsis` 包。 - -### MacOS - -NSIS 可通 homebrew 安装:`brew install nsis`。 - -## 生成安装程序 - -创建新项目时,Wails 会在 `build/windows/installer` 中生成 NSIS 配置文件。 从 `installer/info.json` 读取配置数据,并配置为使用项目的 `wails.json` 信息部分: - -```json -// ... - "Info": { - "companyName": "My Company Name", - "productName": "Wails Vite", - "productVersion": "1.0.0", - "copyright": "Copyright.........", - "comments": "Built using Wails (https://wails.io)" - }, -``` - -要为您的应用程序生成安装程序,请使用 `wails build` 的 `-nsis` 标志: - -``` -wails build -nsis -``` - -现在可用安装程序将生成在 `build/bin` 目录中。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx deleted file mode 100644 index 0fc857c81..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/windows.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Windows - -此页面包含了在 Windows 上开发 Wails 应用程序相关的其他指南。 - -## 处理 WebView2 运行时依赖 - -为 Windows 构建 Wails 应用程序时对 Microsoft [WebView2 运行时](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) 有要求。 默认情况下,Windows 11 会安装它,但有些机器不会。 Wails 提供了一种简单的方法来处理这种依赖关系。 - -通过在构建时使用 `-webview2` 标志, 您可以决定在未检测到合适的运行时的时候(包括安装的运行时是否太旧)应用程序将执行的操作。 四个选项是: - -1. Download(下载) -2. Embed(内嵌) -3. Browser(浏览器) -4. Error(报错) - -### Download(下载) - -此选项将提示用户在未找到合适的运行时时,提供从 Microsoft 的 WebView2 官方站点下载并运行引导程序。 如果用户继续,官方引导程序将被下载并运行。 - -### Embed(内嵌) - -此选项将官方引导程序嵌入到应用程序中。 如果没有找到合适的运行时,应用程序将提供并运行引导程序。 这将使二进制大小增加约 150k。 - -### Browser(浏览器) - -此选项将提示用户没有找到合适的运行时时,提供打开浏览器到 WebView2 官方页面,可以下载和安装引导程序。 然后应用程序将会退出,安装的操作留给用户。 - -### Error(报错) - -如果未找到合适的运行时间,则会向用户显示错误并且不采取进一步措施。 - -## 固定版本运行时 - -处理 webview2 依赖的另一种方法是自己发送。 您可以下载 [固定版本的运行时](https://developer.microsoft.com/microsoft-edge/webview2/#download-section) 并将其捆绑或与您的应用程序一起下载。 - -此外,您应该在启动 wails 时在结构体 `windows.Options` 中指定 webview2 运行时的固定版本的路径。 - -```go - wails.Run(&options.App{ - Windows: &windows.Options{ - WebviewBrowserPath: "", - }, - }) -``` - -注意:当 `WebviewBrowserPath` 指定时,`error` 策略将在最小要求版本不匹配或运行时路径无效的情况下被强制执行。 - -## 创建其他程序 - -当生成其他程序(例如脚本)时,您将看到屏幕上出现该窗口。 要隐藏窗口,可以使用以下代码: - -```go -cmd := exec.Command("your_script.exe") -cmd.SysProcAttr = &syscall.SysProcAttr{ - HideWindow: true, - CreationFlags: 0x08000000, -} -cmd.Start() -``` - -[sithembiso](https://github.com/sithembiso) 在 [讨论板](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172) 上提供的解决方案。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx deleted file mode 100644 index da4672d83..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/menus.mdx +++ /dev/null @@ -1,227 +0,0 @@ ---- -sidebar_position: 4 ---- - -# 菜单 - -可以将应用程序菜单添加到 Wails 项目。 可以通过定义一个 [菜单结构体](#菜单结构体) 并设置 [`菜单选项`](../reference/options#菜单) 或者通过调用运行时方法 [设置应用程序菜单](../reference/runtime/menu#设置应用程序菜单) 来将应用程序菜单添加到 Wails 项目。 - -如何创建菜单的示例: - -```go - AppMenu := menu.NewMenu() - FileMenu := AppMenu.AddSubmenu("File") - FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile) - FileMenu.AddSeparator() - FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { - runtime.Quit() - }) - - if runtime.GOOS == "darwin" { - AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut - } - - err := wails.Run(&options.App{ - Title: "Menus Demo", - Width: 800, - Height: 600, - Menu: AppMenu, - Bind: []interface{}{ - app, - }, - ) - // ... -``` - -也可以通过更新菜单结构体并调用 [更新应用程序菜单](../reference/runtime/menu#更新应用程序菜单) 来动态更新菜单 。 - -上面的示例使用辅助方法,但是可以手动构建菜单结构。 - -## 菜单结构体 - -Menu 是 MenuItem 的集合: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Menu struct { - Items []*MenuItem -} -``` - -对于应用程序菜单,每个 MenuItem 代表一个菜单,例如“编辑”。 - -提供了一个简单的辅助方法来构建菜单: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu -``` - -这使得代码的布局更像菜单的布局,而无需在创建菜单项后手动添加它们。 或者,您可以只创建菜单项并将它们手动添加到菜单中。 - -## 菜单项结构体 - -MenuItem 表示菜单中的一个项目。 - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -// MenuItem represents a menu item contained in a menu -type MenuItem struct { - Label string - Role Role - Accelerator *keys.Accelerator - Type Type - Disabled bool - Hidden bool - Checked bool - SubMenu *Menu - Click Callback -} -``` - -| 字段 | 类型 | 注解 | -| ----------- | ------------------------------------ | ---------------------------- | -| Label | string | 菜单文字 | -| Accelerator | [\*keys.Accelerator](#accelerator) | 此菜单项的键绑定 | -| 类型 | [类型](#type) | 菜单项的类型 | -| Disabled | bool | 禁用菜单项 | -| Hidden | bool | 隐藏此菜单项 | -| Checked | bool | 添加检查项目 (复选框和单选类型) | -| SubMenu | [\*Menu](#menu) | 设置子菜单 | -| Click | [Callback](#callback) | 单击菜单时的回调函数 | -| Role | string | 定义此菜单项的 [角色](#角色)。 暂时只支持 Mac | - -### 快捷键 - -加速器(有时称为键盘快捷键)定义了按键和菜单项之间的绑定。 Wails 将加速器定义为一个组合或键 + [修饰符](#修饰符)。 它们在 `"github.com/wailsapp/wails/v2/pkg/menu/keys"` 包中提供。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut := keys.CmdOrCtrl("o") -``` - -键是键盘上除了`+`的任何字符,它被定义为`加号`。 有些键不能表示为字符,因此可以使用一组命名字符: - -| | | | | -|:-----------:|:-----:|:---------:|:---------:| -| `backspace` | `f1` | `f16` | `f31` | -| `tab` | `f2` | `f17` | `f32` | -| `return` | `f3` | `f18` | `f33` | -| `enter` | `f4` | `f19` | `f34` | -| `escape` | `f5` | `f20` | `f35` | -| `left` | `f6` | `f21` | `numlock` | -| `right` | `f7` | `f22` | | -| `up` | `f8` | `f23` | | -| `down` | `f9` | `f24` | | -| `space` | `f10` | `f25` | | -| `delete` | `f11` | `f36` | | -| `home` | `f12` | `f37` | | -| `end` | `f13` | `f38` | | -| `page up` | `f14` | `page up` | | -| `page down` | `f15` | `f30` | | - -Wails 还支持使用与 Electron 相同的语法来解析加速器。 这对于将加速器存储在配置文件中很有用。 - -示例: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines cmd+o on Mac and ctrl-o on Window/Linux - myShortcut, err := keys.Parse("Ctrl+Option+A") -``` - -#### 修饰符 - -以下修饰符是可以与加速键结合使用的键: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey Modifier = "cmdorctrl" - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey Modifier = "optionoralt" - // ShiftKey represents the shift key on all systems - ShiftKey Modifier = "shift" - // ControlKey represents the control key on all systems - ControlKey Modifier = "ctrl" -) -``` - -许多辅助方法可用于使用修饰符创建加速器: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" -func CmdOrCtrl(key string) *Accelerator -func OptionOrAlt(key string) *Accelerator -func Shift(key string) *Accelerator -func Control(key string) *Accelerator -``` - -可以使用 `keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)` 用以下方式组合修饰符 : - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys" - // Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux - myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey) -``` - -### 类型 - -每个菜单项必须有一个类型,有 5 种类型可用: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -const ( - TextType Type = "Text" - SeparatorType Type = "Separator" - SubmenuType Type = "Submenu" - CheckboxType Type = "Checkbox" - RadioType Type = "Radio" -) -``` - -为方便起见,提供了帮助方法来快速创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func Separator() *MenuItem -func Radio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func SubMenu(label string, menu *Menu) *Menu -``` - -您还可以使用“添加”助手直接在菜单上创建菜单项: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -func (m *Menu) AddText(label string, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSeparator() *MenuItem -func (m *Menu) AddRadio(label string, selected bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddCheckbox(label string, checked bool, accelerator *keys.Accelerator, click Callback) *MenuItem -func (m *Menu) AddSubMenu(label string, menu *Menu) *MenuI -``` - -关于单选组的说明:单选组被定义为在菜单中彼此相邻的多个单选菜单项。 这意味着您不需要将项目组合在一起,因为它是自动的。 但是,这也意味着您不能有 2 个彼此相邻的无线电组 - 它们之间必须有一个非无线电项目。 - -### 回调 - -每个菜单项都可能有一个回调,在单击该项时执行: - -```go title="Package: github.com/wailsapp/wails/v2/pkg/menu" -type Callback func(*CallbackData) - -type CallbackData struct { - MenuItem *MenuItem -} -``` - -该函数被赋予一个 `CallbackData` 结构,该结构指示哪个菜单项触发了回调。 这在使用可能共享回调的单选组时很有用。 - -### 角色 - -:::info 角色 - -目前仅 Mac 支持角色。 - -::: - -一个菜单项可能有一个角色,它本质上是一个预定义的菜单项。 我们目前支持以下角色: - -| 角色 | 描述 | -| ------------ | ---------------------------------------- | -| AppMenuRole | 标准的 Mac 应用程序菜单。 可以使用 `menu.AppMenu()` 创建 | -| EditMenuRole | 标准的 Mac 编辑菜单。 可以使用 `menu.EditMenu()` 创建 | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx deleted file mode 100644 index 26b81b958..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/browser.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 7 ---- - -# 浏览器 - -这些方法与系统浏览器相关。 - -### 浏览器打开 URL - -使用系统默认浏览器打开给定的 URL。 - -Go: `BrowserOpenURL(ctx context.Context, url string)`
JS: `BrowserOpenURL(url string)` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx deleted file mode 100644 index cb5d4d79c..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/dogsapi.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -sidebar_position: 20 ---- - -# 狗狗 API - -```mdx-code-block -
- -
-
-``` - -:::note - -本教程由 [@tatadan](https://twitter.com/tatadan) 友情提供,是他们的 [Wails Examples Repository](https://github.com/tataDan/wails-v2-examples) 的一部分。 - -::: - -在本教程中,我们将开发一个应用程序,从网络上检索狗的照片,然后显示它们。 - -### 创建项目 - -让我们创建应用程序。 从终端输入:`wails init -n dogs-api -t svelte` - -注意:如果您想添加 IDE 支持,我们可以选择在此命令的末尾添加 `-ide vscode` 或 `-ide goland`。 - -现在让我们 `cd dogs-api` 开始编辑项目文件。 - -### 删除未使用的代码 - -我们将从删除一些我们知道不会使用的元素开始: - -- 打开 `app.go` 并删除以下行: - -```go -// Greet returns a greeting for the given name -func (a *App) Greet(name string) string { - return fmt.Sprintf("Hello %s, It's show time!", name) -} -``` - -- 打开 `frontend/src/App.svelte` 并删除所有行。 -- 删除 `frontend/src/assets/images/logo-universal.png` 文件 - -### 创建应用程序 - -现在让我们添加新的 Go 代码。 - -在函数定义之前添加以下结构声明到 `app.go`: - -```go -type RandomImage struct { - Message string - Status string -} - -type AllBreeds struct { - Message map[string]map[string][]string - Status string -} - -type ImagesByBreed struct { - Message []string - Status string -} -``` - -将以下函数添加到 `app.go`(可能在现有函数定义之后): - -```go -func (a *App) GetRandomImageUrl() string { - response, err := http.Get("https://dog.ceo/api/breeds/image/random") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data RandomImage - json.Unmarshal(responseData, &data) - - return data.Message -} - -func (a *App) GetBreedList() []string { - var breeds []string - - response, err := http.Get("https://dog.ceo/api/breeds/list/all") - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data AllBreeds - json.Unmarshal(responseData, &data) - - for k := range data.Message { - breeds = append(breeds, k) - } - - sort.Strings(breeds) - - return breeds -} - -func (a *App) GetImageUrlsByBreed(breed string) []string { - - url := fmt.Sprintf("%s%s%s%s", "https://dog.ceo/api/", "breed/", breed, "/images") - response, err := http.Get(url) - if err != nil { - log.Fatal(err) - } - - responseData, err := ioutil.ReadAll(response.Body) - if err != nil { - log.Fatal(err) - } - - var data ImagesByBreed - json.Unmarshal(responseData, &data) - - return data.Message -} -``` - -将 `app.go` 的 `import` 部分修改为如下所示: - -```go -import ( - "context" - "fmt" - "encoding/json" - "io/ioutil" - "log" - "net/http" - "sort" -) -``` - -将以下行添加到 `frontend/src/App.svelte`: - - -```html - - -

Dogs API

-
- - Click on down arrow to select a breed - - -
-
-{#if showRandomPhoto} - No dog found -{/if} -{#if showBreedPhotos} - {#each photos as photo} - No dog found - {/each} -{/if} - - -``` - - -### 创建应用程序 - -要生成绑定并测试应用程序,请运行 `wails dev`。 - -### 编译应用程序 - -要将应用程序编译为单个可用于生产的二进制文件,请运行 `wails build`。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx deleted file mode 100644 index af3110e78..000000000 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/tutorials/helloworld.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 10 ---- - -# 你好世界 - -本教程的目的是让您使用 Wails 启动并运行最基本的应用程序。 你将可以: - -- 创建一个新的 Wails 应用 -- 构建应用 -- 运行应用 - -:::note - -本教程使用 Windows 作为目标平台。 根据您的操作系统,输出会略有不同。 - -::: - -## 创建一个新的 Wails 应用 - -使用默认的 vanilla JS 模板创建新的 Wails 程序, 您需要运行这个指令: - -```bash -wails init -n helloworld -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -Initialising Project 'helloworld' ---------------------------------- - -Project Name: helloworld -Project Directory: C:\Users\leaan\tutorial\helloworld -Project Template: vanilla -Template Support: https://wails.io - -Initialised project 'helloworld' in 232ms. -``` - -这将在当前目录中创建一个名为 `helloworld` 的新目录。 在此目录中,您将找到许多文件: - -``` -build/ - Contains the build files + compiled application -frontend/ - Contains the frontend files -app.go - Contains the application code -main.go - The main program with the application configuration -wails.json - The project configuration file -go.mod - The go module file -go.sum - The go module checksum file -``` - -## 构建应用 - -要构建应用程序,请切换到新的 `helloword` 项目目录并运行以下命令: - -```bash -wails build -``` - -您应该会看到如下输出: - -``` -Wails CLI v2.0.0 - -App Type: desktop -Platforms: windows/amd64 -Compiler: C:\Users\leaan\go\go1.18.3\bin\go.exe -Build Mode: Production -Skip Frontend: false -Compress: false -Package: true -Clean Build Dir: false -LDFlags: "" -Tags: [] -Race Detector: false - -Building target: windows/amd64 ------------------------------- - - Installing frontend dependencies: Done. - - Compiling frontend: Done. - - Generating bundle assets: Done. - - Compiling application: Done. -Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s. -``` - -这已经编译了应用程序并将其保存在 `build/bin` 目录中。 - -## 运行应用 - -如果我们在 Windows 文件管理器中查看 `build/bin` 目录,我们应该看到我们的项目二进制文件: - -```mdx-code-block -
- -
-
-``` - -我们可以通过简单的双击 `helloworld.exe` 文件来运行它。 - -在 Mac 上,Wails 生成一个 `helloworld.app` 文件,可以通过双击来运行。 - -在 Linux 上,您可以从 `build/bin` 目录使用 `./helloword` 运行应用程序。 - -您应该看到应用程序正常工作: - -```mdx-code-block -
- -
-
-``` diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/appendix/_category_.json similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/appendix/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/appendix/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/_category_.json similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/community/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.1.0/community/links.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/links.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/_category_.json diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/emailit.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/emailit.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/encrypteasy.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/minecraftupdater.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/minecraftupdater.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/modalfilemanager.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/modalfilemanager.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/modalfilemanager.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/mollywallet.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/october.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/october.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/optimus.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/portfall.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/portfall.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/restic-browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/restic-browser.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/community/showcase/riftshare.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/scriptbar.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/scriptbar.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/scriptbar.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/surge.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wally.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/wombat.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/ytd.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/community/templates.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/developing-new-features.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/developing-new-features.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/developing-new-features.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/documenting.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/documenting.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/documenting.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/fixing-bugs.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/fixing-bugs.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/fixing-bugs.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/setting-up-a-dev-environment.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/setting-up-a-dev-environment.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/setting-up-a-dev-environment.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/ways-of-contributing.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0-rc.1/contributing/ways-of-contributing.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/contributing/ways-of-contributing.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/gettingstarted/building.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/development.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/gettingstarted/installation.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/guides/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/angular.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/angular.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/angular.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/application-development.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/dynamic-assets.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/dynamic-assets.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/frameless.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/frontend.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/ides.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/ides.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/linux-distro-support.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/linux.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/linux.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/local-development.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/mac-appstore.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/manual-builds.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/migrating.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/mouse-buttons.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/obfuscated.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/guides/obfuscated.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/overscroll.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/routing.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/routing.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/signing.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/signing.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/templates.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/templates.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/troubleshooting.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/vscode.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/vscode.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows-installer.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/guides/windows.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/guides/windows.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/howdoesitwork.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/howdoesitwork.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/introduction.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/cli.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/cli.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/reference/menus.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/menus.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/options.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/options.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/project-config.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.0.0/reference/runtime/browser.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/events.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/events.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/intro.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/log.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.3.0/reference/runtime/window.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/tutorials/_category_.json rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/_category_.json diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/dogsapi.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/dogsapi.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.2.0/tutorials/helloworld.mdx rename to website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/package-lock.json b/website/package-lock.json new file mode 100644 index 000000000..cb2dfbd15 --- /dev/null +++ b/website/package-lock.json @@ -0,0 +1,12817 @@ +{ + "name": "wails-website", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "wails-website", + "version": "0.0.0", + "dependencies": { + "@crowdin/crowdin-api-client": "^1.19.2", + "@docusaurus/core": "^2.1.0", + "@docusaurus/preset-classic": "^2.1.0", + "@docusaurus/theme-search-algolia": "^2.1.0", + "@mdx-js/react": "^1.6.22", + "@swc/core": "^1.3.7", + "clsx": "^1.2.1", + "file-loader": "^6.2.0", + "pnpm": "^7.29.1", + "prism-react-renderer": "^1.3.5", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-responsive-carousel": "^3.2.23", + "swc-loader": "^0.2.3" + }, + "devDependencies": { + "@crowdin/cli": "^3.8.1", + "prettier": "^2.7.1" + } + }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.4.tgz", + "integrity": "sha512-daoLpQ3ps/VTMRZDEBfU8ixXd+amZcNJ4QSP3IERGyzqnL5Ch8uSRFt/4G8pUvW9c3o6GA4vtVv4I4lmnkdXyg==", + "dependencies": { + "@algolia/autocomplete-shared": "1.7.4" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.4.tgz", + "integrity": "sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==", + "dependencies": { + "@algolia/autocomplete-shared": "1.7.4" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.4.tgz", + "integrity": "sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==" + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.15.0.tgz", + "integrity": "sha512-uxxFhTWh4JJDb2+FFSmNMfEQ8p9o2vjSpU7iW007QX3OvqljPPN68lk3bpZVaG8pwr5MU1DqpkZ71FcQdVTjgQ==", + "dependencies": { + "@algolia/cache-common": "4.15.0" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.15.0.tgz", + "integrity": "sha512-Me3PbI4QurAM+3D+htIE0l1xt6+bl/18SG6Wc7bPQEZAtN7DTGz22HqhKNyLF2lR/cOfpaH7umXZlZEhIHf7gQ==" + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.15.0.tgz", + "integrity": "sha512-B9mg1wd7CKMfpkbiTQ8KlcKkH6ut/goVaI6XmDCUczOOqeuZlV34tuEi7o3Xo1j66KWr/d9pMjjGYcoVPCVeOA==", + "dependencies": { + "@algolia/cache-common": "4.15.0" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.15.0.tgz", + "integrity": "sha512-8wqI33HRZy5ydfFt6F5vMhtkOiAUhVfSCYXx4U3Go5RALqWLgVUp6wzOo0mr1z08POCkHDpbQMQvyayb1CZ/kw==", + "dependencies": { + "@algolia/client-common": "4.15.0", + "@algolia/client-search": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.15.0.tgz", + "integrity": "sha512-jrPjEeNEIIQKeA1XCZXx3f3aybtwF7wjYlnfHbLARuZ9AuHzimOKjX0ZwqvMmvTsHivpcZ2rqY+j1E8HoH1ELA==", + "dependencies": { + "@algolia/client-common": "4.15.0", + "@algolia/client-search": "4.15.0", + "@algolia/requester-common": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.15.0.tgz", + "integrity": "sha512-PlsJMObZuYw4JlG5EhYv1PHDOv7n5mD5PzqFyoNfSOYaEPRZepa3W579ya29yOu3FZ0VGMNJmB7Q5v/+/fwvIw==", + "dependencies": { + "@algolia/requester-common": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.15.0.tgz", + "integrity": "sha512-Bf0bhRAiNL9LWurzyHRH8UBi4fDt3VbCNkInxVngKQT1uCZWXecwoPWGhcSSpdanBqFJA/1WBt+BWx7a50Bhlg==", + "dependencies": { + "@algolia/client-common": "4.15.0", + "@algolia/requester-common": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.15.0.tgz", + "integrity": "sha512-dTwZD4u53WdmexnMcoO2Qd/+YCP3ESXKOtD2MryQ1a9dHwB2Y3Qob0kyS1PG82idwM3enbznvscI9Sf4o9PUWQ==", + "dependencies": { + "@algolia/client-common": "4.15.0", + "@algolia/requester-common": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/@algolia/events": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@algolia/events/-/events-4.0.1.tgz", + "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" + }, + "node_modules/@algolia/logger-common": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.15.0.tgz", + "integrity": "sha512-D8OFwn/HpvQz66goIcjxOKsYBMuxiruxJ3cA/bnc0EiDvSA2P2z6bNQWgS5gbstuTZIJmbhr+53NyOxFkmMNAA==" + }, + "node_modules/@algolia/logger-console": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.15.0.tgz", + "integrity": "sha512-pQOvVaRSEJQJRXKTnxEA6nN1hipSQadJJ4einw0nIlfMOGZh/kps1ybh8vRUlUGyfEuN/3dyFs0W3Ac7hIItlg==", + "dependencies": { + "@algolia/logger-common": "4.15.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.15.0.tgz", + "integrity": "sha512-va186EfALF+6msYZXaoBSxcnFCg3SoWJ+uv1yMyhQRJRe7cZSHWSVT3s40vmar90gxlBu80KMVwVlsvJhJv6ew==", + "dependencies": { + "@algolia/requester-common": "4.15.0" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.15.0.tgz", + "integrity": "sha512-w0UUzxElbo4hrKg4QP/jiXDNbIJuAthxdlkos9nS8KAPK2XI3R9BlUjLz/ZVs4F9TDGI0mhjrNHhZ12KXcoyhg==" + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.15.0.tgz", + "integrity": "sha512-eeEOhFtgwKcgAlKAZpgBRZJ0ILSEBCXxZ9uwfVWPD24W1b6z08gVoTJ6J7lCeCnJmudg+tMElDnGzHkjup9CJA==", + "dependencies": { + "@algolia/requester-common": "4.15.0" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.15.0.tgz", + "integrity": "sha512-JoWR+ixG3EmA0UPntQFN/FV5TasYcYu93d5+oKzHFeZ6Z7rtW5Im9iy/Oh/ggk1AAN5fTdqKewtbBpdaYDbKsQ==", + "dependencies": { + "@algolia/cache-common": "4.15.0", + "@algolia/logger-common": "4.15.0", + "@algolia/requester-common": "4.15.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", + "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.0.tgz", + "integrity": "sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.21.0", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-module-transforms": "^7.21.0", + "@babel/helpers": "^7.21.0", + "@babel/parser": "^7.21.0", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", + "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", + "dependencies": { + "@babel/types": "^7.21.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", + "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz", + "integrity": "sha512-Q8wNiMIdwsv5la5SPxNYzzkPnjgC0Sy0i7jLkVOCdllu/xcVNkr3TeZzbHBJrj+XXRqzX5uCyCoV9eu6xUG7KQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-member-expression-to-functions": "^7.21.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/helper-split-export-declaration": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz", + "integrity": "sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "dependencies": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "dependencies": { + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", + "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", + "dependencies": { + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", + "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.2", + "@babel/types": "^7.21.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz", + "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.20.7", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.20.7", + "@babel/types": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dependencies": { + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", + "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", + "dependencies": { + "@babel/types": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", + "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "dependencies": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", + "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "dependencies": { + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.0", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz", + "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz", + "integrity": "sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/plugin-proposal-optional-chaining": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", + "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", + "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", + "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", + "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", + "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", + "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", + "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz", + "integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q==", + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-remap-async-to-generator": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", + "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", + "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", + "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/template": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz", + "integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", + "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "dependencies": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.20.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz", + "integrity": "sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g==", + "dependencies": { + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", + "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", + "dependencies": { + "@babel/helper-module-transforms": "^7.21.2", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-simple-access": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.20.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz", + "integrity": "sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw==", + "dependencies": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-identifier": "^7.19.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", + "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz", + "integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-constant-elements": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.20.2.tgz", + "integrity": "sha512-KS/G8YI8uwMGKErLFOHS/ekhqdHhpEloxs43NecQHVgo2QuQSyJhGIY1fL8UGl9wy5ItVwwoUL4YxVqsplGq2g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-display-name": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz", + "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.21.0.tgz", + "integrity": "sha512-6OAWljMvQrZjR2DaNhVfRz6dkCAVV+ymcLUmaf8bccGOHn2v5rHJK3tTpij0BuhdYWP4LLaqj5lwcdlpAAPuvg==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-jsx": "^7.18.6", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz", + "integrity": "sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==", + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-pure-annotations": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz", + "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", + "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "regenerator-transform": "^0.15.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.0.tgz", + "integrity": "sha512-ReY6pxwSzEU0b3r2/T/VhqMKg/AkceBT19X0UptA3/tYi5Pe2eXgEUH+NNMC5nok6c6XQz5tyVTUpuezRfSMSg==", + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz", + "integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.21.0.tgz", + "integrity": "sha512-xo///XTPp3mDzTtrqXoBlK9eiAYW3wv9JXglcn/u1bi60RW11dEUxIgA8cbnDhutS1zacjMRmAwxE0gMklLnZg==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-typescript": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", + "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "dependencies": { + "@babel/compat-data": "^7.20.1", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.20.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.20.2", + "@babel/plugin-transform-classes": "^7.20.2", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.20.2", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.19.6", + "@babel/plugin-transform-modules-commonjs": "^7.19.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.6", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.20.1", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.20.2", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-react": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.18.6.tgz", + "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-react-display-name": "^7.18.6", + "@babel/plugin-transform-react-jsx": "^7.18.6", + "@babel/plugin-transform-react-jsx-development": "^7.18.6", + "@babel/plugin-transform-react-pure-annotations": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.21.0.tgz", + "integrity": "sha512-myc9mpoVA5m1rF8K8DgLEatOYFDpwC+RkMkjZ0Du6uI62YvDe8uxIEYVs/VCdSJ097nlALiU/yBC7//3nI+hNg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-option": "^7.21.0", + "@babel/plugin-transform-typescript": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" + }, + "node_modules/@babel/runtime": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", + "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz", + "integrity": "sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==", + "dependencies": { + "core-js-pure": "^3.25.1", + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", + "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.2.tgz", + "integrity": "sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw==", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.21.1", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.21.2", + "@babel/types": "^7.21.2", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", + "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", + "dependencies": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@crowdin/cli": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@crowdin/cli/-/cli-3.10.0.tgz", + "integrity": "sha512-ez2nZ84jLe/WppZ5ggfZtC9rDUyCbsYengsmKVKeUYfx30lccuyAeQltAdxcwU4v3f58hTNAty0VvCx9zLPl0Q==", + "dev": true, + "dependencies": { + "command-exists-promise": "^2.0.2", + "node-fetch": "2.6.7", + "shelljs": "^0.8.4", + "tar": "^4.4.8", + "yauzl": "^2.10.0" + }, + "bin": { + "crowdin": "jdeploy-bundle/jdeploy.js" + } + }, + "node_modules/@crowdin/crowdin-api-client": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/@crowdin/crowdin-api-client/-/crowdin-api-client-1.22.0.tgz", + "integrity": "sha512-Yk13PZppK8k3uZQidfowbvzcAGtZ7ZoRI5oUT+i5OO5udFtF046A91pqE8szRSe1uHo05Y1OcYxkQz4a0j60zA==", + "dependencies": { + "axios": "^1" + }, + "engines": { + "node": ">=12.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@docsearch/css": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.3.3.tgz", + "integrity": "sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==" + }, + "node_modules/@docsearch/react": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.3.3.tgz", + "integrity": "sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==", + "dependencies": { + "@algolia/autocomplete-core": "1.7.4", + "@algolia/autocomplete-preset-algolia": "1.7.4", + "@docsearch/css": "3.3.3", + "algoliasearch": "^4.0.0" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/@docusaurus/core": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-2.3.1.tgz", + "integrity": "sha512-0Jd4jtizqnRAr7svWaBbbrCCN8mzBNd2xFLoT/IM7bGfFie5y58oz97KzXliwiLY3zWjqMXjQcuP1a5VgCv2JA==", + "dependencies": { + "@babel/core": "^7.18.6", + "@babel/generator": "^7.18.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.18.6", + "@babel/preset-env": "^7.18.6", + "@babel/preset-react": "^7.18.6", + "@babel/preset-typescript": "^7.18.6", + "@babel/runtime": "^7.18.6", + "@babel/runtime-corejs3": "^7.18.6", + "@babel/traverse": "^7.18.8", + "@docusaurus/cssnano-preset": "2.3.1", + "@docusaurus/logger": "2.3.1", + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/react-loadable": "5.5.2", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-common": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "@slorber/static-site-generator-webpack-plugin": "^4.0.7", + "@svgr/webpack": "^6.2.1", + "autoprefixer": "^10.4.7", + "babel-loader": "^8.2.5", + "babel-plugin-dynamic-import-node": "^2.3.3", + "boxen": "^6.2.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "clean-css": "^5.3.0", + "cli-table3": "^0.6.2", + "combine-promises": "^1.1.0", + "commander": "^5.1.0", + "copy-webpack-plugin": "^11.0.0", + "core-js": "^3.23.3", + "css-loader": "^6.7.1", + "css-minimizer-webpack-plugin": "^4.0.0", + "cssnano": "^5.1.12", + "del": "^6.1.1", + "detect-port": "^1.3.0", + "escape-html": "^1.0.3", + "eta": "^2.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^10.1.0", + "html-minifier-terser": "^6.1.0", + "html-tags": "^3.2.0", + "html-webpack-plugin": "^5.5.0", + "import-fresh": "^3.3.0", + "leven": "^3.1.0", + "lodash": "^4.17.21", + "mini-css-extract-plugin": "^2.6.1", + "postcss": "^8.4.14", + "postcss-loader": "^7.0.0", + "prompts": "^2.4.2", + "react-dev-utils": "^12.0.1", + "react-helmet-async": "^1.3.0", + "react-loadable": "npm:@docusaurus/react-loadable@5.5.2", + "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-router": "^5.3.3", + "react-router-config": "^5.1.1", + "react-router-dom": "^5.3.3", + "rtl-detect": "^1.0.4", + "semver": "^7.3.7", + "serve-handler": "^6.1.3", + "shelljs": "^0.8.5", + "terser-webpack-plugin": "^5.3.3", + "tslib": "^2.4.0", + "update-notifier": "^5.1.0", + "url-loader": "^4.1.1", + "wait-on": "^6.0.1", + "webpack": "^5.73.0", + "webpack-bundle-analyzer": "^4.5.0", + "webpack-dev-server": "^4.9.3", + "webpack-merge": "^5.8.0", + "webpackbar": "^5.0.2" + }, + "bin": { + "docusaurus": "bin/docusaurus.mjs" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/cssnano-preset": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.3.1.tgz", + "integrity": "sha512-7mIhAROES6CY1GmCjR4CZkUfjTL6B3u6rKHK0ChQl2d1IevYXq/k/vFgvOrJfcKxiObpMnE9+X6R2Wt1KqxC6w==", + "dependencies": { + "cssnano-preset-advanced": "^5.3.8", + "postcss": "^8.4.14", + "postcss-sort-media-queries": "^4.2.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + } + }, + "node_modules/@docusaurus/logger": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.3.1.tgz", + "integrity": "sha512-2lAV/olKKVr9qJhfHFCaqBIl8FgYjbUFwgUnX76+cULwQYss+42ZQ3grHGFvI0ocN2X55WcYe64ellQXz7suqg==", + "dependencies": { + "chalk": "^4.1.2", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + } + }, + "node_modules/@docusaurus/mdx-loader": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.3.1.tgz", + "integrity": "sha512-Gzga7OsxQRpt3392K9lv/bW4jGppdLFJh3luKRknCKSAaZrmVkOQv2gvCn8LAOSZ3uRg5No7AgYs/vpL8K94lA==", + "dependencies": { + "@babel/parser": "^7.18.8", + "@babel/traverse": "^7.18.8", + "@docusaurus/logger": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@mdx-js/mdx": "^1.6.22", + "escape-html": "^1.0.3", + "file-loader": "^6.2.0", + "fs-extra": "^10.1.0", + "image-size": "^1.0.1", + "mdast-util-to-string": "^2.0.0", + "remark-emoji": "^2.2.0", + "stringify-object": "^3.3.0", + "tslib": "^2.4.0", + "unified": "^9.2.2", + "unist-util-visit": "^2.0.3", + "url-loader": "^4.1.1", + "webpack": "^5.73.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/module-type-aliases": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.3.1.tgz", + "integrity": "sha512-6KkxfAVOJqIUynTRb/tphYCl+co3cP0PlHiMDbi+SzmYxMdgIrwYqH9yAnGSDoN6Jk2ZE/JY/Azs/8LPgKP48A==", + "dependencies": { + "@docusaurus/react-loadable": "5.5.2", + "@docusaurus/types": "2.3.1", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "@types/react-router-dom": "*", + "react-helmet-async": "*", + "react-loadable": "npm:@docusaurus/react-loadable@5.5.2" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/@docusaurus/plugin-content-blog": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.3.1.tgz", + "integrity": "sha512-f5LjqX+9WkiLyGiQ41x/KGSJ/9bOjSD8lsVhPvYeUYHCtYpuiDKfhZE07O4EqpHkBx4NQdtQDbp+aptgHSTuiw==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/logger": "2.3.1", + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-common": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "cheerio": "^1.0.0-rc.12", + "feed": "^4.2.2", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "reading-time": "^1.5.0", + "tslib": "^2.4.0", + "unist-util-visit": "^2.0.3", + "utility-types": "^3.10.0", + "webpack": "^5.73.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-content-docs": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.3.1.tgz", + "integrity": "sha512-DxztTOBEruv7qFxqUtbsqXeNcHqcVEIEe+NQoI1oi2DBmKBhW/o0MIal8lt+9gvmpx3oYtlwmLOOGepxZgJGkw==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/logger": "2.3.1", + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/module-type-aliases": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "@types/react-router-config": "^5.0.6", + "combine-promises": "^1.1.0", + "fs-extra": "^10.1.0", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "tslib": "^2.4.0", + "utility-types": "^3.10.0", + "webpack": "^5.73.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-content-pages": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.3.1.tgz", + "integrity": "sha512-E80UL6hvKm5VVw8Ka8YaVDtO6kWWDVUK4fffGvkpQ/AJQDOg99LwOXKujPoICC22nUFTsZ2Hp70XvpezCsFQaA==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "fs-extra": "^10.1.0", + "tslib": "^2.4.0", + "webpack": "^5.73.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-debug": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.3.1.tgz", + "integrity": "sha512-Ujpml1Ppg4geB/2hyu2diWnO49az9U2bxM9Shen7b6qVcyFisNJTkVG2ocvLC7wM1efTJcUhBO6zAku2vKJGMw==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "fs-extra": "^10.1.0", + "react-json-view": "^1.21.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-google-analytics": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.3.1.tgz", + "integrity": "sha512-OHip0GQxKOFU8n7gkt3TM4HOYTXPCFDjqKbMClDD3KaDnyTuMp/Zvd9HSr770lLEscgPWIvzhJByRAClqsUWiQ==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-google-gtag": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.3.1.tgz", + "integrity": "sha512-uXtDhfu4+Hm+oqWUySr3DNI5cWC/rmP6XJyAk83Heor3dFjZqDwCbkX8yWPywkRiWev3Dk/rVF8lEn0vIGVocA==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-google-tag-manager": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.3.1.tgz", + "integrity": "sha512-Ww2BPEYSqg8q8tJdLYPFFM3FMDBCVhEM4UUqKzJaiRMx3NEoly3qqDRAoRDGdIhlC//Rf0iJV9cWAoq2m6k3sw==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/plugin-sitemap": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.3.1.tgz", + "integrity": "sha512-8Yxile/v6QGYV9vgFiYL+8d2N4z4Er3pSHsrD08c5XI8bUXxTppMwjarDUTH/TRTfgAWotRbhJ6WZLyajLpozA==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/logger": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-common": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "fs-extra": "^10.1.0", + "sitemap": "^7.1.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/preset-classic": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.3.1.tgz", + "integrity": "sha512-OQ5W0AHyfdUk0IldwJ3BlnZ1EqoJuu2L2BMhqLbqwNWdkmzmSUvlFLH1Pe7CZSQgB2YUUC/DnmjbPKk/qQD0lQ==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/plugin-content-blog": "2.3.1", + "@docusaurus/plugin-content-docs": "2.3.1", + "@docusaurus/plugin-content-pages": "2.3.1", + "@docusaurus/plugin-debug": "2.3.1", + "@docusaurus/plugin-google-analytics": "2.3.1", + "@docusaurus/plugin-google-gtag": "2.3.1", + "@docusaurus/plugin-google-tag-manager": "2.3.1", + "@docusaurus/plugin-sitemap": "2.3.1", + "@docusaurus/theme-classic": "2.3.1", + "@docusaurus/theme-common": "2.3.1", + "@docusaurus/theme-search-algolia": "2.3.1", + "@docusaurus/types": "2.3.1" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/react-loadable": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", + "integrity": "sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==", + "dependencies": { + "@types/react": "*", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/@docusaurus/theme-classic": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.3.1.tgz", + "integrity": "sha512-SelSIDvyttb7ZYHj8vEUhqykhAqfOPKk+uP0z85jH72IMC58e7O8DIlcAeBv+CWsLbNIl9/Hcg71X0jazuxJug==", + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/module-type-aliases": "2.3.1", + "@docusaurus/plugin-content-blog": "2.3.1", + "@docusaurus/plugin-content-docs": "2.3.1", + "@docusaurus/plugin-content-pages": "2.3.1", + "@docusaurus/theme-common": "2.3.1", + "@docusaurus/theme-translations": "2.3.1", + "@docusaurus/types": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-common": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "@mdx-js/react": "^1.6.22", + "clsx": "^1.2.1", + "copy-text-to-clipboard": "^3.0.1", + "infima": "0.2.0-alpha.42", + "lodash": "^4.17.21", + "nprogress": "^0.2.0", + "postcss": "^8.4.14", + "prism-react-renderer": "^1.3.5", + "prismjs": "^1.28.0", + "react-router-dom": "^5.3.3", + "rtlcss": "^3.5.0", + "tslib": "^2.4.0", + "utility-types": "^3.10.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/theme-common": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.3.1.tgz", + "integrity": "sha512-RYmYl2OR2biO+yhmW1aS5FyEvnrItPINa+0U2dMxcHpah8reSCjQ9eJGRmAgkZFchV1+aIQzXOI1K7LCW38O0g==", + "dependencies": { + "@docusaurus/mdx-loader": "2.3.1", + "@docusaurus/module-type-aliases": "2.3.1", + "@docusaurus/plugin-content-blog": "2.3.1", + "@docusaurus/plugin-content-docs": "2.3.1", + "@docusaurus/plugin-content-pages": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router-config": "*", + "clsx": "^1.2.1", + "parse-numeric-range": "^1.3.0", + "prism-react-renderer": "^1.3.5", + "tslib": "^2.4.0", + "use-sync-external-store": "^1.2.0", + "utility-types": "^3.10.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/theme-search-algolia": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.3.1.tgz", + "integrity": "sha512-JdHaRqRuH1X++g5fEMLnq7OtULSGQdrs9AbhcWRQ428ZB8/HOiaN6mj3hzHvcD3DFgu7koIVtWPQnvnN7iwzHA==", + "dependencies": { + "@docsearch/react": "^3.1.1", + "@docusaurus/core": "2.3.1", + "@docusaurus/logger": "2.3.1", + "@docusaurus/plugin-content-docs": "2.3.1", + "@docusaurus/theme-common": "2.3.1", + "@docusaurus/theme-translations": "2.3.1", + "@docusaurus/utils": "2.3.1", + "@docusaurus/utils-validation": "2.3.1", + "algoliasearch": "^4.13.1", + "algoliasearch-helper": "^3.10.0", + "clsx": "^1.2.1", + "eta": "^2.0.0", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "tslib": "^2.4.0", + "utility-types": "^3.10.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/theme-translations": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.3.1.tgz", + "integrity": "sha512-BsBZzAewJabVhoGG1Ij2u4pMS3MPW6gZ6sS4pc+Y7czevRpzxoFNJXRtQDVGe7mOpv/MmRmqg4owDK+lcOTCVQ==", + "dependencies": { + "fs-extra": "^10.1.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + } + }, + "node_modules/@docusaurus/types": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-2.3.1.tgz", + "integrity": "sha512-PREbIRhTaNNY042qmfSE372Jb7djZt+oVTZkoqHJ8eff8vOIc2zqqDqBVc5BhOfpZGPTrE078yy/torUEZy08A==", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "commander": "^5.1.0", + "joi": "^17.6.0", + "react-helmet-async": "^1.3.0", + "utility-types": "^3.10.0", + "webpack": "^5.73.0", + "webpack-merge": "^5.8.0" + }, + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0", + "react-dom": "^16.8.4 || ^17.0.0" + } + }, + "node_modules/@docusaurus/utils": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.3.1.tgz", + "integrity": "sha512-9WcQROCV0MmrpOQDXDGhtGMd52DHpSFbKLfkyaYumzbTstrbA5pPOtiGtxK1nqUHkiIv8UwexS54p0Vod2I1lg==", + "dependencies": { + "@docusaurus/logger": "2.3.1", + "@svgr/webpack": "^6.2.1", + "escape-string-regexp": "^4.0.0", + "file-loader": "^6.2.0", + "fs-extra": "^10.1.0", + "github-slugger": "^1.4.0", + "globby": "^11.1.0", + "gray-matter": "^4.0.3", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.5", + "resolve-pathname": "^3.0.0", + "shelljs": "^0.8.5", + "tslib": "^2.4.0", + "url-loader": "^4.1.1", + "webpack": "^5.73.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "@docusaurus/types": "*" + }, + "peerDependenciesMeta": { + "@docusaurus/types": { + "optional": true + } + } + }, + "node_modules/@docusaurus/utils-common": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.3.1.tgz", + "integrity": "sha512-pVlRpXkdNcxmKNxAaB1ya2hfCEvVsLDp2joeM6K6uv55Oc5nVIqgyYSgSNKZyMdw66NnvMfsu0RBylcwZQKo9A==", + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + }, + "peerDependencies": { + "@docusaurus/types": "*" + }, + "peerDependenciesMeta": { + "@docusaurus/types": { + "optional": true + } + } + }, + "node_modules/@docusaurus/utils-validation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.3.1.tgz", + "integrity": "sha512-7n0208IG3k1HVTByMHlZoIDjjOFC8sbViHVXJx0r3Q+3Ezrx+VQ1RZ/zjNn6lT+QBCRCXlnlaoJ8ug4HIVgQ3w==", + "dependencies": { + "@docusaurus/logger": "2.3.1", + "@docusaurus/utils": "2.3.1", + "joi": "^17.6.0", + "js-yaml": "^4.1.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.14" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dependencies": { + "@sinclair/typebox": "^0.25.16" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", + "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", + "dependencies": { + "@jest/schemas": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", + "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" + }, + "node_modules/@mdx-js/mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz", + "integrity": "sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==", + "dependencies": { + "@babel/core": "7.12.9", + "@babel/plugin-syntax-jsx": "7.12.1", + "@babel/plugin-syntax-object-rest-spread": "7.8.3", + "@mdx-js/util": "1.6.22", + "babel-plugin-apply-mdx-type-prop": "1.6.22", + "babel-plugin-extract-import-names": "1.6.22", + "camelcase-css": "2.0.1", + "detab": "2.0.4", + "hast-util-raw": "6.0.1", + "lodash.uniq": "4.5.0", + "mdast-util-to-hast": "10.0.1", + "remark-footnotes": "2.0.0", + "remark-mdx": "1.6.22", + "remark-parse": "8.0.3", + "remark-squeeze-paragraphs": "4.0.0", + "style-to-object": "0.3.0", + "unified": "9.2.0", + "unist-builder": "2.0.3", + "unist-util-visit": "2.0.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mdx-js/mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@mdx-js/mdx/node_modules/@babel/plugin-syntax-jsx": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@mdx-js/mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@mdx-js/mdx/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@mdx-js/mdx/node_modules/unified": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mdx-js/react": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz", + "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0" + } + }, + "node_modules/@mdx-js/util": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", + "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.21", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", + "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" + }, + "node_modules/@sideway/address": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" + }, + "node_modules/@sinclair/typebox": { + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==" + }, + "node_modules/@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@slorber/static-site-generator-webpack-plugin": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.7.tgz", + "integrity": "sha512-Ug7x6z5lwrz0WqdnNFOMYrDQNTPAprvHLSh6+/fmml3qUiz6l5eq+2MzLKWtn/q5K5NpSiFsZTP/fck/3vjSxA==", + "dependencies": { + "eval": "^0.1.8", + "p-map": "^4.0.0", + "webpack-sources": "^3.2.2" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@svgr/babel-plugin-add-jsx-attribute": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz", + "integrity": "sha512-9PYGcXrAxitycIjRmZB+Q0JaN07GZIWaTBIGQzfaZv+qr1n8X1XUEJ5rZ/vx6OVD9RRYlrNnXWExQXcmZeD/BQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.5.0.tgz", + "integrity": "sha512-8zYdkym7qNyfXpWvu4yq46k41pyNM9SOstoWhKlm+IfdCE1DdnRKeMUPsWIEO/DEkaWxJ8T9esNdG3QwQ93jBA==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.5.0.tgz", + "integrity": "sha512-NFdxMq3xA42Kb1UbzCVxplUc0iqSyM9X8kopImvFnB+uSDdzIHOdbs1op8ofAvVRtbg4oZiyRl3fTYeKcOe9Iw==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.5.1.tgz", + "integrity": "sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-dynamic-title": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.5.1.tgz", + "integrity": "sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-em-dimensions": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.5.1.tgz", + "integrity": "sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-react-native-svg": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.5.1.tgz", + "integrity": "sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg==", + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-svg-component": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.5.1.tgz", + "integrity": "sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-preset": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.5.1.tgz", + "integrity": "sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw==", + "dependencies": { + "@svgr/babel-plugin-add-jsx-attribute": "^6.5.1", + "@svgr/babel-plugin-remove-jsx-attribute": "*", + "@svgr/babel-plugin-remove-jsx-empty-expression": "*", + "@svgr/babel-plugin-replace-jsx-attribute-value": "^6.5.1", + "@svgr/babel-plugin-svg-dynamic-title": "^6.5.1", + "@svgr/babel-plugin-svg-em-dimensions": "^6.5.1", + "@svgr/babel-plugin-transform-react-native-svg": "^6.5.1", + "@svgr/babel-plugin-transform-svg-component": "^6.5.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/core": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-6.5.1.tgz", + "integrity": "sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==", + "dependencies": { + "@babel/core": "^7.19.6", + "@svgr/babel-preset": "^6.5.1", + "@svgr/plugin-jsx": "^6.5.1", + "camelcase": "^6.2.0", + "cosmiconfig": "^7.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/hast-util-to-babel-ast": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.5.1.tgz", + "integrity": "sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==", + "dependencies": { + "@babel/types": "^7.20.0", + "entities": "^4.4.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/plugin-jsx": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz", + "integrity": "sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw==", + "dependencies": { + "@babel/core": "^7.19.6", + "@svgr/babel-preset": "^6.5.1", + "@svgr/hast-util-to-babel-ast": "^6.5.1", + "svg-parser": "^2.0.4" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@svgr/core": "^6.0.0" + } + }, + "node_modules/@svgr/plugin-svgo": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-6.5.1.tgz", + "integrity": "sha512-omvZKf8ixP9z6GWgwbtmP9qQMPX4ODXi+wzbVZgomNFsUIlHA1sf4fThdwTWSsZGgvGAG6yE+b/F5gWUkcZ/iQ==", + "dependencies": { + "cosmiconfig": "^7.0.1", + "deepmerge": "^4.2.2", + "svgo": "^2.8.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@svgr/core": "*" + } + }, + "node_modules/@svgr/webpack": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-6.5.1.tgz", + "integrity": "sha512-cQ/AsnBkXPkEK8cLbv4Dm7JGXq2XrumKnL1dRpJD9rIO2fTIlJI9a1uCciYG1F2aUsox/hJQyNGbt3soDxSRkA==", + "dependencies": { + "@babel/core": "^7.19.6", + "@babel/plugin-transform-react-constant-elements": "^7.18.12", + "@babel/preset-env": "^7.19.4", + "@babel/preset-react": "^7.18.6", + "@babel/preset-typescript": "^7.18.6", + "@svgr/core": "^6.5.1", + "@svgr/plugin-jsx": "^6.5.1", + "@svgr/plugin-svgo": "^6.5.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@swc/core": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.38.tgz", + "integrity": "sha512-AiEVehRFws//AiiLx9DPDp1WDXt+yAoGD1kMYewhoF6QLdTz8AtYu6i8j/yAxk26L8xnegy0CDwcNnub9qenyQ==", + "hasInstallScript": true, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.38", + "@swc/core-darwin-x64": "1.3.38", + "@swc/core-linux-arm-gnueabihf": "1.3.38", + "@swc/core-linux-arm64-gnu": "1.3.38", + "@swc/core-linux-arm64-musl": "1.3.38", + "@swc/core-linux-x64-gnu": "1.3.38", + "@swc/core-linux-x64-musl": "1.3.38", + "@swc/core-win32-arm64-msvc": "1.3.38", + "@swc/core-win32-ia32-msvc": "1.3.38", + "@swc/core-win32-x64-msvc": "1.3.38" + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.38.tgz", + "integrity": "sha512-4ZTJJ/cR0EsXW5UxFCifZoGfzQ07a8s4ayt1nLvLQ5QoB1GTAf9zsACpvWG8e7cmCR0L76R5xt8uJuyr+noIXA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.38.tgz", + "integrity": "sha512-Kim727rNo4Dl8kk0CR8aJQe4zFFtsT1TZGlNrNMUgN1WC3CRX7dLZ6ZJi/VVcTG1cbHp5Fp3mUzwHsMxEh87Mg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.38.tgz", + "integrity": "sha512-yaRdnPNU2enlJDRcIMvYVSyodY+Amhf5QuXdUbAj6rkDD6wUs/s9C6yPYrFDmoTltrG+nBv72mUZj+R46wVfSw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.38.tgz", + "integrity": "sha512-iNY1HqKo/wBSu3QOGBUlZaLdBP/EHcwNjBAqIzpb8J64q2jEN02RizqVW0mDxyXktJ3lxr3g7VW9uqklMeXbjQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.38.tgz", + "integrity": "sha512-LJCFgLZoPRkPCPmux+Q5ctgXRp6AsWhvWuY61bh5bIPBDlaG9pZk94DeHyvtiwT0syhTtXb2LieBOx6NqN3zeA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.38.tgz", + "integrity": "sha512-hRQGRIWHmv2PvKQM/mMV45mVXckM2+xLB8TYLLgUG66mmtyGTUJPyxjnJkbI86WNGqo18k+lAuMG2mn6QmzYwQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.38.tgz", + "integrity": "sha512-PTYSqtsIfPHLKDDNbueI5e0sc130vyHRiFOeeC6qqzA2FAiVvIxuvXHLr0soPvKAR1WyhtYmFB9QarcctemL2w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.38.tgz", + "integrity": "sha512-9lHfs5TPNs+QdkyZFhZledSmzBEbqml/J1rqPSb9Fy8zB6QlspixE6OLZ3nTlUOdoGWkcTTdrOn77Sd7YGf1AA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.38.tgz", + "integrity": "sha512-SbL6pfA2lqvDKnwTHwOfKWvfHAdcbAwJS4dBkFidr7BiPTgI5Uk8wAPcRb8mBECpmIa9yFo+N0cAFRvMnf+cNw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.38", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.38.tgz", + "integrity": "sha512-UFveLrL6eGvViOD8OVqUQa6QoQwdqwRvLtL5elF304OT8eCPZa8BhuXnWk25X8UcOyns8gFcb8Fhp3oaLi/Rlw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", + "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", + "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "8.21.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz", + "integrity": "sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==" + }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.33", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/hast": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/history": { + "version": "4.7.11", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", + "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==" + }, + "node_modules/@types/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.10", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.10.tgz", + "integrity": "sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + }, + "node_modules/@types/mdast": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" + }, + "node_modules/@types/node": { + "version": "18.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz", + "integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==" + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "node_modules/@types/parse5": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" + }, + "node_modules/@types/react": { + "version": "18.0.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.28.tgz", + "integrity": "sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-router": { + "version": "5.1.20", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", + "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*" + } + }, + "node_modules/@types/react-router-config": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/react-router-config/-/react-router-config-5.0.6.tgz", + "integrity": "sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg==", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router": "*" + } + }, + "node_modules/@types/react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router": "*" + } + }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + }, + "node_modules/@types/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "node_modules/@types/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "dependencies": { + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.33", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", + "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + }, + "node_modules/@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/address": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/algoliasearch": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.15.0.tgz", + "integrity": "sha512-+vgKQF5944dYsz9zhKk07JbOYeNdKisoD5GeG0woBL3nLzbn2a+nGwki60DXg7CXvaFXBcTXyJG4C+VaBVd44g==", + "dependencies": { + "@algolia/cache-browser-local-storage": "4.15.0", + "@algolia/cache-common": "4.15.0", + "@algolia/cache-in-memory": "4.15.0", + "@algolia/client-account": "4.15.0", + "@algolia/client-analytics": "4.15.0", + "@algolia/client-common": "4.15.0", + "@algolia/client-personalization": "4.15.0", + "@algolia/client-search": "4.15.0", + "@algolia/logger-common": "4.15.0", + "@algolia/logger-console": "4.15.0", + "@algolia/requester-browser-xhr": "4.15.0", + "@algolia/requester-common": "4.15.0", + "@algolia/requester-node-http": "4.15.0", + "@algolia/transporter": "4.15.0" + } + }, + "node_modules/algoliasearch-helper": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz", + "integrity": "sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==", + "dependencies": { + "@algolia/events": "^4.0.1" + }, + "peerDependencies": { + "algoliasearch": ">= 3.1 < 6" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-align/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.13", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", + "integrity": "sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + ], + "dependencies": { + "browserslist": "^4.21.4", + "caniuse-lite": "^1.0.30001426", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-loader": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", + "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "dependencies": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^2.0.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + }, + "engines": { + "node": ">= 8.9" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "webpack": ">=2" + } + }, + "node_modules/babel-plugin-apply-mdx-type-prop": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz", + "integrity": "sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ==", + "dependencies": { + "@babel/helper-plugin-utils": "7.10.4", + "@mdx-js/util": "1.6.22" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@babel/core": "^7.11.6" + } + }, + "node_modules/babel-plugin-apply-mdx-type-prop/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-extract-import-names": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz", + "integrity": "sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ==", + "dependencies": { + "@babel/helper-plugin-utils": "7.10.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/babel-plugin-extract-import-names/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "dependencies": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base16": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz", + "integrity": "sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==" + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==" + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/bonjour-service": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.0.tgz", + "integrity": "sha512-LVRinRB3k1/K0XzZ2p58COnWvkQknIY6sf0zF2rpErvcJXpMBttEPQSxK+HEXSS9VmpZlDoDnQWv8ftJT20B0Q==", + "dependencies": { + "array-flatten": "^2.1.2", + "dns-equal": "^1.0.0", + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/boxen": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz", + "integrity": "sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw==", + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^6.2.0", + "chalk": "^4.1.2", + "cli-boxes": "^3.0.0", + "string-width": "^5.0.1", + "type-fest": "^2.5.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001462", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001462.tgz", + "integrity": "sha512-PDd20WuOBPiasZ7KbFnmQRyuLE7cFXW2PVd7dmALzbkUXEP46upAuCDm9eY9vho8fgNMGmbAX92QBZHzcnWIqw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/ccount": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, + "node_modules/clean-css": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", + "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-table3/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" + }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" + }, + "node_modules/combine-promises": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/combine-promises/-/combine-promises-1.1.0.tgz", + "integrity": "sha512-ZI9jvcLDxqwaXEixOhArm3r7ReIivsXkpbyEWyeOhzz1QS0iSgBPnWvEqvIQtYyamGCYA88gFhmUrs9hrrQ0pg==", + "engines": { + "node": ">=10" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/command-exists-promise": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/command-exists-promise/-/command-exists-promise-2.0.2.tgz", + "integrity": "sha512-T6PB6vdFrwnHXg/I0kivM3DqaCGZLjjYSOe0a5WgFKcz1sOnmOeIjnhQPXVXX3QjVbLyTJ85lJkX6lUpukTzaA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/copy-text-to-clipboard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz", + "integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "dependencies": { + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/copy-webpack-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/globby": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", + "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/copy-webpack-plugin/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/copy-webpack-plugin/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/core-js": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.29.0.tgz", + "integrity": "sha512-VG23vuEisJNkGl6XQmFJd3rEG/so/CNatqeE+7uZAwTSwFeB/qaO0be8xZYUNWprJ/GIwL8aMt9cj1kvbpTZhg==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.29.0.tgz", + "integrity": "sha512-ScMn3uZNAFhK2DGoEfErguoiAHhV2Ju+oJo/jK08p7B3f3UhocUrCCkTvnZaiS+edl5nlIoiBXKcwMc6elv4KQ==", + "dependencies": { + "browserslist": "^4.21.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-pure": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.29.0.tgz", + "integrity": "sha512-v94gUjN5UTe1n0yN/opTihJ8QBWD2O8i19RfTZR7foONPWArnjB96QA/wk5ozu1mm6ja3udQCzOzwQXTxi3xOQ==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/css-declaration-sorter": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", + "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/css-loader": { + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz", + "integrity": "sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.19", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.8" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/css-minimizer-webpack-plugin": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.2.2.tgz", + "integrity": "sha512-s3Of/4jKfw1Hj9CxEO1E5oXhQAxlayuHO2y/ML+C6I9sQ7FdzfEV6QgMLN3vI+qFsjJGIAFLKtQK7t8BOXAIyA==", + "dependencies": { + "cssnano": "^5.1.8", + "jest-worker": "^29.1.2", + "postcss": "^8.4.17", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@parcel/css": { + "optional": true + }, + "@swc/css": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "csso": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "lightningcss": { + "optional": true + } + } + }, + "node_modules/css-minimizer-webpack-plugin/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/css-minimizer-webpack-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/css-minimizer-webpack-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/css-minimizer-webpack-plugin/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz", + "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==", + "dependencies": { + "cssnano-preset-default": "^5.2.14", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-preset-advanced": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.10.tgz", + "integrity": "sha512-fnYJyCS9jgMU+cmHO1rPSPf9axbQyD7iUhLO5Df6O4G+fKIOMps+ZbU0PdGFejFBBZ3Pftf18fn1eG7MAPUSWQ==", + "dependencies": { + "autoprefixer": "^10.4.12", + "cssnano-preset-default": "^5.2.14", + "postcss-discard-unused": "^5.1.0", + "postcss-merge-idents": "^5.1.1", + "postcss-reduce-idents": "^5.2.0", + "postcss-zindex": "^5.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-preset-default": { + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", + "dependencies": { + "css-declaration-sorter": "^6.3.1", + "cssnano-utils": "^3.1.0", + "postcss-calc": "^8.2.3", + "postcss-colormin": "^5.3.1", + "postcss-convert-values": "^5.1.3", + "postcss-discard-comments": "^5.1.2", + "postcss-discard-duplicates": "^5.1.0", + "postcss-discard-empty": "^5.1.1", + "postcss-discard-overridden": "^5.1.0", + "postcss-merge-longhand": "^5.1.7", + "postcss-merge-rules": "^5.1.4", + "postcss-minify-font-values": "^5.1.0", + "postcss-minify-gradients": "^5.1.1", + "postcss-minify-params": "^5.1.4", + "postcss-minify-selectors": "^5.2.1", + "postcss-normalize-charset": "^5.1.0", + "postcss-normalize-display-values": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", + "postcss-normalize-string": "^5.1.0", + "postcss-normalize-timing-functions": "^5.1.0", + "postcss-normalize-unicode": "^5.1.1", + "postcss-normalize-url": "^5.1.0", + "postcss-normalize-whitespace": "^5.1.1", + "postcss-ordered-values": "^5.1.3", + "postcss-reduce-initial": "^5.1.2", + "postcss-reduce-transforms": "^5.1.0", + "postcss-svgo": "^5.1.0", + "postcss-unique-selectors": "^5.1.1" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-utils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz", + "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/csstype": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deepmerge": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/del": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", + "dependencies": { + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detab": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz", + "integrity": "sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g==", + "dependencies": { + "repeat-string": "^1.5.4" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==" + }, + "node_modules/detect-port": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", + "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", + "dependencies": { + "address": "^1.0.1", + "debug": "4" + }, + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" + } + }, + "node_modules/detect-port-alt": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", + "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==", + "dependencies": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "bin": { + "detect": "bin/detect-port", + "detect-port": "bin/detect-port" + }, + "engines": { + "node": ">= 4.2.1" + } + }, + "node_modules/detect-port-alt/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/detect-port-alt/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==" + }, + "node_modules/dns-packet": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dependencies": { + "utila": "~0.4" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", + "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.1" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dot-prop/node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, + "node_modules/duplexer3": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", + "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/electron-to-chromium": { + "version": "1.4.324", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.324.tgz", + "integrity": "sha512-m+eBs/kh3TXnCuqDF6aHLLRwLK2U471JAbZ1KYigf0TM96fZglxv0/ZFBvyIxnLKsIWUoDiVnHTA2mhYz1fqdA==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/emoticon": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/emoticon/-/emoticon-3.2.0.tgz", + "integrity": "sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==" + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eta": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eta/-/eta-2.0.1.tgz", + "integrity": "sha512-46E2qDPDm7QA+usjffUWz9KfXsxVZclPOuKsXs4ZWZdI/X1wpDF7AO424pt7fdYohCzWsIkXAhNGXSlwo5naAg==", + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "url": "https://github.com/eta-dev/eta?sponsor=1" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eval": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eval/-/eval-0.1.8.tgz", + "integrity": "sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==", + "dependencies": { + "@types/node": "*", + "require-like": ">= 0.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/express/node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/express/node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dependencies": { + "punycode": "^1.3.2" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fbemitter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fbemitter/-/fbemitter-3.0.0.tgz", + "integrity": "sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw==", + "dependencies": { + "fbjs": "^3.0.0" + } + }, + "node_modules/fbjs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.4.tgz", + "integrity": "sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ==", + "dependencies": { + "cross-fetch": "^3.1.5", + "fbjs-css-vars": "^1.0.0", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.30" + } + }, + "node_modules/fbjs-css-vars": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", + "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==" + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/feed": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz", + "integrity": "sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==", + "dependencies": { + "xml-js": "^1.6.11" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/file-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/filesize": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz", + "integrity": "sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flux": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/flux/-/flux-4.0.3.tgz", + "integrity": "sha512-yKAbrp7JhZhj6uiT1FTuVMlIAT1J4jqEyBpFApi1kxpGZCvacMVc/t1pMQyotqHhAgvoE3bNvAykhCo2CLjnYw==", + "dependencies": { + "fbemitter": "^3.0.0", + "fbjs": "^3.0.1" + }, + "peerDependencies": { + "react": "^15.0.2 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", + "integrity": "sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==", + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@types/json-schema": "^7.0.5", + "chalk": "^4.1.0", + "chokidar": "^3.4.2", + "cosmiconfig": "^6.0.0", + "deepmerge": "^4.2.2", + "fs-extra": "^9.0.0", + "glob": "^7.1.6", + "memfs": "^3.1.2", + "minimatch": "^3.0.4", + "schema-utils": "2.7.0", + "semver": "^7.3.2", + "tapable": "^1.0.0" + }, + "engines": { + "node": ">=10", + "yarn": ">=1.0.0" + }, + "peerDependencies": { + "eslint": ">= 6", + "typescript": ">= 2.7", + "vue-template-compiler": "*", + "webpack": ">= 4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + }, + "vue-template-compiler": { + "optional": true + } + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "dependencies": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "dependencies": { + "minipass": "^2.6.0" + } + }, + "node_modules/fs-monkey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz", + "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==" + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/github-slugger": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", + "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-dirs/node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hast-to-hyperscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", + "dependencies": { + "@types/unist": "^2.0.3", + "comma-separated-tokens": "^1.0.0", + "property-information": "^5.3.0", + "space-separated-tokens": "^1.0.0", + "style-to-object": "^0.3.0", + "unist-util-is": "^4.0.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", + "dependencies": { + "@types/parse5": "^5.0.0", + "hastscript": "^6.0.0", + "property-information": "^5.0.0", + "vfile": "^4.0.0", + "vfile-location": "^3.2.0", + "web-namespaces": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz", + "integrity": "sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig==", + "dependencies": { + "@types/hast": "^2.0.0", + "hast-util-from-parse5": "^6.0.0", + "hast-util-to-parse5": "^6.0.0", + "html-void-elements": "^1.0.0", + "parse5": "^6.0.0", + "unist-util-position": "^3.0.0", + "vfile": "^4.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/hast-util-to-parse5": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", + "dependencies": { + "hast-to-hyperscript": "^9.0.0", + "property-information": "^5.0.0", + "web-namespaces": "^1.0.0", + "xtend": "^4.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "node_modules/history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "dependencies": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz", + "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==" + }, + "node_modules/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/html-tags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.2.0.tgz", + "integrity": "sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/html-void-elements": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/html-webpack-plugin": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", + "integrity": "sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==", + "dependencies": { + "@types/html-minifier-terser": "^6.0.0", + "html-minifier-terser": "^6.0.2", + "lodash": "^4.17.21", + "pretty-error": "^4.0.0", + "tapable": "^2.0.0" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/html-webpack-plugin" + }, + "peerDependencies": { + "webpack": "^5.20.0" + } + }, + "node_modules/htmlparser2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", + "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "entities": "^4.3.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/http-proxy-middleware/node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/image-size": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", + "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", + "dependencies": { + "queue": "6.0.2" + }, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/immer": { + "version": "9.0.19", + "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.19.tgz", + "integrity": "sha512-eY+Y0qcsB4TZKwgQzLaE/lqYMlKhv5J9dyd2RhhtGhNo2njPXDqU9XPfcNfa3MIDsdtZt5KlkIsirlo4dHsWdQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/infima": { + "version": "0.2.0-alpha.42", + "resolved": "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.42.tgz", + "integrity": "sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww==", + "engines": { + "node": ">=12" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/inline-style-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/ipaddr.js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-ci/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-root": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", + "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/is-whitespace-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-word-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-util": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", + "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", + "dependencies": { + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", + "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.5.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/joi": { + "version": "17.8.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.8.3.tgz", + "integrity": "sha512-q5Fn6Tj/jR8PfrLrx4fpGH4v9qM6o+vDUfD4/3vxxyg34OmKcNqYZ1qn2mpLza96S8tL0p0rIw2gOZX+/cTg9w==", + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dependencies": { + "json-buffer": "3.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dependencies": { + "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.curry": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz", + "integrity": "sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" + }, + "node_modules/lodash.flow": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz", + "integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/markdown-escapes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ==", + "dependencies": { + "unist-util-remove": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-definitions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "mdast-util-definitions": "^4.0.0", + "mdurl": "^1.0.0", + "unist-builder": "^2.0.0", + "unist-util-generated": "^1.0.0", + "unist-util-position": "^3.0.0", + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz", + "integrity": "sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg==", + "dependencies": { + "fs-monkey": "^1.0.3" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.3.tgz", + "integrity": "sha512-CD9cXeKeXLcnMw8FZdtfrRrLaM7gwCl4nKuKn2YkY2Bw5wdlB8zU2cCzw+w2zS9RFvbrufTBkMCJACNPwqQA0w==", + "dependencies": { + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "node_modules/minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "dependencies": { + "minipass": "^2.9.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", + "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==" + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-numeric-range": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz", + "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/pnpm": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-7.29.1.tgz", + "integrity": "sha512-dn+65B2XpMIin7sQZvBIJ2Zyx8Z7LK95qyAvgEPE8qXkWYL/LuwpfMfK9Muc7+zNnpPwiQgtGEsxgOtuabFibQ==", + "bin": { + "pnpm": "bin/pnpm.cjs", + "pnpx": "bin/pnpx.cjs" + }, + "engines": { + "node": ">=14.6" + }, + "funding": { + "url": "https://opencollective.com/pnpm" + } + }, + "node_modules/postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-calc": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz", + "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==", + "dependencies": { + "postcss-selector-parser": "^6.0.9", + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "postcss": "^8.2.2" + } + }, + "node_modules/postcss-colormin": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", + "dependencies": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0", + "colord": "^2.9.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-convert-values": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz", + "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==", + "dependencies": { + "browserslist": "^4.21.4", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-comments": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz", + "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz", + "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-empty": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz", + "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz", + "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-unused": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-5.1.0.tgz", + "integrity": "sha512-KwLWymI9hbwXmJa0dkrzpRbSJEh0vVUd7r8t0yOGPcfKzyJJxFM8kLyC5Ev9avji6nY95pOp1W6HqIrfT+0VGw==", + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-loader": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.2.tgz", + "integrity": "sha512-fUJzV/QH7NXUAqV8dWJ9Lg4aTkDCezpTS5HgJ2DvqznexTbSTxgi/dTECvTZ15BwKTtk8G/bqI/QTu2HPd3ZCg==", + "dependencies": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.5", + "semver": "^7.3.8" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + } + }, + "node_modules/postcss-merge-idents": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-5.1.1.tgz", + "integrity": "sha512-pCijL1TREiCoog5nQp7wUe+TUonA2tC2sQ54UGeMmryK3UFGIYKqDyjnqd6RcuI4znFn9hWSLNN8xKE/vWcUQw==", + "dependencies": { + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", + "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==", + "dependencies": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^5.1.1" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-merge-rules": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", + "dependencies": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^3.1.0", + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz", + "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz", + "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==", + "dependencies": { + "colord": "^2.9.1", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-params": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz", + "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==", + "dependencies": { + "browserslist": "^4.21.4", + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz", + "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==", + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz", + "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz", + "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-string": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz", + "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz", + "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz", + "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==", + "dependencies": { + "browserslist": "^4.21.4", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz", + "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==", + "dependencies": { + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz", + "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-ordered-values": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", + "dependencies": { + "cssnano-utils": "^3.1.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-idents": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-5.2.0.tgz", + "integrity": "sha512-BTrLjICoSB6gxbc58D5mdBK8OhXRDqud/zodYfdSi52qvDHdMwk+9kB9xsM8yJThH/sZU5A6QVSmMmaN001gIg==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", + "dependencies": { + "browserslist": "^4.21.4", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz", + "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-sort-media-queries": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.3.0.tgz", + "integrity": "sha512-jAl8gJM2DvuIJiI9sL1CuiHtKM4s5aEIomkU8G3LFvbP+p8i7Sz8VV63uieTgoewGqKbi+hxBTiOKJlB35upCg==", + "dependencies": { + "sort-css-media-queries": "2.1.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.4.16" + } + }, + "node_modules/postcss-svgo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz", + "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==", + "dependencies": { + "postcss-value-parser": "^4.2.0", + "svgo": "^2.7.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz", + "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==", + "dependencies": { + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "node_modules/postcss-zindex": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz", + "integrity": "sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A==", + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-error": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", + "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==", + "dependencies": { + "lodash": "^4.17.20", + "renderkid": "^3.0.0" + } + }, + "node_modules/pretty-time": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz", + "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/prism-react-renderer": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz", + "integrity": "sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg==", + "peerDependencies": { + "react": ">=0.14.9" + } + }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==" + }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pure-color": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/pure-color/-/pure-color-1.3.0.tgz", + "integrity": "sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==" + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "dependencies": { + "inherits": "~2.0.3" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-base16-styling": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/react-base16-styling/-/react-base16-styling-0.6.0.tgz", + "integrity": "sha512-yvh/7CArceR/jNATXOKDlvTnPKPmGZz7zsenQ3jUwLzHkNUR0CvY3yGYJbWJ/nnxsL8Sgmt5cO3/SILVuPO6TQ==", + "dependencies": { + "base16": "^1.0.0", + "lodash.curry": "^4.0.1", + "lodash.flow": "^3.3.0", + "pure-color": "^1.2.0" + } + }, + "node_modules/react-dev-utils": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", + "integrity": "sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==", + "dependencies": { + "@babel/code-frame": "^7.16.0", + "address": "^1.1.2", + "browserslist": "^4.18.1", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.3", + "detect-port-alt": "^1.1.6", + "escape-string-regexp": "^4.0.0", + "filesize": "^8.0.6", + "find-up": "^5.0.0", + "fork-ts-checker-webpack-plugin": "^6.5.0", + "global-modules": "^2.0.0", + "globby": "^11.0.4", + "gzip-size": "^6.0.0", + "immer": "^9.0.7", + "is-root": "^2.1.0", + "loader-utils": "^3.2.0", + "open": "^8.4.0", + "pkg-up": "^3.1.0", + "prompts": "^2.4.2", + "react-error-overlay": "^6.0.11", + "recursive-readdir": "^2.2.2", + "shell-quote": "^1.7.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/react-dev-utils/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/loader-utils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/react-dev-utils/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dev-utils/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "node_modules/react-easy-swipe": { + "version": "0.0.21", + "resolved": "https://registry.npmjs.org/react-easy-swipe/-/react-easy-swipe-0.0.21.tgz", + "integrity": "sha512-OeR2jAxdoqUMHIn/nS9fgreI5hSpgGoL5ezdal4+oO7YSSgJR8ga+PkYGJrSrJ9MKlPcQjMQXnketrD7WNmNsg==", + "dependencies": { + "prop-types": "^15.5.8" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/react-error-overlay": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", + "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" + }, + "node_modules/react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "node_modules/react-helmet-async": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "invariant": "^2.2.4", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.2.0", + "shallowequal": "^1.1.0" + }, + "peerDependencies": { + "react": "^16.6.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/react-json-view": { + "version": "1.21.3", + "resolved": "https://registry.npmjs.org/react-json-view/-/react-json-view-1.21.3.tgz", + "integrity": "sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw==", + "dependencies": { + "flux": "^4.0.1", + "react-base16-styling": "^0.6.0", + "react-lifecycles-compat": "^3.0.4", + "react-textarea-autosize": "^8.3.2" + }, + "peerDependencies": { + "react": "^17.0.0 || ^16.3.0 || ^15.5.4", + "react-dom": "^17.0.0 || ^16.3.0 || ^15.5.4" + } + }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "node_modules/react-loadable": { + "name": "@docusaurus/react-loadable", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz", + "integrity": "sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==", + "dependencies": { + "@types/react": "*", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/react-loadable-ssr-addon-v5-slorber": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz", + "integrity": "sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==", + "dependencies": { + "@babel/runtime": "^7.10.3" + }, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "react-loadable": "*", + "webpack": ">=4.41.1 || 5.x" + } + }, + "node_modules/react-responsive-carousel": { + "version": "3.2.23", + "resolved": "https://registry.npmjs.org/react-responsive-carousel/-/react-responsive-carousel-3.2.23.tgz", + "integrity": "sha512-pqJLsBaKHWJhw/ItODgbVoziR2z4lpcJg+YwmRlSk4rKH32VE633mAtZZ9kDXjy4wFO+pgUZmDKPsPe1fPmHCg==", + "dependencies": { + "classnames": "^2.2.5", + "prop-types": "^15.5.8", + "react-easy-swipe": "^0.0.21" + } + }, + "node_modules/react-router": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", + "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", + "dependencies": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-router-config": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/react-router-config/-/react-router-config-5.1.1.tgz", + "integrity": "sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg==", + "dependencies": { + "@babel/runtime": "^7.1.2" + }, + "peerDependencies": { + "react": ">=15", + "react-router": ">=5" + } + }, + "node_modules/react-router-dom": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.4.tgz", + "integrity": "sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==", + "dependencies": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.3.4", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-textarea-autosize": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.4.0.tgz", + "integrity": "sha512-YrTFaEHLgJsi8sJVYHBzYn+mkP3prGkmP2DKb/tm0t7CLJY5t1Rxix8070LAKb0wby7bl/lf2EeHkuMihMZMwQ==", + "dependencies": { + "@babel/runtime": "^7.10.2", + "use-composed-ref": "^1.3.0", + "use-latest": "^1.2.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reading-time": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", + "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "dependencies": { + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + }, + "node_modules/regenerator-transform": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.1.tgz", + "integrity": "sha512-nCOzW2V/X15XpLsK2rlgdwrysrBq+AauCn+omItIz4R1pIcmeot5zvjdmOBRLzEH/CkC6IxMJVmxDe3QcMuNVQ==", + "dependencies": { + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/registry-auth-token": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", + "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remark-emoji": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/remark-emoji/-/remark-emoji-2.2.0.tgz", + "integrity": "sha512-P3cj9s5ggsUvWw5fS2uzCHJMGuXYRb0NnZqYlNecewXt8QBU9n5vW3DUUKOhepS8F9CwdMx9B8a3i7pqFWAI5w==", + "dependencies": { + "emoticon": "^3.2.0", + "node-emoji": "^1.10.0", + "unist-util-visit": "^2.0.3" + } + }, + "node_modules/remark-footnotes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", + "integrity": "sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx": { + "version": "1.6.22", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz", + "integrity": "sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==", + "dependencies": { + "@babel/core": "7.12.9", + "@babel/helper-plugin-utils": "7.10.4", + "@babel/plugin-proposal-object-rest-spread": "7.12.1", + "@babel/plugin-syntax-jsx": "7.12.1", + "@mdx-js/util": "1.6.22", + "is-alphabetical": "1.0.4", + "remark-parse": "8.0.3", + "unified": "9.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/remark-mdx/node_modules/@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + }, + "node_modules/remark-mdx/node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/remark-mdx/node_modules/@babel/plugin-syntax-jsx": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/remark-mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/remark-mdx/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remark-mdx/node_modules/unified": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", + "dependencies": { + "ccount": "^1.0.0", + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^2.0.0", + "vfile-location": "^3.0.0", + "xtend": "^4.0.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-squeeze-paragraphs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw==", + "dependencies": { + "mdast-squeeze-paragraphs": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/renderkid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", + "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==", + "dependencies": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^6.0.1" + } + }, + "node_modules/renderkid/node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/renderkid/node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/renderkid/node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/renderkid/node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/renderkid/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/renderkid/node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-like": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/require-like/-/require-like-0.1.2.tgz", + "integrity": "sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==", + "engines": { + "node": "*" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rtl-detect": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.0.4.tgz", + "integrity": "sha512-EBR4I2VDSSYr7PkBmFy04uhycIpDKp+21p/jARYXlCSjQksTBQcJ0HFUPOO79EPPH5JS6VAhiIQbycf0O3JAxQ==" + }, + "node_modules/rtlcss": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-3.5.0.tgz", + "integrity": "sha512-wzgMaMFHQTnyi9YOwsx9LjOxYXJPzS8sYnFaKm6R5ysvTkwzHiB0vxnbHwchHQT65PTdBjDG21/kQBWI7q9O7A==", + "dependencies": { + "find-up": "^5.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.3.11", + "strip-json-comments": "^3.1.1" + }, + "bin": { + "rtlcss": "bin/rtlcss.js" + } + }, + "node_modules/rtlcss/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rtlcss/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rtlcss/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rtlcss/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dependencies": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 8.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==" + }, + "node_modules/selfsigned": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", + "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", + "dependencies": { + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dependencies": { + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/send/node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-handler": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.5.tgz", + "integrity": "sha512-ijPFle6Hwe8zfmBxJdE+5fta53fdIY0lHISJvuikXB3VYFafRjMRpOffSPvCYsbKyBA7pvy9oYr/BT1O3EArlg==", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.1.2", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==" + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.0.tgz", + "integrity": "sha512-QHsz8GgQIGKlRi24yFc6a6lN69Idnx634w49ay6+jA5yFh7a1UY+4Rp6HPx/L/1zcEDPEij8cIsiqR6bQsE5VQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/sirv": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", + "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", + "dependencies": { + "@polka/url": "^1.0.0-next.20", + "mrmime": "^1.0.0", + "totalist": "^1.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "node_modules/sitemap": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz", + "integrity": "sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==", + "dependencies": { + "@types/node": "^17.0.5", + "@types/sax": "^1.2.1", + "arg": "^5.0.0", + "sax": "^1.2.4" + }, + "bin": { + "sitemap": "dist/cli.js" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=5.6.0" + } + }, + "node_modules/sitemap/node_modules/@types/node": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", + "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/sort-css-media-queries": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.1.0.tgz", + "integrity": "sha512-IeWvo8NkNiY2vVYdPa27MCQiR0MN0M80johAYFVxWWXQ44KU84WNxjslwBHmc/7ZL2ccwkM7/e6S5aiKZXm7jA==", + "engines": { + "node": ">= 6.3.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility" + }, + "node_modules/state-toggle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/std-env": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz", + "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dependencies": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-to-object": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", + "dependencies": { + "inline-style-parser": "0.1.1" + } + }, + "node_modules/stylehacks": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz", + "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==", + "dependencies": { + "browserslist": "^4.21.4", + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-parser": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" + }, + "node_modules/svgo": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", + "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/svgo/node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/svgo/node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/svgo/node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/svgo/node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/svgo/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/swc-loader": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.3.tgz", + "integrity": "sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==", + "peerDependencies": { + "@swc/core": "^1.2.147", + "webpack": ">=2" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "dev": true, + "dependencies": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "engines": { + "node": ">=4.5" + } + }, + "node_modules/terser": { + "version": "5.16.5", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.5.tgz", + "integrity": "sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==", + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" + }, + "node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "deprecated": "Use String.prototype.trim() instead" + }, + "node_modules/trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, + "node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.34.tgz", + "integrity": "sha512-cJMeh/eOILyGu0ejgTKB95yKT3zOenSe9UGE3vj6WfiOwgGYnmATUsnDixMFvdU+rNMvWih83hrUP8VwhF9yXQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "engines": { + "node": "*" + } + }, + "node_modules/unherit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", + "dependencies": { + "inherits": "^2.0.0", + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/unist-builder": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-generated": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz", + "integrity": "sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q==", + "dependencies": { + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove-position": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz", + "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==", + "dependencies": { + "unist-util-visit": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dependencies": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-notifier/node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-notifier/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/update-notifier/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-notifier/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-notifier/node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-notifier/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/url-loader": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", + "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", + "dependencies": { + "loader-utils": "^2.0.0", + "mime-types": "^2.1.27", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "file-loader": "*", + "webpack": "^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "file-loader": { + "optional": true + } + } + }, + "node_modules/url-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/use-composed-ref": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.3.0.tgz", + "integrity": "sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/use-isomorphic-layout-effect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-latest": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.2.1.tgz", + "integrity": "sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==", + "dependencies": { + "use-isomorphic-layout-effect": "^1.1.1" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==" + }, + "node_modules/utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/wait-on": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz", + "integrity": "sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==", + "dependencies": { + "axios": "^0.25.0", + "joi": "^17.6.0", + "lodash": "^4.17.21", + "minimist": "^1.2.5", + "rxjs": "^7.5.4" + }, + "bin": { + "wait-on": "bin/wait-on" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/wait-on/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/web-namespaces": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/webpack": { + "version": "5.75.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.8.0.tgz", + "integrity": "sha512-ZzoSBePshOKhr+hd8u6oCkZVwpVaXgpw23ScGLFpR6SjYI7+7iIWYarjN6OEYOfRt8o7ZyZZQk0DuMizJ+LEIg==", + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^7.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-dev-middleware": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", + "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/webpack-dev-middleware/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/webpack-dev-middleware/node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-middleware/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/webpack-dev-server": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", + "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "dependencies": { + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.1", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.1", + "ws": "^8.4.2" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.37.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack-dev-server/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/webpack-dev-server/node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz", + "integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/webpackbar": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz", + "integrity": "sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.3", + "pretty-time": "^1.1.0", + "std-env": "^3.0.1" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "webpack": "3 || 4 || 5" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dependencies": { + "string-width": "^5.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/xml-js": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", + "dependencies": { + "sax": "^1.2.4" + }, + "bin": { + "xml-js": "bin/cli.js" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/website/package.json b/website/package.json index 149075c5b..3ca182024 100644 --- a/website/package.json +++ b/website/package.json @@ -24,6 +24,7 @@ "@swc/core": "^1.3.7", "clsx": "^1.2.1", "file-loader": "^6.2.0", + "pnpm": "^7.29.1", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 0e0ad02a0..79ded25ba 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -10,6 +10,7 @@ specifiers: '@swc/core': ^1.3.7 clsx: ^1.2.1 file-loader: ^6.2.0 + pnpm: ^7.29.1 prettier: ^2.7.1 prism-react-renderer: ^1.3.5 react: ^17.0.2 @@ -26,6 +27,7 @@ dependencies: '@swc/core': 1.3.19 clsx: 1.2.1 file-loader: 6.2.0_webpack@5.75.0 + pnpm: 7.29.1 prism-react-renderer: 1.3.5_react@17.0.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -6616,6 +6618,12 @@ packages: find-up: 3.0.0 dev: false + /pnpm/7.29.1: + resolution: {integrity: sha512-dn+65B2XpMIin7sQZvBIJ2Zyx8Z7LK95qyAvgEPE8qXkWYL/LuwpfMfK9Muc7+zNnpPwiQgtGEsxgOtuabFibQ==} + engines: {node: '>=14.6'} + hasBin: true + dev: false + /postcss-calc/8.2.4_postcss@8.4.19: resolution: {integrity: sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==} peerDependencies: diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 540db5b16..7034e785a 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v2.4.0 - 2022-03-08 + ### Added - Added Webview GPU acceleration options for [Windows](/docs/reference/options#webviewgpuisdisabled) and [Linux](/docs/reference/options#webviewgpupolicy). Added by @Lyimmi in [PR](https://github.com/wailsapp/wails/pull/2266) - Added `EnableFraudulentWebsiteDetection` option to opt-in to scan services for fraudulent content, such as malware or phishing attempts. Older releases had the scan services per default activated. Added by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2269) diff --git a/website/src/pages/credits.mdx b/website/src/pages/credits.mdx index 12b313e37..a8e9e8c8f 100644 --- a/website/src/pages/credits.mdx +++ b/website/src/pages/credits.mdx @@ -4,10 +4,11 @@ - [Stffabi](https://github.com/stffabi) - Technical lead, developer and maintainer - [Misite Bao](https://github.com/misitebao) - Documentation wizard, Chinese translation, Windows testing, Bug finder general - [Travis McLane](https://github.com/tmclane) - Cross-compilation work, MacOS testing -- [Byron Chris](https://github.com/bh90210) - Linux distro wizard, Linux testing +- [Lyimmi](https://github.com/Lyimmi) - All things Linux ## Sponsors + ## Contributors @@ -15,172 +16,244 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Lea Anthony

💻 🤔 🎨 🖋 💡 🧑‍🏫 📆 🔧 🐛 📝 🚧 📦 👀 💬 🔬 ⚠️ 📢 👀 📖

stffabi

💻 🤔 🎨 🐛 🚧 📦 👀 💬 🔬 👀 📖 ⚠️

Travis McLane

💻 🔬 📦 🤔 🐛 👀 ⚠️ 💬 📖

Misite Bao

📖 🌍 🔬 🚧

Byron Chris

💻 🔬 🚧 🐛 👀 ⚠️ 💬 🤔 🎨 📦 🚇

konez2k

💻 📦 🤔

Dario Emerson

💻 🐛 🤔 ⚠️

Ian M. Jones

💻 🐛 🤔 ⚠️ 👀 📦

marktohark

💻

Ryan H

💻

Cody Bentley

💻 📦 🤔 💵

Florent

💻 🐛

Alexander Hudek

💻 💵

Tim Kipp

💻

Altynbek Kaliakbarov

💻

Nikolai Zimmermann

💻

k-muchmore

💻

Snider

💻 🤔 📖 💵

Albert Sun

💻 ⚠️

Ariel

💻 🐛

Ilgıt Yıldırım

💻 🐛 💵

Toyam Cox

💻 📦 🐛

hi019

💻 🐛

Arthur Wiebe

💻 🐛

Balakrishna Prasad Ganne

💻

BillBuilt

💻 📦 🤔 💬 💵

Eng Zer Jun

🚧 💻

LGiki

📖

Lontten

📖

Lukas Crepaz

💻 🐛

Marcus Crane

🐛 📖 💵

Qais Patankar

📖

Wakeful-Cloud

💻 🐛

Zámbó, Levente

💻 📦 🐛 ⚠️

Ironpark

💻 🤔

mondy

💻 📖

Benjamin Ryan

🐛

fallendusk

📦 💻

Mat Ryer

💻 🤔 🐛

Abtin

💻 🐛

Adrian Lanzafame

📦 💻

Aleksey Polyakov

🐛 💻

Alexander Matviychuk

💻 📦

AlienRecall

💻 📦

Aman

📖

Amaury Tobias Quiroz

💻 🐛

Andreas Wenk

📖

Antonio Stanković

💻 📦

Arpit Jain

📖

Austin Schey

💻 🐛

Benjamin Thomas

💻 📦 🤔

Bertram Truong

💻 🐛

Blake Bourque

📖

Denis

📖

diogox

💻 📦

Dmitry Gomzyakov

💻 📦

Edward Browncross

💻

Elie Grenon

💻

Florian Didron

💻 🐛 🤔 ⚠️ 👀 📦

GargantuaX

💵

Igor Minin

💻 🐛

Jae-Sung Lee

💻 🤔

Jarek

💻 📦

Junker

📖

Kris Raney

💻 🐛

Luken

📖

Mark Stenglein

💻 🐛

buddyabaddon

💻

MikeSchaap

💻 🐛

NYSSEN Michaël

💻 🐛

Nan0

💻 🤔 ⚠️ 👀

oskar

📖

Pierre Joye

💻 🐛 🤔 ⚠️

Reuben Thomas-Davis

💻 🐛

Robin

💻 🐛

Sebastian Bauer

💻 🤔 ⚠️ 👀 💬

Sidharth Rathi

📖 🐛

Sithembiso Khumalo

💻 🐛

Soheib El-Harrache

💻 🐛 💵

Sophie Au

💻 🐛

Stefanos Papadakis

💻 🐛

Steve Chung

💻 🐛

Timm Ortloff

📖

Tom

💻

Valentin Trinqué

💻 🐛

mattn

💻 🐛

bearsh

💻 🤔 📖

chenxiao

💻 🤔 📖

fengweiqiang

💻 📦

flin7

📖

fred21O4

📖

gardc

📖

rayshoo

📖

Ishiyama Yuzuki

💻 🐛

佰阅

💻

刀刀

📖 🐛

归位

💻 🐛

skamensky

💻 🤔 📖

dependabot[bot]

💻 🚧

Damian Sieradzki

💵

John Dorman

💵

Ian Sinnott

💵

Arden Shackelford

💵

Bironou

💵

CharlieGo_

💵

overnet

💵

jugglingjsons

💵

Selvin Ortiz

💵

ZanderCodes

💵

Michael Voronov

💵

letheanVPN

💵

Tai Groot

💵

easy-web-it

💵

Michael Olson

💵

EdenNetwork Italia

💵

ondoki

💵

QuEST Rail LLC

💵

Gilgameš

💵

Bernt-Johan Bergshaven

💵

Liam Bigelow

💵

Nick Arellano

💵

Frank Chiarulli Jr.

💵

Tyler

💵

Trea Hauet

💵

Kent 'picat' Gruber

💵

tc-hib

💵

Antonio

📖

MyNameIsAres

📖

Maicarons J

📖

kiddov

📖 💵 ⚠️ 🤔

Nicolas Coutin

💵

Parvin Eyvazov

📖
Lea Anthony
Lea Anthony

💻 🤔 🎨 🖋 💡 🧑‍🏫 📆 🔧 🐛 📝 🚧 📦 👀 💬 🔬 ⚠️ 📢 👀 📖
stffabi
stffabi

💻 🤔 🎨 🐛 🚧 📦 👀 💬 🔬 👀 📖 ⚠️
Travis McLane
Travis McLane

💻 🔬 📦 🤔 🐛 👀 ⚠️ 💬 📖
Misite Bao
Misite Bao

📖 🌍 🔬 🚧
Byron Chris
Byron Chris

💻 🔬 🚧 🐛 👀 ⚠️ 💬 🤔 🎨 📦 🚇
konez2k
konez2k

💻 📦 🤔
Dario Emerson
Dario Emerson

💻 🐛 🤔 ⚠️
Ian M. Jones
Ian M. Jones

💻 🐛 🤔 ⚠️ 👀 📦
marktohark
marktohark

💻
Ryan H
Ryan H

💻
Cody Bentley
Cody Bentley

💻 📦 🤔 💵
Florent
Florent

💻 🐛
Alexander Hudek
Alexander Hudek

💻 💵
Tim Kipp
Tim Kipp

💻
Altynbek Kaliakbarov
Altynbek Kaliakbarov

💻
Nikolai Zimmermann
Nikolai Zimmermann

💻
k-muchmore
k-muchmore

💻
Snider
Snider

💻 🤔 📖 💵
Albert Sun
Albert Sun

💻 ⚠️
Ariel
Ariel

💻 🐛
Ilgıt Yıldırım
Ilgıt Yıldırım

💻 🐛 💵
Toyam Cox
Toyam Cox

💻 📦 🐛
hi019
hi019

💻 🐛
Arthur Wiebe
Arthur Wiebe

💻 🐛
Balakrishna Prasad Ganne
Balakrishna Prasad Ganne

💻
BillBuilt
BillBuilt

💻 📦 🤔 💬 💵
Eng Zer Jun
Eng Zer Jun

🚧 💻
LGiki
LGiki

📖
Lontten
Lontten

📖
Lukas Crepaz
Lukas Crepaz

💻 🐛
Marcus Crane
Marcus Crane

🐛 📖 💵
Qais Patankar
Qais Patankar

📖
Wakeful-Cloud
Wakeful-Cloud

💻 🐛
Zámbó, Levente
Zámbó, Levente

💻 📦 🐛 ⚠️
Ironpark
Ironpark

💻 🤔
mondy
mondy

💻 📖
Benjamin Ryan
Benjamin Ryan

🐛
fallendusk
fallendusk

📦 💻
Mat Ryer
Mat Ryer

💻 🤔 🐛
Abtin
Abtin

💻 🐛
Adrian Lanzafame
Adrian Lanzafame

📦 💻
Aleksey Polyakov
Aleksey Polyakov

🐛 💻
Alexander Matviychuk
Alexander Matviychuk

💻 📦
AlienRecall
AlienRecall

💻 📦
Aman
Aman

📖
Amaury Tobias Quiroz
Amaury Tobias Quiroz

💻 🐛
Andreas Wenk
Andreas Wenk

📖
Antonio Stanković
Antonio Stanković

💻 📦
Arpit Jain
Arpit Jain

📖
Austin Schey
Austin Schey

💻 🐛
Benjamin Thomas
Benjamin Thomas

💻 📦 🤔
Bertram Truong
Bertram Truong

💻 🐛
Blake Bourque
Blake Bourque

📖
Denis
Denis

📖
diogox
diogox

💻 📦
Dmitry Gomzyakov
Dmitry Gomzyakov

💻 📦
Edward Browncross
Edward Browncross

💻
Elie Grenon
Elie Grenon

💻
Florian Didron
Florian Didron

💻 🐛 🤔 ⚠️ 👀 📦
GargantuaX
GargantuaX

💵
Igor Minin
Igor Minin

💻 🐛
Jae-Sung Lee
Jae-Sung Lee

💻 🤔
Jarek
Jarek

💻 📦
Junker
Junker

📖
Kris Raney
Kris Raney

💻 🐛
Luken
Luken

📖
Mark Stenglein
Mark Stenglein

💻 🐛
buddyabaddon
buddyabaddon

💻
MikeSchaap
MikeSchaap

💻 🐛
NYSSEN Michaël
NYSSEN Michaël

💻 🐛
Nan0
Nan0

💻 🤔 ⚠️ 👀
oskar
oskar

📖
Pierre Joye
Pierre Joye

💻 🐛 🤔 ⚠️
Reuben Thomas-Davis
Reuben Thomas-Davis

💻 🐛
Robin
Robin

💻 🐛
Sebastian Bauer
Sebastian Bauer

💻 🤔 ⚠️ 👀 💬
Sidharth Rathi
Sidharth Rathi

📖 🐛
Sithembiso Khumalo
Sithembiso Khumalo

💻 🐛
Soheib El-Harrache
Soheib El-Harrache

💻 🐛 💵
Sophie Au
Sophie Au

💻 🐛
Stefanos Papadakis
Stefanos Papadakis

💻 🐛
Steve Chung
Steve Chung

💻 🐛
Timm Ortloff
Timm Ortloff

📖
Tom
Tom

💻
Valentin Trinqué
Valentin Trinqué

💻 🐛
mattn
mattn

💻 🐛
bearsh
bearsh

💻 🤔 📖
chenxiao
chenxiao

💻 🤔 📖
fengweiqiang
fengweiqiang

💻 📦
flin7
flin7

📖
fred21O4
fred21O4

📖
gardc
gardc

📖
rayshoo
rayshoo

📖
Ishiyama Yuzuki
Ishiyama Yuzuki

💻 🐛
佰阅
佰阅

💻
刀刀
刀刀

📖 🐛
归位
归位

💻 🐛
skamensky
skamensky

💻 🤔 📖
dependabot[bot]
dependabot[bot]

💻 🚧
Damian Sieradzki
Damian Sieradzki

💵
John Dorman
John Dorman

💵
Ian Sinnott
Ian Sinnott

💵
Arden Shackelford
Arden Shackelford

💵
Bironou
Bironou

💵
CharlieGo_
CharlieGo_

💵
overnet
overnet

💵
jugglingjsons
jugglingjsons

💵
Selvin Ortiz
Selvin Ortiz

💵
ZanderCodes
ZanderCodes

💵
Michael Voronov
Michael Voronov

💵
letheanVPN
letheanVPN

💵
Tai Groot
Tai Groot

💵
easy-web-it
easy-web-it

💵
Michael Olson
Michael Olson

💵
EdenNetwork Italia
EdenNetwork Italia

💵
ondoki
ondoki

💵
QuEST Rail LLC
QuEST Rail LLC

💵
Gilgameš
Gilgameš

💵
Bernt-Johan Bergshaven
Bernt-Johan Bergshaven

💵
Liam Bigelow
Liam Bigelow

💵
Nick Arellano
Nick Arellano

💵
Frank Chiarulli Jr.
Frank Chiarulli Jr.

💵
Tyler
Tyler

💵
Trea Hauet
Trea Hauet

💵
Kent 'picat' Gruber
Kent 'picat' Gruber

💵
tc-hib
tc-hib

💵
Antonio
Antonio

📖
MyNameIsAres
MyNameIsAres

📖
Maicarons J
Maicarons J

📖
kiddov
kiddov

📖 💵 ⚠️ 🤔
Nicolas Coutin
Nicolas Coutin

💵
Parvin Eyvazov
Parvin Eyvazov

📖
github-actions[bot]
github-actions[bot]

💻
Oleg Gulevskyy
Oleg Gulevskyy

💻 📖 🚧 📦
Richard Guay
Richard Guay

📖
Adam Tenderholt
Adam Tenderholt

💻
JulioDRF
JulioDRF

💻
Scott Opell
Scott Opell

💻
Vadim Shchepotev
Vadim Shchepotev

💻
Will Andrews
Will Andrews

💻
Gwyn
Gwyn

💻 👀 💬 🔬
希嘉嘉
希嘉嘉

💻
ALMAS
ALMAS

💻
Alex
Alex

💻
Arif Ali
Arif Ali

💻
Artur Siarohau
Artur Siarohau

💻
Binyamin Aron Green
Binyamin Aron Green

💻
Brian Dwyer
Brian Dwyer

💻
Christian Kilb
Christian Kilb

💻
David Florness
David Florness

📖
David Walton
David Walton

💻
Debdut Karmakar
Debdut Karmakar

💻
Dieter Zhu
Dieter Zhu

💻
Fredrik Holmqvist
Fredrik Holmqvist

💻
Giovanni Palma
Giovanni Palma

💻
Hao
Hao

💻
Igor Sementsov
Igor Sementsov

💻
Johannes Haseitl
Johannes Haseitl

💻
Joshua Hull
Joshua Hull

💻
Joshua Mangiola
Joshua Mangiola

📖
Kevin MacMartin
Kevin MacMartin

💻
Liang Li
Liang Li

💻
Marvin Collins Hosea
Marvin Collins Hosea

💻
Matt Holt
Matt Holt

💻
Niklas
Niklas

💻
Andy Hsu
Andy Hsu

💻
NullCode
NullCode

💻
Oussama Sethoum
Oussama Sethoum

💻
ParkourLiu
ParkourLiu

💻
Rachel Chen
Rachel Chen

💻
Rob Nice
Rob Nice

💻
Ryo TAGAMI
Ryo TAGAMI

💻
Sam Hennessy
Sam Hennessy

💻
Sean
Sean

💻
Sean Gosiaco
Sean Gosiaco

💻
Eric P Sheets
Eric P Sheets

💻
Supian M
Supian M

💻
Watson-Sei
Watson-Sei

💻 📖
Yuki Shindo
Yuki Shindo

💻
cuigege
cuigege

💻
cybertramp
cybertramp

💻
hiroki yagi
hiroki yagi

💻
imgbot[bot]
imgbot[bot]

💻
juju
juju

💻
Michael Eatherly
Michael Eatherly

💻
tk
tk

💻
allcontributors[bot]
allcontributors[bot]

📖
wander
wander

📖
@@ -194,6 +267,7 @@ [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version possible. - [Tad Vizbaras](https://github.com/tadvi) - His winc project was the first step down the path to a pure Go Wails. - [Mat Ryer](https://github.com/matryer) - For advice, support and bants. +- [Byron Chris](https://github.com/bh90210) - For his long term contributions to this project. - [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been invaluable. - [Justen Walker](https://github.com/justenwalker/) - For helping wrangle COM issues which got v2 over the line. - [Wang, Chi](https://github.com/patr0nus/) - The DeskGap project was a huge influence on the direction of Wails v2. diff --git a/website/versioned_docs/version-v2.3.0/appendix/_category_.json b/website/versioned_docs/version-v2.3.0/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/website/versioned_docs/version-v2.3.0/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/website/versioned_docs/version-v2.3.0/community/_category_.json b/website/versioned_docs/version-v2.3.0/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/website/versioned_docs/version-v2.3.0/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/_category_.json b/website/versioned_docs/version-v2.3.0/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/emailit.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/emailit.mdx deleted file mode 100644 index 04150ba28..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/emailit.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# EmailIt - -```mdx-code-block -

- -
-

-``` - -[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a builtin [Node-Red](https://nodered.org/) server, scripts terminal, and the [ScriptBar](https://github.com/raguay/ScriptBarApp) program for displaying results from Node-Red or a script on your system. Documentation is very scarce, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/encrypteasy.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/encrypteasy.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# EncryptEasy - -```mdx-code-block -

- -
-

-``` - -**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.** - -Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/minecraftupdater.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/minecraftupdater.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Minecraft Updater - -```mdx-code-block -

- -
-

-``` - -[Minecraft Updater](https://github.com/Gurkengewuerz/MinecraftModUpdater) is a utility tool to update and synchronize Minecraft mods for your userbase. It’s built using Wails2 and React with [antd](https://ant.design/) as frontend framework. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/modalfilemanager.mdx deleted file mode 100644 index f8e2bcd66..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/modalfilemanager.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# Modal File Manager - -```mdx-code-block -

- -
-

-``` - -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. - -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/mollywallet.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Molley Wallet - -```mdx-code-block -

- -
-

-``` - -[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/october.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/october.mdx +++ /dev/null @@ -1,14 +0,0 @@ -# October - -```mdx-code-block -

- -
-

-``` - -[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io). - -It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)! - -In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/optimus.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/optimus.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Optimus - -```mdx-code-block -

- -
-

-``` - -[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/portfall.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/portfall.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Portfall - -```mdx-code-block -

- -
-

-``` - -[Portfall](https://github.com/rekon-oss/portfall) - A desktop k8s port-forwarding portal for easy access to all your cluster UIs diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/restic-browser.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# Restic Browser - -```mdx-code-block -

- -
-

-``` - -[Restic-Browser](https://github.com/emuell/restic-browser) - A simple, cross-platform [restic](https://github.com/restic/restic) backup GUI for browsing and restoring restic repositories. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/riftshare.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/riftshare.mdx deleted file mode 100644 index 9928b4785..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/riftshare.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# RiftShare - -```mdx-code-block -

- -
-

-``` - -Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) - -## Features - -- Easy secure file sharing between computers both in the local network and through the internet -- Supports sending files or directories securely through the [magic wormhole protocol](https://magic-wormhole.readthedocs.io/en/latest/) -- Compatible with all other apps using magic wormhole (magic-wormhole or wormhole-william CLI, wormhole-gui, etc.) -- Automatic zipping of multiple selected files to send at once -- Full animations, progress bar, and cancellation support for sending and receiving -- Native OS File Selection -- Open files in one click once received -- Auto Update - don't worry about having the latest release! diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/scriptbar.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/scriptbar.mdx deleted file mode 100644 index 2ccb2acb4..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/scriptbar.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# ScriptBar - -```mdx-code-block -

- -
-

-``` - -[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of the embedded [Node-Red](https://nodered.org) server in the [EmailIt](https://GitHub.com/raguay/EmailIt) application. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/surge.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/surge.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Surge - -```mdx-code-block -

- -
-

-``` - -[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/wally.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/wally.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wally - -```mdx-code-block -

- -
-

-``` - -[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/wombat.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/wombat.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Wombat - -```mdx-code-block -

- -
-

-``` - -[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client. diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/ytd.mdx b/website/versioned_docs/version-v2.3.0/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/website/versioned_docs/version-v2.3.0/community/showcase/ytd.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# Ytd - -```mdx-code-block -

- -
-

-``` - -[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player. diff --git a/website/versioned_docs/version-v2.3.0/gettingstarted/_category_.json b/website/versioned_docs/version-v2.3.0/gettingstarted/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/website/versioned_docs/version-v2.3.0/gettingstarted/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/website/versioned_docs/version-v2.3.0/guides/_category_.json b/website/versioned_docs/version-v2.3.0/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/website/versioned_docs/version-v2.3.0/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/website/versioned_docs/version-v2.3.0/guides/routing.mdx b/website/versioned_docs/version-v2.3.0/guides/routing.mdx deleted file mode 100644 index c35cc1c8a..000000000 --- a/website/versioned_docs/version-v2.3.0/guides/routing.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Routing - -Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. - -## Vue - -The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): - -```js -import { createRouter, createWebHashHistory } from "vue-router"; - -const router = createRouter({ - history: createWebHashHistory(), - routes: [ - //... - ], -}); -``` - -## Angular - -The recommended approach for routing in Angular is [HashLocationStrategy](https://codecraft.tv/courses/angular/routing/routing-strategies#_hashlocationstrategy): - -```ts -RouterModule.forRoot(routes, { useHash: true }); -``` - -## React - -The recommended approach for routing in React is [HashRouter](https://reactrouter.com/docs/en/v6/routers/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/website/versioned_docs/version-v2.3.0/reference/_category_.json b/website/versioned_docs/version-v2.3.0/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/website/versioned_docs/version-v2.3.0/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/_category_.json b/website/versioned_docs/version-v2.3.0/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/website/versioned_docs/version-v2.3.0/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/website/versioned_docs/version-v2.3.0/tutorials/_category_.json b/website/versioned_docs/version-v2.3.0/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/website/versioned_docs/version-v2.3.0/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/appendix/_category_.json b/website/versioned_docs/version-v2.4.0/appendix/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/appendix/_category_.json rename to website/versioned_docs/version-v2.4.0/appendix/_category_.json diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/_category_.json b/website/versioned_docs/version-v2.4.0/community/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.0.0/community/_category_.json rename to website/versioned_docs/version-v2.4.0/community/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/community/links.mdx b/website/versioned_docs/version-v2.4.0/community/links.mdx similarity index 83% rename from website/versioned_docs/version-v2.3.0/community/links.mdx rename to website/versioned_docs/version-v2.4.0/community/links.mdx index 23a4b8cf6..fe8b51dd0 100644 --- a/website/versioned_docs/version-v2.3.0/community/links.mdx +++ b/website/versioned_docs/version-v2.4.0/community/links.mdx @@ -13,8 +13,7 @@ The [definitive list](https://github.com/wailsapp/awesome-wails) of links relate ## Support Channels -- [Gophers Slack Channel](https://gophers.slack.com/messages/CJ4P9F7MZ/) -- [Gophers Slack Channel Invite](https://invite.slack.golangbridge.org/) +- [Wails Discord Server](https://discord.gg/JDdSxwjhGf) - [Github Issues](https://github.com/wailsapp/wails/issues) - [v2 Beta Discussion Board](https://github.com/wailsapp/wails/discussions/828) @@ -24,4 +23,5 @@ The [definitive list](https://github.com/wailsapp/awesome-wails) of links relate - [Wails Chinese Community QQ Group](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - Group number: 1067173054 ## Other Tutorials and Articles + - [Building of Bulletin Board](https://blog.customct.com/building-bulletin-board) diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/_category_.json b/website/versioned_docs/version-v2.4.0/community/showcase/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/community/showcase/_category_.json rename to website/versioned_docs/version-v2.4.0/community/showcase/_category_.json diff --git a/website/versioned_docs/version-v2.4.0/community/showcase/bulletinboard.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/bulletinboard.mdx new file mode 100644 index 000000000..37be75135 --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/community/showcase/bulletinboard.mdx @@ -0,0 +1,10 @@ +# BulletinBoard + +```mdx-code-block +

+ +
+

+``` + +The [BulletinBoard](https://github.com/raguay/BulletinBoard) application is a versital message board for static messages or dialogs to get information from the user for a script. It has a TUI for creating new dialogs that can latter be used to get information from the user. It's design is to stay running on your system and show the information as needed and then hide away. I have a process for watching a file on my system and sending the contents to BulletinBoard when changed. It works great with my workflows. There is also an [Alfred workflow](https://github.com/raguay/MyAlfred/blob/master/Alfred%205/EmailIt.alfredworkflow) for sending information to the program. The workflow is also for working with [EmailIt](https://github.com/raguay/EmailIt). diff --git a/website/versioned_docs/version-v2.4.0/community/showcase/emailit.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/emailit.mdx new file mode 100644 index 000000000..c1817b70f --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/community/showcase/emailit.mdx @@ -0,0 +1,10 @@ +# EmailIt + +```mdx-code-block +

+ +
+

+``` + +[EmailIt](https://github.com/raguay/EmailIt/) is a Wails 2 program that is a markdown based email sender only with nine notepads, scripts to manipulate the text, and templates. It also has a scripts terminal to run scripts in EmailIt on files in your system. The scripts and templates can be used from the commandline itself or with the Alfred, Keyboard Maestro, Dropzone, or PopClip extensions. It also supports scripts and themes downloaded form GitHub. Documentation is not complete, but the programs works. It’s built using Wails2 and Svelte, and the download is a universal macOS application. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/encrypteasy.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/encrypteasy.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/encrypteasy.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/encrypteasy.mdx diff --git a/website/versioned_docs/version-v2.3.0/community/showcase/filehound.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/filehound.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/community/showcase/filehound.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/filehound.mdx diff --git a/website/versioned_docs/version-v2.4.0/community/showcase/hiposter.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/hiposter.mdx new file mode 100644 index 000000000..c0f9052c3 --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/community/showcase/hiposter.mdx @@ -0,0 +1,10 @@ +# hiposter + +```mdx-code-block +

+ +
+

+``` + +[hiposter](https://github.com/obity/hiposter) is a simple and efficient http API testing client tool. Based on Wails, Go and sveltejs. \ No newline at end of file diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/minecraftupdater.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/minecraftupdater.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/minecraftupdater.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/minecraftupdater.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/modalfilemanager.mdx similarity index 74% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/modalfilemanager.mdx index f8e2bcd66..bcd212396 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/modalfilemanager.mdx +++ b/website/versioned_docs/version-v2.4.0/community/showcase/modalfilemanager.mdx @@ -9,6 +9,6 @@

``` -[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands. It is fully coded using Go and runs much faster than the previous versions. +[Modal File Manager](https://github.com/raguay/ModalFileManager) is a dual pane file manager using web technologies. My original design was based on NW.js and can be found [here](https://github.com/raguay/ModalFileManager-NWjs). This version uses the same Svelte based frontend code (but it has be greatly modified since the departure from NW.js), but the backend is a [Wails 2](https://wails.io/) implementation. By using this implementation, I no longer use command line `rm`, `cp`, etc. commands, but a git install has to be on the system to download themes and extensions. It is fully coded using Go and runs much faster than the previous versions. -This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. +This file manager is designed around the same principle as Vim: a state controlled keyboard actions. The number of states isn't fixed, but very programmable. Therefore, an infinite number of keyboard configurations can be created and used. This is the main difference from other file managers. There are themes and extensions available to download from GitHub. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/mollywallet.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/mollywallet.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/mollywallet.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/october.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/october.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/october.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/optimus.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/optimus.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/optimus.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/optimus.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/portfall.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/portfall.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/portfall.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/portfall.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/restic-browser.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/restic-browser.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/restic-browser.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/riftshare.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/riftshare.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/riftshare.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/riftshare.mdx diff --git a/website/versioned_docs/version-v2.4.0/community/showcase/scriptbar.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/scriptbar.mdx new file mode 100644 index 000000000..3e41eb32a --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/community/showcase/scriptbar.mdx @@ -0,0 +1,10 @@ +# ScriptBar + +```mdx-code-block +

+ +
+

+``` + +[ScriptBar](https://GitHub.com/raguay/ScriptBarApp) is a program to show the output of scripts or [Node-Red](https://nodered.org) server. It runs scripts defined in EmailIt program and shows the output. Scripts from xBar or TextBar can be used, but currently on the TextBar scripts work well. It also displays the output of scripts on your system. ScriptBar doesn't put them in the menubar, but has them all in a convient window for easy viewing. You can have multiple tabs to have many different things show. You can also keep the links to your most visited web sites. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/surge.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/surge.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/surge.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/wally.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/wally.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/wally.mdx diff --git a/website/versioned_docs/version-v2.4.0/community/showcase/warmine.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/warmine.mdx new file mode 100644 index 000000000..46b10b5b1 --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/community/showcase/warmine.mdx @@ -0,0 +1,19 @@ +# Minecraft launcher for WarMine + +```mdx-code-block +

+ + +
+

+``` + +[Minecraft launcher for WarMine](https://warmine.ru/) is a Wails application, that allows you to easily join modded game servers and manage your game accounts. + +The Launcher downloads the game files, checks their integrity and launches the game with a wide range of customization options for the launch arguments from the backend. + +Frontend is written in Svelte, whole launcher fits in 9MB and supports Windows 7-11. diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wombat.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/wombat.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.2.0/community/showcase/wombat.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/wombat.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx b/website/versioned_docs/version-v2.4.0/community/showcase/ytd.mdx similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.3.0/community/showcase/ytd.mdx rename to website/versioned_docs/version-v2.4.0/community/showcase/ytd.mdx diff --git a/website/versioned_docs/version-v2.3.0/community/templates.mdx b/website/versioned_docs/version-v2.4.0/community/templates.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/community/templates.mdx rename to website/versioned_docs/version-v2.4.0/community/templates.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/_category_.json b/website/versioned_docs/version-v2.4.0/gettingstarted/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/gettingstarted/_category_.json rename to website/versioned_docs/version-v2.4.0/gettingstarted/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/gettingstarted/building.mdx b/website/versioned_docs/version-v2.4.0/gettingstarted/building.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/gettingstarted/building.mdx rename to website/versioned_docs/version-v2.4.0/gettingstarted/building.mdx diff --git a/website/versioned_docs/version-v2.3.0/gettingstarted/development.mdx b/website/versioned_docs/version-v2.4.0/gettingstarted/development.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/gettingstarted/development.mdx rename to website/versioned_docs/version-v2.4.0/gettingstarted/development.mdx diff --git a/website/versioned_docs/version-v2.3.0/gettingstarted/firstproject.mdx b/website/versioned_docs/version-v2.4.0/gettingstarted/firstproject.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/gettingstarted/firstproject.mdx rename to website/versioned_docs/version-v2.4.0/gettingstarted/firstproject.mdx diff --git a/website/versioned_docs/version-v2.3.0/gettingstarted/installation.mdx b/website/versioned_docs/version-v2.4.0/gettingstarted/installation.mdx similarity index 98% rename from website/versioned_docs/version-v2.3.0/gettingstarted/installation.mdx rename to website/versioned_docs/version-v2.4.0/gettingstarted/installation.mdx index 0e4bd0a50..331ca5062 100644 --- a/website/versioned_docs/version-v2.3.0/gettingstarted/installation.mdx +++ b/website/versioned_docs/version-v2.4.0/gettingstarted/installation.mdx @@ -57,7 +57,7 @@ import TabItem from "@theme/TabItem"; Wails requires that the WebView2 runtime is installed. Some Windows installations will already have this installed. You can check using the wails doctor command. - Linux required the standard gcc build tools plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run wails doctor after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the Add Linux Distro guide. + Linux requires the standard gcc build tools plus libgtk3 and libwebkit. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run wails doctor after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the Add Linux Distro guide. ``` diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/_category_.json b/website/versioned_docs/version-v2.4.0/guides/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/guides/_category_.json rename to website/versioned_docs/version-v2.4.0/guides/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/guides/angular.mdx b/website/versioned_docs/version-v2.4.0/guides/angular.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/angular.mdx rename to website/versioned_docs/version-v2.4.0/guides/angular.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/application-development.mdx b/website/versioned_docs/version-v2.4.0/guides/application-development.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/application-development.mdx rename to website/versioned_docs/version-v2.4.0/guides/application-development.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/dynamic-assets.mdx b/website/versioned_docs/version-v2.4.0/guides/dynamic-assets.mdx similarity index 99% rename from website/versioned_docs/version-v2.3.0/guides/dynamic-assets.mdx rename to website/versioned_docs/version-v2.4.0/guides/dynamic-assets.mdx index 806accf18..0516fb729 100644 --- a/website/versioned_docs/version-v2.3.0/guides/dynamic-assets.mdx +++ b/website/versioned_docs/version-v2.4.0/guides/dynamic-assets.mdx @@ -11,7 +11,7 @@ By installing a custom AssetsHandler, you can serve your own assets using a cust In our example project, we will create a simple assets handler which will load files off disk: -```go title=main.go {16-35,49} +```go title=main.go {17-36,49} package main import ( diff --git a/website/versioned_docs/version-v2.3.0/guides/frameless.mdx b/website/versioned_docs/version-v2.4.0/guides/frameless.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/frameless.mdx rename to website/versioned_docs/version-v2.4.0/guides/frameless.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/frontend.mdx b/website/versioned_docs/version-v2.4.0/guides/frontend.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/frontend.mdx rename to website/versioned_docs/version-v2.4.0/guides/frontend.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/ides.mdx b/website/versioned_docs/version-v2.4.0/guides/ides.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/ides.mdx rename to website/versioned_docs/version-v2.4.0/guides/ides.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/linux-distro-support.mdx b/website/versioned_docs/version-v2.4.0/guides/linux-distro-support.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/linux-distro-support.mdx rename to website/versioned_docs/version-v2.4.0/guides/linux-distro-support.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/linux.mdx b/website/versioned_docs/version-v2.4.0/guides/linux.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/linux.mdx rename to website/versioned_docs/version-v2.4.0/guides/linux.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/local-development.mdx b/website/versioned_docs/version-v2.4.0/guides/local-development.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/local-development.mdx rename to website/versioned_docs/version-v2.4.0/guides/local-development.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/mac-appstore.mdx b/website/versioned_docs/version-v2.4.0/guides/mac-appstore.mdx similarity index 81% rename from website/versioned_docs/version-v2.3.0/guides/mac-appstore.mdx rename to website/versioned_docs/version-v2.4.0/guides/mac-appstore.mdx index 271464730..d2c3a9458 100644 --- a/website/versioned_docs/version-v2.3.0/guides/mac-appstore.mdx +++ b/website/versioned_docs/version-v2.4.0/guides/mac-appstore.mdx @@ -21,6 +21,12 @@ This page gives a brief overview of how to submit your Wails App to the Mac App 3. Populate your app with the correct screen shots, descriptions, etc. as required by Apple 4. Create a new version of your app +#### Create Provisioning Profile +1. Go to the [Apple Developer Profiles](https://developer.apple.com/account/resources/profiles/list) page +2. Add a new provisioning profile for Mac App Store Distribution +3. Set the Profile Type as Mac and select the App ID for the application created above +4. Select the Mac App Distribution certificate +5. Name the Provisioning Profile embedded and download the created profile. ## Mac App Store Process @@ -30,7 +36,7 @@ Apps submitted to the Mac App Store must run under Apple's [App Sandbox](https:/ **Example Entitlements File** -This is an example entitlements file from the [RiftShare](https://github.com/achhabra2/riftshare) app. For reference please put in the entitlements your app requires. Refer to [this site](https://developer.apple.com/documentation/bundleresources/entitlements) for more information. +This is an example entitlements file from the [RiftShare](https://github.com/achhabra2/riftshare) app. For reference please put in the entitlements your app requires. Refer to [this site](https://developer.apple.com/documentation/bundleresources/entitlements) for more information. You will need to replace the Team ID and Application Name with the ones you registered above. ```xml title="entitlements.plist" @@ -47,10 +53,17 @@ This is an example entitlements file from the [RiftShare](https://github.com/ach com.apple.security.files.downloads.read-write + com.apple.application-identifier + TEAM_ID.APP_NAME + com.apple.developer.team-identifier + TEAM_ID ``` +**Add the Embedded Provisioning Profile** +The Provisioning Profile created above needs to be added to the root of the applicaton. It needs to be named embedded.provisionprofile. + #### Build and Sign the App Package The following is an example script for building and signing your app for Mac App Store submission. It assumes you are running the script from your root project directory. @@ -66,6 +79,8 @@ APP_NAME="YourApp" wails build -platform darwin/universal -clean +cp ./embedded.provisionprofile "./build/bin/$APP_NAME.app/Contents" + codesign --timestamp --options=runtime -s "$APP_CERTIFICATE" -v --entitlements ./build/darwin/entitlements.plist ./build/bin/$APP_NAME.app productbuild --sign "$PKG_CERTIFICATE" --component ./build/bin/$APP_NAME.app /Applications ./$APP_NAME.pkg @@ -80,4 +95,4 @@ You will need to upload the generated package file and associate it to your Appl 3. Click the + sign and select the `APP_NAME.pkg` file that you generated in the previous step. Upload it 4. Go back to the [App Store Connect](https://appstoreconnect.apple.com/apps) site and navigate back into your app submission. Select the version that you are ready to make available on the App Store. Under `Build` select the package that you uploaded via Transporter. -That's it! You can now use the site to submit your App for review. After a few business days if all goes well you should see your App live on the Mac App Store. \ No newline at end of file +That's it! You can now use the site to submit your App for review. After a few business days if all goes well you should see your App live on the Mac App Store. diff --git a/website/versioned_docs/version-v2.3.0/guides/manual-builds.mdx b/website/versioned_docs/version-v2.4.0/guides/manual-builds.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/manual-builds.mdx rename to website/versioned_docs/version-v2.4.0/guides/manual-builds.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/migrating.mdx b/website/versioned_docs/version-v2.4.0/guides/migrating.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/migrating.mdx rename to website/versioned_docs/version-v2.4.0/guides/migrating.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/mouse-buttons.mdx b/website/versioned_docs/version-v2.4.0/guides/mouse-buttons.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/mouse-buttons.mdx rename to website/versioned_docs/version-v2.4.0/guides/mouse-buttons.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/obfuscated.mdx b/website/versioned_docs/version-v2.4.0/guides/obfuscated.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/obfuscated.mdx rename to website/versioned_docs/version-v2.4.0/guides/obfuscated.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/overscroll.mdx b/website/versioned_docs/version-v2.4.0/guides/overscroll.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/overscroll.mdx rename to website/versioned_docs/version-v2.4.0/guides/overscroll.mdx diff --git a/website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx b/website/versioned_docs/version-v2.4.0/guides/routing.mdx similarity index 100% rename from website/i18n/ko/docusaurus-plugin-content-docs/version-v2.3.0/guides/routing.mdx rename to website/versioned_docs/version-v2.4.0/guides/routing.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/signing.mdx b/website/versioned_docs/version-v2.4.0/guides/signing.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/signing.mdx rename to website/versioned_docs/version-v2.4.0/guides/signing.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/templates.mdx b/website/versioned_docs/version-v2.4.0/guides/templates.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/templates.mdx rename to website/versioned_docs/version-v2.4.0/guides/templates.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/troubleshooting.mdx b/website/versioned_docs/version-v2.4.0/guides/troubleshooting.mdx similarity index 99% rename from website/versioned_docs/version-v2.3.0/guides/troubleshooting.mdx rename to website/versioned_docs/version-v2.4.0/guides/troubleshooting.mdx index 37a6d3e79..9a68610c3 100644 --- a/website/versioned_docs/version-v2.3.0/guides/troubleshooting.mdx +++ b/website/versioned_docs/version-v2.4.0/guides/troubleshooting.mdx @@ -173,7 +173,7 @@ Sources: https://github.com/wailsapp/wails/issues/1806 and https://github.com/wa It's preferable to add `frontend/node_modules` and `frontend/package-lock.json` to your `.gitignore`. Otherwise when opening your repository on another machine that may have different versions of Node installed, you may not be able to run your application. -If this does happen, simply delete `frontend/node_modules` and `frontend/package-lock.json` and run your `wails build` or `wails dev` command again. +If this does happen, simply delete `frontend/node_modules` and `frontend/package-lock.json` and run your `wails build` or `wails dev` command again. ## Build process stuck on "Generating bindings" diff --git a/website/versioned_docs/version-v2.3.0/guides/vscode.mdx b/website/versioned_docs/version-v2.4.0/guides/vscode.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/vscode.mdx rename to website/versioned_docs/version-v2.4.0/guides/vscode.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/windows-installer.mdx b/website/versioned_docs/version-v2.4.0/guides/windows-installer.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/windows-installer.mdx rename to website/versioned_docs/version-v2.4.0/guides/windows-installer.mdx diff --git a/website/versioned_docs/version-v2.3.0/guides/windows.mdx b/website/versioned_docs/version-v2.4.0/guides/windows.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/guides/windows.mdx rename to website/versioned_docs/version-v2.4.0/guides/windows.mdx diff --git a/website/versioned_docs/version-v2.3.0/howdoesitwork.mdx b/website/versioned_docs/version-v2.4.0/howdoesitwork.mdx similarity index 99% rename from website/versioned_docs/version-v2.3.0/howdoesitwork.mdx rename to website/versioned_docs/version-v2.4.0/howdoesitwork.mdx index 2db56daa5..e9f2c6e3d 100644 --- a/website/versioned_docs/version-v2.3.0/howdoesitwork.mdx +++ b/website/versioned_docs/version-v2.4.0/howdoesitwork.mdx @@ -141,7 +141,7 @@ Wails requires that you pass in an _instance_ of the struct for it to bind it co In this example, we create a new `App` instance and then add this instance to the `Bind` option in `wails.Run`: -```go {16,24} title="main.go" +```go {17,27} title="main.go" package main import ( @@ -188,7 +188,7 @@ func (a *App) Greet(name string) string { You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: -```go {8-10} +```go {10-12} //... err := wails.Run(&options.App{ Title: "Basic Demo", @@ -276,7 +276,7 @@ it will be returned to your frontend as a JavaScript class. :::info Note -Struct fields *must* have a valid `json` tag to be included in the generated TypeScript. +Struct fields _must_ have a valid `json` tag to be included in the generated TypeScript. Anonymous nested structs are not supported at this time. diff --git a/website/versioned_docs/version-v2.3.0/introduction.mdx b/website/versioned_docs/version-v2.4.0/introduction.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/introduction.mdx rename to website/versioned_docs/version-v2.4.0/introduction.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/_category_.json b/website/versioned_docs/version-v2.4.0/reference/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/_category_.json rename to website/versioned_docs/version-v2.4.0/reference/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/reference/cli.mdx b/website/versioned_docs/version-v2.4.0/reference/cli.mdx similarity index 99% rename from website/versioned_docs/version-v2.3.0/reference/cli.mdx rename to website/versioned_docs/version-v2.4.0/reference/cli.mdx index 4a73292ae..c76baaadd 100644 --- a/website/versioned_docs/version-v2.3.0/reference/cli.mdx +++ b/website/versioned_docs/version-v2.4.0/reference/cli.mdx @@ -85,8 +85,10 @@ Example: `wails build -clean -o myproject.exe` -:::Info +:::info + On Mac, the application will be bundled with `Info.plist`, not `Info.dev.plist`. + ::: :::info UPX on Apple Silicon diff --git a/website/versioned_docs/version-v2.3.0/reference/menus.mdx b/website/versioned_docs/version-v2.4.0/reference/menus.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/menus.mdx rename to website/versioned_docs/version-v2.4.0/reference/menus.mdx diff --git a/website/versioned_docs/version-v2.3.0/reference/options.mdx b/website/versioned_docs/version-v2.4.0/reference/options.mdx similarity index 95% rename from website/versioned_docs/version-v2.3.0/reference/options.mdx rename to website/versioned_docs/version-v2.4.0/reference/options.mdx index 1e7af4c19..878512d25 100644 --- a/website/versioned_docs/version-v2.3.0/reference/options.mdx +++ b/website/versioned_docs/version-v2.4.0/reference/options.mdx @@ -51,6 +51,7 @@ func main() { OnBeforeClose: app.beforeClose, CSSDragProperty: "--wails-draggable", CSSDragValue: "drag", + EnableFraudulentWebsiteDetection: false, ZoomFactor: 1.0, IsZoomControlEnabled: false, Bind: []interface{}{ @@ -78,7 +79,8 @@ func main() { // OnSuspend is called when Windows enters low power mode OnSuspend func() // OnResume is called when Windows resumes from low power mode - OnResume func() + OnResume func(), + WebviewGpuDisabled: false, }, Mac: &mac.Options{ TitleBar: &mac.TitleBar{ @@ -101,6 +103,7 @@ func main() { Linux: &linux.Options{ Icon: icon, WindowIsTranslucent: false, + WebviewGpuPolicy: linux.WebviewGpuPolicyAlways, }, Debug: options.Debug{ OpenInspectorOnStartup: false, @@ -413,6 +416,15 @@ Indicates what value the `CSSDragProperty` style should have to drag the window. Name: CSSDragValue
Type: `string` +### EnableFraudulentWebsiteDetection + +EnableFraudulentWebsiteDetection enables scan services for fraudulent content, such as malware or phishing attempts. +These services might send information from your app like URLs navigated to and possibly other content to cloud +services of Apple and Microsoft. + +Name: EnableFraudulentWebsiteDetection
+Type: `bool` + ### ZoomFactor Name: ZoomFactor
@@ -628,6 +640,13 @@ If set, this function will be called when Windows resumes from low power mode (s Name: OnResume
Type: `func()` +#### WebviewGpuIsDisabled + +Setting this to `true` will disable GPU hardware acceleration for the webview. + +Name: WebviewGpuIsDisabled
+Type: `bool` + ### Mac This defines [Mac specific options](#mac). @@ -824,6 +843,22 @@ Setting this to `true` will make the window background translucent. Some window Name: WindowIsTranslucent
Type: `bool` +#### WebviewGpuPolicy + +This option is used for determining the webview's hardware acceleration policy. + +Name: WebviewGpuPolicy
+Type: [`options.WebviewGpuPolicy`](#webviewgpupolicy-type)
+Default: `WebviewGpuPolicyAlways` + +##### WebviewGpuPolicy type + +| Value | Description | +| -------------------------| ----------- | +| WebviewGpuPolicyAlways | Hardware acceleration is always enabled| +| WebviewGpuPolicyOnDemand | Hardware acceleration is enabled/disabled as request by web contents| +| WebviewGpuPolicyNever | Hardware acceleration is always disabled | + ### Debug This defines [Debug specific options](#Debug) that apply to debug builds. diff --git a/website/versioned_docs/version-v2.3.0/reference/project-config.mdx b/website/versioned_docs/version-v2.4.0/reference/project-config.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/project-config.mdx rename to website/versioned_docs/version-v2.4.0/reference/project-config.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/_category_.json b/website/versioned_docs/version-v2.4.0/reference/runtime/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/reference/runtime/_category_.json rename to website/versioned_docs/version-v2.4.0/reference/runtime/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/browser.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/browser.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/runtime/browser.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/browser.mdx diff --git a/website/versioned_docs/version-v2.4.0/reference/runtime/clipboard.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/clipboard.mdx new file mode 100644 index 000000000..306cfcb44 --- /dev/null +++ b/website/versioned_docs/version-v2.4.0/reference/runtime/clipboard.mdx @@ -0,0 +1,28 @@ +--- +sidebar_position: 8 +--- + +# Clipboard + +This part of the runtime provides access to the operating system's clipboard.
+The current implementation only handles text. + +### ClipboardGetText + +This method reads the currently stored text from the clipboard. + +Go: `ClipboardGetText(ctx context.Context) (string, error)`
+Returns: a string (if the clipboard is empty an empty string will be returned) or an error. + +JS: `ClipboardGetText(): Promise`
+Returns: a promise with a string result (if the clipboard is empty an empty string will be returned). + +### ClipboardSetText + +This method writes a text to the clipboard. + +Go: `ClipboardSetText(ctx context.Context, text string) error`
+Returns: an error if there is any. + +JS: `ClipboardSetText(text: string): Promise`
+Returns: a promise with true result if the text was successfully set on the clipboard, false otherwise. diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/dialog.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/dialog.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/runtime/dialog.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/dialog.mdx diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/events.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/events.mdx similarity index 96% rename from website/versioned_docs/version-v2.3.0/reference/runtime/events.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/events.mdx index 354a68f4c..138e03d73 100644 --- a/website/versioned_docs/version-v2.3.0/reference/runtime/events.mdx +++ b/website/versioned_docs/version-v2.4.0/reference/runtime/events.mdx @@ -44,4 +44,4 @@ JS: `EventsOnMultiple(eventName string, callback function(optionalData?: any), c This method emits the given event. Optional data may be passed with the event. This will trigger any event listeners. Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`
-JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))` +JS: `EventsEmit(eventName: string, ...optionalData: any)` diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/intro.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/intro.mdx similarity index 98% rename from website/versioned_docs/version-v2.3.0/reference/runtime/intro.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/intro.mdx index 13a50edfb..3c491ecf0 100644 --- a/website/versioned_docs/version-v2.3.0/reference/runtime/intro.mdx +++ b/website/versioned_docs/version-v2.4.0/reference/runtime/intro.mdx @@ -15,6 +15,7 @@ It has utility methods for: - [Events](events.mdx) - [Browser](browser.mdx) - [Log](log.mdx) +- [Clipboard](clipboard.mdx) The Go Runtime is available through importing `github.com/wailsapp/wails/v2/pkg/runtime`. All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/log.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/log.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/runtime/log.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/log.mdx diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/menu.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/menu.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/runtime/menu.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/menu.mdx diff --git a/website/versioned_docs/version-v2.3.0/reference/runtime/window.mdx b/website/versioned_docs/version-v2.4.0/reference/runtime/window.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/reference/runtime/window.mdx rename to website/versioned_docs/version-v2.4.0/reference/runtime/window.mdx diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/_category_.json b/website/versioned_docs/version-v2.4.0/tutorials/_category_.json similarity index 100% rename from website/i18n/ja/docusaurus-plugin-content-docs/version-v2.1.0/tutorials/_category_.json rename to website/versioned_docs/version-v2.4.0/tutorials/_category_.json diff --git a/website/versioned_docs/version-v2.3.0/tutorials/dogsapi.mdx b/website/versioned_docs/version-v2.4.0/tutorials/dogsapi.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/tutorials/dogsapi.mdx rename to website/versioned_docs/version-v2.4.0/tutorials/dogsapi.mdx diff --git a/website/versioned_docs/version-v2.3.0/tutorials/helloworld.mdx b/website/versioned_docs/version-v2.4.0/tutorials/helloworld.mdx similarity index 100% rename from website/versioned_docs/version-v2.3.0/tutorials/helloworld.mdx rename to website/versioned_docs/version-v2.4.0/tutorials/helloworld.mdx diff --git a/website/versioned_sidebars/version-v2.3.0-sidebars.json b/website/versioned_sidebars/version-v2.4.0-sidebars.json similarity index 100% rename from website/versioned_sidebars/version-v2.3.0-sidebars.json rename to website/versioned_sidebars/version-v2.4.0-sidebars.json diff --git a/website/versions.json b/website/versions.json index 55f999c0a..a3ee08918 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1 +1 @@ -["v2.3.1","v2.3.0"] \ No newline at end of file +["v2.4.0","v2.3.1"] \ No newline at end of file