diff --git a/mkdocs-website/docs/appendix/_category_.json b/mkdocs-website/docs/appendix/_category_.json deleted file mode 100644 index 83af4ca28..000000000 --- a/mkdocs-website/docs/appendix/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Appendix", - "position": 70 -} diff --git a/mkdocs-website/docs/community/_category_.json b/mkdocs-website/docs/community/_category_.json deleted file mode 100644 index 524986e1e..000000000 --- a/mkdocs-website/docs/community/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Community", - "position": 50 -} diff --git a/mkdocs-website/docs/community/community.md b/mkdocs-website/docs/community/community.md deleted file mode 100644 index 585015942..000000000 --- a/mkdocs-website/docs/community/community.md +++ /dev/null @@ -1,177 +0,0 @@ -# Community Guide - -The number of Wails users is growing at an incredible rate, and if you're reading this, chances are you're ready to join. So... welcome! - -## Resources - -### Code of Conduct - -This [Code of Conduct](./coc) is an easy guide to develop the technical communities in which we participate. - -### Stay in the Know - -- Follow our [official Twitter account](https://twitter.com/wailsapp). - -### Get Support - -- [GitHub](https://github.com/wailsapp/wails) - If you have a bug to report or feature to request, that's what the GitHub issues are for. Please respect the rules specified in each repository's issue template. -- [Discord](https://discord.gg/JDdSxwjhGf) - A place for Wails devs to meet and chat in real time. -- [QQ Group(中文)](https://qm.qq.com/cgi-bin/qm/qr?k=PmIURne5hFGNd7QWzW5qd6FV-INEjNJv&jump_from=webapi) - A Wails group for Chinese developers to communicate, where you can get help from other developers. - -### Explore the Ecosystem - -- [The Awesome Wails Page](https://github.com/wailsapp/awesome-wails) - See what other awesome resources have been published by other awesome people. - -## 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. - -### 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 if 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 -about the enhancement first. -::: - -:::warning -Any PRs opened without a corresponding ticket may be rejected. -::: - -### 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](https://stackoverflow.com/help/minimal-reproducible-example) -- The output of `wails doctor` -- A test that can reproduce the bug -- 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. -::: - -### 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 slack. - -### 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. - -### 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 discord server. 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, click [here](https://discord.gg/JDdSxwjhGf). - -:::note - -Work In Progress - -::: diff --git a/mkdocs-website/docs/community/contributing.md b/mkdocs-website/docs/community/contributing.md deleted file mode 100644 index dda9ab25a..000000000 --- a/mkdocs-website/docs/community/contributing.md +++ /dev/null @@ -1,29 +0,0 @@ -# Contributing - -## Introduction - -Wails is a community project, and we welcome contributions from anyone. This document outlines the process for contributing to Wails. - -## Ways of contributing - -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 -- Improving the documentation - -### Getting started - -To get started, clone the project repository: - -```shell -wails3 contribute -``` - diff --git a/mkdocs-website/docs/community/links.md b/mkdocs-website/docs/community/links.md deleted file mode 100644 index 5f5b8755a..000000000 --- a/mkdocs-website/docs/community/links.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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 - -- [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) - -## 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/mkdocs-website/docs/community/showcase/_category_.json b/mkdocs-website/docs/community/showcase/_category_.json deleted file mode 100644 index 276e283b7..000000000 --- a/mkdocs-website/docs/community/showcase/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Showcase", - "position": 1 -} diff --git a/mkdocs-website/docs/community/showcase/bulletinboard.mdx b/mkdocs-website/docs/community/showcase/bulletinboard.mdx deleted file mode 100644 index 37be75135..000000000 --- a/mkdocs-website/docs/community/showcase/bulletinboard.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 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/mkdocs-website/docs/community/showcase/emailit.md b/mkdocs-website/docs/community/showcase/emailit.md deleted file mode 100644 index c1817b70f..000000000 --- a/mkdocs-website/docs/community/showcase/emailit.md +++ /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 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/mkdocs-website/docs/community/showcase/encrypteasy.mdx b/mkdocs-website/docs/community/showcase/encrypteasy.mdx deleted file mode 100644 index 7504950ea..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/filehound.mdx b/mkdocs-website/docs/community/showcase/filehound.mdx deleted file mode 100644 index 8c541f482..000000000 --- a/mkdocs-website/docs/community/showcase/filehound.mdx +++ /dev/null @@ -1,24 +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/mkdocs-website/docs/community/showcase/hiposter.mdx b/mkdocs-website/docs/community/showcase/hiposter.mdx deleted file mode 100644 index c0f9052c3..000000000 --- a/mkdocs-website/docs/community/showcase/hiposter.mdx +++ /dev/null @@ -1,10 +0,0 @@ -# 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/mkdocs-website/docs/community/showcase/minecraftupdater.mdx b/mkdocs-website/docs/community/showcase/minecraftupdater.mdx deleted file mode 100644 index 2f6c7c72b..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/modalfilemanager.mdx b/mkdocs-website/docs/community/showcase/modalfilemanager.mdx deleted file mode 100644 index bcd212396..000000000 --- a/mkdocs-website/docs/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, 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. There are themes and extensions available to download from GitHub. diff --git a/mkdocs-website/docs/community/showcase/mollywallet.mdx b/mkdocs-website/docs/community/showcase/mollywallet.mdx deleted file mode 100644 index 5d846d06d..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/october.mdx b/mkdocs-website/docs/community/showcase/october.mdx deleted file mode 100644 index 66d634dc5..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/optimus.mdx b/mkdocs-website/docs/community/showcase/optimus.mdx deleted file mode 100644 index 4f87479d6..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/portfall.mdx b/mkdocs-website/docs/community/showcase/portfall.mdx deleted file mode 100644 index 03e740f4c..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/restic-browser.mdx b/mkdocs-website/docs/community/showcase/restic-browser.mdx deleted file mode 100644 index 3646384ec..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/riftshare.mdx b/mkdocs-website/docs/community/showcase/riftshare.mdx deleted file mode 100644 index 9928b4785..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/scriptbar.mdx b/mkdocs-website/docs/community/showcase/scriptbar.mdx deleted file mode 100644 index 3e41eb32a..000000000 --- a/mkdocs-website/docs/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 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/mkdocs-website/docs/community/showcase/surge.mdx b/mkdocs-website/docs/community/showcase/surge.mdx deleted file mode 100644 index c3b3fb4c0..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/wally.mdx b/mkdocs-website/docs/community/showcase/wally.mdx deleted file mode 100644 index 7408aa585..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/warmine.mdx b/mkdocs-website/docs/community/showcase/warmine.mdx deleted file mode 100644 index 46b10b5b1..000000000 --- a/mkdocs-website/docs/community/showcase/warmine.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# 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/mkdocs-website/docs/community/showcase/wombat.mdx b/mkdocs-website/docs/community/showcase/wombat.mdx deleted file mode 100644 index f100c55e2..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/showcase/ytd.mdx b/mkdocs-website/docs/community/showcase/ytd.mdx deleted file mode 100644 index 5db428f72..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/community/templates.md b/mkdocs-website/docs/community/templates.md deleted file mode 100644 index c11ad98ee..000000000 --- a/mkdocs-website/docs/community/templates.md +++ /dev/null @@ -1,61 +0,0 @@ -# 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) - 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) - 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 -- [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>) -- [wails-template-naive](https://github.com/tk103331/wails-template-naive) - Wails template based on Naive UI (A Vue 3 Component Library) - -## Angular - -- [wails-template-angular](https://github.com/mateothegreat/wails-template-angular) - Angular 15+ action packed & ready to roll to production. -- [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 -- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS -- [wails-vite-react-ts-tailwind-shadcnui-template](https://github.com/Mahcks/wails-vite-react-tailwind-shadcnui-ts) - A template with Vite, React, TypeScript, TailwindCSS, and shadcn/ui - -## 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 - -## Solid - -- [wails-template-vite-solid-ts](https://github.com/xijaja/wails-template-solid-ts) - A template using Solid + Ts + Vite -- [wails-template-vite-solid-js](https://github.com/xijaja/wails-template-solid-js) - A template using Solid + Js + Vite - -## 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: -- [wails-template-elm-tailwind](https://github.com/rnice01/wails-template-elm-tailwind) - Combine the powers :muscle: of Elm + Tailwind CSS + Wails! Hot reloading supported. - -## 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/mkdocs-website/docs/getting-started/_category_.json b/mkdocs-website/docs/getting-started/_category_.json deleted file mode 100644 index 597b920df..000000000 --- a/mkdocs-website/docs/getting-started/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Getting Started", - "position": 10 -} diff --git a/mkdocs-website/docs/getting-started/compiling-your-project.md b/mkdocs-website/docs/getting-started/compiling-your-project.md deleted file mode 100644 index 415549614..000000000 --- a/mkdocs-website/docs/getting-started/compiling-your-project.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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/mkdocs-website/docs/getting-started/creating-a-project.md b/mkdocs-website/docs/getting-started/creating-a-project.md deleted file mode 100644 index e8880660d..000000000 --- a/mkdocs-website/docs/getting-started/creating-a-project.md +++ /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: - -```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/mkdocs-website/docs/getting-started/developing-your-application.md b/mkdocs-website/docs/getting-started/developing-your-application.md deleted file mode 100644 index de83a0378..000000000 --- a/mkdocs-website/docs/getting-started/developing-your-application.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/mkdocs-website/docs/getting-started/installation.md b/mkdocs-website/docs/getting-started/installation.md deleted file mode 100644 index 914dc474a..000000000 --- a/mkdocs-website/docs/getting-started/installation.md +++ /dev/null @@ -1,72 +0,0 @@ -# Installation - - -To install the Wails CLI, ensure you have [Go 1.21+](https://go.dev/dl/) installed and run: - -```shell -go install github.com/wailsapp/wails/v3/cmd/wails3@latest -``` - -## 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.21+" - - 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 (Node 18+)" - - 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. - -=== "Task (Optional)" - - The Wails CLI embeds a task runner called [Task](https://taskfile.dev/#/installation). It is optional, but recommended. If you do not wish to install Task, you can use the `wails3 task` command instead of `task`. - Installing Task will give you the greatest flexibility. - -## Platform Specific Dependencies - -You will also need to install platform specific dependencies: - -=== "Mac" - - Wails requires that the xcode command line tools are installed. This can be - done by running: - - ``` - xcode-select --install - ``` - -=== "Windows" - - Wails requires that the [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) is installed. Some Windows installations will already have this installed. You can check using the `wails doctor` command. - -=== "Linux" - - 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 [this guide](/guides/linux-distro-support). - -## System Check - -Running `wails3 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 `wails3` command appears to be missing? - -If your system is reporting that the `wails3` command is missing, check the following: - - - Make sure you have followed the Go installation guide correctly. - - Check that the `go/bin` directory is in the `PATH` environment variable. - - Close/Reopen current terminals to pick up the new `PATH` variable. diff --git a/mkdocs-website/docs/guides/_category_.json b/mkdocs-website/docs/guides/_category_.json deleted file mode 100644 index 5935dad93..000000000 --- a/mkdocs-website/docs/guides/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Guides", - "position": 50 -} diff --git a/mkdocs-website/docs/guides/angular.md b/mkdocs-website/docs/guides/angular.md deleted file mode 100644 index 92eec68d5..000000000 --- a/mkdocs-website/docs/guides/angular.md +++ /dev/null @@ -1,14 +0,0 @@ -# Angular - -Whilst Wails does not have an Angular template, it is possible to use Angular with Wails. - -## Dev Mode - -To get dev mode working with Angular, you need to add the following to your `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/mkdocs-website/docs/guides/application-development.mdx b/mkdocs-website/docs/guides/application-development.mdx deleted file mode 100644 index f8074d150..000000000 --- a/mkdocs-website/docs/guides/application-development.mdx +++ /dev/null @@ -1,228 +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/mkdocs-website/docs/guides/dynamic-assets.mdx b/mkdocs-website/docs/guides/dynamic-assets.mdx deleted file mode 100644 index 0516fb729..000000000 --- a/mkdocs-website/docs/guides/dynamic-assets.mdx +++ /dev/null @@ -1,144 +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 {17-36,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/mkdocs-website/docs/guides/frameless.mdx b/mkdocs-website/docs/guides/frameless.mdx deleted file mode 100644 index 07d8d2d25..000000000 --- a/mkdocs-website/docs/guides/frameless.mdx +++ /dev/null @@ -1,92 +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/mkdocs-website/docs/guides/frontend.mdx b/mkdocs-website/docs/guides/frontend.mdx deleted file mode 100644 index 1384087da..000000000 --- a/mkdocs-website/docs/guides/frontend.mdx +++ /dev/null @@ -1,73 +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/mkdocs-website/docs/guides/ides.mdx b/mkdocs-website/docs/guides/ides.mdx deleted file mode 100644 index f22aefe9e..000000000 --- a/mkdocs-website/docs/guides/ides.mdx +++ /dev/null @@ -1,131 +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/mkdocs-website/docs/guides/linux-distro-support.mdx b/mkdocs-website/docs/guides/linux-distro-support.mdx deleted file mode 100644 index b64ed0c03..000000000 --- a/mkdocs-website/docs/guides/linux-distro-support.mdx +++ /dev/null @@ -1,110 +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/mkdocs-website/docs/guides/linux.mdx b/mkdocs-website/docs/guides/linux.mdx deleted file mode 100644 index fa74fe6cf..000000000 --- a/mkdocs-website/docs/guides/linux.mdx +++ /dev/null @@ -1,20 +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/mkdocs-website/docs/guides/local-development.mdx b/mkdocs-website/docs/guides/local-development.mdx deleted file mode 100644 index d6c3e3247..000000000 --- a/mkdocs-website/docs/guides/local-development.mdx +++ /dev/null @@ -1,61 +0,0 @@ -# Local Development - -## 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/mkdocs-website/docs/guides/mac-appstore.mdx b/mkdocs-website/docs/guides/mac-appstore.mdx deleted file mode 100644 index d2c3a9458..000000000 --- a/mkdocs-website/docs/guides/mac-appstore.mdx +++ /dev/null @@ -1,98 +0,0 @@ -# Mac App Store Guide - -This page gives a brief overview of how to submit your Wails App to the Mac App Store. - -## Prerequisites - -- You will need to have an Apple Developer account. Please find more information on the [Apple Developer Program](https://developer.apple.com/support/compare-memberships/) site -- You will need to have your Certificates, Identifiers, and App created on the developer portal. More on this below -- Xcode command line tools will need to be installed on your local machine - -#### Create Certificates and Identifiers - -1. Go to your [Apple Developer Account](https://developer.apple.com/account/) -2. Under `Certificates, Identifiers & Profiles`, click `Identifiers` and Register a New App ID. Use the format (com.example.app) -3. Under the same page click `Certificates` and generate new Certificates for Mac App Store Distribution. Download them and import the certificates into Keychain on your local machine. - -#### Create App Submission - -1. Go to the [App Store Connect Site](https://appstoreconnect.apple.com/apps) -2. Register a new application and link the bundle ID that you created in the previous step -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 - -#### Enable Apple's App Sandbox - -Apps submitted to the Mac App Store must run under Apple's [App Sandbox](https://developer.apple.com/app-sandboxing/). You must create an `entitlements.plist` file for this to work. The recommendation is to create this file under this path `{PROJECT_DIR}/build/darwin/entitlements.plist`. - -**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. You will need to replace the Team ID and Application Name with the ones you registered above. - -```xml title="entitlements.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 - - 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. - -Note the certificates for signing the app and signing the installer are different. Please make sure both are imported into Keychain. Find the strings in Keychain and insert them below. Populate your certificate names, and app name below. Running the following script will generate a signed `app.pkg` file in the root directory of your app. - -```bash title="macappstore-build.sh" -#!/bin/bash - -APP_CERTIFICATE="3rd Party Mac Developer Application: YOUR NAME (CODE)" -PKG_CERTIFICATE="3rd Party Mac Developer Installer: YOUR NAME (CODE)" -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 -``` - -#### Upload App Bundle - -You will need to upload the generated package file and associate it to your Application before you will be able to submit it for review. - -1. Download the [Transporter App](https://apps.apple.com/us/app/transporter/id1450874784) from the Mac App Store -2. Open it and sign in with your Apple ID -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. diff --git a/mkdocs-website/docs/guides/manual-builds.mdx b/mkdocs-website/docs/guides/manual-builds.mdx deleted file mode 100644 index 41cbfd1dc..000000000 --- a/mkdocs-website/docs/guides/manual-builds.mdx +++ /dev/null @@ -1,98 +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/mkdocs-website/docs/guides/migrating.mdx b/mkdocs-website/docs/guides/migrating.mdx deleted file mode 100644 index 45c9cf7a0..000000000 --- a/mkdocs-website/docs/guides/migrating.mdx +++ /dev/null @@ -1,208 +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/mkdocs-website/docs/guides/mouse-buttons.mdx b/mkdocs-website/docs/guides/mouse-buttons.mdx deleted file mode 100644 index 5244ce015..000000000 --- a/mkdocs-website/docs/guides/mouse-buttons.mdx +++ /dev/null @@ -1,27 +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/mkdocs-website/docs/guides/obfuscated.mdx b/mkdocs-website/docs/guides/obfuscated.mdx deleted file mode 100644 index 2e7906c40..000000000 --- a/mkdocs-website/docs/guides/obfuscated.mdx +++ /dev/null @@ -1,46 +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/mkdocs-website/docs/guides/overscroll.mdx b/mkdocs-website/docs/guides/overscroll.mdx deleted file mode 100644 index 7715390bb..000000000 --- a/mkdocs-website/docs/guides/overscroll.mdx +++ /dev/null @@ -1,11 +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/mkdocs-website/docs/guides/routing.mdx b/mkdocs-website/docs/guides/routing.mdx deleted file mode 100644 index ce176943e..000000000 --- a/mkdocs-website/docs/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/en/main/router-components/hash-router): - -```jsx -import { HashRouter } from "react-router-dom"; - -ReactDOM.render( - - {/* The rest of your app goes here */} - - } exact /> - } /> - } /> - {/* more... */} - - , - root -); -``` diff --git a/mkdocs-website/docs/guides/signing.mdx b/mkdocs-website/docs/guides/signing.mdx deleted file mode 100644 index b2a060c5f..000000000 --- a/mkdocs-website/docs/guides/signing.mdx +++ /dev/null @@ -1,411 +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. - 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/* -``` - -# 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/mkdocs-website/docs/guides/templates.mdx b/mkdocs-website/docs/guides/templates.mdx deleted file mode 100644 index 1ab354844..000000000 --- a/mkdocs-website/docs/guides/templates.mdx +++ /dev/null @@ -1,99 +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/mkdocs-website/docs/guides/troubleshooting.mdx b/mkdocs-website/docs/guides/troubleshooting.mdx deleted file mode 100644 index 494e62bfd..000000000 --- a/mkdocs-website/docs/guides/troubleshooting.mdx +++ /dev/null @@ -1,187 +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. - -## My application is not displaying the correct icon in Windows Explorer - -If your application is not displaying the correct icon, try deleting the hidden `IconCache.db` file located in the -`C:\Users\\AppData\Local` directory. This will force Windows to rebuild the icon cache. - -Source: https://github.com/wailsapp/wails/issues/2360#issuecomment-1556070036 - -## 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. - -## Build process stuck on "Generating bindings" - -Bindings generation process runs your application in a special mode. If application, intentionally or unintentionally, contains an endless loop (i.e. not exiting after `wails.Run()` finished), this can lead to build process stuck on the stage of bindings generation. Please make sure your code exits properly. diff --git a/mkdocs-website/docs/guides/vscode.mdx b/mkdocs-website/docs/guides/vscode.mdx deleted file mode 100644 index e3d3e1f02..000000000 --- a/mkdocs-website/docs/guides/vscode.mdx +++ /dev/null @@ -1,85 +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/mkdocs-website/docs/guides/windows-installer.mdx b/mkdocs-website/docs/guides/windows-installer.mdx deleted file mode 100644 index 533734886..000000000 --- a/mkdocs-website/docs/guides/windows-installer.mdx +++ /dev/null @@ -1,60 +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/mkdocs-website/docs/guides/windows.mdx b/mkdocs-website/docs/guides/windows.mdx deleted file mode 100644 index 7d7167ecd..000000000 --- a/mkdocs-website/docs/guides/windows.mdx +++ /dev/null @@ -1,71 +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/mkdocs-website/docs/how-does-it-work.md b/mkdocs-website/docs/how-does-it-work.md deleted file mode 100644 index 31fabae14..000000000 --- a/mkdocs-website/docs/how-does-it-work.md +++ /dev/null @@ -1,414 +0,0 @@ -# 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" - "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) -} -``` - -### 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 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 {17,27} 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) -} -``` - -You may bind as many structs as you like. Just make sure you create an instance of it and pass it in `Bind`: - -```go {10-12} - //... - err := wails.Run(&options.App{ - Title: "Basic Demo", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - 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 - -[^1]: - There is a very small subset of libraries that use features unsupported in WebViews. There are often alternatives and - workarounds for such cases. - -### 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. - -:::info Note - -Struct fields _must_ have a valid `json` tag to be included in the generated TypeScript. - -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). diff --git a/mkdocs-website/docs/index.md b/mkdocs-website/docs/index.md deleted file mode 100644 index 8b22923af..000000000 --- a/mkdocs-website/docs/index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -template: home.html ---- - -Welcome to The Wails Project diff --git a/mkdocs-website/docs/introduction.md b/mkdocs-website/docs/introduction.md deleted file mode 100644 index 5839a9b2f..000000000 --- a/mkdocs-website/docs/introduction.md +++ /dev/null @@ -1,90 +0,0 @@ -# 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/mkdocs-website/docs/reference/_category_.json b/mkdocs-website/docs/reference/_category_.json deleted file mode 100644 index ebb337b83..000000000 --- a/mkdocs-website/docs/reference/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Reference", - "position": 40 -} diff --git a/mkdocs-website/docs/reference/cli.md b/mkdocs-website/docs/reference/cli.md deleted file mode 100644 index 9dcc25bc9..000000000 --- a/mkdocs-website/docs/reference/cli.md +++ /dev/null @@ -1,245 +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 | -|:---------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------| -| -clean | Cleans the `build/bin` directory | | -| -compiler "compiler" | Use a different go compiler to build, eg go1.15beta1 | go | -| -debug | Retains debug information in the application and shows the debug console. Allows the use of the devtools in the application window | | -| -devtools | Allows the use of the devtools in the application window in production (when -debug is not used) | | -| -dryrun | Prints the build command without executing it | | -| -f | Force build application | | -| -garbleargs | Arguments to pass to garble | `-literals -tiny -seed=random` | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -m | Skip mod tidy before compile | | -| -nopackage | Do not package application | | -| -nocolour | Disable colour in output | | -| -nosyncgomod | Do not sync go.mod with the Wails version | | -| -nsis | Generate NSIS installer for Windows | | -| -o filename | Output filename | | -| -obfuscated | Obfuscate the application using [garble](https://github.com/burrowers/garble) | | -| -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`. | -| -race | Build with Go's race detector | | -| -s | Skip building the frontend | | -| -skipbindings | Skip bindings generation | | -| -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | | -| -trimpath | Remove all file system paths from the resulting executable. | | -| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | | -| -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 | -| -windowsconsole | Keep the console window for Windows builds | | - -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 | -|:-----------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------| -| -appargs "args" | Arguments passed to the application in shell style | | -| -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 | -| -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" | -| -extensions | Extensions to trigger rebuilds (comma separated) | go | -| -forcebuild | Force build of application | | -| -frontenddevserverurl "url" | Use 3rd party dev server url to serve assets, EG Vite | "" | -| -ldflags "flags" | Additional ldflags to pass to the compiler | | -| -loglevel "loglevel" | Loglevel to use - Trace, Debug, Info, Warning, Error | Debug | -| -nocolour | Turn off colour cli output | false | -| -noreload | Disable automatic reload when assets change | | -| -nosyncgomod | Do not sync go.mod with the Wails version | false | -| -race | Build with Go's race detector | false | -| -reloaddirs | Additional directories to trigger reloads (comma separated) | Value in `wails.json` | -| -s | Skip building the frontend | false | -| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | | -| -skipbindings | Skip bindings generation | | -| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | | -| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 | -| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` | - -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/mkdocs-website/docs/reference/menus.mdx b/mkdocs-website/docs/reference/menus.mdx deleted file mode 100644 index 7af0bf38f..000000000 --- a/mkdocs-website/docs/reference/menus.mdx +++ /dev/null @@ -1,240 +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 - - app := NewApp() - - 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(app.ctx) - }) - - 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, // reference the menu above - 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` | `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/mkdocs-website/docs/reference/options.mdx b/mkdocs-website/docs/reference/options.mdx deleted file mode 100644 index 62ffffe1e..000000000 --- a/mkdocs-website/docs/reference/options.mdx +++ /dev/null @@ -1,904 +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" - "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, - WindowStartState: options.Maximised, - 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, - CSSDragProperty: "--wails-draggable", - CSSDragValue: "drag", - EnableDefaultContextMenu: false, - EnableFraudulentWebsiteDetection: false, - 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(), - WebviewGpuDisabled: false, - }, - 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, - WebviewGpuPolicy: linux.WebviewGpuPolicyAlways, - }, - Debug: options.Debug{ - OpenInspectorOnStartup: false, - }, - }) - - 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 - -Deprecated: Please use [WindowStartState](#windowstartstate). - -### WindowStartState - -Defines how the window should present itself at startup. - -| Value | Win | Mac | Lin | -| ---------- | --- | --- | --- | -| Fullscreen | ✅ | ✅ | ✅ | -| Maximised | ✅ | ✅ | ✅ | -| Minimised | ✅ | ❌ | ✅ | - -Name: WindowStartState
-Type: `options.WindowStartState` - -### 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. - -Name: HideWindowOnClose
-Type: `bool` - -### BackgroundColour - -This value is the default background colour of the window. -Example: options.NewRGBA(255,0,0,128) - Red at 50% transparency - -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 - -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 | ✅ | ✅ | ✅ [^1] | -| PUT | ✅ | ✅ | ✅ [^1] | -| PATCH | ✅ | ✅ | ✅ [^1] | -| DELETE | ✅ | ✅ | ✅ [^1] | -| Request Headers | ✅ | ✅ | ✅ [^1] | -| Request Body | ✅ | ✅ | ✅ [^2] | -| Request Body Streaming | ✅ | ✅ | ✅ [^2] | -| Response StatusCodes | ✅ | ✅ | ✅ [^1] | -| Response Headers | ✅ | ✅ | ✅ [^1] | -| Response Body | ✅ | ✅ | ✅ | -| Response Body Streaming | ❌ | ✅ | ✅ | -| WebSockets | ❌ | ❌ | ❌ | -| HTTP Redirects 30x | ✅ | ❌ | ❌ | - -[^1]: This requires WebKit2GTK 2.36+ support and your app needs to be build with the build tag `webkit2_36` to activate support for this feature. This also bumps the minimum requirement of WebKit2GTK to 2.36 for your app. -[^2]: This requires WebKit2GTK 2.40+ support and your app needs to be build with the build tag `webkit2_40` to activate support for this feature. This also bumps the minimum requirement of WebKit2GTK to 2.40 for your app. - -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. - -Name: AssetsHandler
-Type: `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 - -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` - -### 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` - -### EnableDefaultContextMenu - -EnableDefaultContextMenu enables the browser's default context-menu in production. - -By default, the browser's default context-menu is only available in development and in a `-debug` or `-devtools` [build](../reference/cli.mdx#build) along with the devtools inspector, Using this option you can enable the default context-menu in `production` while the devtools inspector won't be available unless the `-devtools` build flag is used. - -When this option is enabled, by default the context-menu will only be shown for text contexts (where Cut/Copy/Paste is needed), to override this behavior, you can use the CSS property `--default-contextmenu` on any HTML element (including the `body`) with the following values : - -| CSS Style | Behavior | -|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| -| `--default-contextmenu: auto;` | (**default**) will show the default context menu only if :
contentEditable is true OR text has been selected OR element is input or textarea | -| `--default-contextmenu: show;` | will always show the default context menu | -| `--default-contextmenu: hide;` | will always hide the default context menu | - -This rule is inherited like any normal CSS rule, so nesting works as expected. - -:::note -This filtering functionality is only enabled in production, so in development and in debug build, the full context-menu is always available everywhere. -::: - -:::warning -This filtering functionality is NOT a security measure, the developer should expect that the full context-menu could be leaked anytime which could contain commands like (Download image, Reload, Save webpage), if this is a concern, the developer SHOULD NOT enable the default context-menu. -::: - - -Name: EnableDefaultContextMenu
-Type: `bool` - -### 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
-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). - -### 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()` - -#### WebviewGpuIsDisabled - -Setting this to `true` will disable GPU hardware acceleration for the webview. - -Name: WebviewGpuIsDisabled
-Type: `bool` - -### 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. - -#### WindowIsTranslucent - -Setting this to `true` will make the window background translucent. Some window managers may ignore it, or result in a black 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. - -Name: Debug
-Type: `options.Debug` - -#### OpenInspectorOnStartup - -Setting this to `true` will open the WebInspector on startup of the application. - -Name: OpenInspectorOnStartup
-Type: `bool` diff --git a/mkdocs-website/docs/reference/project-config.mdx b/mkdocs-website/docs/reference/project-config.mdx deleted file mode 100644 index 5c7d578b7..000000000 --- a/mkdocs-website/docs/reference/project-config.mdx +++ /dev/null @@ -1,92 +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 -{ - // Project config version - "version": "", - // The project name - "name": "", - // Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty - "assetdir": "", - // Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations - "reloaddirs": "", - // The directory where the build files reside. Defaults to 'build' - "build:dir": "", - // Relative path to the frontend directory. Defaults to 'frontend' - "frontend:dir": "", - // The command to install node dependencies, run in the frontend directory - often `npm install` - "frontend:install": "", - // The command to build the assets, run in the frontend directory - often `npm run build` - "frontend:build": "", - // 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": "", - // This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev - "frontend:dev:build": "", - // This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install - "frontend:dev:install": "", - // This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers - "frontend:dev:watcher": "", - // 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 - "frontend:dev:serverUrl": "", - // Relative path to the directory that the auto-generated JS modules will be created - "wailsjsdir": "", - // The name of the binary - "outputfilename": "", - // The default time the dev server waits to reload when it detects a change in assets - "debounceMS": 100, - // Address to bind the wails dev sever to. Default: localhost:34115 - "devServer": "", - // Arguments passed to the application in shell style when in dev mode - "appargs": "", - // Defines if build hooks should be run though they are defined for an OS other than the host OS. - "runNonNativeBuildHooks": false, - "preBuildHooks": { - // 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/GOARCH": "", - // 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. - "GOOS/*": "", - // The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH". - "*/*": "" - }, - "postBuildHooks": { - // 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/GOARCH": "", - // 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. - "GOOS/*": "", - // 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. - "*/*": "" - }, - // Data used to populate manifests and version info. - "info": { - // The company name. Default: [The project name] - "companyName": "", - // The product name. Default: [The project name] - "productName": "", - // The version of the product. Default: '1.0.0' - "productVersion": "", - // The copyright of the product. Default: 'Copyright.........' - "copyright": "", - // A short comment of the app. Default: 'Built using Wails (https://wails.app)' - "comments": "" - }, - // 'multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple' - "nsisType": "", - // Whether the app should be obfuscated. Default: false - "obfuscated": "", - // The arguments to pass to the garble command when using the obfuscated flag - "garbleargs": "" -} -``` - -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/mkdocs-website/docs/reference/runtime/_category_.json b/mkdocs-website/docs/reference/runtime/_category_.json deleted file mode 100644 index ac6d55488..000000000 --- a/mkdocs-website/docs/reference/runtime/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Runtime", - "position": 1 -} diff --git a/mkdocs-website/docs/reference/runtime/browser.mdx b/mkdocs-website/docs/reference/runtime/browser.mdx deleted file mode 100644 index 6f72be0ce..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/reference/runtime/clipboard.mdx b/mkdocs-website/docs/reference/runtime/clipboard.mdx deleted file mode 100644 index 306cfcb44..000000000 --- a/mkdocs-website/docs/reference/runtime/clipboard.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -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/mkdocs-website/docs/reference/runtime/dialog.mdx b/mkdocs-website/docs/reference/runtime/dialog.mdx deleted file mode 100644 index aede10924..000000000 --- a/mkdocs-website/docs/reference/runtime/dialog.mdx +++ /dev/null @@ -1,309 +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`. | ✅[*](#windows) | ✅ | | -| 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". - -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"}, -}) -``` - -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/mkdocs-website/docs/reference/runtime/events.mdx b/mkdocs-website/docs/reference/runtime/events.mdx deleted file mode 100644 index 138e03d73..000000000 --- a/mkdocs-website/docs/reference/runtime/events.mdx +++ /dev/null @@ -1,47 +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. 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 - -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. 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 - -This method sets up a listener for the given event name, but will only trigger a maximum of `counter` times. 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 - -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(eventName: string, ...optionalData: any)` diff --git a/mkdocs-website/docs/reference/runtime/introduction.md b/mkdocs-website/docs/reference/runtime/introduction.md deleted file mode 100644 index 3c491ecf0..000000000 --- a/mkdocs-website/docs/reference/runtime/introduction.md +++ /dev/null @@ -1,100 +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) -- [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) -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/mkdocs-website/docs/reference/runtime/log.mdx b/mkdocs-website/docs/reference/runtime/log.mdx deleted file mode 100644 index 4f6b6b68b..000000000 --- a/mkdocs-website/docs/reference/runtime/log.mdx +++ /dev/null @@ -1,142 +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/mkdocs-website/docs/reference/runtime/menu.mdx b/mkdocs-website/docs/reference/runtime/menu.mdx deleted file mode 100644 index 8a0c79e37..000000000 --- a/mkdocs-website/docs/reference/runtime/menu.mdx +++ /dev/null @@ -1,25 +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/mkdocs-website/docs/reference/runtime/window.mdx b/mkdocs-website/docs/reference/runtime/window.mdx deleted file mode 100644 index 3719be554..000000000 --- a/mkdocs-website/docs/reference/runtime/window.mdx +++ /dev/null @@ -1,254 +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: `WindowCenter(ctx context.Context)`
-JS: `WindowCenter()` - -### 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 - -Performs a "reload" (Reloads current page). - -Go: `WindowReload(ctx context.Context)`
-JS: `WindowReload()` - -### WindowReloadApp - -Reloads the application frontend. - -Go: `WindowReloadApp(ctx context.Context)`
-JS: `WindowReloadApp()` - -### WindowSetSystemDefaultTheme - -Windows only. - -Go: `WindowSetSystemDefaultTheme(ctx context.Context)`
-JS: `WindowSetSystemDefaultTheme()` - -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: `WindowSetDarkTheme(ctx context.Context)`
-JS: `WindowSetDarkTheme()` - -Sets window theme to dark. - -### WindowShow - -Shows the window, if it is currently hidden. - -Go: `WindowShow(ctx context.Context)`
-JS: `WindowShow()` - -### WindowHide - -Hides the window, if it is currently visible. - -Go: `WindowHide(ctx context.Context)`
-JS: `WindowHide()` - -### 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: `WindowSetSize(ctx context.Context, width int, height int)`
-JS: `WindowSetSize(size: Size)` - -### WindowGetSize - -Gets the width and height of the window. - -Go: `WindowGetSize(ctx context.Context) (width int, height int)`
-JS: `WindowGetSize() : 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: `WindowSetMinSize(ctx context.Context, width int, height int)`
-JS: `WindowSetMinSize(size: Size)` - -### 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: `WindowSetMaxSize(ctx context.Context, width int, height int)`
-JS: `WindowSetMaxSize(size: Size)` - -### WindowSetAlwaysOnTop - -Sets the window AlwaysOnTop or not on top. - -Go: `WindowSetAlwaysOnTop(ctx context.Context, b bool)`
-JS: `WindowSetAlwaysOnTop(b: Boolen)` - -### WindowSetPosition - -Sets the window position relative to the monitor the window is currently on. - -Go: `WindowSetPosition(ctx context.Context, x int, y int)`
-JS: `WindowSetPosition(position: Position)` - -### WindowGetPosition - -Gets the window position relative to the monitor the window is currently on. - -Go: `WindowGetPosition(ctx context.Context) (x int, y int)`
-JS: `WindowGetPosition() : Position` - -### WindowMaximise - -Maximises the window to fill the screen. - -Go: `WindowMaximise(ctx context.Context)`
-JS: `WindowMaximise()` - -### WindowUnmaximise - -Restores the window to the dimensions and position prior to maximising. - -Go: `WindowUnmaximise(ctx context.Context)`
-JS: `WindowUnmaximise()` - -### 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: `WindowMinimise(ctx context.Context)`
-JS: `WindowMinimise()` - -### 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/mkdocs-website/docs/stylesheets/extra.css b/mkdocs-website/docs/stylesheets/extra.css deleted file mode 100644 index ce27543af..000000000 --- a/mkdocs-website/docs/stylesheets/extra.css +++ /dev/null @@ -1,17 +0,0 @@ - -[data-md-color-scheme="slate"] { - --md-hue: 208; - --md-primary-fg-color--light: #ECB7B7; - --md-primary-fg-color--dark: #90030C; - --md-accent-fg-color: #ff4646; - --md-primary-fg-color: #2a2a2a; - --md-default-bg-color: #232323; - --md-footer-bg-color--dark: #2a2a2a; -} - -.md-header__button.md-logo img, .md-header__button.md-logo svg { - fill: currentcolor; - display: block; - height: 2rem; - width: auto; -} \ No newline at end of file diff --git a/mkdocs-website/docs/tutorials/_category_.json b/mkdocs-website/docs/tutorials/_category_.json deleted file mode 100644 index dfac1d175..000000000 --- a/mkdocs-website/docs/tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials", - "position": 70 -} diff --git a/mkdocs-website/docs/tutorials/dogsapi.mdx b/mkdocs-website/docs/tutorials/dogsapi.mdx deleted file mode 100644 index 011ebe266..000000000 --- a/mkdocs-website/docs/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/mkdocs-website/docs/tutorials/helloworld.mdx b/mkdocs-website/docs/tutorials/helloworld.mdx deleted file mode 100644 index f9e789bb1..000000000 --- a/mkdocs-website/docs/tutorials/helloworld.mdx +++ /dev/null @@ -1,127 +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 -Devtools: false -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/mkdocs-website/mkdocs.yml b/mkdocs-website/mkdocs.yml deleted file mode 100644 index b3fc8be7e..000000000 --- a/mkdocs-website/mkdocs.yml +++ /dev/null @@ -1,93 +0,0 @@ -site_name: "" -site_description: The Wails Project - Build beautiful cross-platform applications using Go -theme: - name: material - custom_dir: overrides - logo: assets/images/wails-logo-horizontal-dark.svg - favicon: assets/images/favicon.svg - features: - - navigation.tabs - - navigation.sections - - navigation.expand - - navigation.instant - - navigation.top - - - toc.integrate - - toc.follow - - - search.suggest - - search.highlight - - - content.tabs.link - - content.tabs.annotation - - content.tabs.copy - - content.code.copy - language: en - palette: - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/toggle-switch-off-outline - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/toggle-switch - name: Switch to light mode - -extra: - social: - - icon: fontawesome/brands/github-alt - link: https://github.com/wailsapp/wails - - icon: fontawesome/brands/twitter - link: https://twitter.com/wailsapp - - icon: fontawesome/brands/discord - link: https://discord.gg/JDdSxwjhGf - -extra_css: - - stylesheets/extra.css - -nav: - - Home: index.md - - Getting started: -# - Introduction: introduction.md - - Installation: getting-started/installation.md -# - Creating a Project: getting-started/creating-a-project.md -# - How does it work: how-does-it-work.md -# - Developing your Application: getting-started/developing-your-application.md -# - Compiling your Project: getting-started/compiling-your-project.md -# - API Reference: -# - Runtime: -# - Introduction: reference/runtime/introduction.md -# - CLI: reference/cli.md -# - Community: -# - Template: community/templates.md -# - Guides: -# - Angular: guides/angular.md -# - Showcase: -# - Emaillit: community/showcase/emailit.md - - Contributing: community/contributing.md -# - Links: community/links.md - -markdown_extensions: - - pymdownx.tabbed: - alternate_style: true - - pymdownx.highlight: - anchor_linenums: true - - pymdownx.inlinehilite - - pymdownx.snippets - - pymdownx.details - - pymdownx.superfences - - pymdownx.mark - - attr_list - - admonition - - footnotes - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - -copyright: - Copyright © 2023 Lea Anthony diff --git a/mkdocs-website/overrides/assets/images/favicon.ico b/mkdocs-website/overrides/assets/images/favicon.ico deleted file mode 100644 index fb362effe..000000000 Binary files a/mkdocs-website/overrides/assets/images/favicon.ico and /dev/null differ diff --git a/mkdocs-website/overrides/assets/images/favicon.svg b/mkdocs-website/overrides/assets/images/favicon.svg deleted file mode 100644 index 7c99f32e5..000000000 --- a/mkdocs-website/overrides/assets/images/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mkdocs-website/overrides/assets/images/wails-logo-horizontal-dark.svg b/mkdocs-website/overrides/assets/images/wails-logo-horizontal-dark.svg deleted file mode 100644 index 587194389..000000000 --- a/mkdocs-website/overrides/assets/images/wails-logo-horizontal-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mkdocs-website/overrides/assets/images/wails-logo-horizontal.svg b/mkdocs-website/overrides/assets/images/wails-logo-horizontal.svg deleted file mode 100644 index e667a3604..000000000 --- a/mkdocs-website/overrides/assets/images/wails-logo-horizontal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mkdocs-website/overrides/home.html b/mkdocs-website/overrides/home.html deleted file mode 100644 index 05e35ee8a..000000000 --- a/mkdocs-website/overrides/home.html +++ /dev/null @@ -1,103 +0,0 @@ - - -{% extends "main.html" %} - - -{% block tabs %} - {{ super() }} - - - - - -
-
-
- - -
-
-
-
- This is the Wails v3 Alpha website. - - This site will be updated as we progress through the alpha and beta releases.

- Please feel free to raise PRs against this website. Every single PR helps us get closer to a release.

- Thank you for sharing this journey with us.

-
- - Get started - -
- - - - - - - -
-
-
-
-{% endblock %} - - -{% block content %}{% endblock %} - - -{% block footer %}{% endblock %} diff --git a/mkdocs-website/overrides/main.html b/mkdocs-website/overrides/main.html deleted file mode 100644 index 4a4f4eeeb..000000000 --- a/mkdocs-website/overrides/main.html +++ /dev/null @@ -1,31 +0,0 @@ - - -{% extends "base.html" %} - - -{% block scripts %} - {{ super() }} - - - -{% endblock %} diff --git a/v2/examples/customlayout/go.mod b/v2/examples/customlayout/go.mod index a25b94383..fcb4ce4fd 100644 --- a/v2/examples/customlayout/go.mod +++ b/v2/examples/customlayout/go.mod @@ -7,27 +7,27 @@ require github.com/wailsapp/wails/v2 v2.1.0 require ( github.com/bep/debounce v1.2.1 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect - github.com/labstack/echo/v4 v4.9.0 // indirect - github.com/labstack/gommon v0.3.1 // indirect - github.com/leaanthony/go-ansi-parser v1.0.1 // indirect + github.com/labstack/echo/v4 v4.10.2 // indirect + github.com/labstack/gommon v0.4.0 // indirect + github.com/leaanthony/go-ansi-parser v1.6.0 // indirect github.com/leaanthony/gosod v1.0.3 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/mattn/go-colorable v0.1.11 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect + github.com/leaanthony/slicer v1.6.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/samber/lo v1.27.1 // indirect - github.com/tkrajina/go-reflector v0.5.5 // indirect + github.com/samber/lo v1.38.1 // indirect + github.com/tkrajina/go-reflector v0.5.6 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.1 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect ) replace github.com/wailsapp/wails/v2 v2.1.0 => ../.. diff --git a/v2/examples/customlayout/go.sum b/v2/examples/customlayout/go.sum index de073ade8..b00ead2f3 100644 --- a/v2/examples/customlayout/go.sum +++ b/v2/examples/customlayout/go.sum @@ -7,53 +7,69 @@ github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY= github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k= github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc= github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA= github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQOk2DgKxGG4= github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM= +github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ= github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4= github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= +github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc= github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/samber/lo v1.27.1 h1:sTXwkRiIFIQG+G0HeAvOEnGjqWeWtI9cg5/n51KrxPg= github.com/samber/lo v1.27.1/go.mod h1:it33p9UtPMS7z72fP4gw/EIfQB2eI8ke7GR2wc6+Rhg= +github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ= github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= +github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -62,12 +78,16 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/v2/pkg/commands/build/build.go b/v2/pkg/commands/build/build.go index 774e97c24..65d55aa91 100644 --- a/v2/pkg/commands/build/build.go +++ b/v2/pkg/commands/build/build.go @@ -209,7 +209,7 @@ func printBulletPoint(text string, args ...any) { fatal(err.Error()) } t = strings.Trim(t, "\n\r") - pterm.Printfln(t, args...) + pterm.Printf(t, args...) } func GenerateBindings(buildOptions *Options) error { @@ -374,7 +374,7 @@ func execPostBuildHook(outputLogger *clilogger.CLILogger, options *Options, hook } -func executeBuildHook(outputLogger *clilogger.CLILogger, options *Options, hookIdentifier string, argReplacements map[string]string, buildHook string, hookName string) error { +func executeBuildHook(_ *clilogger.CLILogger, options *Options, hookIdentifier string, argReplacements map[string]string, buildHook string, hookName string) error { if !options.ProjectData.RunNonNativeBuildHooks { if hookIdentifier == "" { // That's the global hook diff --git a/v2/pkg/options/systemtray.go b/v2/pkg/options/systemtray.go deleted file mode 100644 index 117abb4d6..000000000 --- a/v2/pkg/options/systemtray.go +++ /dev/null @@ -1,26 +0,0 @@ -package options - -import ( - "github.com/wailsapp/wails/v2/pkg/menu" -) - -// SystemTray contains options for the system tray -type SystemTray struct { - LightModeIcon *SystemTrayIcon - DarkModeIcon *SystemTrayIcon - Title string - Tooltip string - StartHidden bool - Menu *menu.Menu - OnLeftClick func() - OnRightClick func() - OnLeftDoubleClick func() - OnRightDoubleClick func() - OnMenuClose func() - OnMenuOpen func() -} - -// SystemTrayIcon represents a system tray icon -type SystemTrayIcon struct { - Data []byte -} diff --git a/v3/.gitignore b/v3/.gitignore deleted file mode 100644 index cc164c024..000000000 --- a/v3/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -examples/kitchensink/kitchensink -cmd/wails/wails -/examples/systray/systray -/examples/window/window -/examples/dialogs/dialogs -/examples/menu/menu -/examples/clipboard/clipboard -/examples/plain/plain diff --git a/v3/.prettierignore b/v3/.prettierignore deleted file mode 100644 index 94c6af38e..000000000 --- a/v3/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -website \ No newline at end of file diff --git a/v3/.prettierrc.yml b/v3/.prettierrc.yml deleted file mode 100644 index 685d8b6e7..000000000 --- a/v3/.prettierrc.yml +++ /dev/null @@ -1,6 +0,0 @@ -overrides: - - files: - - "**/*.md" - options: - printWidth: 80 - proseWrap: always diff --git a/v3/README.md b/v3/README.md deleted file mode 100644 index 4e78bee3d..000000000 --- a/v3/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# v3 - -This directory is experimental. It probably won't work for you. There's no support for this directory. Dragons be here. You have been warned! - -## Run examples -follow these steps to run the examples: -- clone the repo -```cmd -git clone https://github.com/wailsapp/wails.git -``` -- switch to v3-alpha branch -```cmd -git checkout v3-alpha -``` -- install dependencies - ```cmd -go mod tidy -``` -- run the example you want -```cmd -cd v3/examples/(example you want) -``` -```cmd -go mod tidy -``` -```cmd -go run main.go -``` diff --git a/v3/TODO.md b/v3/TODO.md deleted file mode 100644 index eb099a96d..000000000 --- a/v3/TODO.md +++ /dev/null @@ -1,49 +0,0 @@ -# TODO - -Informal and incomplete list of things needed in v3. - -## General - -- [x] Generate Bindings -- [x] Generate TS Models -- [ ] Dev Mode -- [ ] Generate Info.Plist from `info.json` - -- [ ] Windows Port -- [ ] Linux Port - -## Runtime - -- [x] Pass window ID with window calls in JS -- [x] Implement alias for `window` in JS -- [x] Implement runtime dispatcher - - [x] Log - - [x] Same Window - - [ ] Other Window - - [x] Dialogs - - [x] Info - - [x] Warning - - [x] Error - - [x] Question - - [x] OpenFile - - [x] SaveFile - - [x] Events - - [x] Screens - - [x] Clipboard - - [x] Application -- [ ] Create `.d.ts` file - -## Templates - -- [ ] Create plain template -- [ ] Improve default template - -## Runtime - -- [ ] To log or not to log? -- [ ] Unify cross-platform events, eg. `onClose` - -## Plugins - -- [ ] Move logins to `v3/plugins` -- [ ] Expose application logger to plugins \ No newline at end of file diff --git a/v3/Taskfile.yaml b/v3/Taskfile.yaml deleted file mode 100644 index 74b300ce8..000000000 --- a/v3/Taskfile.yaml +++ /dev/null @@ -1,214 +0,0 @@ -# https://taskfile.dev - -version: "3" - -includes: - website: - taskfile: ./website - dir: ./website - optional: true - -tasks: - build-runtime-debug: - dir: internal/runtime - internal: true - cmds: - - npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_debug_desktop_{{.PLATFORM}}.js --define:DEBUG=true --define:WINDOWS={{.WINDOWS}} --define:DARWIN={{.DARWIN}} --define:LINUX={{.LINUX}} --define:PLATFORM={{.PLATFORM}} - - build-runtime-debug-windows: - cmds: - - task: build-runtime-debug - vars: - WINDOWS: true - DARWIN: false - LINUX: false - PLATFORM: windows - - build-runtime-debug-linux: - cmds: - - task: build-runtime-debug - vars: - WINDOWS: false - DARWIN: false - LINUX: true - PLATFORM: linux - - build-runtime-debug-darwin: - cmds: - - task: build-runtime-debug - vars: - WINDOWS: false - DARWIN: true - LINUX: false - PLATFORM: darwin - - build-runtime-production: - dir: internal/runtime - internal: true - cmds: - - npx esbuild desktop/main.js --bundle --minify --outfile=runtime_production_desktop_{{.PLATFORM}}.js --define:DEBUG=true --define:WINDOWS={{.WINDOWS}} --define:DARWIN={{.DARWIN}} --define:LINUX={{.LINUX}} --define:PLATFORM={{.PLATFORM}} - - build-runtime-production-windows: - cmds: - - task: build-runtime-production - vars: - WINDOWS: true - DARWIN: false - LINUX: false - PLATFORM: windows - - build-runtime-production-linux: - cmds: - - task: build-runtime-production - vars: - WINDOWS: false - DARWIN: false - LINUX: true - PLATFORM: linux - - build-runtime-production-darwin: - cmds: - - task: build-runtime-production - vars: - WINDOWS: false - DARWIN: true - LINUX: false - PLATFORM: darwin - - install-runtime-dev-deps: - dir: internal/runtime/dev - internal: true - sources: - - package.json - cmds: - - npm install - - install-runtime-deps: - dir: internal/runtime - internal: true - sources: - - package.json - cmds: - - npm install - - test-runtime: - dir: internal/runtime - cmds: - - npx vitest run - - update-runtime: - dir: internal/runtime - cmds: - - npx npm-check-updates -u - - build-runtime-all: - dir: internal/runtime - deps: - - build-runtime-production-darwin - - build-runtime-production-windows - - build-runtime-production-linux - - build-runtime-debug-darwin - - build-runtime-debug-windows - - build-runtime-debug-linux - - cmds: - - cmd: echo "build complete" - - build-runtime: - dir: internal/runtime - deps: - - install-runtime-deps - cmds: - - task: build-runtime-all - - recreate-template-dir: - dir: internal/templates - internal: true - silent: true - cmds: - - rm -rf {{.TEMPLATE_DIR}} - - mkdir -p {{.TEMPLATE_DIR}} - - generate-template: - dir: internal/templates/{{.TEMPLATE}} - deps: - - task: recreate-template-dir - vars: - TEMPLATE_DIR: "{{.TEMPLATE}}" - silent: true - cmds: - - cmd: pnpm create vite frontend --template {{.TEMPLATE}} - - cmd: cp -rf ../_base/{{.TEMPLATE}}/* . - ignore_error: true - - cmd: cp -rf ../_base/default/* . - ignore_error: true - - cmd: rm frontend/public/vite.svg - - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old Vite -new Wails -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts - - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old vite -new wails -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts - - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old wails.svg -new wails.png -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts - - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old wailsjs.dev -new wails.io -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts - - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old "framework powered by Wails" -new "framework powered by Vite" -ext .ts,.js,.html,.svelte -ignore vite.config.js,vite.config.ts,vite-env.d.ts - - reinstall-cli: - dir: cmd/wails - internal: true - cmds: - - go install - - echo "Reinstalled wails CLI" - - generate-templates: - dir: internal/templates/ - deps: - - task: generate-template - vars: - TEMPLATE: svelte - - task: generate-template - vars: - TEMPLATE: svelte-ts - - task: generate-template - vars: - TEMPLATE: vue - - task: generate-template - vars: - TEMPLATE: vue-ts - - task: generate-template - vars: - TEMPLATE: react - - task: generate-template - vars: - TEMPLATE: react-ts - - task: generate-template - vars: - TEMPLATE: preact - - task: generate-template - vars: - TEMPLATE: preact-ts - - task: generate-template - vars: - TEMPLATE: lit - - task: generate-template - vars: - TEMPLATE: lit-ts - - task: generate-template - vars: - TEMPLATE: vanilla - - task: generate-template - vars: - TEMPLATE: vanilla-ts - - task: generate-template - vars: - TEMPLATE: react-swc - - task: generate-template - vars: - TEMPLATE: react-swc-ts - cmds: - - task: reinstall-cli - - echo "Generated templates" - - format:md: - cmds: - - npx prettier --write "**/*.md" - - format: - cmds: - - task: format:md diff --git a/v3/V3 Changes.md b/v3/V3 Changes.md deleted file mode 100644 index a002af2d5..000000000 --- a/v3/V3 Changes.md +++ /dev/null @@ -1,182 +0,0 @@ -# Changes for v3 - -## Events - -In v3, there are 3 types of events: - -- Application Events -- Window Events -- Custom Events - -### Application Events - -Application events are events that are emitted by the application. These events include native events such as `ApplicationDidFinishLaunching` on macOS. - -### Window Events - -Window events are events that are emitted by a window. These events include native events such as `WindowDidBecomeMain` on macOS. - -### Custom Events - -Events that the user defines are called `WailsEvents`. This is to differentiate them from the `Event` object that is used to communicate with the browser. WailsEvents are now objects that encapsulate all the details of an event. This includes the event name, the data, and the source of the event. - -The data associated with a WailsEvent is now a single value. If multiple values are required, then a struct can be used. - -### Event callbacks and `Emit` function signature - -The signatures events callbacks (as used by `On`, `Once` & `OnMultiple`) have changed. In v2, the callback function received optional data. In v3, the callback function receives a `WailsEvent` object that contains all data related to the event. - -Similarly, the `Emit` function has changed. Instead of taking a name and optional data, it now takes a single `WailsEvent` object that it will emit. - -### `Off` and `OffAll` - -In v2, `Off` and `OffAll` calls would remove events in both JS and Go. Due to the multi-window nature of v3, this has been changed so that these methods only apply to the context they are called in. For example, if you call `Off` in a window, it will only remove events for that window. If you use `Off` in Go, it will only remove events for Go. - -### Logging - -There was a lot of requests for different types of logging in v2 so for v3 we have simplified things to make it as customisable as you want. There is now a single call `Log` that takes a LogMessage object. This object contains the message, the level, and the source, the log message and any data to be printed out. The default logger is the Console logger, however any number of outputs to log to can be added. Simply add custom loggers to the `options.Application.Logger.CustomLoggers` slice. The default logger does not have log level filtering, however custom loggers can be added that do. - -### Developer notes - -When emitting an event in Go, it will dispatch the event to local Go listeners and also each window in the application. -When emitting an event in JS, it now sends the event to the application. This will be processed as if it was emitted in Go, however the sender ID will be that of the window. - -## Window - -The Window API has largely remained the same, however the methods are now on an instance of a window rather than the runtime. -Some notable differences are: -- Windows now have a Name that identifies them. This is used to identify the window when emitting events. - -## ClipBoard - -The clipboard API has been simplified. There is now a single `Clipboard` object that can be used to read and write to the clipboard. The `Clipboard` object is available in both Go and JS. `SetText()` to set the text and `Text()` to get the text. - -## Bindings - -TBD - -## Dialogs - -Dialogs are now available in JavaScript! - -## Drag and Drop - -Native drag and drop can be enabled per-window. Simply set the `EnableDragAndDrop` window config option to `true` and the window will allow files to be dragged onto it. When this happens, the `events.FilesDropped` event will be emitted. The filenames can then be retrieved from the WindowEventContext using the `DroppedFiles()` method. This returns a slice of strings containing the filenames. - -## Context Menus - -Context menus are contextual menus that are shown when the user right-clicks on an element. Creating a context menu is the same as creating a standard menu , by using `app.NewMenu()`. To make the context menu available to a window, call `window.RegisterContextMenu(name, menu)`. The name will be the id of the context menu and used by the frontend. - -To indicate that an element has a context menu, add the `data-contextmenu` attribute to the element. The value of this attribute should be the name of a context menu previously registered with the window. - -It is possible to register a context menu at the application level, making it available to all windows. This can be done using `app.RegisterContextMenu(name, menu)`. If a context menu cannot be found at the window level, the application context menus will be checked. A demo of this can be found in `v3/examples/contextmenus`. - -## Wails Markup Language (WML) - -The Wails Markup Language is a simple markup language that allows you to add functionality to standard HTML elements without the use of Javascript. - -The following tags are currently supported: - -### `data-wml-event` - -This specifies that a Wails event will be emitted when the element is clicked. The value of the attribute should be the name of the event to emit. - -Example: -```html - -``` -Sometimes you need the user to confirm an action. This can be done by adding the `data-wml-confirm` attribute to the element. The value of this attribute will be the message to display to the user. - -Example: -```html - -``` - -### `data-wml-window` - -Any `wails.window` method can be called by adding the `data-wml-window` attribute to an element. The value of the attribute should be the name of the method to call. The method name should be in the same case as the method. - -```html - -``` - -### `data-wml-trigger` - -This attribute specifies which javascript event should trigger the action. The default is `click`. - -```html - -``` - -## Plugins - -Plugins are a way to extend the functionality of your Wails application. - -### Creating a plugin - -Plugins are standard Go structure that adhere to the following interface: - -```go -type Plugin interface { - Name() string - Init(*application.App) error - Shutdown() - CallableByJS() []string - InjectJS() string -} -``` - -The `Name()` method returns the name of the plugin. This is used for logging purposes. - -The `Init(*application.App) error` method is called when the plugin is loaded. The `*application.App` -parameter is the application that the plugin is being loaded into. Any errors will prevent -the application from starting. - -The `Shutdown()` method is called when the application is shutting down. - -The `CallableByJS()` method returns a list of exported functions that can be called from -the frontend. These method names must exactly match the names of the methods exported -by the plugin. - -The `InjectJS()` method returns JavaScript that should be injected into all windows as they are created. This is useful for adding custom JavaScript functions that complement the plugin. - -### Tips - -#### Enums - -In Go, enums are often defined as a type and a set of constants. For example: - -```go -type MyEnum int - -const ( - MyEnumOne MyEnum = iota - MyEnumTwo - MyEnumThree -) -``` - -Due to incompatibility between Go and JavaScript, custom types cannot be used in this way. The best strategy is to use a type alias for float64: - -```go -type MyEnum = float64 - -const ( - MyEnumOne MyEnum = iota - MyEnumTwo - MyEnumThree -) -``` - -In Javascript, you can then use the following: - -```js -const MyEnum = { - MyEnumOne: 0, - MyEnumTwo: 1, - MyEnumThree: 2 -} -``` - -- Why use `float64`? Can't we use `int`? - - Because JavaScript doesn't have a concept of `int`. Everything is a `number`, which translates to `float64` in Go. There are also restrictions on casting types in Go's reflection package, which means using `int` doesn't work. diff --git a/v3/cmd/wails/README.md b/v3/cmd/wails/README.md deleted file mode 100644 index 2d9af27d8..000000000 --- a/v3/cmd/wails/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# The Wails CLI - -The Wails CLI is a command line tool that allows you to create, build and run Wails applications. -There are a number of commands related to tooling, such as icon generation and asset bundling. - -## Commands - -### run - -The run command is for running tasks defined in `Taskfile.yml`. - -| Flag | Type | Description | Default | -|--------------------|--------|------------------------------------------------------|-----------------------| -| `-t` | string | The name of the task to run | | - -### generate - -The `generate` command is used to generate resources and assets for your Wails project. -It can be used to generate many things including: - - application icons, - - resource files for Windows applications - - Info.plist files for macOS deployments - -#### icon - -The `icon` command generates icons for your project. - -| Flag | Type | Description | Default | -|--------------------|--------|------------------------------------------------------|-----------------------| -| `-example` | bool | Generates example icon file (appicon.png) | | -| `-input` | string | The input image file | | -| `-sizes` | string | The sizes to generate in .ico file (comma separated) | "256,128,64,48,32,16" | -| `-windowsFilename` | string | The output filename for the Windows icon | icons.ico | -| `-macFilename` | string | The output filename for the Mac icon bundle | icons.icns | - -```bash -wails generate icon -input myicon.png -sizes "32,64,128" -windowsFilename myicon.ico -macFilename myicon.icns -``` - -This will generate icons for mac and windows and save them in the current directory as `myicon.ico` -and `myicons.icns`. - -#### syso - -The `syso` command generates a Windows resource file (aka `.syso`). - -```bash -wails generate syso -``` - -| Flag | Type | Description | Default | -|-------------|--------|--------------------------------------------|------------------| -| `-example` | bool | Generates example manifest & info files | | -| `-manifest` | string | The manifest file | | -| `-info` | string | The info.json file | | -| `-icon` | string | The icon file | | -| `-out` | string | The output filename for the syso file | `wails.exe.syso` | -| `-arch` | string | The target architecture (amd64,arm64,386) | `runtime.GOOS` | - -If `-example` is provided, the command will generate example manifest and info files -in the current directory and exit. - -If `-manifest` is provided, the command will use the provided manifest file to generate -the syso file. - -If `-info` is provided, the command will use the provided info.json file to set the version -information in the syso file. - -NOTE: We use [winres](https://github.com/tc-hib/winres) to generate the syso file. Please -refer to the winres documentation for more information. - -NOTE: Whilst the tool will work for 32-bit Windows, it is not supported. Please use 64-bit. - -#### defaults - -```bash -wails generate defaults -``` -This will generate all the default assets and resources in the current directory. - -#### bindings - -```bash -wails generate bindings -``` - -Generates bindings and models for your bound Go methods and structs. \ No newline at end of file diff --git a/v3/cmd/wails/main.go b/v3/cmd/wails/main.go deleted file mode 100644 index 31002f6e0..000000000 --- a/v3/cmd/wails/main.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "os" - - "github.com/pterm/pterm" - - "github.com/leaanthony/clir" - "github.com/wailsapp/wails/v3/internal/commands" -) - -func main() { - app := clir.NewCli("wails", "The Wails CLI", "v3") - app.NewSubCommandFunction("build", "Build the project", commands.Build) - app.NewSubCommandFunction("init", "Initialise a new project", commands.Init) - task := app.NewSubCommand("task", "Run and list tasks") - var taskFlags commands.RunTaskOptions - task.AddFlags(&taskFlags) - task.Action(func() error { - return commands.RunTask(&taskFlags, task.OtherArgs()) - }) - task.LongDescription("\nUsage: wails task [taskname] [flags]\n\nTasks are defined in the `Taskfile.yaml` file. See https://taskfile.dev for more information.") - generate := app.NewSubCommand("generate", "Generation tools") - generate.NewSubCommandFunction("defaults", "Generate default build assets", commands.Defaults) - generate.NewSubCommandFunction("icons", "Generate icons", commands.GenerateIcons) - generate.NewSubCommandFunction("syso", "Generate Windows .syso file", commands.GenerateSyso) - generate.NewSubCommandFunction("bindings", "Generate bindings + models", commands.GenerateBindings) - plugin := app.NewSubCommand("plugin", "Plugin tools") - //plugin.NewSubCommandFunction("list", "List plugins", commands.PluginList) - plugin.NewSubCommandFunction("init", "Initialise a new plugin", commands.PluginInit) - //plugin.NewSubCommandFunction("add", "Add a plugin", commands.PluginAdd) - - err := app.Run() - if err != nil { - pterm.Error.Println(err) - os.Exit(1) - } -} diff --git a/v3/examples/binding/GreetService.go b/v3/examples/binding/GreetService.go deleted file mode 100644 index 389b51c09..000000000 --- a/v3/examples/binding/GreetService.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -type Person struct { - name string -} - -type GreetService struct { -} - -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -func (*GreetService) GreetPerson(person Person) string { - return "Hello " + person.name -} diff --git a/v3/examples/binding/assets/index.html b/v3/examples/binding/assets/index.html deleted file mode 100644 index f77c18294..000000000 --- a/v3/examples/binding/assets/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Title - - -HELLO! - - \ No newline at end of file diff --git a/v3/examples/binding/bindings_main.js b/v3/examples/binding/bindings_main.js deleted file mode 100644 index 064a7c135..000000000 --- a/v3/examples/binding/bindings_main.js +++ /dev/null @@ -1,43 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {main} from './models'; - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -/** - * GreetService.GreetPerson - * - * @param person {main.Person} - * @returns {Promise} - **/ -function GreetPerson(person) { - return wails.Call(GreetService("GreetPerson", person)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - GreetPerson, - }, -}; - diff --git a/v3/examples/binding/go.mod b/v3/examples/binding/go.mod deleted file mode 100644 index affecaa9f..000000000 --- a/v3/examples/binding/go.mod +++ /dev/null @@ -1,21 +0,0 @@ -module binding - -go 1.20 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) - -replace github.com/wailsapp/wails/v3 => ../.. - -replace github.com/wailsapp/wails/v2 => ../../../v2 diff --git a/v3/examples/binding/go.sum b/v3/examples/binding/go.sum deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/examples/binding/go.sum +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/examples/binding/main.go b/v3/examples/binding/main.go deleted file mode 100644 index ed0bd6331..000000000 --- a/v3/examples/binding/main.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed assets -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - }, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/examples/binding/models.ts b/v3/examples/binding/models.ts deleted file mode 100644 index 5d00fe3c2..000000000 --- a/v3/examples/binding/models.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; // Warning: this is unexported in the Go struct. - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - this.name = source["name"] - - } - } - -} diff --git a/v3/examples/build/README.md b/v3/examples/build/README.md deleted file mode 100644 index bb2b1761e..000000000 --- a/v3/examples/build/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Build - -Wails has adopted [Taskfile](https://taskfile.dev) as its build tool. This is optional -and any build tool can be used. However, Taskfile is a great tool, and we recommend it. - -The Wails CLI has built-in integration with Taskfile so the standalone version is not a -requirement. - -## Building - -To build the example, run: - -```bash -wails run -t build -``` diff --git a/v3/examples/build/Taskfile.yml b/v3/examples/build/Taskfile.yml deleted file mode 100644 index 67e1db618..000000000 --- a/v3/examples/build/Taskfile.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: '3' - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - build: - summary: Builds the application - cmds: - - task: pre-build - - go build -gcflags=all="-N -l" -o bin/testapp main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-prod: - summary: Creates a production build of the application - cmds: - - go build -tags production -ldflags="-w -s" -o bin/testapp - - package-darwin: - summary: Packages a production build of the application into a `.app` bundle - deps: - - build-prod - - generate-icons - cmds: - - mkdir -p buildtest.app/Contents/{MacOS,Resources} - - cp build/icons.icns buildtest.app/Contents/Resources - - cp bin/testapp buildtest.app/Contents/MacOS - - cp build/Info.plist buildtest.app/Contents \ No newline at end of file diff --git a/v3/examples/build/build/Info.dev.plist b/v3/examples/build/build/Info.dev.plist deleted file mode 100644 index d6d28b179..000000000 --- a/v3/examples/build/build/Info.dev.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My App - CFBundleExecutable - app - CFBundleIdentifier - com.wails.app - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - The ultimate thing - CFBundleShortVersionString - v1 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) Me - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - - - - \ No newline at end of file diff --git a/v3/examples/build/build/Info.plist b/v3/examples/build/build/Info.plist deleted file mode 100644 index 7f03f54e9..000000000 --- a/v3/examples/build/build/Info.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My App - CFBundleExecutable - app - CFBundleIdentifier - com.wails.app - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - The ultimate thing - CFBundleShortVersionString - v1 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) Me - - \ No newline at end of file diff --git a/v3/examples/build/build/appicon.png b/v3/examples/build/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/examples/build/build/appicon.png and /dev/null differ diff --git a/v3/examples/build/build/icons.icns b/v3/examples/build/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/examples/build/build/icons.icns and /dev/null differ diff --git a/v3/examples/build/build/icons.ico b/v3/examples/build/build/icons.ico deleted file mode 100644 index bfa0690b7..000000000 Binary files a/v3/examples/build/build/icons.ico and /dev/null differ diff --git a/v3/examples/build/build/info.json b/v3/examples/build/build/info.json deleted file mode 100644 index 1005eb5cb..000000000 --- a/v3/examples/build/build/info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "fixed": { - "file_version": "v1.0.0" - }, - "info": { - "0000": { - "ProductVersion": "v1.0.0", - "CompanyName": "My Company Name", - "FileDescription": "A thing that does a thing", - "LegalCopyright": "(c) 2023 My Company Name", - "ProductName": "My Product Name", - "Comments": "This is a comment" - } - } -} \ No newline at end of file diff --git a/v3/examples/build/build/wails.exe.manifest b/v3/examples/build/build/wails.exe.manifest deleted file mode 100644 index fb1ce5bde..000000000 --- a/v3/examples/build/build/wails.exe.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - true/pm - permonitorv2,permonitor - - - \ No newline at end of file diff --git a/v3/examples/build/buildtest.app/Contents/Info.plist b/v3/examples/build/buildtest.app/Contents/Info.plist deleted file mode 100644 index 7f03f54e9..000000000 --- a/v3/examples/build/buildtest.app/Contents/Info.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My App - CFBundleExecutable - app - CFBundleIdentifier - com.wails.app - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - The ultimate thing - CFBundleShortVersionString - v1 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) Me - - \ No newline at end of file diff --git a/v3/examples/build/buildtest.app/Contents/Resources/icons.icns b/v3/examples/build/buildtest.app/Contents/Resources/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/examples/build/buildtest.app/Contents/Resources/icons.icns and /dev/null differ diff --git a/v3/examples/build/main.go b/v3/examples/build/main.go deleted file mode 100755 index 48ba24088..000000000 --- a/v3/examples/build/main.go +++ /dev/null @@ -1,273 +0,0 @@ -package main - -import ( - _ "embed" - "fmt" - "log" - "math/rand" - "runtime" - "strconv" - "time" - - "github.com/wailsapp/wails/v3/pkg/events" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Name: "WebviewWindow Demo", - Description: "A demo of the WebviewWindow API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - app.On(events.Mac.ApplicationDidFinishLaunching, func() { - log.Println("ApplicationDidFinishLaunching") - }) - - currentWindow := func(fn func(window *application.WebviewWindow)) { - if app.CurrentWindow() != nil { - fn(app.CurrentWindow()) - } else { - println("Current WebviewWindow is nil") - } - } - - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - windowCounter := 1 - - // Let's make a "Demo" menu - myMenu := menu.AddSubmenu("New") - - myMenu.Add("New WebviewWindow"). - SetAccelerator("CmdOrCtrl+N"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindow(). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetURL("https://wails.io"). - Show() - windowCounter++ - }) - myMenu.Add("New Frameless WebviewWindow"). - SetAccelerator("CmdOrCtrl+F"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindow(). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetURL("https://wails.io"). - SetFrameless(true). - Show() - windowCounter++ - }) - if runtime.GOOS == "darwin" { - myMenu.Add("New WebviewWindow (MacTitleBarHiddenInset)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHiddenInset, - InvisibleTitleBarHeight: 25, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHiddenInset WebviewWindow example

"). - Show() - windowCounter++ - }) - myMenu.Add("New WebviewWindow (MacTitleBarHiddenInsetUnified)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHiddenInsetUnified WebviewWindow example

"). - Show() - windowCounter++ - }) - myMenu.Add("New WebviewWindow (MacTitleBarHidden)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHidden, - InvisibleTitleBarHeight: 25, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHidden WebviewWindow example

"). - Show() - windowCounter++ - }) - } - - sizeMenu := menu.AddSubmenu("Size") - sizeMenu.Add("Set Size (800,600)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetSize(800, 600) - }) - }) - - sizeMenu.Add("Set Size (Random)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetSize(rand.Intn(800)+200, rand.Intn(600)+200) - }) - }) - sizeMenu.Add("Set Min Size (200,200)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMinSize(200, 200) - }) - }) - sizeMenu.Add("Set Max Size (600,600)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetFullscreenButtonEnabled(false) - w.SetMaxSize(600, 600) - }) - }) - sizeMenu.Add("Get Current WebviewWindow Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - width, height := w.Size() - app.InfoDialog().SetTitle("Current WebviewWindow Size").SetMessage("Width: " + strconv.Itoa(width) + " Height: " + strconv.Itoa(height)).Show() - }) - }) - - sizeMenu.Add("Reset Min Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMinSize(0, 0) - }) - }) - - sizeMenu.Add("Reset Max Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMaxSize(0, 0) - w.SetFullscreenButtonEnabled(true) - }) - }) - positionMenu := menu.AddSubmenu("Position") - positionMenu.Add("Set Position (0,0)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetPosition(0, 0) - }) - }) - positionMenu.Add("Set Position (Random)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetPosition(rand.Intn(1000), rand.Intn(800)) - }) - }) - - positionMenu.Add("Get Position").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - x, y := w.Position() - app.InfoDialog().SetTitle("Current WebviewWindow Position").SetMessage("X: " + strconv.Itoa(x) + " Y: " + strconv.Itoa(y)).Show() - }) - }) - - positionMenu.Add("Center").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Center() - }) - }) - stateMenu := menu.AddSubmenu("State") - stateMenu.Add("Minimise (for 2 secs)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Minimise() - time.Sleep(2 * time.Second) - w.Restore() - }) - }) - stateMenu.Add("Maximise").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Maximise() - }) - }) - stateMenu.Add("Fullscreen").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Fullscreen() - }) - }) - stateMenu.Add("UnFullscreen").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.UnFullscreen() - }) - }) - stateMenu.Add("Restore").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Restore() - }) - }) - stateMenu.Add("Hide (for 2 seconds)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Hide() - time.Sleep(2 * time.Second) - w.Show() - }) - }) - stateMenu.Add("Always on Top").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetAlwaysOnTop(true) - }) - }) - stateMenu.Add("Not always on Top").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetAlwaysOnTop(false) - }) - }) - stateMenu.Add("Google.com").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetURL("https://google.com") - }) - }) - stateMenu.Add("wails.io").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetURL("https://wails.io") - }) - }) - stateMenu.Add("Get Primary Screen").OnClick(func(ctx *application.Context) { - screen, err := app.GetPrimaryScreen() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle("Primary Screen").SetMessage(msg).Show() - }) - stateMenu.Add("Get Screens").OnClick(func(ctx *application.Context) { - screens, err := app.GetScreens() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - for _, screen := range screens { - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show() - } - }) - stateMenu.Add("Get Screen for WebviewWindow").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - screen, err := w.GetScreen() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show() - }) - }) - app.NewWebviewWindow() - - app.SetMenu(menu) - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/examples/clipboard/main.go b/v3/examples/clipboard/main.go deleted file mode 100644 index c8e0e465b..000000000 --- a/v3/examples/clipboard/main.go +++ /dev/null @@ -1,69 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "time" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - - app := application.New(application.Options{ - Name: "Clipboard Demo", - Description: "A demo of the clipboard API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - setClipboardMenu := menu.AddSubmenu("Set Clipboard") - setClipboardMenu.Add("Set Text 'Hello'").OnClick(func(ctx *application.Context) { - success := app.Clipboard().SetText("Hello") - if !success { - app.InfoDialog().SetMessage("Failed to set clipboard text").Show() - } - }) - setClipboardMenu.Add("Set Text 'World'").OnClick(func(ctx *application.Context) { - success := app.Clipboard().SetText("World") - if !success { - app.InfoDialog().SetMessage("Failed to set clipboard text").Show() - } - }) - setClipboardMenu.Add("Set Text (current time)").OnClick(func(ctx *application.Context) { - success := app.Clipboard().SetText(time.Now().String()) - if !success { - app.InfoDialog().SetMessage("Failed to set clipboard text").Show() - } - }) - getClipboardMenu := menu.AddSubmenu("Get Clipboard") - getClipboardMenu.Add("Get Text").OnClick(func(ctx *application.Context) { - result := app.Clipboard().Text() - app.InfoDialog().SetMessage("Got:\n\n" + result).Show() - }) - - clearClipboardMenu := menu.AddSubmenu("Clear Clipboard") - clearClipboardMenu.Add("Clear Text").OnClick(func(ctx *application.Context) { - success := app.Clipboard().SetText("") - if success { - app.InfoDialog().SetMessage("Clipboard text cleared").Show() - } else { - app.InfoDialog().SetMessage("Clipboard text not cleared").Show() - } - }) - - app.SetMenu(menu) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/contextmenus/assets/index.html b/v3/examples/contextmenus/assets/index.html deleted file mode 100644 index adb32d775..000000000 --- a/v3/examples/contextmenus/assets/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Title - - - - -

Events Demo

-
-
-

1

-
-
-

2

-
-
-

3

-
-
- - - - - \ No newline at end of file diff --git a/v3/examples/contextmenus/main.go b/v3/examples/contextmenus/main.go deleted file mode 100644 index a94b9d340..000000000 --- a/v3/examples/contextmenus/main.go +++ /dev/null @@ -1,67 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "fmt" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed assets -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Context Menu Demo", - Description: "A demo of the Context Menu API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - mainWindow := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Context Menu Demo", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Context Menu Demo", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - - contextMenu := app.NewMenu() - contextMenu.Add("Click Me").OnClick(func(data *application.Context) { - fmt.Printf("Context menu data: %+v\n", data.ContextMenuData()) - }) - - globalContextMenu := app.NewMenu() - globalContextMenu.Add("Default context menu item").OnClick(func(data *application.Context) { - fmt.Printf("Context menu data: %+v\n", data.ContextMenuData()) - }) - - // Registering the menu with a window will make it available to that window only - mainWindow.RegisterContextMenu("test", contextMenu) - - // Registering the menu with the app will make it available to all windows - app.RegisterContextMenu("test", globalContextMenu) - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/dialogs/main.go b/v3/examples/dialogs/main.go deleted file mode 100644 index ff55949ae..000000000 --- a/v3/examples/dialogs/main.go +++ /dev/null @@ -1,333 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "os" - "runtime" - "strings" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - - app := application.New(application.Options{ - Name: "Dialogs Demo", - Description: "A demo of the dialogs API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - // Let's make a "Demo" menu - infoMenu := menu.AddSubmenu("Info") - infoMenu.Add("Info").OnClick(func(ctx *application.Context) { - dialog := app.InfoDialog() - dialog.SetTitle("Custom Title") - dialog.SetMessage("This is a custom message") - dialog.Show() - }) - infoMenu.Add("Info (Title only)").OnClick(func(ctx *application.Context) { - dialog := app.InfoDialog() - dialog.SetTitle("Custom Title") - dialog.Show() - }) - infoMenu.Add("Info (Message only)").OnClick(func(ctx *application.Context) { - dialog := app.InfoDialog() - dialog.SetMessage("This is a custom message") - dialog.Show() - }) - infoMenu.Add("Info (Custom Icon)").OnClick(func(ctx *application.Context) { - dialog := app.InfoDialog() - dialog.SetTitle("Custom Icon Example") - dialog.SetMessage("Using a custom icon") - dialog.SetIcon(application.DefaultApplicationIcon) - dialog.Show() - }) - - questionMenu := menu.AddSubmenu("Question") - questionMenu.Add("Question (No default)").OnClick(func(ctx *application.Context) { - dialog := app.QuestionDialog() - dialog.SetMessage("No default button") - dialog.AddButton("Yes") - dialog.AddButton("No") - dialog.Show() - }) - questionMenu.Add("Question (With Default)").OnClick(func(ctx *application.Context) { - dialog := app.QuestionDialog() - dialog.SetTitle("Quit") - dialog.SetMessage("You have unsaved work. Are you sure you want to quit?") - dialog.AddButton("Yes").OnClick(func() { - app.Quit() - }) - no := dialog.AddButton("No") - dialog.SetDefaultButton(no) - dialog.Show() - }) - questionMenu.Add("Question (With Cancel)").OnClick(func(ctx *application.Context) { - dialog := app.QuestionDialog(). - SetTitle("Update"). - SetMessage("The cancel button is selected when pressing escape") - download := dialog.AddButton("📥 Download") - download.OnClick(func() { - app.InfoDialog().SetMessage("Downloading...").Show() - }) - no := dialog.AddButton("Cancel") - dialog.SetDefaultButton(download) - dialog.SetCancelButton(no) - dialog.Show() - }) - questionMenu.Add("Question (Custom Icon)").OnClick(func(ctx *application.Context) { - dialog := app.QuestionDialog() - dialog.SetTitle("Custom Icon Example") - dialog.SetMessage("Using a custom icon") - dialog.SetIcon(application.WailsLogoWhiteTransparent) - dialog.SetDefaultButton(dialog.AddButton("I like it!")) - dialog.AddButton("Not so keen...") - dialog.Show() - }) - - warningMenu := menu.AddSubmenu("Warning") - warningMenu.Add("Warning").OnClick(func(ctx *application.Context) { - dialog := app.WarningDialog() - dialog.SetTitle("Custom Title") - dialog.SetMessage("This is a custom message") - dialog.Show() - }) - warningMenu.Add("Warning (Title only)").OnClick(func(ctx *application.Context) { - dialog := app.WarningDialog() - dialog.SetTitle("Custom Title") - dialog.Show() - }) - warningMenu.Add("Warning (Message only)").OnClick(func(ctx *application.Context) { - dialog := app.WarningDialog() - dialog.SetMessage("This is a custom message") - dialog.Show() - }) - warningMenu.Add("Warning (Custom Icon)").OnClick(func(ctx *application.Context) { - dialog := app.WarningDialog() - dialog.SetTitle("Custom Icon Example") - dialog.SetMessage("Using a custom icon") - dialog.SetIcon(application.DefaultApplicationIcon) - dialog.Show() - }) - - errorMenu := menu.AddSubmenu("Error") - errorMenu.Add("Error").OnClick(func(ctx *application.Context) { - dialog := app.ErrorDialog() - dialog.SetTitle("Ooops") - dialog.SetMessage("I accidentally the whole of Twitter") - dialog.Show() - }) - errorMenu.Add("Error (Title Only)").OnClick(func(ctx *application.Context) { - dialog := app.ErrorDialog() - dialog.SetTitle("Custom Title") - dialog.Show() - }) - errorMenu.Add("Error (Custom Message)").OnClick(func(ctx *application.Context) { - dialog := app.ErrorDialog() - dialog.SetMessage("This is a custom message") - dialog.Show() - }) - errorMenu.Add("Error (Custom Icon)").OnClick(func(ctx *application.Context) { - dialog := app.ErrorDialog() - dialog.SetTitle("Custom Icon Example") - dialog.SetMessage("Using a custom icon") - dialog.SetIcon(application.WailsLogoWhite) - dialog.Show() - }) - - openMenu := menu.AddSubmenu("Open") - openMenu.Add("Open File").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseFiles(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No file selected").Show() - } - }) - openMenu.Add("Open File (Show Hidden Files)").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseFiles(true). - CanCreateDirectories(true). - ShowHiddenFiles(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No file selected").Show() - } - }) - openMenu.Add("Open File (Attach to window)").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseFiles(true). - CanCreateDirectories(true). - ShowHiddenFiles(true). - AttachToWindow(app.CurrentWindow()). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No file selected").Show() - } - }) - openMenu.Add("Open Multiple Files (Show Hidden Files)").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseFiles(true). - CanCreateDirectories(true). - ShowHiddenFiles(true). - PromptForMultipleSelection() - if len(result) > 0 { - app.InfoDialog().SetMessage(strings.Join(result, ",")).Show() - } else { - app.InfoDialog().SetMessage("No file selected").Show() - } - }) - openMenu.Add("Open Directory").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseDirectories(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No directory selected").Show() - } - }) - openMenu.Add("Open Directory (Create Directories)").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseDirectories(true). - CanCreateDirectories(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No directory selected").Show() - } - }) - openMenu.Add("Open Directory (Resolves Aliases)").OnClick(func(ctx *application.Context) { - result, _ := app.OpenFileDialog(). - CanChooseDirectories(true). - CanCreateDirectories(true). - ResolvesAliases(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No directory selected").Show() - } - }) - openMenu.Add("Open File/Directory (Set Title)").OnClick(func(ctx *application.Context) { - dialog := app.OpenFileDialog(). - CanChooseDirectories(true). - CanCreateDirectories(true). - ResolvesAliases(true) - if runtime.GOOS == "darwin" { - dialog.SetMessage("Select a file/directory") - } else { - dialog.SetTitle("Select a file/directory") - } - - result, _ := dialog.PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No file/directory selected").Show() - } - }) - openMenu.Add("Open (Full Example)").OnClick(func(ctx *application.Context) { - cwd, _ := os.Getwd() - dialog := app.OpenFileDialog(). - SetTitle("Select a file"). - SetMessage("Select a file to open"). - SetButtonText("Let's do this!"). - SetDirectory(cwd). - CanCreateDirectories(true). - ResolvesAliases(true). - AllowsOtherFileTypes(true). - TreatsFilePackagesAsDirectories(true). - ShowHiddenFiles(true). - CanSelectHiddenExtension(true). - AddFilter("Text Files", "*.txt; *.md"). - AddFilter("Video Files", "*.mov; *.mp4; *.avi") - - if runtime.GOOS == "darwin" { - dialog.SetMessage("Select a file") - } else { - dialog.SetTitle("Select a file") - } - - result, _ := dialog.PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } else { - app.InfoDialog().SetMessage("No file selected").Show() - } - }) - - saveMenu := menu.AddSubmenu("Save") - saveMenu.Add("Select File (Defaults)").OnClick(func(ctx *application.Context) { - result, _ := app.SaveFileDialog(). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } - }) - saveMenu.Add("Select File (Attach To WebviewWindow)").OnClick(func(ctx *application.Context) { - result, _ := app.SaveFileDialog(). - AttachToWindow(app.CurrentWindow()). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } - }) - saveMenu.Add("Select File (Show Hidden Files)").OnClick(func(ctx *application.Context) { - result, _ := app.SaveFileDialog(). - ShowHiddenFiles(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } - }) - saveMenu.Add("Select File (Cannot Create Directories)").OnClick(func(ctx *application.Context) { - result, _ := app.SaveFileDialog(). - CanCreateDirectories(false). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } - }) - saveMenu.Add("Select File (Full Example)").OnClick(func(ctx *application.Context) { - result, _ := app.SaveFileDialog(). - CanCreateDirectories(false). - ShowHiddenFiles(true). - SetMessage("Select a file"). - SetDirectory("/Applications"). - SetButtonText("Let's do this!"). - SetFilename("README.md"). - HideExtension(true). - AllowsOtherFileTypes(true). - TreatsFilePackagesAsDirectories(true). - ShowHiddenFiles(true). - PromptForSingleSelection() - if result != "" { - app.InfoDialog().SetMessage(result).Show() - } - }) - - app.SetMenu(menu) - - app.NewWebviewWindow() - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/drag-n-drop/assets/index.html b/v3/examples/drag-n-drop/assets/index.html deleted file mode 100644 index 1ec2339dd..000000000 --- a/v3/examples/drag-n-drop/assets/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Title - - - -

Drag-n-drop Demo

-
-Drop Files onto this window... -
- - - - - \ No newline at end of file diff --git a/v3/examples/drag-n-drop/main.go b/v3/examples/drag-n-drop/main.go deleted file mode 100644 index 1346a2bac..000000000 --- a/v3/examples/drag-n-drop/main.go +++ /dev/null @@ -1,52 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/pkg/events" -) - -//go:embed assets -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Drag-n-drop Demo", - Description: "A demo of the Drag-n-drop API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - window := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Drag-n-drop Demo", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - EnableDragAndDrop: true, - }) - - window.On(events.FilesDropped, func(ctx *application.WindowEventContext) { - files := ctx.DroppedFiles() - app.Events.Emit(&application.WailsEvent{ - Name: "files", - Data: files, - }) - log.Printf("[Go] FilesDropped received: %+v\n", files) - }) - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/events/assets/index.html b/v3/examples/events/assets/index.html deleted file mode 100644 index 20993e735..000000000 --- a/v3/examples/events/assets/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Title - - - -

Events Demo

-
-The main program emits an event every 10s which will be displayed in the section below. -To send an event from this window, click here: -
- - - - - \ No newline at end of file diff --git a/v3/examples/events/main.go b/v3/examples/events/main.go deleted file mode 100644 index 7f0c23653..000000000 --- a/v3/examples/events/main.go +++ /dev/null @@ -1,66 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - "time" - - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/pkg/events" -) - -//go:embed assets -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Events Demo", - Description: "A demo of the Events API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - app.Events.On("myevent", func(e *application.WailsEvent) { - log.Printf("[Go] WailsEvent received: %+v\n", e) - }) - - app.On(events.Mac.ApplicationDidFinishLaunching, func() { - for { - log.Println("Sending event") - app.Events.Emit(&application.WailsEvent{ - Name: "myevent", - Data: "hello", - }) - time.Sleep(10 * time.Second) - } - }) - - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Events Demo", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Events Demo", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/kitchensink/main.go b/v3/examples/kitchensink/main.go deleted file mode 100644 index 509da3415..000000000 --- a/v3/examples/kitchensink/main.go +++ /dev/null @@ -1,224 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "runtime" - "sync" - "time" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Name: "Menu Demo", - Description: "A demo of the menu system", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - /* - app.On(events.Mac.ApplicationDidFinishLaunching, func() { - println("ApplicationDidFinishLaunching") - }) - app.On(events.Mac.ApplicationWillTerminate, func() { - println("ApplicationWillTerminate") - }) - app.On(events.Mac.ApplicationDidBecomeActive, func() { - println("ApplicationDidBecomeActive") - }) - app.On(events.Mac.ApplicationDidChangeBackingProperties, func() { - println("ApplicationDidChangeBackingProperties") - }) - - app.On(events.Mac.ApplicationDidChangeEffectiveAppearance, func() { - println("ApplicationDidChangeEffectiveAppearance") - }) - app.On(events.Mac.ApplicationDidHide, func() { - println("ApplicationDidHide") - }) - - */ - - menuCallback := func(ctx *application.Context) { - menuItem := ctx.ClickedMenuItem() - menuItem.SetLabel("Clicked!") - } - - radioCallback := func(ctx *application.Context) { - menuItem := ctx.ClickedMenuItem() - menuItem.SetLabel(menuItem.Label() + "!") - } - - myMenu := app.NewMenu() - file1 := myMenu.Add("File") - file1.SetTooltip("Create New Tray Menu") - file1.OnClick(menuCallback) - myMenu.Add("Create New Tray Menu"). - SetAccelerator("CmdOrCtrl+N"). - SetTooltip("ROFLCOPTER!!!!"). - OnClick(func(ctx *application.Context) { - mySystray := app.NewSystemTray() - mySystray.SetLabel("Wails") - if runtime.GOOS == "darwin" { - mySystray.SetTemplateIcon(application.DefaultMacTemplateIcon) - } else { - mySystray.SetIcon(application.DefaultApplicationIcon) - } - myMenu := app.NewMenu() - myMenu.Add("Item 1") - myMenu.AddSeparator() - myMenu.Add("Kill this menu").OnClick(func(ctx *application.Context) { - mySystray.Destroy() - }) - mySystray.SetMenu(myMenu) - - }) - myMenu.Add("Not Enabled").SetEnabled(false) - myMenu.AddSeparator() - myMenu.AddCheckbox("My checkbox", true).OnClick(menuCallback) - myMenu.AddSeparator() - myMenu.AddRadio("Radio 1", true).OnClick(radioCallback) - myMenu.AddRadio("Radio 2", false).OnClick(radioCallback) - myMenu.AddRadio("Radio 3", false).OnClick(radioCallback) - - submenu := myMenu.AddSubmenu("Submenu") - submenu.Add("Submenu item 1").OnClick(menuCallback) - submenu.Add("Submenu item 2").OnClick(menuCallback) - submenu.Add("Submenu item 3").OnClick(menuCallback) - myMenu.AddSeparator() - file4 := myMenu.Add("File 4").OnClick(func(*application.Context) { - println("File 4 clicked") - }) - - myMenu.Add("Click to toggle").OnClick(func(*application.Context) { - enabled := file4.Enabled() - println("Enabled: ", enabled) - file4.SetEnabled(!enabled) - }) - myMenu.Add("File 5").OnClick(menuCallback) - - mySystray := app.NewSystemTray() - mySystray.SetLabel("Wails is awesome") - if runtime.GOOS == "darwin" { - mySystray.SetTemplateIcon(application.DefaultMacTemplateIcon) - } else { - mySystray.SetIcon(application.DefaultApplicationIcon) - } - mySystray.SetMenu(myMenu) - mySystray.SetIconPosition(application.NSImageLeading) - - myWindow := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Kitchen Sink", - Width: 600, - Height: 400, - AlwaysOnTop: true, - DisableResize: false, - BackgroundColour: &application.RGBA{ - Red: 255, - Green: 255, - Blue: 255, - Alpha: 30, - }, - StartState: application.WindowStateMaximised, - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - Appearance: application.NSAppearanceNameDarkAqua, - }, - }) - /* - myWindow.On(events.Mac.WindowWillClose, func() { - println(myWindow.ID(), "WindowWillClose") - }) - myWindow.On(events.Mac.WindowDidResize, func() { - //w, h := myWindow.Size() - //println(myWindow.ID(), "WindowDidResize", w, h) - }) - myWindow.On(events.Mac.WindowDidMove, func() { - //x, y := myWindow.Position() - //println(myWindow.ID(), "WindowDidMove", x, y) - }) - myWindow.On(events.Mac.WindowDidMiniaturize, func() { - println(myWindow.ID(), "WindowDidMiniaturize") - }) - myWindow.On(events.Mac.WindowDidDeminiaturize, func() { - println(myWindow.ID(), "WindowDidDeminiaturize") - }) - myWindow.On(events.Mac.WindowDidBecomeKey, func() { - println(myWindow.ID(), "WindowDidBecomeKey") - }) - myWindow.On(events.Mac.WindowDidResignKey, func() { - println(myWindow.ID(), "WindowDidResignKey") - }) - myWindow.On(events.Mac.WindowDidBecomeMain, func() { - println(myWindow.ID(), "WindowDidBecomeMain") - }) - myWindow.On(events.Mac.WindowDidResignMain, func() { - println(myWindow.ID(), "WindowDidResignMain") - }) - myWindow.On(events.Mac.WindowWillEnterFullScreen, func() { - println(myWindow.ID(), "WindowWillEnterFullScreen") - }) - myWindow.On(events.Mac.WindowDidEnterFullScreen, func() { - println(myWindow.ID(), "WindowDidEnterFullScreen") - }) - myWindow.On(events.Mac.WindowWillExitFullScreen, func() { - println(myWindow.ID(), "WindowWillExitFullScreen") - }) - myWindow.On(events.Mac.WindowDidExitFullScreen, func() { - println(myWindow.ID(), "WindowDidExitFullScreen") - }) - myWindow.On(events.Mac.WindowWillEnterVersionBrowser, func() { - println(myWindow.ID(), "WindowWillEnterVersionBrowser") - }) - myWindow.On(events.Mac.WindowDidEnterVersionBrowser, func() { - println(myWindow.ID(), "WindowDidEnterVersionBrowser") - }) - myWindow.On(events.Mac.WindowWillExitVersionBrowser, func() { - println(myWindow.ID(), "WindowWillExitVersionBrowser") - }) - myWindow.On(events.Mac.WindowDidExitVersionBrowser, func() { - println(myWindow.ID(), "WindowDidExitVersionBrowser") - }) - */ - var myWindow2 *application.WebviewWindow - var myWindow2Lock sync.RWMutex - myWindow2 = app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "#2", - Width: 1024, - Height: 768, - AlwaysOnTop: false, - URL: "https://google.com", - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - }, - }) - //myWindow2.On(events.Mac.WindowDidMove, func() { - // myWindow2Lock.RLock() - // x, y := myWindow2.Position() - // println(myWindow2.ID(), "WindowDidMove: ", x, y) - // myWindow2Lock.RUnlock() - //}) - // - - go func() { - time.Sleep(5 * time.Second) - myWindow2Lock.RLock() - myWindow.SetTitle("Wooooo") - myWindow.SetAlwaysOnTop(true) - myWindow2.SetTitle("OMG") - myWindow2.SetURL("https://wails.io") - myWindow.SetMinSize(600, 600) - myWindow.SetMaxSize(650, 650) - myWindow.Center() - myWindow2Lock.RUnlock() - - }() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/examples/menu/main.go b/v3/examples/menu/main.go deleted file mode 100644 index 3ca15cf47..000000000 --- a/v3/examples/menu/main.go +++ /dev/null @@ -1,95 +0,0 @@ -package main - -import ( - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - - app := application.New(application.Options{ - Name: "Menu Demo", - Description: "A demo of the menu system", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - // Let's make a "Demo" menu - myMenu := menu.AddSubmenu("Demo") - - // Disabled menu item - myMenu.Add("Not Enabled").SetEnabled(false) - - // Click callbacks - myMenu.Add("Click Me!").OnClick(func(ctx *application.Context) { - ctx.ClickedMenuItem().SetLabel("Thanks mate!") - }) - - // You can control the current window from the menu - myMenu.Add("Lock WebviewWindow Resize").OnClick(func(ctx *application.Context) { - if app.CurrentWindow().Resizable() { - app.CurrentWindow().SetResizable(false) - ctx.ClickedMenuItem().SetLabel("Unlock WebviewWindow Resize") - } else { - app.CurrentWindow().SetResizable(true) - ctx.ClickedMenuItem().SetLabel("Lock WebviewWindow Resize") - } - }) - - myMenu.AddSeparator() - - // Checkboxes will tell you their new state so you don't need to track it - myMenu.AddCheckbox("My checkbox", true).OnClick(func(context *application.Context) { - println("Clicked checkbox. Checked:", context.ClickedMenuItem().Checked()) - }) - myMenu.AddSeparator() - - // Callbacks can be shared. This is useful for radio groups - radioCallback := func(ctx *application.Context) { - menuItem := ctx.ClickedMenuItem() - menuItem.SetLabel(menuItem.Label() + "!") - } - - // Radio groups are created implicitly by placing radio items next to each other in a menu - myMenu.AddRadio("Radio 1", true).OnClick(radioCallback) - myMenu.AddRadio("Radio 2", false).OnClick(radioCallback) - myMenu.AddRadio("Radio 3", false).OnClick(radioCallback) - - // Submenus are also supported - submenu := myMenu.AddSubmenu("Submenu") - submenu.Add("Submenu item 1") - submenu.Add("Submenu item 2") - submenu.Add("Submenu item 3") - - myMenu.AddSeparator() - - beatles := myMenu.Add("Hello").OnClick(func(*application.Context) { - println("The beatles would be proud") - }) - myMenu.Add("Toggle the menuitem above").OnClick(func(*application.Context) { - if beatles.Enabled() { - beatles.SetEnabled(false) - beatles.SetLabel("Goodbye") - } else { - beatles.SetEnabled(true) - beatles.SetLabel("Hello") - } - }) - - app.SetMenu(menu) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/plain/main.go b/v3/examples/plain/main.go deleted file mode 100644 index bc8406e82..000000000 --- a/v3/examples/plain/main.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "net/http" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Name: "Plain", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - w.Write([]byte(`Plain Bundle

Plain Bundle

This is a plain bundle. It has no frontend code but this was Served by the AssetServer's Handler.



Clicking this paragraph emits an event...

`)) - }), - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; user-select: none; -ms-user-select: none; -webkit-user-select: none; } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - }, - URL: "/", - }) - - app.Events.On("clicked", func(_ *application.WailsEvent) { - println("clicked") - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/examples/plugins/Taskfile.yml b/v3/examples/plugins/Taskfile.yml deleted file mode 100644 index 3c88c18c3..000000000 --- a/v3/examples/plugins/Taskfile.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: '3' - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - build: - summary: Builds the application - cmds: - - task: pre-build - - go build -gcflags=all="-N -l" -o bin/testapp main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - cmds: - # Generates both .ico and .icns files - - wails generate icons -input build/appicon.png - - build-prod: - summary: Creates a production build of the application - cmds: - - go build -tags production -ldflags="-w -s" -o bin/testapp - - package-darwin: - summary: Packages a production build of the application into a `.app` bundle - deps: - - build-prod - - generate-icons - cmds: - - mkdir -p buildtest.app/Contents/{MacOS,Resources} - - cp build/icons.icns buildtest.app/Contents/Resources - - cp bin/testapp buildtest.app/Contents/MacOS - - cp build/Info.plist buildtest.app/Contents \ No newline at end of file diff --git a/v3/examples/plugins/assets/index.html b/v3/examples/plugins/assets/index.html deleted file mode 100644 index f77c18294..000000000 --- a/v3/examples/plugins/assets/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Title - - -HELLO! - - \ No newline at end of file diff --git a/v3/examples/plugins/build/Info.dev.plist b/v3/examples/plugins/build/Info.dev.plist deleted file mode 100644 index d6d28b179..000000000 --- a/v3/examples/plugins/build/Info.dev.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My App - CFBundleExecutable - app - CFBundleIdentifier - com.wails.app - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - The ultimate thing - CFBundleShortVersionString - v1 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) Me - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - - - - \ No newline at end of file diff --git a/v3/examples/plugins/build/Info.plist b/v3/examples/plugins/build/Info.plist deleted file mode 100644 index ab571ad4f..000000000 --- a/v3/examples/plugins/build/Info.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My App - CFBundleExecutable - testapp - CFBundleIdentifier - com.wails.app - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - The ultimate thing - CFBundleShortVersionString - v1 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) Me - - \ No newline at end of file diff --git a/v3/examples/plugins/build/appicon.png b/v3/examples/plugins/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/examples/plugins/build/appicon.png and /dev/null differ diff --git a/v3/examples/plugins/build/icons.icns b/v3/examples/plugins/build/icons.icns deleted file mode 100644 index e69de29bb..000000000 diff --git a/v3/examples/plugins/build/icons.ico b/v3/examples/plugins/build/icons.ico deleted file mode 100644 index e69de29bb..000000000 diff --git a/v3/examples/plugins/build/info.json b/v3/examples/plugins/build/info.json deleted file mode 100644 index 1005eb5cb..000000000 --- a/v3/examples/plugins/build/info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "fixed": { - "file_version": "v1.0.0" - }, - "info": { - "0000": { - "ProductVersion": "v1.0.0", - "CompanyName": "My Company Name", - "FileDescription": "A thing that does a thing", - "LegalCopyright": "(c) 2023 My Company Name", - "ProductName": "My Product Name", - "Comments": "This is a comment" - } - } -} \ No newline at end of file diff --git a/v3/examples/plugins/build/wails.exe.manifest b/v3/examples/plugins/build/wails.exe.manifest deleted file mode 100644 index fb1ce5bde..000000000 --- a/v3/examples/plugins/build/wails.exe.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - true/pm - permonitorv2,permonitor - - - \ No newline at end of file diff --git a/v3/examples/plugins/go.mod b/v3/examples/plugins/go.mod deleted file mode 100644 index dd1ddaacd..000000000 --- a/v3/examples/plugins/go.mod +++ /dev/null @@ -1,41 +0,0 @@ -module plugin_demo - -go 1.20 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/tools v0.1.12 // indirect - lukechampine.com/uint128 v1.2.0 // indirect - modernc.org/cc/v3 v3.40.0 // indirect - modernc.org/ccgo/v3 v3.16.13 // indirect - modernc.org/libc v1.22.3 // indirect - modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.5.0 // indirect - modernc.org/opt v0.1.3 // indirect - modernc.org/sqlite v1.21.0 // indirect - modernc.org/strutil v1.1.3 // indirect - modernc.org/token v1.0.1 // indirect -) - -replace github.com/wailsapp/wails/v3 => ../.. - -replace github.com/wailsapp/wails/v2 => ../../../v2 diff --git a/v3/examples/plugins/go.sum b/v3/examples/plugins/go.sum deleted file mode 100644 index 9477ac48a..000000000 --- a/v3/examples/plugins/go.sum +++ /dev/null @@ -1,83 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc= -github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= -modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY= -modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow= -modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws= -modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= -modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= diff --git a/v3/examples/plugins/icon.ico b/v3/examples/plugins/icon.ico deleted file mode 100644 index bfa0690b7..000000000 Binary files a/v3/examples/plugins/icon.ico and /dev/null differ diff --git a/v3/examples/plugins/icons.icns b/v3/examples/plugins/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/examples/plugins/icons.icns and /dev/null differ diff --git a/v3/examples/plugins/main.go b/v3/examples/plugins/main.go deleted file mode 100644 index d5c0b66c1..000000000 --- a/v3/examples/plugins/main.go +++ /dev/null @@ -1,58 +0,0 @@ -package main - -import ( - "embed" - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/plugins/browser" - "github.com/wailsapp/wails/v3/plugins/kvstore" - "github.com/wailsapp/wails/v3/plugins/log" - "github.com/wailsapp/wails/v3/plugins/single_instance" - "github.com/wailsapp/wails/v3/plugins/sqlite" - "github.com/wailsapp/wails/v3/plugins/start_at_login" - "os" - "plugin_demo/plugins/hashes" -) - -//go:embed assets/* -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Plugin Demo", - Description: "A demo of the plugins API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Plugins: map[string]application.Plugin{ - "hashes": hashes.NewPlugin(), - "browser": browser.NewPlugin(), - "log": log.NewPlugin(), - "sqlite": sqlite.NewPlugin(&sqlite.Config{ - DBFile: "test.db", - }), - "kvstore": kvstore.NewPlugin(&kvstore.Config{ - Filename: "store.json", - AutoSave: true, - }), - "single_instance": single_instance.NewPlugin(&single_instance.Config{ - // When true, the original app will be activated when a second instance is launched - ActivateAppOnSubsequentLaunch: true, - }), - "start_at_login": start_at_login.NewPlugin(), - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - window := app.NewWebviewWindow() - window.ToggleDevTools() - - err := app.Run() - - if err != nil { - println(err.Error()) - os.Exit(1) - } -} diff --git a/v3/examples/plugins/plugins/hashes/README.md b/v3/examples/plugins/plugins/hashes/README.md deleted file mode 100644 index 054f5f451..000000000 --- a/v3/examples/plugins/plugins/hashes/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Hashes Plugin - -This example plugin provides a way to generate hashes of strings. - -## Usage - -Add the plugin to the `Plugins` option in the Applications options: - -```go - Plugins: map[string]application.Plugin{ - "hashes": hashes.NewPlugin(), - }, -``` - -You can then call the Generate method from the frontend: - -```js - wails.Plugin("hashes","Generate","hello world").then((result) => console.log(result)) -``` - -This method returns a struct with the following fields: - -```typescript - interface Hashes { - md5: string; - sha1: string; - sha256: string; - } -``` - -A TypeScript definition file is provided for this interface. diff --git a/v3/examples/plugins/plugins/hashes/hashes.d.ts b/v3/examples/plugins/plugins/hashes/hashes.d.ts deleted file mode 100644 index 72b88e0f4..000000000 --- a/v3/examples/plugins/plugins/hashes/hashes.d.ts +++ /dev/null @@ -1,8 +0,0 @@ - -export namespace HashesPlugin { - export interface Hashes { - md5: string; - sha1: string; - sha256: string; - } -} \ No newline at end of file diff --git a/v3/examples/plugins/plugins/hashes/hashes.js b/v3/examples/plugins/plugins/hashes/hashes.js deleted file mode 100644 index f9f8cf3b0..000000000 --- a/v3/examples/plugins/plugins/hashes/hashes.js +++ /dev/null @@ -1,4 +0,0 @@ -// Generate takes a string and returns a number of hashes for it -export function Generate(input) { - return wails.Plugin("hashes","Generate",input); -} \ No newline at end of file diff --git a/v3/examples/plugins/plugins/hashes/plugin.go b/v3/examples/plugins/plugins/hashes/plugin.go deleted file mode 100644 index afdcec84a..000000000 --- a/v3/examples/plugins/plugins/hashes/plugin.go +++ /dev/null @@ -1,58 +0,0 @@ -package hashes - -import ( - "crypto/md5" - "crypto/sha1" - "crypto/sha256" - "encoding/hex" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -// ---------------- Plugin Setup ---------------- - -type Plugin struct{} - -func NewPlugin() *Plugin { - return &Plugin{} -} - -func (r *Plugin) Shutdown() {} - -func (r *Plugin) Name() string { - return "Hashes Plugin" -} - -func (r *Plugin) Init(_ *application.App) error { - return nil -} - -func (r *Plugin) CallableByJS() []string { - return []string{ - "Generate", - } -} - -func (r *Plugin) InjectJS() string { - return "" -} - -// ---------------- Plugin Methods ---------------- - -type Hashes struct { - MD5 string `json:"md5"` - SHA1 string `json:"sha1"` - SHA256 string `json:"sha256"` -} - -func (r *Plugin) Generate(s string) Hashes { - md5Hash := md5.Sum([]byte(s)) - sha1Hash := sha1.Sum([]byte(s)) - sha256Hash := sha256.Sum256([]byte(s)) - - return Hashes{ - MD5: hex.EncodeToString(md5Hash[:]), - SHA1: hex.EncodeToString(sha1Hash[:]), - SHA256: hex.EncodeToString(sha256Hash[:]), - } -} diff --git a/v3/examples/plugins/plugins/hashes/plugin.toml b/v3/examples/plugins/plugins/hashes/plugin.toml deleted file mode 100644 index 7835721be..000000000 --- a/v3/examples/plugins/plugins/hashes/plugin.toml +++ /dev/null @@ -1,10 +0,0 @@ -# This is the plugin definition file for the "Hashes" plugin. - -Name = "Hashes" -Description = "Provides a method to generate a number of hashes." -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io" -License = "MIT" - - diff --git a/v3/examples/plugins/store.json b/v3/examples/plugins/store.json deleted file mode 100644 index 948bb52b0..000000000 --- a/v3/examples/plugins/store.json +++ /dev/null @@ -1 +0,0 @@ -{"url2":"https://reddit.com"} \ No newline at end of file diff --git a/v3/examples/plugins/test.db b/v3/examples/plugins/test.db deleted file mode 100644 index 156136694..000000000 Binary files a/v3/examples/plugins/test.db and /dev/null differ diff --git a/v3/examples/screen/assets/index.html b/v3/examples/screen/assets/index.html deleted file mode 100644 index 31b38e046..000000000 --- a/v3/examples/screen/assets/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - Screens Demo - - - - - - - \ No newline at end of file diff --git a/v3/examples/screen/main.go b/v3/examples/screen/main.go deleted file mode 100644 index e71f5c4be..000000000 --- a/v3/examples/screen/main.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed assets/* -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Screen Demo", - Description: "A demo of the Screen API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Screen Demo", - Width: 800, - Height: 600, - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/examples/systray/main.go b/v3/examples/systray/main.go deleted file mode 100644 index 2beb4501d..000000000 --- a/v3/examples/systray/main.go +++ /dev/null @@ -1,45 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "runtime" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Name: "Systray Demo", - Description: "A demo of the Systray API", - Mac: application.MacOptions{ - ActivationPolicy: application.ActivationPolicyAccessory, - }, - }) - - systemTray := app.NewSystemTray() - if runtime.GOOS == "darwin" { - systemTray.SetIcon(application.DefaultMacTemplateIcon) - } - - myMenu := app.NewMenu() - myMenu.Add("Hello World!").OnClick(func(ctx *application.Context) { - app.InfoDialog().SetTitle("Hello World!").SetMessage("Hello World!").Show() - }) - subMenu := myMenu.AddSubmenu("Submenu") - subMenu.Add("Click me!").OnClick(func(ctx *application.Context) { - ctx.ClickedMenuItem().SetLabel("Clicked!") - }) - myMenu.AddSeparator() - myMenu.Add("Quit").OnClick(func(ctx *application.Context) { - app.Quit() - }) - - systemTray.SetMenu(myMenu) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/examples/window/main.go b/v3/examples/window/main.go deleted file mode 100644 index 7a6e174c5..000000000 --- a/v3/examples/window/main.go +++ /dev/null @@ -1,285 +0,0 @@ -package main - -import ( - _ "embed" - "fmt" - "log" - "math/rand" - "runtime" - "strconv" - "time" - - "github.com/wailsapp/wails/v3/pkg/events" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Name: "WebviewWindow Demo", - Description: "A demo of the WebviewWindow API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - app.On(events.Mac.ApplicationDidFinishLaunching, func() { - log.Println("ApplicationDidFinishLaunching") - }) - - currentWindow := func(fn func(window *application.WebviewWindow)) { - if app.CurrentWindow() != nil { - fn(app.CurrentWindow()) - } else { - println("Current WebviewWindow is nil") - } - } - - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - windowCounter := 1 - - // Let's make a "Demo" menu - myMenu := menu.AddSubmenu("New") - - myMenu.Add("New WebviewWindow"). - SetAccelerator("CmdOrCtrl+N"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindow(). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetURL("https://wails.io"). - Show() - windowCounter++ - }) - myMenu.Add("New WebviewWindow (Hide on Close"). - SetAccelerator("CmdOrCtrl+H"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{HideOnClose: true}). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetURL("https://wails.io"). - Show() - windowCounter++ - }) - myMenu.Add("New Frameless WebviewWindow"). - SetAccelerator("CmdOrCtrl+F"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - X: rand.Intn(1000), - Y: rand.Intn(800), - Frameless: true, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - }, - }).Show() - windowCounter++ - }) - if runtime.GOOS == "darwin" { - myMenu.Add("New WebviewWindow (MacTitleBarHiddenInset)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHiddenInset, - InvisibleTitleBarHeight: 25, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHiddenInset WebviewWindow example

"). - Show() - windowCounter++ - }) - myMenu.Add("New WebviewWindow (MacTitleBarHiddenInsetUnified)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHiddenInsetUnified WebviewWindow example

"). - Show() - windowCounter++ - }) - myMenu.Add("New WebviewWindow (MacTitleBarHidden)"). - OnClick(func(ctx *application.Context) { - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Mac: application.MacWindow{ - TitleBar: application.MacTitleBarHidden, - InvisibleTitleBarHeight: 25, - }, - }). - SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)). - SetPosition(rand.Intn(1000), rand.Intn(800)). - SetHTML("

A MacTitleBarHidden WebviewWindow example

"). - Show() - windowCounter++ - }) - } - - sizeMenu := menu.AddSubmenu("Size") - sizeMenu.Add("Set Size (800,600)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetSize(800, 600) - }) - }) - - sizeMenu.Add("Set Size (Random)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetSize(rand.Intn(800)+200, rand.Intn(600)+200) - }) - }) - sizeMenu.Add("Set Min Size (200,200)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMinSize(200, 200) - }) - }) - sizeMenu.Add("Set Max Size (600,600)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetFullscreenButtonEnabled(false) - w.SetMaxSize(600, 600) - }) - }) - sizeMenu.Add("Get Current WebviewWindow Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - width, height := w.Size() - app.InfoDialog().SetTitle("Current WebviewWindow Size").SetMessage("Width: " + strconv.Itoa(width) + " Height: " + strconv.Itoa(height)).Show() - }) - }) - - sizeMenu.Add("Reset Min Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMinSize(0, 0) - }) - }) - - sizeMenu.Add("Reset Max Size").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetMaxSize(0, 0) - w.SetFullscreenButtonEnabled(true) - }) - }) - positionMenu := menu.AddSubmenu("Position") - positionMenu.Add("Set Position (0,0)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetPosition(0, 0) - }) - }) - positionMenu.Add("Set Position (Random)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetPosition(rand.Intn(1000), rand.Intn(800)) - }) - }) - - positionMenu.Add("Get Position").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - x, y := w.Position() - app.InfoDialog().SetTitle("Current WebviewWindow Position").SetMessage("X: " + strconv.Itoa(x) + " Y: " + strconv.Itoa(y)).Show() - }) - }) - - positionMenu.Add("Center").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Center() - }) - }) - stateMenu := menu.AddSubmenu("State") - stateMenu.Add("Minimise (for 2 secs)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Minimise() - time.Sleep(2 * time.Second) - w.Restore() - }) - }) - stateMenu.Add("Maximise").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Maximise() - }) - }) - stateMenu.Add("Fullscreen").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Fullscreen() - }) - }) - stateMenu.Add("UnFullscreen").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.UnFullscreen() - }) - }) - stateMenu.Add("Restore").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Restore() - }) - }) - stateMenu.Add("Hide (for 2 seconds)").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.Hide() - time.Sleep(2 * time.Second) - w.Show() - }) - }) - stateMenu.Add("Always on Top").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetAlwaysOnTop(true) - }) - }) - stateMenu.Add("Not always on Top").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetAlwaysOnTop(false) - }) - }) - stateMenu.Add("Google.com").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetURL("https://google.com") - }) - }) - stateMenu.Add("wails.io").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - w.SetURL("https://wails.io") - }) - }) - stateMenu.Add("Get Primary Screen").OnClick(func(ctx *application.Context) { - screen, err := app.GetPrimaryScreen() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle("Primary Screen").SetMessage(msg).Show() - }) - stateMenu.Add("Get Screens").OnClick(func(ctx *application.Context) { - screens, err := app.GetScreens() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - for _, screen := range screens { - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show() - } - }) - stateMenu.Add("Get Screen for WebviewWindow").OnClick(func(ctx *application.Context) { - currentWindow(func(w *application.WebviewWindow) { - screen, err := w.GetScreen() - if err != nil { - app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show() - return - } - msg := fmt.Sprintf("Screen: %+v", screen) - app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show() - }) - }) - app.NewWebviewWindow() - - app.SetMenu(menu) - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/examples/windowjs/assets/index.html b/v3/examples/windowjs/assets/index.html deleted file mode 100644 index f77c18294..000000000 --- a/v3/examples/windowjs/assets/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Title - - -HELLO! - - \ No newline at end of file diff --git a/v3/examples/windowjs/main.go b/v3/examples/windowjs/main.go deleted file mode 100644 index ff7f61cd7..000000000 --- a/v3/examples/windowjs/main.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - "math/rand" - "strconv" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed assets -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "WebviewWindow Javascript Demo", - Description: "A demo of the WebviewWindow API from Javascript", - Icon: nil, - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - // Create a custom menu - menu := app.NewMenu() - menu.AddRole(application.AppMenu) - - windowCounter := 1 - - newWindow := func() { - windowName := "WebviewWindow " + strconv.Itoa(windowCounter) - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Name: windowName, - }). - SetTitle(windowName). - SetPosition(rand.Intn(1000), rand.Intn(800)). - Show() - windowCounter++ - } - - // Let's make a "Demo" menu - myMenu := menu.AddSubmenu("New") - - myMenu.Add("New WebviewWindow"). - SetAccelerator("CmdOrCtrl+N"). - OnClick(func(ctx *application.Context) { - newWindow() - }) - - newWindow() - newWindow() - - app.SetMenu(menu) - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/examples/wml/assets/index.html b/v3/examples/wml/assets/index.html deleted file mode 100644 index 26819800d..000000000 --- a/v3/examples/wml/assets/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Wails ML Demo - - -

Wails ML Demo

-

This application contains no Javascript!

- - - - - - - -
Hover over me
- - \ No newline at end of file diff --git a/v3/examples/wml/main.go b/v3/examples/wml/main.go deleted file mode 100644 index 1a9f4723b..000000000 --- a/v3/examples/wml/main.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed assets/* -var assets embed.FS - -func main() { - - app := application.New(application.Options{ - Name: "Wails ML Demo", - Description: "A demo of the Wails ML API", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Wails ML Demo", - Width: 800, - Height: 600, - Mac: application.MacWindow{ - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInsetUnified, - InvisibleTitleBarHeight: 50, - }, - }) - - app.Events.On("button-pressed", func(_ *application.WailsEvent) { - println("Button Pressed!") - }) - app.Events.On("hover", func(_ *application.WailsEvent) { - println("Hover time!") - }) - - err := app.Run() - - if err != nil { - log.Fatal(err.Error()) - } -} diff --git a/v3/go.mod b/v3/go.mod deleted file mode 100644 index 4ffb85ce6..000000000 --- a/v3/go.mod +++ /dev/null @@ -1,74 +0,0 @@ -module github.com/wailsapp/wails/v3 - -go 1.19 - -require ( - github.com/go-task/task/v3 v3.20.0 - github.com/google/go-cmp v0.5.9 - github.com/jackmordaunt/icns/v2 v2.2.1 - github.com/json-iterator/go v1.1.12 - github.com/leaanthony/clir v1.6.0 - github.com/leaanthony/gosod v1.0.3 - github.com/leaanthony/winicon v1.0.0 - github.com/matryer/is v1.4.0 - github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 - github.com/pkg/errors v0.9.1 - github.com/pterm/pterm v0.12.51 - github.com/samber/lo v1.37.0 - github.com/tc-hib/winres v0.1.6 - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 - modernc.org/sqlite v1.21.0 -) - -require ( - atomicgo.dev/cursor v0.1.1 // indirect - atomicgo.dev/keyboard v0.2.8 // indirect - github.com/containerd/console v1.0.3 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/gookit/color v1.5.2 // indirect - github.com/joho/godotenv v1.4.0 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/lithammer/fuzzysearch v1.1.5 // indirect - github.com/mattn/go-colorable v0.1.11 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mattn/go-zglob v0.0.4 // indirect - github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/radovskyb/watcher v1.0.7 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/sajari/fuzzy v1.0.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/image v0.5.0 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/tools v0.1.12 // indirect - gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/uint128 v1.2.0 // indirect - modernc.org/cc/v3 v3.40.0 // indirect - modernc.org/ccgo/v3 v3.16.13 // indirect - modernc.org/libc v1.22.3 // indirect - modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.5.0 // indirect - modernc.org/opt v0.1.3 // indirect - modernc.org/strutil v1.1.3 // indirect - modernc.org/token v1.0.1 // indirect - mvdan.cc/sh/v3 v3.6.0 // indirect -) - -replace github.com/wailsapp/wails/v2 => ../v2 diff --git a/v3/go.sum b/v3/go.sum deleted file mode 100644 index ff474ab93..000000000 --- a/v3/go.sum +++ /dev/null @@ -1,239 +0,0 @@ -atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg= -atomicgo.dev/cursor v0.1.1 h1:0t9sxQomCTRh5ug+hAMCs59x/UmC9QL6Ci5uosINKD4= -atomicgo.dev/cursor v0.1.1/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU= -atomicgo.dev/keyboard v0.2.8 h1:Di09BitwZgdTV1hPyX/b9Cqxi8HVuJQwWivnZUEqlj4= -atomicgo.dev/keyboard v0.2.8/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ= -github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs= -github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8= -github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII= -github.com/MarvinJWendt/testza v0.2.10/go.mod h1:pd+VWsoGUiFtq+hRKSU1Bktnn+DMCSrDrXDpX2bG66k= -github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzXjB69adAhzZkI= -github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c= -github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE= -github.com/MarvinJWendt/testza v0.5.1 h1:a9Fqx6vQrHQ4CyiaLhktfTTelwGotmFWy8MNhyaohw8= -github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/task/v3 v3.20.0 h1:pTavuhP+AiEpKLzh5I6Lja9Ux7ypYO5QMsEPTbhYEDc= -github.com/go-task/task/v3 v3.20.0/go.mod h1:y7rWakbLR5gFElGgo6rA2dyr6vU/zNIDVfn3S4Of6OI= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= -github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= -github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= -github.com/jackmordaunt/icns/v2 v2.2.1 h1:MGklwYP2yohKn2Bw7XxlF69LZe98S1vUfl5OvAulPwg= -github.com/jackmordaunt/icns/v2 v2.2.1/go.mod h1:6aYIB9eSzyfHHMKqDf17Xrs1zetQPReAkiUSHzdw4cI= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/leaanthony/clir v1.0.4/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0= -github.com/leaanthony/clir v1.6.0 h1:mLV9thGkmqFqJU7ozmqlER8sBtGdZlz6H3gKsfIiB3o= -github.com/leaanthony/clir v1.6.0/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0= -github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc= -github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA= -github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ= -github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/leaanthony/winicon v1.0.0 h1:ZNt5U5dY71oEoKZ97UVwJRT4e+5xo5o/ieKuHuk8NqQ= -github.com/leaanthony/winicon v1.0.0/go.mod h1:en5xhijl92aphrJdmRPlh4NI1L6wq3gEm0LpXAPghjU= -github.com/lithammer/fuzzysearch v1.1.5 h1:Ag7aKU08wp0R9QCfF4GoGST9HbmAIeLP7xwMrOBEp1c= -github.com/lithammer/fuzzysearch v1.1.5/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= -github.com/mattn/go-zglob v0.0.4 h1:LQi2iOm0/fGgu80AioIJ/1j9w9Oh+9DZ39J4VAGzHQM= -github.com/mattn/go-zglob v0.0.4/go.mod h1:MxxjyoXXnMxfIpxTK2GAkw1w8glPsQILx3N5wrKakiY= -github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= -github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= -github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc= -github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI= -github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg= -github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE= -github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEejaWgXU= -github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE= -github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8= -github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s= -github.com/pterm/pterm v0.12.51 h1:iwhNG1FhQMgks+5kVyr/ClRk3WJCuL907nJN7RqmEpw= -github.com/pterm/pterm v0.12.51/go.mod h1:79BLm4vos2z+eOoHnDG7ZWuYtLaSStyaspKjGmSoxc4= -github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= -github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/sajari/fuzzy v1.0.0 h1:+FmwVvJErsd0d0hAPlj4CxqxUtQY/fOoY0DwX4ykpRY= -github.com/sajari/fuzzy v1.0.0/go.mod h1:OjYR6KxoWOe9+dOlXeiCJd4dIbED4Oo8wpS89o0pwOo= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/tc-hib/winres v0.1.6 h1:qgsYHze+BxQPEYilxIz/KCQGaClvI2+yLBAZs+3+0B8= -github.com/tc-hib/winres v0.1.6/go.mod h1:pe6dOR40VOrGz8PkzreVKNvEKnlE8t4yR8A8naL+t7A= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI= -golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= -modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY= -modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow= -modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws= -modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= -modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= -mvdan.cc/sh/v3 v3.6.0 h1:gtva4EXJ0dFNvl5bHjcUEvws+KRcDslT8VKheTYkbGU= -mvdan.cc/sh/v3 v3.6.0/go.mod h1:U4mhtBLZ32iWhif5/lD+ygy1zrgaQhUu+XFy7C8+TTA= diff --git a/v3/internal/commands/bindings.go b/v3/internal/commands/bindings.go deleted file mode 100644 index 1c89544da..000000000 --- a/v3/internal/commands/bindings.go +++ /dev/null @@ -1,15 +0,0 @@ -package commands - -import "github.com/wailsapp/wails/v3/internal/parser" - -type GenerateBindingsOptions struct { - Silent bool `name:"silent" description:"Silent mode"` - ModelsFilename string `name:"m" description:"The filename for the models file" default:"models.ts"` - BindingsFilename string `name:"b" description:"The filename for the bindings file" default:"bindings.js"` - ProjectDirectory string `name:"p" description:"The project directory" default:"."` - OutputDirectory string `name:"d" description:"The output directory" default:"."` -} - -func GenerateBindings(options *GenerateBindingsOptions) error { - return parser.GenerateBindingsAndModels(options.ProjectDirectory, options.OutputDirectory) -} diff --git a/v3/internal/commands/build.go b/v3/internal/commands/build.go deleted file mode 100644 index b6c0677d1..000000000 --- a/v3/internal/commands/build.go +++ /dev/null @@ -1,15 +0,0 @@ -package commands - -import ( - "os" - - "github.com/pterm/pterm" - - "github.com/wailsapp/wails/v3/internal/flags" -) - -func Build(_ *flags.Build) error { - pterm.Info.Println("`wails build` is an alias for `wails task build`. Use `wails task` for much better control over your builds.") - os.Args = []string{"wails", "task", "build"} - return RunTask(&RunTaskOptions{}, []string{}) -} diff --git a/v3/internal/commands/defaults.go b/v3/internal/commands/defaults.go deleted file mode 100644 index 0d7b6d0db..000000000 --- a/v3/internal/commands/defaults.go +++ /dev/null @@ -1,61 +0,0 @@ -package commands - -import ( - _ "embed" - "os" -) - -//go:embed defaults/info.json -var Info []byte - -//go:embed defaults/wails.exe.manifest -var Manifest []byte - -//go:embed defaults/appicon.png -var AppIcon []byte - -//go:embed defaults/icons.ico -var IconsIco []byte - -//go:embed defaults/Info.plist -var InfoPlist []byte - -//go:embed defaults/Info.dev.plist -var InfoDevPlist []byte - -//go:embed defaults/icons.icns -var IconsIcns []byte - -var AllAssets = map[string][]byte{ - "info.json": Info, - "wails.exe.manifest": Manifest, - "appicon.png": AppIcon, - "icons.ico": IconsIco, - "Info.plist": InfoPlist, - "Info.dev.plist": InfoDevPlist, - "icons.icns": IconsIcns, -} - -type DefaultsOptions struct { - Dir string `description:"The directory to generate the files into"` -} - -func Defaults(options *DefaultsOptions) error { - dir := options.Dir - if dir == "" { - dir = "." - } - for filename, data := range AllAssets { - // If file exists, skip it - if _, err := os.Stat(dir + "/" + filename); err == nil { - println("Skipping " + filename) - continue - } - err := os.WriteFile(dir+"/"+filename, data, 0644) - if err != nil { - return err - } - println("Generated " + filename) - } - return nil -} diff --git a/v3/internal/commands/defaults/Info.dev.plist b/v3/internal/commands/defaults/Info.dev.plist deleted file mode 100644 index 28c8c4828..000000000 --- a/v3/internal/commands/defaults/Info.dev.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - {{.Info.ProductName}} - CFBundleExecutable - {{.Name}} - CFBundleIdentifier - com.wails.{{.Name}} - CFBundleVersion - {{.Info.ProductVersion}} - CFBundleGetInfoString - {{.Info.Comments}} - CFBundleShortVersionString - {{.Info.ProductVersion}} - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - {{.Info.Copyright}} - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/commands/defaults/Info.plist b/v3/internal/commands/defaults/Info.plist deleted file mode 100644 index 24490f5c8..000000000 --- a/v3/internal/commands/defaults/Info.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Productname - CFBundleExecutable - {{.Name}} - CFBundleIdentifier - com.wails.{{.Name}} - CFBundleVersion - {{.Info.ProductVersion}} - CFBundleGetInfoString - {{.Info.Comments}} - CFBundleShortVersionString - {{.Info.ProductVersion}} - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - {{.Info.Copyright}} - - \ No newline at end of file diff --git a/v3/internal/commands/defaults/appicon.png b/v3/internal/commands/defaults/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/commands/defaults/appicon.png and /dev/null differ diff --git a/v3/internal/commands/defaults/icon.ico b/v3/internal/commands/defaults/icon.ico deleted file mode 100644 index bfa0690b7..000000000 Binary files a/v3/internal/commands/defaults/icon.ico and /dev/null differ diff --git a/v3/internal/commands/defaults/icons.icns b/v3/internal/commands/defaults/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/commands/defaults/icons.icns and /dev/null differ diff --git a/v3/internal/commands/defaults/icons.ico b/v3/internal/commands/defaults/icons.ico deleted file mode 100644 index f33479841..000000000 Binary files a/v3/internal/commands/defaults/icons.ico and /dev/null differ diff --git a/v3/internal/commands/defaults/info.json b/v3/internal/commands/defaults/info.json deleted file mode 100644 index 1005eb5cb..000000000 --- a/v3/internal/commands/defaults/info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "fixed": { - "file_version": "v1.0.0" - }, - "info": { - "0000": { - "ProductVersion": "v1.0.0", - "CompanyName": "My Company Name", - "FileDescription": "A thing that does a thing", - "LegalCopyright": "(c) 2023 My Company Name", - "ProductName": "My Product Name", - "Comments": "This is a comment" - } - } -} \ No newline at end of file diff --git a/v3/internal/commands/defaults/wails.exe.manifest b/v3/internal/commands/defaults/wails.exe.manifest deleted file mode 100644 index fb1ce5bde..000000000 --- a/v3/internal/commands/defaults/wails.exe.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - true/pm - permonitorv2,permonitor - - - \ No newline at end of file diff --git a/v3/internal/commands/icons.go b/v3/internal/commands/icons.go deleted file mode 100644 index 4eee8734f..000000000 --- a/v3/internal/commands/icons.go +++ /dev/null @@ -1,126 +0,0 @@ -package commands - -import ( - "bytes" - "fmt" - "image" - "os" - "strconv" - "strings" - - "github.com/jackmordaunt/icns/v2" - "github.com/leaanthony/winicon" -) - -type IconsOptions struct { - Example bool `description:"Generate example icon file (appicon.png) in the current directory"` - Input string `description:"The input image file"` - Sizes string `description:"The sizes to generate in .ico file (comma separated)" default:"256,128,64,48,32,16"` - WindowsFilename string `description:"The output filename for the Windows icon" default:"icon.ico"` - MacFilename string `description:"The output filename for the Mac icon bundle" default:"icons.icns"` -} - -func GenerateIcons(options *IconsOptions) error { - - if options.Example { - return generateExampleIcon() - } - - if options.Input == "" { - return fmt.Errorf("input is required") - } - - if options.WindowsFilename == "" && options.MacFilename == "" { - return fmt.Errorf("at least one output filename is required") - } - - // Parse sizes - var sizes = []int{256, 128, 64, 48, 32, 16} - var err error - if options.Sizes != "" { - sizes, err = parseSizes(options.Sizes) - if err != nil { - return err - } - } - iconData, err := os.ReadFile(options.Input) - if err != nil { - return err - } - - if options.WindowsFilename != "" { - err := generateWindowsIcon(iconData, sizes, options) - if err != nil { - return err - } - } - - if options.MacFilename != "" { - err := generateMacIcon(iconData, options) - if err != nil { - return err - } - } - - return nil -} - -func generateExampleIcon() error { - return os.WriteFile("appicon.png", []byte(AppIcon), 0644) -} - -func parseSizes(sizes string) ([]int, error) { - // split the input string by comma and confirm that each one is an integer - parsedSizes := strings.Split(sizes, ",") - var result []int - for _, size := range parsedSizes { - s, err := strconv.Atoi(size) - if err != nil { - return nil, err - } - if s == 0 { - continue - } - result = append(result, s) - } - - // put all integers in a slice and return - return result, nil -} - -func generateMacIcon(iconData []byte, options *IconsOptions) error { - - srcImg, _, err := image.Decode(bytes.NewBuffer(iconData)) - if err != nil { - return err - } - - dest, err := os.Create(options.MacFilename) - if err != nil { - return err - - } - defer func() { - err = dest.Close() - if err == nil { - return - } - }() - return icns.Encode(dest, srcImg) -} - -func generateWindowsIcon(iconData []byte, sizes []int, options *IconsOptions) error { - - var output bytes.Buffer - - err := winicon.GenerateIcon(bytes.NewBuffer(iconData), &output, sizes) - if err != nil { - return err - } - - err = os.WriteFile(options.WindowsFilename, output.Bytes(), 0644) - if err != nil { - return err - } - return nil -} diff --git a/v3/internal/commands/icons_test.go b/v3/internal/commands/icons_test.go deleted file mode 100644 index a41e1bd6c..000000000 --- a/v3/internal/commands/icons_test.go +++ /dev/null @@ -1,285 +0,0 @@ -package commands - -import ( - "fmt" - "os" - "path/filepath" - "runtime" - "testing" -) - -func TestGenerateIcon(t *testing.T) { - tests := []struct { - name string - setup func() *IconsOptions - wantErr bool - test func() error - }{ - { - name: "should generate an icon when using the `example` flag", - setup: func() *IconsOptions { - return &IconsOptions{ - Example: true, - } - }, - wantErr: false, - test: func() error { - // the file `appicon.png` should be created in the current directory - // check for the existence of the file - f, err := os.Stat("appicon.png") - if err != nil { - return err - } - defer func() { - err := os.Remove("appicon.png") - if err != nil { - panic(err) - } - }() - if f.IsDir() { - return fmt.Errorf("appicon.png is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("appicon.png is empty") - } - return nil - }, - }, - { - name: "should generate a .ico file when using the `input` flag and `windowsfilena me` flag", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - WindowsFilename: "appicon.ico", - } - }, - wantErr: false, - test: func() error { - // the file `appicon.ico` should be created in the current directory - // check for the existence of the file - f, err := os.Stat("appicon.ico") - if err != nil { - return err - } - defer func() { - // Remove the file - err = os.Remove("appicon.ico") - if err != nil { - return - } - }() - if f.IsDir() { - return fmt.Errorf("appicon.ico is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("appicon.ico is empty") - } - // Remove the file - err = os.Remove("appicon.ico") - if err != nil { - return err - } - return nil - }, - }, - { - name: "should generate a .icns file when using the `input` flag and `macfilename` flag", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - MacFilename: "appicon.icns", - } - }, - wantErr: false, - test: func() error { - // the file `appicon.icns` should be created in the current directory - // check for the existence of the file - f, err := os.Stat("appicon.icns") - if err != nil { - return err - } - defer func() { - // Remove the file - err = os.Remove("appicon.icns") - if err != nil { - panic(err) - } - }() - if f.IsDir() { - return fmt.Errorf("appicon.icns is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("appicon.icns is empty") - } - // Remove the file - - return nil - }, - }, - { - name: "should generate a small .ico file when using the `input` flag and `sizes` flag", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - Sizes: "16", - WindowsFilename: "appicon.ico", - } - }, - wantErr: false, - test: func() error { - // the file `appicon.ico` should be created in the current directory - // check for the existence of the file - f, err := os.Stat("appicon.ico") - if err != nil { - return err - } - defer func() { - err := os.Remove("appicon.ico") - if err != nil { - panic(err) - } - }() - // The size of the file should be 571 bytes - if f.Size() != 571 { - return fmt.Errorf("appicon.ico is not the correct size. Got %d", f.Size()) - } - if f.IsDir() { - return fmt.Errorf("appicon.ico is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("appicon.ico is empty") - } - return nil - }, - }, - { - name: "should error if no input file is provided", - setup: func() *IconsOptions { - return &IconsOptions{} - }, - wantErr: true, - }, - { - name: "should error if neither mac or windows filename is provided", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - } - }, - wantErr: true, - }, - { - name: "should error if bad sizes provided", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - WindowsFilename: "appicon.ico", - Sizes: "bad", - } - }, - wantErr: true, - }, - { - name: "should ignore 0 size", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "appicon.png") - return &IconsOptions{ - Input: exampleIcon, - WindowsFilename: "appicon.ico", - Sizes: "0,16", - } - }, - wantErr: false, - test: func() error { - // Test the file exists and has 571 bytes - f, err := os.Stat("appicon.ico") - if err != nil { - return err - } - defer func() { - err := os.Remove("appicon.ico") - if err != nil { - panic(err) - } - }() - if f.Size() != 571 { - return fmt.Errorf("appicon.ico is not the correct size. Got %d", f.Size()) - } - if f.IsDir() { - return fmt.Errorf("appicon.ico is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("appicon.ico is empty") - } - return nil - }, - }, - { - name: "should error if the input file does not exist", - setup: func() *IconsOptions { - return &IconsOptions{ - Input: "doesnotexist.png", - WindowsFilename: "appicon.ico", - } - }, - wantErr: true, - }, - { - name: "should error if the input file is not a png", - setup: func() *IconsOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - return &IconsOptions{ - Input: thisFile, - WindowsFilename: "appicon.ico", - } - }, - wantErr: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - options := tt.setup() - err := GenerateIcons(options) - if (err != nil) != tt.wantErr { - t.Errorf("GenerateIcon() error = %v, wantErr %v", err, tt.wantErr) - return - } - if tt.test != nil { - if err := tt.test(); err != nil { - t.Errorf("GenerateIcon() test error = %v", err) - } - } - }) - } -} diff --git a/v3/internal/commands/init.go b/v3/internal/commands/init.go deleted file mode 100644 index 651d4a008..000000000 --- a/v3/internal/commands/init.go +++ /dev/null @@ -1,43 +0,0 @@ -package commands - -import ( - "fmt" - "github.com/wailsapp/wails/v3/internal/flags" - "github.com/wailsapp/wails/v3/internal/templates" - - "github.com/pterm/pterm" -) - -func Init(options *flags.Init) error { - if options.List { - return printTemplates() - } - - if options.Quiet { - pterm.DisableOutput() - } - - if options.ProjectName == "" { - return fmt.Errorf("please use the -n flag to specify a project name") - } - - if !templates.ValidTemplateName(options.TemplateName) { - return fmt.Errorf("invalid template name: %s. Use -l flag to view available templates", options.TemplateName) - } - - return templates.Install(options) -} - -func printTemplates() error { - defaultTemplates := templates.GetDefaultTemplates() - - pterm.DefaultSection.Println("Available templates") - - table := pterm.TableData{{"Name", "Description"}} - for _, template := range defaultTemplates { - table = append(table, []string{template.Name, template.Description}) - } - err := pterm.DefaultTable.WithHasHeader(true).WithBoxed(true).WithData(table).Render() - pterm.Println() - return err -} diff --git a/v3/internal/commands/plugins.go b/v3/internal/commands/plugins.go deleted file mode 100644 index a42790ab3..000000000 --- a/v3/internal/commands/plugins.go +++ /dev/null @@ -1,45 +0,0 @@ -package commands - -import ( - "github.com/wailsapp/wails/v3/internal/flags" - "github.com/wailsapp/wails/v3/internal/plugins" - "strings" - - "github.com/pterm/pterm" -) - -func toCamelCasePlugin(s string) string { - var camelCase string - var capitalize = true - - for _, c := range s { - if c >= 'a' && c <= 'z' || c >= '0' && c <= '9' { - if capitalize { - camelCase += strings.ToUpper(string(c)) - capitalize = false - } else { - camelCase += string(c) - } - } else if c >= 'A' && c <= 'Z' { - camelCase += string(c) - capitalize = false - } else { - capitalize = true - } - } - - return camelCase + "Plugin" -} - -func PluginInit(options *flags.PluginInit) error { - - if options.Quiet { - pterm.DisableOutput() - } - - if options.PackageName == "" { - options.PackageName = toCamelCasePlugin(options.Name) - } - - return plugins.Install(options) -} diff --git a/v3/internal/commands/syso.go b/v3/internal/commands/syso.go deleted file mode 100644 index 70821789f..000000000 --- a/v3/internal/commands/syso.go +++ /dev/null @@ -1,123 +0,0 @@ -package commands - -import ( - "fmt" - "os" - "runtime" - - "github.com/tc-hib/winres" - "github.com/tc-hib/winres/version" -) - -type SysoOptions struct { - Example bool `description:"Generate example manifest & info files"` - Manifest string `description:"The manifest file"` - Info string `description:"The info.json file"` - Icon string `description:"The icon file"` - Out string `description:"The output filename for the syso file"` - Arch string `description:"The target architecture"` -} - -func (i *SysoOptions) Default() *SysoOptions { - return &SysoOptions{ - Arch: runtime.GOARCH, - } -} - -func GenerateSyso(options *SysoOptions) error { - - // Generate example files? - if options.Example { - return generateExampleSyso() - } - - if options.Manifest == "" { - return fmt.Errorf("manifest is required") - } - if options.Icon == "" { - return fmt.Errorf("icon is required") - } - - rs := winres.ResourceSet{} - - // Process Icon - iconFile, err := os.Open(options.Icon) - if err != nil { - return err - } - defer iconFile.Close() - ico, err := winres.LoadICO(iconFile) - if err != nil { - return fmt.Errorf("couldn't load icon '%s': %v", options.Icon, err) - } - err = rs.SetIcon(winres.RT_ICON, ico) - if err != nil { - return err - } - - // Process Manifest - manifestData, err := os.ReadFile(options.Manifest) - if err != nil { - return err - } - - xmlData, err := winres.AppManifestFromXML(manifestData) - if err != nil { - return err - } - rs.SetManifest(xmlData) - - if options.Info != "" { - infoData, err := os.ReadFile(options.Info) - if err != nil { - return err - } - if len(infoData) != 0 { - var v version.Info - if err := v.UnmarshalJSON(infoData); err != nil { - return err - } - rs.SetVersionInfo(v) - } - } - - targetFile := options.Out - if targetFile == "" { - targetFile = "rsrc_windows_" + options.Arch + ".syso" - } - fout, err := os.Create(targetFile) - if err != nil { - return err - } - defer fout.Close() - - archs := map[string]winres.Arch{ - "amd64": winres.ArchAMD64, - "arm64": winres.ArchARM64, - "386": winres.ArchI386, - } - targetArch, supported := archs[options.Arch] - if !supported { - return fmt.Errorf("arch '%s' not supported", options.Arch) - } - - err = rs.WriteObject(fout, targetArch) - if err != nil { - return err - } - return nil -} - -func generateExampleSyso() error { - // Generate example info.json - err := os.WriteFile("info.json", Info, 0644) - if err != nil { - return err - } - // Generate example manifest - err = os.WriteFile("wails.exe.manifest", Manifest, 0644) - if err != nil { - return err - } - return nil -} diff --git a/v3/internal/commands/syso_test.go b/v3/internal/commands/syso_test.go deleted file mode 100644 index a1e18e3dc..000000000 --- a/v3/internal/commands/syso_test.go +++ /dev/null @@ -1,189 +0,0 @@ -package commands - -import ( - "fmt" - "os" - "path/filepath" - "runtime" - "testing" -) - -func TestGenerateSyso(t *testing.T) { - tests := []struct { - name string - setup func() *SysoOptions - wantErr bool - test func() error - }{ - { - name: "should generate example info and manifest files when using the `example` flag", - setup: func() *SysoOptions { - return &SysoOptions{ - Example: true, - } - }, - wantErr: false, - test: func() error { - // the file `info.json` should be created in the current directory - // check for the existence of the file - f, err := os.Stat("info.json") - if err != nil { - return err - } - m, err := os.Stat("wails.exe.manifest") - if err != nil { - return err - } - defer func() { - err := os.Remove("info.json") - err2 := os.Remove("wails.exe.manifest") - if err != nil { - panic(err) - } - if err2 != nil { - panic(err2) - } - }() - if f.IsDir() { - return fmt.Errorf("info.json is a directory") - } - if f.Size() == 0 { - return fmt.Errorf("info.json is empty") - } - if m.IsDir() { - return fmt.Errorf("wails.exe.manifest is a directory") - } - if m.Size() == 0 { - return fmt.Errorf("wails.exe.manifest is empty") - } - return nil - }, - }, - { - name: "should error if manifest filename is not provided", - setup: func() *SysoOptions { - return &SysoOptions{ - Manifest: "", - } - }, - wantErr: true, - }, - { - name: "should error if icon filename is not provided", - setup: func() *SysoOptions { - return &SysoOptions{ - Manifest: "test.manifest", - Icon: "", - } - }, - wantErr: true, - }, - { - name: "should error if icon filename does not exist", - setup: func() *SysoOptions { - return &SysoOptions{ - Manifest: "test.manifest", - Icon: "icon.ico", - } - }, - wantErr: true, - }, - { - name: "should error if icon is wrong format", - setup: func() *SysoOptions { - _, thisFile, _, _ := runtime.Caller(1) - return &SysoOptions{ - Manifest: "test.manifest", - Icon: thisFile, - } - }, - wantErr: true, - }, - { - name: "should error if manifest filename does not exist", - setup: func() *SysoOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "icon.ico") - return &SysoOptions{ - Manifest: "test.manifest", - Icon: exampleIcon, - } - }, - wantErr: true, - }, - { - name: "should error if manifest is wrong format", - setup: func() *SysoOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "icon.ico") - return &SysoOptions{ - Manifest: exampleIcon, - Icon: exampleIcon, - } - }, - wantErr: true, - }, - { - name: "should error if info file does not exist", - setup: func() *SysoOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "icon.ico") - // Get the path to the example manifest - exampleManifest := filepath.Join(localDir, "examples", "wails.exe.manifest") - return &SysoOptions{ - Manifest: exampleManifest, - Icon: exampleIcon, - Info: "doesnotexist.json", - } - }, - wantErr: true, - }, - { - name: "should error if info file is wrong format", - setup: func() *SysoOptions { - // Get the directory of this file - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - // Get the path to the example icon - exampleIcon := filepath.Join(localDir, "examples", "icon.ico") - // Get the path to the example manifest - exampleManifest := filepath.Join(localDir, "examples", "wails.exe.manifest") - return &SysoOptions{ - Manifest: exampleManifest, - Icon: exampleIcon, - Info: thisFile, - } - }, - wantErr: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - options := tt.setup() - err := GenerateSyso(options) - if (err != nil) != tt.wantErr { - t.Errorf("GenerateSyso() error = %v, wantErr %v", err, tt.wantErr) - return - } - if (err != nil) && tt.wantErr { - println(err.Error()) - return - } - if tt.test != nil { - if err := tt.test(); err != nil { - t.Errorf("GenerateSyso() test error = %v", err) - } - } - }) - } -} diff --git a/v3/internal/commands/task.go b/v3/internal/commands/task.go deleted file mode 100644 index c80d677e6..000000000 --- a/v3/internal/commands/task.go +++ /dev/null @@ -1,175 +0,0 @@ -package commands - -import ( - "context" - "fmt" - "log" - "os" - "path/filepath" - "strings" - "time" - - "github.com/pterm/pterm" - - "github.com/go-task/task/v3/args" - - "github.com/go-task/task/v3" - "github.com/go-task/task/v3/taskfile" -) - -type RunTaskOptions struct { - Name string `pos:"1"` - Help bool `name:"h" description:"shows Task usage"` - Init bool `name:"i" description:"creates a new Taskfile.yml"` - List bool `name:"list" description:"tasks with description of current Taskfile"` - ListAll bool `name:"list-all" description:"lists tasks with or without a description"` - ListJSON bool `name:"json" description:"formats task list as json"` - Status bool `name:"status" description:"exits with non-zero exit code if any of the given tasks is not up-to-date"` - Force bool `name:"f" description:"forces execution even when the task is up-to-date"` - Watch bool `name:"w" description:"enables watch of the given task"` - Verbose bool `name:"v" description:"enables verbose mode"` - Silent bool `name:"s" description:"disables echoing"` - Parallel bool `name:"p" description:"executes tasks provided on command line in parallel"` - Dry bool `name:"dry" description:"compiles and prints tasks in the order that they would be run, without executing them"` - Summary bool `name:"summary" description:"show summary about a task"` - ExitCode bool `name:"x" description:"pass-through the exit code of the task command"` - Dir string `name:"dir" description:"sets directory of execution"` - EntryPoint string `name:"taskfile" description:"choose which Taskfile to run."` - OutputName string `name:"output" description:"sets output style: [interleaved|group|prefixed]"` - OutputGroupBegin string `name:"output-group-begin" description:"message template to print before a task's grouped output"` - OutputGroupEnd string `name:"output-group-end" description:"message template to print after a task's grouped output"` - Color bool `name:"c" description:"colored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable" default:"true"` - Concurrency int `name:"C" description:"limit number tasks to run concurrently"` - Interval int64 `name:"interval" description:"interval to watch for changes"` -} - -func RunTask(options *RunTaskOptions, otherArgs []string) error { - - if options.Init { - wd, err := os.Getwd() - if err != nil { - return err - } - return task.InitTaskfile(os.Stdout, wd) - } - - if options.Dir != "" && options.EntryPoint != "" { - return fmt.Errorf("task: You can't set both --dir and --taskfile") - } - - if options.EntryPoint != "" { - options.Dir = filepath.Dir(options.EntryPoint) - options.EntryPoint = filepath.Base(options.EntryPoint) - } - - if options.OutputName != "group" { - if options.OutputGroupBegin != "" { - return fmt.Errorf("task: You can't set --output-group-begin without --output=group") - } - if options.OutputGroupBegin != "" { - return fmt.Errorf("task: You can't set --output-group-end without --output=group") - } - } - - e := task.Executor{ - Force: options.Force, - Watch: options.Watch, - Verbose: options.Verbose, - Silent: options.Silent, - Dir: options.Dir, - Dry: options.Dry, - Entrypoint: options.EntryPoint, - Summary: options.Summary, - Parallel: options.Parallel, - Color: options.Color, - Concurrency: options.Concurrency, - Interval: time.Duration(options.Interval) * time.Second, - - Stdin: os.Stdin, - Stdout: os.Stdout, - Stderr: os.Stderr, - - OutputStyle: taskfile.Output{ - Name: options.OutputName, - Group: taskfile.OutputGroup{ - Begin: options.OutputGroupBegin, - End: options.OutputGroupEnd, - }, - }, - } - - var listOptions = task.NewListOptions(options.List, options.ListAll, options.ListJSON) - if err := listOptions.Validate(); err != nil { - log.Fatal(err) - } - - if (listOptions.ShouldListTasks()) && options.Silent { - e.ListTaskNames(options.ListAll) - return nil - } - - if err := e.Setup(); err != nil { - log.Fatal(err) - } - v, err := e.Taskfile.ParsedVersion() - if err != nil { - return err - } - - if listOptions.ShouldListTasks() { - if foundTasks, err := e.ListTasks(listOptions); !foundTasks || err != nil { - os.Exit(1) - } - return nil - } - - var ( - calls []taskfile.Call - globals *taskfile.Vars - ) - - var taskAndVars []string - for _, taskAndVar := range os.Args[2:] { - if taskAndVar == "--" { - break - } - taskAndVars = append(taskAndVars, taskAndVar) - } - - if len(taskAndVars) > 0 && len(otherArgs) > 0 { - if taskAndVars[0] == otherArgs[0] { - otherArgs = otherArgs[1:] - } - } - - if v >= 3.0 { - calls, globals = args.ParseV3(taskAndVars...) - } else { - calls, globals = args.ParseV2(taskAndVars...) - } - - globals.Set("CLI_ARGS", taskfile.Var{Static: strings.Join(otherArgs, " ")}) - e.Taskfile.Vars.Merge(globals) - - if !options.Watch { - e.InterceptInterruptSignals() - } - - ctx := context.Background() - - if options.Status { - return e.Status(ctx, calls...) - } - - if err := e.Run(ctx, calls...); err != nil { - pterm.Error.Println(err.Error()) - - if options.ExitCode { - if err, ok := err.(*task.TaskRunError); ok { - os.Exit(err.ExitCode()) - } - } - os.Exit(1) - } - return nil -} diff --git a/v3/internal/commands/task_test.go b/v3/internal/commands/task_test.go deleted file mode 100644 index a88304272..000000000 --- a/v3/internal/commands/task_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package commands - -import "testing" - -func TestBuild(t *testing.T) { - type args struct { - options *RunTaskOptions - otherArgs []string - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: "should error if task name not provided", - args: args{ - options: &RunTaskOptions{}, - }, - wantErr: true, - }, - { - name: "should work if task name provided", - args: args{ - options: &RunTaskOptions{ - Name: "build", - }, - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if err := RunTask(tt.args.options, tt.args.otherArgs); (err != nil) != tt.wantErr { - t.Errorf("Run() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/v3/internal/debug/debug.go b/v3/internal/debug/debug.go deleted file mode 100644 index 47db8b626..000000000 --- a/v3/internal/debug/debug.go +++ /dev/null @@ -1,56 +0,0 @@ -package debug - -import ( - "github.com/samber/lo" - "path/filepath" - "runtime" -) - -import "runtime/debug" - -// Why go doesn't provide this as a map already is beyond me. -var buildSettings = map[string]string{} -var LocalModulePath = "" - -func init() { - buildInfo, ok := debug.ReadBuildInfo() - if !ok { - return - } - buildSettings = lo.Associate(buildInfo.Settings, func(setting debug.BuildSetting) (string, string) { - return setting.Key, setting.Value - }) - if isLocalBuild() { - modulePath := RelativePath("..", "..", "..") - LocalModulePath, _ = filepath.Abs(modulePath) - } -} - -func isLocalBuild() bool { - return buildSettings["vcs.modified"] == "true" -} - -// RelativePath returns a qualified path created by joining the -// directory of the calling file and the given relative path. -// -// Example: RelativePath("..") in *this* file would give you '/path/to/wails2/v2/internal` -func RelativePath(relativepath string, optionalpaths ...string) string { - _, thisFile, _, _ := runtime.Caller(1) - localDir := filepath.Dir(thisFile) - - // If we have optional paths, join them to the relativepath - if len(optionalpaths) > 0 { - paths := []string{relativepath} - paths = append(paths, optionalpaths...) - relativepath = filepath.Join(paths...) - } - result, err := filepath.Abs(filepath.Join(localDir, relativepath)) - if err != nil { - // I'm allowing this for 1 reason only: It's fatal if the path - // supplied is wrong as it's only used internally in Wails. If we get - // that path wrong, we should know about it immediately. The other reason is - // that it cuts down a ton of unnecassary error handling. - panic(err) - } - return result -} diff --git a/v3/internal/flags/build.go b/v3/internal/flags/build.go deleted file mode 100644 index 260c6067d..000000000 --- a/v3/internal/flags/build.go +++ /dev/null @@ -1,5 +0,0 @@ -package flags - -type Build struct { - Common -} diff --git a/v3/internal/flags/common.go b/v3/internal/flags/common.go deleted file mode 100644 index e58eff411..000000000 --- a/v3/internal/flags/common.go +++ /dev/null @@ -1,5 +0,0 @@ -package flags - -type Common struct { - NoColour bool `description:"Disable colour in output"` -} diff --git a/v3/internal/flags/init.go b/v3/internal/flags/init.go deleted file mode 100644 index 182d98184..000000000 --- a/v3/internal/flags/init.go +++ /dev/null @@ -1,12 +0,0 @@ -package flags - -type Init struct { - Common - - PackageName string `name:"p" description:"Package name" default:"main"` - TemplateName string `name:"t" description:"Name of built-in template to use, path to template or template url" default:"vanilla"` - ProjectName string `name:"n" description:"Name of project" default:""` - ProjectDir string `name:"d" description:"Project directory" default:"."` - Quiet bool `name:"q" description:"Suppress output to console"` - List bool `name:"l" description:"List templates"` -} diff --git a/v3/internal/flags/plugin.go b/v3/internal/flags/plugin.go deleted file mode 100644 index 62c0dd968..000000000 --- a/v3/internal/flags/plugin.go +++ /dev/null @@ -1,9 +0,0 @@ -package flags - -type PluginInit struct { - Name string `name:"n" description:"Name of plugin" default:"example_plugin"` - Description string `name:"d" description:"Description of plugin" default:"Example plugin"` - PackageName string `name:"p" description:"Package name for plugin" default:""` - OutputDir string `name:"o" description:"Output directory" default:"."` - Quiet bool `name:"q" description:"Suppress output to console"` -} diff --git a/v3/internal/parser/README.md b/v3/internal/parser/README.md deleted file mode 100644 index fc6a1c700..000000000 --- a/v3/internal/parser/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Parser - -This package contains the static analyser used for parsing Wails projects so that we may: - -- Generate the bindings for the frontend -- Generate Typescript definitions for the structs used by the bindings - -## Implemented - -- [ ] Bound types - - [x] Struct Literal Pointer - - [ ] Variable - - [ ] Assignment - - [x] Struct Literal Pointer - - [ ] Function - - [ ] Same package - - [ ] Different package - - [ ] Function - -- [x] Parsing of bound methods - - [x] Method names - - [x] Method parameters - - [x] Zero parameters - - [x] Single input parameter - - [x] Single output parameter - - [x] Multiple input parameters - - [x] Multiple output parameters - - [x] Named output parameters - - [x] int/8/16/32/64 - - [x] Pointer - - [x] uint/8/16/32/64 - - [x] Pointer - - [x] float - - [x] Pointer - - [x] string - - [x] Pointer - - [x] bool - - [x] Pointer - - [x] Struct - - [x] Pointer - - [x] Slices - - [x] Pointer - - [x] Maps - - [x] Pointer -- [x] Model Parsing - - [x] In same package - - [x] In different package - - [x] Multiple named fields, e.g. one,two,three string - - [x] Scalars - - [x] Arrays - - [x] Maps - - [x] Structs - - [x] Recursive - - [x] Anonymous -- [ ] Generation of models - - [x] Scalars - - [ ] Arrays - - [ ] Maps - - [x] Structs -- [ ] Generation of bindings - -## Limitations - -There are many ways to write a Go program so there are many program structures that we would need to support. This is a work in progress and will be improved over time. The current limitations are: - -- The call to `application.New()` must be in the `main` package -- Bound structs must be declared as struct literals - diff --git a/v3/internal/parser/bindings.go b/v3/internal/parser/bindings.go deleted file mode 100644 index a5562648a..000000000 --- a/v3/internal/parser/bindings.go +++ /dev/null @@ -1,285 +0,0 @@ -package parser - -import ( - "sort" - "strconv" - "strings" - - "github.com/samber/lo" -) - -const header = `// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -` - -const helperTemplate = `function {{structName}}(method) { - return { - packageName: "{{packageName}}", - serviceName: "{{structName}}", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} -` - -func GenerateHelper(packageName, structName string) string { - result := strings.ReplaceAll(helperTemplate, "{{packageName}}", packageName) - result = strings.ReplaceAll(result, "{{structName}}", structName) - return result -} - -const bindingTemplate = ` -/** - * {{structName}}.{{methodName}} - * Comments - * @param name {string} - * @returns {Promise} - **/ -function {{methodName}}({{inputs}}) { - return wails.Call({{structName}}("{{methodName}}"{{args}})); -} -` - -var reservedWords = []string{ - "abstract", - "arguments", - "await", - "boolean", - "break", - "byte", - "case", - "catch", - "char", - "class", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "double", - "else", - "enum", - "eval", - "export", - "extends", - "false", - "final", - "finally", - "float", - "for", - "function", - "goto", - "if", - "implements", - "import", - "in", - "instanceof", - "int", - "interface", - "let", - "long", - "native", - "new", - "null", - "package", - "private", - "protected", - "public", - "return", - "short", - "static", - "super", - "switch", - "synchronized", - "this", - "throw", - "throws", - "transient", - "true", - "try", - "typeof", - "var", - "void", - "volatile", - "while", - "with", - "yield", - "object", -} - -func sanitiseJSVarName(name string) string { - // if the name is a reserved word, prefix with an - // underscore - if lo.Contains(reservedWords, name) { - return "_" + name - } - return name -} - -func GenerateBinding(structName string, method *BoundMethod) (string, []string) { - var models []string - result := strings.ReplaceAll(bindingTemplate, "{{structName}}", structName) - result = strings.ReplaceAll(result, "{{methodName}}", method.Name) - comments := strings.TrimSpace(method.DocComment) - result = strings.ReplaceAll(result, "Comments", comments) - var params string - for _, input := range method.Inputs { - pkgName := getPackageName(input) - if pkgName != "" { - models = append(models, pkgName) - } - params += " * @param " + sanitiseJSVarName(input.Name) + " {" + input.JSType() + "}\n" - } - params = strings.TrimSuffix(params, "\n") - if len(params) == 0 { - params = " *" - } - result = strings.ReplaceAll(result, " * @param name {string}", params) - var inputs string - for _, input := range method.Inputs { - pkgName := getPackageName(input) - if pkgName != "" { - models = append(models, pkgName) - } - inputs += sanitiseJSVarName(input.Name) + ", " - } - inputs = strings.TrimSuffix(inputs, ", ") - args := inputs - if len(args) > 0 { - args = ", " + args - } - result = strings.ReplaceAll(result, "{{inputs}}", inputs) - result = strings.ReplaceAll(result, "{{args}}", args) - - // outputs - var returns string - if len(method.Outputs) == 0 { - returns = " * @returns {Promise}" - } else { - returns = " * @returns {Promise<" - for _, output := range method.Outputs { - pkgName := getPackageName(output) - if pkgName != "" { - models = append(models, pkgName) - } - jsType := output.JSType() - if jsType == "error" { - jsType = "void" - } - returns += jsType + ", " - } - returns = strings.TrimSuffix(returns, ", ") - returns += ">}" - } - result = strings.ReplaceAll(result, " * @returns {Promise}", returns) - - return result, lo.Uniq(models) -} - -func getPackageName(input *Parameter) string { - if !input.Type.IsStruct { - return "" - } - result := input.Type.Package - if result == "" { - result = "main" - } - return result -} - -func normalisePackageNames(packageNames []string) map[string]string { - // We iterate over the package names and determine if any of them - // have a forward slash. If this is the case, we assume that the - // package name is the last element of the path. If this has already - // been found, then we need to add a digit to the end of the package - // name to make it unique. We return a map of the original package - // name to the new package name. - var result = make(map[string]string) - var packagesConverted = make(map[string]struct{}) - var count = 1 - for _, packageName := range packageNames { - var originalPackageName = packageName - if strings.Contains(packageName, "/") { - parts := strings.Split(packageName, "/") - packageName = parts[len(parts)-1] - } - if _, ok := packagesConverted[packageName]; ok { - // We've already seen this package name. Add a digit - // to the end of the package name to make it unique - count += 1 - packageName += strconv.Itoa(count) - - } - packagesConverted[packageName] = struct{}{} - result[originalPackageName] = packageName - } - - return result -} - -func GenerateBindings(bindings map[string]map[string][]*BoundMethod) map[string]string { - - var result = make(map[string]string) - - var normalisedPackageNames = normalisePackageNames(lo.Keys(bindings)) - // sort the bindings keys - packageNames := lo.Keys(bindings) - sort.Strings(packageNames) - for _, packageName := range packageNames { - var allModels []string - - packageBindings := bindings[packageName] - structNames := lo.Keys(packageBindings) - sort.Strings(structNames) - for _, structName := range structNames { - result[normalisedPackageNames[packageName]] += GenerateHelper(normalisedPackageNames[packageName], structName) - methods := packageBindings[structName] - sort.Slice(methods, func(i, j int) bool { - return methods[i].Name < methods[j].Name - }) - for _, method := range methods { - thisBinding, models := GenerateBinding(structName, method) - result[normalisedPackageNames[packageName]] += thisBinding - allModels = append(allModels, models...) - } - } - - result[normalisedPackageNames[packageName]] += ` -window.go = window.go || {}; -` - // Iterate over the sorted struct keys - result[normalisedPackageNames[packageName]] += "window.go." + normalisedPackageNames[packageName] + " = {\n" - for _, structName := range structNames { - result[normalisedPackageNames[packageName]] += " " + structName + ": {\n" - methods := packageBindings[structName] - sort.Slice(methods, func(i, j int) bool { - return methods[i].Name < methods[j].Name - }) - for _, method := range methods { - result[normalisedPackageNames[packageName]] += " " + method.Name + ",\n" - } - result[normalisedPackageNames[packageName]] += " },\n" - } - result[normalisedPackageNames[packageName]] += "};\n" - - // add imports - if len(allModels) > 0 { - allModels := lo.Uniq(allModels) - var models []string - for _, model := range allModels { - models = append(models, normalisedPackageNames[model]) - } - sort.Strings(models) - result[normalisedPackageNames[packageName]] += "\n" - imports := "import {" + strings.Join(models, ", ") + "} from './models';\n" - result[normalisedPackageNames[packageName]] = imports + "\n" + result[normalisedPackageNames[packageName]] - } - - result[normalisedPackageNames[packageName]] = header + result[normalisedPackageNames[packageName]] - } - - return result -} diff --git a/v3/internal/parser/bindings_test.go b/v3/internal/parser/bindings_test.go deleted file mode 100644 index f6f309b10..000000000 --- a/v3/internal/parser/bindings_test.go +++ /dev/null @@ -1,124 +0,0 @@ -package parser - -import ( - "embed" - "io/fs" - "os" - "testing" - - "github.com/google/go-cmp/cmp" -) - -//go:embed testdata -var testdata embed.FS - -func getFile(filename string) string { - // get the file from the testdata FS - file, err := fs.ReadFile(testdata, filename) - if err != nil { - panic(err) - } - return string(file) -} - -func TestGenerateBindings(t *testing.T) { - - tests := []struct { - dir string - want map[string]string - }{ - { - "testdata/function_single", - map[string]string{ - "main": getFile("testdata/function_single/bindings_main.js"), - }, - }, - { - "testdata/function_from_imported_package", - map[string]string{ - "main": getFile("testdata/function_from_imported_package/bindings_main.js"), - "services": getFile("testdata/function_from_imported_package/bindings_services.js"), - }, - }, - { - "testdata/variable_single", - map[string]string{ - "main": getFile("testdata/variable_single/bindings_main.js"), - }, - }, - { - "testdata/variable_single_from_function", - map[string]string{ - "main": getFile("testdata/variable_single_from_function/bindings_main.js"), - }, - }, - { - "testdata/variable_single_from_other_function", - map[string]string{ - "main": getFile("testdata/variable_single_from_other_function/bindings_main.js"), - "services": getFile("testdata/variable_single_from_other_function/bindings_services.js"), - }, - }, - { - "testdata/struct_literal_single", - map[string]string{ - "main": getFile("testdata/struct_literal_single/bindings_main.js"), - }, - }, - { - "testdata/struct_literal_multiple", - map[string]string{ - "main": getFile("testdata/struct_literal_multiple/bindings_main.js"), - }, - }, - { - "testdata/struct_literal_multiple_other", - map[string]string{ - "main": getFile("testdata/struct_literal_multiple_other/bindings_main.js"), - "services": getFile("testdata/struct_literal_multiple_other/bindings_services.js"), - }, - }, - { - "testdata/struct_literal_multiple_files", - map[string]string{ - "main": getFile("testdata/struct_literal_multiple_files/bindings_main.js"), - }, - }, - } - for _, tt := range tests { - t.Run(tt.dir, func(t *testing.T) { - // Run parser on directory - project, err := ParseProject(tt.dir) - if err != nil { - t.Errorf("ParseProject() error = %v", err) - return - } - - // Generate Bindings - got := GenerateBindings(project.BoundMethods) - - for name, binding := range got { - // check if the binding is in the expected bindings - expected, ok := tt.want[name] - if !ok { - err = os.WriteFile(tt.dir+"/bindings_"+name+".got.js", []byte(binding), 0644) - if err != nil { - t.Errorf("os.WriteFile() error = %v", err) - return - } - t.Errorf("GenerateBindings() unexpected binding = %v", name) - return - } - // compare the binding - if diff := cmp.Diff(expected, binding); diff != "" { - err = os.WriteFile(tt.dir+"/bindings_"+name+".got.js", []byte(binding), 0644) - if err != nil { - t.Errorf("os.WriteFile() error = %v", err) - return - } - t.Fatalf("GenerateBindings() mismatch (-want +got):\n%s", diff) - } - } - }) - } -} diff --git a/v3/internal/parser/models.go b/v3/internal/parser/models.go deleted file mode 100644 index 07ecb3052..000000000 --- a/v3/internal/parser/models.go +++ /dev/null @@ -1,184 +0,0 @@ -package parser - -import ( - "bytes" - "embed" - "io" - "sort" - "strings" - "text/template" -) - -//go:embed templates -var templates embed.FS - -type ModelDefinitions struct { - Package string - Models map[string]*StructDef -} - -func GenerateModel(wr io.Writer, def *ModelDefinitions) error { - tmpl, err := template.New("model.ts.tmpl").ParseFS(templates, "templates/model.ts.tmpl") - if err != nil { - println("Unable to create class template: " + err.Error()) - return err - } - - err = tmpl.ExecuteTemplate(wr, "model.ts.tmpl", def) - if err != nil { - println("Problem executing template: " + err.Error()) - return err - } - return nil -} - -const modelsHeader = `// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT -` - -func pkgAlias(fullPkg string) string { - pkgParts := strings.Split(fullPkg, "/") - return pkgParts[len(pkgParts)-1] -} - -func GenerateModels(models map[packagePath]map[structName]*StructDef) (string, error) { - if models == nil { - return "", nil - } - - var buffer bytes.Buffer - buffer.WriteString(modelsHeader) - - // sort pkgs by alias (e.g. services) instead of full pkg name (e.g. github.com/wailsapp/wails/somedir/services) - // and then sort resulting list by the alias - var keys []string - for pkg, _ := range models { - keys = append(keys, pkg) - } - - sort.Slice(keys, func(i, j int) bool { - return pkgAlias(keys[i]) < pkgAlias(keys[j]) - }) - - for _, pkg := range keys { - err := GenerateModel(&buffer, &ModelDefinitions{ - Package: pkgAlias(pkg), - Models: models[pkg], - }) - if err != nil { - return "", err - } - } - return buffer.String(), nil -} - -//func GenerateClass(wr io.Writer, def *StructDef) error { -// tmpl, err := template.New("class.ts.tmpl").ParseFiles("templates/class.ts.tmpl") -// if err != nil { -// println("Unable to create class template: " + err.Error()) -// return err -// } -// -// err = tmpl.ExecuteTemplate(wr, "class.ts.tmpl", def) -// if err != nil { -// println("Problem executing template: " + err.Error()) -// return err -// } -// return nil -//} - -// -//import ( -// "bytes" -// "fmt" -// "go/ast" -// "go/types" -// "sort" -// "strings" -// "unicode" -//) -// -//func GenerateModels(context *Context) ([]byte, error) { -// var buf bytes.Buffer -// var pkgs []Package -// specs := context.GetBoundStructs() -// for pkg, pkgSpecs := range specs { -// pkgs = append(pkgs, Package{Name: pkg, Specs: pkgSpecs}) -// } -// knownStructs := newAllModels(specs) -// sort.Slice(pkgs, func(i, j int) bool { return pkgs[i].Name < pkgs[j].Name }) -// for _, pkg := range pkgs { -// if _, err := fmt.Fprintf(&buf, "namespace %s {\n", pkg.Name); err != nil { -// return nil, err -// } -// sort.Slice(pkg.Specs, func(i, j int) bool { return pkg.Specs[i].Name.Name < pkg.Specs[j].Name.Name }) -// for _, spec := range pkg.Specs { -// if structType, ok := spec.Type.(*ast.StructType); ok { -// if _, err := fmt.Fprintf(&buf, " class %s {\n", spec.Name.Name); err != nil { -// return nil, err -// } -// -// for _, field := range structType.Fields.List { -// -// // Ignore field names that have a lower case first letter -// if !unicode.IsUpper(rune(field.Names[0].Name[0])) { -// continue -// } -// -// // Get the Go type of the field -// goType := types.ExprString(field.Type) -// // Check if the type is an array -// if arrayType, ok := field.Type.(*ast.ArrayType); ok { -// // Get the element type of the array -// elementType := types.ExprString(arrayType.Elt) -// // Look up the corresponding TypeScript type -// tsType, ok := goToTS[elementType] -// if !ok { -// // strip off the * prefix if it is there -// if strings.HasPrefix(elementType, "*") { -// elementType = elementType[1:] -// } -// if knownStructs.exists(elementType) { -// tsType = elementType -// } else { -// tsType = "any" -// } -// } -// // Output the field as an array of the corresponding TypeScript type -// if _, err := fmt.Fprintf(&buf, " %s: %s[];\n", field.Names[0].Name, tsType); err != nil { -// return nil, err -// } -// } else { -// // strip off the * prefix if it is there -// if strings.HasPrefix(goType, "*") { -// goType = goType[1:] -// } -// // Look up the corresponding TypeScript type -// tsType, ok := goToTS[goType] -// if !ok { -// if knownStructs.exists(goType) { -// tsType = goType -// } else { -// tsType = "any" -// } -// } -// // Output the field as the corresponding TypeScript type -// if _, err := fmt.Fprintf(&buf, " %s: %s;\n", field.Names[0].Name, tsType); err != nil { -// return nil, err -// } -// } -// } -// -// if _, err := fmt.Fprintf(&buf, " }\n"); err != nil { -// return nil, err -// } -// } -// } -// -// if _, err := fmt.Fprintf(&buf, "}\n\n"); err != nil { -// return nil, err -// } -// } -// return buf.Bytes(), nil -//} diff --git a/v3/internal/parser/models_test.go b/v3/internal/parser/models_test.go deleted file mode 100644 index b2668511e..000000000 --- a/v3/internal/parser/models_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package parser - -import ( - "github.com/google/go-cmp/cmp" - "os" - "path/filepath" - "testing" -) - -func TestGenerateModels(t *testing.T) { - - tests := []struct { - dir string - want string - }{ - { - "testdata/function_single", - "", - }, - { - "testdata/function_from_imported_package", - getFile("testdata/function_from_imported_package/models.ts"), - }, - { - "testdata/variable_single", - "", - }, - { - "testdata/variable_single_from_function", - "", - }, - { - "testdata/variable_single_from_other_function", - getFile("testdata/variable_single_from_other_function/models.ts"), - }, - { - "testdata/struct_literal_single", - getFile("testdata/struct_literal_single/models.ts"), - }, - { - "testdata/struct_literal_multiple", - "", - }, - { - "testdata/struct_literal_multiple_other", - getFile("testdata/struct_literal_multiple_other/models.ts"), - }, - { - "testdata/struct_literal_multiple_files", - "", - }, - } - for _, tt := range tests { - t.Run(tt.dir, func(t *testing.T) { - // Run parser on directory - project, err := ParseProject(tt.dir) - if err != nil { - t.Fatalf("ParseProject() error = %v", err) - } - - // Generate Models - got, err := GenerateModels(project.Models) - if err != nil { - t.Fatalf("GenerateModels() error = %v", err) - } - - if diff := cmp.Diff(tt.want, got); diff != "" { - err = os.WriteFile(filepath.Join(tt.dir, "models.got.ts"), []byte(got), 0644) - if err != nil { - t.Errorf("os.WriteFile() error = %v", err) - return - } - t.Fatalf("GenerateModels() mismatch (-want +got):\n%s", diff) - } - }) - } -} diff --git a/v3/internal/parser/parser.go b/v3/internal/parser/parser.go deleted file mode 100644 index cae51fa13..000000000 --- a/v3/internal/parser/parser.go +++ /dev/null @@ -1,809 +0,0 @@ -package parser - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "log" - "os" - "path/filepath" - "reflect" - "strconv" - "strings" -) - -type packagePath = string -type structName = string - -type StructDef struct { - Name string - DocComment string - Fields []*Field -} - -type ParameterType struct { - Name string - IsStruct bool - IsSlice bool - IsPointer bool - MapKey *ParameterType - MapValue *ParameterType - Package string -} - -type Parameter struct { - Name string - Type *ParameterType -} - -func (p *Parameter) JSType() string { - // Convert type to javascript equivalent type - var typeName string - switch p.Type.Name { - case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64": - typeName = "number" - case "string": - typeName = "string" - case "bool": - typeName = "boolean" - default: - typeName = p.Type.Name - } - - // if the type is a struct, we need to add the package name - if p.Type.IsStruct { - if p.Type.Package != "" { - parts := strings.Split(p.Type.Package, "/") - typeName = parts[len(parts)-1] + "." + typeName - // TODO: Check if this is a duplicate package name - } - } - - // Add slice suffix - if p.Type.IsSlice { - typeName += "[]" - } - - // Add pointer suffix - if p.Type.IsPointer { - typeName += " | null" - } - - return typeName -} - -type BoundMethod struct { - Name string - DocComment string - Inputs []*Parameter - Outputs []*Parameter -} - -type Field struct { - Name string - Type *ParameterType -} - -func (f *Field) JSName() string { - return strings.ToLower(f.Name[0:1]) + f.Name[1:] -} - -// TSBuild contains the typescript to build a field for a JS object -// via assignment for simple types or constructors for structs -func (f *Field) TSBuild(pkg string) string { - if !f.Type.IsStruct { - return fmt.Sprintf("source['%s']", f.JSName()) - } - - if f.Type.Package == "" || f.Type.Package == pkg { - return fmt.Sprintf("%s.createFrom(source['%s'])", f.Type.Name, f.JSName()) - } - - return fmt.Sprintf("%s.%s.createFrom(source['%s'])", pkgAlias(f.Type.Package), f.Type.Name, f.JSName()) -} - -func (f *Field) JSDef(pkg string) string { - var jsType string - switch f.Type.Name { - case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64": - jsType = "number" - case "string": - jsType = "string" - case "bool": - jsType = "boolean" - default: - jsType = f.Type.Name - } - - var result string - if f.Type.Package == "" || f.Type.Package == pkg { - result += fmt.Sprintf("%s: %s;", f.JSName(), jsType) - } else { - parts := strings.Split(f.Type.Package, "/") - result += fmt.Sprintf("%s: %s.%s;", f.JSName(), parts[len(parts)-1], jsType) - } - - if !ast.IsExported(f.Name) { - result += " // Warning: this is unexported in the Go struct." - } - - return result -} - -type ParsedPackage struct { - Pkg *ast.Package - Name string - Path string - Dir string - StructCache map[structName]*StructDef -} - -type Project struct { - packageCache map[string]*ParsedPackage - Path string - BoundMethods map[packagePath]map[structName][]*BoundMethod - Models map[packagePath]map[structName]*StructDef - anonymousStructIDCounter int -} - -func ParseProject(projectPath string) (*Project, error) { - result := &Project{ - BoundMethods: make(map[packagePath]map[structName][]*BoundMethod), - packageCache: make(map[string]*ParsedPackage), - } - pkgs, err := result.parseDirectory(projectPath) - if err != nil { - return nil, err - } - err = result.findApplicationNewCalls(pkgs) - if err != nil { - return nil, err - } - for _, pkg := range result.packageCache { - if len(pkg.StructCache) > 0 { - if result.Models == nil { - result.Models = make(map[packagePath]map[structName]*StructDef) - } - result.Models[pkg.Path] = pkg.StructCache - } - } - return result, nil -} - -func GenerateBindingsAndModels(projectDir string, outputDir string) error { - p, err := ParseProject(projectDir) - if err != nil { - return err - } - - if p.BoundMethods == nil { - return nil - } - err = os.MkdirAll(outputDir, 0755) - if err != nil { - return err - } - generatedMethods := GenerateBindings(p.BoundMethods) - for pkg, text := range generatedMethods { - // Write the file - err = os.WriteFile(filepath.Join(outputDir, "bindings_"+pkg+".js"), []byte(text), 0644) - if err != nil { - return err - } - } - - // Generate Models - if len(p.Models) > 0 { - generatedModels, err := GenerateModels(p.Models) - if err != nil { - return err - } - err = os.WriteFile(filepath.Join(outputDir, "models.ts"), []byte(generatedModels), 0644) - if err != nil { - return err - } - } - - absPath, err := filepath.Abs(projectDir) - if err != nil { - return err - } - println("Generated bindings and models for project: " + absPath) - absPath, err = filepath.Abs(outputDir) - if err != nil { - return err - } - println("Output directory: " + absPath) - - return nil -} - -func (p *Project) parseDirectory(dir string) (map[string]*ParsedPackage, error) { - if p.packageCache[dir] != nil { - return map[string]*ParsedPackage{dir: p.packageCache[dir]}, nil - } - // Parse the directory - fset := token.NewFileSet() - if dir == "." || dir == "" { - cwd, err := os.Getwd() - if err != nil { - return nil, err - } - dir = cwd - } - pkgs, err := parser.ParseDir(fset, dir, nil, parser.ParseComments) - if err != nil { - return nil, err - } - var result = make(map[string]*ParsedPackage) - for packageName, pkg := range pkgs { - parsedPackage := &ParsedPackage{ - Pkg: pkg, - Name: packageName, - Path: packageName, - Dir: getDirectoryForPackage(pkg), - StructCache: make(map[structName]*StructDef), - } - p.packageCache[packageName] = parsedPackage - result[packageName] = parsedPackage - } - return result, nil -} - -func (p *Project) findApplicationNewCalls(pkgs map[string]*ParsedPackage) (err error) { - - var callFound bool - - for _, pkg := range pkgs { - thisPackage := pkg.Pkg - // Iterate through the package's files - for _, file := range thisPackage.Files { - // Use an ast.Inspector to find the calls to application.New - ast.Inspect(file, func(n ast.Node) bool { - // Check if the node is a call expression - callExpr, ok := n.(*ast.CallExpr) - if !ok { - return true - } - - // Check if the function being called is "application.New" - selExpr, ok := callExpr.Fun.(*ast.SelectorExpr) - if !ok { - return true - } - if selExpr.Sel.Name != "New" { - return true - } - if id, ok := selExpr.X.(*ast.Ident); !ok || id.Name != "application" { - return true - } - - // Check there is only 1 argument - if len(callExpr.Args) != 1 { - return true - } - - // Check argument 1 is a struct literal - structLit, ok := callExpr.Args[0].(*ast.CompositeLit) - if !ok { - return true - } - - // Check struct literal is of type "application.Options" - selectorExpr, ok := structLit.Type.(*ast.SelectorExpr) - if !ok { - return true - } - if selectorExpr.Sel.Name != "Options" { - return true - } - if id, ok := selectorExpr.X.(*ast.Ident); !ok || id.Name != "application" { - return true - } - - for _, elt := range structLit.Elts { - // Find the "Bind" field - kvExpr, ok := elt.(*ast.KeyValueExpr) - if !ok { - continue - } - if id, ok := kvExpr.Key.(*ast.Ident); !ok || id.Name != "Bind" { - continue - } - // Check the value is a slice of interfaces - sliceExpr, ok := kvExpr.Value.(*ast.CompositeLit) - if !ok { - continue - } - var arrayType *ast.ArrayType - if arrayType, ok = sliceExpr.Type.(*ast.ArrayType); !ok { - continue - } - - // Check array type is of type "interface{}" - if _, ok := arrayType.Elt.(*ast.InterfaceType); !ok { - continue - } - callFound = true - // Iterate through the slice elements - for _, elt := range sliceExpr.Elts { - result, shouldContinue := p.parseBoundExpression(elt, pkg) - if shouldContinue { - continue - } - return result - - } - } - - return true - }) - } - if !callFound { - return fmt.Errorf("no Bound structs found") - } - } - return nil -} - -func (p *Project) parseBoundUnaryExpression(unaryExpr *ast.UnaryExpr, pkg *ParsedPackage) (bool, bool) { - // Check the unary expression is a composite lit - - switch t := unaryExpr.X.(type) { - case *ast.CompositeLit: - return p.parseBoundCompositeLit(t, pkg) - } - return false, true - -} - -func (p *Project) addBoundMethods(packagePath string, name string, boundMethods []*BoundMethod) { - _, ok := p.BoundMethods[packagePath] - if !ok { - p.BoundMethods[packagePath] = make(map[structName][]*BoundMethod) - } - p.BoundMethods[packagePath][name] = boundMethods -} - -func (p *Project) parseBoundStructMethods(name string, pkg *ParsedPackage) error { - var methods []*BoundMethod - // Iterate over all files in the package - for _, file := range pkg.Pkg.Files { - // Iterate over all declarations in the file - for _, decl := range file.Decls { - // Check if the declaration is a type declaration - if funcDecl, ok := decl.(*ast.FuncDecl); ok && funcDecl.Recv != nil { - // Check if the function has a receiver argument of the struct type - recvType, ok := funcDecl.Recv.List[0].Type.(*ast.StarExpr) - if ok { - if ident, ok := recvType.X.(*ast.Ident); ok && ident.Name == name { - // Add the method to the list of methods - method := &BoundMethod{ - Name: funcDecl.Name.Name, - DocComment: funcDecl.Doc.Text(), - } - - if funcDecl.Type.Params != nil { - method.Inputs = p.parseParameters(funcDecl.Type.Params, pkg) - } - if funcDecl.Type.Results != nil { - method.Outputs = p.parseParameters(funcDecl.Type.Results, pkg) - } - - methods = append(methods, method) - } - } - } - } - } - p.addBoundMethods(pkg.Path, name, methods) - return nil -} - -func (p *Project) parseParameters(params *ast.FieldList, pkg *ParsedPackage) []*Parameter { - var result []*Parameter - for _, field := range params.List { - var theseFields []*Parameter - if len(field.Names) > 0 { - for _, name := range field.Names { - theseFields = append(theseFields, &Parameter{ - Name: name.Name, - }) - } - } else { - theseFields = append(theseFields, &Parameter{ - Name: "", - }) - } - // loop over fields - for _, thisField := range theseFields { - thisField.Type = p.parseParameterType(field, pkg) - result = append(result, thisField) - } - } - return result -} - -func (p *Project) parseParameterType(field *ast.Field, pkg *ParsedPackage) *ParameterType { - result := &ParameterType{} - result.Name = getTypeString(field.Type) - switch t := field.Type.(type) { - case *ast.Ident: - result.IsStruct = isStructType(t) - case *ast.StarExpr: - result = p.parseParameterType(&ast.Field{Type: t.X}, pkg) - result.IsPointer = true - case *ast.StructType: - result.IsStruct = true - if result.Name == "" { - // Anonymous struct - result.Name = p.anonymousStructID() - // Create a new struct definition - result := &StructDef{ - Name: result.Name, - } - pkg.StructCache[result.Name] = result - // Parse the fields - result.Fields = p.parseStructFields(&ast.StructType{ - Fields: t.Fields, - }, pkg) - _ = result - } - case *ast.SelectorExpr: - extPackage, err := p.getParsedPackageFromName(t.X.(*ast.Ident).Name, pkg) - if err != nil { - log.Fatal(err) - } - result.IsStruct = p.getStructDef(t.Sel.Name, extPackage) - result.Package = extPackage.Path - case *ast.ArrayType: - result.IsSlice = true - result.IsStruct = isStructType(t.Elt) - case *ast.MapType: - tempfield := &ast.Field{Type: t.Key} - result.MapKey = p.parseParameterType(tempfield, pkg) - tempfield.Type = t.Value - result.MapValue = p.parseParameterType(tempfield, pkg) - default: - } - if result.IsStruct { - p.getStructDef(result.Name, pkg) - if result.Package == "" { - result.Package = pkg.Path - } - } - return result -} - -func (p *Project) getStructDef(name string, pkg *ParsedPackage) bool { - _, ok := pkg.StructCache[name] - if ok { - return true - } - // Iterate over all files in the package - for _, file := range pkg.Pkg.Files { - // Iterate over all declarations in the file - for _, decl := range file.Decls { - // Check if the declaration is a type declaration - if typeDecl, ok := decl.(*ast.GenDecl); ok { - // Check if the type declaration is a struct type - if typeDecl.Tok == token.TYPE { - for _, spec := range typeDecl.Specs { - if typeSpec, ok := spec.(*ast.TypeSpec); ok { - if structType, ok := typeSpec.Type.(*ast.StructType); ok { - if typeSpec.Name.Name == name { - result := &StructDef{ - Name: name, - DocComment: typeDecl.Doc.Text(), - } - pkg.StructCache[name] = result - result.Fields = p.parseStructFields(structType, pkg) - return true - } - } - } - } - } - } - } - } - return false -} - -func (p *Project) parseStructFields(structType *ast.StructType, pkg *ParsedPackage) []*Field { - var result []*Field - for _, field := range structType.Fields.List { - var theseFields []*Field - if len(field.Names) > 0 { - for _, name := range field.Names { - theseFields = append(theseFields, &Field{ - Name: name.Name, - }) - } - } else { - theseFields = append(theseFields, &Field{ - Name: "", - }) - } - // loop over fields - for _, thisField := range theseFields { - paramType := p.parseParameterType(field, pkg) - if paramType.IsStruct { - _, ok := pkg.StructCache[paramType.Name] - if !ok { - p.getStructDef(paramType.Name, pkg) - } - if paramType.Package == "" { - paramType.Package = pkg.Path - } - } - thisField.Type = paramType - result = append(result, thisField) - } - } - return result -} - -func (p *Project) getParsedPackageFromName(packageName string, currentPackage *ParsedPackage) (*ParsedPackage, error) { - for _, file := range currentPackage.Pkg.Files { - for _, imp := range file.Imports { - path, err := strconv.Unquote(imp.Path.Value) - if err != nil { - return nil, err - } - _, lastPathElement := filepath.Split(path) - if imp.Name != nil && imp.Name.Name == packageName || lastPathElement == packageName { - // Get the directory for the package - dir, err := getPackageDir(path) - if err != nil { - return nil, err - } - pkg, err := p.getPackageFromPath(dir, path) - if err != nil { - return nil, err - } - result := &ParsedPackage{ - Pkg: pkg, - Name: packageName, - Path: path, - Dir: dir, - StructCache: make(map[string]*StructDef), - } - p.packageCache[path] = result - return result, nil - } - } - } - return nil, fmt.Errorf("package %s not found in %s", packageName, currentPackage.Name) -} - -func getPackageDir(importPath string) (string, error) { - pkg, err := build.Import(importPath, "", build.FindOnly) - if err != nil { - return "", err - } - return pkg.Dir, nil -} - -func (p *Project) getPackageFromPath(packagedir string, packagepath string) (*ast.Package, error) { - impPkg, err := parser.ParseDir(token.NewFileSet(), packagedir, nil, parser.AllErrors) - if err != nil { - return nil, err - } - for impName, impPkg := range impPkg { - if impName == "main" { - continue - } - return impPkg, nil - } - return nil, fmt.Errorf("package not found in imported package %s", packagepath) -} - -func (p *Project) anonymousStructID() string { - p.anonymousStructIDCounter++ - return fmt.Sprintf("anon%d", p.anonymousStructIDCounter) -} - -func (p *Project) parseBoundExpression(elt ast.Expr, pkg *ParsedPackage) (bool, bool) { - - switch t := elt.(type) { - case *ast.UnaryExpr: - return p.parseBoundUnaryExpression(t, pkg) - case *ast.Ident: - return p.parseBoundIdent(t, pkg) - case *ast.CallExpr: - return p.parseBoundCallExpression(t, pkg) - default: - println("unhandled expression type", reflect.TypeOf(t).String()) - } - - return false, false -} - -func (p *Project) parseBoundIdent(ident *ast.Ident, pkg *ParsedPackage) (bool, bool) { - if ident.Obj == nil { - return false, true - } - switch t := ident.Obj.Decl.(type) { - //case *ast.StructType: - // return p.parseBoundStruct(t, pkg) - case *ast.TypeSpec: - return p.parseBoundTypeSpec(t, pkg) - case *ast.AssignStmt: - return p.parseBoundAssignment(t, pkg) - default: - println("unhandled ident type", reflect.TypeOf(t).String()) - } - return false, false -} - -func (p *Project) parseBoundAssignment(assign *ast.AssignStmt, pkg *ParsedPackage) (bool, bool) { - return p.parseBoundExpression(assign.Rhs[0], pkg) -} - -func (p *Project) parseBoundCompositeLit(lit *ast.CompositeLit, pkg *ParsedPackage) (bool, bool) { - - switch t := lit.Type.(type) { - case *ast.StructType: - //return p.parseBoundStructType(t, pkg) - return false, true - case *ast.Ident: - err := p.parseBoundStructMethods(t.Name, pkg) - if err != nil { - return true, false - } - return false, true - case *ast.SelectorExpr: - return p.parseBoundSelectorExpression(t, pkg) - } - - return false, true -} - -func (p *Project) parseBoundSelectorExpression(selector *ast.SelectorExpr, pkg *ParsedPackage) (bool, bool) { - - switch t := selector.X.(type) { - case *ast.Ident: - // Look up the package - var parsedPackage *ParsedPackage - parsedPackage, err := p.getParsedPackageFromName(t.Name, pkg) - if err != nil { - return true, false - } - err = p.parseBoundStructMethods(selector.Sel.Name, parsedPackage) - if err != nil { - return true, false - } - return false, true - default: - println("unhandled selector type", reflect.TypeOf(t).String()) - } - return false, true -} - -func (p *Project) parseBoundCallExpression(callExpr *ast.CallExpr, pkg *ParsedPackage) (bool, bool) { - - // Check if this call returns a struct pointer - switch t := callExpr.Fun.(type) { - case *ast.Ident: - if t.Obj == nil { - return false, true - } - switch t := t.Obj.Decl.(type) { - case *ast.FuncDecl: - return p.parseBoundFuncDecl(t, pkg) - } - - case *ast.SelectorExpr: - // Get package for selector - var parsedPackage *ParsedPackage - parsedPackage, err := p.getParsedPackageFromName(t.X.(*ast.Ident).Name, pkg) - if err != nil { - return true, false - } - // Get function from package - var extFundDecl *ast.FuncDecl - extFundDecl, err = p.getFunctionFromName(t.Sel.Name, parsedPackage) - if err != nil { - return true, false - } - return p.parseBoundFuncDecl(extFundDecl, parsedPackage) - default: - println("unhandled call type", reflect.TypeOf(t).String()) - } - - return false, true -} - -func (p *Project) parseBoundFuncDecl(t *ast.FuncDecl, pkg *ParsedPackage) (bool, bool) { - if t.Type.Results == nil { - return false, true - } - if len(t.Type.Results.List) != 1 { - return false, true - } - switch t := t.Type.Results.List[0].Type.(type) { - case *ast.StarExpr: - return p.parseBoundExpression(t.X, pkg) - default: - println("Unhandled funcdecl type", reflect.TypeOf(t).String()) - } - return false, false -} - -func (p *Project) parseBoundTypeSpec(typeSpec *ast.TypeSpec, pkg *ParsedPackage) (bool, bool) { - switch t := typeSpec.Type.(type) { - case *ast.StructType: - err := p.parseBoundStructMethods(typeSpec.Name.Name, pkg) - if err != nil { - return true, false - } - default: - println("unhandled type spec type", reflect.TypeOf(t).String()) - } - return false, true -} - -func (p *Project) getFunctionFromName(name string, parsedPackage *ParsedPackage) (*ast.FuncDecl, error) { - for _, f := range parsedPackage.Pkg.Files { - for _, decl := range f.Decls { - switch t := decl.(type) { - case *ast.FuncDecl: - if t.Name.Name == name { - return t, nil - } - } - } - } - return nil, fmt.Errorf("function not found") -} - -func getTypeString(expr ast.Expr) string { - switch t := expr.(type) { - case *ast.Ident: - return t.Name - case *ast.StarExpr: - return getTypeString(t.X) - case *ast.ArrayType: - return getTypeString(t.Elt) - case *ast.MapType: - return "map" - case *ast.SelectorExpr: - return getTypeString(t.Sel) - default: - return "" - } -} - -func isStructType(expr ast.Expr) bool { - switch e := expr.(type) { - case *ast.StructType: - return true - case *ast.StarExpr: - return isStructType(e.X) - case *ast.SelectorExpr: - return isStructType(e.Sel) - case *ast.ArrayType: - return isStructType(e.Elt) - case *ast.SliceExpr: - return isStructType(e.X) - case *ast.Ident: - return e.Obj != nil && e.Obj.Kind == ast.Typ - default: - return false - } -} - -func getDirectoryForPackage(pkg *ast.Package) string { - for filename := range pkg.Files { - path := filepath.Dir(filename) - abs, err := filepath.Abs(path) - if err != nil { - panic(err) - } - return abs - } - return "" -} diff --git a/v3/internal/parser/parser_test.go b/v3/internal/parser/parser_test.go deleted file mode 100644 index ea1705daa..000000000 --- a/v3/internal/parser/parser_test.go +++ /dev/null @@ -1,1559 +0,0 @@ -package parser - -import ( - "testing" - - "github.com/google/go-cmp/cmp" -) - -func TestParseDirectory(t *testing.T) { - tests := []struct { - name string - dir string - wantBoundMethods map[string]map[string][]*BoundMethod - wantModels map[string]map[string]*StructDef - wantErr bool - }{ - { - name: "should find single bound service", - dir: "testdata/struct_literal_single", - //wantModels: []string{"main.GreetService"}, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet someone\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "NoInputsStringOut", - DocComment: "", - Inputs: nil, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "StringArrayInputStringOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "StringArrayInputStringArrayOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - }, - { - Name: "StringArrayInputNamedOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "output", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - }, - { - Name: "StringArrayInputNamedOutputs", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "output", - Type: &ParameterType{ - Name: "string", - IsSlice: true, - }, - }, - { - Name: "err", - Type: &ParameterType{ - Name: "error", - }, - }, - }, - }, - { - Name: "IntPointerInputNamedOutputs", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "output", - Type: &ParameterType{ - Name: "int", - IsPointer: true, - }, - }, - { - Name: "err", - Type: &ParameterType{ - Name: "error", - }}, - }, - }, - { - Name: "UIntPointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint", - IsPointer: true, - }, - }, - }, - }, - { - Name: "UInt8PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint8", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint8", - IsPointer: true, - }, - }, - }, - }, - { - Name: "UInt16PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint16", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint16", - IsPointer: true, - }, - }, - }, - }, - { - Name: "UInt32PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint32", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint32", - IsPointer: true, - }, - }, - }, - }, - { - Name: "UInt64PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint64", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint64", - IsPointer: true, - }, - }, - }, - }, - { - Name: "IntPointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int", - IsPointer: true, - }, - }, - }, - }, - { - Name: "Int8PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int8", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int8", - IsPointer: true, - }, - }, - }, - }, - { - Name: "Int16PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int16", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int16", - IsPointer: true, - }, - }, - }, - }, - { - Name: "Int32PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int32", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int32", - IsPointer: true, - }, - }, - }, - }, - { - Name: "Int64PointerInAndOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int64", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int64", - IsPointer: true, - }, - }, - }, - }, - { - Name: "IntInIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int", - }, - }, - }, - }, - { - Name: "Int8InIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int8", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int8", - }, - }, - }, - }, - { - Name: "Int16InIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int16", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int16", - }, - }, - }, - }, - { - Name: "Int32InIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int32", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int32", - }, - }, - }, - }, - { - Name: "Int64InIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int64", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "int64", - }, - }, - }, - }, - { - Name: "UIntInUIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint", - }, - }, - }, - }, - { - Name: "UInt8InUIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint8", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint8", - }, - }, - }, - }, - { - Name: "UInt16InUIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint16", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint16", - }, - }, - }, - }, - { - Name: "UInt32InUIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint32", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint32", - }, - }, - }, - }, - { - Name: "UInt64InUIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "uint64", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "uint64", - }, - }, - }, - }, - { - Name: "Float32InFloat32Out", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "float32", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "float32", - }, - }, - }, - }, - { - Name: "Float64InFloat64Out", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "float64", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "float64", - }, - }, - }, - }, - { - Name: "PointerFloat32InFloat32Out", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "float32", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "float32", - IsPointer: true, - }, - }, - }, - }, - { - Name: "PointerFloat64InFloat64Out", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "float64", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "float64", - IsPointer: true, - }, - }, - }, - }, - { - Name: "BoolInBoolOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "bool", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "bool", - }, - }, - }, - }, - { - Name: "PointerBoolInBoolOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "bool", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "bool", - IsPointer: true, - }, - }, - }, - }, - { - Name: "PointerStringInStringOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "string", - IsPointer: true, - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "string", - IsPointer: true, - }, - }, - }, - }, - { - Name: "StructPointerInputErrorOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "error", - }, - }, - }, - }, - { - Name: "StructInputStructOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "Person", - IsStruct: true, - Package: "main", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "Person", - IsStruct: true, - Package: "main", - }, - }, - }, - }, - { - Name: "StructPointerInputStructPointerOutput", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - }, - { - Name: "MapIntInt", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "map", - MapKey: &ParameterType{ - Name: "int", - }, - MapValue: &ParameterType{ - Name: "int", - }, - }, - }, - }, - }, - { - Name: "PointerMapIntInt", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "map", - IsPointer: true, - MapKey: &ParameterType{ - Name: "int", - }, - MapValue: &ParameterType{ - Name: "int", - }, - }, - }, - }, - }, - { - Name: "MapIntPointerInt", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "map", - MapKey: &ParameterType{ - Name: "int", - IsPointer: true, - }, - MapValue: &ParameterType{ - Name: "int", - }, - }, - }, - }, - }, - { - Name: "MapIntSliceInt", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "map", - MapKey: &ParameterType{ - Name: "int", - }, - MapValue: &ParameterType{ - Name: "int", - IsSlice: true, - }, - }, - }, - }, - }, - { - Name: "MapIntSliceIntInMapIntSliceIntOut", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "map", - MapKey: &ParameterType{ - Name: "int", - }, - MapValue: &ParameterType{ - Name: "int", - IsSlice: true, - }, - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "out", - Type: &ParameterType{ - Name: "map", - MapKey: &ParameterType{ - Name: "int", - }, - MapValue: &ParameterType{ - Name: "int", - IsSlice: true, - }, - }, - }, - }, - }, - { - Name: "ArrayInt", - Inputs: []*Parameter{ - { - Name: "in", - Type: &ParameterType{ - Name: "int", - IsSlice: true, - }, - }, - }, - }, - }, - }, - }, - wantModels: map[string]map[string]*StructDef{ - "main": { - "Person": { - Name: "Person", - Fields: []*Field{ - { - Name: "Name", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Parent", - Type: &ParameterType{ - Name: "Person", - IsStruct: true, - IsPointer: true, - Package: "main", - }, - }, - { - Name: "Details", - Type: &ParameterType{ - Name: "anon1", - IsStruct: true, - Package: "main", - }, - }, - }, - }, - "anon1": { - Name: "anon1", - Fields: []*Field{ - { - Name: "Age", - Type: &ParameterType{ - Name: "int", - }, - }, - { - Name: "Address", - Type: &ParameterType{ - Name: "anon2", - IsStruct: true, - Package: "main", - }, - }, - }, - }, - "anon2": { - Name: "anon2", - Fields: []*Field{ - { - Name: "Street", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - wantErr: false, - }, - { - name: "should find multiple bound services", - dir: "testdata/struct_literal_multiple", - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - "OtherService": { - { - Name: "Hello", - }, - }, - }, - }, - wantErr: false, - }, - { - name: "should find multiple bound services over multiple files", - dir: "testdata/struct_literal_multiple_files", - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - "OtherService": { - { - Name: "Hello", - }, - }, - }, - }, - wantErr: false, - }, - { - name: "should find multiple bound services over multiple packages", - dir: "testdata/struct_literal_multiple_other", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet does XYZ\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "NewPerson", - DocComment: "NewPerson creates a new person\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services": { - "OtherService": { - { - Name: "Yay", - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services", - }, - }, - }, - }, - }, - }, - }, - wantModels: map[string]map[string]*StructDef{ - "main": { - "Person": { - Name: "Person", - Fields: []*Field{ - { - Name: "Name", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Address", - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services", - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services": { - "Address": { - Name: "Address", - Fields: []*Field{ - { - Name: "Street", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "State", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Country", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - { - name: "should find a bound services using a variable", - dir: "testdata/variable_single", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet someone\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - }, - { - name: "should find a bound services using a variable from function call", - dir: "testdata/variable_single_from_function", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet someone\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - }, - { - name: "should find a bound services using a variable from function call in another package", - dir: "testdata/variable_single_from_other_function", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet does XYZ\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "NewPerson", - DocComment: "NewPerson creates a new person\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": { - "OtherService": { - { - Name: "Yay", - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services", - }, - }, - }, - }, - }, - }, - }, - wantModels: map[string]map[string]*StructDef{ - "main": { - "Person": { - Name: "Person", - Fields: []*Field{ - { - Name: "Name", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Address", - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services", - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": { - "Address": { - Name: "Address", - Fields: []*Field{ - { - Name: "Street", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "State", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Country", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - { - name: "should find a bound service returned from a function call", - dir: "testdata/function_single", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet someone\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - }, - { - name: "should find a bound service returned from a function call in another package", - dir: "testdata/function_from_imported_package", - wantErr: false, - wantBoundMethods: map[string]map[string][]*BoundMethod{ - "main": { - "GreetService": { - { - Name: "Greet", - DocComment: "Greet does XYZ\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - { - Name: "NewPerson", - DocComment: "NewPerson creates a new person\n", - Inputs: []*Parameter{ - { - Name: "name", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - Outputs: []*Parameter{ - { - Name: "", - Type: &ParameterType{ - Name: "Person", - IsPointer: true, - IsStruct: true, - Package: "main", - }, - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": { - "OtherService": { - { - Name: "Yay", - Outputs: []*Parameter{ - { - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services", - }, - }, - }, - }, - }, - }, - }, - wantModels: map[string]map[string]*StructDef{ - "main": { - "Person": { - Name: "Person", - Fields: []*Field{ - { - Name: "Name", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Address", - Type: &ParameterType{ - Name: "Address", - IsStruct: true, - IsPointer: true, - Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services", - }, - }, - }, - }, - }, - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": { - "Address": { - Name: "Address", - Fields: []*Field{ - { - Name: "Street", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "State", - Type: &ParameterType{ - Name: "string", - }, - }, - { - Name: "Country", - Type: &ParameterType{ - Name: "string", - }, - }, - }, - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := ParseProject(tt.dir) - if (err != nil) != tt.wantErr { - t.Errorf("ParseDirectory() error = %v, wantErr %v", err, tt.wantErr) - return - } - if diff := cmp.Diff(tt.wantBoundMethods, got.BoundMethods); diff != "" { - t.Errorf("ParseDirectory() failed:\n" + diff) - } - if diff := cmp.Diff(tt.wantModels, got.Models); diff != "" { - t.Errorf("ParseDirectory() failed:\n" + diff) - } - }) - } - -} - -//func TestGenerateTypeScript(t *testing.T) { -// tests := []struct { -// name string -// dir string -// wantModels string -// wantErr bool -// }{ -// { -// name: "should find single bound service", -// dir: "testdata/struct_literal_single", -// wantModels: `namespace main { -// class GreetService { -// SomeVariable: number; -// } -//} -//`, -// wantErr: false, -// }, -// { -// name: "should find multiple bound services", -// dir: "testdata/struct_literal_multiple", -// wantModels: `namespace main { -// class GreetService { -// SomeVariable: number; -// } -// class OtherService { -// } -//} -//`, -// wantErr: false, -// }, -// { -// name: "should find multiple bound services over multiple files", -// dir: "testdata/struct_literal_multiple_files", -// wantModels: `namespace main { -// class GreetService { -// SomeVariable: number; -// } -// class OtherService { -// } -//} -//`, -// wantErr: false, -// }, -// { -// name: "should find bound services from other packages", -// dir: "../../examples/binding", -// wantModels: `namespace main { -// class localStruct { -// } -//} -//namespace models { -// class Person { -// Name: string; -// } -//} -//namespace services { -// class GreetService { -// SomeVariable: number; -// Parent: models.Person; -// } -//} -//`, -// wantErr: false, -// }, -// } -// for _, tt := range tests { -// t.Run(tt.name, func(t *testing.T) { -// Debug = true -// context, err := ParseDirectory(tt.dir) -// if (err != nil) != tt.wantErr { -// t.Errorf("ParseDirectory() error = %v, wantErr %v", err, tt.wantErr) -// return -// } -// -// ts, err := GenerateModels(context) -// require.NoError(t, err) -// require.Equal(t, tt.wantModels, string(ts)) -// -// }) -// } -//} diff --git a/v3/internal/parser/templates/class.ts.tmpl b/v3/internal/parser/templates/class.ts.tmpl deleted file mode 100644 index 886f6b663..000000000 --- a/v3/internal/parser/templates/class.ts.tmpl +++ /dev/null @@ -1,16 +0,0 @@ - export class {{.Name}} { - {{range .Fields}}{{.}} - {{end}} - static createFrom(source: any = {}) { - return new {{.Name}}(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - {{range .Fields}}this.{{jsName .}} = source["{{jsName .}}"] - {{end}} - } - } diff --git a/v3/internal/parser/templates/model.ts.tmpl b/v3/internal/parser/templates/model.ts.tmpl deleted file mode 100644 index 232db7479..000000000 --- a/v3/internal/parser/templates/model.ts.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -{{$pkg := .Package}} -export namespace {{.Package}} { - {{range $name, $def := .Models}} - export class {{$def.Name}} { - {{range $def.Fields}}{{.JSDef $pkg}} - {{end}} - static createFrom(source: any = {}) { - return new {{$def.Name}}(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - {{range $def.Fields}}this.{{.JSName}} = {{.TSBuild $pkg}}; - {{end}} - } - } - {{end}} -} diff --git a/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js b/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js deleted file mode 100644 index 53a819885..000000000 --- a/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js +++ /dev/null @@ -1,43 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {main} from './models'; - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet does XYZ - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -/** - * GreetService.NewPerson - * NewPerson creates a new person - * @param name {string} - * @returns {Promise} - **/ -function NewPerson(name) { - return wails.Call(GreetService("NewPerson", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - NewPerson, - }, -}; - diff --git a/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js b/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js deleted file mode 100644 index 48e7ed652..000000000 --- a/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js +++ /dev/null @@ -1,32 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {services} from './models'; - -function OtherService(method) { - return { - packageName: "services", - serviceName: "OtherService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * OtherService.Yay - * - * - * @returns {Promise} - **/ -function Yay() { - return wails.Call(OtherService("Yay")); -} - -window.go = window.go || {}; -window.go.services = { - OtherService: { - Yay, - }, -}; - diff --git a/v3/internal/parser/testdata/function_from_imported_package/main.go b/v3/internal/parser/testdata/function_from_imported_package/main.go deleted file mode 100644 index 3c061aa9b..000000000 --- a/v3/internal/parser/testdata/function_from_imported_package/main.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string - target *Person -} - -type Person struct { - Name string - Address *services.Address -} - -// Greet does XYZ -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -// NewPerson creates a new person -func (*GreetService) NewPerson(name string) *Person { - return &Person{Name: name} -} - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - services.NewOtherService(), - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/function_from_imported_package/models.ts b/v3/internal/parser/testdata/function_from_imported_package/models.ts deleted file mode 100644 index a6639f8eb..000000000 --- a/v3/internal/parser/testdata/function_from_imported_package/models.ts +++ /dev/null @@ -1,51 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; - address: services.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.address = services.Address.createFrom(source['address']); - - } - } - -} - -export namespace services { - - export class Address { - street: string; - state: string; - country: 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.state = source['state']; - this.country = source['country']; - - } - } - -} diff --git a/v3/internal/parser/testdata/function_from_imported_package/services/other.go b/v3/internal/parser/testdata/function_from_imported_package/services/other.go deleted file mode 100644 index 2daa9df17..000000000 --- a/v3/internal/parser/testdata/function_from_imported_package/services/other.go +++ /dev/null @@ -1,26 +0,0 @@ -package services - -// OtherService is a struct -// that does things -type OtherService struct { - t int -} - -type Address struct { - Street string - State string - Country string -} - -// Yay does this and that -func (o *OtherService) Yay() *Address { - return &Address{ - Street: "123 Pitt Street", - State: "New South Wales", - Country: "Australia", - } -} - -func NewOtherService() *OtherService { - return &OtherService{} -} diff --git a/v3/internal/parser/testdata/function_single/bindings_main.js b/v3/internal/parser/testdata/function_single/bindings_main.js deleted file mode 100644 index 0a156d149..000000000 --- a/v3/internal/parser/testdata/function_single/bindings_main.js +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet someone - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - }, -}; diff --git a/v3/internal/parser/testdata/function_single/main.go b/v3/internal/parser/testdata/function_single/main.go deleted file mode 100644 index 88de7bf89..000000000 --- a/v3/internal/parser/testdata/function_single/main.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/wailsapp/wails/v3/pkg/application" - "log" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string -} - -// Greet someone -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -func NewGreetService() *GreetService { - return &GreetService{} -} - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - NewGreetService(), - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/function_single/models.ts b/v3/internal/parser/testdata/function_single/models.ts deleted file mode 100644 index 0817f259b..000000000 --- a/v3/internal/parser/testdata/function_single/models.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -// TODO : nothing generated yet \ No newline at end of file diff --git a/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js deleted file mode 100644 index 277073941..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js +++ /dev/null @@ -1,50 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} -function OtherService(method) { - return { - packageName: "main", - serviceName: "OtherService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * OtherService.Hello - * - * - * @returns {Promise} - **/ -function Hello() { - return wails.Call(OtherService("Hello")); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - }, - OtherService: { - Hello, - }, -}; diff --git a/v3/internal/parser/testdata/struct_literal_multiple/main.go b/v3/internal/parser/testdata/struct_literal_multiple/main.go deleted file mode 100644 index fb555d79f..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple/main.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -type GreetService struct { - SomeVariable int - lowerCase string -} - -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -type OtherService struct { - t int -} - -func (o *OtherService) Hello() {} - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - &OtherService{}, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/struct_literal_multiple/models.ts b/v3/internal/parser/testdata/struct_literal_multiple/models.ts deleted file mode 100644 index 0817f259b..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple/models.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -// TODO : nothing generated yet \ No newline at end of file diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js deleted file mode 100644 index 277073941..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js +++ /dev/null @@ -1,50 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} -function OtherService(method) { - return { - packageName: "main", - serviceName: "OtherService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * OtherService.Hello - * - * - * @returns {Promise} - **/ -function Hello() { - return wails.Call(OtherService("Hello")); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - }, - OtherService: { - Hello, - }, -}; diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go b/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go deleted file mode 100644 index 2a45396a7..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go +++ /dev/null @@ -1,14 +0,0 @@ -package main - -import ( - _ "embed" -) - -type GreetService struct { - SomeVariable int - lowerCase string -} - -func (*GreetService) Greet(name string) string { - return "Hello " + name -} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/main.go b/v3/internal/parser/testdata/struct_literal_multiple_files/main.go deleted file mode 100644 index a75d4d7bd..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/main.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - &OtherService{}, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts b/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts deleted file mode 100644 index 0817f259b..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -// TODO : nothing generated yet \ No newline at end of file diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/other.go b/v3/internal/parser/testdata/struct_literal_multiple_files/other.go deleted file mode 100644 index ad5e661ef..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/other.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -type OtherService struct { - t int -} - -func (o *OtherService) Hello() {} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js deleted file mode 100644 index 53a819885..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js +++ /dev/null @@ -1,43 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {main} from './models'; - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet does XYZ - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -/** - * GreetService.NewPerson - * NewPerson creates a new person - * @param name {string} - * @returns {Promise} - **/ -function NewPerson(name) { - return wails.Call(GreetService("NewPerson", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - NewPerson, - }, -}; - diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js b/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js deleted file mode 100644 index 48e7ed652..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js +++ /dev/null @@ -1,32 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {services} from './models'; - -function OtherService(method) { - return { - packageName: "services", - serviceName: "OtherService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * OtherService.Yay - * - * - * @returns {Promise} - **/ -function Yay() { - return wails.Call(OtherService("Yay")); -} - -window.go = window.go || {}; -window.go.services = { - OtherService: { - Yay, - }, -}; - diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/main.go b/v3/internal/parser/testdata/struct_literal_multiple_other/main.go deleted file mode 100644 index 8c6953dbb..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/main.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import ( - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services" - "github.com/wailsapp/wails/v3/pkg/application" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string - target *Person -} - -type Person struct { - Name string - Address *services.Address -} - -// Greet does XYZ -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -// NewPerson creates a new person -func (*GreetService) NewPerson(name string) *Person { - return &Person{Name: name} -} - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - &services.OtherService{}, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts b/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts deleted file mode 100644 index a6639f8eb..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts +++ /dev/null @@ -1,51 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; - address: services.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.address = services.Address.createFrom(source['address']); - - } - } - -} - -export namespace services { - - export class Address { - street: string; - state: string; - country: 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.state = source['state']; - this.country = source['country']; - - } - } - -} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go b/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go deleted file mode 100644 index 55472595b..000000000 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go +++ /dev/null @@ -1,22 +0,0 @@ -package services - -// OtherService is a struct -// that does things -type OtherService struct { - t int -} - -type Address struct { - Street string - State string - Country string -} - -// Yay does this and that -func (o *OtherService) Yay() *Address { - return &Address{ - Street: "123 Pitt Street", - State: "New South Wales", - Country: "Australia", - } -} diff --git a/v3/internal/parser/testdata/struct_literal_single/bindings_main.js b/v3/internal/parser/testdata/struct_literal_single/bindings_main.js deleted file mode 100644 index 5b3fcd587..000000000 --- a/v3/internal/parser/testdata/struct_literal_single/bindings_main.js +++ /dev/null @@ -1,494 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {main} from './models'; - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.ArrayInt - * - * @param _in {number[]} - * @returns {Promise} - **/ -function ArrayInt(_in) { - return wails.Call(GreetService("ArrayInt", _in)); -} - -/** - * GreetService.BoolInBoolOut - * - * @param _in {boolean} - * @returns {Promise} - **/ -function BoolInBoolOut(_in) { - return wails.Call(GreetService("BoolInBoolOut", _in)); -} - -/** - * GreetService.Float32InFloat32Out - * - * @param _in {number} - * @returns {Promise} - **/ -function Float32InFloat32Out(_in) { - return wails.Call(GreetService("Float32InFloat32Out", _in)); -} - -/** - * GreetService.Float64InFloat64Out - * - * @param _in {number} - * @returns {Promise} - **/ -function Float64InFloat64Out(_in) { - return wails.Call(GreetService("Float64InFloat64Out", _in)); -} - -/** - * GreetService.Greet - * Greet someone - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -/** - * GreetService.Int16InIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function Int16InIntOut(_in) { - return wails.Call(GreetService("Int16InIntOut", _in)); -} - -/** - * GreetService.Int16PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function Int16PointerInAndOutput(_in) { - return wails.Call(GreetService("Int16PointerInAndOutput", _in)); -} - -/** - * GreetService.Int32InIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function Int32InIntOut(_in) { - return wails.Call(GreetService("Int32InIntOut", _in)); -} - -/** - * GreetService.Int32PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function Int32PointerInAndOutput(_in) { - return wails.Call(GreetService("Int32PointerInAndOutput", _in)); -} - -/** - * GreetService.Int64InIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function Int64InIntOut(_in) { - return wails.Call(GreetService("Int64InIntOut", _in)); -} - -/** - * GreetService.Int64PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function Int64PointerInAndOutput(_in) { - return wails.Call(GreetService("Int64PointerInAndOutput", _in)); -} - -/** - * GreetService.Int8InIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function Int8InIntOut(_in) { - return wails.Call(GreetService("Int8InIntOut", _in)); -} - -/** - * GreetService.Int8PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function Int8PointerInAndOutput(_in) { - return wails.Call(GreetService("Int8PointerInAndOutput", _in)); -} - -/** - * GreetService.IntInIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function IntInIntOut(_in) { - return wails.Call(GreetService("IntInIntOut", _in)); -} - -/** - * GreetService.IntPointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function IntPointerInAndOutput(_in) { - return wails.Call(GreetService("IntPointerInAndOutput", _in)); -} - -/** - * GreetService.IntPointerInputNamedOutputs - * - * @param _in {number | null} - * @returns {Promise} - **/ -function IntPointerInputNamedOutputs(_in) { - return wails.Call(GreetService("IntPointerInputNamedOutputs", _in)); -} - -/** - * GreetService.MapIntInt - * - * @param _in {map} - * @returns {Promise} - **/ -function MapIntInt(_in) { - return wails.Call(GreetService("MapIntInt", _in)); -} - -/** - * GreetService.MapIntPointerInt - * - * @param _in {map} - * @returns {Promise} - **/ -function MapIntPointerInt(_in) { - return wails.Call(GreetService("MapIntPointerInt", _in)); -} - -/** - * GreetService.MapIntSliceInt - * - * @param _in {map} - * @returns {Promise} - **/ -function MapIntSliceInt(_in) { - return wails.Call(GreetService("MapIntSliceInt", _in)); -} - -/** - * GreetService.MapIntSliceIntInMapIntSliceIntOut - * - * @param _in {map} - * @returns {Promise} - **/ -function MapIntSliceIntInMapIntSliceIntOut(_in) { - return wails.Call(GreetService("MapIntSliceIntInMapIntSliceIntOut", _in)); -} - -/** - * GreetService.NoInputsStringOut - * - * - * @returns {Promise} - **/ -function NoInputsStringOut() { - return wails.Call(GreetService("NoInputsStringOut")); -} - -/** - * GreetService.PointerBoolInBoolOut - * - * @param _in {boolean | null} - * @returns {Promise} - **/ -function PointerBoolInBoolOut(_in) { - return wails.Call(GreetService("PointerBoolInBoolOut", _in)); -} - -/** - * GreetService.PointerFloat32InFloat32Out - * - * @param _in {number | null} - * @returns {Promise} - **/ -function PointerFloat32InFloat32Out(_in) { - return wails.Call(GreetService("PointerFloat32InFloat32Out", _in)); -} - -/** - * GreetService.PointerFloat64InFloat64Out - * - * @param _in {number | null} - * @returns {Promise} - **/ -function PointerFloat64InFloat64Out(_in) { - return wails.Call(GreetService("PointerFloat64InFloat64Out", _in)); -} - -/** - * GreetService.PointerMapIntInt - * - * @param _in {map | null} - * @returns {Promise} - **/ -function PointerMapIntInt(_in) { - return wails.Call(GreetService("PointerMapIntInt", _in)); -} - -/** - * GreetService.PointerStringInStringOut - * - * @param _in {string | null} - * @returns {Promise} - **/ -function PointerStringInStringOut(_in) { - return wails.Call(GreetService("PointerStringInStringOut", _in)); -} - -/** - * GreetService.StringArrayInputNamedOutput - * - * @param _in {string[]} - * @returns {Promise} - **/ -function StringArrayInputNamedOutput(_in) { - return wails.Call(GreetService("StringArrayInputNamedOutput", _in)); -} - -/** - * GreetService.StringArrayInputNamedOutputs - * - * @param _in {string[]} - * @returns {Promise} - **/ -function StringArrayInputNamedOutputs(_in) { - return wails.Call(GreetService("StringArrayInputNamedOutputs", _in)); -} - -/** - * GreetService.StringArrayInputStringArrayOut - * - * @param _in {string[]} - * @returns {Promise} - **/ -function StringArrayInputStringArrayOut(_in) { - return wails.Call(GreetService("StringArrayInputStringArrayOut", _in)); -} - -/** - * GreetService.StringArrayInputStringOut - * - * @param _in {string[]} - * @returns {Promise} - **/ -function StringArrayInputStringOut(_in) { - return wails.Call(GreetService("StringArrayInputStringOut", _in)); -} - -/** - * GreetService.StructInputStructOutput - * - * @param _in {main.Person} - * @returns {Promise} - **/ -function StructInputStructOutput(_in) { - return wails.Call(GreetService("StructInputStructOutput", _in)); -} - -/** - * GreetService.StructPointerInputErrorOutput - * - * @param _in {main.Person | null} - * @returns {Promise} - **/ -function StructPointerInputErrorOutput(_in) { - return wails.Call(GreetService("StructPointerInputErrorOutput", _in)); -} - -/** - * GreetService.StructPointerInputStructPointerOutput - * - * @param _in {main.Person | null} - * @returns {Promise} - **/ -function StructPointerInputStructPointerOutput(_in) { - return wails.Call(GreetService("StructPointerInputStructPointerOutput", _in)); -} - -/** - * GreetService.UInt16InUIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function UInt16InUIntOut(_in) { - return wails.Call(GreetService("UInt16InUIntOut", _in)); -} - -/** - * GreetService.UInt16PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function UInt16PointerInAndOutput(_in) { - return wails.Call(GreetService("UInt16PointerInAndOutput", _in)); -} - -/** - * GreetService.UInt32InUIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function UInt32InUIntOut(_in) { - return wails.Call(GreetService("UInt32InUIntOut", _in)); -} - -/** - * GreetService.UInt32PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function UInt32PointerInAndOutput(_in) { - return wails.Call(GreetService("UInt32PointerInAndOutput", _in)); -} - -/** - * GreetService.UInt64InUIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function UInt64InUIntOut(_in) { - return wails.Call(GreetService("UInt64InUIntOut", _in)); -} - -/** - * GreetService.UInt64PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function UInt64PointerInAndOutput(_in) { - return wails.Call(GreetService("UInt64PointerInAndOutput", _in)); -} - -/** - * GreetService.UInt8InUIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function UInt8InUIntOut(_in) { - return wails.Call(GreetService("UInt8InUIntOut", _in)); -} - -/** - * GreetService.UInt8PointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function UInt8PointerInAndOutput(_in) { - return wails.Call(GreetService("UInt8PointerInAndOutput", _in)); -} - -/** - * GreetService.UIntInUIntOut - * - * @param _in {number} - * @returns {Promise} - **/ -function UIntInUIntOut(_in) { - return wails.Call(GreetService("UIntInUIntOut", _in)); -} - -/** - * GreetService.UIntPointerInAndOutput - * - * @param _in {number | null} - * @returns {Promise} - **/ -function UIntPointerInAndOutput(_in) { - return wails.Call(GreetService("UIntPointerInAndOutput", _in)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - ArrayInt, - BoolInBoolOut, - Float32InFloat32Out, - Float64InFloat64Out, - Greet, - Int16InIntOut, - Int16PointerInAndOutput, - Int32InIntOut, - Int32PointerInAndOutput, - Int64InIntOut, - Int64PointerInAndOutput, - Int8InIntOut, - Int8PointerInAndOutput, - IntInIntOut, - IntPointerInAndOutput, - IntPointerInputNamedOutputs, - MapIntInt, - MapIntPointerInt, - MapIntSliceInt, - MapIntSliceIntInMapIntSliceIntOut, - NoInputsStringOut, - PointerBoolInBoolOut, - PointerFloat32InFloat32Out, - PointerFloat64InFloat64Out, - PointerMapIntInt, - PointerStringInStringOut, - StringArrayInputNamedOutput, - StringArrayInputNamedOutputs, - StringArrayInputStringArrayOut, - StringArrayInputStringOut, - StructInputStructOutput, - StructPointerInputErrorOutput, - StructPointerInputStructPointerOutput, - UInt16InUIntOut, - UInt16PointerInAndOutput, - UInt32InUIntOut, - UInt32PointerInAndOutput, - UInt64InUIntOut, - UInt64PointerInAndOutput, - UInt8InUIntOut, - UInt8PointerInAndOutput, - UIntInUIntOut, - UIntPointerInAndOutput, - }, -}; - diff --git a/v3/internal/parser/testdata/struct_literal_single/main.go b/v3/internal/parser/testdata/struct_literal_single/main.go deleted file mode 100644 index 2438a69cb..000000000 --- a/v3/internal/parser/testdata/struct_literal_single/main.go +++ /dev/null @@ -1,205 +0,0 @@ -package main - -import ( - _ "embed" - "log" - "strings" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -type Person struct { - Name string - Parent *Person - Details struct { - Age int - Address struct { - Street string - } - } -} - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string -} - -// Greet someone -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -func (*GreetService) NoInputsStringOut() string { - return "Hello" -} - -func (*GreetService) StringArrayInputStringOut(in []string) string { - return strings.Join(in, ",") -} - -func (*GreetService) StringArrayInputStringArrayOut(in []string) []string { - return in -} - -func (*GreetService) StringArrayInputNamedOutput(in []string) (output []string) { - return in -} - -func (*GreetService) StringArrayInputNamedOutputs(in []string) (output []string, err error) { - return in, nil -} - -func (*GreetService) IntPointerInputNamedOutputs(in *int) (output *int, err error) { - return in, nil -} - -func (*GreetService) UIntPointerInAndOutput(in *uint) *uint { - return in -} - -func (*GreetService) UInt8PointerInAndOutput(in *uint8) *uint8 { - return in -} - -func (*GreetService) UInt16PointerInAndOutput(in *uint16) *uint16 { - return in -} - -func (*GreetService) UInt32PointerInAndOutput(in *uint32) *uint32 { - return in -} - -func (*GreetService) UInt64PointerInAndOutput(in *uint64) *uint64 { - return in -} - -func (*GreetService) IntPointerInAndOutput(in *int) *int { - return in -} - -func (*GreetService) Int8PointerInAndOutput(in *int8) *int8 { - return in -} - -func (*GreetService) Int16PointerInAndOutput(in *int16) *int16 { - return in -} - -func (*GreetService) Int32PointerInAndOutput(in *int32) *int32 { - return in -} - -func (*GreetService) Int64PointerInAndOutput(in *int64) *int64 { - return in -} - -func (*GreetService) IntInIntOut(in int) int { - return in -} - -func (*GreetService) Int8InIntOut(in int8) int8 { - return in -} -func (*GreetService) Int16InIntOut(in int16) int16 { - return in -} -func (*GreetService) Int32InIntOut(in int32) int32 { - return in -} -func (*GreetService) Int64InIntOut(in int64) int64 { - return in -} - -func (*GreetService) UIntInUIntOut(in uint) uint { - return in -} - -func (*GreetService) UInt8InUIntOut(in uint8) uint8 { - return in -} -func (*GreetService) UInt16InUIntOut(in uint16) uint16 { - return in -} -func (*GreetService) UInt32InUIntOut(in uint32) uint32 { - return in -} -func (*GreetService) UInt64InUIntOut(in uint64) uint64 { - return in -} - -func (*GreetService) Float32InFloat32Out(in float32) float32 { - return in -} - -func (*GreetService) Float64InFloat64Out(in float64) float64 { - return in -} - -func (*GreetService) PointerFloat32InFloat32Out(in *float32) *float32 { - return in -} - -func (*GreetService) PointerFloat64InFloat64Out(in *float64) *float64 { - return in -} - -func (*GreetService) BoolInBoolOut(in bool) bool { - return in -} - -func (*GreetService) PointerBoolInBoolOut(in *bool) *bool { - return in -} - -func (*GreetService) PointerStringInStringOut(in *string) *string { - return in -} - -func (*GreetService) StructPointerInputErrorOutput(in *Person) error { - return nil -} - -func (*GreetService) StructInputStructOutput(in Person) Person { - return in -} - -func (*GreetService) StructPointerInputStructPointerOutput(in *Person) *Person { - return in -} - -func (*GreetService) MapIntInt(in map[int]int) { -} - -func (*GreetService) PointerMapIntInt(in *map[int]int) { -} - -func (*GreetService) MapIntPointerInt(in map[*int]int) { -} - -func (*GreetService) MapIntSliceInt(in map[int][]int) { -} - -func (*GreetService) MapIntSliceIntInMapIntSliceIntOut(in map[int][]int) (out map[int][]int) { - return nil -} - -func (*GreetService) ArrayInt(in [4]int) { -} - -func main() { - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/struct_literal_single/models.ts b/v3/internal/parser/testdata/struct_literal_single/models.ts deleted file mode 100644 index 91bab56ac..000000000 --- a/v3/internal/parser/testdata/struct_literal_single/models.ts +++ /dev/null @@ -1,64 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; - parent: Person; - details: anon1; - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - this.name = source['name']; - this.parent = Person.createFrom(source['parent']); - this.details = anon1.createFrom(source['details']); - - } - } - - export class anon1 { - age: number; - address: anon2; - - static createFrom(source: any = {}) { - return new anon1(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - this.age = source['age']; - this.address = anon2.createFrom(source['address']); - - } - } - - export class anon2 { - street: string; - - static createFrom(source: any = {}) { - return new anon2(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - this.street = source['street']; - - } - } - -} diff --git a/v3/internal/parser/testdata/variable_single/bindings_main.js b/v3/internal/parser/testdata/variable_single/bindings_main.js deleted file mode 100644 index 0a156d149..000000000 --- a/v3/internal/parser/testdata/variable_single/bindings_main.js +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet someone - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - }, -}; diff --git a/v3/internal/parser/testdata/variable_single/main.go b/v3/internal/parser/testdata/variable_single/main.go deleted file mode 100644 index baffd783c..000000000 --- a/v3/internal/parser/testdata/variable_single/main.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/wailsapp/wails/v3/pkg/application" - "log" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string -} - -// Greet someone -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -func main() { - greetService := &GreetService{} - app := application.New(application.Options{ - Bind: []interface{}{ - greetService, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/variable_single/models.ts b/v3/internal/parser/testdata/variable_single/models.ts deleted file mode 100644 index 0817f259b..000000000 --- a/v3/internal/parser/testdata/variable_single/models.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -// TODO : nothing generated yet \ No newline at end of file diff --git a/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js b/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js deleted file mode 100644 index 0a156d149..000000000 --- a/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet someone - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - }, -}; diff --git a/v3/internal/parser/testdata/variable_single_from_function/main.go b/v3/internal/parser/testdata/variable_single_from_function/main.go deleted file mode 100644 index 0d7121ca9..000000000 --- a/v3/internal/parser/testdata/variable_single_from_function/main.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/wailsapp/wails/v3/pkg/application" - "log" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string -} - -// Greet someone -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -func NewGreetService() *GreetService { - return &GreetService{} -} - -func main() { - greetService := NewGreetService() - app := application.New(application.Options{ - Bind: []interface{}{ - greetService, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/variable_single_from_function/models.ts b/v3/internal/parser/testdata/variable_single_from_function/models.ts deleted file mode 100644 index 0817f259b..000000000 --- a/v3/internal/parser/testdata/variable_single_from_function/models.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -// TODO : nothing generated yet \ No newline at end of file diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js b/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js deleted file mode 100644 index 53a819885..000000000 --- a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js +++ /dev/null @@ -1,43 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {main} from './models'; - -function GreetService(method) { - return { - packageName: "main", - serviceName: "GreetService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * GreetService.Greet - * Greet does XYZ - * @param name {string} - * @returns {Promise} - **/ -function Greet(name) { - return wails.Call(GreetService("Greet", name)); -} - -/** - * GreetService.NewPerson - * NewPerson creates a new person - * @param name {string} - * @returns {Promise} - **/ -function NewPerson(name) { - return wails.Call(GreetService("NewPerson", name)); -} - -window.go = window.go || {}; -window.go.main = { - GreetService: { - Greet, - NewPerson, - }, -}; - diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js b/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js deleted file mode 100644 index 48e7ed652..000000000 --- a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js +++ /dev/null @@ -1,32 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -import {services} from './models'; - -function OtherService(method) { - return { - packageName: "services", - serviceName: "OtherService", - methodName: method, - args: Array.prototype.slice.call(arguments, 1), - }; -} - -/** - * OtherService.Yay - * - * - * @returns {Promise} - **/ -function Yay() { - return wails.Call(OtherService("Yay")); -} - -window.go = window.go || {}; -window.go.services = { - OtherService: { - Yay, - }, -}; - diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/main.go b/v3/internal/parser/testdata/variable_single_from_other_function/main.go deleted file mode 100644 index 9d10a301e..000000000 --- a/v3/internal/parser/testdata/variable_single_from_other_function/main.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -// GreetService is great -type GreetService struct { - SomeVariable int - lowerCase string - target *Person -} - -type Person struct { - Name string - Address *services.Address -} - -// Greet does XYZ -func (*GreetService) Greet(name string) string { - return "Hello " + name -} - -// NewPerson creates a new person -func (*GreetService) NewPerson(name string) *Person { - return &Person{Name: name} -} - -func main() { - otherService := services.NewOtherService() - app := application.New(application.Options{ - Bind: []interface{}{ - &GreetService{}, - otherService, - }, - }) - - app.NewWebviewWindow() - - err := app.Run() - - if err != nil { - log.Fatal(err) - } - -} diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/models.ts b/v3/internal/parser/testdata/variable_single_from_other_function/models.ts deleted file mode 100644 index a6639f8eb..000000000 --- a/v3/internal/parser/testdata/variable_single_from_other_function/models.ts +++ /dev/null @@ -1,51 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; - address: services.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.address = services.Address.createFrom(source['address']); - - } - } - -} - -export namespace services { - - export class Address { - street: string; - state: string; - country: 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.state = source['state']; - this.country = source['country']; - - } - } - -} diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go b/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go deleted file mode 100644 index 2daa9df17..000000000 --- a/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go +++ /dev/null @@ -1,26 +0,0 @@ -package services - -// OtherService is a struct -// that does things -type OtherService struct { - t int -} - -type Address struct { - Street string - State string - Country string -} - -// Yay does this and that -func (o *OtherService) Yay() *Address { - return &Address{ - Street: "123 Pitt Street", - State: "New South Wales", - Country: "Australia", - } -} - -func NewOtherService() *OtherService { - return &OtherService{} -} diff --git a/v3/internal/plugins/plugins.go b/v3/internal/plugins/plugins.go deleted file mode 100644 index 05de5f908..000000000 --- a/v3/internal/plugins/plugins.go +++ /dev/null @@ -1,36 +0,0 @@ -package plugins - -import ( - "embed" - "fmt" - "io/fs" - "os" - "path/filepath" - - "github.com/wailsapp/wails/v3/internal/flags" - - "github.com/leaanthony/gosod" - - "github.com/samber/lo" -) - -//go:embed template -var pluginTemplate embed.FS - -type TemplateOptions struct { - *flags.PluginInit -} - -func Install(options *flags.PluginInit) error { - - if options.OutputDir == "." || options.OutputDir == "" { - options.OutputDir = filepath.Join(lo.Must(os.Getwd()), options.Name) - } - fmt.Printf("Creating plugin '%s' into '%s'\n", options.Name, options.OutputDir) - tfs, err := fs.Sub(pluginTemplate, "template") - if err != nil { - return err - } - - return gosod.New(tfs).Extract(options.OutputDir, options) -} diff --git a/v3/internal/plugins/template/NEXT STEPS.md b/v3/internal/plugins/template/NEXT STEPS.md deleted file mode 100644 index e58c6b119..000000000 --- a/v3/internal/plugins/template/NEXT STEPS.md +++ /dev/null @@ -1,82 +0,0 @@ -# Next Steps - -Congratulations on generating a plugin. This guide will help you author your plugin -and provide some tips on how to get started. - -## Plugin Structure - -The plugin is a standard Go module that adheres to the following interface: - -```go -type Plugin interface { - Name() string - Init(app *App) error - Shutdown() -} -``` - -The `Name()` method returns the name of the plugin. It should follow the Go module naming convention -and have a prefix of `wails-plugin-`, e.g. `github.com/myuser/wails-plugin-example`. - -The `Init()` method is called when the plugin is loaded. The `App` parameter is a pointer to the -main application struct. This may be used for showing dialogs, listening for events or even opening -new windows. The `Init()` method should return an error if it fails to initialise. This method is -called synchronously so the application will not start until it returns. - -The `Shutdown()` method is called when the application is shutting down. This is a good place to -perform any cleanup. This method is called synchronously so the application will not exit completely until -it returns. - -## Plugin Directory Structure - -The plugin directory structure is as follows: - -``` -plugin-name -├── models.d.ts -├── plugin.js -├── plugin.go -├── README.md -├── go.mod -├── go.sum -└── plugin.toml -``` - -### `plugin.go` - -This file contains the plugin code. It should contain a struct that implements the `Plugin` interface -and a `NewPlugin()` method that returns a pointer to the struct. Methods are exported by capitalising -the first letter of the method name. These methods may be called from the frontend. If methods -accept or return structs, these structs must be exported. - -### `plugin.js` - -This file should contain any JavaScript code that may help developers use the plugin. -In the example plugin, this file contains function wrappers for the plugin methods. -It's good to include JSDocs as that will help developers using your plugin. - -### `models.d.ts` - -This file should contain TypeScript definitions for any structs that are passed -or returned from the plugin. -` -### `plugin.toml` - -This file contains the plugin metadata. It is important to fill this out correctly -as it will be used by the Wails CLI. - -### `README.md` - -This file should contain a description of the plugin and how to use it. It should -also contain a link to the plugin repository and how to report bugs. - -### `go.mod` and `go.sum` - -These are standard Go module files. The package name in `go.mod` should match the -name of the plugin, e.g. `github.com/myuser/wails-plugin-example`. - -## Promoting your Plugin - -Once you have created your plugin, you should promote it on the Wails Discord server -in the `#plugins` channel. You should also open a PR to promote your plugin on the Wails -website. Update the `website/content/plugins.md` file and add your plugin to the list. \ No newline at end of file diff --git a/v3/internal/plugins/template/README.tmpl.md b/v3/internal/plugins/template/README.tmpl.md deleted file mode 100644 index 2f4944a3d..000000000 --- a/v3/internal/plugins/template/README.tmpl.md +++ /dev/null @@ -1,38 +0,0 @@ -# {{.Name}} Plugin - -This example plugin provides a way to generate hashes of strings. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go - Plugins: map[string]application.Plugin{ - "{{.Name}}": {{.Name}}.NewPlugin(), - }, -``` - -## Usage - -You can then call the methods from the frontend: - -```js - wails.Plugin("{{.Name}}","All","hello world").then((result) => console.log(result)) -``` - -This method returns a struct with the following fields: - -```typescript - interface Hashes { - MD5: string; - SHA1: string; - SHA256: string; - } -``` - -A TypeScript definition file is provided for this interface. - -## Support - -If you find a bug in this plugin, please raise a ticket [here](https://github.com/plugin/repository). -Please do not contact the Wails team for support. \ No newline at end of file diff --git a/v3/internal/plugins/template/go.mod.tmpl b/v3/internal/plugins/template/go.mod.tmpl deleted file mode 100644 index 77249136f..000000000 --- a/v3/internal/plugins/template/go.mod.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -module {{.Name}} - -go 1.20 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/imdario/mergo v0.3.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect -) diff --git a/v3/internal/plugins/template/go.sum b/v3/internal/plugins/template/go.sum deleted file mode 100644 index 29c7b303e..000000000 --- a/v3/internal/plugins/template/go.sum +++ /dev/null @@ -1,22 +0,0 @@ -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 h1:Wn+nhnS+VytzE0PegUzSh4T3hXJCtggKGD/4U5H9+wQ= -github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6/go.mod h1:zlNLI0E2c2qA6miiuAHtp0Bac8FaGH0tlhA19OssR/8= -github.com/wailsapp/wails/v3 v3.0.0-alpha.0 h1:T5gqG98Xr8LBf69oxlPkhpsFD59w2SnqUZk6XHj8Zoc= -github.com/wailsapp/wails/v3 v3.0.0-alpha.0/go.mod h1:OAfO5bP0TSUvCIHZYc6Dqfow/9RqxzHvYtmhWPpo1c0= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/v3/internal/plugins/template/models.d.ts.tmpl b/v3/internal/plugins/template/models.d.ts.tmpl deleted file mode 100644 index 567c91d70..000000000 --- a/v3/internal/plugins/template/models.d.ts.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -// models.d.ts -// This file should contain any models that are used by the plugin. - -export namespace {{.Name}}Plugin { - export interface Hashes { - MD5: string; - SHA1: string; - SHA256: string; - } -} \ No newline at end of file diff --git a/v3/internal/plugins/template/plugin.go.tmpl b/v3/internal/plugins/template/plugin.go.tmpl deleted file mode 100644 index e8104f2bd..000000000 --- a/v3/internal/plugins/template/plugin.go.tmpl +++ /dev/null @@ -1,67 +0,0 @@ -package {{.Name}} - -import ( - "github.com/wailsapp/wails/v3/pkg/application" -) - -// ---------------- Plugin Setup ---------------- -// This is the main plugin struct. It can be named anything you like. -// It must implement the application.Plugin interface. -// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. - -type Config struct { - // Add any configuration options here -} - -type Plugin struct{ - config *Config - app *application.App -} - -func NewPlugin(config *Config) *Plugin { - return &Plugin{ - config: config, - } -} - -// Shutdown is called when the app is shutting down -// You can use this to clean up any resources you have allocated -func (p *Plugin) Shutdown() {} - -// Name returns the name of the plugin. -// You should use the go module format e.g. github.com/myuser/myplugin -func (p *Plugin) Name() string { - return "github.com/myuser/{{.Name}}" -} - -// Init is called when the app is starting up. You can use this to -// initialise any resources you need. You can also access the application -// instance via the app property. -func (p *Plugin) Init(app *application.App) error { - p.app = app - return nil -} - -// Exported returns a list of exported methods that can be called from the frontend -func (p *Plugin) CallableByJS() []string { - return []string{ - "Greet", - } -} - -// InjectJS returns any JS that should be injected into the frontend -func (p *Plugin) InjectJS() string { - return "" -} - -// ---------------- Plugin Methods ---------------- -// Plugin methods are just normal Go methods. You can add as many as you like. -// The only requirement is that they are exported (start with a capital letter). -// You can also return any type that is JSON serializable. -// Any methods that you want to be callable from the frontend must be returned by the -// CallableByJS() method above. -// See https://golang.org/pkg/encoding/json/#Marshal for more information. - -func (p *Plugin) Greet(name string) string { - return "Hello " + name -} diff --git a/v3/internal/plugins/template/plugin.tmpl.js b/v3/internal/plugins/template/plugin.tmpl.js deleted file mode 100644 index c62bbb6e7..000000000 --- a/v3/internal/plugins/template/plugin.tmpl.js +++ /dev/null @@ -1,46 +0,0 @@ -// plugin.js -// This file should contain helper functions for the that can be used by the frontend. -// Below are examples of how to use JSDoc to define the Hashes struct and the exported functions. - -/** - * @typedef {Object} Hashes - A collection of hashes. - * @property {string} md5 - The MD5 hash of a string, represented as a hexadecimal string. - * @property {string} sha1 - The SHA-1 hash of a string, represented as a hexadecimal string. - * @property {string} sha256 - The SHA-256 hash of a string, represented as a hexadecimal string. - */ - -/** - * Generate all hashes for a string. - * @param input {string} - The string to generate hashes for. - * @returns {Promise} - */ -export function All(input) { - return wails.Plugin("{{.Name}}", "All", input); -} - -/** - * Generate the MD5 hash for a string. - * @param input {string} - The string to generate the hash for. - * @returns {Promise} - */ -export function MD5(input) { - return wails.Plugin("{{.Name}}", "MD5", input); -} - -/** - * Generate the SHA-1 hash for a string. - * @param input {string} - The string to generate the hash for. - * @returns {Promise} - */ -export function SHA1(input) { - return wails.Plugin("{{.Name}}", "SHA1", input); -} - -/** - * Generate the SHA-256 hash for a string. - * @param input {string} - The string to generate the hash for. - * @returns {Promise} - */ -export function SHA256(input) { - return wails.Plugin("{{.Name}}", "SHA256", input); -} \ No newline at end of file diff --git a/v3/internal/plugins/template/plugin.tmpl.toml b/v3/internal/plugins/template/plugin.tmpl.toml deleted file mode 100644 index 76e7aa384..000000000 --- a/v3/internal/plugins/template/plugin.tmpl.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "{{.Name}}" plugin. - -Name = "{{.Name}}" -Description = "{{.Description}}" -Author = "" -Version = "" -Website = "" -Repository = "" -License = "" - - diff --git a/v3/internal/runtime/README.md b/v3/internal/runtime/README.md deleted file mode 100644 index f6c2f249b..000000000 --- a/v3/internal/runtime/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Runtime - -To rebuild the runtime run `task build-runtime` or if you have Wails v3 CLI, you can use `wails task build-runtime`. diff --git a/v3/internal/runtime/assets.go b/v3/internal/runtime/assets.go deleted file mode 100644 index fb3f09ebe..000000000 --- a/v3/internal/runtime/assets.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build production - -package runtime - -var RuntimeAssetsBundle = &RuntimeAssets{ - runtimeDesktopJS: DesktopRuntime, -} - -type RuntimeAssets struct { - runtimeDesktopJS []byte -} - -func (r *RuntimeAssets) DesktopIPC() []byte { - return []byte("") -} - -func (r *RuntimeAssets) WebsocketIPC() []byte { - return []byte("") -} - -func (r *RuntimeAssets) RuntimeDesktopJS() []byte { - return r.runtimeDesktopJS -} diff --git a/v3/internal/runtime/assets_dev.go b/v3/internal/runtime/assets_dev.go deleted file mode 100644 index c5e5ffe7d..000000000 --- a/v3/internal/runtime/assets_dev.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build !production - -package runtime - -var RuntimeAssetsBundle = &RuntimeAssets{ - runtimeDesktopJS: DesktopRuntime, -} - -type RuntimeAssets struct { - runtimeDesktopJS []byte -} - -func (r *RuntimeAssets) DesktopIPC() []byte { - return []byte("") -} - -func (r *RuntimeAssets) WebsocketIPC() []byte { - return []byte("") -} - -func (r *RuntimeAssets) RuntimeDesktopJS() []byte { - return r.runtimeDesktopJS -} diff --git a/v3/internal/runtime/desktop/README.md b/v3/internal/runtime/desktop/README.md deleted file mode 100644 index bd4d5d0ab..000000000 --- a/v3/internal/runtime/desktop/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# README - -After updating any files in this directory, you must run `wails task build-runtime` to regenerate the compiled JS. \ No newline at end of file diff --git a/v3/internal/runtime/desktop/api/README.md b/v3/internal/runtime/desktop/api/README.md deleted file mode 100644 index 0cb344e83..000000000 --- a/v3/internal/runtime/desktop/api/README.md +++ /dev/null @@ -1,363 +0,0 @@ -# Wails API - -This package provides a typed Javascript API for Wails applications. - -It provides methods for the following components: - -- [Dialog](#dialog) -- [Events](#events) -- [Window](#window) -- [Plugin](#plugin) -- [Screens](#screens) -- [Application](#application) - -## Installation - -In your Wails application, run the following command in the frontend project directory: - -```bash -npm install -D @wailsapp/api -``` - -## Usage - -Import the API into your application: - -```javascript -import * as Wails from "@wailsapp/api"; -``` - -Then use the API components: - -```javascript -function showDialog() { - Wails.Dialog.Info({ - Title: "Hello", - }).then((result) => { - console.log("Result: " + result); - }); -} -``` - -Individual components of the API can also be imported directly. - - - -## API - -### Dialog - -The Dialog API provides access to the native system dialogs. - -```javascript -import { Dialog } from "@wailsapp/api"; - -function example() { - Dialog.Info({ - Title: "Hello", - }).then((result) => { - console.log("Result: " + result); - }); -} -``` - -#### Message Dialogs - -Message dialogs are used to display a message to the user. -They can be used to display information, errors, warnings and questions. -Each method returns the button that was pressed by the user. - -- `Info(options: MessageDialogOptions): Promise` -- `Error(options: MessageDialogOptions): Promise` -- `Warning(options: MessageDialogOptions): Promise` -- `Question(options: MessageDialogOptions): Promise` - -#### Open Dialog - -The Open Dialog is used to open a file or directory. It returns the path of the selected file or directory. -If the `AllowsMultipleFiles` option is set, multiple files or directories can be selected and are returned -as an array of file paths. - -- `Open(options: OpenDialogOptions): Promise` - -#### Save Dialog - -The Save Dialog is used to save a file. It returns the path of the selected file. - -- `Save(options: SaveDialogOptions): Promise` - -### Events - -The Events API provides access to the Wails event system. This is a global event system -that can be used to send events between the Go and Javascript. -Events are available to every window in a multi-window application. -These API methods are specific to the window in which they are called in. - -```javascript -import { Events } from "@wailsapp/api"; - -function example() { - // Emit an event - Events.Emit("myevent", { message: "Hello" }); - - // Subscribe to an event - let unsub = Events.On("otherEvent", (data) => { - console.log("Received event: " + data); - }); - - // Unsubscribe from the event - unsub(); -} -``` - -#### Emit - -Emit an event with optional data. - -- `Emit(eventName: string, data?: any): void` - -#### Subscribe - -Three methods are provided to subscribe to an event: - - `On(eventName: string, callback: (data: any) => void): () => void` - Subscribe to all events of the given name - - `Once(eventName: string, callback: (data: any) => void): () => void` - Subscribe to one event of the given name - - `OnMultiple(eventName: string, callback: (data: any) => void, count: number): () => void` - Subscribe to multiple events of the given name - -The callback will be called when the event is emitted. -The returned function can be called to unsubscribe from the event. - -#### Unsubscribe - -As well as unsubscribing from a single event, you can unsubscribe from events of a given name or all events. - - `Off(eventName: string, additionalEventNames: ...string): void` - Unsubscribe from all events of the given name(s) - - `OffAll(): void` - Unsubscribe all events - -### Window - -The Window API provides a number of methods that interact with the window in which the API is called. - -- `Center: (void) => void` - Center the window -- `SetTitle: (title) => void` - Set the window title -- `Fullscreen: () => void` - Set the window to fullscreen -- `UnFullscreen: () => void` - Restore a fullscreen window -- `SetSize: (width: number, height: number) => void` - Set the window size -- `Size: () => Size` - Get the window size -- `SetMaxSize: (width, height) => void` - Set the window maximum size -- `SetMinSize: (width, height) => void` - Set the window minimum size -- `SetAlwaysOnTop: (onTop) => void` - Set window to be always on top -- `SetPosition: (x, y) => void` - Set the window position -- `Position: () => Position` - Get the window position -- `SetResizable: (resizable) => void` - Set whether the window is resizable -- `Screen: () => Screen` - Get information about the screen the window is on -- `Hide: () => void` - Hide the window -- `Show: () => void` - Show the window -- `Maximise: () => void` - Maximise the window -- `Close: () => void` - Close the window -- `ToggleMaximise: () => void` - Toggle the window maximise state -- `UnMaximise: () => void` - UnMaximise the window -- `Minimise: () => void` - Minimise the window -- `UnMinimise: () => void` - UnMinimise the window -- `SetBackgroundColour: (r, g, b, a) => void` - Set the background colour of the window - -### Plugin - -The Plugin API provides access to the Wails plugin system. -This method provides the ability to call a plugin method from the frontend. - -```javascript - -import { Plugin } from "@wailsapp/api"; - -function example() { - // Call a plugin method - Plugin.Call("myplugin", "MyMethod", { message: "Hello" }).then((result) => { - console.log("Result: " + result); - }); -} -``` - -### Screens - -The Screens API provides access to the Wails screen system. - -```javascript -import { Screens } from "@wailsapp/api"; - -function example() { - // Get all attatched screens - Screens.GetAll().then((screens) => { - console.log("Screens: " + screens); - }); - - // Get the primary screen - Screens.GetPrimary().then((screen) => { - console.log("Primary screen: " + screen); - }); - - // Get the screen the window is on - Screens.GetCurrent().then((screen) => { - console.log("Window screen: " + screen); - }); -} -``` - -- `GetAll: () => Promise` - Get all screens -- `GetPrimary: () => Promise` - Get the primary screen -- `GetCurrent: () => Promise` - Get the screen the window is on - -### Application - -The Application API provides access to the Wails application system. - -```javascript -import { Application } from "@wailsapp/api"; - -function example() { - - // Hide the application - Application.Hide(); - - // Shopw the application - Application.Show(); - - // Quit the application - Application.Quit(); - -} -``` - -- `Hide: () => void` - Hide the application -- `Show: () => void` - Show the application -- `Quit: () => void` - Quit the application - -## Types - -This is a comprehensive list of types used by the Wails API. - -```typescript - -export interface Button { - // The label of the button - Label?: string; - // True if this button is the cancel button (selected when pressing escape) - IsCancel?: boolean; - // True if this button is the default button (selected when pressing enter) - IsDefault?: boolean; -} - -interface MessageDialogOptions { - // The title for the dialog - Title?: string; - // The message to display - Message?: string; - // The buttons to use on the dialog - Buttons?: Button[]; -} - -export interface OpenFileDialogOptions { - // Allows the user to be able to select directories - CanChooseDirectories?: boolean; - // Allows the user to be able to select files - CanChooseFiles?: boolean; - // Provide an option to create directories in the dialog - CanCreateDirectories?: boolean; - // Makes the dialog show hidden files - ShowHiddenFiles?: boolean; - // Whether the dialog should follow filesystem aliases - ResolvesAliases?: boolean; - // Allow the user to select multiple files or directories - AllowsMultipleSelection?: boolean; - // Hide the extension when showing the filename - HideExtension?: boolean; - // Allow the user to select files where the system hides their extensions - CanSelectHiddenExtension?: boolean; - // Treats file packages as directories, e.g. .app on macOS - TreatsFilePackagesAsDirectories?: boolean; - // Allows selection of filetypes not specified in the filters - AllowsOtherFiletypes?: boolean; - // The file filters to use in the dialog - Filters?: FileFilter[]; - // The title of the dialog - Title?: string; - // The message to display - Message?: string; - // The label for the select button - ButtonText?: string; - // The default directory to open the dialog in - Directory?: string; -} -export interface FileFilter { - // The display name for the filter, e.g. "Text Files" - DisplayName?: string; - // The pattern to use for the filter, e.g. "*.txt;*.md" - Pattern?: string; -} -export interface SaveFileDialogOptions { - // Provide an option to create directories in the dialog - CanCreateDirectories?: boolean; - // Makes the dialog show hidden files - ShowHiddenFiles?: boolean; - // Allow the user to select files where the system hides their extensions - CanSelectHiddenExtension?: boolean; - // Allows selection of filetypes not specified in the filters - AllowOtherFiletypes?: boolean; - // Hide the extension when showing the filename - HideExtension?: boolean; - // Treats file packages as directories, e.g. .app on macOS - TreatsFilePackagesAsDirectories?: boolean; - // The message to show in the dialog - Message?: string; - // The default directory to open the dialog in - Directory?: string; - // The default filename to use in the dialog - Filename?: string; - // The label for the select button - ButtonText?: string; -} - -export interface Screen { - // The screen ID - Id: string; - // The screen name - Name: string; - // The screen scale. 1 = standard resolution, 2: 2x retina, etc. - Scale: number; - // The X position of the screen - X: number; - // The Y position of the screen - Y: number; - // The width and height of the screen - Size: Size; - // The bounds of the screen - Bounds: Rect; - // The work area of the screen - WorkArea: Rect; - // True if this is the primary screen - IsPrimary: boolean; - // The rotation of the screen - Rotation: number; -} -export interface Rect { - X: number; - Y: number; - Width: number; - Height: number; -} - -export interface WailsEvent { - // The name of the event - Name: string; - // The data associated with the event - Data?: any; -} - -export interface Size { - Width: number; - Height: number; -} -export interface Position { - X: number; - Y: number; -} - -``` \ No newline at end of file diff --git a/v3/internal/runtime/desktop/api/index.js b/v3/internal/runtime/desktop/api/index.js deleted file mode 100644 index edc342299..000000000 --- a/v3/internal/runtime/desktop/api/index.js +++ /dev/null @@ -1,349 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ -/* jshint esversion: 9 */ - -/** - * @typedef {import("./types").MessageDialogOptions} MessageDialogOptions - * @typedef {import("./types").OpenDialogOptions} OpenDialogOptions - * @typedef {import("./types").SaveDialogOptions} SaveDialogOptions - * @typedef {import("./types").Screen} Screen - * @typedef {import("./types").Size} Size - * @typedef {import("./types").Position} Position - * - */ - -/** - * The Clipboard API provides methods to interact with the system clipboard. - */ -export const Clipboard = { - /** - * Gets the text from the clipboard - * @returns {Promise} - */ - Text: () => { - return wails.Clipboard.Text(); - }, - /** - * Sets the text on the clipboard - * @param {string} text - text to set in the clipboard - */ - SetText: (text) => { - return wails.Clipboard.SetText(text); - }, -}; - -/** - * The Application API provides methods to interact with the application. - */ -export const Application = { - /** - * Hides the application - */ - Hide: () => { - return wails.Application.Hide(); - }, - /** - * Shows the application - */ - Show: () => { - return wails.Application.Show(); - }, - /** - * Quits the application - */ - Quit: () => { - return wails.Application.Quit(); - }, -}; - -/** - * The Screens API provides methods to interact with the system screens/monitors. - */ -export const Screens = { - /** - * Get the primary screen - * @returns {Promise} - */ - GetPrimary: () => { - return wails.Screens.GetPrimary(); - }, - /** - * Get all screens - * @returns {Promise} - */ - GetAll: () => { - return wails.Screens.GetAll(); - }, - /** - * Get the current screen - * @returns {Promise} - */ - GetCurrent: () => { - return wails.Screens.GetCurrent(); - }, -}; - -/** - * Call a plugin method - * @param {string} pluginName - name of the plugin - * @param {string} methodName - name of the method - * @param {...any} args - arguments to pass to the method - * @returns {Promise} - promise that resolves with the result - */ -export const Plugin = (pluginName, methodName, ...args) => { - return wails.Plugin(pluginName, methodName, ...args); -}; - -/** - * The Dialog API provides methods to interact with system dialogs. - */ -export const Dialog = { - /** - * Shows an info dialog - * @param {MessageDialogOptions} options - options for the dialog - * @returns {Promise} - */ - Info: (options) => { - return wails.Dialog.Info(options); - }, - /** - * Shows a warning dialog - * @param {MessageDialogOptions} options - options for the dialog - * @returns {Promise} - */ - Warning: (options) => { - return wails.Dialog.Warning(options); - }, - /** - * Shows an error dialog - * @param {MessageDialogOptions} options - options for the dialog - * @returns {Promise} - */ - Error: (options) => { - return wails.Dialog.Error(options); - }, - - /** - * Shows a question dialog - * @param {MessageDialogOptions} options - options for the dialog - * @returns {Promise} - */ - Question: (options) => { - return wails.Dialog.Question(options); - }, - - /** - * Shows a file open dialog and returns the files selected by the user. - * A blank string indicates that the dialog was cancelled. - * @param {OpenDialogOptions} options - options for the dialog - * @returns {Promise|Promise} - */ - OpenFile: (options) => { - return wails.Dialog.OpenFile(options); - }, - - /** - * Shows a file save dialog and returns the filename given by the user. - * A blank string indicates that the dialog was cancelled. - * @param {SaveDialogOptions} options - options for the dialog - * @returns {Promise} - */ - SaveFile: (options) => { - return wails.Dialog.SaveFile(options); - }, -}; - -/** - * The Events API provides methods to interact with the event system. - */ -export const Events = { - /** - * Emit an event - * @param {string} name - * @param {any=} data - */ - Emit: (name, data) => { - return wails.Events.Emit(name, data); - }, - /** - * Subscribe to an event - * @param {string} name - name of the event - * @param {(any) => void} callback - callback to call when the event is emitted - @returns {function()} unsubscribeMethod - method to unsubscribe from the event - */ - On: (name, callback) => { - return wails.Events.On(name, callback); - }, - /** - * Subscribe to an event once - * @param {string} name - name of the event - * @param {(any) => void} callback - callback to call when the event is emitted - * @returns {function()} unsubscribeMethod - method to unsubscribe from the event - */ - Once: (name, callback) => { - return wails.Events.Once(name, callback); - }, - /** - * Subscribe to an event multiple times - * @param {string} name - name of the event - * @param {(any) => void} callback - callback to call when the event is emitted - * @param {number} count - number of times to call the callback - * @returns {Promise} unsubscribeMethod - method to unsubscribe from the event - */ - OnMultiple: (name, callback, count) => { - return wails.Events.OnMultiple(name, callback, count); - }, - /** - * Unsubscribe from an event - * @param {string} name - name of the event to unsubscribe from - * @param {...string} additionalNames - additional names of events to unsubscribe from - */ - Off: (name, ...additionalNames) => { - wails.Events.Off(name, additionalNames); - }, - /** - * Unsubscribe all listeners from all events - */ - OffAll: () => { - wails.Events.OffAll(); - }, -}; - -/** - * The Window API provides methods to interact with the window. - */ -export const Window = { - /** - * Center the window. - */ - Center: () => void wails.Window.Center(), - /** - * Set the window title. - * @param title - */ - SetTitle: (title) => void wails.Window.SetTitle(title), - - /** - * Makes the window fullscreen. - */ - Fullscreen: () => void wails.Window.Fullscreen(), - - /** - * Unfullscreen the window. - */ - UnFullscreen: () => void wails.Window.UnFullscreen(), - - /** - * Set the window size. - * @param {number} width The window width - * @param {number} height The window height - */ - SetSize: (width, height) => void wails.Window.SetSize(width, height), - - /** - * Get the window size. - * @returns {Promise} The window size - */ - Size: () => { - return wails.Window.Size(); - }, - - /** - * Set the window maximum size. - * @param {number} width - * @param {number} height - */ - SetMaxSize: (width, height) => void wails.Window.SetMaxSize(width, height), - - /** - * Set the window minimum size. - * @param {number} width - * @param {number} height - */ - SetMinSize: (width, height) => void wails.Window.SetMinSize(width, height), - - /** - * Set window to be always on top. - * @param {boolean} onTop Whether the window should be always on top - */ - SetAlwaysOnTop: (onTop) => void wails.Window.SetAlwaysOnTop(onTop), - - /** - * Set the window position. - * @param {number} x - * @param {number} y - */ - SetPosition: (x, y) => void wails.Window.SetPosition(x, y), - - /** - * Get the window position. - * @returns {Promise} The window position - */ - Position: () => { - return wails.Window.Position(); - }, - - /** - * Get the screen the window is on. - * @returns {Promise} - */ - Screen: () => { - return wails.Window.Screen(); - }, - - /** - * Hide the window - */ - Hide: () => void wails.Window.Hide(), - - /** - * Maximise the window - */ - Maximise: () => void wails.Window.Maximise(), - - /** - * Show the window - */ - Show: () => void wails.Window.Show(), - - /** - * Close the window - */ - Close: () => void wails.Window.Close(), - - /** - * Toggle the window maximise state - */ - ToggleMaximise: () => void wails.Window.ToggleMaximise(), - - /** - * Unmaximise the window - */ - UnMaximise: () => void wails.Window.UnMaximise(), - - /** - * Minimise the window - */ - Minimise: () => void wails.Window.Minimise(), - - /** - * Unminimise the window - */ - UnMinimise: () => void wails.Window.UnMinimise(), - - /** - * Set the background colour of the window. - * @param {number} r - The red value between 0 and 255 - * @param {number} g - The green value between 0 and 255 - * @param {number} b - The blue value between 0 and 255 - * @param {number} a - The alpha value between 0 and 255 - */ - SetBackgroundColour: (r, g, b, a) => void wails.Window.SetBackgroundColour(r, g, b, a), -}; diff --git a/v3/internal/runtime/desktop/api/package.json b/v3/internal/runtime/desktop/api/package.json deleted file mode 100644 index fa19b24bb..000000000 --- a/v3/internal/runtime/desktop/api/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@wailsapp/api", - "version": "3.0.0-alpha.3", - "description": "Wails Runtime API", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/wailsapp/wails.git" - }, - "author": "The Wails Team", - "license": "MIT", - "bugs": { - "url": "https://github.com/wailsapp/wails/issues" - }, - "homepage": "https://wails.io" -} diff --git a/v3/internal/runtime/desktop/api/types.d.ts b/v3/internal/runtime/desktop/api/types.d.ts deleted file mode 100644 index bbbc0662e..000000000 --- a/v3/internal/runtime/desktop/api/types.d.ts +++ /dev/null @@ -1,124 +0,0 @@ - -export interface Button { - // The label of the button - Label?: string; - // True if this button is the cancel button (selected when pressing escape) - IsCancel?: boolean; - // True if this button is the default button (selected when pressing enter) - IsDefault?: boolean; -} - -interface MessageDialogOptions { - // The title for the dialog - Title?: string; - // The message to display - Message?: string; - // The buttons to use on the dialog - Buttons?: Button[]; -} - -export interface OpenFileDialogOptions { - // Allows the user to be able to select directories - CanChooseDirectories?: boolean; - // Allows the user to be able to select files - CanChooseFiles?: boolean; - // Provide an option to create directories in the dialog - CanCreateDirectories?: boolean; - // Makes the dialog show hidden files - ShowHiddenFiles?: boolean; - // Whether the dialog should follow filesystem aliases - ResolvesAliases?: boolean; - // Allow the user to select multiple files or directories - AllowsMultipleSelection?: boolean; - // Hide the extension when showing the filename - HideExtension?: boolean; - // Allow the user to select files where the system hides their extensions - CanSelectHiddenExtension?: boolean; - // Treats file packages as directories, e.g. .app on macOS - TreatsFilePackagesAsDirectories?: boolean; - // Allows selection of filetypes not specified in the filters - AllowsOtherFiletypes?: boolean; - // The file filters to use in the dialog - Filters?: FileFilter[]; - // The title of the dialog - Title?: string; - // The message to display - Message?: string; - // The label for the select button - ButtonText?: string; - // The default directory to open the dialog in - Directory?: string; -} -export interface FileFilter { - // The display name for the filter, e.g. "Text Files" - DisplayName?: string; - // The pattern to use for the filter, e.g. "*.txt;*.md" - Pattern?: string; -} -export interface SaveFileDialogOptions { - // Provide an option to create directories in the dialog - CanCreateDirectories?: boolean; - // Makes the dialog show hidden files - ShowHiddenFiles?: boolean; - // Allow the user to select files where the system hides their extensions - CanSelectHiddenExtension?: boolean; - // Allows selection of filetypes not specified in the filters - AllowOtherFiletypes?: boolean; - // Hide the extension when showing the filename - HideExtension?: boolean; - // Treats file packages as directories, e.g. .app on macOS - TreatsFilePackagesAsDirectories?: boolean; - // The message to show in the dialog - Message?: string; - // The default directory to open the dialog in - Directory?: string; - // The default filename to use in the dialog - Filename?: string; - // The label for the select button - ButtonText?: string; -} - -export interface Screen { - // The screen ID - Id: string; - // The screen name - Name: string; - // The screen scale. 1 = standard resolution, 2: 2x retina, etc. - Scale: number; - // The X position of the screen - X: number; - // The Y position of the screen - Y: number; - // The width and height of the screen - Size: Size; - // The bounds of the screen - Bounds: Rect; - // The work area of the screen - WorkArea: Rect; - // True if this is the primary screen - IsPrimary: boolean; - // The rotation of the screen - Rotation: number; -} -export interface Rect { - X: number; - Y: number; - Width: number; - Height: number; -} - -export interface WailsEvent { - // The name of the event - Name: string; - // The data associated with the event - Data?: any; -} - -export interface Size { - Width: number; - Height: number; -} -export interface Position { - X: number; - Y: number; -} diff --git a/v3/internal/runtime/desktop/application.js b/v3/internal/runtime/desktop/application.js deleted file mode 100644 index b884ad34e..000000000 --- a/v3/internal/runtime/desktop/application.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("application"); - -/** - * Hide the application - */ -export function Hide() { - void call("Hide"); -} - -/** - * Show the application - */ -export function Show() { - void call("Show"); -} - - -/** - * Quit the application - */ -export function Quit() { - void call("Quit"); -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/calls.js b/v3/internal/runtime/desktop/calls.js deleted file mode 100644 index 0900c5812..000000000 --- a/v3/internal/runtime/desktop/calls.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -import {newRuntimeCaller} from "./runtime"; - -import { nanoid } from 'nanoid/non-secure'; - -let call = newRuntimeCaller("call"); - -let callResponses = new Map(); - -function generateID() { - let result; - do { - result = nanoid(); - } while (callResponses.has(result)); - return result; -} - -export function callCallback(id, data, isJSON) { - let p = callResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - callResponses.delete(id); - } -} - -export function callErrorCallback(id, message) { - let p = callResponses.get(id); - if (p) { - p.reject(message); - callResponses.delete(id); - } -} - -function callBinding(type, options) { - return new Promise((resolve, reject) => { - let id = generateID(); - options = options || {}; - options["call-id"] = id; - callResponses.set(id, {resolve, reject}); - call(type, options).catch((error) => { - reject(error); - callResponses.delete(id); - }); - }); -} - -export function Call(options) { - return callBinding("Call", options); -} - -/** - * Call a plugin method - * @param {string} pluginName - name of the plugin - * @param {string} methodName - name of the method - * @param {...any} args - arguments to pass to the method - * @returns {Promise} - promise that resolves with the result - */ -export function Plugin(pluginName, methodName, ...args) { - return callBinding("Call", { - packageName: "wails-plugins", - structName: pluginName, - methodName: methodName, - args: args, - }); -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/clipboard.js b/v3/internal/runtime/desktop/clipboard.js deleted file mode 100644 index 0d814d2dc..000000000 --- a/v3/internal/runtime/desktop/clipboard.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("clipboard"); - -/** - * Set the Clipboard text - */ -export function SetText(text) { - void call("SetText", {text}); -} - -/** - * Get the Clipboard text - * @returns {Promise} - */ -export function Text() { - return call("Text"); -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/contextmenu.js b/v3/internal/runtime/desktop/contextmenu.js deleted file mode 100644 index 7b6e2c1f4..000000000 --- a/v3/internal/runtime/desktop/contextmenu.js +++ /dev/null @@ -1,32 +0,0 @@ -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("contextmenu"); - -function openContextMenu(id, x, y, data) { - return call("OpenContextMenu", {id, x, y, data}); -} - -export function enableContextMenus(enabled) { - if (enabled) { - window.addEventListener('contextmenu', contextMenuHandler); - } else { - window.removeEventListener('contextmenu', contextMenuHandler); - } -} - -function contextMenuHandler(event) { - processContextMenu(event.target, event); -} - -function processContextMenu(element, event) { - let id = element.getAttribute('data-contextmenu'); - if (id) { - event.preventDefault(); - openContextMenu(id, event.clientX, event.clientY, element.getAttribute('data-contextmenu-data')); - } else { - let parent = element.parentElement; - if (parent) { - processContextMenu(parent, event); - } - } -} diff --git a/v3/internal/runtime/desktop/dialogs.js b/v3/internal/runtime/desktop/dialogs.js deleted file mode 100644 index e923f53ce..000000000 --- a/v3/internal/runtime/desktop/dialogs.js +++ /dev/null @@ -1,121 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -/** - * @typedef {import("./api/types").MessageDialogOptions} MessageDialogOptions - * @typedef {import("./api/types").OpenDialogOptions} OpenDialogOptions - * @typedef {import("./api/types").SaveDialogOptions} SaveDialogOptions - */ - -import {newRuntimeCaller} from "./runtime"; - -import { nanoid } from 'nanoid/non-secure'; - -let call = newRuntimeCaller("dialog"); - -let dialogResponses = new Map(); - -function generateID() { - let result; - do { - result = nanoid(); - } while (dialogResponses.has(result)); - return result; -} - -export function dialogCallback(id, data, isJSON) { - let p = dialogResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - dialogResponses.delete(id); - } -} -export function dialogErrorCallback(id, message) { - let p = dialogResponses.get(id); - if (p) { - p.reject(message); - dialogResponses.delete(id); - } -} - -function dialog(type, options) { - return new Promise((resolve, reject) => { - let id = generateID(); - options = options || {}; - options["dialog-id"] = id; - dialogResponses.set(id, {resolve, reject}); - call(type, options).catch((error) => { - reject(error); - dialogResponses.delete(id); - }); - }); -} - - -/** - * Shows an Info dialog with the given options. - * @param {MessageDialogOptions} options - * @returns {Promise} The label of the button pressed - */ -export function Info(options) { - return dialog("Info", options); -} - -/** - * Shows an Warning dialog with the given options. - * @param {MessageDialogOptions} options - * @returns {Promise} The label of the button pressed - */ -export function Warning(options) { - return dialog("Warning", options); -} - -/** - * Shows an Error dialog with the given options. - * @param {MessageDialogOptions} options - * @returns {Promise} The label of the button pressed - */ -export function Error(options) { - return dialog("Error", options); -} - -/** - * Shows a Question dialog with the given options. - * @param {MessageDialogOptions} options - * @returns {Promise} The label of the button pressed - */ -export function Question(options) { - return dialog("Question", options); -} - -/** - * Shows an Open dialog with the given options. - * @param {OpenDialogOptions} options - * @returns {Promise} Returns the selected file or an array of selected files if AllowsMultipleSelection is true. A blank string is returned if no file was selected. - */ -export function OpenFile(options) { - return dialog("OpenFile", options); -} - -/** - * Shows a Save dialog with the given options. - * @param {OpenDialogOptions} options - * @returns {Promise} Returns the selected file. A blank string is returned if no file was selected. - */ -export function SaveFile(options) { - return dialog("SaveFile", options); -} - diff --git a/v3/internal/runtime/desktop/events.js b/v3/internal/runtime/desktop/events.js deleted file mode 100644 index b1d740092..000000000 --- a/v3/internal/runtime/desktop/events.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -/** - * @typedef {import("./api/types").WailsEvent} WailsEvent - */ - -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("events"); - -/** - * The Listener class defines a listener! :-) - * - * @class Listener - */ -class Listener { - /** - * Creates an instance of Listener. - * @param {string} eventName - * @param {function} callback - * @param {number} maxCallbacks - * @memberof Listener - */ - constructor(eventName, callback, maxCallbacks) { - this.eventName = eventName; - // Default of -1 means infinite - this.maxCallbacks = maxCallbacks || -1; - // Callback invokes the callback with the given data - // Returns true if this listener should be destroyed - this.Callback = (data) => { - callback(data); - // If maxCallbacks is infinite, return false (do not destroy) - if (this.maxCallbacks === -1) { - return false; - } - // Decrement maxCallbacks. Return true if now 0, otherwise false - this.maxCallbacks -= 1; - return this.maxCallbacks === 0; - }; - } -} - - -/** - * WailsEvent defines a custom event. It is passed to event listeners. - * - * @class WailsEvent - * @property {string} name - Name of the event - * @property {any} data - Data associated with the event - */ -export class WailsEvent { - /** - * Creates an instance of WailsEvent. - * @param {string} name - Name of the event - * @param {any=null} data - Data associated with the event - * @memberof WailsEvent - */ - constructor(name, data = null) { - this.name = name; - this.data = data; - } -} - -export const eventListeners = new Map(); - -/** - * Registers an event listener that will be invoked `maxCallbacks` times before being destroyed - * - * @export - * @param {string} eventName - * @param {function(WailsEvent): void} callback - * @param {number} maxCallbacks - * @returns {function} A function to cancel the listener - */ -export function OnMultiple(eventName, callback, maxCallbacks) { - let listeners = eventListeners.get(eventName) || []; - const thisListener = new Listener(eventName, callback, maxCallbacks); - listeners.push(thisListener); - eventListeners.set(eventName, listeners); - return () => listenerOff(thisListener); -} - -/** - * Registers an event listener that will be invoked every time the event is emitted - * - * @export - * @param {string} eventName - * @param {function(WailsEvent): void} callback - * @returns {function} A function to cancel the listener - */ -export function On(eventName, callback) { - return OnMultiple(eventName, callback, -1); -} - -/** - * Registers an event listener that will be invoked once then destroyed - * - * @export - * @param {string} eventName - * @param {function(WailsEvent): void} callback - @returns {function} A function to cancel the listener - */ -export function Once(eventName, callback) { - return OnMultiple(eventName, callback, 1); -} - -/** - * listenerOff unregisters a listener previously registered with On - * - * @param {Listener} listener - */ -function listenerOff(listener) { - const eventName = listener.eventName; - // Remove local listener - let listeners = eventListeners.get(eventName).filter(l => l !== listener); - if (listeners.length === 0) { - eventListeners.delete(eventName); - } else { - eventListeners.set(eventName, listeners); - } -} - -/** - * dispatches an event to all listeners - * - * @export - * @param {WailsEvent} event - */ -export function dispatchWailsEvent(event) { - console.log("dispatching event: ", {event}); - let listeners = eventListeners.get(event.name); - if (listeners) { - // iterate listeners and call callback. If callback returns true, remove listener - let toRemove = []; - listeners.forEach(listener => { - let remove = listener.Callback(event); - if (remove) { - toRemove.push(listener); - } - }); - // remove listeners - if (toRemove.length > 0) { - listeners = listeners.filter(l => !toRemove.includes(l)); - if (listeners.length === 0) { - eventListeners.delete(event.name); - } else { - eventListeners.set(event.name, listeners); - } - } - } -} - -/** - * Off unregisters a listener previously registered with On, - * optionally multiple listeners can be unregistered via `additionalEventNames` - * - [v3 CHANGE] Off only unregisters listeners within the current window - * - * @param {string} eventName - * @param {...string} additionalEventNames - */ -export function Off(eventName, ...additionalEventNames) { - let eventsToRemove = [eventName, ...additionalEventNames]; - eventsToRemove.forEach(eventName => { - eventListeners.delete(eventName); - }); -} - -/** - * OffAll unregisters all listeners - * [v3 CHANGE] OffAll only unregisters listeners within the current window - * - */ -export function OffAll() { - eventListeners.clear(); -} - -/** - * Emit an event - * @param {WailsEvent} event The event to emit - */ -export function Emit(event) { - void call("Emit", event); -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/events.test.js b/v3/internal/runtime/desktop/events.test.js deleted file mode 100644 index a9b679657..000000000 --- a/v3/internal/runtime/desktop/events.test.js +++ /dev/null @@ -1,115 +0,0 @@ -import { On, Off, OffAll, OnMultiple, WailsEvent, dispatchWailsEvent, eventListeners, Once } from './events'; -import { expect, describe, it, vi, afterEach, beforeEach } from 'vitest'; - -afterEach(() => { - OffAll(); - vi.resetAllMocks(); -}); - -describe('OnMultiple', () => { - let testEvent = new WailsEvent('a', {}); - - it('should stop after a specified number of times', () => { - const cb = vi.fn(); - OnMultiple('a', cb, 5); - dispatchWailsEvent(testEvent); - dispatchWailsEvent(testEvent); - dispatchWailsEvent(testEvent); - dispatchWailsEvent(testEvent); - dispatchWailsEvent(testEvent); - dispatchWailsEvent(testEvent); - expect(cb).toBeCalledTimes(5); - }); - - it('should return a cancel fn', () => { - const cb = vi.fn() - const cancel = OnMultiple('a', cb, 5) - dispatchWailsEvent(testEvent) - dispatchWailsEvent(testEvent) - cancel() - dispatchWailsEvent(testEvent) - dispatchWailsEvent(testEvent) - expect(cb).toBeCalledTimes(2) - }) -}) - -describe('On', () => { - it('should create a listener with a count of -1', () => { - On('a', () => {}) - expect(eventListeners.get("a")[0].maxCallbacks).toBe(-1) - }) - - it('should return a cancel fn', () => { - const cancel = On('a', () => {}) - cancel(); - }) -}) - -describe('Once', () => { - it('should create a listener with a count of 1', () => { - Once('a', () => {}) - expect(eventListeners.get("a")[0].maxCallbacks).toBe(1) - }) - - it('should return a cancel fn', () => { - const cancel = EventsOn('a', () => {}) - cancel(); - }) -}) -// -// describe('EventsNotify', () => { -// it('should inform a listener', () => { -// const cb = vi.fn() -// EventsOn('a', cb) -// EventsNotify(JSON.stringify({name: 'a', data: ["one", "two", "three"]})) -// expect(cb).toBeCalledTimes(1); -// expect(cb).toHaveBeenLastCalledWith("one", "two", "three"); -// expect(window.WailsInvoke).toBeCalledTimes(0); -// }) -// }) -// -// describe('EventsEmit', () => { -// it('should emit an event', () => { -// EventsEmit('a', 'one', 'two', 'three') -// expect(window.WailsInvoke).toBeCalledTimes(1); -// const calledWith = window.WailsInvoke.calls[0][0]; -// expect(calledWith.slice(0, 2)).toBe('EE') -// expect(JSON.parse(calledWith.slice(2))).toStrictEqual({data: ["one", "two", "three"], name: "a"}) -// }) -// }) -// -describe('Off', () => { - beforeEach(() => { - On('a', () => {}) - On('a', () => {}) - On('a', () => {}) - On('b', () => {}) - On('c', () => {}) - }) - - it('should cancel all event listeners for a single type', () => { - Off('a') - expect(eventListeners.get('a')).toBeUndefined() - expect(eventListeners.get('b')).not.toBeUndefined() - expect(eventListeners.get('c')).not.toBeUndefined() - }) - - it('should cancel all event listeners for multiple types', () => { - Off('a', 'b') - expect(eventListeners.get('a')).toBeUndefined() - expect(eventListeners.get('b')).toBeUndefined() - expect(eventListeners.get('c')).not.toBeUndefined() - }) -}) - -describe('OffAll', () => { - it('should cancel all event listeners', () => { - On('a', () => {}) - On('a', () => {}) - On('a', () => {}) - On('b', () => {}) - On('c', () => {}) - OffAll() - expect(eventListeners.size).toBe(0) - }) -}) diff --git a/v3/internal/runtime/desktop/log.js b/v3/internal/runtime/desktop/log.js deleted file mode 100644 index e1ef8d6ad..000000000 --- a/v3/internal/runtime/desktop/log.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("log"); - -/** - * Logs a message. - * @param {message} Message to log - */ -export function Log(message) { - return call("Log", message); -} diff --git a/v3/internal/runtime/desktop/main.js b/v3/internal/runtime/desktop/main.js deleted file mode 100644 index 26b4e9de9..000000000 --- a/v3/internal/runtime/desktop/main.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ -/* jshint esversion: 9 */ - - -import * as Clipboard from './clipboard'; -import * as Application from './application'; -import * as Log from './log'; -import * as Screens from './screens'; -import {Plugin, Call, callErrorCallback, callCallback} from "./calls"; -import {newWindow} from "./window"; -import {dispatchWailsEvent, Emit, Off, OffAll, On, Once, OnMultiple} from "./events"; -import {dialogCallback, dialogErrorCallback, Error, Info, OpenFile, Question, SaveFile, Warning,} from "./dialogs"; -import {enableContextMenus} from "./contextmenu"; -import {reloadWML} from "./wml"; - -window.wails = { - ...newRuntime(null), -}; - -// Internal wails endpoints -window._wails = { - dialogCallback, - dialogErrorCallback, - dispatchWailsEvent, - callCallback, - callErrorCallback, -}; - -export function newRuntime(windowName) { - return { - Clipboard: { - ...Clipboard - }, - Application: { - ...Application, - GetWindowByName(windowName) { - return newRuntime(windowName); - } - }, - Log, - Screens, - Call, - Plugin, - WML: { - Reload: reloadWML, - }, - Dialog: { - Info, - Warning, - Error, - Question, - OpenFile, - SaveFile, - }, - Events: { - Emit, - On, - Once, - OnMultiple, - Off, - OffAll, - }, - Window: newWindow(windowName), - }; -} - -if (DEBUG) { - console.log("Wails v3.0.0 Debug Mode Enabled"); -} - -enableContextMenus(true); - -document.addEventListener("DOMContentLoaded", function(event) { - reloadWML(); -}); \ No newline at end of file diff --git a/v3/internal/runtime/desktop/runtime.js b/v3/internal/runtime/desktop/runtime.js deleted file mode 100644 index 8f2748325..000000000 --- a/v3/internal/runtime/desktop/runtime.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -const runtimeURL = window.location.origin + "/wails/runtime"; - -function runtimeCall(method, windowName, args) { - let url = new URL(runtimeURL); - url.searchParams.append("method", method); - if (args) { - url.searchParams.append("args", JSON.stringify(args)); - } - let fetchOptions = { - headers: {}, - }; - if (windowName) { - fetchOptions.headers["x-wails-window-name"] = windowName; - } - return new Promise((resolve, reject) => { - fetch(url, fetchOptions) - .then(response => { - if (response.ok) { - // check content type - if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) { - return response.json(); - } else { - return response.text(); - } - } - reject(Error(response.statusText)); - }) - .then(data => resolve(data)) - .catch(error => reject(error)); - }); -} - -export function newRuntimeCaller(object, windowName) { - return function (method, args=null) { - return runtimeCall(object + "." + method, windowName, args); - }; -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/screens.js b/v3/internal/runtime/desktop/screens.js deleted file mode 100644 index 2933290ee..000000000 --- a/v3/internal/runtime/desktop/screens.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -/** - * @typedef {import("./api/types").Screen} Screen - */ - -import {newRuntimeCaller} from "./runtime"; - -let call = newRuntimeCaller("screens"); - -/** - * Gets all screens. - * @returns {Promise} - */ -export function GetAll() { - return call("GetAll"); -} - -/** - * Gets the primary screen. - * @returns {Promise} - */ -export function GetPrimary() { - return call("GetPrimary"); -} - -/** - * Gets the current active screen. - * @returns {Promise} - * @constructor - */ -export function GetCurrent() { - return call("GetCurrent"); -} \ No newline at end of file diff --git a/v3/internal/runtime/desktop/window.js b/v3/internal/runtime/desktop/window.js deleted file mode 100644 index 13df2a98f..000000000 --- a/v3/internal/runtime/desktop/window.js +++ /dev/null @@ -1,157 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -/* jshint esversion: 9 */ - -/** - * @typedef {import("../api/types").Size} Size - * @typedef {import("../api/types").Position} Position - * @typedef {import("../api/types").Screen} Screen - */ - -import {newRuntimeCaller} from "./runtime"; - -export function newWindow(windowName) { - let call = newRuntimeCaller("window", windowName); - return { - // Reload: () => call('WR'), - // ReloadApp: () => call('WR'), - // SetSystemDefaultTheme: () => call('WASDT'), - // SetLightTheme: () => call('WALT'), - // SetDarkTheme: () => call('WADT'), - // IsFullscreen: () => call('WIF'), - // IsMaximized: () => call('WIM'), - // IsMinimized: () => call('WIMN'), - // IsWindowed: () => call('WIF'), - - - /** - * Centers the window. - */ - Center: () => void call('Center'), - - /** - * Set the window title. - * @param title - */ - SetTitle: (title) => void call('SetTitle', {title}), - - /** - * Makes the window fullscreen. - */ - Fullscreen: () => void call('Fullscreen'), - - /** - * Unfullscreen the window. - */ - UnFullscreen: () => void call('UnFullscreen'), - - /** - * Set the window size. - * @param {number} width The window width - * @param {number} height The window height - */ - SetSize: (width, height) => call('SetSize', {width,height}), - - /** - * Get the window size. - * @returns {Promise} The window size - */ - Size: () => { return call('Size'); }, - - /** - * Set the window maximum size. - * @param {number} width - * @param {number} height - */ - SetMaxSize: (width, height) => void call('SetMaxSize', {width,height}), - - /** - * Set the window minimum size. - * @param {number} width - * @param {number} height - */ - SetMinSize: (width, height) => void call('SetMinSize', {width,height}), - - /** - * Set window to be always on top. - * @param {boolean} onTop Whether the window should be always on top - */ - SetAlwaysOnTop: (onTop) => void call('SetAlwaysOnTop', {alwaysOnTop:onTop}), - - /** - * Set the window position. - * @param {number} x - * @param {number} y - */ - SetPosition: (x, y) => call('SetPosition', {x,y}), - - /** - * Get the window position. - * @returns {Promise} The window position - */ - Position: () => { return call('Position'); }, - - /** - * Get the screen the window is on. - * @returns {Promise} - */ - Screen: () => { return call('Screen'); }, - - /** - * Hide the window - */ - Hide: () => void call('Hide'), - - /** - * Maximise the window - */ - Maximise: () => void call('Maximise'), - - /** - * Show the window - */ - Show: () => void call('Show'), - - /** - * Close the window - */ - Close: () => void call('Close'), - - /** - * Toggle the window maximise state - */ - ToggleMaximise: () => void call('ToggleMaximise'), - - /** - * Unmaximise the window - */ - UnMaximise: () => void call('UnMaximise'), - - /** - * Minimise the window - */ - Minimise: () => void call('Minimise'), - - /** - * Unminimise the window - */ - UnMinimise: () => void call('UnMinimise'), - - /** - * Set the background colour of the window. - * @param {number} r - A value between 0 and 255 - * @param {number} g - A value between 0 and 255 - * @param {number} b - A value between 0 and 255 - * @param {number} a - A value between 0 and 255 - */ - SetBackgroundColour: (r, g, b, a) => void call('SetBackgroundColour', {r, g, b, a}), - }; -} diff --git a/v3/internal/runtime/desktop/wml.js b/v3/internal/runtime/desktop/wml.js deleted file mode 100644 index 865c3d628..000000000 --- a/v3/internal/runtime/desktop/wml.js +++ /dev/null @@ -1,74 +0,0 @@ - -import {Emit, WailsEvent} from "./events"; -import {Question} from "./dialogs"; - -function sendEvent(eventName, data=null) { - let event = new WailsEvent(eventName, data); - Emit(event); -} - -function addWMLEventListeners() { - const elements = document.querySelectorAll('[data-wml-event]'); - elements.forEach(function (element) { - const eventType = element.getAttribute('data-wml-event'); - const confirm = element.getAttribute('data-wml-confirm'); - const trigger = element.getAttribute('data-wml-trigger') || "click"; - - let callback = function () { - if (confirm) { - Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) { - if (result !== "No") { - sendEvent(eventType); - } - }); - return; - } - sendEvent(eventType); - }; - // Remove existing listeners - - element.removeEventListener(trigger, callback); - - // Add new listener - element.addEventListener(trigger, callback); - }); -} - -function callWindowMethod(method) { - if (wails.Window[method] === undefined) { - console.log("Window method " + method + " not found"); - } - wails.Window[method](); -} - -function addWMLWindowListeners() { - const elements = document.querySelectorAll('[data-wml-window]'); - elements.forEach(function (element) { - const windowMethod = element.getAttribute('data-wml-window'); - const confirm = element.getAttribute('data-wml-confirm'); - const trigger = element.getAttribute('data-wml-trigger') || "click"; - - let callback = function () { - if (confirm) { - Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) { - if (result !== "No") { - callWindowMethod(windowMethod); - } - }); - return; - } - callWindowMethod(windowMethod); - }; - - // Remove existing listeners - element.removeEventListener(trigger, callback); - - // Add new listener - element.addEventListener(trigger, callback); - }); -} - -export function reloadWML() { - addWMLEventListeners(); - addWMLWindowListeners(); -} diff --git a/v3/internal/runtime/package-lock.json b/v3/internal/runtime/package-lock.json deleted file mode 100644 index a029e31be..000000000 --- a/v3/internal/runtime/package-lock.json +++ /dev/null @@ -1,8685 +0,0 @@ -{ - "name": "runtime", - "version": "3.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "runtime", - "version": "3.0.0", - "license": "ISC", - "devDependencies": { - "esbuild": "^0.17.5", - "happy-dom": "^8.1.5", - "nanoid": "^4.0.0", - "npm-check-updates": "^16.6.3", - "svelte": "^3.55.1", - "vitest": "^0.28.3" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.5.tgz", - "integrity": "sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.5.tgz", - "integrity": "sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.5.tgz", - "integrity": "sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.5.tgz", - "integrity": "sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.5.tgz", - "integrity": "sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.5.tgz", - "integrity": "sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.5.tgz", - "integrity": "sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.5.tgz", - "integrity": "sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.5.tgz", - "integrity": "sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.5.tgz", - "integrity": "sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.5.tgz", - "integrity": "sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.5.tgz", - "integrity": "sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.5.tgz", - "integrity": "sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.5.tgz", - "integrity": "sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.5.tgz", - "integrity": "sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.5.tgz", - "integrity": "sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.5.tgz", - "integrity": "sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.5.tgz", - "integrity": "sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.5.tgz", - "integrity": "sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.5.tgz", - "integrity": "sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.5.tgz", - "integrity": "sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.5.tgz", - "integrity": "sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true - }, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", - "dev": true, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/git": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", - "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", - "dev": true, - "dependencies": { - "@npmcli/promise-spawn": "^6.0.0", - "lru-cache": "^7.4.4", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^8.0.0", - "proc-log": "^3.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/installed-package-contents": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", - "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", - "dev": true, - "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "bin": { - "installed-package-contents": "lib/index.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "dev": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/@npmcli/node-gyp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", - "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/promise-spawn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", - "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", - "dev": true, - "dependencies": { - "which": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@npmcli/run-script": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", - "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", - "dev": true, - "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^6.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/@pnpm/network.ca-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", - "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", - "dev": true, - "dependencies": { - "graceful-fs": "4.2.10" - }, - "engines": { - "node": ">=12.22.0" - } - }, - "node_modules/@pnpm/npm-conf": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz", - "integrity": "sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A==", - "dev": true, - "dependencies": { - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sindresorhus/is": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz", - "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.1" - }, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@types/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", - "dev": true - }, - "node_modules/@types/chai-subset": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", - "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", - "dev": true, - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", - "dev": true - }, - "node_modules/@vitest/expect": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.28.3.tgz", - "integrity": "sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==", - "dev": true, - "dependencies": { - "@vitest/spy": "0.28.3", - "@vitest/utils": "0.28.3", - "chai": "^4.3.7" - } - }, - "node_modules/@vitest/runner": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.28.3.tgz", - "integrity": "sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==", - "dev": true, - "dependencies": { - "@vitest/utils": "0.28.3", - "p-limit": "^4.0.0", - "pathe": "^1.1.0" - } - }, - "node_modules/@vitest/runner/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vitest/spy": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.28.3.tgz", - "integrity": "sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==", - "dev": true, - "dependencies": { - "tinyspy": "^1.0.2" - } - }, - "node_modules/@vitest/utils": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.28.3.tgz", - "integrity": "sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==", - "dev": true, - "dependencies": { - "cli-truncate": "^3.1.0", - "diff": "^5.1.0", - "loupe": "^2.3.6", - "picocolors": "^1.0.0", - "pretty-format": "^27.5.1" - } - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "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==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.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==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "node_modules/are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "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==", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "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==", - "dev": true - }, - "node_modules/boxen": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.1.tgz", - "integrity": "sha512-8k2eH6SRAK00NDl1iX5q17RJ8rfl53TajdYxE3ssMLehbg487dEVgsad4pIsZb/QqBgYWIl6JOauMTLGX2Kpkw==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/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==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/boxen/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==", - "dev": true - }, - "node_modules/boxen/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==", - "dev": true, - "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/boxen/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==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true - }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacache": { - "version": "17.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz", - "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==", - "dev": true, - "dependencies": { - "@npmcli/fs": "^3.1.0", - "fs-minipass": "^3.0.0", - "glob": "^8.0.1", - "lru-cache": "^7.7.1", - "minipass": "^4.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/cacheable-lookup": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", - "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", - "dev": true, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/cacheable-request": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.7.tgz", - "integrity": "sha512-I4SA6mKgDxcxVbSt/UmIkb9Ny8qSkg6ReBHtAAXnZHk7KOSx5g3DTiAOaYzcHCs6oOdHn+bip9T48E6tMvK9hw==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "^4.0.1", - "get-stream": "^6.0.1", - "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.2", - "mimic-response": "^4.0.0", - "normalize-url": "^8.0.0", - "responselike": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/camelcase": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", - "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", - "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-table": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", - "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", - "dev": true, - "dependencies": { - "colors": "1.0.3" - }, - "engines": { - "node": ">= 0.2.0" - } - }, - "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/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==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/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==", - "dev": true - }, - "node_modules/cli-truncate/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==", - "dev": true, - "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/cli-truncate/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==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/config-chain/node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/configstore": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", - "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", - "dev": true, - "dependencies": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/yeoman/configstore?sponsor=1" - } - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", - "dev": true, - "dependencies": { - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/crypto-random-string/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "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==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "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==", - "dev": true - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "dev": true - }, - "node_modules/esbuild": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz", - "integrity": "sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.17.5", - "@esbuild/android-arm64": "0.17.5", - "@esbuild/android-x64": "0.17.5", - "@esbuild/darwin-arm64": "0.17.5", - "@esbuild/darwin-x64": "0.17.5", - "@esbuild/freebsd-arm64": "0.17.5", - "@esbuild/freebsd-x64": "0.17.5", - "@esbuild/linux-arm": "0.17.5", - "@esbuild/linux-arm64": "0.17.5", - "@esbuild/linux-ia32": "0.17.5", - "@esbuild/linux-loong64": "0.17.5", - "@esbuild/linux-mips64el": "0.17.5", - "@esbuild/linux-ppc64": "0.17.5", - "@esbuild/linux-riscv64": "0.17.5", - "@esbuild/linux-s390x": "0.17.5", - "@esbuild/linux-x64": "0.17.5", - "@esbuild/netbsd-x64": "0.17.5", - "@esbuild/openbsd-x64": "0.17.5", - "@esbuild/sunos-x64": "0.17.5", - "@esbuild/win32-arm64": "0.17.5", - "@esbuild/win32-ia32": "0.17.5", - "@esbuild/win32-x64": "0.17.5" - } - }, - "node_modules/esbuild-android-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", - "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", - "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", - "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", - "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", - "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", - "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", - "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", - "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", - "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", - "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", - "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", - "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", - "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", - "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", - "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", - "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", - "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-32": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", - "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", - "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", - "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/escape-goat": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", - "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "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-memoize": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", - "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "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==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/form-data-encoder": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", - "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", - "dev": true, - "engines": { - "node": ">= 14.17" - } - }, - "node_modules/fp-and-or": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", - "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/fs-minipass": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.0.tgz", - "integrity": "sha512-EUojgQaSPy6sxcqcZgQv6TVF6jiKvurji3AxhAivs/Ep4O1UpS8TusaxpybfFHZ2skRhLqzk6WR8nqNYIMMDeA==", - "dev": true, - "dependencies": { - "minipass": "^4.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "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==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "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==", - "dev": true - }, - "node_modules/gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "dev": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "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==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "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": "12.5.3", - "resolved": "https://registry.npmjs.org/got/-/got-12.5.3.tgz", - "integrity": "sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^5.2.0", - "@szmarczak/http-timer": "^5.0.1", - "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.1", - "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.2", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "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==", - "dev": true - }, - "node_modules/happy-dom": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-8.1.5.tgz", - "integrity": "sha512-/UXAJ2fHTs4H3vy7TS7c9PKFvPyaNialk2Er9NdXfpBKNaCITMOH03rkjHXp5jnJnSmRBa+av8E08PUAaIB1jQ==", - "dev": true, - "dependencies": { - "css.escape": "^1.5.1", - "he": "^1.2.0", - "node-fetch": "^2.x.x", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true - }, - "node_modules/has-yarn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", - "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.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==", - "dev": true - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, - "dependencies": { - "ms": "^2.0.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-walk": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz", - "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==", - "dev": true, - "dependencies": { - "minimatch": "^5.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, - "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==", - "dev": true, - "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==", - "dev": true - }, - "node_modules/ini": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "dev": true - }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "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==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "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-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "dev": true - }, - "node_modules/is-npm": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", - "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-yarn-global": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz", - "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==", - "dev": true, - "dependencies": { - "jju": "^1.1.0" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, - "node_modules/jsonlines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", - "integrity": "sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==", - "dev": true - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/latest-version": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", - "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", - "dev": true, - "dependencies": { - "package-json": "^8.1.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/local-pkg": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", - "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "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==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "node_modules/lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "dev": true, - "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dev": true, - "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dev": true, - "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/make-fetch-happen/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/make-fetch-happen/node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "dev": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "dev": true, - "dependencies": { - "unique-slug": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-response": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", - "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", - "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "dev": true, - "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/minipass-fetch/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-flush/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", - "dev": true, - "dependencies": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" - } - }, - "node_modules/minipass-json-stream/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-pipeline/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-sized/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mlly": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.0.tgz", - "integrity": "sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==", - "dev": true, - "dependencies": { - "acorn": "^8.8.1", - "pathe": "^1.0.0", - "pkg-types": "^1.0.1", - "ufo": "^1.0.1" - } - }, - "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==", - "dev": true - }, - "node_modules/nanoid": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz", - "integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.js" - }, - "engines": { - "node": "^14 || ^16 || >=18" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "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==", - "dev": true, - "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-gyp": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", - "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", - "dev": true, - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": "^12.13 || ^14.13 || >=16" - } - }, - "node_modules/node-gyp/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==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/node-gyp/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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/node-gyp/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/node-gyp/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/normalize-package-data": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", - "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", - "dev": true, - "dependencies": { - "hosted-git-info": "^6.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/normalize-package-data/node_modules/hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/normalize-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", - "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", - "dev": true, - "dependencies": { - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-check-updates": { - "version": "16.6.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.3.tgz", - "integrity": "sha512-EKhsCbBcVrPlYKzaYQtRhGv9fxpexwROcvl5HebCUNpiCSlOWrzaJvrMlwi9i9GCyJCnH+YAeBPYdqnArA390A==", - "dev": true, - "dependencies": { - "chalk": "^5.2.0", - "cli-table": "^0.3.11", - "commander": "^9.4.1", - "fast-memoize": "^2.5.2", - "find-up": "5.0.0", - "fp-and-or": "^0.1.3", - "get-stdin": "^8.0.0", - "globby": "^11.0.4", - "hosted-git-info": "^5.1.0", - "ini": "^3.0.1", - "json-parse-helpfulerror": "^1.0.3", - "jsonlines": "^0.1.1", - "lodash": "^4.17.21", - "minimatch": "^5.1.2", - "p-map": "^4.0.0", - "pacote": "15.0.8", - "parse-github-url": "^1.0.2", - "progress": "^2.0.3", - "prompts-ncu": "^2.5.1", - "rc-config-loader": "^4.1.1", - "remote-git-tags": "^3.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.8", - "semver-utils": "^1.1.4", - "source-map-support": "^0.5.21", - "spawn-please": "^2.0.1", - "untildify": "^4.0.0", - "update-notifier": "^6.0.2", - "yaml": "^2.2.0" - }, - "bin": { - "ncu": "build/src/bin/cli.js", - "npm-check-updates": "build/src/bin/cli.js" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/npm-install-checks": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", - "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", - "dev": true, - "dependencies": { - "semver": "^7.1.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-normalize-package-bin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", - "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-package-arg": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", - "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-package-arg/node_modules/hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-packlist": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", - "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", - "dev": true, - "dependencies": { - "ignore-walk": "^6.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-pick-manifest": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", - "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", - "dev": true, - "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^10.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-registry-fetch": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", - "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", - "dev": true, - "dependencies": { - "make-fetch-happen": "^11.0.0", - "minipass": "^4.0.0", - "minipass-fetch": "^3.0.0", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^10.0.0", - "proc-log": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz", - "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==", - "dev": true, - "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^17.0.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^4.0.0", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^3.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^10.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", - "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", - "dev": true, - "dependencies": { - "minipass": "^4.0.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "dev": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "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==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", - "dev": true, - "engines": { - "node": ">=12.20" - } - }, - "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==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-json": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz", - "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==", - "dev": true, - "dependencies": { - "got": "^12.1.0", - "registry-auth-token": "^5.0.1", - "registry-url": "^6.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pacote": { - "version": "15.0.8", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz", - "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==", - "dev": true, - "dependencies": { - "@npmcli/git": "^4.0.0", - "@npmcli/installed-package-contents": "^2.0.1", - "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/run-script": "^6.0.0", - "cacache": "^17.0.0", - "fs-minipass": "^3.0.0", - "minipass": "^4.0.0", - "npm-package-arg": "^10.0.0", - "npm-packlist": "^7.0.0", - "npm-pick-manifest": "^8.0.0", - "npm-registry-fetch": "^14.0.0", - "proc-log": "^3.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^6.0.0", - "read-package-json-fast": "^3.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "lib/bin.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/parse-github-url": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", - "dev": true, - "bin": { - "parse-github-url": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "dev": true, - "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==", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz", - "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==", - "dev": true - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-types": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.1.tgz", - "integrity": "sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.0.0", - "pathe": "^1.0.0" - } - }, - "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==", - "dev": true, - "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/node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/proc-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", - "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dev": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prompts-ncu": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prompts-ncu/-/prompts-ncu-2.5.1.tgz", - "integrity": "sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA==", - "dev": true, - "dependencies": { - "kleur": "^4.0.1", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, - "node_modules/pupa": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", - "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", - "dev": true, - "dependencies": { - "escape-goat": "^4.0.0" - }, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "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/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "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-config-loader": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz", - "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==", - "dev": true, - "dependencies": { - "debug": "^4.3.4", - "js-yaml": "^4.1.0", - "json5": "^2.2.2", - "require-from-string": "^2.0.2" - } - }, - "node_modules/rc/node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "node_modules/read-package-json": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", - "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", - "dev": true, - "dependencies": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^5.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/read-package-json-fast": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", - "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", - "dev": true, - "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/registry-auth-token": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz", - "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==", - "dev": true, - "dependencies": { - "@pnpm/npm-conf": "^1.0.4" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/registry-url": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", - "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", - "dev": true, - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/remote-git-tags": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", - "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "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-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "node_modules/responselike": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", - "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", - "dev": true, - "dependencies": { - "lowercase-keys": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/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==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "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==", - "dev": true, - "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/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==", - "dev": true, - "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==", - "dev": true - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz", - "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==", - "dev": true, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/semver-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", - "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "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==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "dev": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dev": true, - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "dev": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spawn-please": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz", - "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, - "node_modules/ssri": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", - "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", - "dev": true, - "dependencies": { - "minipass": "^4.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "node_modules/std-env": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.1.tgz", - "integrity": "sha512-3H20QlwQsSm2OvAxWIYhs+j01MzzqwMwGiiO1NQaJYZgJZFPuAbf95/DiKRBSTYIJ2FeGUc+B/6mPGcWP9dO3Q==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "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==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-literal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.0.tgz", - "integrity": "sha512-5o4LsH1lzBzO9UFH63AJ2ad2/S2AVx6NtjOcaz+VTT2h1RiRvbipW72z8M/lxEhcPHDBQwpDrnTF7sXy/7OwCQ==", - "dev": true, - "dependencies": { - "acorn": "^8.8.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svelte": { - "version": "3.55.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz", - "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tinybench": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz", - "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==", - "dev": true - }, - "node_modules/tinypool": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz", - "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", - "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "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==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/ufo": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz", - "integrity": "sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==", - "dev": true - }, - "node_modules/unique-filename": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", - "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", - "dev": true, - "dependencies": { - "unique-slug": "^4.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/unique-slug": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", - "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", - "dev": true, - "dependencies": { - "crypto-random-string": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/update-notifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", - "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", - "dev": true, - "dependencies": { - "boxen": "^7.0.0", - "chalk": "^5.0.1", - "configstore": "^6.0.0", - "has-yarn": "^3.0.0", - "import-lazy": "^4.0.0", - "is-ci": "^3.0.1", - "is-installed-globally": "^0.4.0", - "is-npm": "^6.0.0", - "is-yarn-global": "^0.4.0", - "latest-version": "^7.0.0", - "pupa": "^3.1.0", - "semver": "^7.3.7", - "semver-diff": "^4.0.0", - "xdg-basedir": "^5.1.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "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==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/vite": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.5.tgz", - "integrity": "sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==", - "dev": true, - "dependencies": { - "esbuild": "^0.15.9", - "postcss": "^8.4.18", - "resolve": "^1.22.1", - "rollup": "^2.79.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.28.3.tgz", - "integrity": "sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==", - "dev": true, - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.4", - "mlly": "^1.1.0", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "source-map": "^0.6.1", - "source-map-support": "^0.5.21", - "vite": "^3.0.0 || ^4.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": ">=v14.16.0" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", - "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", - "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/esbuild": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz", - "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.15.18", - "@esbuild/linux-loong64": "0.15.18", - "esbuild-android-64": "0.15.18", - "esbuild-android-arm64": "0.15.18", - "esbuild-darwin-64": "0.15.18", - "esbuild-darwin-arm64": "0.15.18", - "esbuild-freebsd-64": "0.15.18", - "esbuild-freebsd-arm64": "0.15.18", - "esbuild-linux-32": "0.15.18", - "esbuild-linux-64": "0.15.18", - "esbuild-linux-arm": "0.15.18", - "esbuild-linux-arm64": "0.15.18", - "esbuild-linux-mips64le": "0.15.18", - "esbuild-linux-ppc64le": "0.15.18", - "esbuild-linux-riscv64": "0.15.18", - "esbuild-linux-s390x": "0.15.18", - "esbuild-netbsd-64": "0.15.18", - "esbuild-openbsd-64": "0.15.18", - "esbuild-sunos-64": "0.15.18", - "esbuild-windows-32": "0.15.18", - "esbuild-windows-64": "0.15.18", - "esbuild-windows-arm64": "0.15.18" - } - }, - "node_modules/vitest": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.28.3.tgz", - "integrity": "sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==", - "dev": true, - "dependencies": { - "@types/chai": "^4.3.4", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.28.3", - "@vitest/runner": "0.28.3", - "@vitest/spy": "0.28.3", - "@vitest/utils": "0.28.3", - "acorn": "^8.8.1", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", - "chai": "^4.3.7", - "debug": "^4.3.4", - "local-pkg": "^0.4.2", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "source-map": "^0.6.1", - "std-env": "^3.3.1", - "strip-literal": "^1.0.0", - "tinybench": "^2.3.1", - "tinypool": "^0.3.1", - "tinyspy": "^1.0.2", - "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.28.3", - "why-is-node-running": "^2.2.2" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": ">=v14.16.0" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@vitest/browser": "*", - "@vitest/ui": "*", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "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==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/whatwg-url/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==", - "dev": true - }, - "node_modules/which": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", - "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", - "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "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==", - "dev": true, - "dependencies": { - "string-width": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/widest-line/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==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/widest-line/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==", - "dev": true - }, - "node_modules/widest-line/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==", - "dev": true, - "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/widest-line/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==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "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==", - "dev": true, - "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==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/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==", - "dev": true - }, - "node_modules/wrap-ansi/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==", - "dev": true, - "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/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==", - "dev": true, - "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==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/xdg-basedir": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", - "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@esbuild/android-arm": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.5.tgz", - "integrity": "sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.5.tgz", - "integrity": "sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.5.tgz", - "integrity": "sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.5.tgz", - "integrity": "sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.5.tgz", - "integrity": "sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.5.tgz", - "integrity": "sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.5.tgz", - "integrity": "sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.5.tgz", - "integrity": "sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.5.tgz", - "integrity": "sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.5.tgz", - "integrity": "sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.5.tgz", - "integrity": "sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.5.tgz", - "integrity": "sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.5.tgz", - "integrity": "sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.5.tgz", - "integrity": "sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.5.tgz", - "integrity": "sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.5.tgz", - "integrity": "sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.5.tgz", - "integrity": "sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.5.tgz", - "integrity": "sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.5.tgz", - "integrity": "sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.5.tgz", - "integrity": "sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.5.tgz", - "integrity": "sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.5.tgz", - "integrity": "sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==", - "dev": true, - "optional": true - }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true - }, - "@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==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@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==", - "dev": true - }, - "@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==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@npmcli/fs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", - "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", - "dev": true, - "requires": { - "semver": "^7.3.5" - } - }, - "@npmcli/git": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", - "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", - "dev": true, - "requires": { - "@npmcli/promise-spawn": "^6.0.0", - "lru-cache": "^7.4.4", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^8.0.0", - "proc-log": "^3.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^3.0.0" - } - }, - "@npmcli/installed-package-contents": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", - "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", - "dev": true, - "requires": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - } - }, - "@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "dev": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@npmcli/node-gyp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", - "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", - "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", - "dev": true, - "requires": { - "which": "^3.0.0" - } - }, - "@npmcli/run-script": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", - "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", - "dev": true, - "requires": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^6.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^3.0.0" - } - }, - "@pnpm/network.ca-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", - "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", - "dev": true, - "requires": { - "graceful-fs": "4.2.10" - } - }, - "@pnpm/npm-conf": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz", - "integrity": "sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A==", - "dev": true, - "requires": { - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" - } - }, - "@sindresorhus/is": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz", - "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.1" - } - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "@types/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", - "dev": true - }, - "@types/chai-subset": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", - "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", - "dev": true - }, - "@vitest/expect": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.28.3.tgz", - "integrity": "sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==", - "dev": true, - "requires": { - "@vitest/spy": "0.28.3", - "@vitest/utils": "0.28.3", - "chai": "^4.3.7" - } - }, - "@vitest/runner": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.28.3.tgz", - "integrity": "sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==", - "dev": true, - "requires": { - "@vitest/utils": "0.28.3", - "p-limit": "^4.0.0", - "pathe": "^1.1.0" - }, - "dependencies": { - "p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "requires": { - "yocto-queue": "^1.0.0" - } - }, - "yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true - } - } - }, - "@vitest/spy": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.28.3.tgz", - "integrity": "sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==", - "dev": true, - "requires": { - "tinyspy": "^1.0.2" - } - }, - "@vitest/utils": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.28.3.tgz", - "integrity": "sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==", - "dev": true, - "requires": { - "cli-truncate": "^3.1.0", - "diff": "^5.1.0", - "loupe": "^2.3.6", - "picocolors": "^1.0.0", - "pretty-format": "^27.5.1" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "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==", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - } - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "string-width": "^4.1.0" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "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==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "boxen": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.1.tgz", - "integrity": "sha512-8k2eH6SRAK00NDl1iX5q17RJ8rfl53TajdYxE3ssMLehbg487dEVgsad4pIsZb/QqBgYWIl6JOauMTLGX2Kpkw==", - "dev": true, - "requires": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "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==", - "dev": true - }, - "builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "requires": { - "semver": "^7.0.0" - } - }, - "cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true - }, - "cacache": { - "version": "17.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz", - "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==", - "dev": true, - "requires": { - "@npmcli/fs": "^3.1.0", - "fs-minipass": "^3.0.0", - "glob": "^8.0.1", - "lru-cache": "^7.7.1", - "minipass": "^4.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" - } - }, - "cacheable-lookup": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", - "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", - "dev": true - }, - "cacheable-request": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.7.tgz", - "integrity": "sha512-I4SA6mKgDxcxVbSt/UmIkb9Ny8qSkg6ReBHtAAXnZHk7KOSx5g3DTiAOaYzcHCs6oOdHn+bip9T48E6tMvK9hw==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "^4.0.1", - "get-stream": "^6.0.1", - "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.2", - "mimic-response": "^4.0.0", - "normalize-url": "^8.0.0", - "responselike": "^3.0.0" - } - }, - "camelcase": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", - "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", - "dev": true - }, - "chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", - "dev": true - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true - }, - "ci-info": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", - "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "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==", - "dev": true - }, - "cli-table": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", - "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", - "dev": true, - "requires": { - "colors": "1.0.3" - } - }, - "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "requires": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", - "dev": true - }, - "commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - } - } - }, - "configstore": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", - "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", - "dev": true, - "requires": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", - "dev": true, - "requires": { - "type-fest": "^1.0.1" - }, - "dependencies": { - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true - } - } - }, - "css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - }, - "dependencies": { - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - } - } - }, - "deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "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==", - "dev": true - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true - }, - "diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "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==", - "dev": true - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "optional": true, - "requires": { - "iconv-lite": "^0.6.2" - } - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true - }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "dev": true - }, - "esbuild": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz", - "integrity": "sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.17.5", - "@esbuild/android-arm64": "0.17.5", - "@esbuild/android-x64": "0.17.5", - "@esbuild/darwin-arm64": "0.17.5", - "@esbuild/darwin-x64": "0.17.5", - "@esbuild/freebsd-arm64": "0.17.5", - "@esbuild/freebsd-x64": "0.17.5", - "@esbuild/linux-arm": "0.17.5", - "@esbuild/linux-arm64": "0.17.5", - "@esbuild/linux-ia32": "0.17.5", - "@esbuild/linux-loong64": "0.17.5", - "@esbuild/linux-mips64el": "0.17.5", - "@esbuild/linux-ppc64": "0.17.5", - "@esbuild/linux-riscv64": "0.17.5", - "@esbuild/linux-s390x": "0.17.5", - "@esbuild/linux-x64": "0.17.5", - "@esbuild/netbsd-x64": "0.17.5", - "@esbuild/openbsd-x64": "0.17.5", - "@esbuild/sunos-x64": "0.17.5", - "@esbuild/win32-arm64": "0.17.5", - "@esbuild/win32-ia32": "0.17.5", - "@esbuild/win32-x64": "0.17.5" - } - }, - "esbuild-android-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", - "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", - "dev": true, - "optional": true - }, - "esbuild-android-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", - "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", - "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", - "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", - "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", - "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", - "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", - "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", - "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", - "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", - "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", - "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", - "dev": true, - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", - "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", - "dev": true, - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", - "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", - "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", - "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", - "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", - "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", - "dev": true, - "optional": true - }, - "esbuild-windows-64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", - "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", - "dev": true, - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", - "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", - "dev": true, - "optional": true - }, - "escape-goat": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", - "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "@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" - } - }, - "fast-memoize": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", - "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", - "dev": true - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "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==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "form-data-encoder": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", - "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", - "dev": true - }, - "fp-and-or": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", - "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", - "dev": true - }, - "fs-minipass": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.0.tgz", - "integrity": "sha512-EUojgQaSPy6sxcqcZgQv6TVF6jiKvurji3AxhAivs/Ep4O1UpS8TusaxpybfFHZ2skRhLqzk6WR8nqNYIMMDeA==", - "dev": true, - "requires": { - "minipass": "^4.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "dev": true, - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - } - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, - "get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", - "dev": true - }, - "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==", - "dev": true - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dev": true, - "requires": { - "ini": "2.0.0" - }, - "dependencies": { - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - } - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "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" - } - }, - "got": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/got/-/got-12.5.3.tgz", - "integrity": "sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==", - "dev": true, - "requires": { - "@sindresorhus/is": "^5.2.0", - "@szmarczak/http-timer": "^5.0.1", - "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.1", - "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.2", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "happy-dom": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-8.1.5.tgz", - "integrity": "sha512-/UXAJ2fHTs4H3vy7TS7c9PKFvPyaNialk2Er9NdXfpBKNaCITMOH03rkjHXp5jnJnSmRBa+av8E08PUAaIB1jQ==", - "dev": true, - "requires": { - "css.escape": "^1.5.1", - "he": "^1.2.0", - "node-fetch": "^2.x.x", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true - }, - "has-yarn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", - "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", - "dev": true, - "requires": { - "lru-cache": "^7.5.1" - } - }, - "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==", - "dev": true - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", - "dev": true, - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - } - }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, - "requires": { - "ms": "^2.0.0" - } - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "ignore-walk": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz", - "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==", - "dev": true, - "requires": { - "minimatch": "^5.0.1" - } - }, - "import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "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==", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", - "dev": true - }, - "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "dev": true - }, - "is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "requires": { - "ci-info": "^3.2.0" - } - }, - "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==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "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==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "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==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "dev": true - }, - "is-npm": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", - "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "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==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-yarn-global": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz", - "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", - "dev": true - }, - "json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==", - "dev": true, - "requires": { - "jju": "^1.1.0" - } - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, - "jsonlines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", - "integrity": "sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true - }, - "keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true - }, - "latest-version": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", - "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", - "dev": true, - "requires": { - "package-json": "^8.1.0" - } - }, - "local-pkg": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", - "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "dev": true - }, - "lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "dev": true - }, - "make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "dev": true, - "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "dependencies": { - "@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dev": true, - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - } - }, - "cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dev": true, - "requires": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "dev": true, - "requires": { - "minipass": "^3.1.1" - } - }, - "unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "dev": true, - "requires": { - "unique-slug": "^3.0.0" - } - }, - "unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - } - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mimic-response": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", - "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", - "dev": true - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "minipass": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", - "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "dev": true, - "requires": { - "encoding": "^0.1.13", - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", - "dev": true, - "requires": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mlly": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.0.tgz", - "integrity": "sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==", - "dev": true, - "requires": { - "acorn": "^8.8.1", - "pathe": "^1.0.0", - "pkg-types": "^1.0.1", - "ufo": "^1.0.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "nanoid": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz", - "integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-gyp": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", - "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", - "dev": true, - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "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" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "requires": { - "abbrev": "^1.0.0" - } - }, - "normalize-package-data": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", - "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", - "dev": true, - "requires": { - "hosted-git-info": "^6.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "dependencies": { - "hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", - "dev": true, - "requires": { - "lru-cache": "^7.5.1" - } - } - } - }, - "normalize-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", - "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", - "dev": true - }, - "npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", - "dev": true, - "requires": { - "npm-normalize-package-bin": "^3.0.0" - } - }, - "npm-check-updates": { - "version": "16.6.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.3.tgz", - "integrity": "sha512-EKhsCbBcVrPlYKzaYQtRhGv9fxpexwROcvl5HebCUNpiCSlOWrzaJvrMlwi9i9GCyJCnH+YAeBPYdqnArA390A==", - "dev": true, - "requires": { - "chalk": "^5.2.0", - "cli-table": "^0.3.11", - "commander": "^9.4.1", - "fast-memoize": "^2.5.2", - "find-up": "5.0.0", - "fp-and-or": "^0.1.3", - "get-stdin": "^8.0.0", - "globby": "^11.0.4", - "hosted-git-info": "^5.1.0", - "ini": "^3.0.1", - "json-parse-helpfulerror": "^1.0.3", - "jsonlines": "^0.1.1", - "lodash": "^4.17.21", - "minimatch": "^5.1.2", - "p-map": "^4.0.0", - "pacote": "15.0.8", - "parse-github-url": "^1.0.2", - "progress": "^2.0.3", - "prompts-ncu": "^2.5.1", - "rc-config-loader": "^4.1.1", - "remote-git-tags": "^3.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.8", - "semver-utils": "^1.1.4", - "source-map-support": "^0.5.21", - "spawn-please": "^2.0.1", - "untildify": "^4.0.0", - "update-notifier": "^6.0.2", - "yaml": "^2.2.0" - } - }, - "npm-install-checks": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", - "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", - "dev": true, - "requires": { - "semver": "^7.1.1" - } - }, - "npm-normalize-package-bin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", - "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", - "dev": true - }, - "npm-package-arg": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", - "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", - "dev": true, - "requires": { - "hosted-git-info": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", - "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", - "dev": true, - "requires": { - "lru-cache": "^7.5.1" - } - } - } - }, - "npm-packlist": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", - "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", - "dev": true, - "requires": { - "ignore-walk": "^6.0.0" - } - }, - "npm-pick-manifest": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", - "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", - "dev": true, - "requires": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^10.0.0", - "semver": "^7.3.5" - } - }, - "npm-registry-fetch": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", - "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", - "dev": true, - "requires": { - "make-fetch-happen": "^11.0.0", - "minipass": "^4.0.0", - "minipass-fetch": "^3.0.0", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^10.0.0", - "proc-log": "^3.0.0" - }, - "dependencies": { - "make-fetch-happen": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz", - "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==", - "dev": true, - "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^17.0.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^4.0.0", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^3.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^10.0.0" - } - }, - "minipass-fetch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", - "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", - "dev": true, - "requires": { - "encoding": "^0.1.13", - "minipass": "^4.0.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - } - } - } - }, - "npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "dev": true, - "requires": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "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==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "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==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "package-json": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz", - "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==", - "dev": true, - "requires": { - "got": "^12.1.0", - "registry-auth-token": "^5.0.1", - "registry-url": "^6.0.0", - "semver": "^7.3.7" - } - }, - "pacote": { - "version": "15.0.8", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz", - "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==", - "dev": true, - "requires": { - "@npmcli/git": "^4.0.0", - "@npmcli/installed-package-contents": "^2.0.1", - "@npmcli/promise-spawn": "^6.0.1", - "@npmcli/run-script": "^6.0.0", - "cacache": "^17.0.0", - "fs-minipass": "^3.0.0", - "minipass": "^4.0.0", - "npm-package-arg": "^10.0.0", - "npm-packlist": "^7.0.0", - "npm-pick-manifest": "^8.0.0", - "npm-registry-fetch": "^14.0.0", - "proc-log": "^3.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^6.0.0", - "read-package-json-fast": "^3.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11" - } - }, - "parse-github-url": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", - "dev": true - }, - "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==", - "dev": true - }, - "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==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "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==", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pathe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz", - "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pkg-types": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.1.tgz", - "integrity": "sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==", - "dev": true, - "requires": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.0.0", - "pathe": "^1.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "dependencies": { - "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", - "dev": true - } - } - }, - "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "proc-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", - "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true - }, - "promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dev": true, - "requires": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - } - }, - "prompts-ncu": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prompts-ncu/-/prompts-ncu-2.5.1.tgz", - "integrity": "sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA==", - "dev": true, - "requires": { - "kleur": "^4.0.1", - "sisteransi": "^1.0.5" - } - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, - "pupa": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", - "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", - "dev": true, - "requires": { - "escape-goat": "^4.0.0" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - } - } - }, - "rc-config-loader": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz", - "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==", - "dev": true, - "requires": { - "debug": "^4.3.4", - "js-yaml": "^4.1.0", - "json5": "^2.2.2", - "require-from-string": "^2.0.2" - } - }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "read-package-json": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", - "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", - "dev": true, - "requires": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^5.0.0", - "npm-normalize-package-bin": "^3.0.0" - } - }, - "read-package-json-fast": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", - "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", - "dev": true, - "requires": { - "json-parse-even-better-errors": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "registry-auth-token": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz", - "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==", - "dev": true, - "requires": { - "@pnpm/npm-conf": "^1.0.4" - } - }, - "registry-url": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", - "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", - "dev": true, - "requires": { - "rc": "1.2.8" - } - }, - "remote-git-tags": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", - "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", - "dev": true - }, - "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==", - "dev": true - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "responselike": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", - "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", - "dev": true, - "requires": { - "lowercase-keys": "^3.0.0" - } - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "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" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "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==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "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==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - }, - "dependencies": { - "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==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "semver-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz", - "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==", - "dev": true, - "requires": { - "semver": "^7.3.5" - } - }, - "semver-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", - "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "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==", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - } - } - }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "dev": true - }, - "socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dev": true, - "requires": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - } - }, - "socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "dev": true, - "requires": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "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==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spawn-please": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz", - "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, - "ssri": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", - "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", - "dev": true, - "requires": { - "minipass": "^4.0.0" - } - }, - "stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "std-env": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.1.tgz", - "integrity": "sha512-3H20QlwQsSm2OvAxWIYhs+j01MzzqwMwGiiO1NQaJYZgJZFPuAbf95/DiKRBSTYIJ2FeGUc+B/6mPGcWP9dO3Q==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "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==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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==", - "dev": true - }, - "strip-literal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.0.tgz", - "integrity": "sha512-5o4LsH1lzBzO9UFH63AJ2ad2/S2AVx6NtjOcaz+VTT2h1RiRvbipW72z8M/lxEhcPHDBQwpDrnTF7sXy/7OwCQ==", - "dev": true, - "requires": { - "acorn": "^8.8.1" - } - }, - "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==", - "dev": true - }, - "svelte": { - "version": "3.55.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz", - "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==", - "dev": true - }, - "tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", - "dev": true, - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - } - } - }, - "tinybench": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz", - "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==", - "dev": true - }, - "tinypool": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz", - "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==", - "dev": true - }, - "tinyspy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", - "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "ufo": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz", - "integrity": "sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==", - "dev": true - }, - "unique-filename": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", - "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", - "dev": true, - "requires": { - "unique-slug": "^4.0.0" - } - }, - "unique-slug": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", - "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", - "dev": true, - "requires": { - "crypto-random-string": "^4.0.0" - } - }, - "untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true - }, - "update-notifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", - "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", - "dev": true, - "requires": { - "boxen": "^7.0.0", - "chalk": "^5.0.1", - "configstore": "^6.0.0", - "has-yarn": "^3.0.0", - "import-lazy": "^4.0.0", - "is-ci": "^3.0.1", - "is-installed-globally": "^0.4.0", - "is-npm": "^6.0.0", - "is-yarn-global": "^0.4.0", - "latest-version": "^7.0.0", - "pupa": "^3.1.0", - "semver": "^7.3.7", - "semver-diff": "^4.0.0", - "xdg-basedir": "^5.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dev": true, - "requires": { - "builtins": "^5.0.0" - } - }, - "vite": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.5.tgz", - "integrity": "sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==", - "dev": true, - "requires": { - "esbuild": "^0.15.9", - "fsevents": "~2.3.2", - "postcss": "^8.4.18", - "resolve": "^1.22.1", - "rollup": "^2.79.1" - }, - "dependencies": { - "@esbuild/android-arm": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", - "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", - "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", - "dev": true, - "optional": true - }, - "esbuild": { - "version": "0.15.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz", - "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.15.18", - "@esbuild/linux-loong64": "0.15.18", - "esbuild-android-64": "0.15.18", - "esbuild-android-arm64": "0.15.18", - "esbuild-darwin-64": "0.15.18", - "esbuild-darwin-arm64": "0.15.18", - "esbuild-freebsd-64": "0.15.18", - "esbuild-freebsd-arm64": "0.15.18", - "esbuild-linux-32": "0.15.18", - "esbuild-linux-64": "0.15.18", - "esbuild-linux-arm": "0.15.18", - "esbuild-linux-arm64": "0.15.18", - "esbuild-linux-mips64le": "0.15.18", - "esbuild-linux-ppc64le": "0.15.18", - "esbuild-linux-riscv64": "0.15.18", - "esbuild-linux-s390x": "0.15.18", - "esbuild-netbsd-64": "0.15.18", - "esbuild-openbsd-64": "0.15.18", - "esbuild-sunos-64": "0.15.18", - "esbuild-windows-32": "0.15.18", - "esbuild-windows-64": "0.15.18", - "esbuild-windows-arm64": "0.15.18" - } - } - } - }, - "vite-node": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.28.3.tgz", - "integrity": "sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==", - "dev": true, - "requires": { - "cac": "^6.7.14", - "debug": "^4.3.4", - "mlly": "^1.1.0", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "source-map": "^0.6.1", - "source-map-support": "^0.5.21", - "vite": "^3.0.0 || ^4.0.0" - } - }, - "vitest": { - "version": "0.28.3", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.28.3.tgz", - "integrity": "sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==", - "dev": true, - "requires": { - "@types/chai": "^4.3.4", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.28.3", - "@vitest/runner": "0.28.3", - "@vitest/spy": "0.28.3", - "@vitest/utils": "0.28.3", - "acorn": "^8.8.1", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", - "chai": "^4.3.7", - "debug": "^4.3.4", - "local-pkg": "^0.4.2", - "pathe": "^1.1.0", - "picocolors": "^1.0.0", - "source-map": "^0.6.1", - "std-env": "^3.3.1", - "strip-literal": "^1.0.0", - "tinybench": "^2.3.1", - "tinypool": "^0.3.1", - "tinyspy": "^1.0.2", - "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.28.3", - "why-is-node-running": "^2.2.2" - } - }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - }, - "whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", - "dev": true, - "requires": { - "iconv-lite": "0.6.3" - } - }, - "whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - }, - "dependencies": { - "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==", - "dev": true - } - } - }, - "which": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", - "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", - "dev": true, - "requires": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - } - }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "widest-line": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", - "dev": true, - "requires": { - "string-width": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "xdg-basedir": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", - "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", - "dev": true - }, - "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==", - "dev": true - } - } -} diff --git a/v3/internal/runtime/package.json b/v3/internal/runtime/package.json deleted file mode 100644 index e923ea45a..000000000 --- a/v3/internal/runtime/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "runtime", - "version": "3.0.0", - "description": "Wails JS Runtime", - "main": "index.js", - "scripts": {}, - "author": "Lea Anthony ", - "license": "ISC", - "devDependencies": { - "esbuild": "^0.17.5", - "happy-dom": "^8.1.5", - "nanoid": "^4.0.0", - "npm-check-updates": "^16.6.3", - "svelte": "^3.55.1", - "vitest": "^0.28.3" - } -} diff --git a/v3/internal/runtime/runtime_debug_darwin.go b/v3/internal/runtime/runtime_debug_darwin.go deleted file mode 100644 index 14656126f..000000000 --- a/v3/internal/runtime/runtime_debug_darwin.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build darwin && !production - -package runtime - -import _ "embed" - -//go:embed runtime_debug_desktop_darwin.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/runtime_debug_desktop_darwin.js b/v3/internal/runtime/runtime_debug_desktop_darwin.js deleted file mode 100644 index 0ca537592..000000000 --- a/v3/internal/runtime/runtime_debug_desktop_darwin.js +++ /dev/null @@ -1,582 +0,0 @@ -(() => { - var __defProp = Object.defineProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - - // desktop/clipboard.js - var clipboard_exports = {}; - __export(clipboard_exports, { - SetText: () => SetText, - Text: () => Text - }); - - // desktop/runtime.js - var runtimeURL = window.location.origin + "/wails/runtime"; - function runtimeCall(method, windowName, args) { - let url = new URL(runtimeURL); - url.searchParams.append("method", method); - if (args) { - url.searchParams.append("args", JSON.stringify(args)); - } - let fetchOptions = { - headers: {} - }; - if (windowName) { - fetchOptions.headers["x-wails-window-name"] = windowName; - } - return new Promise((resolve, reject) => { - fetch(url, fetchOptions).then((response) => { - if (response.ok) { - if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) { - return response.json(); - } else { - return response.text(); - } - } - reject(Error(response.statusText)); - }).then((data) => resolve(data)).catch((error) => reject(error)); - }); - } - function newRuntimeCaller(object, windowName) { - return function(method, args = null) { - return runtimeCall(object + "." + method, windowName, args); - }; - } - - // desktop/clipboard.js - var call = newRuntimeCaller("clipboard"); - function SetText(text) { - void call("SetText", { text }); - } - function Text() { - return call("Text"); - } - - // desktop/application.js - var application_exports = {}; - __export(application_exports, { - Hide: () => Hide, - Quit: () => Quit, - Show: () => Show - }); - var call2 = newRuntimeCaller("application"); - function Hide() { - void call2("Hide"); - } - function Show() { - void call2("Show"); - } - function Quit() { - void call2("Quit"); - } - - // desktop/log.js - var log_exports = {}; - __export(log_exports, { - Log: () => Log - }); - var call3 = newRuntimeCaller("log"); - function Log(message) { - return call3("Log", message); - } - - // desktop/screens.js - var screens_exports = {}; - __export(screens_exports, { - GetAll: () => GetAll, - GetCurrent: () => GetCurrent, - GetPrimary: () => GetPrimary - }); - var call4 = newRuntimeCaller("screens"); - function GetAll() { - return call4("GetAll"); - } - function GetPrimary() { - return call4("GetPrimary"); - } - function GetCurrent() { - return call4("GetCurrent"); - } - - // node_modules/nanoid/non-secure/index.js - var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; - var nanoid = (size = 21) => { - let id = ""; - let i = size; - while (i--) { - id += urlAlphabet[Math.random() * 64 | 0]; - } - return id; - }; - - // desktop/calls.js - var call5 = newRuntimeCaller("call"); - var callResponses = /* @__PURE__ */ new Map(); - function generateID() { - let result; - do { - result = nanoid(); - } while (callResponses.has(result)); - return result; - } - function callCallback(id, data, isJSON) { - let p = callResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - callResponses.delete(id); - } - } - function callErrorCallback(id, message) { - let p = callResponses.get(id); - if (p) { - p.reject(message); - callResponses.delete(id); - } - } - function callBinding(type, options) { - return new Promise((resolve, reject) => { - let id = generateID(); - options = options || {}; - options["call-id"] = id; - callResponses.set(id, { resolve, reject }); - call5(type, options).catch((error) => { - reject(error); - callResponses.delete(id); - }); - }); - } - function Call(options) { - return callBinding("Call", options); - } - function Plugin(pluginName, methodName, ...args) { - return callBinding("Call", { - packageName: "wails-plugins", - structName: pluginName, - methodName, - args - }); - } - - // desktop/window.js - function newWindow(windowName) { - let call9 = newRuntimeCaller("window", windowName); - return { - // Reload: () => call('WR'), - // ReloadApp: () => call('WR'), - // SetSystemDefaultTheme: () => call('WASDT'), - // SetLightTheme: () => call('WALT'), - // SetDarkTheme: () => call('WADT'), - // IsFullscreen: () => call('WIF'), - // IsMaximized: () => call('WIM'), - // IsMinimized: () => call('WIMN'), - // IsWindowed: () => call('WIF'), - /** - * Centers the window. - */ - Center: () => void call9("Center"), - /** - * Set the window title. - * @param title - */ - SetTitle: (title) => void call9("SetTitle", { title }), - /** - * Makes the window fullscreen. - */ - Fullscreen: () => void call9("Fullscreen"), - /** - * Unfullscreen the window. - */ - UnFullscreen: () => void call9("UnFullscreen"), - /** - * Set the window size. - * @param {number} width The window width - * @param {number} height The window height - */ - SetSize: (width, height) => call9("SetSize", { width, height }), - /** - * Get the window size. - * @returns {Promise} The window size - */ - Size: () => { - return call9("Size"); - }, - /** - * Set the window maximum size. - * @param {number} width - * @param {number} height - */ - SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }), - /** - * Set the window minimum size. - * @param {number} width - * @param {number} height - */ - SetMinSize: (width, height) => void call9("SetMinSize", { width, height }), - /** - * Set window to be always on top. - * @param {boolean} onTop Whether the window should be always on top - */ - SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }), - /** - * Set the window position. - * @param {number} x - * @param {number} y - */ - SetPosition: (x, y) => call9("SetPosition", { x, y }), - /** - * Get the window position. - * @returns {Promise} The window position - */ - Position: () => { - return call9("Position"); - }, - /** - * Get the screen the window is on. - * @returns {Promise} - */ - Screen: () => { - return call9("Screen"); - }, - /** - * Hide the window - */ - Hide: () => void call9("Hide"), - /** - * Maximise the window - */ - Maximise: () => void call9("Maximise"), - /** - * Show the window - */ - Show: () => void call9("Show"), - /** - * Close the window - */ - Close: () => void call9("Close"), - /** - * Toggle the window maximise state - */ - ToggleMaximise: () => void call9("ToggleMaximise"), - /** - * Unmaximise the window - */ - UnMaximise: () => void call9("UnMaximise"), - /** - * Minimise the window - */ - Minimise: () => void call9("Minimise"), - /** - * Unminimise the window - */ - UnMinimise: () => void call9("UnMinimise"), - /** - * Set the background colour of the window. - * @param {number} r - A value between 0 and 255 - * @param {number} g - A value between 0 and 255 - * @param {number} b - A value between 0 and 255 - * @param {number} a - A value between 0 and 255 - */ - SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a }) - }; - } - - // desktop/events.js - var call6 = newRuntimeCaller("events"); - var Listener = class { - /** - * Creates an instance of Listener. - * @param {string} eventName - * @param {function} callback - * @param {number} maxCallbacks - * @memberof Listener - */ - constructor(eventName, callback, maxCallbacks) { - this.eventName = eventName; - this.maxCallbacks = maxCallbacks || -1; - this.Callback = (data) => { - callback(data); - if (this.maxCallbacks === -1) { - return false; - } - this.maxCallbacks -= 1; - return this.maxCallbacks === 0; - }; - } - }; - var WailsEvent = class { - /** - * Creates an instance of WailsEvent. - * @param {string} name - Name of the event - * @param {any=null} data - Data associated with the event - * @memberof WailsEvent - */ - constructor(name, data = null) { - this.name = name; - this.data = data; - } - }; - var eventListeners = /* @__PURE__ */ new Map(); - function OnMultiple(eventName, callback, maxCallbacks) { - let listeners = eventListeners.get(eventName) || []; - const thisListener = new Listener(eventName, callback, maxCallbacks); - listeners.push(thisListener); - eventListeners.set(eventName, listeners); - return () => listenerOff(thisListener); - } - function On(eventName, callback) { - return OnMultiple(eventName, callback, -1); - } - function Once(eventName, callback) { - return OnMultiple(eventName, callback, 1); - } - function listenerOff(listener) { - const eventName = listener.eventName; - let listeners = eventListeners.get(eventName).filter((l) => l !== listener); - if (listeners.length === 0) { - eventListeners.delete(eventName); - } else { - eventListeners.set(eventName, listeners); - } - } - function dispatchWailsEvent(event) { - console.log("dispatching event: ", { event }); - let listeners = eventListeners.get(event.name); - if (listeners) { - let toRemove = []; - listeners.forEach((listener) => { - let remove = listener.Callback(event); - if (remove) { - toRemove.push(listener); - } - }); - if (toRemove.length > 0) { - listeners = listeners.filter((l) => !toRemove.includes(l)); - if (listeners.length === 0) { - eventListeners.delete(event.name); - } else { - eventListeners.set(event.name, listeners); - } - } - } - } - function Off(eventName, ...additionalEventNames) { - let eventsToRemove = [eventName, ...additionalEventNames]; - eventsToRemove.forEach((eventName2) => { - eventListeners.delete(eventName2); - }); - } - function OffAll() { - eventListeners.clear(); - } - function Emit(event) { - void call6("Emit", event); - } - - // desktop/dialogs.js - var call7 = newRuntimeCaller("dialog"); - var dialogResponses = /* @__PURE__ */ new Map(); - function generateID2() { - let result; - do { - result = nanoid(); - } while (dialogResponses.has(result)); - return result; - } - function dialogCallback(id, data, isJSON) { - let p = dialogResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - dialogResponses.delete(id); - } - } - function dialogErrorCallback(id, message) { - let p = dialogResponses.get(id); - if (p) { - p.reject(message); - dialogResponses.delete(id); - } - } - function dialog(type, options) { - return new Promise((resolve, reject) => { - let id = generateID2(); - options = options || {}; - options["dialog-id"] = id; - dialogResponses.set(id, { resolve, reject }); - call7(type, options).catch((error) => { - reject(error); - dialogResponses.delete(id); - }); - }); - } - function Info(options) { - return dialog("Info", options); - } - function Warning(options) { - return dialog("Warning", options); - } - function Error2(options) { - return dialog("Error", options); - } - function Question(options) { - return dialog("Question", options); - } - function OpenFile(options) { - return dialog("OpenFile", options); - } - function SaveFile(options) { - return dialog("SaveFile", options); - } - - // desktop/contextmenu.js - var call8 = newRuntimeCaller("contextmenu"); - function openContextMenu(id, x, y, data) { - return call8("OpenContextMenu", { id, x, y, data }); - } - function enableContextMenus(enabled) { - if (enabled) { - window.addEventListener("contextmenu", contextMenuHandler); - } else { - window.removeEventListener("contextmenu", contextMenuHandler); - } - } - function contextMenuHandler(event) { - processContextMenu(event.target, event); - } - function processContextMenu(element, event) { - let id = element.getAttribute("data-contextmenu"); - if (id) { - event.preventDefault(); - openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data")); - } else { - let parent = element.parentElement; - if (parent) { - processContextMenu(parent, event); - } - } - } - - // desktop/wml.js - function sendEvent(eventName, data = null) { - let event = new WailsEvent(eventName, data); - Emit(event); - } - function addWMLEventListeners() { - const elements = document.querySelectorAll("[data-wml-event]"); - elements.forEach(function(element) { - const eventType = element.getAttribute("data-wml-event"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - sendEvent(eventType); - } - }); - return; - } - sendEvent(eventType); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function callWindowMethod(method) { - if (wails.Window[method] === void 0) { - console.log("Window method " + method + " not found"); - } - wails.Window[method](); - } - function addWMLWindowListeners() { - const elements = document.querySelectorAll("[data-wml-window]"); - elements.forEach(function(element) { - const windowMethod = element.getAttribute("data-wml-window"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - callWindowMethod(windowMethod); - } - }); - return; - } - callWindowMethod(windowMethod); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function reloadWML() { - addWMLEventListeners(); - addWMLWindowListeners(); - } - - // desktop/main.js - window.wails = { - ...newRuntime(null) - }; - window._wails = { - dialogCallback, - dialogErrorCallback, - dispatchWailsEvent, - callCallback, - callErrorCallback - }; - function newRuntime(windowName) { - return { - Clipboard: { - ...clipboard_exports - }, - Application: { - ...application_exports, - GetWindowByName(windowName2) { - return newRuntime(windowName2); - } - }, - Log: log_exports, - Screens: screens_exports, - Call, - Plugin, - WML: { - Reload: reloadWML - }, - Dialog: { - Info, - Warning, - Error: Error2, - Question, - OpenFile, - SaveFile - }, - Events: { - Emit, - On, - Once, - OnMultiple, - Off, - OffAll - }, - Window: newWindow(windowName) - }; - } - if (true) { - console.log("Wails v3.0.0 Debug Mode Enabled"); - } - enableContextMenus(true); - document.addEventListener("DOMContentLoaded", function(event) { - reloadWML(); - }); -})(); -//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gICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lQ2FsbGVyKG9iamVjdCwgd2luZG93TmFtZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobWV0aG9kLCBhcmdzPW51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDYWxsKG9iamVjdCArIFwiLlwiICsgbWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKTtcbiAgICB9O1xufSIsICIvKlxuIF9cdCAgIF9fXHQgIF8gX19cbnwgfFx0IC8gL19fXyBfKF8pIC9fX19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AgICAgICAqIFNldCB0aGUgd2luZG93IHNpemUuXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB3aWR0aCBUaGUgd2luZG93IHdpZHRoXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBoZWlnaHQgVGhlIHdpbmRvdyBoZWlnaHRcbiAgICAgICAgICovXG4gICAgICAgIFNldFNpemU6ICh3aWR0aCwgaGVpZ2h0KSA9PiBjYWxsKCdTZXRTaXplJywge3dpZHRoLGhlaWdodH0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBzaXplLlxuICAgICAgICAgKiBAcmV0dXJucyB7UHJvbWlzZTxTaXplPn0gVGhlIHdpbmRvdyBzaXplXG4gICAgICAgICAqL1xuICAgICAgICBTaXplOiAoKSA9PiB7IHJldHVybiBjYWxsKCdTaXplJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB0aGUgd2luZG93IG1heGltdW0gc2l6ZS5cbiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHdpZHRoXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBoZWlnaHRcbiAgICAgICAgICovXG4gICAgICAgIFNldE1heFNpemU6ICh3aWR0aCwgaGVpZ2h0KSA9PiB2b2lkIGNhbGwoJ1NldE1heFNpemUnLCB7d2lkdGgsaGVpZ2h0fSksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB0aGUgd2luZG93IG1pbmltdW0gc2l6ZS5cbiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHdpZHRoXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBoZWlnaHRcbiAgICAgICAgICovXG4gICAgICAgIFNldE1pblNpemU6ICh3aWR0aCwgaGVpZ2h0KSA9PiB2b2lkIGNhbGwoJ1NldE1pblNpemUnLCB7d2lkdGgsaGVpZ2h0fSksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB3aW5kb3cgdG8gYmUgYWx3YXlzIG9uIHRvcC5cbiAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBvblRvcCBXaGV0aGVyIHRoZSB3aW5kb3cgc2hvdWxkIGJlIGFsd2F5cyBvbiB0b3BcbiAgICAgICAgICovXG4gICAgICAgIFNldEFsd2F5c09uVG9wOiAob25Ub3ApID0+IHZvaWQgY2FsbCgnU2V0QWx3YXlzT25Ub3AnLCB7YWx3YXlzT25Ub3A6b25Ub3B9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgcG9zaXRpb24uXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4XG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB5XG4gICAgICAgICAqL1xuICAgICAgICBTZXRQb3NpdGlvbjogKHgsIHkpID0+IGNhbGwoJ1NldFBvc2l0aW9uJywge3gseX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBwb3NpdGlvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8UG9zaXRpb24+fSBUaGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgU2hvdzogKCkgPT4gdm9pZCBjYWxsKCdTaG93JyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENsb3NlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIENsb3NlOiAoKSA9PiB2b2lkIGNhbGwoJ0Nsb3NlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFRvZ2dsZSB0aGUgd2luZG93IG1heGltaXNlIHN0YXRlXG4gICAgICAgICAqL1xuICAgICAgICBUb2dnbGVNYXhpbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdUb2dnbGVNYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWF4aW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNaW5pbWlzZSB0aGUgd2luZG93XG4gICAgICAgICAqL1xuICAgICAgICBNaW5pbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdNaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1pbmltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWluaW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTZXQgdGhlIGJhY2tncm91bmQgY29sb3VyIG9mIHRoZSB3aW5kb3cuXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSByIC0gQSB2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GEtd21sLWNvbmZpcm0nKTtcbiAgICAgICAgY29uc3QgdHJpZ2dlciA9IGVsZW1lbnQuZ2V0QXR0cmlidXRlKCdkYXRhLXdtbC10cmlnZ2VyJykgfHwgXCJjbGlja1wiO1xuXG4gICAgICAgIGxldCBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb25maXJtKSB7XG4gICAgICAgICAgICAgICAgUXVlc3Rpb24oe1RpdGxlOiBcIkNvbmZpcm1cIiwgTWVzc2FnZTpjb25maXJtLCBCdXR0b25zOlt7TGFiZWw6XCJZZXNcIn0se0xhYmVsOlwiTm9cIiwgSXNEZWZhdWx0OnRydWV9XX0pLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9PSBcIk5vXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRFdmVudChldmVudFR5cGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2VuZEV2ZW50KGV2ZW50VHlwZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBsaXN0ZW5lcnNcblxuICAgICAgICBlbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodHJpZ2dlciwgY2FsbGJhY2spO1xuXG4gICAgICAgIC8vIEFkZCBuZXcgbGlzdGVuZXJcbiAgICAgICAgZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcbiAgICB9KTtcbn1cblxuZnVuY3Rpb24gY2FsbFdpbmRvd01ldGhvZChtZXRob2QpIHtcbiAgICBpZiAod2FpbHMuV2luZG93W21ldGhvZF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBjb25zb2xlLmxvZyhcIldpbmRvdyBtZ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QUEsUUFDSjtBQUFBLFFBQ0E7QUFBQSxRQUNBLE9BQUFDO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsTUFDSjtBQUFBLE1BQ0EsUUFBUTtBQUFBLFFBQ0o7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLE1BQ0o7QUFBQSxNQUNBLFFBQVEsVUFBVSxVQUFVO0FBQUEsSUFDaEM7QUFBQSxFQUNKO0FBRUEsTUFBSSxNQUFPO0FBQ1AsWUFBUSxJQUFJLGlDQUFpQztBQUFBLEVBQ2pEO0FBRUEscUJBQW1CLElBQUk7QUFFdkIsV0FBUyxpQkFBaUIsb0JBQW9CLFNBQVMsT0FBTztBQUMxRCxjQUFVO0FBQUEsRUFDZCxDQUFDOyIsCiAgIm5hbWVzIjogWyJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY2FsbCIsICJnZW5lcmF0ZUlEIiwgIkVycm9yIiwgImNhbGwiLCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K diff --git a/v3/internal/runtime/runtime_debug_desktop_linux.js b/v3/internal/runtime/runtime_debug_desktop_linux.js deleted file mode 100644 index 0ca537592..000000000 --- a/v3/internal/runtime/runtime_debug_desktop_linux.js +++ /dev/null @@ -1,582 +0,0 @@ -(() => { - var __defProp = Object.defineProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - - // desktop/clipboard.js - var clipboard_exports = {}; - __export(clipboard_exports, { - SetText: () => SetText, - Text: () => Text - }); - - // desktop/runtime.js - var runtimeURL = window.location.origin + "/wails/runtime"; - function runtimeCall(method, windowName, args) { - let url = new URL(runtimeURL); - url.searchParams.append("method", method); - if (args) { - url.searchParams.append("args", JSON.stringify(args)); - } - let fetchOptions = { - headers: {} - }; - if (windowName) { - fetchOptions.headers["x-wails-window-name"] = windowName; - } - return new Promise((resolve, reject) => { - fetch(url, fetchOptions).then((response) => { - if (response.ok) { - if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) { - return response.json(); - } else { - return response.text(); - } - } - reject(Error(response.statusText)); - }).then((data) => resolve(data)).catch((error) => reject(error)); - }); - } - function newRuntimeCaller(object, windowName) { - return function(method, args = null) { - return runtimeCall(object + "." + method, windowName, args); - }; - } - - // desktop/clipboard.js - var call = newRuntimeCaller("clipboard"); - function SetText(text) { - void call("SetText", { text }); - } - function Text() { - return call("Text"); - } - - // desktop/application.js - var application_exports = {}; - __export(application_exports, { - Hide: () => Hide, - Quit: () => Quit, - Show: () => Show - }); - var call2 = newRuntimeCaller("application"); - function Hide() { - void call2("Hide"); - } - function Show() { - void call2("Show"); - } - function Quit() { - void call2("Quit"); - } - - // desktop/log.js - var log_exports = {}; - __export(log_exports, { - Log: () => Log - }); - var call3 = newRuntimeCaller("log"); - function Log(message) { - return call3("Log", message); - } - - // desktop/screens.js - var screens_exports = {}; - __export(screens_exports, { - GetAll: () => GetAll, - GetCurrent: () => GetCurrent, - GetPrimary: () => GetPrimary - }); - var call4 = newRuntimeCaller("screens"); - function GetAll() { - return call4("GetAll"); - } - function GetPrimary() { - return call4("GetPrimary"); - } - function GetCurrent() { - return call4("GetCurrent"); - } - - // node_modules/nanoid/non-secure/index.js - var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; - var nanoid = (size = 21) => { - let id = ""; - let i = size; - while (i--) { - id += urlAlphabet[Math.random() * 64 | 0]; - } - return id; - }; - - // desktop/calls.js - var call5 = newRuntimeCaller("call"); - var callResponses = /* @__PURE__ */ new Map(); - function generateID() { - let result; - do { - result = nanoid(); - } while (callResponses.has(result)); - return result; - } - function callCallback(id, data, isJSON) { - let p = callResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - callResponses.delete(id); - } - } - function callErrorCallback(id, message) { - let p = callResponses.get(id); - if (p) { - p.reject(message); - callResponses.delete(id); - } - } - function callBinding(type, options) { - return new Promise((resolve, reject) => { - let id = generateID(); - options = options || {}; - options["call-id"] = id; - callResponses.set(id, { resolve, reject }); - call5(type, options).catch((error) => { - reject(error); - callResponses.delete(id); - }); - }); - } - function Call(options) { - return callBinding("Call", options); - } - function Plugin(pluginName, methodName, ...args) { - return callBinding("Call", { - packageName: "wails-plugins", - structName: pluginName, - methodName, - args - }); - } - - // desktop/window.js - function newWindow(windowName) { - let call9 = newRuntimeCaller("window", windowName); - return { - // Reload: () => call('WR'), - // ReloadApp: () => call('WR'), - // SetSystemDefaultTheme: () => call('WASDT'), - // SetLightTheme: () => call('WALT'), - // SetDarkTheme: () => call('WADT'), - // IsFullscreen: () => call('WIF'), - // IsMaximized: () => call('WIM'), - // IsMinimized: () => call('WIMN'), - // IsWindowed: () => call('WIF'), - /** - * Centers the window. - */ - Center: () => void call9("Center"), - /** - * Set the window title. - * @param title - */ - SetTitle: (title) => void call9("SetTitle", { title }), - /** - * Makes the window fullscreen. - */ - Fullscreen: () => void call9("Fullscreen"), - /** - * Unfullscreen the window. - */ - UnFullscreen: () => void call9("UnFullscreen"), - /** - * Set the window size. - * @param {number} width The window width - * @param {number} height The window height - */ - SetSize: (width, height) => call9("SetSize", { width, height }), - /** - * Get the window size. - * @returns {Promise} The window size - */ - Size: () => { - return call9("Size"); - }, - /** - * Set the window maximum size. - * @param {number} width - * @param {number} height - */ - SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }), - /** - * Set the window minimum size. - * @param {number} width - * @param {number} height - */ - SetMinSize: (width, height) => void call9("SetMinSize", { width, height }), - /** - * Set window to be always on top. - * @param {boolean} onTop Whether the window should be always on top - */ - SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }), - /** - * Set the window position. - * @param {number} x - * @param {number} y - */ - SetPosition: (x, y) => call9("SetPosition", { x, y }), - /** - * Get the window position. - * @returns {Promise} The window position - */ - Position: () => { - return call9("Position"); - }, - /** - * Get the screen the window is on. - * @returns {Promise} - */ - Screen: () => { - return call9("Screen"); - }, - /** - * Hide the window - */ - Hide: () => void call9("Hide"), - /** - * Maximise the window - */ - Maximise: () => void call9("Maximise"), - /** - * Show the window - */ - Show: () => void call9("Show"), - /** - * Close the window - */ - Close: () => void call9("Close"), - /** - * Toggle the window maximise state - */ - ToggleMaximise: () => void call9("ToggleMaximise"), - /** - * Unmaximise the window - */ - UnMaximise: () => void call9("UnMaximise"), - /** - * Minimise the window - */ - Minimise: () => void call9("Minimise"), - /** - * Unminimise the window - */ - UnMinimise: () => void call9("UnMinimise"), - /** - * Set the background colour of the window. - * @param {number} r - A value between 0 and 255 - * @param {number} g - A value between 0 and 255 - * @param {number} b - A value between 0 and 255 - * @param {number} a - A value between 0 and 255 - */ - SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a }) - }; - } - - // desktop/events.js - var call6 = newRuntimeCaller("events"); - var Listener = class { - /** - * Creates an instance of Listener. - * @param {string} eventName - * @param {function} callback - * @param {number} maxCallbacks - * @memberof Listener - */ - constructor(eventName, callback, maxCallbacks) { - this.eventName = eventName; - this.maxCallbacks = maxCallbacks || -1; - this.Callback = (data) => { - callback(data); - if (this.maxCallbacks === -1) { - return false; - } - this.maxCallbacks -= 1; - return this.maxCallbacks === 0; - }; - } - }; - var WailsEvent = class { - /** - * Creates an instance of WailsEvent. - * @param {string} name - Name of the event - * @param {any=null} data - Data associated with the event - * @memberof WailsEvent - */ - constructor(name, data = null) { - this.name = name; - this.data = data; - } - }; - var eventListeners = /* @__PURE__ */ new Map(); - function OnMultiple(eventName, callback, maxCallbacks) { - let listeners = eventListeners.get(eventName) || []; - const thisListener = new Listener(eventName, callback, maxCallbacks); - listeners.push(thisListener); - eventListeners.set(eventName, listeners); - return () => listenerOff(thisListener); - } - function On(eventName, callback) { - return OnMultiple(eventName, callback, -1); - } - function Once(eventName, callback) { - return OnMultiple(eventName, callback, 1); - } - function listenerOff(listener) { - const eventName = listener.eventName; - let listeners = eventListeners.get(eventName).filter((l) => l !== listener); - if (listeners.length === 0) { - eventListeners.delete(eventName); - } else { - eventListeners.set(eventName, listeners); - } - } - function dispatchWailsEvent(event) { - console.log("dispatching event: ", { event }); - let listeners = eventListeners.get(event.name); - if (listeners) { - let toRemove = []; - listeners.forEach((listener) => { - let remove = listener.Callback(event); - if (remove) { - toRemove.push(listener); - } - }); - if (toRemove.length > 0) { - listeners = listeners.filter((l) => !toRemove.includes(l)); - if (listeners.length === 0) { - eventListeners.delete(event.name); - } else { - eventListeners.set(event.name, listeners); - } - } - } - } - function Off(eventName, ...additionalEventNames) { - let eventsToRemove = [eventName, ...additionalEventNames]; - eventsToRemove.forEach((eventName2) => { - eventListeners.delete(eventName2); - }); - } - function OffAll() { - eventListeners.clear(); - } - function Emit(event) { - void call6("Emit", event); - } - - // desktop/dialogs.js - var call7 = newRuntimeCaller("dialog"); - var dialogResponses = /* @__PURE__ */ new Map(); - function generateID2() { - let result; - do { - result = nanoid(); - } while (dialogResponses.has(result)); - return result; - } - function dialogCallback(id, data, isJSON) { - let p = dialogResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - dialogResponses.delete(id); - } - } - function dialogErrorCallback(id, message) { - let p = dialogResponses.get(id); - if (p) { - p.reject(message); - dialogResponses.delete(id); - } - } - function dialog(type, options) { - return new Promise((resolve, reject) => { - let id = generateID2(); - options = options || {}; - options["dialog-id"] = id; - dialogResponses.set(id, { resolve, reject }); - call7(type, options).catch((error) => { - reject(error); - dialogResponses.delete(id); - }); - }); - } - function Info(options) { - return dialog("Info", options); - } - function Warning(options) { - return dialog("Warning", options); - } - function Error2(options) { - return dialog("Error", options); - } - function Question(options) { - return dialog("Question", options); - } - function OpenFile(options) { - return dialog("OpenFile", options); - } - function SaveFile(options) { - return dialog("SaveFile", options); - } - - // desktop/contextmenu.js - var call8 = newRuntimeCaller("contextmenu"); - function openContextMenu(id, x, y, data) { - return call8("OpenContextMenu", { id, x, y, data }); - } - function enableContextMenus(enabled) { - if (enabled) { - window.addEventListener("contextmenu", contextMenuHandler); - } else { - window.removeEventListener("contextmenu", contextMenuHandler); - } - } - function contextMenuHandler(event) { - processContextMenu(event.target, event); - } - function processContextMenu(element, event) { - let id = element.getAttribute("data-contextmenu"); - if (id) { - event.preventDefault(); - openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data")); - } else { - let parent = element.parentElement; - if (parent) { - processContextMenu(parent, event); - } - } - } - - // desktop/wml.js - function sendEvent(eventName, data = null) { - let event = new WailsEvent(eventName, data); - Emit(event); - } - function addWMLEventListeners() { - const elements = document.querySelectorAll("[data-wml-event]"); - elements.forEach(function(element) { - const eventType = element.getAttribute("data-wml-event"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - sendEvent(eventType); - } - }); - return; - } - sendEvent(eventType); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function callWindowMethod(method) { - if (wails.Window[method] === void 0) { - console.log("Window method " + method + " not found"); - } - wails.Window[method](); - } - function addWMLWindowListeners() { - const elements = document.querySelectorAll("[data-wml-window]"); - elements.forEach(function(element) { - const windowMethod = element.getAttribute("data-wml-window"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - callWindowMethod(windowMethod); - } - }); - return; - } - callWindowMethod(windowMethod); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function reloadWML() { - addWMLEventListeners(); - addWMLWindowListeners(); - } - - // desktop/main.js - window.wails = { - ...newRuntime(null) - }; - window._wails = { - dialogCallback, - dialogErrorCallback, - dispatchWailsEvent, - callCallback, - callErrorCallback - }; - function newRuntime(windowName) { - return { - Clipboard: { - ...clipboard_exports - }, - Application: { - ...application_exports, - GetWindowByName(windowName2) { - return newRuntime(windowName2); - } - }, - Log: log_exports, - Screens: screens_exports, - Call, - Plugin, - WML: { - Reload: reloadWML - }, - Dialog: { - Info, - Warning, - Error: Error2, - Question, - OpenFile, - SaveFile - }, - Events: { - Emit, - On, - Once, - OnMultiple, - Off, - OffAll - }, - Window: newWindow(windowName) - }; - } - if (true) { - console.log("Wails v3.0.0 Debug Mode Enabled"); - } - enableContextMenus(true); - document.addEventListener("DOMContentLoaded", function(event) { - reloadWML(); - }); -})(); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9jbGlwYm9hcmQuanMiLCAiZGVza3RvcC9ydW50aW1lLmpzIiwgImRlc2t0b3AvYXBwbGljYXRpb24uanMiLCAiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9zY3JlZW5zLmpzIiwgIm5vZGVfbW9kdWxlcy9uYW5vaWQvbm9uLXNlY3VyZS9pbmRleC5qcyIsICJkZXNrdG9wL2NhbGxzLmpzIiwgImRlc2t0b3Avd2luZG93LmpzIiwgImRlc2t0b3AvZXZlbnRzLmpzIiwgImRlc2t0b3AvZGlhbG9ncy5qcyIsICJkZXNrdG9wL2NvbnRleHRtZW51LmpzIiwgImRlc2t0b3Avd21sLmpzIiwgImRlc2t0b3AvbWFpbi5qcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLypcbiBfXHQgICBfX1x0ICBfIF9fXG58IHxcdCAvIC9fX18gXyhfKSAvX19fX1xufCB8IC98IC8gLyBfXyBgLyAvIC8gX19fL1xufCB8LyB8LyAvIC9fLyAvIC8gKF9fICApXG58X18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ZVVSTCk7XG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJtZXRob2RcIiwgbWV0aG9kKTtcbiAgICBpZiAoYXJncykge1xuICAgICAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcImFyZ3NcIiwgSlNPTi5zdHJpbmdpZnkoYXJncykpO1xuICAgIH1cbiAgICBsZXQgZmV0Y2hPcHRpb25zID0ge1xuICAgICAgICBoZWFkZXJzOiB7fSxcbiAgICB9O1xuICAgIGlmICh3aW5kb3dOYW1lKSB7XG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XG4gICAgfVxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1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aGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgU2hvdzogKCkgPT4gdm9pZCBjYWxsKCdTaG93JyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENsb3NlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIENsb3NlOiAoKSA9PiB2b2lkIGNhbGwoJ0Nsb3NlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFRvZ2dsZSB0aGUgd2luZG93IG1heGltaXNlIHN0YXRlXG4gICAgICAgICAqL1xuICAgICAgICBUb2dnbGVNYXhpbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdUb2dnbGVNYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWF4aW1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FxuICAgIGRpYWxvZ0Vycm9yQ2FsbGJhY2ssXG4gICAgZGlzcGF0Y2hXYWlsc0V2ZW50LFxuICAgIGNhbGxDYWxsYmFjayxcbiAgICBjYWxsRXJyb3JDYWxsYmFjayxcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lKHdpbmRvd05hbWUpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICBDbGlwYm9hcmQ6IHtcbiAgICAgICAgICAgIC4uLkNsaXBib2FyZFxuICAgICAgICB9LFxuICAgICAgICBBcHBsaWNhdGlvbjoge1xuICAgICAgICAgICAgLi4uQXBwbGljYXRpb24sXG4gICAgICAgICAgICBHZXRXaW5kb3dCeU5hbWUod2luZG93TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXdSdW50aW1lKHdpbmRvd05hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBMb2csXG4gICAgICAgIFNjcmVlbnMsXG4gICAgICAgIENhbGwsXG4gICAgICAgIFBsdWdpbixcbiAgICAgICAgV01MOiB7XG4gICAgICAgICAgICBSZWxvYWQ6IHJlbG9hZFdNTCxcbiAgICAgICAgfSxcbiAgICAgICAgRGlhbG9nOiB7XG4gICAgICAgICAgICBJbmZvLFxuICAgICAgICAgICAgV2FybmluZyxcbiAgICAgICAgICAgIEVycm9yLFxuICAgICAgICAgICAgUXVlc3Rpb24sXG4gICAgICAgICAgICBPcGVuRmlsZSxcbiAgICAgICAgICAgIFNhdmVGaWxlLFxuICAgICAgICB9LFxuICAgICAgICBFdmVudHM6IHtcbiAgICAgICAgICAgIEVtaXQsXG4gICAgICAgICAgICBPbixcbiAgICAgICAgICAgIE9uY2UsXG4gICAgICAgICAgICBPbk11bHRpcGxlLFxuICAgICAgICAgICAgT2ZmLFxuICAgICAgICAgICAgT2ZmQWxsLFxuICAgICAgICB9LFxuICAgICAgICBXaW5kb3c6IG5ld1dpbmRvdyh3aW5kb3dOYW1lKSxcbiAgICB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LCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K diff --git a/v3/internal/runtime/runtime_debug_desktop_windows.js b/v3/internal/runtime/runtime_debug_desktop_windows.js deleted file mode 100644 index 0ca537592..000000000 --- a/v3/internal/runtime/runtime_debug_desktop_windows.js +++ /dev/null @@ -1,582 +0,0 @@ -(() => { - var __defProp = Object.defineProperty; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - - // desktop/clipboard.js - var clipboard_exports = {}; - __export(clipboard_exports, { - SetText: () => SetText, - Text: () => Text - }); - - // desktop/runtime.js - var runtimeURL = window.location.origin + "/wails/runtime"; - function runtimeCall(method, windowName, args) { - let url = new URL(runtimeURL); - url.searchParams.append("method", method); - if (args) { - url.searchParams.append("args", JSON.stringify(args)); - } - let fetchOptions = { - headers: {} - }; - if (windowName) { - fetchOptions.headers["x-wails-window-name"] = windowName; - } - return new Promise((resolve, reject) => { - fetch(url, fetchOptions).then((response) => { - if (response.ok) { - if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) { - return response.json(); - } else { - return response.text(); - } - } - reject(Error(response.statusText)); - }).then((data) => resolve(data)).catch((error) => reject(error)); - }); - } - function newRuntimeCaller(object, windowName) { - return function(method, args = null) { - return runtimeCall(object + "." + method, windowName, args); - }; - } - - // desktop/clipboard.js - var call = newRuntimeCaller("clipboard"); - function SetText(text) { - void call("SetText", { text }); - } - function Text() { - return call("Text"); - } - - // desktop/application.js - var application_exports = {}; - __export(application_exports, { - Hide: () => Hide, - Quit: () => Quit, - Show: () => Show - }); - var call2 = newRuntimeCaller("application"); - function Hide() { - void call2("Hide"); - } - function Show() { - void call2("Show"); - } - function Quit() { - void call2("Quit"); - } - - // desktop/log.js - var log_exports = {}; - __export(log_exports, { - Log: () => Log - }); - var call3 = newRuntimeCaller("log"); - function Log(message) { - return call3("Log", message); - } - - // desktop/screens.js - var screens_exports = {}; - __export(screens_exports, { - GetAll: () => GetAll, - GetCurrent: () => GetCurrent, - GetPrimary: () => GetPrimary - }); - var call4 = newRuntimeCaller("screens"); - function GetAll() { - return call4("GetAll"); - } - function GetPrimary() { - return call4("GetPrimary"); - } - function GetCurrent() { - return call4("GetCurrent"); - } - - // node_modules/nanoid/non-secure/index.js - var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; - var nanoid = (size = 21) => { - let id = ""; - let i = size; - while (i--) { - id += urlAlphabet[Math.random() * 64 | 0]; - } - return id; - }; - - // desktop/calls.js - var call5 = newRuntimeCaller("call"); - var callResponses = /* @__PURE__ */ new Map(); - function generateID() { - let result; - do { - result = nanoid(); - } while (callResponses.has(result)); - return result; - } - function callCallback(id, data, isJSON) { - let p = callResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - callResponses.delete(id); - } - } - function callErrorCallback(id, message) { - let p = callResponses.get(id); - if (p) { - p.reject(message); - callResponses.delete(id); - } - } - function callBinding(type, options) { - return new Promise((resolve, reject) => { - let id = generateID(); - options = options || {}; - options["call-id"] = id; - callResponses.set(id, { resolve, reject }); - call5(type, options).catch((error) => { - reject(error); - callResponses.delete(id); - }); - }); - } - function Call(options) { - return callBinding("Call", options); - } - function Plugin(pluginName, methodName, ...args) { - return callBinding("Call", { - packageName: "wails-plugins", - structName: pluginName, - methodName, - args - }); - } - - // desktop/window.js - function newWindow(windowName) { - let call9 = newRuntimeCaller("window", windowName); - return { - // Reload: () => call('WR'), - // ReloadApp: () => call('WR'), - // SetSystemDefaultTheme: () => call('WASDT'), - // SetLightTheme: () => call('WALT'), - // SetDarkTheme: () => call('WADT'), - // IsFullscreen: () => call('WIF'), - // IsMaximized: () => call('WIM'), - // IsMinimized: () => call('WIMN'), - // IsWindowed: () => call('WIF'), - /** - * Centers the window. - */ - Center: () => void call9("Center"), - /** - * Set the window title. - * @param title - */ - SetTitle: (title) => void call9("SetTitle", { title }), - /** - * Makes the window fullscreen. - */ - Fullscreen: () => void call9("Fullscreen"), - /** - * Unfullscreen the window. - */ - UnFullscreen: () => void call9("UnFullscreen"), - /** - * Set the window size. - * @param {number} width The window width - * @param {number} height The window height - */ - SetSize: (width, height) => call9("SetSize", { width, height }), - /** - * Get the window size. - * @returns {Promise} The window size - */ - Size: () => { - return call9("Size"); - }, - /** - * Set the window maximum size. - * @param {number} width - * @param {number} height - */ - SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }), - /** - * Set the window minimum size. - * @param {number} width - * @param {number} height - */ - SetMinSize: (width, height) => void call9("SetMinSize", { width, height }), - /** - * Set window to be always on top. - * @param {boolean} onTop Whether the window should be always on top - */ - SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }), - /** - * Set the window position. - * @param {number} x - * @param {number} y - */ - SetPosition: (x, y) => call9("SetPosition", { x, y }), - /** - * Get the window position. - * @returns {Promise} The window position - */ - Position: () => { - return call9("Position"); - }, - /** - * Get the screen the window is on. - * @returns {Promise} - */ - Screen: () => { - return call9("Screen"); - }, - /** - * Hide the window - */ - Hide: () => void call9("Hide"), - /** - * Maximise the window - */ - Maximise: () => void call9("Maximise"), - /** - * Show the window - */ - Show: () => void call9("Show"), - /** - * Close the window - */ - Close: () => void call9("Close"), - /** - * Toggle the window maximise state - */ - ToggleMaximise: () => void call9("ToggleMaximise"), - /** - * Unmaximise the window - */ - UnMaximise: () => void call9("UnMaximise"), - /** - * Minimise the window - */ - Minimise: () => void call9("Minimise"), - /** - * Unminimise the window - */ - UnMinimise: () => void call9("UnMinimise"), - /** - * Set the background colour of the window. - * @param {number} r - A value between 0 and 255 - * @param {number} g - A value between 0 and 255 - * @param {number} b - A value between 0 and 255 - * @param {number} a - A value between 0 and 255 - */ - SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a }) - }; - } - - // desktop/events.js - var call6 = newRuntimeCaller("events"); - var Listener = class { - /** - * Creates an instance of Listener. - * @param {string} eventName - * @param {function} callback - * @param {number} maxCallbacks - * @memberof Listener - */ - constructor(eventName, callback, maxCallbacks) { - this.eventName = eventName; - this.maxCallbacks = maxCallbacks || -1; - this.Callback = (data) => { - callback(data); - if (this.maxCallbacks === -1) { - return false; - } - this.maxCallbacks -= 1; - return this.maxCallbacks === 0; - }; - } - }; - var WailsEvent = class { - /** - * Creates an instance of WailsEvent. - * @param {string} name - Name of the event - * @param {any=null} data - Data associated with the event - * @memberof WailsEvent - */ - constructor(name, data = null) { - this.name = name; - this.data = data; - } - }; - var eventListeners = /* @__PURE__ */ new Map(); - function OnMultiple(eventName, callback, maxCallbacks) { - let listeners = eventListeners.get(eventName) || []; - const thisListener = new Listener(eventName, callback, maxCallbacks); - listeners.push(thisListener); - eventListeners.set(eventName, listeners); - return () => listenerOff(thisListener); - } - function On(eventName, callback) { - return OnMultiple(eventName, callback, -1); - } - function Once(eventName, callback) { - return OnMultiple(eventName, callback, 1); - } - function listenerOff(listener) { - const eventName = listener.eventName; - let listeners = eventListeners.get(eventName).filter((l) => l !== listener); - if (listeners.length === 0) { - eventListeners.delete(eventName); - } else { - eventListeners.set(eventName, listeners); - } - } - function dispatchWailsEvent(event) { - console.log("dispatching event: ", { event }); - let listeners = eventListeners.get(event.name); - if (listeners) { - let toRemove = []; - listeners.forEach((listener) => { - let remove = listener.Callback(event); - if (remove) { - toRemove.push(listener); - } - }); - if (toRemove.length > 0) { - listeners = listeners.filter((l) => !toRemove.includes(l)); - if (listeners.length === 0) { - eventListeners.delete(event.name); - } else { - eventListeners.set(event.name, listeners); - } - } - } - } - function Off(eventName, ...additionalEventNames) { - let eventsToRemove = [eventName, ...additionalEventNames]; - eventsToRemove.forEach((eventName2) => { - eventListeners.delete(eventName2); - }); - } - function OffAll() { - eventListeners.clear(); - } - function Emit(event) { - void call6("Emit", event); - } - - // desktop/dialogs.js - var call7 = newRuntimeCaller("dialog"); - var dialogResponses = /* @__PURE__ */ new Map(); - function generateID2() { - let result; - do { - result = nanoid(); - } while (dialogResponses.has(result)); - return result; - } - function dialogCallback(id, data, isJSON) { - let p = dialogResponses.get(id); - if (p) { - if (isJSON) { - p.resolve(JSON.parse(data)); - } else { - p.resolve(data); - } - dialogResponses.delete(id); - } - } - function dialogErrorCallback(id, message) { - let p = dialogResponses.get(id); - if (p) { - p.reject(message); - dialogResponses.delete(id); - } - } - function dialog(type, options) { - return new Promise((resolve, reject) => { - let id = generateID2(); - options = options || {}; - options["dialog-id"] = id; - dialogResponses.set(id, { resolve, reject }); - call7(type, options).catch((error) => { - reject(error); - dialogResponses.delete(id); - }); - }); - } - function Info(options) { - return dialog("Info", options); - } - function Warning(options) { - return dialog("Warning", options); - } - function Error2(options) { - return dialog("Error", options); - } - function Question(options) { - return dialog("Question", options); - } - function OpenFile(options) { - return dialog("OpenFile", options); - } - function SaveFile(options) { - return dialog("SaveFile", options); - } - - // desktop/contextmenu.js - var call8 = newRuntimeCaller("contextmenu"); - function openContextMenu(id, x, y, data) { - return call8("OpenContextMenu", { id, x, y, data }); - } - function enableContextMenus(enabled) { - if (enabled) { - window.addEventListener("contextmenu", contextMenuHandler); - } else { - window.removeEventListener("contextmenu", contextMenuHandler); - } - } - function contextMenuHandler(event) { - processContextMenu(event.target, event); - } - function processContextMenu(element, event) { - let id = element.getAttribute("data-contextmenu"); - if (id) { - event.preventDefault(); - openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data")); - } else { - let parent = element.parentElement; - if (parent) { - processContextMenu(parent, event); - } - } - } - - // desktop/wml.js - function sendEvent(eventName, data = null) { - let event = new WailsEvent(eventName, data); - Emit(event); - } - function addWMLEventListeners() { - const elements = document.querySelectorAll("[data-wml-event]"); - elements.forEach(function(element) { - const eventType = element.getAttribute("data-wml-event"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - sendEvent(eventType); - } - }); - return; - } - sendEvent(eventType); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function callWindowMethod(method) { - if (wails.Window[method] === void 0) { - console.log("Window method " + method + " not found"); - } - wails.Window[method](); - } - function addWMLWindowListeners() { - const elements = document.querySelectorAll("[data-wml-window]"); - elements.forEach(function(element) { - const windowMethod = element.getAttribute("data-wml-window"); - const confirm = element.getAttribute("data-wml-confirm"); - const trigger = element.getAttribute("data-wml-trigger") || "click"; - let callback = function() { - if (confirm) { - Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) { - if (result !== "No") { - callWindowMethod(windowMethod); - } - }); - return; - } - callWindowMethod(windowMethod); - }; - element.removeEventListener(trigger, callback); - element.addEventListener(trigger, callback); - }); - } - function reloadWML() { - addWMLEventListeners(); - addWMLWindowListeners(); - } - - // desktop/main.js - window.wails = { - ...newRuntime(null) - }; - window._wails = { - dialogCallback, - dialogErrorCallback, - dispatchWailsEvent, - callCallback, - callErrorCallback - }; - function newRuntime(windowName) { - return { - Clipboard: { - ...clipboard_exports - }, - Application: { - ...application_exports, - GetWindowByName(windowName2) { - return newRuntime(windowName2); - } - }, - Log: log_exports, - Screens: screens_exports, - Call, - Plugin, - WML: { - Reload: reloadWML - }, - Dialog: { - Info, - Warning, - Error: Error2, - Question, - OpenFile, - SaveFile - }, - Events: { - Emit, - On, - Once, - OnMultiple, - Off, - OffAll - }, - Window: newWindow(windowName) - }; - } - if (true) { - console.log("Wails v3.0.0 Debug Mode Enabled"); - } - enableContextMenus(true); - document.addEventListener("DOMContentLoaded", function(event) { - reloadWML(); - }); -})(); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9jbGlwYm9hcmQuanMiLCAiZGVza3RvcC9ydW50aW1lLmpzIiwgImRlc2t0b3AvYXBwbGljYXRpb24uanMiLCAiZGVza3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250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lQ2FsbGVyKG9iamVjdCwgd2luZG93TmFtZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobWV0aG9kLCBhcmdzPW51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDYWxsKG9iamVjdCArIFwiLlwiICsgbWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKTtcbiAgICB9O1xufSIsICIvKlxuIF9cdCAgIF9fXHQgIF8gX19cbnwgfFx0IC8gL19fXyBfKF8pIC9fX19fXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXG58IHwvIHwvIC8gL18vIC8gLyAoX18gIClcbnxfXy98X18vXFxfXyxfL18vXy9fX19fL1xuVGhlIGVsZWN0cm9uIGFsdGVybmF0aXZlIGZvciBHb1xuKGMpIExlYS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ICAgICAgIFNldEFsd2F5c09uVG9wOiAob25Ub3ApID0+IHZvaWQgY2FsbCgnU2V0QWx3YXlzT25Ub3AnLCB7YWx3YXlzT25Ub3A6b25Ub3B9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgcG9zaXRpb24uXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4XG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB5XG4gICAgICAgICAqL1xuICAgICAgICBTZXRQb3NpdGlvbjogKHgsIHkpID0+IGNhbGwoJ1NldFBvc2l0aW9uJywge3gseX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBwb3NpdGlvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8UG9zaXRpb24+fSBUaGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd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ayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb25maXJtKSB7XG4gICAgICAgICAgICAgICAgUXVlc3Rpb24oe1RpdGxlOiBcIkNvbmZpcm1cIiwgTWVzc2FnZTpjb25maXJtLCBCdXR0b25zOlt7TGFiZWw6XCJZZXNcIn0se0xhYmVsOlwiTm9cIiwgSXNEZWZhdWx0OnRydWV9XX0pLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9PSBcIk5vXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRFdmVudChldmVudFR5cGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2VuZEV2ZW50KGV2ZW50VHlwZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBsaXN0ZW5lcnNcblxuICAgICAgICBlbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodHJpZ2dlciwgY2FsbGJhY2spO1xuXG4gICAgICAgIC8vIEFkZCBuZXcgbGlzdGVuZXJcbiAgICAgICAgZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcbiAgICB9KTtcbn1cblxuZnVuY3Rpb24gY2FsbFdpbmRvd01ldGhvZChtZXRob2QpIHtcbiAgICBpZiAod2FpbHMuV2luZG93W21ldGhvZF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBjb25zb2xlLmxvZyhcIldpbmRvdyBtZXRob2QgXCIgKyBtZXRob2QgKyBcIiBub3QgZm91bmRcIik7XG4gICAgfVxuICAgIHdhaWxzLldpbmRvd1ttZXRob2RdKCk7XG59XG5cbmZ1bmN0aW9uIGFkZFdNTFdpbmRvd0xpc3RlbmVycygpIHtcbiAgICBjb25z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FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLE1BQ0o7QUFBQSxNQUNBLFFBQVEsVUFBVSxVQUFVO0FBQUEsSUFDaEM7QUFBQSxFQUNKO0FBRUEsTUFBSSxNQUFPO0FBQ1AsWUFBUSxJQUFJLGlDQUFpQztBQUFBLEVBQ2pEO0FBRUEscUJBQW1CLElBQUk7QUFFdkIsV0FBUyxpQkFBaUIsb0JBQW9CLFNBQVMsT0FBTztBQUMxRCxjQUFVO0FBQUEsRUFDZCxDQUFDOyIsCiAgIm5hbWVzIjogWyJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY2FsbCIsICJnZW5lcmF0ZUlEIiwgIkVycm9yIiwgImNhbGwiLCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K diff --git a/v3/internal/runtime/runtime_debug_linux.go b/v3/internal/runtime/runtime_debug_linux.go deleted file mode 100644 index c29408392..000000000 --- a/v3/internal/runtime/runtime_debug_linux.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build linux && !production - -package runtime - -import _ "embed" - -//go:embed runtime_debug_desktop_linux.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/runtime_debug_windows.go b/v3/internal/runtime/runtime_debug_windows.go deleted file mode 100644 index 09a3a9198..000000000 --- a/v3/internal/runtime/runtime_debug_windows.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build windows && !production - -package runtime - -import _ "embed" - -//go:embed runtime_debug_desktop_windows.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/runtime_production_darwin.go b/v3/internal/runtime/runtime_production_darwin.go deleted file mode 100644 index be2411d9e..000000000 --- a/v3/internal/runtime/runtime_production_darwin.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build darwin && production - -package runtime - -import _ "embed" - -//go:embed runtime_production_desktop_darwin.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/runtime_production_desktop_darwin.js b/v3/internal/runtime/runtime_production_desktop_darwin.js deleted file mode 100644 index be519faa5..000000000 --- a/v3/internal/runtime/runtime_production_desktop_darwin.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})(); diff --git a/v3/internal/runtime/runtime_production_desktop_linux.js b/v3/internal/runtime/runtime_production_desktop_linux.js deleted file mode 100644 index be519faa5..000000000 --- a/v3/internal/runtime/runtime_production_desktop_linux.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})(); diff --git a/v3/internal/runtime/runtime_production_desktop_windows.js b/v3/internal/runtime/runtime_production_desktop_windows.js deleted file mode 100644 index be519faa5..000000000 --- a/v3/internal/runtime/runtime_production_desktop_windows.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})(); diff --git a/v3/internal/runtime/runtime_production_linux.go b/v3/internal/runtime/runtime_production_linux.go deleted file mode 100644 index d7c2bd1ef..000000000 --- a/v3/internal/runtime/runtime_production_linux.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build linux && production - -package runtime - -import _ "embed" - -//go:embed runtime_production_desktop_linux.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/runtime_production_windows.go b/v3/internal/runtime/runtime_production_windows.go deleted file mode 100644 index 8ab6d6199..000000000 --- a/v3/internal/runtime/runtime_production_windows.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build windows && production - -package runtime - -import _ "embed" - -//go:embed runtime_production_desktop_windows.js -var DesktopRuntime []byte diff --git a/v3/internal/runtime/vite.config.ts b/v3/internal/runtime/vite.config.ts deleted file mode 100644 index eb0831c65..000000000 --- a/v3/internal/runtime/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - environment: 'happy-dom', - }, -}) \ No newline at end of file diff --git a/v3/internal/templates/_base/default/Taskfile.tmpl.yml b/v3/internal/templates/_base/default/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/_base/default/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl b/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/_base/default/build/Info.plist.tmpl b/v3/internal/templates/_base/default/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/_base/default/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/_base/default/build/appicon.png b/v3/internal/templates/_base/default/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/_base/default/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/_base/default/build/icons.icns b/v3/internal/templates/_base/default/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/_base/default/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/_base/default/frontend/public/wails.png b/v3/internal/templates/_base/default/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/_base/default/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/_base/default/go.mod.tmpl b/v3/internal/templates/_base/default/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/_base/default/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/_base/default/go.sum.tmpl b/v3/internal/templates/_base/default/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/_base/default/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/_base/default/main.go.tmpl b/v3/internal/templates/_base/default/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/_base/default/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/_base/lit-ts/frontend/index.html b/v3/internal/templates/_base/lit-ts/frontend/index.html deleted file mode 100644 index b4898b214..000000000 --- a/v3/internal/templates/_base/lit-ts/frontend/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - Wails + Lit + TS - - - - - -

Wails + Lit

-
- - diff --git a/v3/internal/templates/_base/lit/frontend/index.html b/v3/internal/templates/_base/lit/frontend/index.html deleted file mode 100644 index 0f030a2f4..000000000 --- a/v3/internal/templates/_base/lit/frontend/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - Wails + Lit - - - - - -

Wails + Lit

-
- - diff --git a/v3/internal/templates/_base/preact-ts/frontend/index.html b/v3/internal/templates/_base/preact-ts/frontend/index.html deleted file mode 100644 index c467c421b..000000000 --- a/v3/internal/templates/_base/preact-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Preact + TS - - -
- - - diff --git a/v3/internal/templates/_base/preact/frontend/index.html b/v3/internal/templates/_base/preact/frontend/index.html deleted file mode 100644 index a3c698def..000000000 --- a/v3/internal/templates/_base/preact/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Preact - - -
- - - diff --git a/v3/internal/templates/_base/react-swc-ts/frontend/index.html b/v3/internal/templates/_base/react-swc-ts/frontend/index.html deleted file mode 100644 index 44b5c452b..000000000 --- a/v3/internal/templates/_base/react-swc-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React + TS - - -
- - - diff --git a/v3/internal/templates/_base/react-swc/frontend/index.html b/v3/internal/templates/_base/react-swc/frontend/index.html deleted file mode 100644 index cc495265c..000000000 --- a/v3/internal/templates/_base/react-swc/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React - - -
- - - diff --git a/v3/internal/templates/_base/react-ts/frontend/index.html b/v3/internal/templates/_base/react-ts/frontend/index.html deleted file mode 100644 index 44b5c452b..000000000 --- a/v3/internal/templates/_base/react-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React + TS - - -
- - - diff --git a/v3/internal/templates/_base/react/frontend/index.html b/v3/internal/templates/_base/react/frontend/index.html deleted file mode 100644 index cc495265c..000000000 --- a/v3/internal/templates/_base/react/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React - - -
- - - diff --git a/v3/internal/templates/_base/svelte-ts/frontend/index.html b/v3/internal/templates/_base/svelte-ts/frontend/index.html deleted file mode 100644 index 2d5c0f2de..000000000 --- a/v3/internal/templates/_base/svelte-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Svelte + TS - - -
- - - diff --git a/v3/internal/templates/_base/svelte/frontend/README.md b/v3/internal/templates/_base/svelte/frontend/README.md deleted file mode 100644 index fd6a7082f..000000000 --- a/v3/internal/templates/_base/svelte/frontend/README.md +++ /dev/null @@ -1 +0,0 @@ -# Wails + Svelte \ No newline at end of file diff --git a/v3/internal/templates/_base/svelte/frontend/index.html b/v3/internal/templates/_base/svelte/frontend/index.html deleted file mode 100644 index d12bc9069..000000000 --- a/v3/internal/templates/_base/svelte/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Svelte - - -
- - - diff --git a/v3/internal/templates/_base/svelte/frontend/src/App.svelte b/v3/internal/templates/_base/svelte/frontend/src/App.svelte deleted file mode 100644 index c677e3838..000000000 --- a/v3/internal/templates/_base/svelte/frontend/src/App.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -
- -

Wails + Svelte

- -
- -
- -

- Check out SvelteKit, the official Svelte app framework powered by Wails! -

- -

- Click on the Wails and Svelte logos to learn more -

-
- - diff --git a/v3/internal/templates/_base/vanilla-ts/frontend/index.html b/v3/internal/templates/_base/vanilla-ts/frontend/index.html deleted file mode 100644 index 8c692073a..000000000 --- a/v3/internal/templates/_base/vanilla-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + TS - - -
- - - diff --git a/v3/internal/templates/_base/vanilla/frontend/index.html b/v3/internal/templates/_base/vanilla/frontend/index.html deleted file mode 100644 index c4eb3cc44..000000000 --- a/v3/internal/templates/_base/vanilla/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails App - - -
- - - diff --git a/v3/internal/templates/_base/vue-ts/frontend/index.html b/v3/internal/templates/_base/vue-ts/frontend/index.html deleted file mode 100644 index 28870032c..000000000 --- a/v3/internal/templates/_base/vue-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Vue + TS - - -
- - - diff --git a/v3/internal/templates/_base/vue/frontend/index.html b/v3/internal/templates/_base/vue/frontend/index.html deleted file mode 100644 index 5057cc3c1..000000000 --- a/v3/internal/templates/_base/vue/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Vue - - -
- - - diff --git a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml b/v3/internal/templates/lit-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/lit-ts/build/Info.plist.tmpl b/v3/internal/templates/lit-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/lit-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/lit-ts/build/appicon.png b/v3/internal/templates/lit-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/lit-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/lit-ts/build/icons.icns b/v3/internal/templates/lit-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/lit-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/lit-ts/frontend/.gitignore b/v3/internal/templates/lit-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/lit-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/lit-ts/frontend/index.html b/v3/internal/templates/lit-ts/frontend/index.html deleted file mode 100644 index ca539730d..000000000 --- a/v3/internal/templates/lit-ts/frontend/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - Wails + Lit + TS - - - - - -

Wails + Lit

-
- - diff --git a/v3/internal/templates/lit-ts/frontend/package.json b/v3/internal/templates/lit-ts/frontend/package.json deleted file mode 100644 index 42a86bd4b..000000000 --- a/v3/internal/templates/lit-ts/frontend/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "main": "dist/my-element.es.js", - "exports": { - ".": "./dist/my-element.es.js" - }, - "types": "types/my-element.d.ts", - "files": [ - "dist", - "types" - ], - "scripts": { - "dev": "vite", - "build": "tsc && vite build" - }, - "dependencies": { - "lit": "^2.4.1" - }, - "devDependencies": { - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/lit-ts/frontend/public/wails.png b/v3/internal/templates/lit-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/lit-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg b/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg deleted file mode 100644 index 4a9c1fe66..000000000 --- a/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/lit-ts/frontend/src/index.css b/v3/internal/templates/lit-ts/frontend/src/index.css deleted file mode 100644 index d39ac2e34..000000000 --- a/v3/internal/templates/lit-ts/frontend/src/index.css +++ /dev/null @@ -1,40 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } -} diff --git a/v3/internal/templates/lit-ts/frontend/src/my-element.ts b/v3/internal/templates/lit-ts/frontend/src/my-element.ts deleted file mode 100644 index 9f1c76e89..000000000 --- a/v3/internal/templates/lit-ts/frontend/src/my-element.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { LitElement, css, html } from 'lit' -import { customElement, property } from 'lit/decorators.js' -import litLogo from './assets/lit.svg' - -/** - * An example element. - * - * @slot - This element has a slot - * @csspart button - The button - */ -@customElement('my-element') -export class MyElement extends LitElement { - /** - * Copy for the read the docs hint. - */ - @property() - docsHint = 'Click on the Wails and Lit logos to learn more' - - /** - * The number of times the button has been clicked. - */ - @property({ type: Number }) - count = 0 - - render() { - return html` - - -
- -
-

${this.docsHint}

- ` - } - - private _onClick() { - this.count++ - } - - static styles = css` - :host { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; - } - - .logo { - height: 6em; - padding: 1.5em; - will-change: filter; - } - .logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); - } - .logo.lit:hover { - filter: drop-shadow(0 0 2em #325cffaa); - } - - .card { - padding: 2em; - } - - .read-the-docs { - color: #888; - } - - h1 { - font-size: 3.2em; - line-height: 1.1; - } - - a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; - } - a:hover { - color: #535bf2; - } - - button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; - } - button:hover { - border-color: #646cff; - } - button:focus, - button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; - } - - @media (prefers-color-scheme: light) { - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } - } - ` -} - -declare global { - interface HTMLElementTagNameMap { - 'my-element': MyElement - } -} diff --git a/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/lit-ts/frontend/tsconfig.json b/v3/internal/templates/lit-ts/frontend/tsconfig.json deleted file mode 100644 index b080b2b2c..000000000 --- a/v3/internal/templates/lit-ts/frontend/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "declaration": true, - "emitDeclarationOnly": true, - "outDir": "./types", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "Node", - "isolatedModules": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "useDefineForClassFields": false, - "skipLibCheck": true - }, - "include": ["src/**/*.ts"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/lit-ts/frontend/tsconfig.node.json b/v3/internal/templates/lit-ts/frontend/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/v3/internal/templates/lit-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/lit-ts/frontend/vite.config.ts b/v3/internal/templates/lit-ts/frontend/vite.config.ts deleted file mode 100644 index fe69491e3..000000000 --- a/v3/internal/templates/lit-ts/frontend/vite.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'vite' - -// https://vitejs.dev/config/ -export default defineConfig({ - build: { - lib: { - entry: 'src/my-element.ts', - formats: ['es'], - }, - rollupOptions: { - external: /^lit/, - }, - }, -}) diff --git a/v3/internal/templates/lit-ts/go.mod.tmpl b/v3/internal/templates/lit-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/lit-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/lit-ts/go.sum.tmpl b/v3/internal/templates/lit-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/lit-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/lit-ts/main.go.tmpl b/v3/internal/templates/lit-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/lit-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/lit/Taskfile.tmpl.yml b/v3/internal/templates/lit/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/lit/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/lit/build/Info.dev.plist.tmpl b/v3/internal/templates/lit/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/lit/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/lit/build/Info.plist.tmpl b/v3/internal/templates/lit/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/lit/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/lit/build/appicon.png b/v3/internal/templates/lit/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/lit/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/lit/build/icons.icns b/v3/internal/templates/lit/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/lit/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/lit/frontend/.gitignore b/v3/internal/templates/lit/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/lit/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/lit/frontend/index.html b/v3/internal/templates/lit/frontend/index.html deleted file mode 100644 index 9da997ad7..000000000 --- a/v3/internal/templates/lit/frontend/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - Wails + Lit - - - - - -

Wails + Lit

-
- - diff --git a/v3/internal/templates/lit/frontend/package.json b/v3/internal/templates/lit/frontend/package.json deleted file mode 100644 index 1c4979def..000000000 --- a/v3/internal/templates/lit/frontend/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "main": "dist/my-element.es.js", - "exports": { - ".": "./dist/my-element.es.js" - }, - "files": [ - "dist" - ], - "scripts": { - "dev": "vite", - "build": "vite build" - }, - "dependencies": { - "lit": "^2.4.1" - }, - "devDependencies": { - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/lit/frontend/public/wails.png b/v3/internal/templates/lit/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/lit/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/lit/frontend/src/assets/lit.svg b/v3/internal/templates/lit/frontend/src/assets/lit.svg deleted file mode 100644 index 4a9c1fe66..000000000 --- a/v3/internal/templates/lit/frontend/src/assets/lit.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/lit/frontend/src/index.css b/v3/internal/templates/lit/frontend/src/index.css deleted file mode 100644 index b52d4c639..000000000 --- a/v3/internal/templates/lit/frontend/src/index.css +++ /dev/null @@ -1,31 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } -} diff --git a/v3/internal/templates/lit/frontend/src/my-element.js b/v3/internal/templates/lit/frontend/src/my-element.js deleted file mode 100644 index 515f8fa58..000000000 --- a/v3/internal/templates/lit/frontend/src/my-element.js +++ /dev/null @@ -1,129 +0,0 @@ -import { LitElement, css, html } from 'lit' -import litLogo from './assets/lit.svg' - -/** - * An example element. - * - * @slot - This element has a slot - * @csspart button - The button - */ -export class MyElement extends LitElement { - static get properties() { - return { - /** - * Copy for the read the docs hint. - */ - docsHint: { type: String }, - - /** - * The number of times the button has been clicked. - */ - count: { type: Number }, - } - } - - constructor() { - super() - this.docsHint = 'Click on the Wails and Lit logos to learn more' - this.count = 0 - } - - render() { - return html` - - -
- -
-

${this.docsHint}

- ` - } - - _onClick() { - this.count++ - } - - static get styles() { - return css` - :host { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; - } - - .logo { - height: 6em; - padding: 1.5em; - will-change: filter; - } - .logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); - } - .logo.lit:hover { - filter: drop-shadow(0 0 2em #325cffaa); - } - - .card { - padding: 2em; - } - - .read-the-docs { - color: #888; - } - - a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; - } - a:hover { - color: #535bf2; - } - - h1 { - font-size: 3.2em; - line-height: 1.1; - } - - button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; - } - button:hover { - border-color: #646cff; - } - button:focus, - button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; - } - - @media (prefers-color-scheme: light) { - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } - } - ` - } -} - -window.customElements.define('my-element', MyElement) diff --git a/v3/internal/templates/lit/frontend/vite.config.js b/v3/internal/templates/lit/frontend/vite.config.js deleted file mode 100644 index 3847c1f38..000000000 --- a/v3/internal/templates/lit/frontend/vite.config.js +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'vite' - -// https://vitejs.dev/config/ -export default defineConfig({ - build: { - lib: { - entry: 'src/my-element.js', - formats: ['es'], - }, - rollupOptions: { - external: /^lit/, - }, - }, -}) diff --git a/v3/internal/templates/lit/go.mod.tmpl b/v3/internal/templates/lit/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/lit/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/lit/go.sum.tmpl b/v3/internal/templates/lit/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/lit/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/lit/main.go.tmpl b/v3/internal/templates/lit/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/lit/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml b/v3/internal/templates/preact-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/build/Info.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/preact-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/build/appicon.png b/v3/internal/templates/preact-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/preact-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/preact-ts/build/icons.icns b/v3/internal/templates/preact-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/preact-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/preact-ts/frontend/.gitignore b/v3/internal/templates/preact-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/preact-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/preact-ts/frontend/index.html b/v3/internal/templates/preact-ts/frontend/index.html deleted file mode 100644 index 9270ebd4e..000000000 --- a/v3/internal/templates/preact-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Preact + TS - - -
- - - diff --git a/v3/internal/templates/preact-ts/frontend/package.json b/v3/internal/templates/preact-ts/frontend/package.json deleted file mode 100644 index cab9db654..000000000 --- a/v3/internal/templates/preact-ts/frontend/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "preact": "^10.11.3" - }, - "devDependencies": { - "@preact/preset-vite": "^2.4.0", - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/frontend/public/wails.png b/v3/internal/templates/preact-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/preact-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/preact-ts/frontend/src/app.css b/v3/internal/templates/preact-ts/frontend/src/app.css deleted file mode 100644 index 088ed3ace..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/app.css +++ /dev/null @@ -1,25 +0,0 @@ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.preact:hover { - filter: drop-shadow(0 0 2em #673ab8aa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/preact-ts/frontend/src/app.tsx b/v3/internal/templates/preact-ts/frontend/src/app.tsx deleted file mode 100644 index ccde5b9f3..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/app.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useState } from 'preact/hooks' -import preactLogo from './assets/preact.svg' -import './app.css' - -export function App() { - const [count, setCount] = useState(0) - - return ( - <> - -

Vite + Preact

-
- -

- Edit src/app.tsx and save to test HMR -

-
-

- Click on the Vite and Preact logos to learn more -

- - ) -} diff --git a/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg b/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg deleted file mode 100644 index 908f17def..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/preact-ts/frontend/src/index.css b/v3/internal/templates/preact-ts/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/preact-ts/frontend/src/main.tsx b/v3/internal/templates/preact-ts/frontend/src/main.tsx deleted file mode 100644 index e0ce3e998..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/main.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { render } from 'preact' -import { App } from './app' -import './index.css' - -render(, document.getElementById('app') as HTMLElement) diff --git a/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/preact-ts/frontend/tsconfig.json b/v3/internal/templates/preact-ts/frontend/tsconfig.json deleted file mode 100644 index 9c1b1e0aa..000000000 --- a/v3/internal/templates/preact-ts/frontend/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - "jsxImportSource": "preact" - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/preact-ts/frontend/tsconfig.node.json b/v3/internal/templates/preact-ts/frontend/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/v3/internal/templates/preact-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/preact-ts/frontend/vite.config.ts b/v3/internal/templates/preact-ts/frontend/vite.config.ts deleted file mode 100644 index 29b326faf..000000000 --- a/v3/internal/templates/preact-ts/frontend/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import preact from '@preact/preset-vite' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [preact()], -}) diff --git a/v3/internal/templates/preact-ts/go.mod.tmpl b/v3/internal/templates/preact-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/preact-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/preact-ts/go.sum.tmpl b/v3/internal/templates/preact-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/preact-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/preact-ts/main.go.tmpl b/v3/internal/templates/preact-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/preact-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/preact/Taskfile.tmpl.yml b/v3/internal/templates/preact/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/preact/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/preact/build/Info.dev.plist.tmpl b/v3/internal/templates/preact/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/preact/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/preact/build/Info.plist.tmpl b/v3/internal/templates/preact/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/preact/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/preact/build/appicon.png b/v3/internal/templates/preact/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/preact/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/preact/build/icons.icns b/v3/internal/templates/preact/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/preact/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/preact/frontend/.gitignore b/v3/internal/templates/preact/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/preact/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/preact/frontend/index.html b/v3/internal/templates/preact/frontend/index.html deleted file mode 100644 index 139931e70..000000000 --- a/v3/internal/templates/preact/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Preact - - -
- - - diff --git a/v3/internal/templates/preact/frontend/package.json b/v3/internal/templates/preact/frontend/package.json deleted file mode 100644 index f44069b31..000000000 --- a/v3/internal/templates/preact/frontend/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "preact": "^10.11.3" - }, - "devDependencies": { - "@preact/preset-vite": "^2.4.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/preact/frontend/public/wails.png b/v3/internal/templates/preact/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/preact/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/preact/frontend/src/app.css b/v3/internal/templates/preact/frontend/src/app.css deleted file mode 100644 index 088ed3ace..000000000 --- a/v3/internal/templates/preact/frontend/src/app.css +++ /dev/null @@ -1,25 +0,0 @@ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.preact:hover { - filter: drop-shadow(0 0 2em #673ab8aa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/preact/frontend/src/app.jsx b/v3/internal/templates/preact/frontend/src/app.jsx deleted file mode 100644 index 2679f4886..000000000 --- a/v3/internal/templates/preact/frontend/src/app.jsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useState } from 'preact/hooks' -import preactLogo from './assets/preact.svg' -import './app.css' - -export function App() { - const [count, setCount] = useState(0) - - return ( - <> - -

Vite + Preact

-
- -

- Edit src/app.jsx and save to test HMR -

-
-

- Click on the Vite and Preact logos to learn more -

- - ) -} diff --git a/v3/internal/templates/preact/frontend/src/assets/preact.svg b/v3/internal/templates/preact/frontend/src/assets/preact.svg deleted file mode 100644 index 908f17def..000000000 --- a/v3/internal/templates/preact/frontend/src/assets/preact.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/preact/frontend/src/index.css b/v3/internal/templates/preact/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/preact/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/preact/frontend/src/main.jsx b/v3/internal/templates/preact/frontend/src/main.jsx deleted file mode 100644 index be3fbce92..000000000 --- a/v3/internal/templates/preact/frontend/src/main.jsx +++ /dev/null @@ -1,5 +0,0 @@ -import { render } from 'preact' -import { App } from './app' -import './index.css' - -render(, document.getElementById('app')) diff --git a/v3/internal/templates/preact/frontend/vite.config.js b/v3/internal/templates/preact/frontend/vite.config.js deleted file mode 100644 index 29b326faf..000000000 --- a/v3/internal/templates/preact/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import preact from '@preact/preset-vite' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [preact()], -}) diff --git a/v3/internal/templates/preact/go.mod.tmpl b/v3/internal/templates/preact/go.mod.tmpl deleted file mode 100644 index 5fbc49867..000000000 --- a/v3/internal/templates/preact/go.mod.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/imdario/mergo v0.3.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/preact/go.sum.tmpl b/v3/internal/templates/preact/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/preact/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/preact/main.go.tmpl b/v3/internal/templates/preact/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/preact/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/build/appicon.png b/v3/internal/templates/react-swc-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-swc-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-swc-ts/build/icons.icns b/v3/internal/templates/react-swc-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-swc-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-swc-ts/frontend/.gitignore b/v3/internal/templates/react-swc-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/react-swc-ts/frontend/index.html b/v3/internal/templates/react-swc-ts/frontend/index.html deleted file mode 100644 index 28868c572..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React + TS - - -
- - - diff --git a/v3/internal/templates/react-swc-ts/frontend/package.json b/v3/internal/templates/react-swc-ts/frontend/package.json deleted file mode 100644 index 26dc1bca8..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.9", - "@vitejs/plugin-react-swc": "^3.0.0", - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/frontend/public/wails.png b/v3/internal/templates/react-swc-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/react-swc-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/react-swc-ts/frontend/src/App.css b/v3/internal/templates/react-swc-ts/frontend/src/App.css deleted file mode 100644 index 2c5e2ef5c..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/App.css +++ /dev/null @@ -1,41 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/react-swc-ts/frontend/src/App.tsx b/v3/internal/templates/react-swc-ts/frontend/src/App.tsx deleted file mode 100644 index cd201360b..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/App.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import './App.css' - -function App() { - const [count, setCount] = useState(0) - - return ( -
- -

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

-
- ) -} - -export default App diff --git a/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg b/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9bb..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/react-swc-ts/frontend/src/index.css b/v3/internal/templates/react-swc-ts/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/react-swc-ts/frontend/src/main.tsx b/v3/internal/templates/react-swc-ts/frontend/src/main.tsx deleted file mode 100644 index 791f139e2..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/main.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App' -import './index.css' - -ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - , -) diff --git a/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/react-swc-ts/frontend/tsconfig.json b/v3/internal/templates/react-swc-ts/frontend/tsconfig.json deleted file mode 100644 index 3d0a51a86..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json b/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/react-swc-ts/frontend/vite.config.ts b/v3/internal/templates/react-swc-ts/frontend/vite.config.ts deleted file mode 100644 index 861b04b35..000000000 --- a/v3/internal/templates/react-swc-ts/frontend/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}) diff --git a/v3/internal/templates/react-swc-ts/go.mod.tmpl b/v3/internal/templates/react-swc-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/react-swc-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/react-swc-ts/go.sum.tmpl b/v3/internal/templates/react-swc-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-swc-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-swc-ts/main.go.tmpl b/v3/internal/templates/react-swc-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/react-swc-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-swc/Taskfile.tmpl.yml b/v3/internal/templates/react-swc/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/react-swc/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc/build/Info.plist.tmpl b/v3/internal/templates/react-swc/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-swc/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-swc/build/appicon.png b/v3/internal/templates/react-swc/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-swc/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-swc/build/icons.icns b/v3/internal/templates/react-swc/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-swc/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-swc/frontend/.gitignore b/v3/internal/templates/react-swc/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/react-swc/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/react-swc/frontend/index.html b/v3/internal/templates/react-swc/frontend/index.html deleted file mode 100644 index fe5530dd4..000000000 --- a/v3/internal/templates/react-swc/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React - - -
- - - diff --git a/v3/internal/templates/react-swc/frontend/package.json b/v3/internal/templates/react-swc/frontend/package.json deleted file mode 100644 index 6583b9c4b..000000000 --- a/v3/internal/templates/react-swc/frontend/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.9", - "@vitejs/plugin-react-swc": "^3.0.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/react-swc/frontend/public/wails.png b/v3/internal/templates/react-swc/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/react-swc/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/react-swc/frontend/src/App.css b/v3/internal/templates/react-swc/frontend/src/App.css deleted file mode 100644 index 2c5e2ef5c..000000000 --- a/v3/internal/templates/react-swc/frontend/src/App.css +++ /dev/null @@ -1,41 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/react-swc/frontend/src/App.jsx b/v3/internal/templates/react-swc/frontend/src/App.jsx deleted file mode 100644 index ef0adc0d5..000000000 --- a/v3/internal/templates/react-swc/frontend/src/App.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import './App.css' - -function App() { - const [count, setCount] = useState(0) - - return ( -
- -

Vite + React

-
- -

- Edit src/App.jsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

-
- ) -} - -export default App diff --git a/v3/internal/templates/react-swc/frontend/src/assets/react.svg b/v3/internal/templates/react-swc/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9bb..000000000 --- a/v3/internal/templates/react-swc/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/react-swc/frontend/src/index.css b/v3/internal/templates/react-swc/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/react-swc/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/react-swc/frontend/src/main.jsx b/v3/internal/templates/react-swc/frontend/src/main.jsx deleted file mode 100644 index 5cc599199..000000000 --- a/v3/internal/templates/react-swc/frontend/src/main.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App' -import './index.css' - -ReactDOM.createRoot(document.getElementById('root')).render( - - - , -) diff --git a/v3/internal/templates/react-swc/frontend/vite.config.js b/v3/internal/templates/react-swc/frontend/vite.config.js deleted file mode 100644 index 861b04b35..000000000 --- a/v3/internal/templates/react-swc/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}) diff --git a/v3/internal/templates/react-swc/go.mod.tmpl b/v3/internal/templates/react-swc/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/react-swc/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/react-swc/go.sum.tmpl b/v3/internal/templates/react-swc/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-swc/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-swc/main.go.tmpl b/v3/internal/templates/react-swc/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/react-swc/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/react-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react-ts/build/Info.plist.tmpl b/v3/internal/templates/react-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react-ts/build/appicon.png b/v3/internal/templates/react-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react-ts/build/icons.icns b/v3/internal/templates/react-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react-ts/frontend/.gitignore b/v3/internal/templates/react-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/react-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/react-ts/frontend/index.html b/v3/internal/templates/react-ts/frontend/index.html deleted file mode 100644 index 28868c572..000000000 --- a/v3/internal/templates/react-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React + TS - - -
- - - diff --git a/v3/internal/templates/react-ts/frontend/package.json b/v3/internal/templates/react-ts/frontend/package.json deleted file mode 100644 index e846a02c1..000000000 --- a/v3/internal/templates/react-ts/frontend/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.9", - "@vitejs/plugin-react": "^3.0.0", - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/react-ts/frontend/public/wails.png b/v3/internal/templates/react-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/react-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/react-ts/frontend/src/App.css b/v3/internal/templates/react-ts/frontend/src/App.css deleted file mode 100644 index 2c5e2ef5c..000000000 --- a/v3/internal/templates/react-ts/frontend/src/App.css +++ /dev/null @@ -1,41 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/react-ts/frontend/src/App.tsx b/v3/internal/templates/react-ts/frontend/src/App.tsx deleted file mode 100644 index cd201360b..000000000 --- a/v3/internal/templates/react-ts/frontend/src/App.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import './App.css' - -function App() { - const [count, setCount] = useState(0) - - return ( -
- -

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

-
- ) -} - -export default App diff --git a/v3/internal/templates/react-ts/frontend/src/assets/react.svg b/v3/internal/templates/react-ts/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9bb..000000000 --- a/v3/internal/templates/react-ts/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/react-ts/frontend/src/index.css b/v3/internal/templates/react-ts/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/react-ts/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/react-ts/frontend/src/main.tsx b/v3/internal/templates/react-ts/frontend/src/main.tsx deleted file mode 100644 index 791f139e2..000000000 --- a/v3/internal/templates/react-ts/frontend/src/main.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App' -import './index.css' - -ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - , -) diff --git a/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/react-ts/frontend/tsconfig.json b/v3/internal/templates/react-ts/frontend/tsconfig.json deleted file mode 100644 index 3d0a51a86..000000000 --- a/v3/internal/templates/react-ts/frontend/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/react-ts/frontend/tsconfig.node.json b/v3/internal/templates/react-ts/frontend/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/v3/internal/templates/react-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/react-ts/frontend/vite.config.ts b/v3/internal/templates/react-ts/frontend/vite.config.ts deleted file mode 100644 index 5a33944a9..000000000 --- a/v3/internal/templates/react-ts/frontend/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}) diff --git a/v3/internal/templates/react-ts/go.mod.tmpl b/v3/internal/templates/react-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/react-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/react-ts/go.sum.tmpl b/v3/internal/templates/react-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react-ts/main.go.tmpl b/v3/internal/templates/react-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/react-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/react/Taskfile.tmpl.yml b/v3/internal/templates/react/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/react/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/react/build/Info.dev.plist.tmpl b/v3/internal/templates/react/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/react/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/react/build/Info.plist.tmpl b/v3/internal/templates/react/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/react/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/react/build/appicon.png b/v3/internal/templates/react/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/react/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/react/build/icons.icns b/v3/internal/templates/react/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/react/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/react/frontend/.gitignore b/v3/internal/templates/react/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/react/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/react/frontend/index.html b/v3/internal/templates/react/frontend/index.html deleted file mode 100644 index fe5530dd4..000000000 --- a/v3/internal/templates/react/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + React - - -
- - - diff --git a/v3/internal/templates/react/frontend/package.json b/v3/internal/templates/react/frontend/package.json deleted file mode 100644 index 2371d17c8..000000000 --- a/v3/internal/templates/react/frontend/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.9", - "@vitejs/plugin-react": "^3.0.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/react/frontend/public/wails.png b/v3/internal/templates/react/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/react/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/react/frontend/src/App.css b/v3/internal/templates/react/frontend/src/App.css deleted file mode 100644 index 2c5e2ef5c..000000000 --- a/v3/internal/templates/react/frontend/src/App.css +++ /dev/null @@ -1,41 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/v3/internal/templates/react/frontend/src/App.jsx b/v3/internal/templates/react/frontend/src/App.jsx deleted file mode 100644 index ef0adc0d5..000000000 --- a/v3/internal/templates/react/frontend/src/App.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import './App.css' - -function App() { - const [count, setCount] = useState(0) - - return ( -
- -

Vite + React

-
- -

- Edit src/App.jsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

-
- ) -} - -export default App diff --git a/v3/internal/templates/react/frontend/src/assets/react.svg b/v3/internal/templates/react/frontend/src/assets/react.svg deleted file mode 100644 index 6c87de9bb..000000000 --- a/v3/internal/templates/react/frontend/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/react/frontend/src/index.css b/v3/internal/templates/react/frontend/src/index.css deleted file mode 100644 index 917888c1d..000000000 --- a/v3/internal/templates/react/frontend/src/index.css +++ /dev/null @@ -1,70 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/react/frontend/src/main.jsx b/v3/internal/templates/react/frontend/src/main.jsx deleted file mode 100644 index 5cc599199..000000000 --- a/v3/internal/templates/react/frontend/src/main.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App' -import './index.css' - -ReactDOM.createRoot(document.getElementById('root')).render( - - - , -) diff --git a/v3/internal/templates/react/frontend/vite.config.js b/v3/internal/templates/react/frontend/vite.config.js deleted file mode 100644 index 5a33944a9..000000000 --- a/v3/internal/templates/react/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -}) diff --git a/v3/internal/templates/react/go.mod.tmpl b/v3/internal/templates/react/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/react/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/react/go.sum.tmpl b/v3/internal/templates/react/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/react/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/react/main.go.tmpl b/v3/internal/templates/react/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/react/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml b/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/build/appicon.png b/v3/internal/templates/svelte-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/svelte-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/svelte-ts/build/icons.icns b/v3/internal/templates/svelte-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/svelte-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/svelte-ts/frontend/.gitignore b/v3/internal/templates/svelte-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/svelte-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json b/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json deleted file mode 100644 index bdef82015..000000000 --- a/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["svelte.svelte-vscode"] -} diff --git a/v3/internal/templates/svelte-ts/frontend/README.md b/v3/internal/templates/svelte-ts/frontend/README.md deleted file mode 100644 index e6cd94fce..000000000 --- a/v3/internal/templates/svelte-ts/frontend/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Svelte + TS + Vite - -This template should help get you started developing with Svelte and TypeScript in Vite. - -## Recommended IDE Setup - -[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). - -## Need an official Svelte framework? - -Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more. - -## Technical considerations - -**Why use this over SvelteKit?** - -- It brings its own routing solution which might not be preferable for some users. -- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app. - -This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project. - -Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate. - -**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?** - -Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information. - -**Why include `.vscode/extensions.json`?** - -Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project. - -**Why enable `allowJs` in the TS template?** - -While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant. - -**Why is HMR not preserving my local component state?** - -HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr). - -If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR. - -```ts -// store.ts -// An extremely simple external store -import { writable } from 'svelte/store' -export default writable(0) -``` diff --git a/v3/internal/templates/svelte-ts/frontend/index.html b/v3/internal/templates/svelte-ts/frontend/index.html deleted file mode 100644 index a7eaac78d..000000000 --- a/v3/internal/templates/svelte-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Svelte + TS - - -
- - - diff --git a/v3/internal/templates/svelte-ts/frontend/package.json b/v3/internal/templates/svelte-ts/frontend/package.json deleted file mode 100644 index 222683e0d..000000000 --- a/v3/internal/templates/svelte-ts/frontend/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-check --tsconfig ./tsconfig.json" - }, - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.0.0", - "@tsconfig/svelte": "^3.0.0", - "svelte": "^3.54.0", - "svelte-check": "^2.10.0", - "tslib": "^2.4.1", - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/frontend/public/wails.png b/v3/internal/templates/svelte-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/svelte-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/svelte-ts/frontend/src/App.svelte b/v3/internal/templates/svelte-ts/frontend/src/App.svelte deleted file mode 100644 index 1e9dc0394..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/App.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -
- -

Vite + Svelte

- -
- -
- -

- Check out SvelteKit, the official Svelte app framework powered by Vite! -

- -

- Click on the Vite and Svelte logos to learn more -

-
- - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/frontend/src/app.css b/v3/internal/templates/svelte-ts/frontend/src/app.css deleted file mode 100644 index bcc7233dd..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/app.css +++ /dev/null @@ -1,81 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg b/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg deleted file mode 100644 index c5e08481f..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte b/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte deleted file mode 100644 index 979b4dfc9..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/v3/internal/templates/svelte-ts/frontend/src/main.ts b/v3/internal/templates/svelte-ts/frontend/src/main.ts deleted file mode 100644 index 8a909a15a..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -import './app.css' -import App from './App.svelte' - -const app = new App({ - target: document.getElementById('app'), -}) - -export default app diff --git a/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 4078e7476..000000000 --- a/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/v3/internal/templates/svelte-ts/frontend/svelte.config.js b/v3/internal/templates/svelte-ts/frontend/svelte.config.js deleted file mode 100644 index 7a2b764a6..000000000 --- a/v3/internal/templates/svelte-ts/frontend/svelte.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { wailsPreprocess } from '@sveltejs/wails-plugin-svelte' - -export default { - // Consult https://svelte.dev/docs#compile-time-svelte-preprocess - // for more information about preprocessors - preprocess: wailsPreprocess(), -} diff --git a/v3/internal/templates/svelte-ts/frontend/tsconfig.json b/v3/internal/templates/svelte-ts/frontend/tsconfig.json deleted file mode 100644 index c4e1c5fe6..000000000 --- a/v3/internal/templates/svelte-ts/frontend/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "@tsconfig/svelte/tsconfig.json", - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "resolveJsonModule": true, - /** - * Typecheck JS in `.svelte` and `.js` files by default. - * Disable checkJs if you'd like to use dynamic types in JS. - * Note that setting allowJs false does not prevent the use - * of JS in `.svelte` files. - */ - "allowJs": true, - "checkJs": true, - "isolatedModules": true - }, - "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json b/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json deleted file mode 100644 index 65dbdb96a..000000000 --- a/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node" - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/svelte-ts/frontend/vite.config.ts b/v3/internal/templates/svelte-ts/frontend/vite.config.ts deleted file mode 100644 index d70196943..000000000 --- a/v3/internal/templates/svelte-ts/frontend/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import { svelte } from '@sveltejs/vite-plugin-svelte' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [svelte()], -}) diff --git a/v3/internal/templates/svelte-ts/go.mod.tmpl b/v3/internal/templates/svelte-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/svelte-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/svelte-ts/go.sum.tmpl b/v3/internal/templates/svelte-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/svelte-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/svelte-ts/main.go.tmpl b/v3/internal/templates/svelte-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/svelte-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/svelte/Taskfile.tmpl.yml b/v3/internal/templates/svelte/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/svelte/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/svelte/build/Info.plist.tmpl b/v3/internal/templates/svelte/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/svelte/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/svelte/build/appicon.png b/v3/internal/templates/svelte/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/svelte/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/svelte/build/icons.icns b/v3/internal/templates/svelte/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/svelte/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/svelte/frontend/.gitignore b/v3/internal/templates/svelte/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/svelte/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/svelte/frontend/.vscode/extensions.json b/v3/internal/templates/svelte/frontend/.vscode/extensions.json deleted file mode 100644 index bdef82015..000000000 --- a/v3/internal/templates/svelte/frontend/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["svelte.svelte-vscode"] -} diff --git a/v3/internal/templates/svelte/frontend/README.md b/v3/internal/templates/svelte/frontend/README.md deleted file mode 100644 index fd6a7082f..000000000 --- a/v3/internal/templates/svelte/frontend/README.md +++ /dev/null @@ -1 +0,0 @@ -# Wails + Svelte \ No newline at end of file diff --git a/v3/internal/templates/svelte/frontend/index.html b/v3/internal/templates/svelte/frontend/index.html deleted file mode 100644 index 1ea50f904..000000000 --- a/v3/internal/templates/svelte/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + Svelte - - -
- - - diff --git a/v3/internal/templates/svelte/frontend/jsconfig.json b/v3/internal/templates/svelte/frontend/jsconfig.json deleted file mode 100644 index e596c5823..000000000 --- a/v3/internal/templates/svelte/frontend/jsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "Node", - "target": "ESNext", - "module": "ESNext", - /** - * svelte-preprocess cannot figure out whether you have - * a value or a type, so tell TypeScript to enforce using - * `import type` instead of `import` for Types. - */ - "importsNotUsedAsValues": "error", - "isolatedModules": true, - "resolveJsonModule": true, - /** - * To have warnings / errors of the Svelte compiler at the - * correct position, enable source maps by default. - */ - "sourceMap": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - /** - * Typecheck JS in `.svelte` and `.js` files by default. - * Disable this if you'd like to use dynamic types. - */ - "checkJs": true - }, - /** - * Use global.d.ts instead of compilerOptions.types - * to avoid limiting type declarations. - */ - "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] -} diff --git a/v3/internal/templates/svelte/frontend/package.json b/v3/internal/templates/svelte/frontend/package.json deleted file mode 100644 index 2e166feea..000000000 --- a/v3/internal/templates/svelte/frontend/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^2.0.0", - "svelte": "^3.54.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/svelte/frontend/public/wails.png b/v3/internal/templates/svelte/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/svelte/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/svelte/frontend/src/App.svelte b/v3/internal/templates/svelte/frontend/src/App.svelte deleted file mode 100644 index 539c395dd..000000000 --- a/v3/internal/templates/svelte/frontend/src/App.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -
- -

Wails + Svelte

- -
- -
- -

- Check out SvelteKit, the official Svelte app framework powered by Vite! -

- -

- Click on the Wails and Svelte logos to learn more -

-
- - diff --git a/v3/internal/templates/svelte/frontend/src/app.css b/v3/internal/templates/svelte/frontend/src/app.css deleted file mode 100644 index bcc7233dd..000000000 --- a/v3/internal/templates/svelte/frontend/src/app.css +++ /dev/null @@ -1,81 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/svelte/frontend/src/assets/svelte.svg b/v3/internal/templates/svelte/frontend/src/assets/svelte.svg deleted file mode 100644 index c5e08481f..000000000 --- a/v3/internal/templates/svelte/frontend/src/assets/svelte.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte b/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte deleted file mode 100644 index e45f90310..000000000 --- a/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/v3/internal/templates/svelte/frontend/src/main.js b/v3/internal/templates/svelte/frontend/src/main.js deleted file mode 100644 index 8a909a15a..000000000 --- a/v3/internal/templates/svelte/frontend/src/main.js +++ /dev/null @@ -1,8 +0,0 @@ -import './app.css' -import App from './App.svelte' - -const app = new App({ - target: document.getElementById('app'), -}) - -export default app diff --git a/v3/internal/templates/svelte/frontend/src/vite-env.d.ts b/v3/internal/templates/svelte/frontend/src/vite-env.d.ts deleted file mode 100644 index 4078e7476..000000000 --- a/v3/internal/templates/svelte/frontend/src/vite-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/v3/internal/templates/svelte/frontend/vite.config.js b/v3/internal/templates/svelte/frontend/vite.config.js deleted file mode 100644 index d70196943..000000000 --- a/v3/internal/templates/svelte/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import { svelte } from '@sveltejs/vite-plugin-svelte' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [svelte()], -}) diff --git a/v3/internal/templates/svelte/go.mod.tmpl b/v3/internal/templates/svelte/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/svelte/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/svelte/go.sum.tmpl b/v3/internal/templates/svelte/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/svelte/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/svelte/main.go.tmpl b/v3/internal/templates/svelte/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/svelte/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/templates.go b/v3/internal/templates/templates.go deleted file mode 100644 index e0da5a48b..000000000 --- a/v3/internal/templates/templates.go +++ /dev/null @@ -1,177 +0,0 @@ -package templates - -import ( - "embed" - "fmt" - "github.com/wailsapp/wails/v3/internal/debug" - "io/fs" - "os" - - "github.com/wailsapp/wails/v3/internal/flags" - - "github.com/leaanthony/gosod" - - "github.com/samber/lo" -) - -//go:embed lit -var lit embed.FS - -//go:embed lit-ts -var litTS embed.FS - -//go:embed vue -var vue embed.FS - -//go:embed vue-ts -var vueTS embed.FS - -//go:embed react -var react embed.FS - -//go:embed react-ts -var reactTS embed.FS - -//go:embed react-swc -var reactSWC embed.FS - -//go:embed react-swc-ts -var reactSWCTS embed.FS - -//go:embed svelte -var svelte embed.FS - -//go:embed svelte-ts -var svelteTS embed.FS - -//go:embed preact -var preact embed.FS - -//go:embed preact-ts -var preactTS embed.FS - -//go:embed vanilla -var vanilla embed.FS - -//go:embed vanilla-ts -var vanillaTS embed.FS - -type TemplateData struct { - Name string - Description string - FS embed.FS -} - -var defaultTemplates = []TemplateData{ - { - Name: "lit", - Description: "Template using Lit Web Components: https://lit.dev", - FS: lit, - }, - { - Name: "lit-ts", - Description: "Template using Lit Web Components (TypeScript) : https://lit.dev", - FS: litTS, - }, - { - Name: "vue", - Description: "Template using Vue: https://vuejs.org", - FS: vue, - }, - { - Name: "vue-ts", - Description: "Template using Vue (TypeScript): https://vuejs.org", - FS: vueTS, - }, - { - Name: "react", - Description: "Template using React: https://reactjs.org", - FS: react, - }, - { - Name: "react-ts", - Description: "Template using React (TypeScript): https://reactjs.org", - FS: reactTS, - }, - { - Name: "react-swc", - Description: "Template using React with SWC: https://reactjs.org & https://swc.rs", - FS: reactSWC, - }, - { - Name: "react-swc-ts", - Description: "Template using React with SWC (TypeScript): https://reactjs.org & https://swc.rs", - FS: reactSWCTS, - }, - { - Name: "svelte", - Description: "Template using Svelte: https://svelte.dev", - FS: svelte, - }, - { - Name: "svelte-ts", - Description: "Template using Svelte (TypeScript): https://svelte.dev", - FS: svelteTS, - }, - { - Name: "preact", - Description: "Template using Preact: https://preactjs.com", - FS: preact, - }, - { - Name: "preact-ts", - Description: "Template using Preact (TypeScript): https://preactjs.com", - FS: preactTS, - }, - { - Name: "vanilla", - Description: "Template using Vanilla JS", - FS: vanilla, - }, - { - Name: "vanilla-ts", - Description: "Template using Vanilla JS (TypeScript)", - FS: vanillaTS, - }, -} - -func ValidTemplateName(name string) bool { - return lo.ContainsBy(defaultTemplates, func(template TemplateData) bool { - return template.Name == name - }) -} - -func GetDefaultTemplates() []TemplateData { - return defaultTemplates -} - -type TemplateOptions struct { - *flags.Init - LocalModulePath string -} - -func Install(options *flags.Init) error { - - templateData := TemplateOptions{ - options, - debug.LocalModulePath, - } - template, found := lo.Find(defaultTemplates, func(template TemplateData) bool { - return template.Name == options.TemplateName - }) - if !found { - return fmt.Errorf("template '%s' not found", options.TemplateName) - } - - if options.ProjectDir == "." || options.ProjectDir == "" { - templateData.ProjectDir = lo.Must(os.Getwd()) - } - templateData.ProjectDir = fmt.Sprintf("%s/%s", options.ProjectDir, options.ProjectName) - fmt.Printf("Installing template '%s' into '%s'\n", options.TemplateName, options.ProjectDir) - tfs, err := fs.Sub(template.FS, options.TemplateName) - if err != nil { - return err - } - - return gosod.New(tfs).Extract(options.ProjectDir, templateData) -} diff --git a/v3/internal/templates/templates_test.go b/v3/internal/templates/templates_test.go deleted file mode 100644 index 25fa790b5..000000000 --- a/v3/internal/templates/templates_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package templates - -import ( - "testing" - - "github.com/wailsapp/wails/v3/internal/flags" -) - -func TestInstall(t *testing.T) { - type args struct { - } - tests := []struct { - name string - options *flags.Init - wantErr bool - }{ - { - name: "should install template", - options: &flags.Init{ - ProjectName: "test", - TemplateName: "svelte", - Quiet: false, - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if err := Install(tt.options); (err != nil) != tt.wantErr { - t.Errorf("Install() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml b/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/build/appicon.png b/v3/internal/templates/vanilla-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vanilla-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vanilla-ts/build/icons.icns b/v3/internal/templates/vanilla-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vanilla-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vanilla-ts/frontend/.gitignore b/v3/internal/templates/vanilla-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/vanilla-ts/frontend/index.html b/v3/internal/templates/vanilla-ts/frontend/index.html deleted file mode 100644 index 3da9b4918..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails + TS - - -
- - - diff --git a/v3/internal/templates/vanilla-ts/frontend/package.json b/v3/internal/templates/vanilla-ts/frontend/package.json deleted file mode 100644 index fddd59a6c..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "devDependencies": { - "typescript": "^4.9.3", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/frontend/public/wails.png b/v3/internal/templates/vanilla-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/vanilla-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/vanilla-ts/frontend/src/counter.ts b/v3/internal/templates/vanilla-ts/frontend/src/counter.ts deleted file mode 100644 index 09e5afd2d..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/src/counter.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function setupCounter(element: HTMLButtonElement) { - let counter = 0 - const setCounter = (count: number) => { - counter = count - element.innerHTML = `count is ${counter}` - } - element.addEventListener('click', () => setCounter(counter + 1)) - setCounter(0) -} diff --git a/v3/internal/templates/vanilla-ts/frontend/src/main.ts b/v3/internal/templates/vanilla-ts/frontend/src/main.ts deleted file mode 100644 index b386148ad..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/src/main.ts +++ /dev/null @@ -1,23 +0,0 @@ -import './style.css' -import typescriptLogo from './typescript.svg' -import { setupCounter } from './counter' - -document.querySelector('#app')!.innerHTML = ` -
- - - - - - -

Wails + TypeScript

-
- -
-

- Click on the Wails and TypeScript logos to learn more -

-
-` - -setupCounter(document.querySelector('#counter')!) diff --git a/v3/internal/templates/vanilla-ts/frontend/src/style.css b/v3/internal/templates/vanilla-ts/frontend/src/style.css deleted file mode 100644 index ac37d84b9..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/src/style.css +++ /dev/null @@ -1,97 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.vanilla:hover { - filter: drop-shadow(0 0 2em #3178c6aa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg b/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg deleted file mode 100644 index d91c910cc..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/vanilla-ts/frontend/tsconfig.json b/v3/internal/templates/vanilla-ts/frontend/tsconfig.json deleted file mode 100644 index eac16d14a..000000000 --- a/v3/internal/templates/vanilla-ts/frontend/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "moduleResolution": "Node", - "strict": true, - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "noEmit": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "skipLibCheck": true - }, - "include": ["src"] -} diff --git a/v3/internal/templates/vanilla-ts/go.mod.tmpl b/v3/internal/templates/vanilla-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/vanilla-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/vanilla-ts/go.sum.tmpl b/v3/internal/templates/vanilla-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vanilla-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vanilla-ts/main.go.tmpl b/v3/internal/templates/vanilla-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/vanilla-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vanilla/Taskfile.tmpl.yml b/v3/internal/templates/vanilla/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/vanilla/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl b/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla/build/Info.plist.tmpl b/v3/internal/templates/vanilla/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vanilla/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vanilla/build/appicon.png b/v3/internal/templates/vanilla/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vanilla/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vanilla/build/icons.icns b/v3/internal/templates/vanilla/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vanilla/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vanilla/frontend/.gitignore b/v3/internal/templates/vanilla/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/vanilla/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/vanilla/frontend/counter.js b/v3/internal/templates/vanilla/frontend/counter.js deleted file mode 100644 index 881e2d7ad..000000000 --- a/v3/internal/templates/vanilla/frontend/counter.js +++ /dev/null @@ -1,9 +0,0 @@ -export function setupCounter(element) { - let counter = 0 - const setCounter = (count) => { - counter = count - element.innerHTML = `count is ${counter}` - } - element.addEventListener('click', () => setCounter(counter + 1)) - setCounter(0) -} diff --git a/v3/internal/templates/vanilla/frontend/index.html b/v3/internal/templates/vanilla/frontend/index.html deleted file mode 100644 index a13d62487..000000000 --- a/v3/internal/templates/vanilla/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Wails App - - -
- - - diff --git a/v3/internal/templates/vanilla/frontend/javascript.svg b/v3/internal/templates/vanilla/frontend/javascript.svg deleted file mode 100644 index f9abb2b72..000000000 --- a/v3/internal/templates/vanilla/frontend/javascript.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/vanilla/frontend/main.js b/v3/internal/templates/vanilla/frontend/main.js deleted file mode 100644 index 5a926e5b8..000000000 --- a/v3/internal/templates/vanilla/frontend/main.js +++ /dev/null @@ -1,23 +0,0 @@ -import './style.css' -import javascriptLogo from './javascript.svg' -import { setupCounter } from './counter.js' - -document.querySelector('#app').innerHTML = ` -
- - - - - - -

Hello Wails!

-
- -
-

- Click on the Wails logo to learn more -

-
-` - -setupCounter(document.querySelector('#counter')) diff --git a/v3/internal/templates/vanilla/frontend/package.json b/v3/internal/templates/vanilla/frontend/package.json deleted file mode 100644 index 63288c9ef..000000000 --- a/v3/internal/templates/vanilla/frontend/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/vanilla/frontend/public/wails.png b/v3/internal/templates/vanilla/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/vanilla/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/vanilla/frontend/style.css b/v3/internal/templates/vanilla/frontend/style.css deleted file mode 100644 index 12320801d..000000000 --- a/v3/internal/templates/vanilla/frontend/style.css +++ /dev/null @@ -1,97 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.vanilla:hover { - filter: drop-shadow(0 0 2em #f7df1eaa); -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/vanilla/go.mod.tmpl b/v3/internal/templates/vanilla/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/vanilla/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/vanilla/go.sum.tmpl b/v3/internal/templates/vanilla/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vanilla/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vanilla/main.go.tmpl b/v3/internal/templates/vanilla/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/vanilla/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml b/v3/internal/templates/vue-ts/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/build/Info.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vue-ts/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/build/appicon.png b/v3/internal/templates/vue-ts/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vue-ts/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vue-ts/build/icons.icns b/v3/internal/templates/vue-ts/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vue-ts/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vue-ts/frontend/.gitignore b/v3/internal/templates/vue-ts/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/vue-ts/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json b/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json deleted file mode 100644 index c0a6e5a48..000000000 --- a/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] -} diff --git a/v3/internal/templates/vue-ts/frontend/README.md b/v3/internal/templates/vue-ts/frontend/README.md deleted file mode 100644 index ef72fd524..000000000 --- a/v3/internal/templates/vue-ts/frontend/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Vue 3 + TypeScript + Vite - -This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` - - diff --git a/v3/internal/templates/vue-ts/frontend/package.json b/v3/internal/templates/vue-ts/frontend/package.json deleted file mode 100644 index 129f6aef7..000000000 --- a/v3/internal/templates/vue-ts/frontend/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vue-tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "vue": "^3.2.45" - }, - "devDependencies": { - "@vitejs/plugin-vue": "^4.0.0", - "typescript": "^4.9.3", - "vite": "^4.0.0", - "vue-tsc": "^1.0.11" - } -} \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/frontend/public/wails.png b/v3/internal/templates/vue-ts/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/vue-ts/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/vue-ts/frontend/src/App.vue b/v3/internal/templates/vue-ts/frontend/src/App.vue deleted file mode 100644 index fb679f1d5..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/App.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg b/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg deleted file mode 100644 index 770e9d333..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue b/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue deleted file mode 100644 index 523091033..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/v3/internal/templates/vue-ts/frontend/src/main.ts b/v3/internal/templates/vue-ts/frontend/src/main.ts deleted file mode 100644 index 2425c0f74..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createApp } from 'vue' -import './style.css' -import App from './App.vue' - -createApp(App).mount('#app') diff --git a/v3/internal/templates/vue-ts/frontend/src/style.css b/v3/internal/templates/vue-ts/frontend/src/style.css deleted file mode 100644 index 0192f9aac..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/style.css +++ /dev/null @@ -1,81 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/v3/internal/templates/vue-ts/frontend/tsconfig.json b/v3/internal/templates/vue-ts/frontend/tsconfig.json deleted file mode 100644 index b557c4047..000000000 --- a/v3/internal/templates/vue-ts/frontend/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "useDefineForClassFields": true, - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "jsx": "preserve", - "resolveJsonModule": true, - "isolatedModules": true, - "esModuleInterop": true, - "lib": ["ESNext", "DOM"], - "skipLibCheck": true, - "noEmit": true - }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/v3/internal/templates/vue-ts/frontend/tsconfig.node.json b/v3/internal/templates/vue-ts/frontend/tsconfig.node.json deleted file mode 100644 index 9d31e2aed..000000000 --- a/v3/internal/templates/vue-ts/frontend/tsconfig.node.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/v3/internal/templates/vue-ts/frontend/vite.config.ts b/v3/internal/templates/vue-ts/frontend/vite.config.ts deleted file mode 100644 index 05c17402a..000000000 --- a/v3/internal/templates/vue-ts/frontend/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue()], -}) diff --git a/v3/internal/templates/vue-ts/go.mod.tmpl b/v3/internal/templates/vue-ts/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/vue-ts/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/vue-ts/go.sum.tmpl b/v3/internal/templates/vue-ts/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vue-ts/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vue-ts/main.go.tmpl b/v3/internal/templates/vue-ts/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/vue-ts/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/internal/templates/vue/Taskfile.tmpl.yml b/v3/internal/templates/vue/Taskfile.tmpl.yml deleted file mode 100644 index 5e8c5f4aa..000000000 --- a/v3/internal/templates/vue/Taskfile.tmpl.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: '3' - -vars: - APP_NAME: "{{.ProjectName}}" - -tasks: - - pre-build: - summary: Pre-build hooks - - post-build: - summary: Post-build hooks - - install-frontend-deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - - npm install - - build-frontend: - summary: Build the frontend project - dir: frontend - deps: - - install-frontend-deps - cmds: - - npm run build - - build: - summary: Builds the application - cmds: - - task: pre-build - - task: build-frontend - - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - - generate-icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - cmds: - # Generates both .ico and .icns files - - wails generate icons -input appicon.png - - build-app-prod-darwin: - summary: Creates a production build of the application - cmds: - - task: pre-build - - task: build-frontend - - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }} - - task: post-build - env: - CGO_CFLAGS: "-mmacosx-version-min=10.13" - CGO_LDFLAGS: "-mmacosx-version-min=10.13" - vars: - ARCH: $GOARCH - - - create-app-bundle: - summary: Builds a `.app` bundle - cmds: - - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources - - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS - - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents - - package-darwin-arm64: - summary: Packages a production build of the application into a `.app` bundle - platform: darwin - deps: - - task: build-app-prod-darwin - vars: - ARCH: arm64 - - generate-icons - cmds: - - task: create-app-bundle \ No newline at end of file diff --git a/v3/internal/templates/vue/build/Info.dev.plist.tmpl b/v3/internal/templates/vue/build/Info.dev.plist.tmpl deleted file mode 100644 index 7efa134f4..000000000 --- a/v3/internal/templates/vue/build/Info.dev.plist.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - NSAppTransportSecurity - - NSAllowsLocalNetworking - - - - \ No newline at end of file diff --git a/v3/internal/templates/vue/build/Info.plist.tmpl b/v3/internal/templates/vue/build/Info.plist.tmpl deleted file mode 100644 index 6bfa8c316..000000000 --- a/v3/internal/templates/vue/build/Info.plist.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - CFBundlePackageType - APPL - CFBundleName - My Product Name - CFBundleExecutable - {{.ProjectName}} - CFBundleIdentifier - com.wails.{{.ProjectName}} - CFBundleVersion - v1.0.0 - CFBundleGetInfoString - This is a comment - CFBundleShortVersionString - v1.0.0 - CFBundleIconFile - icons - LSMinimumSystemVersion - 10.13.0 - NSHighResolutionCapable - true - NSHumanReadableCopyright - (c) 2023 My Company Name - - \ No newline at end of file diff --git a/v3/internal/templates/vue/build/appicon.png b/v3/internal/templates/vue/build/appicon.png deleted file mode 100644 index 63617fe4f..000000000 Binary files a/v3/internal/templates/vue/build/appicon.png and /dev/null differ diff --git a/v3/internal/templates/vue/build/icons.icns b/v3/internal/templates/vue/build/icons.icns deleted file mode 100644 index 1b5bd4c86..000000000 Binary files a/v3/internal/templates/vue/build/icons.icns and /dev/null differ diff --git a/v3/internal/templates/vue/frontend/.gitignore b/v3/internal/templates/vue/frontend/.gitignore deleted file mode 100644 index a547bf36d..000000000 --- a/v3/internal/templates/vue/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/v3/internal/templates/vue/frontend/.vscode/extensions.json b/v3/internal/templates/vue/frontend/.vscode/extensions.json deleted file mode 100644 index c0a6e5a48..000000000 --- a/v3/internal/templates/vue/frontend/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] -} diff --git a/v3/internal/templates/vue/frontend/README.md b/v3/internal/templates/vue/frontend/README.md deleted file mode 100644 index e62e093e7..000000000 --- a/v3/internal/templates/vue/frontend/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Vue 3 + Vite - -This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` - - diff --git a/v3/internal/templates/vue/frontend/package.json b/v3/internal/templates/vue/frontend/package.json deleted file mode 100644 index b779f58b4..000000000 --- a/v3/internal/templates/vue/frontend/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "vue": "^3.2.45" - }, - "devDependencies": { - "@vitejs/plugin-vue": "^4.0.0", - "vite": "^4.0.0" - } -} \ No newline at end of file diff --git a/v3/internal/templates/vue/frontend/public/wails.png b/v3/internal/templates/vue/frontend/public/wails.png deleted file mode 100644 index 8bdf42483..000000000 Binary files a/v3/internal/templates/vue/frontend/public/wails.png and /dev/null differ diff --git a/v3/internal/templates/vue/frontend/src/App.vue b/v3/internal/templates/vue/frontend/src/App.vue deleted file mode 100644 index 3f9b55cb7..000000000 --- a/v3/internal/templates/vue/frontend/src/App.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/v3/internal/templates/vue/frontend/src/assets/vue.svg b/v3/internal/templates/vue/frontend/src/assets/vue.svg deleted file mode 100644 index 770e9d333..000000000 --- a/v3/internal/templates/vue/frontend/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/v3/internal/templates/vue/frontend/src/components/HelloWorld.vue b/v3/internal/templates/vue/frontend/src/components/HelloWorld.vue deleted file mode 100644 index d3c3f15cd..000000000 --- a/v3/internal/templates/vue/frontend/src/components/HelloWorld.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/v3/internal/templates/vue/frontend/src/main.js b/v3/internal/templates/vue/frontend/src/main.js deleted file mode 100644 index 2425c0f74..000000000 --- a/v3/internal/templates/vue/frontend/src/main.js +++ /dev/null @@ -1,5 +0,0 @@ -import { createApp } from 'vue' -import './style.css' -import App from './App.vue' - -createApp(App).mount('#app') diff --git a/v3/internal/templates/vue/frontend/src/style.css b/v3/internal/templates/vue/frontend/src/style.css deleted file mode 100644 index a566a347d..000000000 --- a/v3/internal/templates/vue/frontend/src/style.css +++ /dev/null @@ -1,90 +0,0 @@ -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/v3/internal/templates/vue/frontend/vite.config.js b/v3/internal/templates/vue/frontend/vite.config.js deleted file mode 100644 index 05c17402a..000000000 --- a/v3/internal/templates/vue/frontend/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [vue()], -}) diff --git a/v3/internal/templates/vue/go.mod.tmpl b/v3/internal/templates/vue/go.mod.tmpl deleted file mode 100644 index 3c878c9ab..000000000 --- a/v3/internal/templates/vue/go.mod.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -module changeme - -go 1.19 - -require github.com/wailsapp/wails/v3 v3.0.0-alpha.0 - -require ( - github.com/json-iterator/go v1.1.12 // indirect - github.com/leaanthony/slicer v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/samber/lo v1.37.0 // indirect - github.com/wailsapp/mimetype v1.4.1 // indirect - github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect - golang.org/x/net v0.7.0 // indirect -) -{{if gt (len .LocalModulePath) 0}} -replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3 -replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2 -{{end}} diff --git a/v3/internal/templates/vue/go.sum.tmpl b/v3/internal/templates/vue/go.sum.tmpl deleted file mode 100644 index c06e0dbc6..000000000 --- a/v3/internal/templates/vue/go.sum.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY= -github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= -github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= -github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/v3/internal/templates/vue/main.go.tmpl b/v3/internal/templates/vue/main.go.tmpl deleted file mode 100644 index 1bc6a4868..000000000 --- a/v3/internal/templates/vue/main.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "embed" - _ "embed" - "log" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed frontend/dist -var assets embed.FS - -func main() { - app := application.New(application.Options{ - Name: "{{.ProjectName}}", - Description: "A demo of using raw HTML & CSS", - Mac: application.MacOptions{ - ApplicationShouldTerminateAfterLastWindowClosed: true, - }, - }) - // Create window - app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{ - Title: "Plain Bundle", - CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`, - Mac: application.MacWindow{ - InvisibleTitleBarHeight: 50, - Backdrop: application.MacBackdropTranslucent, - TitleBar: application.MacTitleBarHiddenInset, - }, - - URL: "/", - Assets: application.AssetOptions{ - FS: assets, - }, - }) - - err := app.Run() - - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/pkg/application/TODO.md b/v3/pkg/application/TODO.md deleted file mode 100644 index ae4700425..000000000 --- a/v3/pkg/application/TODO.md +++ /dev/null @@ -1,10 +0,0 @@ - -Features -- [ ] AssetServer -- [ ] Offline page if navigating to external URL -- [x] Application menu - -Bugs -- [ ] Resize Window -- [ ] Fullscreen/Maximise/Minimise/Restore - diff --git a/v3/pkg/application/app_delegate.h b/v3/pkg/application/app_delegate.h deleted file mode 100644 index 50ff8b6e9..000000000 --- a/v3/pkg/application/app_delegate.h +++ /dev/null @@ -1,12 +0,0 @@ -//go:build darwin - -#ifndef appdelegate_h -#define appdelegate_h - -#import - -@interface AppDelegate : NSObject -@property bool shouldTerminateWhenLastWindowClosed; -@end - -#endif diff --git a/v3/pkg/application/app_delegate.m b/v3/pkg/application/app_delegate.m deleted file mode 100644 index d20a48fda..000000000 --- a/v3/pkg/application/app_delegate.m +++ /dev/null @@ -1,137 +0,0 @@ -//go:build darwin -#import "app_delegate.h" -#import "../events/events.h" -extern bool hasListeners(unsigned int); -@implementation AppDelegate -- (void)dealloc -{ - [super dealloc]; -} -// Create the applicationShouldTerminateAfterLastWindowClosed: method -- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication -{ - return self.shouldTerminateWhenLastWindowClosed; -} -// GENERATED EVENTS START -- (void)applicationDidBecomeActive:(NSNotification *)notification { - if( hasListeners(EventApplicationDidBecomeActive) ) { - processApplicationEvent(EventApplicationDidBecomeActive); - } -} - -- (void)applicationDidChangeBackingProperties:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeBackingProperties) ) { - processApplicationEvent(EventApplicationDidChangeBackingProperties); - } -} - -- (void)applicationDidChangeEffectiveAppearance:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeEffectiveAppearance) ) { - processApplicationEvent(EventApplicationDidChangeEffectiveAppearance); - } -} - -- (void)applicationDidChangeIcon:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeIcon) ) { - processApplicationEvent(EventApplicationDidChangeIcon); - } -} - -- (void)applicationDidChangeOcclusionState:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeOcclusionState) ) { - processApplicationEvent(EventApplicationDidChangeOcclusionState); - } -} - -- (void)applicationDidChangeScreenParameters:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeScreenParameters) ) { - processApplicationEvent(EventApplicationDidChangeScreenParameters); - } -} - -- (void)applicationDidChangeStatusBarFrame:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeStatusBarFrame) ) { - processApplicationEvent(EventApplicationDidChangeStatusBarFrame); - } -} - -- (void)applicationDidChangeStatusBarOrientation:(NSNotification *)notification { - if( hasListeners(EventApplicationDidChangeStatusBarOrientation) ) { - processApplicationEvent(EventApplicationDidChangeStatusBarOrientation); - } -} - -- (void)applicationDidFinishLaunching:(NSNotification *)notification { - if( hasListeners(EventApplicationDidFinishLaunching) ) { - processApplicationEvent(EventApplicationDidFinishLaunching); - } -} - -- (void)applicationDidHide:(NSNotification *)notification { - if( hasListeners(EventApplicationDidHide) ) { - processApplicationEvent(EventApplicationDidHide); - } -} - -- (void)applicationDidResignActive:(NSNotification *)notification { - if( hasListeners(EventApplicationDidResignActive) ) { - processApplicationEvent(EventApplicationDidResignActive); - } -} - -- (void)applicationDidUnhide:(NSNotification *)notification { - if( hasListeners(EventApplicationDidUnhide) ) { - processApplicationEvent(EventApplicationDidUnhide); - } -} - -- (void)applicationDidUpdate:(NSNotification *)notification { - if( hasListeners(EventApplicationDidUpdate) ) { - processApplicationEvent(EventApplicationDidUpdate); - } -} - -- (void)applicationWillBecomeActive:(NSNotification *)notification { - if( hasListeners(EventApplicationWillBecomeActive) ) { - processApplicationEvent(EventApplicationWillBecomeActive); - } -} - -- (void)applicationWillFinishLaunching:(NSNotification *)notification { - if( hasListeners(EventApplicationWillFinishLaunching) ) { - processApplicationEvent(EventApplicationWillFinishLaunching); - } -} - -- (void)applicationWillHide:(NSNotification *)notification { - if( hasListeners(EventApplicationWillHide) ) { - processApplicationEvent(EventApplicationWillHide); - } -} - -- (void)applicationWillResignActive:(NSNotification *)notification { - if( hasListeners(EventApplicationWillResignActive) ) { - processApplicationEvent(EventApplicationWillResignActive); - } -} - -- (void)applicationWillTerminate:(NSNotification *)notification { - if( hasListeners(EventApplicationWillTerminate) ) { - processApplicationEvent(EventApplicationWillTerminate); - } -} - -- (void)applicationWillUnhide:(NSNotification *)notification { - if( hasListeners(EventApplicationWillUnhide) ) { - processApplicationEvent(EventApplicationWillUnhide); - } -} - -- (void)applicationWillUpdate:(NSNotification *)notification { - if( hasListeners(EventApplicationWillUpdate) ) { - processApplicationEvent(EventApplicationWillUpdate); - } -} - -// GENERATED EVENTS END -@end diff --git a/v3/pkg/application/application.go b/v3/pkg/application/application.go deleted file mode 100644 index b2667bf00..000000000 --- a/v3/pkg/application/application.go +++ /dev/null @@ -1,601 +0,0 @@ -package application - -import "C" -import ( - "log" - "net/http" - "os" - "runtime" - "strconv" - "sync" - - "github.com/wailsapp/wails/v2/pkg/assetserver" - "github.com/wailsapp/wails/v2/pkg/assetserver/webview" - assetserveroptions "github.com/wailsapp/wails/v2/pkg/options/assetserver" - - wailsruntime "github.com/wailsapp/wails/v3/internal/runtime" - "github.com/wailsapp/wails/v3/pkg/events" - "github.com/wailsapp/wails/v3/pkg/logger" -) - -var globalApplication *App - -func init() { - runtime.LockOSThread() -} - -func New(appOptions Options) *App { - if globalApplication != nil { - return globalApplication - } - - mergeApplicationDefaults(&appOptions) - - result := &App{ - options: appOptions, - applicationEventListeners: make(map[uint][]func()), - systemTrays: make(map[uint]*SystemTray), - log: logger.New(appOptions.Logger.CustomLoggers...), - contextMenus: make(map[string]*Menu), - pid: os.Getpid(), - } - globalApplication = result - - if !appOptions.Logger.Silent { - result.log.AddOutput(&logger.Console{}) - } - - result.Events = NewWailsEventProcessor(result.dispatchEventToWindows) - - opts := assetserveroptions.Options{ - Assets: appOptions.Assets.FS, - Handler: appOptions.Assets.Handler, - Middleware: assetserveroptions.Middleware(appOptions.Assets.Middleware), - } - - // TODO ServingFrom disk? - srv, err := assetserver.NewAssetServer("", opts, false, nil, wailsruntime.RuntimeAssetsBundle) - if err != nil { - result.fatal(err.Error()) - } - - srv.UseRuntimeHandler(NewMessageProcessor()) - result.assets = srv - - result.bindings, err = NewBindings(appOptions.Bind) - if err != nil { - println("Fatal error in application initialisation: ", err.Error()) - os.Exit(1) - } - - result.plugins = NewPluginManager(appOptions.Plugins, srv) - err = result.plugins.Init() - if err != nil { - result.Quit() - os.Exit(1) - } - - err = result.bindings.AddPlugins(appOptions.Plugins) - if err != nil { - println("Fatal error in application initialisation: ", err.Error()) - os.Exit(1) - } - - return result -} - -func mergeApplicationDefaults(o *Options) { - if o.Name == "" { - o.Name = "My Wails Application" - } - if o.Description == "" { - o.Description = "An application written using Wails" - } - if o.Icon == nil { - o.Icon = DefaultApplicationIcon - } - -} - -type platformApp interface { - run() error - destroy() - setApplicationMenu(menu *Menu) - name() string - getCurrentWindowID() uint - showAboutDialog(name string, description string, icon []byte) - setIcon(icon []byte) - on(id uint) - dispatchOnMainThread(id uint) - hide() - show() -} - -// Messages sent from javascript get routed here -type windowMessage struct { - windowId uint - message string -} - -var windowMessageBuffer = make(chan *windowMessage) - -type dragAndDropMessage struct { - windowId uint - filenames []string -} - -var windowDragAndDropBuffer = make(chan *dragAndDropMessage) - -var _ webview.Request = &webViewAssetRequest{} - -const webViewRequestHeaderWindowId = "x-wails-window-id" -const webViewRequestHeaderWindowName = "x-wails-window-name" - -type webViewAssetRequest struct { - webview.Request - windowId uint - windowName string -} - -func (r *webViewAssetRequest) Header() (http.Header, error) { - h, err := r.Request.Header() - if err != nil { - return nil, err - } - - hh := h.Clone() - hh.Set(webViewRequestHeaderWindowId, strconv.FormatUint(uint64(r.windowId), 10)) - return hh, nil -} - -var webviewRequests = make(chan *webViewAssetRequest) - -type App struct { - options Options - applicationEventListeners map[uint][]func() - applicationEventListenersLock sync.RWMutex - - // Windows - windows map[uint]*WebviewWindow - windowsLock sync.Mutex - - // System Trays - systemTrays map[uint]*SystemTray - systemTraysLock sync.Mutex - systemTrayID uint - systemTrayIDLock sync.RWMutex - - // MenuItems - menuItems map[uint]*MenuItem - menuItemsLock sync.Mutex - - // Running - running bool - bindings *Bindings - plugins *PluginManager - - // platform app - impl platformApp - - // The main application menu - ApplicationMenu *Menu - - clipboard *Clipboard - Events *EventProcessor - log *logger.Logger - - contextMenus map[string]*Menu - contextMenusLock sync.Mutex - - assets *assetserver.AssetServer - - // Hooks - windowCreatedCallbacks []func(window *WebviewWindow) - pid int -} - -func (a *App) getSystemTrayID() uint { - a.systemTrayIDLock.Lock() - defer a.systemTrayIDLock.Unlock() - a.systemTrayID++ - return a.systemTrayID -} - -func (a *App) getWindowForID(id uint) *WebviewWindow { - a.windowsLock.Lock() - defer a.windowsLock.Unlock() - return a.windows[id] -} - -func (a *App) deleteWindowByID(id uint) { - a.windowsLock.Lock() - defer a.windowsLock.Unlock() - delete(a.windows, id) -} - -func (a *App) On(eventType events.ApplicationEventType, callback func()) { - eventID := uint(eventType) - a.applicationEventListenersLock.Lock() - defer a.applicationEventListenersLock.Unlock() - a.applicationEventListeners[eventID] = append(a.applicationEventListeners[eventID], callback) - if a.impl != nil { - go a.impl.on(eventID) - } -} -func (a *App) NewWebviewWindow() *WebviewWindow { - return a.NewWebviewWindowWithOptions(&WebviewWindowOptions{}) -} - -func (a *App) GetPID() int { - return a.pid -} - -func (a *App) info(message string, args ...any) { - a.Log(&logger.Message{ - Level: "INFO", - Message: message, - Data: args, - Sender: "Wails", - }) -} - -func (a *App) fatal(message string, args ...any) { - msg := "************** FATAL **************\n" - msg += message - msg += "***********************************\n" - - a.Log(&logger.Message{ - Level: "FATAL", - Message: msg, - Data: args, - Sender: "Wails", - }) - - a.log.Flush() - os.Exit(1) -} - -func (a *App) error(message string, args ...any) { - a.Log(&logger.Message{ - Level: "ERROR", - Message: message, - Data: args, - Sender: "Wails", - }) -} - -func (a *App) NewWebviewWindowWithOptions(windowOptions *WebviewWindowOptions) *WebviewWindow { - // Ensure we have sane defaults - if windowOptions == nil { - windowOptions = WebviewWindowDefaults - } - newWindow := NewWindow(windowOptions) - id := newWindow.id - if a.windows == nil { - a.windows = make(map[uint]*WebviewWindow) - } - a.windowsLock.Lock() - a.windows[id] = newWindow - a.windowsLock.Unlock() - - // Call hooks - for _, hook := range a.windowCreatedCallbacks { - hook(newWindow) - } - - if a.running { - newWindow.run() - } - - return newWindow -} - -func (a *App) NewSystemTray() *SystemTray { - id := a.getSystemTrayID() - newSystemTray := NewSystemTray(id) - a.systemTraysLock.Lock() - a.systemTrays[id] = newSystemTray - a.systemTraysLock.Unlock() - - if a.running { - newSystemTray.Run() - } - return newSystemTray -} - -func (a *App) Run() error { - a.info("Starting application") - a.impl = newPlatformApp(a) - - a.running = true - go func() { - for { - event := <-applicationEvents - a.handleApplicationEvent(event) - } - }() - go func() { - for { - event := <-windowEvents - a.handleWindowEvent(event) - } - }() - go func() { - for { - request := <-webviewRequests - a.handleWebViewRequest(request) - } - }() - go func() { - for { - event := <-windowMessageBuffer - a.handleWindowMessage(event) - } - }() - go func() { - for { - dragAndDropMessage := <-windowDragAndDropBuffer - a.handleDragAndDropMessage(dragAndDropMessage) - } - }() - - go func() { - for { - menuItemID := <-menuItemClicked - a.handleMenuItemClicked(menuItemID) - } - }() - - // run windows - for _, window := range a.windows { - go window.run() - } - - // run system trays - for _, systray := range a.systemTrays { - go systray.Run() - } - - // set the application menu - a.impl.setApplicationMenu(a.ApplicationMenu) - - // set the application Icon - a.impl.setIcon(a.options.Icon) - - err := a.impl.run() - if err != nil { - return err - } - - a.plugins.Shutdown() - - return nil -} - -func (a *App) handleApplicationEvent(event uint) { - a.applicationEventListenersLock.RLock() - listeners, ok := a.applicationEventListeners[event] - a.applicationEventListenersLock.RUnlock() - if !ok { - return - } - for _, listener := range listeners { - go listener() - } -} - -func (a *App) handleDragAndDropMessage(event *dragAndDropMessage) { - // Get window from window map - a.windowsLock.Lock() - window, ok := a.windows[event.windowId] - a.windowsLock.Unlock() - if !ok { - log.Printf("WebviewWindow #%d not found", event.windowId) - return - } - // Get callback from window - window.handleDragAndDropMessage(event) -} - -func (a *App) handleWindowMessage(event *windowMessage) { - // Get window from window map - a.windowsLock.Lock() - window, ok := a.windows[event.windowId] - a.windowsLock.Unlock() - if !ok { - log.Printf("WebviewWindow #%d not found", event.windowId) - return - } - // Get callback from window - window.handleMessage(event.message) -} - -func (a *App) handleWebViewRequest(request *webViewAssetRequest) { - // Get window from window map - url, _ := request.URL() - a.info("Window: '%s', Request: %s", request.windowName, url) - a.assets.ServeWebViewRequest(request) -} - -func (a *App) handleWindowEvent(event *WindowEvent) { - // Get window from window map - a.windowsLock.Lock() - window, ok := a.windows[event.WindowID] - a.windowsLock.Unlock() - if !ok { - log.Printf("WebviewWindow #%d not found", event.WindowID) - return - } - window.handleWindowEvent(event.EventID) -} - -func (a *App) handleMenuItemClicked(menuItemID uint) { - menuItem := getMenuItemByID(menuItemID) - if menuItem == nil { - log.Printf("MenuItem #%d not found", menuItemID) - return - } - menuItem.handleClick() -} - -func (a *App) CurrentWindow() *WebviewWindow { - if a.impl == nil { - return nil - } - id := a.impl.getCurrentWindowID() - a.windowsLock.Lock() - defer a.windowsLock.Unlock() - return a.windows[id] -} - -func (a *App) Quit() { - var wg sync.WaitGroup - wg.Add(2) - go func() { - a.windowsLock.Lock() - for _, window := range a.windows { - window.Destroy() - } - a.windowsLock.Unlock() - wg.Done() - }() - go func() { - a.systemTraysLock.Lock() - for _, systray := range a.systemTrays { - systray.Destroy() - } - a.systemTraysLock.Unlock() - wg.Done() - }() - wg.Wait() - if a.impl != nil { - a.impl.destroy() - } -} - -func (a *App) SetMenu(menu *Menu) { - a.ApplicationMenu = menu - if a.impl != nil { - a.impl.setApplicationMenu(menu) - } -} -func (a *App) ShowAboutDialog() { - if a.impl != nil { - a.impl.showAboutDialog(a.options.Name, a.options.Description, a.options.Icon) - } -} - -func (a *App) InfoDialog() *MessageDialog { - return newMessageDialog(InfoDialog) -} - -func (a *App) QuestionDialog() *MessageDialog { - return newMessageDialog(QuestionDialog) -} - -func (a *App) WarningDialog() *MessageDialog { - return newMessageDialog(WarningDialog) -} - -func (a *App) ErrorDialog() *MessageDialog { - return newMessageDialog(ErrorDialog) -} - -func (a *App) OpenDirectoryDialog() *MessageDialog { - return newMessageDialog(OpenDirectoryDialog) -} - -func (a *App) OpenFileDialog() *OpenFileDialog { - return newOpenFileDialog() -} - -func (a *App) SaveFileDialog() *SaveFileDialog { - return newSaveFileDialog() -} - -func (a *App) GetPrimaryScreen() (*Screen, error) { - return getPrimaryScreen() -} - -func (a *App) GetScreens() ([]*Screen, error) { - return getScreens() -} - -func (a *App) Clipboard() *Clipboard { - if a.clipboard == nil { - a.clipboard = newClipboard() - } - return a.clipboard -} - -func (a *App) dispatchOnMainThread(fn func()) { - mainThreadFunctionStoreLock.Lock() - id := generateFunctionStoreID() - mainThreadFunctionStore[id] = fn - mainThreadFunctionStoreLock.Unlock() - // Call platform specific dispatch function - a.impl.dispatchOnMainThread(id) -} - -func (a *App) OpenFileDialogWithOptions(options *OpenFileDialogOptions) *OpenFileDialog { - result := a.OpenFileDialog() - result.SetOptions(options) - return result -} - -func (a *App) SaveFileDialogWithOptions(s *SaveFileDialogOptions) *SaveFileDialog { - result := a.SaveFileDialog() - result.SetOptions(s) - return result -} - -func (a *App) dispatchEventToWindows(event *WailsEvent) { - for _, window := range a.windows { - window.dispatchWailsEvent(event) - } -} - -func (a *App) Hide() { - if a.impl != nil { - a.impl.hide() - } -} - -func (a *App) Show() { - if a.impl != nil { - a.impl.show() - } -} - -func (a *App) Log(message *logger.Message) { - a.log.Log(message) -} - -func (a *App) RegisterContextMenu(name string, menu *Menu) { - a.contextMenusLock.Lock() - defer a.contextMenusLock.Unlock() - a.contextMenus[name] = menu -} - -func (a *App) getContextMenu(name string) (*Menu, bool) { - a.contextMenusLock.Lock() - defer a.contextMenusLock.Unlock() - menu, ok := a.contextMenus[name] - return menu, ok - -} - -func (a *App) OnWindowCreation(callback func(window *WebviewWindow)) { - a.windowCreatedCallbacks = append(a.windowCreatedCallbacks, callback) -} - -func (a *App) GetWindowByName(name string) *WebviewWindow { - a.windowsLock.Lock() - defer a.windowsLock.Unlock() - for _, window := range a.windows { - if window.Name() == name { - return window - } - } - return nil -} diff --git a/v3/pkg/application/application.h b/v3/pkg/application/application.h deleted file mode 100644 index e67384397..000000000 --- a/v3/pkg/application/application.h +++ /dev/null @@ -1,11 +0,0 @@ -//go:build darwin - -#ifndef application_h -#define application_h - -static void init(void); -static void run(void); -static void setActivationPolicy(int policy); -static char *getAppName(void); - -#endif \ No newline at end of file diff --git a/v3/pkg/application/application_darwin.go b/v3/pkg/application/application_darwin.go deleted file mode 100644 index b299c1f67..000000000 --- a/v3/pkg/application/application_darwin.go +++ /dev/null @@ -1,258 +0,0 @@ -//go:build darwin - -package application - -/* - -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -mmacosx-version-min=10.13 - -#include "application.h" -#include "app_delegate.h" -#include "webview_window.h" -#include - -extern void registerListener(unsigned int event); - -#import - -static AppDelegate *appDelegate = nil; - -static void init(void) { - [NSApplication sharedApplication]; - appDelegate = [[AppDelegate alloc] init]; - [NSApp setDelegate:appDelegate]; - - [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskLeftMouseDown handler:^NSEvent * _Nullable(NSEvent * _Nonnull event) { - NSWindow* eventWindow = [event window]; - if (eventWindow == nil ) { - return event; - } - WebviewWindowDelegate* windowDelegate = (WebviewWindowDelegate*)[eventWindow delegate]; - if (windowDelegate == nil) { - return event; - } - if ([windowDelegate respondsToSelector:@selector(handleLeftMouseDown:)]) { - [windowDelegate handleLeftMouseDown:event]; - } - return event; - }]; - - [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskLeftMouseUp handler:^NSEvent * _Nullable(NSEvent * _Nonnull event) { - NSWindow* eventWindow = [event window]; - if (eventWindow == nil ) { - return event; - } - WebviewWindowDelegate* windowDelegate = (WebviewWindowDelegate*)[eventWindow delegate]; - if (windowDelegate == nil) { - return event; - } - if ([windowDelegate respondsToSelector:@selector(handleLeftMouseUp:)]) { - [windowDelegate handleLeftMouseUp:eventWindow]; - } - return event; - }]; -} - -static void setApplicationShouldTerminateAfterLastWindowClosed(bool shouldTerminate) { - // Get the NSApp delegate - AppDelegate *appDelegate = (AppDelegate*)[NSApp delegate]; - // Set the applicationShouldTerminateAfterLastWindowClosed boolean - appDelegate.shouldTerminateWhenLastWindowClosed = shouldTerminate; -} - -static void setActivationPolicy(int policy) { - [NSApp setActivationPolicy:policy]; -} - -static void activateIgnoringOtherApps() { - [NSApp activateIgnoringOtherApps:YES]; -} - -static void run(void) { - @autoreleasepool { - [NSApp run]; - [appDelegate release]; - } -} - -// Destroy application -static void destroyApp(void) { - [NSApp terminate:nil]; -} - -// Set the application menu -static void setApplicationMenu(void *menu) { - NSMenu *nsMenu = (__bridge NSMenu *)menu; - [NSApp setMainMenu:menu]; -} - -// Get the application name -static char* getAppName(void) { - NSString *appName = [NSRunningApplication currentApplication].localizedName; - if( appName == nil ) { - appName = [[NSProcessInfo processInfo] processName]; - } - return strdup([appName UTF8String]); -} - -// get the current window ID -static unsigned int getCurrentWindowID(void) { - NSWindow *window = [NSApp keyWindow]; - // Get the window delegate - WebviewWindowDelegate *delegate = (WebviewWindowDelegate*)[window delegate]; - return delegate.windowId; -} - -// Set the application icon -static void setApplicationIcon(void *icon, int length) { - // On main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSImage *image = [[NSImage alloc] initWithData:[NSData dataWithBytes:icon length:length]]; - [NSApp setApplicationIconImage:image]; - }); -} - -// Hide the application -static void hide(void) { - [NSApp hide:nil]; -} - -// Show the application -static void show(void) { - [NSApp unhide:nil]; -} - -*/ -import "C" -import ( - "unsafe" - - "github.com/wailsapp/wails/v2/pkg/assetserver/webview" - "github.com/wailsapp/wails/v3/pkg/events" -) - -type macosApp struct { - applicationMenu unsafe.Pointer - parent *App -} - -func (m *macosApp) hide() { - C.hide() -} - -func (m *macosApp) show() { - C.show() -} - -func (m *macosApp) on(eventID uint) { - C.registerListener(C.uint(eventID)) -} - -func (m *macosApp) setIcon(icon []byte) { - C.setApplicationIcon(unsafe.Pointer(&icon[0]), C.int(len(icon))) -} - -func (m *macosApp) name() string { - appName := C.getAppName() - defer C.free(unsafe.Pointer(appName)) - return C.GoString(appName) -} - -func (m *macosApp) getCurrentWindowID() uint { - return uint(C.getCurrentWindowID()) -} - -func (m *macosApp) setApplicationMenu(menu *Menu) { - if menu == nil { - // Create a default menu for mac - menu = defaultApplicationMenu() - } - menu.Update() - - // Convert impl to macosMenu object - m.applicationMenu = (menu.impl).(*macosMenu).nsMenu - C.setApplicationMenu(m.applicationMenu) -} - -func (m *macosApp) run() error { - // Add a hook to the ApplicationDidFinishLaunching event - m.parent.On(events.Mac.ApplicationDidFinishLaunching, func() { - C.setApplicationShouldTerminateAfterLastWindowClosed(C.bool(m.parent.options.Mac.ApplicationShouldTerminateAfterLastWindowClosed)) - C.setActivationPolicy(C.int(m.parent.options.Mac.ActivationPolicy)) - C.activateIgnoringOtherApps() - }) - // setup event listeners - for eventID := range m.parent.applicationEventListeners { - m.on(eventID) - } - C.run() - return nil -} - -func (m *macosApp) destroy() { - C.destroyApp() -} - -func newPlatformApp(app *App) *macosApp { - C.init() - return &macosApp{ - parent: app, - } -} - -//export processApplicationEvent -func processApplicationEvent(eventID C.uint) { - applicationEvents <- uint(eventID) -} - -//export processWindowEvent -func processWindowEvent(windowID C.uint, eventID C.uint) { - windowEvents <- &WindowEvent{ - WindowID: uint(windowID), - EventID: uint(eventID), - } -} - -//export processMessage -func processMessage(windowID C.uint, message *C.char) { - windowMessageBuffer <- &windowMessage{ - windowId: uint(windowID), - message: C.GoString(message), - } -} - -//export processURLRequest -func processURLRequest(windowID C.uint, wkUrlSchemeTask unsafe.Pointer) { - webviewRequests <- &webViewAssetRequest{ - Request: webview.NewRequest(wkUrlSchemeTask), - windowId: uint(windowID), - windowName: globalApplication.getWindowForID(uint(windowID)).Name(), - } -} - -//export processDragItems -func processDragItems(windowID C.uint, arr **C.char, length C.int) { - var filenames []string - // Convert the C array to a Go slice - goSlice := (*[1 << 30]*C.char)(unsafe.Pointer(arr))[:length:length] - for _, str := range goSlice { - filenames = append(filenames, C.GoString(str)) - } - windowDragAndDropBuffer <- &dragAndDropMessage{ - windowId: uint(windowID), - filenames: filenames, - } -} - -//export processMenuItemClick -func processMenuItemClick(menuID C.uint) { - menuItemClicked <- uint(menuID) -} - -func setIcon(icon []byte) { - if icon == nil { - return - } - C.setApplicationIcon(unsafe.Pointer(&icon[0]), C.int(len(icon))) -} diff --git a/v3/pkg/application/bindings.go b/v3/pkg/application/bindings.go deleted file mode 100644 index 9fe604c70..000000000 --- a/v3/pkg/application/bindings.go +++ /dev/null @@ -1,315 +0,0 @@ -package application - -import ( - "fmt" - "reflect" - "runtime" - "strings" - - "github.com/samber/lo" -) - -type CallOptions struct { - PackageName string `json:"packageName"` - StructName string `json:"structName"` - MethodName string `json:"methodName"` - Args []any `json:"args"` -} - -type PluginCallOptions struct { - Name string `json:"name"` - Args []any `json:"args"` -} - -var reservedPluginMethods = []string{ - "Name", - "Init", - "Shutdown", - "Exported", -} - -// Parameter defines a Go method parameter -type Parameter struct { - Name string `json:"name,omitempty"` - TypeName string `json:"type"` - ReflectType reflect.Type -} - -func newParameter(Name string, Type reflect.Type) *Parameter { - return &Parameter{ - Name: Name, - TypeName: Type.String(), - ReflectType: Type, - } -} - -// IsType returns true if the given -func (p *Parameter) IsType(typename string) bool { - return p.TypeName == typename -} - -// IsError returns true if the parameter type is an error -func (p *Parameter) IsError() bool { - return p.IsType("error") -} - -// BoundMethod defines all the data related to a Go method that is -// bound to the Wails application -type BoundMethod struct { - Name string `json:"name"` - Inputs []*Parameter `json:"inputs,omitempty"` - Outputs []*Parameter `json:"outputs,omitempty"` - Comments string `json:"comments,omitempty"` - Method reflect.Value `json:"-"` - PackageName string - StructName string - PackagePath string -} - -type Bindings struct { - boundMethods map[string]map[string]map[string]*BoundMethod -} - -func NewBindings(bindings []any) (*Bindings, error) { - b := &Bindings{ - boundMethods: make(map[string]map[string]map[string]*BoundMethod), - } - for _, binding := range bindings { - err := b.Add(binding) - if err != nil { - return nil, err - } - } - return b, nil -} - -// Add the given struct methods to the Bindings -func (b *Bindings) Add(structPtr interface{}) error { - - methods, err := b.getMethods(structPtr) - if err != nil { - return fmt.Errorf("cannot bind value to app: %s", err.Error()) - } - - for _, method := range methods { - packageName := method.PackageName - structName := method.StructName - methodName := method.Name - - // Add it as a regular method - if _, ok := b.boundMethods[packageName]; !ok { - b.boundMethods[packageName] = make(map[string]map[string]*BoundMethod) - } - if _, ok := b.boundMethods[packageName][structName]; !ok { - b.boundMethods[packageName][structName] = make(map[string]*BoundMethod) - } - b.boundMethods[packageName][structName][methodName] = method - } - return nil -} - -func (b *Bindings) AddPlugins(plugins map[string]Plugin) error { - for pluginID, plugin := range plugins { - methods, err := b.getMethods(plugin) - if err != nil { - return fmt.Errorf("cannot add plugin '%s' to app: %s", pluginID, err.Error()) - } - - exportedMethods := plugin.CallableByJS() - - for _, method := range methods { - // Do not expose reserved methods - if lo.Contains(reservedPluginMethods, method.Name) { - continue - } - // Do not expose methods that are not in the exported list - if !lo.Contains(exportedMethods, method.Name) { - continue - } - packageName := "wails-plugins" - structName := pluginID - methodName := method.Name - - // Add it as a regular method - if _, ok := b.boundMethods[packageName]; !ok { - b.boundMethods[packageName] = make(map[string]map[string]*BoundMethod) - } - if _, ok := b.boundMethods[packageName][structName]; !ok { - b.boundMethods[packageName][structName] = make(map[string]*BoundMethod) - } - b.boundMethods[packageName][structName][methodName] = method - globalApplication.info("Added %s plugin method: %s", structName, methodName) - } - } - return nil -} - -func (b *Bindings) Get(options *CallOptions) *BoundMethod { - _, ok := b.boundMethods[options.PackageName] - if !ok { - return nil - } - _, ok = b.boundMethods[options.PackageName][options.StructName] - if !ok { - return nil - } - method, ok := b.boundMethods[options.PackageName][options.StructName][options.MethodName] - if !ok { - return nil - } - return method -} - -func (b *Bindings) getMethods(value interface{}) ([]*BoundMethod, error) { - - // Create result placeholder - var result []*BoundMethod - - // Check type - if !isStructPtr(value) { - - if isStruct(value) { - name := reflect.ValueOf(value).Type().Name() - return nil, fmt.Errorf("%s is a struct, not a pointer to a struct", name) - } - - if isFunction(value) { - name := runtime.FuncForPC(reflect.ValueOf(value).Pointer()).Name() - return nil, fmt.Errorf("%s is a function, not a pointer to a struct. Wails v2 has deprecated the binding of functions. Please wrap your functions up in a struct and bind a pointer to that struct", name) - } - - return nil, fmt.Errorf("not a pointer to a struct") - } - - // Process Struct - structType := reflect.TypeOf(value) - structValue := reflect.ValueOf(value) - structTypeString := structType.String() - baseName := structTypeString[1:] - - // Process Methods - for i := 0; i < structType.NumMethod(); i++ { - methodDef := structType.Method(i) - methodName := methodDef.Name - packageName, structName, _ := strings.Cut(baseName, ".") - method := structValue.MethodByName(methodName) - packagePath, _ := lo.Coalesce(structType.PkgPath(), "main") - - // Create new method - boundMethod := &BoundMethod{ - Name: methodName, - PackageName: packageName, - PackagePath: packagePath, - StructName: structName, - Inputs: nil, - Outputs: nil, - Comments: "", - Method: method, - } - - // Iterate inputs - methodType := method.Type() - inputParamCount := methodType.NumIn() - var inputs []*Parameter - for inputIndex := 0; inputIndex < inputParamCount; inputIndex++ { - input := methodType.In(inputIndex) - thisParam := newParameter("", input) - inputs = append(inputs, thisParam) - } - - boundMethod.Inputs = inputs - - outputParamCount := methodType.NumOut() - var outputs []*Parameter - for outputIndex := 0; outputIndex < outputParamCount; outputIndex++ { - output := methodType.Out(outputIndex) - thisParam := newParameter("", output) - outputs = append(outputs, thisParam) - } - boundMethod.Outputs = outputs - - // Save method in result - result = append(result, boundMethod) - - } - return result, nil -} - -// Call will attempt to call this bound method with the given args -func (b *BoundMethod) Call(args []interface{}) (interface{}, error) { - // Check inputs - expectedInputLength := len(b.Inputs) - actualInputLength := len(args) - - // If the method is variadic, we need to check the minimum number of inputs - if b.Method.Type().IsVariadic() { - if actualInputLength < expectedInputLength-1 { - return nil, fmt.Errorf("%s takes at least %d inputs. Received %d", b.Name, expectedInputLength, actualInputLength) - } - } else { - if expectedInputLength != actualInputLength { - return nil, fmt.Errorf("%s takes %d inputs. Received %d", b.Name, expectedInputLength, actualInputLength) - } - } - - /** Convert inputs to reflect values **/ - - // Create slice for the input arguments to the method call - callArgs := make([]reflect.Value, actualInputLength) - - // Iterate over given arguments - for index, arg := range args { - // Save the converted argument - if arg == nil { - callArgs[index] = reflect.Zero(b.Inputs[index].ReflectType) - continue - } - callArgs[index] = reflect.ValueOf(arg) - } - - // Do the call - callResults := b.Method.Call(callArgs) - - //** Check results **// - var returnValue interface{} - var err error - - switch len(b.Outputs) { - case 1: - // Loop over results and determine if the result - // is an error or not - for _, result := range callResults { - interfac := result.Interface() - temp, ok := interfac.(error) - if ok { - err = temp - } else { - returnValue = interfac - } - } - case 2: - returnValue = callResults[0].Interface() - if temp, ok := callResults[1].Interface().(error); ok { - err = temp - } - } - - return returnValue, err -} - -// isStructPtr returns true if the value given is a -// pointer to a struct -func isStructPtr(value interface{}) bool { - return reflect.ValueOf(value).Kind() == reflect.Ptr && - reflect.ValueOf(value).Elem().Kind() == reflect.Struct -} - -// isFunction returns true if the given value is a function -func isFunction(value interface{}) bool { - return reflect.ValueOf(value).Kind() == reflect.Func -} - -// isStructPtr returns true if the value given is a struct -func isStruct(value interface{}) bool { - return reflect.ValueOf(value).Kind() == reflect.Struct -} diff --git a/v3/pkg/application/clipboard.go b/v3/pkg/application/clipboard.go deleted file mode 100644 index e823ace92..000000000 --- a/v3/pkg/application/clipboard.go +++ /dev/null @@ -1,26 +0,0 @@ -package application - -import "C" - -type clipboardImpl interface { - setText(text string) bool - text() string -} - -type Clipboard struct { - impl clipboardImpl -} - -func newClipboard() *Clipboard { - return &Clipboard{ - impl: newClipboardImpl(), - } -} - -func (c *Clipboard) SetText(text string) bool { - return c.impl.setText(text) -} - -func (c *Clipboard) Text() string { - return c.impl.text() -} diff --git a/v3/pkg/application/clipboard_darwin.go b/v3/pkg/application/clipboard_darwin.go deleted file mode 100644 index a46ff66d5..000000000 --- a/v3/pkg/application/clipboard_darwin.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -mmacosx-version-min=10.13 - -#import -#import - -bool setClipboardText(const char* text) { - NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard]; - NSError *error = nil; - NSString *string = [NSString stringWithUTF8String:text]; - [pasteBoard clearContents]; - return [pasteBoard setString:string forType:NSPasteboardTypeString]; -} - -const char* getClipboardText() { - NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; - NSString *text = [pasteboard stringForType:NSPasteboardTypeString]; - return [text UTF8String]; -} - -*/ -import "C" -import ( - "sync" - "unsafe" -) - -var clipboardLock sync.RWMutex - -type macosClipboard struct{} - -func (m macosClipboard) setText(text string) bool { - clipboardLock.Lock() - defer clipboardLock.Unlock() - cText := C.CString(text) - success := C.setClipboardText(cText) - C.free(unsafe.Pointer(cText)) - return bool(success) -} - -func (m macosClipboard) text() string { - clipboardLock.RLock() - defer clipboardLock.RUnlock() - clipboardText := C.getClipboardText() - result := C.GoString(clipboardText) - return result -} - -func newClipboardImpl() *macosClipboard { - return &macosClipboard{} -} diff --git a/v3/pkg/application/context.go b/v3/pkg/application/context.go deleted file mode 100644 index 56b213350..000000000 --- a/v3/pkg/application/context.go +++ /dev/null @@ -1,54 +0,0 @@ -package application - -type Context struct { - // contains filtered or unexported fields - data map[string]any -} - -func newContext() *Context { - return &Context{ - data: make(map[string]any), - } -} - -const ( - clickedMenuItem string = "clickedMenuItem" - menuItemIsChecked string = "menuItemIsChecked" - contextMenuData string = "contextMenuData" -) - -func (c *Context) ClickedMenuItem() *MenuItem { - result, exists := c.data[clickedMenuItem] - if !exists { - return nil - } - return result.(*MenuItem) -} - -func (c *Context) IsChecked() bool { - result, exists := c.data[menuItemIsChecked] - if !exists { - return false - } - return result.(bool) -} -func (c *Context) ContextMenuData() any { - return c.data[contextMenuData] -} - -func (c *Context) withClickedMenuItem(menuItem *MenuItem) *Context { - c.data[clickedMenuItem] = menuItem - return c -} - -func (c *Context) withChecked(checked bool) { - c.data[menuItemIsChecked] = checked -} - -func (c *Context) withContextMenuData(data *ContextMenuData) *Context { - if data == nil { - return c - } - c.data[contextMenuData] = data.Data - return c -} diff --git a/v3/pkg/application/context_window_event.go b/v3/pkg/application/context_window_event.go deleted file mode 100644 index f9895fbd2..000000000 --- a/v3/pkg/application/context_window_event.go +++ /dev/null @@ -1,35 +0,0 @@ -package application - -var blankWindowEventContext = &WindowEventContext{} - -const ( - // FilesDropped is the event name for when files are dropped on the window - droppedFiles = "droppedFiles" -) - -type WindowEventContext struct { - // contains filtered or unexported fields - data map[string]any -} - -func (c WindowEventContext) DroppedFiles() []string { - files, ok := c.data[droppedFiles] - if !ok { - return nil - } - result, ok := files.([]string) - if !ok { - return nil - } - return result -} - -func (c WindowEventContext) setDroppedFiles(files []string) { - c.data[droppedFiles] = files -} - -func newWindowEventContext() *WindowEventContext { - return &WindowEventContext{ - data: make(map[string]any), - } -} diff --git a/v3/pkg/application/dialogs.go b/v3/pkg/application/dialogs.go deleted file mode 100644 index d7e8d6671..000000000 --- a/v3/pkg/application/dialogs.go +++ /dev/null @@ -1,442 +0,0 @@ -package application - -import "C" -import ( - "strings" - "sync" -) - -type DialogType int - -var dialogMapID = make(map[uint]struct{}) -var dialogIDLock sync.RWMutex - -func getDialogID() uint { - dialogIDLock.Lock() - defer dialogIDLock.Unlock() - var dialogID uint - for { - if _, ok := dialogMapID[dialogID]; !ok { - dialogMapID[dialogID] = struct{}{} - break - } - dialogID++ - if dialogID == 0 { - panic("no more dialog IDs") - } - } - return dialogID -} - -func freeDialogID(id uint) { - dialogIDLock.Lock() - defer dialogIDLock.Unlock() - delete(dialogMapID, id) -} - -var openFileResponses = make(map[uint]chan string) -var saveFileResponses = make(map[uint]chan string) - -const ( - InfoDialog DialogType = iota - QuestionDialog - WarningDialog - ErrorDialog - OpenDirectoryDialog -) - -type Button struct { - Label string - IsCancel bool - IsDefault bool - callback func() -} - -func (b *Button) OnClick(callback func()) { - b.callback = callback -} - -type messageDialogImpl interface { - show() -} - -type MessageDialogOptions struct { - DialogType DialogType - Title string - Message string - Buttons []*Button - Icon []byte -} - -type MessageDialog struct { - MessageDialogOptions - - // platform independent - impl messageDialogImpl -} - -var defaultTitles = map[DialogType]string{ - InfoDialog: "Information", - QuestionDialog: "Question", - WarningDialog: "Warning", - ErrorDialog: "Error", -} - -func newMessageDialog(dialogType DialogType) *MessageDialog { - return &MessageDialog{ - MessageDialogOptions: MessageDialogOptions{ - DialogType: dialogType, - Title: defaultTitles[dialogType], - }, - impl: nil, - } -} - -func (d *MessageDialog) SetTitle(title string) *MessageDialog { - d.Title = title - return d -} - -func (d *MessageDialog) Show() { - if d.impl == nil { - d.impl = newDialogImpl(d) - } - d.impl.show() -} - -func (d *MessageDialog) SetIcon(icon []byte) *MessageDialog { - d.Icon = icon - return d -} - -func (d *MessageDialog) AddButton(s string) *Button { - result := &Button{ - Label: s, - } - d.Buttons = append(d.Buttons, result) - return result -} - -func (d *MessageDialog) AddButtons(buttons []*Button) *MessageDialog { - d.Buttons = buttons - return d -} - -func (d *MessageDialog) SetDefaultButton(button *Button) *MessageDialog { - for _, b := range d.Buttons { - b.IsDefault = false - } - button.IsDefault = true - return d -} - -func (d *MessageDialog) SetCancelButton(button *Button) *MessageDialog { - for _, b := range d.Buttons { - b.IsCancel = false - } - button.IsCancel = true - return d -} - -func (d *MessageDialog) SetMessage(message string) *MessageDialog { - d.Message = message - return d -} - -type openFileDialogImpl interface { - show() ([]string, error) -} - -type FileFilter struct { - DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)" - Pattern string // semicolon separated list of extensions, EG: "*.jpg;*.png" -} - -type OpenFileDialogOptions struct { - CanChooseDirectories bool - CanChooseFiles bool - CanCreateDirectories bool - ShowHiddenFiles bool - ResolvesAliases bool - AllowsMultipleSelection bool - HideExtension bool - CanSelectHiddenExtension bool - TreatsFilePackagesAsDirectories bool - AllowsOtherFileTypes bool - Filters []FileFilter - - Title string - Message string - ButtonText string - Directory string -} - -type OpenFileDialog struct { - id uint - canChooseDirectories bool - canChooseFiles bool - canCreateDirectories bool - showHiddenFiles bool - resolvesAliases bool - allowsMultipleSelection bool - hideExtension bool - canSelectHiddenExtension bool - treatsFilePackagesAsDirectories bool - allowsOtherFileTypes bool - filters []FileFilter - - title string - message string - buttonText string - directory string - window *WebviewWindow - - impl openFileDialogImpl -} - -func (d *OpenFileDialog) CanChooseFiles(canChooseFiles bool) *OpenFileDialog { - d.canChooseFiles = canChooseFiles - return d -} - -func (d *OpenFileDialog) CanChooseDirectories(canChooseDirectories bool) *OpenFileDialog { - d.canChooseDirectories = canChooseDirectories - return d -} - -func (d *OpenFileDialog) CanCreateDirectories(canCreateDirectories bool) *OpenFileDialog { - d.canCreateDirectories = canCreateDirectories - return d -} - -func (d *OpenFileDialog) AllowsOtherFileTypes(allowsOtherFileTypes bool) *OpenFileDialog { - d.allowsOtherFileTypes = allowsOtherFileTypes - return d -} - -func (d *OpenFileDialog) ShowHiddenFiles(showHiddenFiles bool) *OpenFileDialog { - d.showHiddenFiles = showHiddenFiles - return d -} - -func (d *OpenFileDialog) HideExtension(hideExtension bool) *OpenFileDialog { - d.hideExtension = hideExtension - return d -} - -func (d *OpenFileDialog) TreatsFilePackagesAsDirectories(treatsFilePackagesAsDirectories bool) *OpenFileDialog { - d.treatsFilePackagesAsDirectories = treatsFilePackagesAsDirectories - return d -} - -func (d *OpenFileDialog) AttachToWindow(window *WebviewWindow) *OpenFileDialog { - d.window = window - return d -} - -func (d *OpenFileDialog) ResolvesAliases(resolvesAliases bool) *OpenFileDialog { - d.resolvesAliases = resolvesAliases - return d -} - -func (d *OpenFileDialog) SetTitle(title string) *OpenFileDialog { - d.title = title - return d -} - -func (d *OpenFileDialog) PromptForSingleSelection() (string, error) { - d.allowsMultipleSelection = false - if d.impl == nil { - d.impl = newOpenFileDialogImpl(d) - } - selection, err := d.impl.show() - var result string - if len(selection) > 0 { - result = selection[0] - } - - return result, err -} - -// AddFilter adds a filter to the dialog. The filter is a display name and a semicolon separated list of extensions. -// EG: AddFilter("Image Files", "*.jpg;*.png") -func (d *OpenFileDialog) AddFilter(displayName, pattern string) *OpenFileDialog { - d.filters = append(d.filters, FileFilter{ - DisplayName: strings.TrimSpace(displayName), - Pattern: strings.TrimSpace(pattern), - }) - return d -} - -func (d *OpenFileDialog) PromptForMultipleSelection() ([]string, error) { - d.allowsMultipleSelection = true - if d.impl == nil { - d.impl = newOpenFileDialogImpl(d) - } - return d.impl.show() -} - -func (d *OpenFileDialog) SetMessage(message string) *OpenFileDialog { - d.message = message - return d -} - -func (d *OpenFileDialog) SetButtonText(text string) *OpenFileDialog { - d.buttonText = text - return d -} - -func (d *OpenFileDialog) SetDirectory(directory string) *OpenFileDialog { - d.directory = directory - return d -} - -func (d *OpenFileDialog) CanSelectHiddenExtension(canSelectHiddenExtension bool) *OpenFileDialog { - d.canSelectHiddenExtension = canSelectHiddenExtension - return d -} - -func (d *OpenFileDialog) SetOptions(options *OpenFileDialogOptions) { - d.title = options.Title - d.message = options.Message - d.buttonText = options.ButtonText - d.directory = options.Directory - d.canChooseDirectories = options.CanChooseDirectories - d.canChooseFiles = options.CanChooseFiles - d.canCreateDirectories = options.CanCreateDirectories - d.showHiddenFiles = options.ShowHiddenFiles - d.resolvesAliases = options.ResolvesAliases - d.allowsMultipleSelection = options.AllowsMultipleSelection - d.hideExtension = options.HideExtension - d.canSelectHiddenExtension = options.CanSelectHiddenExtension - d.treatsFilePackagesAsDirectories = options.TreatsFilePackagesAsDirectories - d.allowsOtherFileTypes = options.AllowsOtherFileTypes - d.filters = options.Filters -} - -func newOpenFileDialog() *OpenFileDialog { - return &OpenFileDialog{ - id: getDialogID(), - canChooseDirectories: false, - canChooseFiles: true, - canCreateDirectories: true, - resolvesAliases: false, - } -} - -func newSaveFileDialog() *SaveFileDialog { - return &SaveFileDialog{ - id: getDialogID(), - canCreateDirectories: true, - } -} - -type SaveFileDialogOptions struct { - CanCreateDirectories bool - ShowHiddenFiles bool - CanSelectHiddenExtension bool - AllowOtherFileTypes bool - HideExtension bool - TreatsFilePackagesAsDirectories bool - Message string - Directory string - Filename string - ButtonText string -} - -type SaveFileDialog struct { - id uint - canCreateDirectories bool - showHiddenFiles bool - canSelectHiddenExtension bool - allowOtherFileTypes bool - hideExtension bool - treatsFilePackagesAsDirectories bool - message string - directory string - filename string - buttonText string - - window *WebviewWindow - - impl saveFileDialogImpl -} - -type saveFileDialogImpl interface { - show() (string, error) -} - -func (d *SaveFileDialog) SetOptions(options *SaveFileDialogOptions) { - d.canCreateDirectories = options.CanCreateDirectories - d.showHiddenFiles = options.ShowHiddenFiles - d.canSelectHiddenExtension = options.CanSelectHiddenExtension - d.allowOtherFileTypes = options.AllowOtherFileTypes - d.hideExtension = options.HideExtension - d.treatsFilePackagesAsDirectories = options.TreatsFilePackagesAsDirectories - d.message = options.Message - d.directory = options.Directory - d.filename = options.Filename - d.buttonText = options.ButtonText -} - -func (d *SaveFileDialog) CanCreateDirectories(canCreateDirectories bool) *SaveFileDialog { - d.canCreateDirectories = canCreateDirectories - return d -} - -func (d *SaveFileDialog) CanSelectHiddenExtension(canSelectHiddenExtension bool) *SaveFileDialog { - d.canSelectHiddenExtension = canSelectHiddenExtension - return d -} - -func (d *SaveFileDialog) ShowHiddenFiles(showHiddenFiles bool) *SaveFileDialog { - d.showHiddenFiles = showHiddenFiles - return d -} - -func (d *SaveFileDialog) SetMessage(message string) *SaveFileDialog { - d.message = message - return d -} - -func (d *SaveFileDialog) SetDirectory(directory string) *SaveFileDialog { - d.directory = directory - return d -} - -func (d *SaveFileDialog) AttachToWindow(window *WebviewWindow) *SaveFileDialog { - d.window = window - return d -} - -func (d *SaveFileDialog) PromptForSingleSelection() (string, error) { - if d.impl == nil { - d.impl = newSaveFileDialogImpl(d) - } - return d.impl.show() -} - -func (d *SaveFileDialog) SetButtonText(text string) *SaveFileDialog { - d.buttonText = text - return d -} - -func (d *SaveFileDialog) SetFilename(filename string) *SaveFileDialog { - d.filename = filename - return d -} - -func (d *SaveFileDialog) AllowsOtherFileTypes(allowOtherFileTypes bool) *SaveFileDialog { - d.allowOtherFileTypes = allowOtherFileTypes - return d -} - -func (d *SaveFileDialog) HideExtension(hideExtension bool) *SaveFileDialog { - d.hideExtension = hideExtension - return d -} - -func (d *SaveFileDialog) TreatsFilePackagesAsDirectories(treatsFilePackagesAsDirectories bool) *SaveFileDialog { - d.treatsFilePackagesAsDirectories = treatsFilePackagesAsDirectories - return d -} diff --git a/v3/pkg/application/dialogs_darwin.go b/v3/pkg/application/dialogs_darwin.go deleted file mode 100644 index ca27e7da6..000000000 --- a/v3/pkg/application/dialogs_darwin.go +++ /dev/null @@ -1,520 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -mmacosx-version-min=10.13 -framework UniformTypeIdentifiers - -#import - -#import -#import "dialogs_delegate.h" - -extern void openFileDialogCallback(uint id, char* path); -extern void openFileDialogCallbackEnd(uint id); -extern void saveFileDialogCallback(uint id, char* path); - -static void showAboutBox(char* title, char *message, void *icon, int length) { - - // run on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSAlert *alert = [[NSAlert alloc] init]; - if (title != NULL) { - [alert setMessageText:[NSString stringWithUTF8String:title]]; - free(title); - } - if (message != NULL) { - [alert setInformativeText:[NSString stringWithUTF8String:message]]; - free(message); - } - if (icon != NULL) { - NSImage *image = [[NSImage alloc] initWithData:[NSData dataWithBytes:icon length:length]]; - [alert setIcon:image]; - } - [alert setAlertStyle:NSAlertStyleInformational]; - [alert runModal]; - }); -} - - -// Create an NSAlert -static void* createAlert(int alertType, char* title, char *message, void *icon, int length) { - NSAlert *alert = [[NSAlert alloc] init]; - [alert setAlertStyle:alertType]; - if (title != NULL) { - [alert setMessageText:[NSString stringWithUTF8String:title]]; - free(title); - } - if (message != NULL) { - [alert setInformativeText:[NSString stringWithUTF8String:message]]; - free(message); - } - if (icon != NULL) { - NSImage *image = [[NSImage alloc] initWithData:[NSData dataWithBytes:icon length:length]]; - [alert setIcon:image]; - } else { - if(alertType == NSAlertStyleCritical || alertType == NSAlertStyleWarning) { - NSImage *image = [NSImage imageNamed:NSImageNameCaution]; - [alert setIcon:image]; - } else { - NSImage *image = [NSImage imageNamed:NSImageNameInfo]; - [alert setIcon:image]; - } - } - return alert; - -} - -// Run the dialog -static int dialogRunModal(void *dialog) { - NSAlert *alert = (__bridge NSAlert *)dialog; - long response = [alert runModal]; - int result; - - if( response == NSAlertFirstButtonReturn ) { - result = 0; - } - else if( response == NSAlertSecondButtonReturn ) { - result = 1; - } - else if( response == NSAlertThirdButtonReturn ) { - result = 2; - } else { - result = 3; - } - return result; -} - -// Release the dialog -static void releaseDialog(void *dialog) { - NSAlert *alert = (__bridge NSAlert *)dialog; - [alert release]; -} - -// Add a button to the dialog -static void alertAddButton(void *dialog, char *label, bool isDefault, bool isCancel) { - NSAlert *alert = (__bridge NSAlert *)dialog; - NSButton *button = [alert addButtonWithTitle:[NSString stringWithUTF8String:label]]; - free(label); - if( isDefault ) { - [button setKeyEquivalent:@"\r"]; - } else if( isCancel ) { - [button setKeyEquivalent:@"\033"]; - } else { - [button setKeyEquivalent:@""]; - } -} - -static void processOpenFileDialogResults(NSOpenPanel *panel, NSInteger result, uint dialogID) { - const char *path = NULL; - if (result == NSModalResponseOK) { - NSArray *urls = [panel URLs]; - if ([urls count] > 0) { - NSArray *urls = [panel URLs]; - for (NSURL *url in urls) { - path = [[url path] UTF8String]; - openFileDialogCallback(dialogID, (char *)path); - } - } else { - NSURL *url = [panel URL]; - path = [[url path] UTF8String]; - openFileDialogCallback(dialogID, (char *)path); - } - } - openFileDialogCallbackEnd(dialogID); -} - - -static void showOpenFileDialog(unsigned int dialogID, - bool canChooseFiles, - bool canChooseDirectories, - bool canCreateDirectories, - bool showHiddenFiles, - bool allowsMultipleSelection, - bool resolvesAliases, - bool hideExtension, - bool treatsFilePackagesAsDirectories, - bool allowsOtherFileTypes, - char *filterPatterns, - unsigned int filterPatternsCount, - char* message, - char* directory, - char* buttonText, - - void *window) { - - // run on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - - NSOpenPanel *panel = [NSOpenPanel openPanel]; - - // print out filterPatterns if length > 0 - if (filterPatternsCount > 0) { - OpenPanelDelegate *delegate = [[OpenPanelDelegate alloc] init]; - [panel setDelegate:delegate]; - // Initialise NSString with bytes and UTF8 encoding - NSString *filterPatternsString = [[NSString alloc] initWithBytes:filterPatterns length:filterPatternsCount encoding:NSUTF8StringEncoding]; - // Convert NSString to NSArray - delegate.allowedExtensions = [filterPatternsString componentsSeparatedByString:@";"]; - - // Use UTType if macOS 11 or higher to add file filters - if (@available(macOS 11, *)) { - NSMutableArray *filterTypes = [NSMutableArray array]; - // Iterate the filtertypes, create uti's that are limited to the file extensions then add - for (NSString *filterType in delegate.allowedExtensions) { - [filterTypes addObject:[UTType typeWithFilenameExtension:filterType]]; - } - [panel setAllowedContentTypes:filterTypes]; - } else { - [panel setAllowedFileTypes:delegate.allowedExtensions]; - } - - // Free the memory - free(filterPatterns); - } - - - if (message != NULL) { - [panel setMessage:[NSString stringWithUTF8String:message]]; - free(message); - } - - if (directory != NULL) { - [panel setDirectoryURL:[NSURL fileURLWithPath:[NSString stringWithUTF8String:directory]]]; - free(directory); - } - - if (buttonText != NULL) { - [panel setPrompt:[NSString stringWithUTF8String:buttonText]]; - free(buttonText); - } - - [panel setCanChooseFiles:canChooseFiles]; - [panel setCanChooseDirectories:canChooseDirectories]; - [panel setCanCreateDirectories:canCreateDirectories]; - [panel setShowsHiddenFiles:showHiddenFiles]; - [panel setAllowsMultipleSelection:allowsMultipleSelection]; - [panel setResolvesAliases:resolvesAliases]; - [panel setExtensionHidden:hideExtension]; - [panel setTreatsFilePackagesAsDirectories:treatsFilePackagesAsDirectories]; - [panel setAllowsOtherFileTypes:allowsOtherFileTypes]; - - - - if (window != NULL) { - [panel beginSheetModalForWindow:(__bridge NSWindow *)window completionHandler:^(NSInteger result) { - processOpenFileDialogResults(panel, result, dialogID); - }]; - } else { - [panel beginWithCompletionHandler:^(NSInteger result) { - processOpenFileDialogResults(panel, result, dialogID); - }]; - } - }); -} - -static void showSaveFileDialog(unsigned int dialogID, - bool canCreateDirectories, - bool showHiddenFiles, - bool canSelectHiddenExtension, - bool hideExtension, - bool treatsFilePackagesAsDirectories, - bool allowOtherFileTypes, - char* message, - char* directory, - char* buttonText, - char* filename, - void *window) { - - // run on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSSavePanel *panel = [NSSavePanel savePanel]; - - if (message != NULL) { - [panel setMessage:[NSString stringWithUTF8String:message]]; - free(message); - } - - if (directory != NULL) { - [panel setDirectoryURL:[NSURL fileURLWithPath:[NSString stringWithUTF8String:directory]]]; - free(directory); - } - - if (filename != NULL) { - [panel setNameFieldStringValue:[NSString stringWithUTF8String:filename]]; - free(filename); - } - - if (buttonText != NULL) { - [panel setPrompt:[NSString stringWithUTF8String:buttonText]]; - free(buttonText); - } - - [panel setCanCreateDirectories:canCreateDirectories]; - [panel setShowsHiddenFiles:showHiddenFiles]; - [panel setCanSelectHiddenExtension:canSelectHiddenExtension]; - [panel setExtensionHidden:hideExtension]; - [panel setTreatsFilePackagesAsDirectories:treatsFilePackagesAsDirectories]; - [panel setAllowsOtherFileTypes:allowOtherFileTypes]; - - if (window != NULL) { - [panel beginSheetModalForWindow:(__bridge NSWindow *)window completionHandler:^(NSInteger result) { - const char *path = NULL; - if (result == NSModalResponseOK) { - NSURL *url = [panel URL]; - const char *path = [[url path] UTF8String]; - } - saveFileDialogCallback(dialogID, (char *)path); - }]; - } else { - [panel beginWithCompletionHandler:^(NSInteger result) { - const char *path = NULL; - if (result == NSModalResponseOK) { - NSURL *url = [panel URL]; - const char *path = [[url path] UTF8String]; - } - saveFileDialogCallback(dialogID, (char *)path); - }]; - } - }); -} - -*/ -import "C" -import ( - "strings" - "unsafe" -) - -const NSAlertStyleWarning = C.int(0) -const NSAlertStyleInformational = C.int(1) -const NSAlertStyleCritical = C.int(2) - -var alertTypeMap = map[DialogType]C.int{ - WarningDialog: NSAlertStyleWarning, - InfoDialog: NSAlertStyleInformational, - ErrorDialog: NSAlertStyleCritical, - QuestionDialog: NSAlertStyleInformational, -} - -func (m *macosApp) showAboutDialog(title string, message string, icon []byte) { - var iconData unsafe.Pointer - if icon != nil { - iconData = unsafe.Pointer(&icon[0]) - } - C.showAboutBox(C.CString(title), C.CString(message), iconData, C.int(len(icon))) -} - -type macosDialog struct { - dialog *MessageDialog - - nsDialog unsafe.Pointer -} - -func (m *macosDialog) show() { - globalApplication.dispatchOnMainThread(func() { - - // Mac can only have 4 Buttons on a dialog - if len(m.dialog.Buttons) > 4 { - m.dialog.Buttons = m.dialog.Buttons[:4] - } - - if m.nsDialog != nil { - C.releaseDialog(m.nsDialog) - } - var title *C.char - if m.dialog.Title != "" { - title = C.CString(m.dialog.Title) - } - var message *C.char - if m.dialog.Message != "" { - message = C.CString(m.dialog.Message) - } - var iconData unsafe.Pointer - var iconLength C.int - if m.dialog.Icon != nil { - iconData = unsafe.Pointer(&m.dialog.Icon[0]) - iconLength = C.int(len(m.dialog.Icon)) - } else { - // if it's an error, use the application Icon - if m.dialog.DialogType == ErrorDialog { - iconData = unsafe.Pointer(&globalApplication.options.Icon[0]) - iconLength = C.int(len(globalApplication.options.Icon)) - } - } - - alertType, ok := alertTypeMap[m.dialog.DialogType] - if !ok { - alertType = C.NSAlertStyleInformational - } - - m.nsDialog = C.createAlert(alertType, title, message, iconData, iconLength) - - // Reverse the Buttons so that the default is on the right - reversedButtons := make([]*Button, len(m.dialog.Buttons)) - var count = 0 - for i := len(m.dialog.Buttons) - 1; i >= 0; i-- { - button := m.dialog.Buttons[i] - C.alertAddButton(m.nsDialog, C.CString(button.Label), C.bool(button.IsDefault), C.bool(button.IsCancel)) - reversedButtons[count] = m.dialog.Buttons[i] - count++ - } - - buttonPressed := int(C.dialogRunModal(m.nsDialog)) - if len(m.dialog.Buttons) > buttonPressed { - button := reversedButtons[buttonPressed] - if button.callback != nil { - button.callback() - } - } - }) - -} - -func newDialogImpl(d *MessageDialog) *macosDialog { - return &macosDialog{ - dialog: d, - } -} - -type macosOpenFileDialog struct { - dialog *OpenFileDialog -} - -func newOpenFileDialogImpl(d *OpenFileDialog) *macosOpenFileDialog { - return &macosOpenFileDialog{ - dialog: d, - } -} - -func toCString(s string) *C.char { - if s == "" { - return nil - } - return C.CString(s) -} - -func (m *macosOpenFileDialog) show() ([]string, error) { - openFileResponses[m.dialog.id] = make(chan string) - nsWindow := unsafe.Pointer(nil) - if m.dialog.window != nil { - // get NSWindow from window - nsWindow = m.dialog.window.impl.(*macosWebviewWindow).nsWindow - } - - // Massage filter patterns into macOS format - // We iterate all filter patterns, tidy them up and then join them with a semicolon - // This should produce a single string of extensions like "png;jpg;gif" - var filterPatterns string - if len(m.dialog.filters) > 0 { - var allPatterns []string - for _, filter := range m.dialog.filters { - patternComponents := strings.Split(filter.Pattern, ";") - for i, component := range patternComponents { - filterPattern := strings.TrimSpace(component) - filterPattern = strings.TrimPrefix(filterPattern, "*.") - patternComponents[i] = filterPattern - } - allPatterns = append(allPatterns, strings.Join(patternComponents, ";")) - } - filterPatterns = strings.Join(allPatterns, ";") - } - - C.showOpenFileDialog(C.uint(m.dialog.id), - C.bool(m.dialog.canChooseFiles), - C.bool(m.dialog.canChooseDirectories), - C.bool(m.dialog.canCreateDirectories), - C.bool(m.dialog.showHiddenFiles), - C.bool(m.dialog.allowsMultipleSelection), - C.bool(m.dialog.resolvesAliases), - C.bool(m.dialog.hideExtension), - C.bool(m.dialog.treatsFilePackagesAsDirectories), - C.bool(m.dialog.allowsOtherFileTypes), - toCString(filterPatterns), - C.uint(len(filterPatterns)), - toCString(m.dialog.message), - toCString(m.dialog.directory), - toCString(m.dialog.buttonText), - nsWindow) - var result []string - for filename := range openFileResponses[m.dialog.id] { - result = append(result, filename) - } - return result, nil -} - -//export openFileDialogCallback -func openFileDialogCallback(cid C.uint, cpath *C.char) { - path := C.GoString(cpath) - id := uint(cid) - channel, ok := openFileResponses[id] - if ok { - channel <- path - } else { - panic("No channel found for open file dialog") - } -} - -//export openFileDialogCallbackEnd -func openFileDialogCallbackEnd(cid C.uint) { - id := uint(cid) - channel, ok := openFileResponses[id] - if ok { - close(channel) - delete(openFileResponses, id) - freeDialogID(id) - } else { - panic("No channel found for open file dialog") - } -} - -type macosSaveFileDialog struct { - dialog *SaveFileDialog -} - -func newSaveFileDialogImpl(d *SaveFileDialog) *macosSaveFileDialog { - return &macosSaveFileDialog{ - dialog: d, - } -} - -func (m *macosSaveFileDialog) show() (string, error) { - saveFileResponses[m.dialog.id] = make(chan string) - nsWindow := unsafe.Pointer(nil) - if m.dialog.window != nil { - // get NSWindow from window - nsWindow = m.dialog.window.impl.(*macosWebviewWindow).nsWindow - } - C.showSaveFileDialog(C.uint(m.dialog.id), - C.bool(m.dialog.canCreateDirectories), - C.bool(m.dialog.showHiddenFiles), - C.bool(m.dialog.canSelectHiddenExtension), - C.bool(m.dialog.hideExtension), - C.bool(m.dialog.treatsFilePackagesAsDirectories), - C.bool(m.dialog.allowOtherFileTypes), - toCString(m.dialog.message), - toCString(m.dialog.directory), - toCString(m.dialog.buttonText), - toCString(m.dialog.filename), - nsWindow) - return <-saveFileResponses[m.dialog.id], nil -} - -//export saveFileDialogCallback -func saveFileDialogCallback(cid C.uint, cpath *C.char) { - // Covert the path to a string - path := C.GoString(cpath) - id := uint(cid) - // put response on channel - channel, ok := saveFileResponses[id] - if ok { - channel <- path - close(channel) - delete(saveFileResponses, id) - freeDialogID(id) - - } else { - panic("No channel found for save file dialog") - } -} diff --git a/v3/pkg/application/dialogs_delegate.h b/v3/pkg/application/dialogs_delegate.h deleted file mode 100644 index 07657f8b9..000000000 --- a/v3/pkg/application/dialogs_delegate.h +++ /dev/null @@ -1,14 +0,0 @@ -//go:build darwin - -#ifndef _DIALOGS_DELEGATE_H_ -#define _DIALOGS_DELEGATE_H_ - -#import -#import - -// create an NSOpenPanel delegate to handle the callback -@interface OpenPanelDelegate : NSObject -@property (nonatomic, strong) NSArray *allowedExtensions; -@end - -#endif \ No newline at end of file diff --git a/v3/pkg/application/dialogs_delegate.m b/v3/pkg/application/dialogs_delegate.m deleted file mode 100644 index 67f34e2eb..000000000 --- a/v3/pkg/application/dialogs_delegate.m +++ /dev/null @@ -1,36 +0,0 @@ -//go:build darwin - -#import "dialogs_delegate.h" - -// Override shouldEnableURL -@implementation OpenPanelDelegate -- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url { - if (url == nil) { - return NO; - } - NSFileManager *fileManager = [NSFileManager defaultManager]; - BOOL isDirectory = NO; - if ([fileManager fileExistsAtPath:url.path isDirectory:&isDirectory] && isDirectory) { - return YES; - } - if (self.allowedExtensions == nil) { - return YES; - } - NSString *extension = url.pathExtension; - if (extension == nil) { - return NO; - } - if ([extension isEqualToString:@""]) { - return NO; - } - if ([self.allowedExtensions containsObject:extension]) { - return YES; - } - return NO; -} - -@end - - - - diff --git a/v3/pkg/application/errors.go b/v3/pkg/application/errors.go deleted file mode 100644 index 747142328..000000000 --- a/v3/pkg/application/errors.go +++ /dev/null @@ -1,16 +0,0 @@ -package application - -import ( - "fmt" - "os" -) - -func Fatal(message string, args ...interface{}) { - println("*********************** FATAL ***********************") - println("There has been a catastrophic failure in your application.") - println("Please report this error at https://github.com/wailsapp/wails/issues") - println("******************** Error Details ******************") - println(fmt.Sprintf(message, args...)) - println("*********************** FATAL ***********************") - os.Exit(1) -} diff --git a/v3/pkg/application/events.go b/v3/pkg/application/events.go deleted file mode 100644 index 41ac872ff..000000000 --- a/v3/pkg/application/events.go +++ /dev/null @@ -1,160 +0,0 @@ -package application - -import ( - "encoding/json" - "sync" - - "github.com/samber/lo" -) - -var applicationEvents = make(chan uint) - -type WindowEvent struct { - WindowID uint - EventID uint -} - -var windowEvents = make(chan *WindowEvent) - -var menuItemClicked = make(chan uint) - -type WailsEvent struct { - Name string `json:"name"` - Data any `json:"data"` - Sender string `json:"sender"` -} - -func (e WailsEvent) ToJSON() string { - marshal, err := json.Marshal(&e) - if err != nil { - // TODO: Fatal error? log? - return "" - } - return string(marshal) -} - -// eventListener holds a callback function which is invoked when -// the event listened for is emitted. It has a counter which indicates -// how the total number of events it is interested in. A value of zero -// means it does not expire (default). -type eventListener struct { - callback func(*WailsEvent) // Function to call with emitted event data - counter int // The number of times this callback may be called. -1 = infinite - delete bool // Flag to indicate that this listener should be deleted -} - -// EventProcessor handles custom events -type EventProcessor struct { - // Go event listeners - listeners map[string][]*eventListener - notifyLock sync.RWMutex - dispatchEventToWindows func(*WailsEvent) -} - -func NewWailsEventProcessor(dispatchEventToWindows func(*WailsEvent)) *EventProcessor { - return &EventProcessor{ - listeners: make(map[string][]*eventListener), - dispatchEventToWindows: dispatchEventToWindows, - } -} - -// On is the equivalent of Javascript's `addEventListener` -func (e *EventProcessor) On(eventName string, callback func(event *WailsEvent)) func() { - return e.registerListener(eventName, callback, -1) -} - -// OnMultiple is the same as `On` but will unregister after `count` events -func (e *EventProcessor) OnMultiple(eventName string, callback func(event *WailsEvent), counter int) func() { - return e.registerListener(eventName, callback, counter) -} - -// Once is the same as `On` but will unregister after the first event -func (e *EventProcessor) Once(eventName string, callback func(event *WailsEvent)) func() { - return e.registerListener(eventName, callback, 1) -} - -// Emit sends an event to all listeners -func (e *EventProcessor) Emit(thisEvent *WailsEvent) { - if thisEvent == nil { - return - } - go e.dispatchEventToListeners(thisEvent) - go e.dispatchEventToWindows(thisEvent) -} - -func (e *EventProcessor) Off(eventName string) { - e.unRegisterListener(eventName) -} - -func (e *EventProcessor) OffAll() { - e.notifyLock.Lock() - defer e.notifyLock.Unlock() - e.listeners = make(map[string][]*eventListener) -} - -// registerListener provides a means of subscribing to events of type "eventName" -func (e *EventProcessor) registerListener(eventName string, callback func(*WailsEvent), counter int) func() { - // Create new eventListener - thisListener := &eventListener{ - callback: callback, - counter: counter, - delete: false, - } - e.notifyLock.Lock() - // Append the new listener to the listeners slice - e.listeners[eventName] = append(e.listeners[eventName], thisListener) - e.notifyLock.Unlock() - return func() { - e.notifyLock.Lock() - defer e.notifyLock.Unlock() - - if _, ok := e.listeners[eventName]; !ok { - return - } - e.listeners[eventName] = lo.Filter(e.listeners[eventName], func(l *eventListener, i int) bool { - return l != thisListener - }) - } -} - -// unRegisterListener provides a means of unsubscribing to events of type "eventName" -func (e *EventProcessor) unRegisterListener(eventName string) { - e.notifyLock.Lock() - defer e.notifyLock.Unlock() - delete(e.listeners, eventName) -} - -// dispatchEventToListeners calls all registered listeners event name -func (e *EventProcessor) dispatchEventToListeners(event *WailsEvent) { - - e.notifyLock.Lock() - defer e.notifyLock.Unlock() - - listeners := e.listeners[event.Name] - if listeners == nil { - return - } - - // We have a dirty flag to indicate that there are items to delete - itemsToDelete := false - - // Callback in goroutine - for _, listener := range listeners { - if listener.counter > 0 { - listener.counter-- - } - go listener.callback(event) - - if listener.counter == 0 { - listener.delete = true - itemsToDelete = true - } - } - - // Do we have items to delete? - if itemsToDelete == true { - e.listeners[event.Name] = lo.Filter(listeners, func(l *eventListener, i int) bool { - return l.delete == false - }) - } -} diff --git a/v3/pkg/application/events_test.go b/v3/pkg/application/events_test.go deleted file mode 100644 index fe921e4fd..000000000 --- a/v3/pkg/application/events_test.go +++ /dev/null @@ -1,135 +0,0 @@ -package application_test - -import ( - "sync" - "testing" - - "github.com/wailsapp/wails/v3/pkg/application" - - "github.com/matryer/is" -) - -type mockNotifier struct { - Events []*application.WailsEvent -} - -func (m *mockNotifier) dispatchEventToWindows(event *application.WailsEvent) { - m.Events = append(m.Events, event) -} - -func (m *mockNotifier) Reset() { - m.Events = []*application.WailsEvent{} -} - -func Test_EventsOn(t *testing.T) { - i := is.New(t) - notifier := &mockNotifier{} - eventProcessor := application.NewWailsEventProcessor(notifier.dispatchEventToWindows) - - // Test On - eventName := "test" - counter := 0 - var wg sync.WaitGroup - wg.Add(1) - unregisterFn := eventProcessor.On(eventName, func(event *application.WailsEvent) { - // This is called in a goroutine - counter++ - wg.Done() - }) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - wg.Wait() - i.Equal(1, counter) - - // Unregister - notifier.Reset() - unregisterFn() - counter = 0 - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - i.Equal(0, counter) - -} - -func Test_EventsOnce(t *testing.T) { - i := is.New(t) - notifier := &mockNotifier{} - eventProcessor := application.NewWailsEventProcessor(notifier.dispatchEventToWindows) - - // Test On - eventName := "test" - counter := 0 - var wg sync.WaitGroup - wg.Add(1) - unregisterFn := eventProcessor.Once(eventName, func(event *application.WailsEvent) { - // This is called in a goroutine - counter++ - wg.Done() - }) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - wg.Wait() - i.Equal(1, counter) - - // Unregister - notifier.Reset() - unregisterFn() - counter = 0 - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - i.Equal(0, counter) - -} -func Test_EventsOnMultiple(t *testing.T) { - i := is.New(t) - notifier := &mockNotifier{} - eventProcessor := application.NewWailsEventProcessor(notifier.dispatchEventToWindows) - - // Test On - eventName := "test" - counter := 0 - var wg sync.WaitGroup - wg.Add(2) - unregisterFn := eventProcessor.OnMultiple(eventName, func(event *application.WailsEvent) { - // This is called in a goroutine - counter++ - wg.Done() - }, 2) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - wg.Wait() - i.Equal(2, counter) - - // Unregister - notifier.Reset() - unregisterFn() - counter = 0 - eventProcessor.Emit(&application.WailsEvent{ - Name: "test", - Data: "test payload", - }) - i.Equal(0, counter) - -} diff --git a/v3/pkg/application/icons.go b/v3/pkg/application/icons.go deleted file mode 100644 index 13ef1f389..000000000 --- a/v3/pkg/application/icons.go +++ /dev/null @@ -1,8 +0,0 @@ -package application - -var DefaultApplicationIcon = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 64, 0, 0, 0, 64, 8, 3, 0, 0, 0, 157, 183, 129, 236, 0, 0, 1, 2, 80, 76, 84, 69, 0, 0, 0, 255, 255, 255, 20, 20, 20, 14, 14, 14, 255, 255, 255, 9, 9, 9, 103, 103, 103, 255, 255, 255, 255, 255, 255, 185, 185, 185, 255, 255, 255, 16, 16, 16, 27, 27, 27, 2, 2, 2, 23, 23, 23, 62, 62, 62, 105, 105, 105, 12, 12, 12, 21, 21, 21, 36, 36, 36, 41, 41, 41, 51, 51, 51, 55, 55, 55, 78, 78, 78, 146, 146, 146, 226, 226, 226, 0, 0, 0, 225, 225, 225, 79, 79, 79, 17, 17, 17, 76, 76, 76, 221, 221, 221, 101, 101, 101, 64, 64, 64, 223, 223, 223, 217, 217, 217, 133, 133, 133, 104, 104, 104, 94, 94, 94, 6, 6, 6, 202, 202, 202, 198, 198, 198, 110, 110, 110, 97, 97, 97, 70, 70, 70, 55, 55, 55, 13, 13, 13, 211, 211, 211, 188, 188, 188, 176, 176, 176, 117, 117, 117, 91, 91, 91, 73, 73, 73, 34, 35, 34, 27, 27, 27, 21, 21, 21, 173, 173, 173, 166, 166, 166, 161, 162, 162, 150, 150, 150, 142, 143, 143, 136, 136, 136, 119, 119, 119, 90, 90, 90, 87, 87, 87, 50, 50, 50, 44, 44, 45, 41, 41, 41, 32, 32, 32, 4, 4, 4, 214, 214, 214, 178, 178, 178, 158, 158, 158, 153, 153, 153, 148, 148, 148, 123, 123, 123, 82, 82, 82, 67, 67, 67, 66, 66, 66, 208, 208, 208, 192, 192, 192, 190, 190, 190, 184, 184, 184, 127, 127, 127, 126, 126, 126, 60, 60, 61, 204, 47, 21, 237, 0, 0, 0, 26, 116, 82, 78, 83, 0, 12, 195, 213, 16, 227, 64, 19, 14, 29, 9, 198, 164, 248, 176, 96, 59, 213, 184, 145, 130, 110, 106, 78, 37, 20, 109, 186, 18, 188, 0, 0, 2, 46, 73, 68, 65, 84, 88, 195, 237, 150, 123, 83, 26, 49, 20, 197, 89, 107, 91, 10, 84, 251, 126, 220, 128, 91, 150, 151, 96, 65, 64, 121, 169, 80, 68, 169, 90, 31, 125, 233, 247, 255, 42, 206, 238, 222, 51, 73, 112, 38, 201, 50, 227, 140, 227, 120, 254, 217, 61, 155, 156, 223, 228, 113, 179, 147, 212, 147, 30, 153, 50, 158, 187, 50, 119, 227, 95, 63, 174, 173, 184, 43, 247, 217, 91, 200, 191, 202, 82, 50, 189, 79, 235, 195, 207, 81, 82, 173, 235, 3, 120, 157, 24, 176, 162, 77, 226, 13, 37, 214, 243, 85, 21, 240, 98, 9, 192, 203, 251, 1, 52, 243, 172, 89, 232, 10, 108, 250, 161, 233, 161, 169, 104, 2, 236, 11, 214, 255, 208, 109, 177, 201, 135, 230, 0, 77, 101, 3, 64, 246, 234, 134, 110, 196, 102, 35, 52, 155, 104, 106, 154, 0, 101, 244, 170, 132, 51, 240, 21, 192, 17, 90, 234, 100, 2, 156, 163, 91, 149, 136, 242, 66, 1, 124, 131, 153, 24, 1, 93, 116, 155, 98, 65, 0, 216, 131, 57, 50, 2, 26, 74, 166, 246, 19, 102, 87, 49, 109, 50, 1, 228, 64, 139, 68, 69, 161, 0, 154, 120, 111, 152, 1, 59, 202, 82, 151, 37, 64, 206, 45, 232, 155, 1, 23, 200, 204, 148, 125, 19, 223, 137, 78, 248, 117, 72, 102, 192, 6, 50, 61, 58, 20, 10, 160, 16, 96, 119, 44, 128, 75, 100, 250, 52, 81, 1, 0, 251, 3, 11, 224, 6, 153, 22, 181, 85, 192, 152, 223, 246, 200, 2, 192, 184, 131, 121, 47, 122, 198, 235, 112, 73, 117, 254, 126, 97, 3, 160, 96, 75, 84, 137, 158, 241, 78, 92, 29, 227, 115, 203, 6, 64, 207, 109, 26, 70, 3, 248, 17, 23, 69, 149, 63, 255, 34, 27, 160, 143, 19, 51, 240, 163, 1, 48, 224, 12, 139, 97, 5, 20, 80, 176, 211, 56, 25, 3, 174, 182, 121, 92, 53, 43, 160, 197, 251, 221, 57, 141, 2, 243, 184, 50, 113, 66, 198, 100, 5, 212, 124, 6, 148, 226, 41, 199, 128, 33, 234, 219, 14, 160, 18, 23, 12, 31, 201, 170, 226, 68, 125, 238, 0, 248, 45, 164, 74, 45, 6, 176, 206, 201, 14, 224, 138, 65, 217, 233, 128, 153, 11, 224, 143, 18, 216, 225, 255, 50, 235, 47, 185, 0, 254, 201, 64, 48, 208, 1, 13, 39, 64, 71, 6, 58, 164, 1, 130, 99, 39, 192, 72, 38, 42, 252, 139, 99, 157, 144, 19, 224, 84, 38, 122, 58, 96, 203, 13, 176, 47, 160, 54, 105, 0, 127, 224, 6, 56, 16, 208, 68, 7, 140, 200, 13, 48, 22, 208, 161, 14, 152, 58, 2, 174, 17, 216, 140, 108, 69, 86, 165, 35, 160, 139, 68, 89, 7, 156, 145, 35, 160, 129, 68, 81, 7, 236, 186, 2, 106, 5, 214, 162, 189, 11, 120, 88, 151, 172, 229, 239, 137, 203, 223, 84, 179, 158, 10, 240, 214, 18, 3, 62, 165, 52, 125, 121, 155, 48, 159, 75, 47, 222, 247, 63, 100, 159, 185, 235, 221, 58, 231, 85, 121, 233, 85, 87, 165, 51, 169, 39, 61, 36, 221, 2, 115, 72, 10, 51, 166, 156, 57, 80, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} -var DefaultMacTemplateIcon = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 64, 0, 0, 0, 64, 8, 3, 0, 0, 0, 157, 183, 129, 236, 0, 0, 0, 135, 80, 76, 84, 69, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 106, 145, 255, 17, 0, 0, 0, 45, 116, 82, 78, 83, 0, 225, 11, 16, 14, 7, 26, 18, 79, 65, 23, 221, 100, 91, 176, 74, 217, 118, 95, 34, 20, 211, 201, 133, 104, 69, 149, 110, 53, 189, 167, 161, 125, 86, 76, 45, 198, 154, 143, 136, 57, 41, 185, 203, 192, 69, 76, 133, 225, 0, 0, 1, 243, 73, 68, 65, 84, 88, 195, 237, 214, 109, 111, 130, 48, 16, 7, 240, 107, 41, 34, 48, 31, 65, 116, 62, 59, 231, 220, 220, 190, 255, 231, 155, 216, 187, 28, 213, 164, 61, 98, 150, 152, 197, 255, 27, 57, 219, 254, 44, 133, 34, 240, 204, 63, 139, 110, 145, 248, 118, 120, 146, 69, 70, 158, 40, 211, 224, 166, 212, 208, 46, 165, 113, 167, 159, 64, 219, 100, 158, 74, 20, 227, 204, 185, 211, 30, 136, 163, 123, 129, 228, 111, 128, 101, 23, 179, 175, 171, 8, 139, 75, 115, 65, 77, 169, 15, 152, 43, 204, 182, 174, 198, 88, 116, 235, 226, 131, 154, 166, 30, 128, 123, 141, 234, 106, 141, 197, 91, 93, 124, 83, 211, 210, 7, 76, 169, 215, 172, 62, 131, 188, 1, 124, 81, 203, 187, 119, 13, 182, 212, 109, 124, 46, 186, 84, 12, 206, 197, 11, 207, 205, 7, 140, 168, 219, 142, 22, 132, 128, 13, 21, 95, 94, 96, 161, 120, 214, 241, 164, 1, 196, 67, 60, 62, 121, 47, 35, 79, 52, 5, 72, 85, 3, 248, 164, 227, 133, 31, 232, 53, 150, 122, 202, 64, 227, 220, 58, 126, 96, 71, 253, 246, 0, 149, 162, 188, 2, 244, 241, 176, 15, 126, 96, 64, 99, 10, 216, 43, 6, 248, 138, 142, 3, 64, 202, 51, 29, 53, 1, 130, 243, 210, 15, 240, 90, 25, 88, 53, 129, 35, 30, 109, 130, 155, 137, 198, 64, 113, 249, 168, 16, 120, 167, 93, 225, 7, 248, 134, 29, 194, 204, 110, 28, 123, 77, 11, 250, 90, 135, 0, 234, 57, 177, 203, 94, 245, 44, 64, 87, 119, 14, 33, 160, 67, 59, 166, 204, 47, 19, 64, 224, 64, 139, 17, 4, 18, 236, 185, 218, 217, 145, 8, 76, 112, 94, 113, 16, 208, 116, 191, 28, 236, 0, 11, 208, 14, 57, 66, 16, 136, 115, 4, 134, 246, 148, 45, 64, 15, 150, 207, 48, 0, 184, 233, 172, 243, 134, 0, 170, 21, 8, 128, 137, 226, 12, 13, 62, 21, 49, 91, 9, 80, 41, 206, 6, 92, 96, 47, 1, 126, 20, 167, 231, 2, 43, 144, 0, 39, 30, 144, 103, 46, 176, 16, 1, 125, 30, 208, 199, 39, 20, 165, 16, 1, 107, 30, 48, 35, 128, 60, 17, 176, 105, 252, 162, 11, 188, 200, 128, 185, 187, 102, 12, 228, 153, 12, 248, 80, 148, 145, 11, 172, 65, 6, 28, 21, 101, 233, 2, 187, 48, 192, 255, 109, 124, 223, 206, 248, 174, 148, 1, 252, 40, 157, 186, 192, 1, 132, 192, 130, 70, 164, 46, 48, 144, 2, 113, 132, 185, 46, 111, 129, 199, 122, 201, 202, 238, 124, 79, 188, 255, 77, 85, 71, 173, 129, 236, 206, 183, 245, 196, 192, 149, 80, 26, 45, 143, 201, 204, 237, 162, 104, 19, 73, 99, 52, 60, 243, 72, 249, 5, 251, 207, 25, 192, 218, 106, 27, 249, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} -var WailsLogoBlack = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 128, 0, 0, 0, 128, 8, 3, 0, 0, 0, 244, 224, 145, 249, 0, 0, 3, 0, 80, 76, 84, 69, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 254, 254, 254, 8, 1, 1, 227, 49, 49, 255, 255, 255, 5, 5, 5, 0, 0, 0, 6, 1, 1, 203, 44, 44, 227, 50, 50, 35, 6, 6, 160, 22, 29, 244, 53, 53, 150, 17, 26, 234, 51, 51, 36, 6, 6, 7, 1, 1, 59, 10, 12, 255, 255, 255, 6, 5, 5, 13, 2, 2, 23, 4, 4, 212, 212, 212, 15, 2, 2, 234, 51, 51, 188, 35, 38, 171, 27, 33, 78, 17, 17, 240, 52, 52, 231, 231, 231, 51, 8, 10, 26, 26, 26, 76, 76, 76, 163, 163, 163, 171, 30, 34, 218, 42, 45, 210, 42, 44, 214, 45, 46, 23, 23, 23, 13, 13, 13, 195, 41, 42, 225, 49, 49, 135, 25, 28, 42, 7, 8, 66, 13, 14, 148, 29, 31, 111, 23, 23, 154, 154, 154, 225, 48, 48, 204, 39, 42, 198, 38, 41, 146, 28, 30, 131, 12, 21, 105, 17, 20, 186, 35, 38, 139, 139, 139, 88, 12, 16, 48, 7, 9, 186, 30, 36, 5, 5, 5, 219, 47, 47, 183, 31, 36, 35, 35, 35, 247, 246, 246, 209, 44, 45, 253, 252, 252, 116, 116, 116, 118, 23, 24, 11, 2, 2, 77, 14, 15, 126, 23, 25, 33, 5, 6, 253, 55, 55, 128, 5, 17, 55, 9, 10, 242, 242, 242, 145, 15, 24, 27, 4, 5, 238, 238, 238, 225, 225, 225, 179, 29, 35, 179, 179, 179, 20, 3, 3, 171, 34, 36, 40, 40, 40, 166, 33, 35, 89, 18, 18, 235, 235, 235, 207, 207, 207, 93, 93, 93, 43, 8, 9, 53, 8, 10, 230, 46, 48, 196, 33, 38, 115, 4, 16, 194, 194, 194, 60, 60, 60, 140, 18, 25, 170, 170, 170, 103, 103, 103, 160, 34, 34, 99, 20, 21, 135, 28, 29, 72, 14, 15, 146, 146, 146, 148, 30, 31, 206, 36, 40, 12, 12, 12, 64, 10, 12, 22, 3, 4, 191, 34, 38, 163, 23, 30, 163, 30, 33, 72, 11, 13, 217, 47, 47, 47, 47, 47, 153, 22, 28, 216, 216, 216, 156, 28, 32, 221, 221, 221, 51, 51, 51, 96, 17, 19, 178, 36, 38, 104, 17, 20, 38, 4, 6, 141, 26, 29, 222, 47, 48, 68, 68, 68, 131, 131, 131, 87, 87, 87, 114, 13, 19, 202, 202, 202, 24, 3, 4, 229, 229, 229, 189, 189, 189, 148, 148, 148, 91, 8, 15, 100, 17, 20, 125, 10, 19, 203, 40, 43, 145, 20, 27, 62, 62, 62, 191, 39, 41, 104, 20, 22, 194, 194, 194, 173, 173, 173, 85, 15, 17, 203, 203, 203, 206, 19, 21, 198, 198, 198, 159, 159, 159, 163, 24, 30, 126, 126, 126, 212, 44, 45, 108, 108, 108, 248, 248, 248, 134, 25, 27, 129, 23, 26, 141, 26, 29, 186, 116, 121, 64, 8, 12, 99, 16, 19, 250, 234, 235, 227, 80, 80, 227, 201, 204, 224, 103, 104, 35, 35, 35, 243, 187, 187, 163, 73, 80, 114, 114, 114, 183, 183, 183, 10, 0, 1, 255, 238, 238, 146, 40, 50, 212, 71, 73, 230, 148, 149, 0, 0, 0, 203, 53, 56, 86, 14, 17, 0, 0, 0, 227, 50, 50, 255, 255, 255, 5, 1, 1, 224, 48, 49, 216, 45, 46, 221, 47, 48, 218, 46, 47, 214, 44, 46, 210, 43, 45, 4, 4, 4, 2, 2, 2, 205, 41, 43, 225, 49, 49, 194, 36, 40, 212, 44, 45, 222, 48, 48, 184, 32, 36, 209, 42, 44, 219, 47, 47, 198, 37, 41, 177, 29, 34, 188, 34, 38, 192, 35, 39, 202, 39, 42, 204, 40, 42, 200, 39, 41, 251, 251, 251, 187, 33, 37, 180, 30, 35, 172, 27, 33, 182, 31, 36, 218, 48, 48, 247, 54, 54, 236, 51, 52, 229, 50, 50, 207, 41, 43, 190, 34, 38, 175, 28, 33, 129, 8, 19, 8, 8, 8, 196, 36, 40, 169, 25, 31, 245, 245, 245, 154, 34, 34, 164, 24, 30, 154, 19, 27, 133, 9, 20, 231, 50, 50, 167, 24, 31, 135, 11, 21, 120, 5, 17, 240, 52, 52, 125, 7, 18, 170, 26, 32, 141, 14, 23, 137, 12, 22, 214, 41, 44, 157, 20, 28, 145, 15, 24, 190, 31, 37, 211, 42, 44, 223, 43, 46, 203, 36, 40, 148, 31, 32, 173, 26, 32, 162, 22, 29, 199, 35, 40, 220, 43, 46, 210, 37, 40, 183, 27, 34, 153, 33, 33, 124, 0, 8, 252, 54, 55, 29, 193, 86, 184, 0, 0, 0, 182, 116, 82, 78, 83, 254, 251, 225, 249, 254, 254, 254, 249, 244, 246, 247, 245, 249, 248, 254, 254, 254, 254, 241, 251, 241, 246, 246, 246, 241, 239, 252, 250, 247, 247, 247, 251, 247, 243, 242, 241, 235, 230, 254, 250, 249, 248, 246, 244, 243, 242, 242, 241, 240, 240, 237, 252, 250, 247, 245, 244, 243, 241, 240, 233, 252, 251, 250, 249, 248, 248, 247, 245, 244, 243, 242, 242, 241, 239, 230, 251, 250, 249, 248, 247, 246, 245, 245, 245, 244, 244, 243, 242, 242, 242, 239, 237, 235, 235, 233, 254, 251, 251, 245, 245, 244, 243, 242, 240, 238, 236, 236, 235, 234, 253, 253, 252, 249, 248, 248, 246, 246, 245, 245, 245, 243, 243, 242, 240, 240, 239, 254, 254, 253, 250, 247, 246, 242, 241, 238, 234, 231, 231, 249, 249, 248, 248, 241, 239, 236, 235, 235, 234, 230, 226, 253, 252, 247, 246, 239, 236, 236, 235, 234, 229, 224, 220, 234, 224, 223, 246, 246, 243, 240, 239, 234, 234, 224, 223, 211, 248, 247, 244, 239, 229, 215, 214, 81, 124, 11, 18, 0, 0, 15, 238, 73, 68, 65, 84, 120, 218, 236, 152, 107, 72, 83, 97, 24, 199, 223, 211, 216, 106, 43, 117, 46, 73, 209, 173, 240, 131, 115, 160, 203, 162, 108, 134, 137, 146, 161, 89, 138, 129, 40, 245, 65, 81, 8, 180, 40, 74, 51, 36, 232, 250, 33, 250, 208, 141, 130, 8, 34, 232, 126, 161, 160, 123, 59, 109, 78, 151, 59, 187, 232, 212, 57, 156, 171, 188, 49, 97, 115, 154, 121, 77, 69, 187, 16, 61, 239, 57, 59, 30, 187, 88, 218, 205, 47, 253, 81, 16, 207, 129, 255, 239, 125, 222, 231, 242, 190, 7, 205, 81, 19, 234, 217, 212, 127, 128, 255, 0, 255, 1, 254, 3, 252, 7, 248, 71, 0, 104, 118, 1, 16, 31, 126, 103, 17, 64, 163, 81, 7, 75, 166, 66, 248, 251, 0, 176, 124, 34, 102, 7, 0, 168, 103, 7, 0, 150, 191, 104, 91, 244, 226, 41, 2, 240, 215, 1, 144, 6, 150, 31, 181, 49, 5, 169, 53, 234, 217, 0, 128, 85, 103, 239, 8, 123, 185, 143, 167, 230, 171, 103, 1, 0, 85, 169, 137, 245, 201, 1, 61, 81, 217, 106, 62, 154, 5, 0, 240, 12, 137, 8, 120, 229, 77, 140, 81, 107, 102, 167, 15, 8, 139, 162, 95, 82, 100, 216, 114, 2, 88, 254, 53, 0, 68, 31, 73, 14, 108, 12, 52, 147, 175, 10, 133, 120, 3, 48, 67, 213, 191, 2, 64, 8, 220, 68, 203, 23, 188, 212, 106, 201, 87, 243, 179, 185, 4, 252, 123, 0, 8, 49, 63, 85, 88, 154, 42, 88, 126, 208, 153, 141, 222, 26, 146, 244, 42, 194, 241, 83, 2, 17, 66, 132, 178, 119, 31, 202, 205, 221, 13, 239, 253, 62, 0, 226, 60, 17, 237, 249, 21, 76, 112, 90, 216, 75, 221, 10, 146, 36, 155, 183, 137, 114, 243, 50, 182, 159, 59, 158, 178, 163, 108, 79, 68, 97, 218, 245, 188, 96, 244, 7, 34, 128, 144, 70, 163, 249, 42, 232, 4, 15, 241, 230, 45, 12, 61, 22, 114, 72, 146, 23, 127, 102, 99, 243, 11, 18, 251, 39, 151, 149, 100, 37, 189, 29, 29, 144, 239, 148, 238, 75, 217, 181, 155, 248, 115, 91, 128, 64, 60, 33, 18, 166, 134, 134, 30, 243, 59, 148, 23, 180, 107, 125, 252, 241, 19, 105, 39, 79, 158, 206, 28, 186, 112, 113, 73, 143, 121, 5, 246, 23, 40, 100, 181, 111, 223, 214, 39, 200, 148, 251, 195, 131, 121, 4, 194, 131, 1, 253, 9, 0, 209, 134, 9, 207, 163, 5, 5, 42, 85, 103, 102, 230, 144, 88, 236, 1, 13, 122, 196, 171, 19, 189, 100, 13, 137, 69, 81, 249, 31, 19, 100, 167, 227, 130, 66, 132, 216, 67, 195, 231, 220, 127, 19, 96, 81, 124, 122, 65, 122, 122, 123, 123, 39, 86, 183, 79, 253, 253, 253, 125, 125, 253, 251, 78, 45, 32, 205, 102, 198, 63, 240, 212, 233, 184, 24, 63, 17, 161, 198, 238, 26, 244, 39, 199, 241, 238, 130, 55, 5, 175, 105, 189, 121, 243, 6, 147, 116, 131, 121, 223, 80, 95, 230, 234, 196, 102, 202, 76, 9, 40, 240, 215, 6, 22, 30, 19, 17, 104, 10, 243, 223, 173, 130, 77, 39, 95, 23, 48, 246, 237, 96, 15, 254, 24, 160, 255, 194, 41, 1, 44, 95, 75, 81, 20, 246, 143, 74, 85, 131, 176, 249, 95, 232, 3, 40, 60, 29, 251, 115, 0, 96, 159, 185, 250, 8, 105, 214, 105, 181, 0, 32, 32, 169, 230, 232, 60, 110, 233, 127, 161, 17, 17, 165, 221, 92, 0, 112, 4, 186, 47, 36, 11, 180, 58, 179, 150, 6, 32, 5, 100, 216, 89, 110, 4, 252, 149, 78, 184, 240, 120, 39, 11, 0, 9, 216, 9, 203, 167, 106, 106, 124, 0, 2, 129, 246, 213, 14, 33, 156, 65, 126, 21, 224, 167, 232, 56, 178, 217, 71, 59, 95, 183, 99, 125, 250, 212, 174, 186, 144, 76, 213, 84, 232, 116, 58, 179, 153, 142, 128, 182, 71, 26, 12, 254, 51, 7, 64, 124, 62, 193, 19, 206, 35, 112, 251, 6, 253, 120, 19, 36, 39, 219, 95, 127, 250, 244, 41, 253, 193, 213, 171, 79, 228, 84, 57, 172, 31, 0, 24, 127, 60, 2, 52, 232, 87, 0, 54, 169, 182, 166, 93, 186, 124, 244, 224, 193, 184, 179, 215, 175, 199, 239, 42, 45, 141, 217, 126, 45, 239, 208, 33, 63, 137, 100, 195, 177, 208, 208, 80, 209, 162, 212, 121, 72, 13, 112, 60, 30, 82, 19, 185, 233, 111, 148, 119, 175, 222, 90, 119, 231, 230, 200, 139, 242, 138, 10, 6, 0, 139, 92, 80, 132, 112, 6, 254, 194, 22, 160, 12, 255, 177, 241, 142, 177, 177, 177, 218, 90, 199, 199, 143, 31, 45, 9, 9, 197, 197, 197, 78, 75, 130, 116, 245, 153, 51, 189, 189, 178, 156, 136, 136, 136, 195, 135, 15, 43, 183, 93, 186, 28, 119, 240, 68, 220, 221, 91, 55, 230, 62, 187, 127, 251, 252, 7, 5, 248, 87, 112, 17, 104, 142, 141, 11, 23, 209, 37, 56, 243, 28, 64, 126, 153, 227, 98, 104, 169, 131, 254, 32, 183, 187, 171, 163, 183, 169, 13, 96, 156, 150, 186, 214, 122, 151, 235, 221, 104, 67, 203, 240, 192, 192, 128, 252, 253, 251, 145, 17, 106, 228, 230, 141, 103, 107, 31, 37, 159, 127, 145, 88, 201, 1, 128, 200, 72, 177, 71, 166, 138, 73, 5, 123, 254, 47, 148, 225, 26, 79, 151, 103, 124, 124, 220, 221, 213, 213, 1, 238, 77, 109, 224, 95, 235, 112, 56, 19, 18, 156, 22, 139, 165, 14, 4, 40, 245, 70, 163, 203, 101, 181, 157, 127, 120, 7, 150, 159, 88, 89, 89, 14, 0, 19, 57, 72, 30, 41, 233, 22, 123, 198, 146, 246, 109, 145, 16, 184, 13, 206, 16, 0, 8, 6, 59, 60, 254, 227, 110, 32, 96, 0, 176, 63, 152, 55, 54, 214, 181, 50, 214, 86, 171, 221, 214, 208, 96, 48, 24, 244, 45, 59, 63, 84, 42, 76, 12, 0, 36, 33, 179, 3, 130, 172, 118, 177, 103, 208, 191, 203, 146, 159, 149, 178, 148, 7, 81, 208, 160, 153, 1, 32, 76, 224, 198, 225, 159, 12, 192, 16, 176, 0, 118, 155, 13, 8, 90, 244, 38, 147, 105, 216, 4, 254, 44, 0, 16, 144, 177, 233, 125, 98, 241, 160, 187, 183, 169, 214, 245, 33, 118, 85, 204, 34, 64, 224, 207, 100, 22, 32, 32, 240, 239, 29, 252, 14, 64, 29, 7, 0, 254, 24, 160, 90, 175, 215, 211, 1, 96, 139, 192, 12, 9, 160, 234, 28, 26, 242, 248, 187, 155, 106, 157, 150, 86, 195, 123, 69, 206, 150, 84, 60, 138, 103, 116, 59, 6, 130, 49, 127, 102, 7, 32, 5, 113, 14, 50, 91, 80, 199, 248, 51, 0, 6, 12, 80, 173, 55, 49, 59, 48, 1, 144, 88, 246, 166, 175, 79, 76, 3, 88, 234, 140, 46, 123, 165, 96, 65, 212, 242, 16, 2, 16, 102, 52, 142, 215, 184, 219, 152, 44, 156, 148, 134, 190, 60, 0, 6, 216, 130, 9, 0, 253, 23, 0, 218, 21, 178, 130, 238, 254, 33, 0, 232, 162, 1, 108, 134, 106, 147, 206, 251, 106, 175, 146, 78, 6, 52, 109, 0, 32, 216, 179, 58, 43, 43, 43, 41, 33, 161, 177, 241, 109, 125, 126, 126, 254, 187, 119, 163, 163, 59, 119, 182, 128, 101, 245, 240, 176, 205, 138, 183, 224, 123, 17, 16, 72, 11, 218, 89, 0, 135, 165, 213, 101, 51, 232, 203, 43, 106, 4, 129, 61, 11, 10, 99, 132, 184, 49, 76, 23, 0, 169, 67, 54, 108, 200, 205, 13, 15, 207, 88, 179, 102, 77, 198, 185, 167, 231, 206, 197, 239, 223, 127, 226, 32, 116, 200, 43, 87, 174, 236, 136, 173, 182, 114, 57, 48, 25, 128, 74, 62, 249, 186, 179, 187, 111, 72, 60, 56, 222, 209, 230, 176, 212, 27, 49, 64, 141, 25, 247, 166, 158, 176, 213, 235, 1, 65, 141, 190, 5, 224, 205, 232, 32, 192, 227, 17, 68, 248, 202, 1, 43, 222, 2, 122, 7, 38, 85, 161, 54, 81, 166, 242, 1, 184, 59, 218, 156, 141, 70, 123, 67, 181, 169, 66, 167, 37, 177, 154, 123, 2, 78, 21, 225, 230, 132, 166, 57, 142, 159, 35, 172, 137, 171, 78, 149, 79, 106, 172, 140, 149, 3, 118, 22, 160, 210, 7, 160, 171, 209, 173, 144, 14, 150, 168, 218, 251, 251, 134, 60, 80, 133, 181, 206, 198, 122, 91, 165, 110, 133, 192, 27, 248, 106, 9, 86, 96, 96, 192, 198, 232, 109, 146, 175, 139, 238, 30, 63, 56, 52, 116, 33, 136, 199, 227, 137, 68, 11, 69, 172, 126, 120, 156, 0, 130, 114, 187, 1, 50, 2, 0, 184, 54, 160, 141, 245, 119, 119, 148, 165, 247, 251, 170, 208, 146, 180, 45, 38, 99, 87, 233, 226, 73, 42, 93, 124, 98, 123, 234, 215, 0, 126, 215, 226, 227, 142, 170, 84, 91, 105, 157, 62, 189, 108, 95, 225, 230, 205, 57, 57, 7, 138, 160, 114, 126, 72, 32, 183, 227, 28, 228, 0, 42, 180, 145, 37, 227, 80, 55, 101, 157, 108, 17, 180, 22, 175, 10, 18, 254, 236, 176, 129, 30, 171, 121, 68, 176, 36, 232, 248, 81, 149, 184, 107, 236, 227, 91, 16, 20, 154, 181, 97, 88, 113, 246, 199, 4, 187, 26, 228, 54, 253, 36, 128, 10, 115, 98, 150, 127, 71, 71, 83, 147, 44, 179, 143, 173, 66, 251, 251, 176, 168, 229, 18, 4, 61, 128, 147, 102, 138, 171, 25, 33, 20, 102, 47, 45, 221, 159, 86, 38, 75, 106, 117, 185, 92, 198, 122, 107, 228, 89, 248, 176, 242, 35, 2, 133, 220, 62, 169, 17, 234, 142, 72, 253, 59, 232, 190, 37, 203, 20, 15, 194, 159, 184, 8, 140, 182, 145, 192, 249, 105, 208, 3, 166, 60, 29, 48, 85, 192, 94, 245, 16, 1, 20, 219, 227, 148, 155, 165, 43, 203, 223, 143, 8, 224, 203, 194, 243, 41, 174, 101, 176, 20, 226, 92, 244, 136, 193, 196, 1, 196, 186, 25, 127, 135, 83, 70, 23, 129, 163, 177, 222, 218, 208, 98, 208, 55, 7, 68, 47, 163, 123, 0, 31, 253, 168, 19, 34, 196, 81, 240, 130, 253, 130, 138, 148, 133, 81, 209, 151, 133, 220, 134, 177, 239, 240, 225, 53, 166, 20, 136, 107, 23, 203, 171, 77, 62, 0, 93, 164, 172, 11, 252, 233, 174, 157, 80, 226, 113, 247, 182, 57, 49, 64, 53, 174, 144, 192, 128, 176, 156, 248, 96, 14, 97, 170, 50, 228, 40, 64, 4, 33, 10, 9, 143, 63, 6, 0, 236, 191, 153, 39, 204, 51, 158, 40, 91, 18, 180, 126, 255, 153, 247, 44, 64, 141, 34, 169, 11, 183, 108, 122, 110, 183, 38, 149, 184, 155, 218, 156, 117, 70, 12, 0, 109, 192, 108, 246, 6, 44, 129, 129, 128, 48, 194, 148, 0, 223, 82, 128, 24, 227, 42, 182, 7, 17, 194, 96, 73, 120, 204, 150, 229, 202, 85, 57, 210, 83, 43, 19, 229, 250, 106, 182, 13, 188, 40, 238, 98, 166, 22, 30, 23, 245, 198, 164, 146, 94, 60, 9, 236, 6, 26, 0, 174, 73, 230, 230, 158, 37, 201, 202, 92, 176, 226, 79, 243, 251, 192, 36, 10, 130, 71, 164, 238, 206, 13, 138, 143, 75, 91, 181, 39, 75, 26, 187, 50, 114, 120, 0, 107, 88, 15, 98, 27, 97, 108, 47, 187, 124, 60, 173, 92, 249, 73, 62, 0, 61, 13, 0, 162, 204, 100, 79, 64, 244, 62, 92, 150, 252, 233, 127, 33, 65, 161, 75, 243, 74, 139, 142, 42, 203, 54, 103, 73, 243, 173, 54, 251, 232, 168, 29, 132, 207, 35, 204, 56, 100, 59, 113, 69, 164, 108, 204, 193, 46, 31, 138, 216, 106, 139, 58, 0, 57, 232, 178, 1, 64, 141, 153, 34, 105, 9, 180, 100, 96, 79, 216, 129, 245, 244, 76, 154, 238, 205, 40, 116, 235, 78, 7, 238, 12, 173, 117, 220, 97, 208, 200, 29, 71, 216, 78, 172, 72, 106, 114, 56, 28, 190, 229, 27, 1, 208, 16, 123, 101, 207, 187, 58, 43, 51, 138, 40, 48, 247, 33, 80, 176, 19, 81, 69, 208, 11, 171, 208, 180, 0, 128, 224, 176, 177, 201, 193, 28, 136, 184, 3, 25, 119, 28, 193, 4, 176, 3, 197, 240, 142, 147, 243, 135, 199, 166, 148, 120, 104, 38, 13, 45, 166, 114, 157, 153, 244, 122, 155, 89, 145, 164, 183, 39, 96, 111, 202, 38, 52, 237, 187, 97, 72, 132, 177, 141, 61, 15, 77, 6, 96, 8, 32, 194, 90, 193, 138, 149, 109, 181, 240, 10, 216, 51, 143, 225, 97, 131, 60, 39, 68, 41, 55, 54, 84, 3, 0, 117, 68, 145, 184, 224, 11, 133, 45, 129, 153, 132, 166, 5, 128, 212, 104, 67, 132, 171, 118, 2, 192, 200, 0, 128, 108, 116, 130, 235, 20, 210, 194, 229, 65, 251, 243, 157, 206, 198, 137, 240, 211, 209, 49, 69, 6, 101, 23, 15, 219, 241, 59, 212, 197, 203, 75, 119, 111, 242, 155, 172, 77, 126, 25, 211, 4, 192, 95, 60, 55, 68, 188, 171, 229, 142, 196, 32, 60, 229, 7, 228, 242, 200, 216, 28, 229, 150, 165, 248, 27, 136, 48, 101, 212, 210, 200, 44, 31, 236, 153, 228, 88, 145, 198, 91, 127, 164, 133, 174, 66, 111, 216, 234, 45, 162, 95, 190, 158, 35, 13, 38, 248, 204, 174, 185, 252, 52, 17, 196, 113, 124, 38, 174, 84, 164, 166, 41, 143, 182, 1, 12, 175, 42, 65, 16, 75, 193, 70, 56, 152, 240, 8, 66, 72, 8, 120, 144, 34, 68, 14, 36, 42, 207, 152, 16, 12, 1, 73, 56, 233, 149, 40, 49, 49, 106, 248, 47, 102, 183, 11, 145, 214, 202, 74, 137, 138, 104, 210, 199, 5, 131, 135, 30, 122, 241, 32, 112, 49, 6, 127, 211, 97, 186, 45, 22, 221, 88, 123, 210, 111, 160, 205, 46, 179, 251, 253, 252, 126, 251, 155, 157, 71, 248, 72, 167, 196, 180, 18, 97, 142, 3, 75, 163, 242, 139, 179, 142, 154, 92, 203, 49, 122, 37, 188, 27, 201, 73, 219, 183, 215, 44, 252, 88, 223, 80, 102, 205, 216, 182, 3, 0, 10, 236, 86, 24, 58, 38, 219, 171, 161, 49, 29, 138, 92, 76, 90, 139, 80, 37, 128, 36, 188, 93, 31, 91, 43, 175, 131, 13, 191, 222, 106, 51, 70, 204, 28, 193, 55, 66, 119, 38, 190, 190, 97, 181, 17, 157, 166, 65, 207, 240, 149, 151, 144, 174, 74, 121, 53, 218, 9, 148, 229, 96, 160, 202, 118, 3, 140, 84, 103, 141, 0, 156, 96, 247, 195, 167, 221, 177, 186, 66, 231, 249, 123, 185, 93, 153, 204, 28, 162, 81, 111, 150, 93, 248, 229, 213, 59, 150, 126, 218, 47, 64, 25, 173, 152, 12, 235, 125, 62, 217, 43, 130, 106, 253, 198, 64, 129, 179, 205, 196, 7, 4, 237, 0, 156, 160, 238, 180, 173, 166, 173, 218, 124, 140, 5, 206, 205, 213, 90, 205, 173, 92, 123, 79, 195, 135, 236, 179, 57, 170, 56, 107, 34, 184, 61, 178, 228, 5, 0, 134, 16, 10, 20, 213, 223, 182, 16, 226, 1, 4, 205, 0, 188, 18, 31, 92, 224, 129, 67, 4, 220, 92, 149, 139, 228, 79, 236, 172, 179, 240, 95, 176, 85, 146, 119, 178, 132, 16, 115, 125, 196, 47, 114, 201, 203, 33, 67, 81, 86, 107, 54, 31, 16, 180, 3, 0, 1, 179, 57, 122, 215, 43, 103, 238, 236, 198, 75, 30, 62, 216, 43, 203, 74, 248, 18, 180, 45, 209, 135, 21, 49, 14, 65, 132, 215, 144, 35, 151, 47, 82, 52, 3, 0, 1, 247, 78, 174, 227, 142, 12, 88, 43, 67, 245, 113, 127, 89, 86, 140, 215, 192, 7, 215, 116, 200, 34, 23, 27, 147, 130, 17, 189, 115, 152, 141, 73, 26, 0, 180, 109, 91, 229, 56, 6, 54, 192, 159, 61, 125, 31, 91, 164, 203, 161, 201, 108, 226, 33, 57, 206, 125, 127, 72, 100, 226, 3, 130, 49, 2, 111, 134, 19, 108, 76, 210, 12, 240, 27, 127, 218, 249, 249, 211, 87, 162, 59, 133, 94, 111, 193, 67, 106, 80, 93, 101, 240, 139, 25, 92, 94, 250, 171, 200, 161, 96, 81, 22, 157, 160, 16, 148, 58, 0, 98, 254, 137, 225, 103, 208, 72, 141, 78, 12, 41, 192, 189, 29, 145, 112, 240, 144, 140, 198, 160, 97, 95, 111, 131, 9, 10, 74, 21, 0, 252, 109, 3, 60, 253, 44, 124, 176, 167, 242, 134, 154, 187, 8, 130, 252, 12, 85, 85, 102, 37, 213, 228, 179, 69, 75, 170, 25, 240, 80, 127, 216, 40, 137, 79, 63, 175, 55, 177, 160, 247, 96, 70, 117, 148, 112, 126, 126, 138, 0, 136, 249, 179, 244, 243, 167, 207, 229, 13, 223, 210, 176, 238, 77, 5, 0, 185, 96, 24, 26, 88, 75, 168, 190, 248, 122, 15, 53, 91, 216, 172, 250, 23, 74, 9, 32, 234, 175, 86, 191, 204, 253, 99, 210, 183, 241, 213, 93, 58, 50, 64, 227, 31, 13, 175, 172, 44, 169, 213, 39, 30, 82, 216, 129, 9, 74, 19, 128, 234, 207, 58, 95, 50, 127, 49, 148, 117, 37, 109, 0, 224, 111, 26, 53, 174, 174, 194, 184, 167, 246, 189, 159, 0, 244, 195, 196, 149, 182, 71, 144, 185, 88, 11, 239, 127, 190, 75, 229, 79, 170, 218, 33, 236, 65, 105, 2, 176, 156, 233, 8, 211, 55, 92, 36, 98, 160, 10, 36, 213, 126, 179, 153, 184, 210, 3, 128, 135, 39, 246, 230, 246, 162, 250, 78, 245, 57, 185, 246, 78, 165, 11, 0, 209, 159, 212, 245, 239, 252, 47, 217, 127, 128, 63, 1, 64, 160, 216, 167, 27, 190, 18, 254, 148, 112, 204, 26, 36, 30, 242, 99, 245, 148, 91, 109, 163, 61, 3, 232, 111, 197, 233, 38, 84, 110, 164, 29, 0, 97, 16, 251, 66, 236, 211, 67, 98, 194, 84, 241, 55, 75, 60, 102, 237, 19, 227, 192, 166, 113, 19, 189, 159, 102, 128, 138, 17, 171, 125, 164, 135, 148, 89, 173, 35, 165, 164, 127, 193, 110, 191, 137, 98, 87, 247, 88, 237, 118, 235, 211, 113, 226, 142, 53, 110, 128, 51, 119, 137, 231, 192, 13, 247, 47, 140, 88, 251, 85, 55, 184, 114, 222, 218, 55, 213, 247, 164, 236, 50, 65, 90, 1, 26, 243, 36, 65, 55, 136, 30, 233, 164, 150, 25, 60, 37, 8, 186, 6, 196, 19, 136, 26, 116, 146, 32, 52, 245, 144, 45, 126, 147, 153, 22, 104, 92, 198, 50, 12, 24, 231, 238, 11, 146, 206, 142, 1, 144, 19, 61, 207, 147, 64, 66, 119, 41, 217, 210, 12, 80, 44, 9, 197, 141, 21, 157, 210, 118, 119, 79, 69, 147, 180, 121, 85, 189, 182, 98, 90, 218, 222, 150, 174, 207, 147, 45, 78, 84, 166, 219, 20, 166, 27, 161, 1, 3, 104, 156, 146, 58, 117, 253, 60, 99, 112, 98, 48, 15, 174, 0, 130, 199, 38, 237, 0, 63, 168, 45, 99, 21, 213, 129, 40, 12, 79, 112, 96, 226, 237, 21, 210, 5, 99, 163, 229, 150, 22, 194, 138, 105, 5, 69, 16, 162, 85, 36, 54, 194, 150, 34, 110, 167, 178, 168, 213, 194, 46, 139, 203, 178, 246, 11, 187, 237, 240, 151, 201, 35, 204, 11, 92, 200, 155, 220, 99, 226, 36, 123, 183, 138, 183, 187, 163, 112, 156, 113, 78, 230, 227, 255, 231, 76, 166, 118, 34, 128, 209, 154, 200, 123, 31, 142, 0, 134, 250, 110, 17, 73, 234, 42, 142, 222, 58, 87, 192, 37, 128, 113, 83, 247, 217, 61, 1, 119, 215, 50, 210, 9, 198, 156, 43, 197, 173, 163, 56, 150, 101, 88, 24, 192, 3, 6, 139, 13, 143, 209, 31, 181, 0, 49, 203, 82, 141, 0, 92, 112, 116, 28, 166, 21, 48, 230, 136, 49, 44, 103, 0, 91, 194, 182, 111, 117, 66, 36, 219, 67, 174, 224, 151, 217, 84, 171, 82, 4, 224, 238, 5, 216, 57, 71, 156, 181, 246, 1, 175, 38, 67, 45, 112, 15, 202, 59, 161, 242, 158, 1, 220, 237, 17, 243, 86, 230, 185, 65, 130, 192, 106, 230, 0, 165, 128, 0, 6, 77, 201, 88, 84, 188, 12, 127, 19, 128, 53, 17, 226, 4, 251, 211, 6, 130, 220, 1, 87, 32, 174, 123, 168, 184, 122, 87, 178, 198, 18, 138, 207, 152, 190, 123, 148, 110, 56, 9, 82, 210, 0, 52, 62, 19, 32, 9, 170, 122, 164, 152, 2, 71, 240, 151, 3, 236, 39, 120, 207, 10, 149, 109, 38, 64, 213, 7, 6, 19, 114, 217, 101, 122, 133, 81, 7, 188, 235, 200, 76, 144, 33, 9, 50, 215, 130, 36, 101, 241, 68, 132, 252, 201, 148, 97, 113, 128, 182, 15, 238, 173, 48, 108, 225, 180, 67, 162, 95, 190, 163, 17, 80, 221, 137, 155, 242, 37, 149, 173, 207, 158, 47, 242, 42, 89, 34, 22, 239, 185, 221, 4, 90, 179, 160, 64, 46, 133, 172, 48, 192, 47, 130, 174, 8, 229, 186, 16, 21, 160, 174, 39, 69, 70, 139, 67, 109, 107, 4, 80, 215, 34, 147, 194, 228, 121, 67, 3, 176, 69, 15, 74, 57, 236, 219, 98, 68, 48, 64, 178, 13, 194, 194, 0, 213, 61, 20, 135, 125, 239, 10, 10, 194, 201, 78, 185, 198, 138, 192, 190, 158, 5, 240, 42, 53, 0, 213, 10, 39, 207, 53, 128, 83, 1, 149, 206, 247, 131, 153, 80, 182, 156, 6, 239, 105, 78, 81, 0, 227, 245, 108, 155, 111, 110, 132, 82, 176, 218, 23, 128, 136, 109, 5, 20, 0, 206, 243, 186, 107, 7, 228, 121, 114, 240, 229, 130, 172, 22, 237, 154, 113, 97, 110, 126, 58, 70, 121, 134, 43, 1, 228, 1, 28, 124, 99, 28, 206, 10, 80, 137, 233, 51, 37, 224, 160, 207, 249, 251, 160, 79, 158, 38, 25, 44, 222, 178, 11, 184, 177, 225, 10, 162, 223, 163, 255, 163, 36, 167, 102, 139, 253, 190, 3, 142, 101, 245, 10, 11, 216, 1, 49, 239, 79, 217, 129, 199, 113, 247, 81, 11, 32, 111, 7, 232, 197, 65, 107, 168, 98, 248, 119, 23, 128, 91, 15, 113, 103, 155, 21, 65, 187, 142, 158, 82, 128, 95, 74, 1, 216, 180, 15, 106, 49, 184, 126, 157, 20, 3, 184, 1, 176, 50, 101, 64, 193, 42, 167, 0, 209, 217, 110, 192, 54, 229, 26, 20, 244, 219, 97, 45, 128, 238, 52, 3, 104, 12, 144, 180, 186, 145, 102, 177, 73, 5, 49, 7, 196, 254, 170, 50, 100, 239, 187, 177, 245, 198, 34, 119, 247, 96, 205, 168, 155, 218, 89, 157, 83, 247, 77, 202, 233, 114, 108, 125, 125, 164, 0, 236, 145, 102, 62, 55, 50, 123, 107, 251, 213, 195, 120, 60, 182, 38, 68, 156, 42, 244, 106, 119, 85, 199, 114, 245, 250, 5, 1, 218, 166, 105, 150, 210, 144, 207, 48, 204, 164, 203, 74, 151, 152, 106, 78, 191, 203, 9, 99, 62, 231, 239, 172, 198, 98, 49, 106, 50, 90, 255, 95, 175, 100, 236, 231, 168, 142, 133, 90, 116, 9, 161, 44, 14, 160, 111, 145, 58, 100, 45, 76, 186, 58, 230, 51, 191, 63, 60, 76, 27, 251, 49, 240, 223, 93, 203, 255, 12, 59, 24, 117, 192, 168, 3, 70, 29, 48, 234, 128, 81, 7, 140, 58, 96, 212, 1, 84, 7, 0, 13, 207, 230, 190, 92, 185, 148, 184, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} -var WailsLogoBlackTransparent = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 128, 0, 0, 0, 128, 8, 3, 0, 0, 0, 244, 224, 145, 249, 0, 0, 2, 250, 80, 76, 84, 69, 0, 0, 0, 227, 50, 50, 36, 32, 32, 201, 41, 45, 29, 29, 29, 227, 50, 49, 153, 23, 31, 225, 45, 46, 30, 30, 30, 198, 33, 33, 226, 47, 47, 227, 50, 50, 30, 30, 30, 226, 50, 50, 206, 41, 43, 30, 30, 30, 183, 31, 36, 185, 32, 37, 30, 30, 30, 228, 50, 50, 30, 30, 30, 30, 30, 30, 219, 47, 47, 30, 30, 30, 228, 50, 50, 28, 28, 28, 192, 35, 38, 173, 27, 33, 187, 33, 37, 227, 50, 50, 228, 50, 50, 30, 30, 30, 205, 40, 43, 215, 44, 45, 208, 42, 44, 178, 29, 35, 29, 29, 29, 183, 31, 36, 29, 29, 29, 33, 33, 33, 197, 37, 40, 210, 43, 44, 197, 37, 40, 30, 30, 30, 29, 29, 29, 29, 29, 29, 226, 49, 49, 225, 49, 49, 220, 47, 47, 30, 30, 30, 29, 29, 29, 30, 30, 30, 29, 29, 29, 192, 36, 39, 29, 29, 29, 167, 24, 31, 212, 43, 45, 206, 41, 43, 29, 29, 29, 30, 30, 30, 222, 48, 48, 30, 30, 30, 163, 24, 27, 119, 5, 16, 204, 40, 43, 196, 37, 40, 178, 29, 35, 177, 29, 35, 227, 50, 50, 164, 23, 30, 226, 49, 49, 217, 45, 47, 162, 23, 30, 172, 27, 33, 228, 50, 50, 227, 49, 49, 200, 38, 40, 30, 30, 30, 29, 29, 29, 29, 29, 29, 31, 31, 31, 150, 18, 26, 166, 24, 31, 227, 50, 49, 178, 30, 34, 228, 50, 50, 190, 34, 38, 30, 30, 30, 205, 40, 43, 30, 30, 30, 207, 41, 43, 176, 28, 34, 226, 49, 49, 195, 37, 40, 30, 30, 30, 199, 38, 41, 30, 30, 30, 127, 8, 19, 28, 28, 28, 210, 34, 36, 214, 45, 46, 200, 38, 41, 131, 11, 21, 190, 34, 38, 227, 49, 49, 190, 34, 38, 191, 34, 39, 192, 35, 39, 186, 32, 37, 226, 49, 50, 30, 30, 30, 216, 46, 46, 171, 27, 32, 199, 37, 41, 146, 16, 26, 141, 14, 25, 211, 47, 48, 120, 0, 3, 136, 15, 25, 158, 21, 29, 203, 39, 42, 218, 46, 47, 208, 42, 43, 156, 20, 28, 227, 49, 49, 191, 34, 39, 172, 27, 33, 184, 31, 36, 30, 30, 30, 204, 40, 42, 208, 42, 44, 120, 5, 17, 207, 41, 44, 204, 41, 44, 186, 32, 37, 148, 17, 25, 227, 50, 49, 224, 48, 49, 227, 49, 49, 151, 18, 26, 228, 50, 50, 125, 7, 18, 156, 20, 28, 130, 4, 17, 152, 19, 27, 177, 29, 34, 151, 18, 26, 229, 50, 51, 204, 40, 43, 189, 34, 38, 213, 44, 45, 227, 49, 49, 126, 8, 19, 145, 16, 24, 130, 9, 20, 162, 23, 29, 232, 52, 51, 254, 253, 253, 219, 75, 77, 218, 46, 46, 196, 37, 40, 184, 32, 36, 211, 43, 44, 152, 19, 27, 201, 39, 41, 165, 24, 30, 175, 28, 34, 123, 7, 18, 182, 31, 35, 170, 26, 32, 212, 43, 45, 125, 7, 18, 172, 27, 33, 247, 217, 217, 127, 8, 19, 141, 14, 23, 198, 37, 40, 118, 4, 16, 220, 196, 199, 155, 61, 69, 226, 108, 109, 233, 151, 151, 188, 111, 117, 178, 86, 92, 130, 9, 20, 119, 5, 16, 122, 6, 18, 138, 13, 23, 238, 223, 225, 197, 142, 146, 237, 173, 174, 139, 19, 28, 220, 47, 48, 31, 31, 31, 227, 50, 50, 215, 45, 46, 219, 46, 47, 224, 48, 49, 213, 44, 45, 221, 47, 48, 209, 42, 44, 33, 33, 33, 222, 48, 48, 246, 54, 54, 207, 41, 43, 205, 40, 43, 192, 34, 38, 217, 45, 46, 226, 49, 49, 211, 42, 44, 200, 38, 41, 194, 36, 40, 190, 33, 38, 232, 51, 51, 203, 40, 42, 188, 33, 37, 186, 32, 37, 229, 50, 50, 197, 37, 40, 184, 32, 36, 131, 10, 21, 180, 29, 35, 169, 25, 32, 178, 29, 34, 199, 38, 41, 182, 31, 35, 123, 6, 17, 236, 51, 51, 174, 27, 33, 172, 26, 32, 164, 23, 30, 139, 13, 23, 128, 7, 18, 136, 11, 21, 242, 52, 53, 176, 28, 34, 202, 38, 41, 167, 24, 31, 143, 14, 24, 153, 18, 27, 148, 16, 25, 238, 52, 52, 223, 45, 47, 161, 22, 30, 219, 43, 46, 206, 38, 42, 199, 34, 39, 215, 41, 44, 158, 21, 28, 195, 35, 39, 183, 30, 35, 160, 21, 29, 250, 55, 55, 253, 55, 55, 105, 176, 83, 104, 0, 0, 0, 193, 116, 82, 78, 83, 0, 254, 5, 5, 8, 250, 7, 11, 252, 8, 27, 194, 246, 168, 18, 249, 251, 29, 241, 54, 233, 212, 23, 221, 170, 20, 252, 252, 249, 246, 225, 186, 177, 33, 252, 250, 56, 50, 38, 14, 253, 248, 248, 175, 156, 149, 89, 65, 251, 204, 194, 162, 127, 43, 25, 252, 251, 249, 226, 168, 124, 92, 22, 253, 247, 231, 208, 90, 83, 82, 38, 249, 248, 247, 234, 147, 146, 142, 114, 85, 31, 246, 239, 238, 229, 207, 201, 181, 160, 135, 119, 102, 98, 81, 74, 71, 66, 52, 44, 254, 251, 249, 246, 245, 229, 191, 180, 136, 126, 110, 107, 76, 74, 59, 37, 26, 10, 253, 252, 245, 241, 168, 168, 168, 159, 157, 136, 112, 99, 95, 88, 247, 243, 227, 221, 220, 214, 202, 187, 181, 133, 105, 48, 18, 15, 239, 233, 219, 215, 211, 198, 180, 151, 90, 74, 63, 47, 250, 245, 244, 239, 238, 233, 207, 197, 194, 191, 173, 171, 150, 139, 123, 119, 243, 211, 196, 108, 88, 250, 244, 243, 238, 235, 232, 231, 229, 190, 139, 246, 242, 239, 236, 219, 38, 121, 14, 209, 0, 0, 13, 162, 73, 68, 65, 84, 120, 218, 236, 152, 87, 76, 147, 97, 20, 134, 91, 177, 24, 52, 154, 18, 19, 98, 4, 13, 208, 144, 80, 46, 132, 27, 34, 77, 8, 171, 64, 41, 112, 131, 130, 33, 160, 33, 70, 89, 130, 1, 65, 209, 168, 64, 84, 196, 129, 162, 56, 113, 239, 189, 247, 30, 233, 78, 41, 180, 20, 126, 104, 75, 203, 42, 171, 12, 129, 150, 173, 38, 158, 239, 231, 47, 85, 131, 8, 13, 200, 133, 188, 225, 134, 64, 250, 62, 223, 251, 157, 239, 156, 3, 164, 25, 205, 104, 70, 51, 154, 209, 140, 254, 19, 217, 4, 146, 166, 85, 254, 33, 14, 164, 105, 148, 77, 200, 82, 127, 210, 52, 202, 63, 66, 123, 136, 52, 125, 10, 12, 89, 82, 180, 136, 68, 178, 32, 77, 131, 144, 233, 234, 253, 88, 81, 196, 220, 233, 241, 7, 157, 159, 79, 209, 98, 193, 41, 211, 226, 111, 69, 34, 205, 217, 184, 180, 27, 227, 112, 60, 73, 211, 36, 215, 211, 156, 110, 50, 5, 91, 132, 96, 44, 44, 44, 44, 173, 172, 172, 44, 73, 255, 72, 112, 124, 155, 67, 9, 221, 24, 133, 220, 186, 223, 129, 180, 153, 244, 111, 4, 135, 28, 22, 254, 246, 230, 41, 225, 248, 100, 236, 248, 249, 145, 31, 219, 184, 111, 138, 137, 217, 100, 61, 37, 158, 191, 23, 153, 67, 200, 74, 56, 62, 133, 163, 36, 71, 230, 167, 50, 163, 179, 147, 147, 110, 39, 174, 90, 149, 152, 25, 181, 198, 125, 193, 164, 24, 207, 154, 53, 90, 93, 91, 30, 73, 79, 203, 63, 119, 246, 204, 153, 168, 121, 152, 22, 142, 207, 225, 40, 233, 225, 126, 225, 5, 154, 242, 190, 190, 202, 220, 13, 201, 107, 156, 108, 38, 251, 57, 32, 203, 181, 96, 121, 248, 240, 189, 119, 133, 59, 242, 30, 61, 186, 182, 239, 216, 177, 240, 189, 75, 180, 24, 178, 39, 43, 47, 209, 106, 6, 251, 250, 20, 225, 96, 238, 126, 116, 18, 125, 143, 60, 121, 114, 248, 222, 189, 194, 194, 91, 183, 222, 62, 124, 248, 240, 245, 235, 184, 184, 12, 93, 243, 151, 47, 93, 93, 157, 157, 93, 157, 84, 46, 134, 201, 40, 28, 228, 175, 28, 28, 210, 132, 223, 204, 98, 66, 238, 147, 171, 163, 183, 234, 247, 120, 123, 215, 215, 183, 180, 180, 168, 213, 106, 29, 168, 25, 244, 5, 105, 197, 54, 10, 25, 132, 252, 57, 152, 239, 141, 59, 209, 78, 94, 164, 41, 208, 218, 55, 45, 224, 15, 26, 97, 192, 1, 154, 195, 174, 92, 34, 115, 248, 124, 25, 242, 39, 119, 207, 207, 79, 159, 178, 22, 120, 214, 27, 101, 96, 2, 192, 9, 208, 241, 101, 124, 144, 12, 252, 41, 221, 17, 54, 164, 41, 212, 225, 250, 250, 61, 166, 4, 192, 94, 167, 11, 187, 194, 226, 243, 197, 200, 95, 38, 227, 80, 176, 149, 174, 83, 58, 3, 45, 11, 213, 120, 21, 32, 0, 93, 70, 179, 78, 157, 177, 98, 155, 152, 47, 68, 254, 124, 228, 175, 84, 110, 52, 243, 131, 9, 89, 224, 26, 227, 4, 233, 111, 213, 40, 130, 22, 117, 70, 134, 26, 66, 8, 139, 103, 241, 133, 60, 49, 1, 64, 161, 104, 119, 78, 110, 195, 3, 89, 90, 90, 25, 101, 9, 223, 64, 33, 234, 226, 32, 253, 150, 45, 91, 182, 196, 125, 90, 225, 227, 38, 230, 241, 132, 4, 0, 153, 223, 122, 192, 198, 188, 252, 189, 242, 189, 188, 142, 28, 29, 223, 212, 58, 187, 7, 153, 111, 201, 120, 246, 242, 229, 94, 15, 49, 79, 202, 19, 10, 137, 43, 224, 99, 199, 93, 205, 188, 255, 180, 188, 125, 121, 121, 121, 59, 64, 119, 238, 100, 101, 101, 221, 191, 159, 29, 29, 205, 100, 6, 164, 166, 158, 219, 228, 228, 228, 238, 238, 96, 109, 237, 181, 96, 142, 149, 5, 81, 136, 123, 212, 207, 94, 125, 120, 250, 224, 197, 69, 55, 30, 87, 202, 35, 0, 64, 28, 178, 39, 196, 102, 105, 86, 216, 103, 194, 26, 7, 154, 154, 58, 144, 170, 65, 182, 182, 108, 118, 65, 65, 193, 149, 240, 240, 220, 220, 220, 147, 39, 97, 160, 36, 110, 216, 96, 191, 61, 50, 50, 52, 52, 212, 51, 244, 213, 211, 247, 23, 46, 60, 120, 206, 234, 151, 130, 191, 9, 128, 172, 116, 201, 59, 227, 133, 79, 101, 51, 20, 112, 172, 122, 235, 215, 175, 134, 166, 38, 0, 104, 108, 104, 107, 171, 209, 212, 13, 85, 41, 42, 203, 75, 74, 6, 7, 85, 125, 114, 121, 123, 123, 69, 49, 72, 34, 145, 136, 122, 47, 62, 184, 112, 225, 197, 197, 117, 235, 4, 92, 174, 212, 148, 128, 76, 73, 15, 235, 218, 122, 227, 126, 26, 170, 105, 51, 9, 12, 6, 67, 211, 114, 144, 45, 18, 141, 6, 16, 212, 42, 5, 80, 0, 70, 89, 153, 170, 182, 86, 14, 20, 18, 81, 233, 186, 139, 31, 159, 227, 246, 92, 34, 1, 188, 8, 57, 110, 65, 186, 78, 67, 245, 114, 191, 44, 39, 146, 89, 10, 216, 218, 24, 4, 9, 64, 4, 144, 193, 112, 8, 154, 186, 42, 72, 1, 0, 22, 47, 46, 43, 115, 118, 118, 150, 203, 43, 42, 42, 138, 29, 139, 123, 233, 224, 47, 16, 152, 0, 144, 63, 133, 173, 238, 234, 28, 104, 106, 24, 170, 203, 205, 140, 49, 155, 0, 1, 116, 252, 2, 96, 74, 0, 34, 0, 0, 252, 26, 214, 137, 192, 255, 215, 4, 148, 241, 234, 102, 4, 80, 221, 86, 53, 168, 242, 181, 223, 61, 199, 44, 130, 134, 32, 34, 129, 134, 134, 182, 26, 184, 1, 34, 1, 240, 71, 87, 128, 238, 0, 7, 16, 137, 68, 165, 35, 0, 66, 28, 128, 195, 200, 80, 127, 233, 234, 252, 218, 212, 88, 83, 87, 89, 214, 91, 154, 115, 106, 227, 92, 51, 8, 130, 218, 130, 140, 53, 64, 3, 81, 145, 236, 236, 22, 35, 193, 13, 212, 202, 127, 7, 144, 26, 1, 56, 172, 176, 250, 102, 2, 160, 170, 178, 76, 94, 204, 21, 178, 14, 120, 158, 55, 131, 64, 131, 178, 135, 240, 135, 134, 134, 80, 250, 40, 126, 120, 8, 144, 63, 4, 128, 106, 96, 4, 192, 84, 2, 32, 25, 101, 133, 183, 26, 7, 232, 0, 128, 242, 50, 185, 68, 196, 21, 43, 101, 199, 67, 22, 78, 148, 128, 185, 2, 196, 102, 179, 109, 109, 209, 67, 172, 82, 160, 103, 168, 130, 55, 216, 43, 1, 79, 73, 236, 31, 0, 196, 100, 59, 239, 22, 29, 2, 48, 116, 52, 104, 20, 37, 170, 118, 73, 41, 151, 39, 86, 106, 177, 132, 249, 254, 115, 240, 166, 62, 110, 130, 252, 212, 115, 169, 169, 169, 1, 1, 76, 38, 51, 58, 58, 58, 59, 59, 59, 57, 57, 57, 41, 41, 41, 20, 20, 233, 219, 31, 11, 254, 163, 0, 112, 114, 226, 188, 213, 8, 96, 192, 80, 13, 0, 139, 93, 124, 24, 116, 150, 155, 219, 146, 37, 176, 162, 5, 47, 90, 182, 224, 15, 43, 174, 229, 108, 203, 95, 101, 5, 115, 103, 172, 201, 180, 230, 114, 143, 15, 74, 64, 244, 27, 0, 159, 197, 142, 171, 71, 0, 248, 35, 168, 171, 108, 239, 239, 151, 234, 101, 24, 214, 221, 173, 213, 118, 23, 21, 97, 17, 135, 198, 127, 19, 99, 55, 177, 53, 219, 122, 124, 140, 1, 24, 1, 208, 48, 182, 27, 8, 138, 131, 43, 232, 26, 6, 176, 243, 245, 101, 8, 4, 44, 55, 10, 18, 74, 1, 163, 140, 130, 112, 36, 109, 45, 40, 45, 45, 221, 203, 203, 43, 221, 218, 164, 209, 8, 208, 13, 154, 8, 160, 13, 16, 1, 16, 9, 240, 93, 12, 77, 213, 91, 227, 116, 198, 71, 16, 191, 225, 113, 76, 204, 238, 213, 203, 140, 242, 247, 95, 182, 122, 217, 66, 139, 223, 1, 214, 62, 185, 87, 120, 235, 209, 62, 208, 181, 107, 55, 110, 220, 188, 121, 115, 21, 232, 250, 245, 168, 177, 23, 170, 221, 219, 244, 62, 224, 255, 51, 0, 159, 190, 220, 208, 81, 109, 27, 166, 30, 121, 4, 190, 246, 187, 108, 198, 49, 0, 143, 166, 175, 61, 123, 248, 221, 142, 107, 199, 6, 26, 135, 160, 216, 203, 203, 203, 161, 122, 69, 62, 127, 35, 200, 209, 231, 252, 2, 32, 102, 209, 12, 168, 115, 217, 134, 53, 119, 118, 26, 112, 0, 185, 132, 113, 10, 122, 192, 248, 118, 67, 171, 244, 252, 212, 232, 172, 29, 126, 5, 154, 193, 246, 222, 222, 10, 121, 113, 206, 223, 8, 124, 244, 116, 32, 32, 0, 164, 66, 183, 120, 3, 222, 185, 53, 236, 48, 226, 17, 148, 171, 42, 4, 122, 222, 231, 16, 87, 132, 48, 206, 209, 188, 32, 237, 28, 51, 57, 51, 209, 215, 69, 212, 163, 228, 221, 29, 251, 223, 47, 187, 24, 64, 48, 146, 128, 56, 118, 121, 117, 3, 248, 215, 212, 81, 217, 93, 80, 131, 168, 13, 56, 87, 56, 10, 120, 74, 14, 244, 128, 137, 253, 133, 62, 199, 218, 105, 205, 227, 80, 251, 189, 87, 61, 73, 99, 42, 229, 106, 143, 135, 17, 64, 76, 103, 119, 192, 220, 64, 99, 67, 97, 23, 212, 137, 191, 194, 18, 85, 133, 72, 32, 21, 202, 180, 216, 202, 131, 171, 109, 38, 188, 27, 45, 8, 76, 217, 109, 243, 199, 164, 28, 54, 165, 236, 138, 58, 209, 227, 65, 12, 67, 225, 122, 26, 225, 143, 150, 23, 187, 32, 67, 35, 0, 148, 213, 226, 0, 124, 50, 7, 211, 46, 57, 224, 25, 72, 50, 95, 38, 95, 167, 152, 93, 81, 73, 145, 246, 215, 79, 236, 189, 202, 112, 164, 27, 219, 0, 207, 45, 190, 3, 236, 9, 255, 146, 50, 234, 114, 124, 20, 213, 22, 227, 0, 28, 50, 66, 32, 239, 135, 129, 96, 166, 142, 90, 59, 197, 48, 179, 147, 50, 55, 36, 158, 244, 189, 236, 226, 220, 94, 12, 213, 95, 10, 222, 165, 4, 128, 148, 23, 107, 219, 48, 108, 143, 251, 171, 92, 168, 141, 26, 52, 138, 138, 69, 92, 30, 0, 112, 0, 129, 140, 105, 149, 9, 59, 83, 44, 38, 184, 165, 7, 48, 163, 179, 238, 220, 78, 244, 203, 189, 18, 111, 7, 31, 44, 71, 59, 161, 28, 223, 135, 24, 142, 142, 142, 198, 87, 200, 163, 211, 8, 127, 124, 101, 112, 86, 181, 95, 14, 71, 143, 0, 7, 16, 203, 0, 0, 103, 80, 66, 49, 156, 94, 141, 15, 132, 241, 114, 88, 223, 86, 208, 106, 170, 240, 85, 8, 215, 240, 58, 0, 4, 196, 44, 68, 1, 172, 103, 185, 121, 80, 27, 145, 61, 238, 143, 22, 22, 121, 241, 182, 204, 240, 190, 197, 42, 57, 62, 11, 101, 208, 135, 71, 186, 177, 114, 229, 193, 9, 45, 40, 78, 126, 125, 26, 90, 93, 29, 218, 70, 236, 42, 137, 149, 148, 88, 71, 192, 223, 145, 78, 95, 47, 224, 201, 120, 241, 13, 104, 103, 82, 24, 127, 1, 240, 74, 67, 239, 15, 170, 98, 43, 36, 2, 174, 80, 172, 108, 253, 86, 212, 218, 10, 95, 184, 190, 125, 111, 93, 26, 226, 58, 254, 61, 205, 221, 175, 132, 70, 197, 239, 214, 180, 17, 226, 254, 12, 6, 221, 81, 196, 147, 41, 149, 250, 75, 46, 192, 104, 58, 62, 242, 103, 72, 79, 185, 223, 134, 153, 45, 2, 0, 254, 202, 136, 136, 165, 193, 9, 75, 71, 148, 16, 156, 48, 207, 51, 112, 34, 25, 208, 168, 196, 78, 108, 220, 72, 99, 99, 125, 24, 162, 30, 189, 76, 95, 122, 245, 84, 100, 84, 74, 114, 165, 130, 10, 246, 68, 252, 40, 28, 71, 1, 221, 213, 250, 114, 41, 3, 111, 3, 193, 59, 253, 3, 29, 206, 187, 186, 46, 52, 201, 213, 213, 97, 66, 183, 64, 165, 42, 140, 43, 169, 179, 139, 139, 139, 92, 210, 175, 215, 11, 114, 78, 216, 223, 221, 181, 201, 1, 122, 156, 85, 102, 159, 194, 174, 196, 120, 124, 84, 28, 30, 30, 208, 70, 31, 247, 139, 28, 185, 168, 13, 4, 31, 220, 56, 138, 223, 4, 9, 126, 208, 102, 254, 46, 9, 132, 97, 28, 127, 95, 228, 56, 50, 12, 34, 184, 41, 67, 27, 29, 202, 37, 112, 144, 72, 8, 7, 215, 168, 73, 104, 17, 34, 155, 130, 38, 49, 154, 4, 149, 134, 64, 205, 177, 165, 169, 63, 227, 245, 39, 94, 200, 157, 118, 130, 173, 110, 210, 162, 120, 184, 40, 244, 220, 251, 88, 167, 114, 147, 220, 125, 254, 129, 239, 243, 189, 247, 121, 223, 231, 199, 225, 80, 112, 19, 248, 214, 167, 147, 105, 47, 243, 14, 198, 205, 213, 211, 105, 82, 55, 6, 6, 60, 28, 158, 155, 137, 198, 171, 72, 124, 227, 16, 228, 96, 141, 105, 35, 150, 53, 11, 194, 70, 17, 252, 236, 3, 95, 221, 158, 170, 234, 129, 162, 239, 14, 141, 47, 225, 191, 82, 3, 104, 31, 245, 225, 102, 190, 29, 147, 147, 140, 146, 128, 75, 64, 41, 132, 160, 29, 164, 121, 65, 216, 218, 48, 2, 189, 221, 209, 245, 110, 228, 246, 241, 201, 122, 215, 121, 31, 153, 6, 58, 61, 227, 243, 99, 125, 132, 238, 32, 12, 5, 179, 218, 10, 226, 194, 200, 120, 3, 98, 101, 94, 16, 92, 27, 69, 80, 106, 151, 146, 96, 124, 23, 76, 88, 115, 29, 81, 207, 254, 237, 131, 126, 176, 159, 119, 17, 215, 199, 40, 88, 91, 188, 66, 16, 194, 192, 187, 29, 222, 52, 25, 78, 76, 227, 214, 236, 22, 161, 71, 227, 250, 216, 32, 182, 148, 11, 120, 249, 221, 185, 161, 151, 33, 148, 23, 4, 108, 10, 29, 64, 242, 53, 209, 62, 232, 47, 134, 68, 190, 165, 58, 14, 14, 4, 70, 25, 194, 67, 96, 133, 52, 228, 163, 253, 250, 147, 207, 195, 191, 207, 143, 83, 178, 160, 149, 9, 16, 150, 153, 128, 242, 102, 65, 128, 9, 65, 36, 182, 114, 202, 245, 85, 44, 140, 184, 170, 82, 104, 63, 22, 53, 10, 120, 121, 238, 165, 43, 8, 76, 211, 176, 32, 216, 198, 142, 161, 175, 130, 125, 208, 71, 251, 138, 2, 94, 113, 83, 184, 23, 147, 189, 84, 88, 163, 175, 97, 131, 98, 155, 126, 147, 235, 163, 125, 220, 84, 66, 0, 240, 183, 200, 32, 62, 156, 13, 229, 53, 134, 242, 108, 46, 95, 120, 206, 37, 27, 86, 136, 168, 95, 95, 181, 111, 64, 251, 7, 126, 2, 136, 207, 217, 252, 182, 21, 151, 57, 79, 92, 178, 65, 63, 85, 85, 67, 120, 250, 11, 125, 243, 222, 197, 137, 193, 131, 223, 109, 133, 36, 185, 163, 81, 209, 6, 253, 70, 29, 245, 77, 251, 8, 156, 129, 135, 56, 137, 169, 111, 97, 31, 207, 160, 32, 17, 39, 65, 253, 74, 168, 178, 148, 125, 108, 9, 202, 132, 35, 226, 44, 47, 169, 49, 234, 155, 246, 87, 2, 208, 210, 196, 81, 196, 95, 1, 237, 79, 129, 122, 31, 110, 63, 74, 28, 116, 240, 49, 208, 16, 148, 68, 0, 237, 7, 91, 15, 45, 251, 48, 192, 33, 89, 90, 78, 156, 115, 70, 28, 135, 216, 15, 178, 30, 108, 63, 166, 3, 110, 122, 51, 208, 12, 40, 42, 188, 122, 12, 172, 226, 31, 127, 252, 248, 10, 216, 230, 198, 1, 254, 100, 240, 209, 44, 8, 226, 21, 42, 33, 128, 23, 9, 72, 192, 0, 136, 13, 130, 53, 110, 52, 115, 0, 59, 31, 39, 59, 17, 128, 153, 97, 20, 140, 2, 0, 113, 100, 172, 194, 48, 8, 69, 209, 71, 112, 232, 80, 40, 136, 82, 156, 178, 136, 25, 170, 67, 99, 112, 104, 201, 39, 164, 205, 154, 37, 148, 124, 64, 191, 33, 191, 246, 70, 255, 170, 134, 130, 74, 233, 144, 118, 201, 25, 174, 92, 148, 235, 125, 188, 191, 41, 2, 239, 35, 153, 252, 46, 247, 240, 197, 127, 198, 17, 66, 10, 216, 142, 34, 234, 102, 8, 39, 126, 170, 224, 58, 109, 58, 5, 163, 213, 67, 15, 173, 53, 122, 134, 136, 210, 218, 232, 70, 164, 52, 49, 88, 99, 100, 26, 183, 189, 118, 186, 133, 156, 209, 214, 231, 82, 223, 9, 172, 70, 81, 68, 42, 225, 228, 145, 77, 80, 123, 196, 91, 250, 175, 9, 22, 47, 10, 98, 156, 220, 35, 238, 31, 241, 65, 85, 250, 3, 14, 249, 184, 79, 138, 11, 220, 193, 234, 10, 61, 67, 164, 83, 21, 148, 41, 65, 23, 141, 121, 130, 47, 5, 152, 76, 97, 99, 240, 199, 84, 168, 231, 161, 192, 156, 237, 95, 82, 191, 67, 244, 158, 147, 245, 59, 112, 47, 118, 171, 29, 215, 65, 24, 8, 90, 145, 11, 23, 150, 44, 161, 32, 139, 138, 6, 133, 2, 40, 248, 40, 5, 136, 35, 240, 233, 80, 154, 40, 202, 1, 56, 67, 174, 54, 165, 111, 245, 214, 122, 47, 54, 148, 238, 223, 40, 10, 90, 203, 222, 157, 29, 47, 35, 180, 109, 242, 101, 43, 173, 54, 127, 113, 144, 19, 22, 215, 151, 39, 176, 83, 193, 38, 119, 113, 22, 65, 69, 78, 16, 194, 195, 64, 200, 52, 149, 105, 192, 16, 36, 177, 109, 170, 51, 17, 122, 250, 135, 248, 248, 163, 173, 17, 66, 33, 90, 60, 129, 201, 72, 12, 62, 249, 19, 150, 188, 63, 112, 25, 44, 65, 158, 63, 23, 10, 66, 8, 196, 89, 67, 153, 117, 182, 25, 232, 187, 203, 119, 187, 66, 196, 87, 68, 163, 35, 144, 23, 70, 30, 239, 124, 135, 64, 157, 83, 232, 41, 43, 232, 132, 5, 33, 175, 129, 122, 148, 232, 161, 71, 13, 180, 254, 66, 119, 32, 170, 52, 228, 238, 42, 220, 107, 40, 236, 204, 225, 44, 8, 225, 3, 72, 108, 57, 11, 1, 111, 12, 234, 9, 186, 128, 158, 20, 228, 226, 210, 241, 20, 208, 11, 169, 208, 185, 165, 183, 29, 216, 39, 133, 78, 144, 8, 211, 145, 64, 82, 24, 8, 12, 151, 16, 39, 226, 169, 17, 186, 198, 240, 192, 181, 6, 226, 196, 79, 180, 4, 218, 155, 192, 65, 243, 23, 128, 254, 205, 184, 19, 196, 72, 236, 39, 27, 92, 83, 16, 186, 32, 239, 44, 140, 144, 66, 204, 179, 81, 18, 168, 152, 195, 3, 80, 227, 10, 90, 115, 4, 62, 246, 206, 19, 198, 189, 32, 74, 45, 54, 244, 12, 222, 49, 4, 226, 60, 64, 2, 154, 92, 1, 244, 217, 108, 132, 128, 124, 186, 76, 119, 202, 36, 135, 18, 64, 235, 8, 116, 70, 161, 96, 182, 162, 23, 228, 206, 206, 24, 1, 107, 105, 1, 86, 216, 90, 2, 169, 77, 78, 237, 113, 71, 96, 1, 20, 0, 1, 20, 20, 126, 185, 202, 95, 61, 188, 32, 241, 107, 125, 187, 153, 152, 199, 11, 155, 45, 171, 32, 2, 165, 37, 208, 177, 201, 42, 240, 56, 242, 2, 96, 64, 72, 249, 95, 186, 164, 54, 226, 236, 212, 10, 50, 214, 69, 238, 140, 17, 195, 208, 67, 32, 192, 8, 9, 19, 164, 117, 187, 10, 82, 69, 153, 19, 224, 166, 33, 101, 53, 183, 56, 88, 223, 218, 67, 29, 108, 137, 151, 38, 34, 210, 104, 104, 255, 215, 24, 41, 84, 64, 23, 82, 159, 85, 134, 188, 251, 98, 59, 54, 181, 151, 183, 163, 85, 205, 217, 66, 143, 235, 250, 87, 243, 69, 129, 202, 252, 75, 160, 233, 8, 253, 202, 239, 169, 209, 252, 170, 54, 228, 65, 4, 198, 102, 219, 118, 186, 208, 166, 72, 71, 63, 154, 29, 133, 51, 53, 149, 110, 105, 249, 53, 71, 27, 84, 137, 39, 80, 54, 197, 182, 21, 155, 243, 221, 91, 21, 95, 163, 190, 153, 67, 172, 208, 127, 67, 217, 7, 243, 224, 126, 149, 159, 119, 158, 247, 156, 151, 242, 228, 158, 112, 246, 143, 127, 252, 108, 20, 140, 130, 81, 48, 10, 70, 193, 40, 24, 5, 88, 1, 0, 48, 20, 121, 13, 171, 25, 166, 148, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} -var WailsLogoWhiteTransparent = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 128, 0, 0, 0, 128, 8, 3, 0, 0, 0, 244, 224, 145, 249, 0, 0, 2, 244, 80, 76, 84, 69, 0, 0, 0, 190, 37, 40, 145, 21, 31, 222, 46, 46, 208, 42, 44, 228, 50, 50, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 50, 49, 227, 50, 50, 207, 38, 39, 224, 48, 49, 255, 255, 255, 227, 48, 48, 227, 50, 50, 255, 255, 255, 214, 44, 45, 202, 40, 43, 210, 42, 44, 174, 27, 33, 206, 41, 43, 255, 255, 255, 186, 33, 37, 255, 255, 255, 186, 32, 37, 134, 12, 22, 183, 31, 36, 150, 19, 25, 228, 50, 50, 255, 255, 255, 187, 34, 37, 255, 255, 255, 142, 14, 23, 196, 37, 40, 169, 25, 31, 220, 47, 47, 215, 45, 46, 227, 50, 50, 203, 40, 42, 198, 37, 40, 255, 255, 255, 255, 255, 255, 255, 255, 255, 120, 5, 16, 227, 50, 49, 203, 40, 42, 255, 255, 255, 255, 255, 255, 161, 22, 29, 227, 49, 49, 189, 33, 37, 255, 255, 255, 192, 35, 39, 255, 255, 255, 225, 49, 49, 255, 255, 255, 255, 255, 255, 167, 24, 31, 255, 255, 255, 255, 255, 255, 188, 33, 38, 179, 30, 35, 227, 50, 50, 225, 48, 48, 151, 18, 26, 205, 40, 43, 228, 50, 50, 192, 35, 38, 184, 32, 36, 255, 255, 255, 255, 255, 255, 218, 46, 47, 224, 48, 49, 228, 49, 49, 221, 46, 48, 255, 255, 255, 130, 11, 22, 196, 36, 40, 227, 50, 50, 191, 34, 39, 255, 255, 255, 227, 50, 50, 176, 28, 34, 176, 29, 33, 148, 17, 25, 255, 255, 255, 121, 6, 17, 228, 50, 50, 255, 255, 255, 188, 33, 38, 255, 255, 255, 255, 255, 255, 221, 47, 48, 226, 49, 49, 206, 40, 43, 255, 255, 255, 191, 34, 38, 255, 255, 255, 151, 18, 26, 227, 50, 50, 195, 37, 40, 174, 28, 33, 216, 46, 46, 146, 16, 26, 255, 255, 255, 210, 34, 36, 180, 30, 35, 150, 18, 26, 227, 50, 50, 211, 43, 45, 227, 49, 49, 195, 36, 40, 206, 41, 43, 255, 255, 255, 186, 32, 37, 225, 48, 49, 208, 42, 44, 156, 20, 28, 195, 37, 39, 125, 7, 18, 196, 37, 40, 149, 16, 27, 119, 0, 3, 217, 46, 47, 203, 39, 42, 203, 41, 43, 149, 17, 26, 178, 29, 34, 207, 41, 44, 255, 255, 255, 167, 25, 31, 164, 23, 30, 205, 40, 43, 227, 49, 49, 198, 37, 39, 228, 50, 50, 216, 45, 46, 175, 28, 33, 127, 8, 19, 255, 255, 255, 206, 41, 43, 255, 255, 255, 255, 255, 255, 186, 33, 37, 177, 29, 34, 155, 20, 27, 255, 255, 255, 255, 255, 255, 182, 31, 35, 224, 48, 48, 211, 43, 45, 131, 10, 20, 186, 32, 37, 227, 49, 49, 173, 27, 33, 126, 8, 19, 255, 255, 255, 221, 47, 48, 116, 4, 16, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 53, 51, 127, 8, 19, 139, 13, 23, 227, 50, 49, 133, 10, 21, 124, 6, 18, 255, 255, 255, 255, 255, 255, 234, 216, 218, 172, 81, 88, 146, 16, 25, 214, 44, 46, 178, 30, 34, 168, 24, 31, 122, 6, 18, 166, 24, 31, 255, 255, 255, 216, 67, 69, 251, 216, 216, 226, 108, 109, 233, 151, 151, 188, 111, 117, 142, 17, 26, 165, 24, 31, 199, 38, 41, 214, 184, 187, 219, 87, 90, 224, 79, 80, 197, 142, 146, 149, 48, 57, 237, 173, 174, 227, 50, 50, 255, 255, 255, 223, 48, 48, 215, 45, 46, 221, 47, 48, 218, 46, 47, 213, 44, 45, 211, 43, 45, 203, 39, 42, 193, 35, 39, 219, 46, 47, 191, 34, 38, 206, 41, 43, 188, 33, 38, 246, 54, 54, 183, 31, 36, 199, 38, 41, 186, 32, 37, 209, 42, 44, 173, 27, 33, 179, 29, 35, 197, 37, 40, 176, 28, 34, 229, 50, 50, 181, 30, 35, 233, 51, 51, 170, 26, 32, 168, 24, 31, 201, 38, 41, 164, 23, 30, 236, 52, 52, 124, 6, 17, 131, 11, 21, 242, 53, 53, 195, 35, 39, 161, 22, 29, 222, 45, 47, 147, 16, 25, 137, 12, 22, 128, 8, 19, 140, 13, 23, 153, 18, 26, 219, 43, 46, 157, 20, 28, 205, 39, 42, 200, 35, 40, 231, 50, 50, 207, 39, 42, 215, 41, 44, 252, 55, 55, 238, 52, 52, 217, 45, 46, 212, 40, 44, 132, 6, 18, 235, 51, 51, 226, 46, 48, 239, 50, 51, 194, 134, 147, 194, 0, 0, 0, 195, 116, 82, 78, 83, 0, 5, 7, 11, 254, 253, 7, 251, 9, 4, 250, 169, 8, 253, 248, 27, 194, 244, 22, 17, 249, 249, 246, 233, 251, 164, 29, 254, 249, 24, 226, 222, 45, 19, 254, 252, 252, 251, 250, 246, 249, 248, 179, 56, 38, 254, 237, 176, 156, 149, 247, 87, 53, 24, 247, 241, 203, 185, 173, 243, 213, 208, 208, 90, 55, 32, 246, 239, 221, 196, 134, 127, 93, 68, 62, 51, 38, 13, 243, 233, 211, 181, 132, 102, 102, 65, 48, 44, 247, 232, 226, 221, 202, 190, 168, 120, 120, 113, 110, 107, 89, 82, 81, 79, 76, 37, 29, 254, 231, 182, 181, 165, 160, 154, 145, 143, 125, 94, 88, 79, 73, 54, 33, 15, 254, 245, 229, 217, 216, 206, 198, 196, 193, 170, 159, 145, 139, 133, 130, 118, 111, 100, 96, 88, 84, 240, 239, 236, 218, 194, 191, 189, 178, 169, 166, 151, 151, 151, 138, 111, 93, 78, 72, 67, 41, 221, 201, 173, 134, 74, 64, 33, 244, 237, 225, 224, 224, 209, 187, 139, 120, 245, 244, 243, 238, 235, 234, 228, 167, 254, 245, 245, 242, 240, 239, 163, 91, 109, 90, 0, 0, 13, 94, 73, 68, 65, 84, 120, 218, 236, 152, 105, 72, 147, 113, 28, 199, 159, 212, 17, 44, 87, 177, 182, 33, 186, 137, 168, 51, 247, 66, 3, 19, 19, 4, 205, 19, 52, 209, 36, 21, 195, 23, 133, 88, 41, 105, 165, 216, 97, 167, 69, 183, 18, 84, 208, 29, 245, 162, 19, 186, 163, 251, 238, 105, 30, 59, 156, 186, 195, 185, 205, 99, 78, 55, 231, 60, 166, 166, 89, 175, 250, 253, 159, 103, 143, 51, 203, 114, 166, 249, 34, 63, 136, 40, 27, 251, 126, 254, 191, 231, 247, 255, 255, 254, 12, 155, 101, 150, 89, 102, 153, 101, 150, 255, 4, 102, 34, 54, 163, 44, 61, 18, 137, 205, 32, 204, 139, 158, 75, 177, 25, 100, 93, 168, 254, 24, 54, 115, 36, 94, 92, 92, 59, 15, 195, 230, 96, 51, 0, 10, 93, 181, 82, 87, 187, 50, 114, 102, 242, 129, 21, 243, 232, 122, 93, 96, 206, 140, 228, 187, 98, 152, 243, 149, 24, 125, 31, 142, 175, 193, 102, 136, 132, 77, 248, 32, 78, 215, 205, 67, 50, 115, 230, 204, 113, 114, 117, 117, 117, 194, 254, 17, 176, 124, 230, 49, 207, 65, 29, 157, 214, 22, 19, 137, 57, 99, 255, 6, 88, 36, 9, 177, 247, 22, 106, 244, 56, 29, 215, 197, 92, 27, 121, 153, 233, 149, 182, 99, 71, 176, 251, 180, 100, 142, 109, 178, 200, 35, 129, 131, 125, 116, 26, 174, 161, 109, 78, 223, 16, 145, 154, 85, 20, 119, 225, 76, 120, 120, 74, 193, 218, 245, 94, 139, 166, 40, 248, 87, 125, 237, 180, 139, 151, 155, 158, 182, 61, 59, 251, 202, 66, 157, 30, 167, 225, 56, 174, 225, 60, 120, 152, 119, 74, 91, 109, 181, 214, 100, 166, 20, 173, 247, 98, 78, 233, 118, 160, 34, 139, 111, 103, 151, 149, 221, 186, 117, 249, 124, 126, 254, 141, 146, 146, 123, 47, 95, 237, 93, 172, 239, 163, 161, 124, 218, 30, 118, 125, 187, 213, 170, 200, 75, 137, 67, 75, 159, 58, 118, 93, 189, 122, 181, 236, 214, 229, 203, 231, 31, 61, 186, 113, 253, 250, 245, 164, 164, 36, 15, 179, 197, 187, 163, 163, 163, 171, 171, 163, 139, 91, 222, 167, 131, 229, 3, 26, 141, 164, 174, 62, 239, 76, 92, 4, 25, 62, 149, 2, 231, 91, 51, 2, 2, 2, 90, 91, 59, 59, 13, 134, 97, 15, 15, 179, 217, 108, 177, 88, 188, 189, 59, 188, 189, 195, 162, 225, 209, 51, 112, 2, 93, 242, 193, 75, 169, 193, 60, 108, 26, 40, 78, 26, 38, 4, 64, 1, 57, 120, 32, 7, 16, 176, 68, 157, 220, 67, 195, 133, 66, 28, 65, 211, 207, 75, 231, 77, 219, 17, 120, 59, 0, 213, 128, 18, 48, 160, 124, 139, 25, 150, 207, 128, 120, 82, 128, 174, 15, 101, 98, 211, 72, 89, 107, 107, 70, 235, 40, 1, 139, 217, 3, 150, 207, 16, 10, 25, 164, 0, 93, 23, 152, 48, 173, 51, 208, 233, 242, 112, 64, 6, 228, 35, 1, 244, 0, 12, 222, 97, 28, 134, 176, 162, 66, 72, 128, 211, 52, 154, 43, 147, 252, 96, 27, 115, 72, 176, 113, 225, 61, 26, 70, 37, 64, 241, 195, 195, 195, 134, 168, 147, 126, 194, 10, 233, 72, 62, 93, 191, 101, 106, 15, 60, 192, 201, 201, 149, 194, 9, 254, 193, 138, 175, 155, 51, 160, 250, 157, 187, 119, 239, 78, 122, 25, 198, 225, 11, 43, 237, 249, 140, 182, 80, 230, 228, 234, 207, 75, 231, 241, 22, 237, 154, 216, 212, 186, 157, 49, 12, 225, 1, 73, 119, 95, 188, 216, 199, 98, 84, 66, 190, 237, 9, 224, 12, 93, 76, 252, 36, 159, 127, 110, 126, 73, 126, 126, 254, 33, 224, 210, 165, 199, 143, 227, 74, 75, 75, 83, 83, 35, 34, 54, 108, 216, 145, 150, 22, 28, 236, 229, 181, 211, 221, 157, 185, 200, 217, 213, 246, 217, 87, 51, 12, 31, 238, 190, 191, 115, 231, 249, 59, 190, 180, 124, 200, 46, 192, 192, 105, 107, 160, 108, 78, 147, 42, 118, 118, 148, 170, 167, 165, 165, 165, 9, 104, 68, 176, 217, 236, 83, 167, 78, 229, 229, 229, 61, 200, 204, 12, 15, 15, 143, 141, 141, 77, 73, 89, 242, 250, 245, 225, 130, 194, 194, 227, 71, 239, 190, 185, 51, 119, 254, 211, 103, 123, 6, 134, 32, 127, 84, 5, 52, 130, 252, 108, 30, 57, 149, 29, 103, 251, 233, 166, 32, 163, 209, 8, 14, 96, 160, 106, 104, 168, 175, 215, 214, 41, 20, 53, 213, 213, 146, 246, 118, 181, 85, 222, 220, 44, 22, 247, 246, 202, 100, 253, 253, 50, 151, 254, 39, 79, 63, 45, 123, 254, 100, 227, 198, 170, 242, 242, 202, 81, 2, 26, 86, 84, 71, 208, 193, 210, 92, 212, 211, 127, 99, 224, 139, 80, 177, 217, 224, 0, 18, 117, 10, 183, 26, 164, 33, 105, 87, 203, 229, 200, 66, 230, 34, 218, 248, 246, 227, 51, 34, 158, 20, 160, 10, 192, 15, 50, 119, 25, 155, 124, 247, 199, 5, 99, 192, 100, 12, 26, 131, 32, 31, 149, 0, 106, 0, 69, 104, 128, 124, 16, 168, 1, 1, 137, 68, 226, 227, 227, 67, 24, 136, 101, 80, 7, 214, 198, 47, 85, 85, 200, 0, 242, 109, 2, 56, 141, 109, 232, 232, 234, 105, 81, 105, 235, 50, 11, 118, 76, 210, 64, 21, 68, 246, 1, 41, 0, 5, 64, 21, 80, 80, 21, 80, 83, 2, 46, 202, 141, 74, 17, 228, 255, 32, 160, 9, 241, 176, 32, 1, 223, 134, 186, 118, 117, 242, 146, 109, 206, 147, 49, 8, 66, 6, 68, 62, 41, 96, 175, 0, 249, 8, 40, 1, 23, 165, 136, 18, 160, 90, 0, 231, 120, 27, 188, 59, 186, 140, 45, 141, 13, 117, 53, 237, 189, 34, 206, 217, 43, 11, 28, 55, 200, 14, 106, 8, 242, 69, 176, 17, 245, 92, 192, 13, 64, 2, 62, 192, 79, 2, 246, 30, 196, 249, 81, 173, 150, 17, 1, 137, 92, 86, 110, 226, 135, 30, 191, 54, 9, 3, 45, 90, 58, 85, 124, 98, 245, 228, 242, 209, 3, 240, 25, 71, 0, 12, 232, 97, 1, 6, 16, 232, 49, 54, 169, 234, 161, 2, 114, 153, 75, 185, 80, 35, 140, 57, 146, 224, 176, 193, 171, 48, 0, 150, 175, 106, 176, 237, 67, 8, 183, 54, 139, 123, 251, 251, 149, 95, 250, 253, 199, 171, 0, 206, 13, 232, 244, 48, 219, 4, 20, 213, 106, 177, 76, 84, 46, 101, 104, 244, 186, 213, 91, 214, 57, 19, 135, 250, 132, 13, 210, 211, 210, 210, 54, 0, 17, 17, 17, 169, 169, 169, 89, 89, 165, 69, 69, 69, 113, 113, 71, 143, 22, 22, 20, 28, 222, 59, 224, 111, 107, 194, 49, 2, 56, 39, 41, 192, 128, 122, 16, 9, 104, 21, 33, 2, 127, 14, 203, 143, 207, 95, 188, 152, 142, 227, 171, 111, 110, 93, 52, 206, 233, 231, 52, 22, 87, 152, 59, 191, 155, 76, 235, 163, 187, 253, 33, 159, 18, 176, 111, 2, 62, 59, 169, 213, 96, 70, 2, 208, 2, 218, 154, 230, 47, 3, 67, 38, 188, 79, 167, 31, 212, 235, 7, 107, 107, 117, 43, 143, 173, 112, 100, 48, 99, 227, 131, 12, 144, 0, 202, 167, 4, 42, 164, 66, 134, 91, 79, 80, 82, 39, 37, 80, 231, 150, 156, 236, 47, 170, 242, 227, 51, 232, 0, 170, 130, 142, 30, 250, 179, 194, 174, 220, 226, 226, 226, 244, 220, 92, 30, 194, 221, 14, 24, 252, 98, 241, 163, 12, 56, 35, 45, 64, 85, 128, 33, 48, 182, 52, 69, 121, 152, 169, 77, 16, 146, 146, 21, 31, 191, 109, 235, 214, 165, 54, 214, 45, 221, 186, 106, 235, 242, 177, 93, 192, 43, 190, 90, 118, 249, 252, 141, 146, 123, 247, 74, 74, 30, 30, 4, 206, 156, 137, 5, 14, 172, 253, 253, 133, 106, 91, 180, 137, 51, 70, 64, 200, 242, 53, 54, 53, 250, 70, 121, 128, 0, 180, 0, 236, 194, 228, 37, 39, 152, 19, 24, 128, 187, 120, 233, 183, 203, 110, 157, 191, 113, 186, 71, 85, 87, 77, 32, 81, 139, 149, 254, 127, 50, 224, 152, 56, 74, 165, 253, 32, 172, 20, 250, 177, 141, 232, 236, 102, 71, 89, 186, 200, 93, 88, 45, 239, 231, 28, 56, 142, 106, 62, 145, 222, 119, 229, 165, 111, 79, 125, 124, 232, 225, 41, 173, 4, 198, 157, 88, 46, 227, 252, 217, 128, 53, 170, 2, 21, 252, 16, 34, 191, 65, 203, 142, 178, 239, 194, 42, 83, 229, 253, 139, 241, 72, 97, 130, 163, 121, 81, 110, 90, 68, 209, 133, 216, 76, 129, 178, 187, 79, 122, 252, 247, 95, 191, 156, 0, 3, 74, 0, 122, 80, 208, 210, 164, 82, 17, 167, 70, 88, 71, 15, 252, 173, 69, 2, 46, 34, 169, 6, 247, 156, 7, 103, 128, 35, 56, 187, 7, 175, 207, 42, 60, 119, 63, 26, 12, 126, 71, 78, 116, 55, 139, 18, 168, 96, 177, 33, 159, 24, 156, 10, 183, 176, 46, 98, 23, 74, 144, 192, 80, 5, 254, 85, 23, 184, 105, 21, 211, 225, 187, 17, 51, 49, 103, 27, 115, 220, 74, 237, 12, 206, 57, 177, 118, 95, 55, 85, 129, 10, 63, 46, 228, 19, 115, 27, 14, 77, 110, 144, 145, 156, 4, 98, 151, 170, 202, 10, 6, 142, 235, 244, 139, 67, 215, 36, 98, 127, 15, 228, 238, 56, 177, 246, 232, 225, 37, 7, 246, 237, 141, 230, 176, 88, 34, 234, 28, 226, 135, 64, 219, 147, 249, 48, 53, 124, 184, 190, 141, 245, 132, 128, 18, 4, 132, 56, 78, 3, 5, 124, 229, 145, 229, 147, 206, 117, 247, 74, 139, 200, 138, 43, 72, 137, 13, 207, 76, 22, 200, 197, 50, 232, 126, 18, 242, 28, 26, 146, 10, 124, 81, 62, 117, 121, 83, 251, 112, 209, 38, 128, 89, 168, 44, 39, 4, 144, 66, 159, 94, 227, 185, 37, 199, 193, 187, 50, 15, 190, 222, 136, 187, 4, 223, 110, 100, 158, 60, 233, 86, 221, 174, 38, 174, 132, 205, 232, 151, 191, 204, 197, 126, 12, 72, 89, 108, 85, 61, 181, 124, 137, 68, 173, 22, 39, 231, 161, 30, 108, 70, 163, 8, 70, 52, 9, 77, 163, 135, 102, 32, 7, 194, 68, 61, 220, 15, 41, 216, 245, 104, 85, 36, 232, 66, 6, 128, 6, 53, 11, 161, 0, 126, 126, 124, 63, 46, 149, 15, 239, 1, 77, 121, 111, 244, 133, 7, 214, 16, 155, 0, 14, 231, 48, 157, 58, 141, 53, 129, 103, 87, 57, 114, 65, 9, 222, 111, 37, 238, 4, 110, 192, 152, 251, 144, 11, 192, 98, 249, 85, 73, 241, 202, 16, 21, 188, 135, 92, 62, 188, 1, 189, 44, 42, 44, 109, 87, 11, 160, 7, 203, 43, 24, 154, 182, 207, 181, 109, 109, 240, 67, 240, 249, 115, 155, 231, 197, 248, 137, 111, 75, 175, 253, 18, 46, 151, 188, 16, 218, 111, 132, 98, 192, 159, 195, 97, 137, 164, 223, 250, 52, 166, 61, 130, 122, 120, 7, 185, 124, 9, 121, 95, 148, 13, 29, 72, 188, 48, 64, 10, 8, 3, 87, 134, 198, 172, 94, 237, 105, 35, 38, 102, 117, 160, 231, 194, 53, 137, 14, 24, 180, 107, 145, 129, 77, 0, 229, 203, 253, 1, 101, 183, 233, 155, 73, 116, 255, 192, 225, 181, 57, 69, 53, 10, 238, 200, 242, 229, 196, 211, 169, 98, 197, 239, 12, 249, 226, 79, 108, 130, 192, 45, 235, 174, 69, 174, 72, 72, 88, 110, 99, 197, 138, 229, 9, 9, 145, 152, 3, 6, 86, 46, 81, 1, 178, 7, 4, 2, 129, 92, 57, 96, 50, 85, 113, 246, 157, 59, 122, 34, 33, 210, 21, 78, 241, 75, 86, 133, 27, 188, 72, 45, 31, 53, 167, 180, 16, 203, 26, 80, 178, 208, 38, 160, 5, 110, 186, 242, 139, 60, 199, 12, 190, 179, 103, 126, 47, 77, 133, 97, 28, 127, 198, 233, 44, 221, 60, 169, 103, 146, 205, 11, 115, 196, 92, 178, 161, 103, 168, 115, 133, 25, 130, 165, 230, 194, 95, 23, 33, 253, 16, 10, 111, 118, 161, 150, 4, 34, 164, 23, 65, 81, 32, 94, 133, 222, 86, 130, 23, 221, 246, 31, 236, 40, 153, 118, 177, 139, 32, 14, 131, 24, 76, 118, 37, 75, 157, 12, 245, 166, 231, 153, 239, 122, 183, 154, 180, 214, 14, 122, 225, 231, 226, 236, 98, 135, 243, 121, 190, 103, 239, 251, 62, 239, 57, 187, 144, 44, 192, 227, 185, 244, 45, 182, 179, 185, 179, 54, 77, 193, 107, 100, 96, 200, 253, 219, 30, 30, 159, 252, 181, 81, 175, 0, 13, 81, 44, 0, 39, 65, 104, 23, 215, 128, 91, 172, 33, 228, 85, 65, 219, 143, 228, 32, 220, 88, 75, 36, 98, 117, 51, 13, 24, 124, 74, 128, 116, 166, 218, 18, 158, 84, 252, 51, 56, 55, 113, 102, 62, 235, 6, 223, 244, 126, 45, 205, 66, 17, 75, 216, 170, 30, 31, 33, 125, 126, 37, 52, 181, 197, 214, 191, 111, 199, 54, 122, 111, 60, 126, 56, 89, 99, 201, 118, 70, 239, 78, 93, 42, 254, 106, 242, 81, 113, 255, 53, 54, 204, 79, 203, 118, 90, 5, 68, 145, 214, 0, 214, 16, 12, 249, 85, 176, 126, 183, 255, 230, 245, 166, 170, 35, 3, 76, 78, 39, 46, 51, 127, 178, 57, 218, 181, 121, 3, 24, 158, 28, 216, 37, 182, 10, 5, 180, 112, 216, 81, 54, 220, 158, 239, 56, 248, 219, 155, 206, 170, 153, 205, 243, 164, 39, 255, 225, 115, 106, 125, 15, 64, 169, 55, 226, 8, 48, 68, 106, 8, 38, 218, 151, 234, 129, 220, 240, 149, 173, 140, 232, 39, 189, 36, 105, 195, 0, 208, 109, 15, 155, 2, 12, 214, 147, 58, 104, 131, 82, 120, 255, 38, 234, 41, 62, 243, 47, 75, 166, 208, 40, 32, 195, 65, 212, 166, 67, 15, 41, 75, 141, 130, 14, 126, 212, 179, 219, 191, 76, 72, 218, 208, 34, 53, 210, 209, 184, 35, 163, 0, 17, 119, 231, 33, 106, 8, 5, 247, 243, 248, 8, 253, 228, 218, 32, 32, 61, 67, 65, 135, 136, 152, 232, 64, 31, 216, 149, 68, 45, 132, 27, 148, 69, 40, 16, 22, 244, 211, 230, 144, 199, 63, 140, 26, 90, 2, 98, 48, 18, 143, 4, 127, 35, 18, 140, 199, 131, 245, 230, 17, 25, 254, 27, 3, 249, 63, 87, 172, 102, 196, 103, 237, 191, 186, 29, 16, 225, 85, 223, 124, 89, 54, 188, 94, 243, 160, 92, 8, 255, 23, 242, 163, 62, 211, 79, 99, 239, 41, 16, 37, 237, 165, 217, 144, 229, 82, 159, 79, 40, 128, 63, 154, 242, 51, 61, 39, 100, 6, 125, 33, 255, 88, 116, 181, 34, 51, 62, 71, 235, 144, 65, 47, 184, 127, 165, 118, 37, 109, 242, 5, 50, 48, 53, 130, 174, 112, 63, 143, 159, 193, 214, 56, 232, 138, 64, 254, 172, 241, 25, 90, 159, 5, 56, 250, 248, 217, 75, 106, 73, 146, 184, 151, 47, 253, 14, 61, 255, 56, 47, 121, 129, 126, 54, 250, 146, 126, 241, 207, 2, 180, 151, 160, 27, 83, 11, 145, 61, 109, 111, 47, 188, 123, 16, 65, 130, 217, 137, 87, 91, 116, 187, 5, 221, 11, 11, 99, 15, 24, 230, 163, 88, 26, 247, 233, 86, 128, 96, 41, 17, 114, 192, 0, 167, 156, 114, 82, 40, 54, 22, 25, 139, 225, 248, 40, 134, 99, 199, 230, 183, 253, 83, 33, 205, 19, 138, 123, 194, 5, 239, 172, 202, 128, 31, 230, 172, 110, 101, 150, 127, 231, 82, 20, 183, 210, 105, 3, 35, 48, 108, 3, 86, 183, 219, 201, 227, 118, 89, 39, 148, 46, 72, 3, 175, 243, 230, 222, 125, 101, 206, 8, 57, 227, 106, 81, 213, 114, 39, 92, 85, 213, 202, 59, 240, 92, 85, 213, 143, 220, 215, 169, 34, 23, 93, 80, 4, 12, 103, 57, 158, 252, 254, 215, 9, 182, 43, 234, 57, 117, 0, 210, 120, 212, 162, 18, 173, 126, 200, 185, 4, 127, 37, 169, 111, 211, 209, 101, 43, 167, 35, 191, 126, 171, 138, 84, 58, 121, 1, 111, 169, 32, 126, 194, 135, 86, 44, 96, 22, 56, 206, 22, 245, 172, 138, 92, 43, 202, 189, 128, 230, 159, 237, 85, 49, 143, 178, 64, 20, 220, 138, 93, 155, 77, 182, 34, 84, 132, 22, 45, 160, 32, 6, 162, 181, 52, 52, 54, 38, 70, 10, 66, 103, 235, 79, 176, 190, 156, 133, 182, 151, 124, 94, 167, 237, 253, 132, 247, 195, 190, 217, 83, 246, 97, 114, 133, 244, 76, 162, 102, 55, 207, 157, 121, 51, 111, 33, 36, 218, 206, 110, 150, 233, 126, 197, 119, 33, 0, 166, 195, 246, 55, 11, 104, 65, 120, 172, 132, 199, 124, 218, 220, 122, 121, 175, 137, 164, 174, 115, 147, 15, 24, 130, 12, 109, 158, 103, 43, 50, 144, 1, 203, 229, 7, 107, 15, 72, 74, 73, 243, 127, 44, 224, 11, 101, 129, 64, 69, 223, 16, 230, 242, 10, 24, 112, 84, 213, 245, 52, 100, 104, 151, 112, 108, 122, 193, 201, 225, 52, 199, 121, 153, 59, 111, 230, 147, 92, 248, 100, 74, 71, 168, 10, 148, 125, 113, 119, 45, 248, 118, 21, 150, 44, 89, 211, 57, 18, 131, 80, 237, 32, 160, 68, 255, 20, 150, 72, 35, 224, 11, 221, 18, 205, 211, 144, 76, 235, 24, 178, 37, 8, 90, 1, 176, 33, 69, 223, 237, 15, 66, 65, 60, 76, 129, 186, 64, 192, 129, 194, 152, 194, 131, 38, 205, 230, 41, 235, 199, 39, 92, 88, 57, 134, 141, 79, 72, 196, 25, 82, 117, 134, 176, 157, 5, 193, 148, 224, 189, 252, 153, 71, 134, 75, 42, 214, 228, 195, 139, 69, 36, 250, 87, 46, 152, 73, 2, 69, 135, 111, 155, 249, 70, 40, 54, 196, 244, 13, 129, 178, 123, 77, 192, 106, 208, 179, 51, 38, 105, 164, 108, 26, 210, 96, 76, 69, 127, 162, 117, 185, 39, 236, 185, 30, 75, 155, 121, 36, 20, 27, 162, 97, 153, 234, 43, 216, 44, 81, 179, 192, 92, 188, 47, 192, 78, 46, 109, 167, 13, 97, 226, 245, 149, 111, 7, 78, 210, 65, 66, 176, 193, 9, 88, 217, 132, 45, 13, 27, 178, 205, 196, 43, 62, 177, 233, 179, 75, 111, 32, 176, 2, 114, 123, 56, 218, 227, 255, 157, 108, 154, 246, 195, 148, 30, 134, 156, 253, 176, 35, 39, 233, 124, 219, 111, 186, 117, 213, 148, 19, 209, 88, 85, 131, 4, 36, 150, 100, 37, 14, 214, 129, 117, 95, 87, 135, 218, 123, 10, 136, 118, 40, 253, 97, 119, 215, 208, 99, 22, 231, 184, 35, 219, 47, 168, 40, 182, 54, 2, 53, 32, 2, 48, 27, 242, 111, 34, 37, 163, 231, 83, 126, 69, 132, 100, 76, 218, 216, 158, 47, 213, 179, 159, 123, 72, 122, 126, 114, 9, 120, 9, 205, 33, 154, 234, 215, 7, 177, 70, 59, 67, 248, 193, 140, 225, 159, 252, 118, 188, 123, 25, 65, 10, 213, 35, 209, 189, 80, 46, 115, 61, 229, 75, 112, 166, 95, 36, 28, 255, 3, 129, 18, 67, 80, 30, 227, 184, 69, 160, 199, 56, 47, 121, 156, 127, 176, 108, 208, 84, 29, 231, 73, 246, 108, 218, 46, 82, 44, 58, 1, 201, 165, 136, 227, 56, 63, 57, 215, 210, 165, 239, 111, 235, 38, 18, 131, 48, 81, 202, 155, 216, 31, 207, 19, 12, 79, 121, 234, 177, 171, 186, 109, 94, 112, 13, 128, 50, 135, 42, 202, 34, 37, 70, 140, 24, 49, 98, 196, 136, 17, 35, 70, 252, 137, 255, 156, 118, 125, 151, 11, 217, 82, 191, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} -var WailsLogoWhite = []byte{137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 128, 0, 0, 0, 128, 8, 3, 0, 0, 0, 244, 224, 145, 249, 0, 0, 3, 0, 80, 76, 84, 69, 255, 255, 255, 255, 255, 255, 252, 252, 252, 26, 26, 26, 255, 255, 255, 250, 250, 250, 255, 254, 254, 228, 57, 57, 161, 22, 30, 225, 39, 40, 255, 254, 254, 230, 72, 72, 2, 2, 2, 14, 14, 14, 253, 247, 247, 173, 11, 16, 183, 32, 37, 227, 49, 49, 51, 51, 51, 252, 243, 243, 249, 249, 249, 160, 5, 12, 251, 224, 224, 253, 246, 246, 42, 42, 42, 185, 36, 41, 207, 32, 34, 254, 249, 249, 31, 31, 31, 215, 47, 49, 221, 28, 28, 228, 228, 228, 209, 42, 44, 243, 196, 197, 198, 19, 22, 204, 18, 20, 236, 236, 236, 252, 235, 236, 73, 73, 73, 248, 248, 248, 244, 244, 244, 60, 60, 60, 227, 53, 53, 202, 202, 202, 129, 129, 129, 239, 215, 217, 113, 113, 113, 213, 36, 37, 151, 2, 9, 227, 44, 44, 246, 186, 186, 230, 63, 63, 45, 45, 45, 197, 67, 71, 174, 174, 174, 66, 66, 66, 178, 18, 24, 108, 0, 0, 252, 239, 239, 228, 189, 191, 82, 82, 82, 232, 82, 82, 242, 189, 190, 193, 30, 34, 184, 23, 28, 198, 37, 41, 195, 49, 53, 192, 37, 40, 250, 220, 221, 94, 94, 94, 162, 23, 30, 221, 102, 104, 242, 163, 163, 122, 122, 122, 231, 114, 115, 219, 54, 55, 121, 0, 6, 220, 47, 48, 72, 72, 72, 5, 5, 5, 239, 207, 208, 216, 99, 101, 148, 17, 25, 37, 37, 37, 237, 122, 122, 235, 106, 107, 245, 245, 245, 117, 2, 13, 250, 230, 230, 181, 34, 39, 216, 216, 216, 22, 22, 22, 248, 229, 230, 222, 163, 165, 238, 152, 152, 223, 223, 223, 174, 54, 60, 213, 213, 213, 225, 131, 132, 236, 181, 182, 216, 139, 141, 245, 235, 236, 172, 27, 33, 130, 9, 20, 163, 7, 14, 152, 152, 152, 254, 253, 253, 110, 110, 110, 248, 204, 204, 184, 184, 184, 164, 164, 164, 103, 103, 103, 225, 187, 189, 209, 65, 68, 239, 133, 133, 235, 167, 168, 235, 200, 201, 185, 44, 49, 51, 51, 51, 221, 151, 153, 221, 37, 37, 244, 181, 182, 208, 52, 55, 142, 34, 44, 189, 58, 62, 249, 217, 217, 209, 104, 107, 155, 66, 74, 245, 223, 224, 158, 158, 158, 221, 107, 108, 232, 185, 186, 222, 139, 141, 176, 22, 27, 196, 196, 196, 207, 34, 36, 17, 17, 17, 221, 84, 85, 191, 191, 191, 119, 119, 119, 249, 210, 210, 239, 145, 145, 243, 175, 175, 194, 107, 112, 233, 93, 93, 201, 81, 85, 242, 228, 230, 199, 147, 151, 221, 120, 122, 178, 25, 30, 239, 204, 205, 229, 150, 151, 233, 142, 143, 216, 170, 173, 161, 41, 49, 136, 136, 136, 216, 178, 181, 211, 117, 121, 173, 99, 105, 37, 37, 37, 187, 29, 33, 145, 145, 145, 84, 84, 84, 101, 101, 101, 212, 96, 99, 140, 140, 140, 223, 69, 70, 151, 27, 36, 215, 85, 87, 169, 57, 63, 89, 89, 89, 204, 114, 119, 187, 96, 101, 203, 26, 28, 172, 78, 84, 127, 15, 26, 190, 127, 132, 200, 83, 86, 200, 54, 57, 183, 122, 129, 192, 192, 192, 238, 223, 224, 255, 255, 255, 255, 254, 254, 254, 253, 253, 226, 49, 49, 228, 50, 50, 218, 46, 47, 216, 45, 46, 222, 47, 48, 220, 47, 47, 254, 250, 250, 212, 43, 45, 224, 48, 49, 214, 44, 46, 254, 248, 248, 208, 42, 44, 255, 252, 252, 251, 250, 250, 228, 52, 52, 204, 40, 43, 197, 37, 40, 200, 39, 42, 186, 32, 37, 194, 36, 40, 33, 33, 33, 191, 35, 38, 189, 34, 38, 180, 30, 35, 210, 42, 44, 30, 30, 30, 129, 10, 20, 173, 27, 33, 23, 23, 23, 207, 40, 43, 225, 31, 31, 228, 44, 44, 10, 10, 10, 202, 39, 42, 183, 31, 36, 170, 26, 32, 165, 24, 30, 134, 12, 22, 124, 7, 18, 236, 116, 116, 228, 48, 47, 19, 19, 19, 223, 50, 50, 176, 28, 34, 37, 37, 37, 138, 13, 23, 178, 29, 35, 204, 45, 47, 194, 40, 44, 227, 38, 38, 143, 14, 23, 150, 17, 25, 168, 25, 31, 156, 20, 28, 208, 47, 49, 229, 56, 56, 175, 33, 39, 212, 47, 49, 166, 31, 38, 189, 39, 43, 202, 28, 30, 189, 17, 21, 181, 12, 17, 196, 25, 29, 200, 45, 48, 199, 32, 35, 189, 24, 28, 132, 0, 6, 224, 55, 55, 213, 27, 29, 147, 22, 30, 49, 94, 55, 29, 0, 0, 0, 182, 116, 82, 78, 83, 251, 225, 254, 254, 248, 245, 246, 254, 254, 253, 250, 244, 254, 254, 248, 253, 254, 249, 245, 246, 254, 254, 248, 254, 254, 254, 254, 248, 248, 254, 253, 246, 246, 244, 254, 253, 245, 243, 237, 252, 246, 244, 244, 241, 240, 236, 233, 254, 254, 249, 247, 246, 245, 242, 238, 238, 254, 253, 250, 249, 245, 244, 240, 254, 254, 248, 247, 245, 243, 243, 243, 242, 240, 235, 254, 254, 254, 250, 249, 249, 248, 248, 247, 246, 242, 241, 252, 252, 248, 248, 246, 246, 244, 244, 244, 243, 243, 240, 240, 238, 237, 249, 247, 247, 246, 244, 243, 243, 242, 242, 242, 242, 240, 240, 239, 238, 232, 232, 230, 227, 250, 246, 245, 243, 241, 240, 240, 240, 239, 235, 235, 253, 251, 249, 248, 247, 246, 245, 244, 244, 243, 242, 241, 241, 241, 241, 240, 240, 240, 239, 238, 238, 234, 233, 246, 244, 243, 242, 237, 236, 236, 234, 231, 230, 223, 247, 243, 241, 240, 229, 225, 224, 249, 246, 242, 241, 233, 233, 222, 246, 228, 205, 116, 60, 49, 81, 0, 0, 16, 106, 73, 68, 65, 84, 120, 218, 236, 152, 107, 72, 83, 97, 24, 199, 79, 99, 45, 87, 224, 22, 203, 196, 133, 177, 21, 131, 16, 196, 76, 6, 102, 152, 87, 76, 42, 161, 164, 48, 161, 68, 76, 45, 162, 15, 154, 69, 217, 69, 165, 18, 9, 42, 75, 211, 50, 42, 250, 16, 93, 232, 94, 116, 222, 179, 153, 206, 53, 215, 230, 20, 83, 54, 84, 212, 37, 50, 209, 121, 75, 179, 214, 197, 174, 207, 251, 158, 169, 179, 102, 185, 210, 250, 80, 255, 47, 162, 135, 115, 254, 191, 247, 121, 159, 247, 121, 158, 87, 106, 6, 77, 209, 127, 83, 255, 1, 254, 3, 252, 7, 248, 15, 240, 207, 0, 32, 231, 127, 254, 99, 0, 218, 191, 11, 128, 84, 19, 133, 224, 207, 0, 168, 24, 90, 20, 233, 252, 209, 159, 0, 64, 26, 154, 146, 110, 136, 164, 145, 211, 24, 76, 63, 0, 44, 223, 125, 151, 79, 230, 4, 123, 48, 253, 0, 120, 249, 193, 11, 19, 16, 173, 117, 250, 120, 186, 1, 24, 154, 150, 109, 240, 111, 92, 205, 5, 16, 167, 154, 102, 0, 45, 77, 101, 6, 244, 244, 4, 203, 38, 244, 159, 70, 0, 146, 116, 155, 54, 242, 155, 218, 125, 164, 19, 251, 79, 31, 0, 98, 16, 205, 141, 246, 105, 212, 41, 252, 19, 40, 154, 113, 164, 114, 212, 180, 1, 32, 176, 140, 60, 181, 176, 125, 80, 201, 223, 136, 19, 128, 97, 24, 45, 136, 249, 214, 127, 154, 0, 16, 164, 252, 130, 132, 185, 61, 131, 58, 5, 127, 142, 140, 246, 164, 39, 210, 20, 2, 32, 134, 195, 209, 170, 158, 170, 176, 96, 157, 104, 103, 112, 163, 114, 150, 66, 217, 30, 112, 28, 63, 164, 104, 138, 75, 115, 100, 243, 35, 139, 139, 101, 104, 170, 0, 16, 195, 112, 84, 156, 167, 79, 53, 154, 121, 26, 45, 195, 161, 29, 21, 116, 194, 31, 47, 95, 169, 208, 37, 165, 236, 78, 59, 178, 101, 239, 209, 139, 247, 79, 203, 31, 156, 190, 184, 119, 119, 16, 188, 249, 219, 0, 104, 222, 188, 121, 42, 237, 120, 79, 88, 34, 119, 166, 40, 197, 215, 119, 93, 90, 73, 70, 240, 66, 88, 62, 72, 41, 73, 140, 47, 202, 13, 20, 8, 4, 111, 189, 228, 23, 143, 108, 34, 86, 232, 183, 35, 128, 236, 249, 204, 229, 209, 59, 82, 82, 10, 118, 175, 88, 81, 82, 88, 120, 239, 210, 173, 59, 55, 18, 207, 95, 139, 253, 18, 117, 121, 31, 89, 190, 82, 169, 91, 19, 223, 42, 8, 20, 228, 134, 159, 78, 150, 202, 184, 216, 71, 245, 148, 161, 127, 123, 11, 16, 45, 42, 185, 80, 82, 248, 240, 225, 165, 236, 236, 236, 3, 7, 14, 220, 221, 102, 108, 91, 251, 145, 213, 210, 222, 222, 162, 152, 193, 193, 79, 74, 236, 63, 168, 14, 244, 16, 196, 203, 47, 110, 205, 225, 17, 115, 79, 13, 174, 199, 83, 1, 144, 146, 189, 60, 110, 57, 209, 90, 144, 209, 104, 236, 236, 236, 236, 253, 66, 20, 181, 127, 214, 160, 197, 162, 192, 210, 241, 35, 18, 47, 110, 89, 231, 78, 190, 175, 113, 52, 255, 253, 45, 240, 189, 187, 188, 13, 100, 4, 61, 39, 234, 196, 8, 189, 189, 177, 151, 99, 148, 138, 50, 53, 184, 67, 252, 155, 54, 250, 138, 200, 183, 85, 26, 21, 222, 181, 169, 4, 160, 211, 226, 226, 218, 226, 218, 28, 32, 176, 127, 103, 148, 68, 167, 44, 179, 168, 73, 250, 233, 218, 131, 69, 184, 29, 145, 83, 9, 154, 74, 0, 32, 64, 133, 16, 130, 241, 0, 157, 120, 249, 101, 101, 106, 53, 1, 208, 41, 125, 118, 210, 90, 21, 155, 114, 83, 14, 0, 181, 157, 186, 180, 220, 56, 206, 255, 121, 148, 68, 161, 46, 47, 83, 91, 0, 0, 251, 251, 71, 147, 22, 224, 50, 0, 114, 34, 167, 49, 88, 146, 77, 8, 70, 178, 0, 150, 175, 46, 47, 135, 0, 128, 192, 95, 199, 223, 192, 163, 85, 180, 203, 0, 32, 39, 52, 204, 119, 66, 140, 22, 39, 162, 145, 4, 224, 227, 71, 227, 54, 88, 126, 121, 41, 248, 19, 2, 124, 0, 32, 1, 52, 244, 47, 0, 120, 6, 205, 230, 241, 240, 169, 69, 20, 232, 199, 111, 94, 136, 91, 219, 134, 79, 225, 129, 75, 55, 31, 236, 179, 60, 46, 45, 135, 8, 176, 254, 150, 166, 128, 157, 224, 239, 50, 0, 196, 122, 93, 226, 249, 27, 55, 110, 220, 202, 191, 149, 159, 127, 243, 102, 242, 22, 80, 73, 73, 218, 58, 144, 175, 111, 78, 80, 80, 144, 72, 36, 218, 129, 48, 28, 151, 139, 104, 170, 48, 110, 237, 129, 236, 123, 190, 51, 87, 6, 243, 75, 31, 151, 150, 130, 255, 200, 22, 204, 141, 70, 180, 74, 133, 92, 4, 32, 4, 23, 250, 150, 190, 240, 88, 138, 229, 193, 106, 251, 118, 65, 96, 96, 110, 110, 81, 209, 229, 240, 240, 240, 131, 242, 7, 242, 245, 235, 215, 175, 58, 124, 248, 230, 209, 132, 132, 115, 249, 23, 224, 160, 7, 173, 90, 252, 217, 27, 252, 9, 0, 155, 132, 202, 176, 59, 23, 220, 113, 245, 97, 92, 4, 192, 105, 187, 34, 170, 239, 149, 219, 43, 86, 47, 177, 188, 132, 93, 117, 194, 150, 234, 103, 207, 66, 67, 63, 124, 248, 16, 242, 238, 13, 104, 17, 209, 226, 171, 50, 90, 116, 86, 178, 216, 219, 251, 201, 24, 0, 72, 41, 137, 253, 184, 52, 113, 139, 12, 1, 130, 214, 197, 28, 128, 228, 90, 225, 182, 244, 149, 27, 200, 108, 238, 239, 111, 109, 53, 153, 76, 29, 0, 0, 242, 122, 13, 234, 238, 238, 126, 79, 100, 181, 90, 7, 6, 108, 233, 91, 87, 45, 246, 91, 243, 228, 201, 99, 135, 8, 88, 148, 49, 81, 207, 221, 220, 60, 60, 14, 38, 231, 80, 128, 160, 114, 237, 20, 48, 140, 157, 192, 12, 0, 173, 24, 160, 163, 163, 163, 174, 174, 174, 165, 165, 186, 26, 162, 80, 91, 91, 83, 83, 83, 85, 101, 48, 52, 55, 55, 235, 27, 6, 26, 242, 196, 222, 67, 21, 4, 96, 36, 7, 45, 138, 185, 69, 198, 190, 190, 23, 175, 94, 6, 10, 34, 206, 172, 227, 98, 4, 151, 142, 33, 7, 19, 120, 188, 34, 0, 253, 44, 64, 215, 40, 64, 45, 6, 168, 98, 1, 244, 250, 134, 202, 202, 138, 161, 138, 138, 10, 240, 119, 216, 2, 101, 196, 182, 94, 0, 48, 183, 190, 244, 250, 240, 38, 108, 213, 202, 29, 24, 193, 5, 0, 216, 5, 66, 224, 16, 129, 46, 236, 223, 50, 22, 0, 2, 160, 39, 0, 149, 245, 224, 207, 2, 148, 179, 0, 10, 201, 182, 231, 189, 189, 47, 220, 204, 173, 29, 194, 215, 221, 195, 182, 188, 99, 25, 34, 220, 143, 92, 40, 68, 90, 198, 78, 96, 79, 1, 66, 64, 0, 48, 129, 115, 0, 54, 0, 24, 32, 38, 182, 173, 179, 183, 15, 3, 116, 9, 159, 213, 188, 183, 214, 251, 249, 93, 77, 144, 81, 208, 23, 38, 95, 9, 25, 66, 240, 210, 100, 122, 201, 74, 232, 5, 122, 141, 213, 77, 100, 0, 53, 55, 59, 5, 80, 207, 77, 141, 123, 206, 2, 152, 186, 90, 158, 213, 24, 244, 67, 222, 165, 124, 126, 192, 174, 67, 92, 8, 3, 154, 36, 0, 33, 136, 218, 78, 36, 24, 209, 91, 44, 56, 129, 239, 64, 19, 71, 64, 17, 17, 103, 100, 1, 250, 77, 117, 213, 181, 85, 134, 134, 250, 39, 229, 22, 69, 83, 207, 220, 141, 82, 30, 4, 23, 77, 10, 128, 212, 131, 130, 221, 32, 24, 247, 142, 128, 246, 130, 146, 147, 147, 143, 130, 146, 174, 128, 222, 15, 235, 157, 0, 0, 1, 36, 192, 120, 128, 230, 202, 138, 199, 229, 106, 139, 78, 217, 222, 227, 127, 106, 25, 32, 32, 39, 0, 92, 196, 124, 175, 137, 10, 8, 226, 114, 41, 74, 26, 102, 179, 218, 183, 160, 194, 17, 64, 29, 147, 186, 173, 141, 5, 128, 28, 36, 0, 13, 0, 80, 6, 243, 9, 168, 169, 103, 78, 180, 200, 133, 171, 25, 135, 5, 193, 34, 63, 237, 66, 248, 214, 39, 53, 216, 172, 250, 134, 6, 54, 0, 99, 91, 96, 137, 127, 225, 182, 205, 8, 254, 118, 128, 238, 225, 97, 177, 216, 111, 223, 62, 190, 93, 141, 11, 125, 118, 69, 82, 223, 220, 11, 10, 60, 11, 82, 82, 82, 68, 238, 11, 176, 220, 71, 181, 224, 7, 227, 4, 98, 104, 105, 179, 109, 128, 0, 216, 203, 0, 27, 128, 48, 55, 115, 127, 20, 156, 194, 62, 114, 10, 91, 34, 178, 182, 74, 151, 101, 102, 102, 46, 27, 83, 102, 244, 74, 247, 241, 31, 166, 30, 165, 221, 187, 4, 195, 245, 181, 107, 215, 206, 159, 79, 76, 76, 60, 136, 37, 151, 167, 167, 159, 165, 104, 213, 143, 8, 244, 64, 48, 14, 160, 84, 45, 49, 187, 65, 237, 138, 101, 1, 76, 112, 10, 195, 214, 75, 121, 78, 222, 254, 46, 7, 230, 21, 164, 21, 230, 223, 57, 31, 75, 90, 160, 32, 48, 180, 58, 36, 100, 120, 248, 246, 185, 159, 16, 88, 197, 64, 48, 6, 80, 90, 22, 147, 234, 134, 43, 87, 106, 108, 39, 201, 193, 174, 150, 218, 170, 69, 139, 210, 79, 68, 34, 90, 235, 233, 169, 81, 105, 88, 169, 38, 200, 1, 138, 203, 43, 72, 219, 155, 127, 58, 49, 62, 55, 48, 244, 67, 173, 193, 58, 144, 119, 150, 11, 4, 104, 194, 255, 62, 172, 204, 19, 15, 56, 22, 194, 152, 8, 226, 223, 209, 149, 26, 59, 122, 8, 172, 3, 126, 159, 125, 72, 13, 112, 94, 135, 88, 128, 217, 156, 167, 64, 200, 254, 198, 219, 92, 188, 37, 41, 75, 30, 30, 178, 104, 145, 205, 6, 49, 208, 210, 200, 249, 85, 216, 83, 67, 101, 220, 246, 27, 114, 0, 8, 51, 247, 219, 91, 103, 234, 216, 41, 108, 24, 90, 195, 95, 232, 179, 1, 239, 132, 6, 91, 252, 160, 14, 48, 42, 205, 8, 5, 87, 20, 185, 242, 236, 153, 235, 251, 243, 146, 120, 227, 19, 6, 105, 73, 32, 237, 195, 54, 181, 85, 226, 55, 52, 2, 80, 46, 73, 5, 127, 82, 180, 171, 189, 162, 70, 78, 161, 30, 202, 128, 229, 83, 123, 163, 255, 169, 147, 164, 33, 160, 159, 14, 36, 28, 248, 60, 34, 127, 167, 22, 108, 222, 153, 177, 153, 0, 32, 196, 1, 186, 177, 203, 21, 76, 100, 238, 178, 67, 210, 147, 209, 233, 226, 17, 128, 114, 239, 120, 51, 246, 39, 61, 163, 214, 43, 202, 108, 234, 128, 66, 12, 0, 79, 74, 203, 212, 186, 65, 101, 15, 63, 56, 90, 6, 201, 160, 153, 76, 29, 128, 117, 218, 41, 224, 5, 208, 104, 9, 231, 82, 188, 160, 156, 226, 173, 103, 147, 14, 175, 79, 223, 47, 177, 222, 22, 215, 215, 215, 219, 203, 64, 76, 132, 25, 122, 22, 241, 135, 166, 93, 19, 111, 110, 37, 157, 128, 5, 80, 40, 8, 2, 52, 4, 10, 143, 105, 147, 43, 68, 48, 120, 143, 76, 149, 20, 151, 18, 109, 46, 222, 186, 55, 41, 235, 180, 60, 60, 60, 44, 36, 4, 186, 129, 109, 88, 172, 175, 108, 0, 0, 123, 33, 12, 107, 53, 129, 125, 157, 144, 244, 108, 232, 151, 241, 173, 117, 66, 12, 80, 207, 2, 0, 130, 14, 42, 161, 207, 134, 157, 60, 140, 48, 249, 155, 81, 80, 113, 218, 150, 228, 172, 251, 242, 240, 8, 97, 40, 59, 18, 134, 132, 64, 39, 50, 232, 173, 32, 210, 9, 8, 64, 169, 36, 213, 84, 55, 186, 124, 240, 111, 142, 40, 234, 170, 126, 86, 133, 1, 236, 133, 152, 69, 128, 134, 176, 18, 16, 84, 204, 164, 0, 16, 162, 55, 201, 61, 114, 5, 48, 21, 135, 134, 182, 144, 165, 213, 116, 119, 227, 97, 128, 52, 67, 82, 8, 89, 127, 239, 120, 19, 59, 52, 217, 231, 5, 67, 243, 254, 43, 123, 66, 187, 171, 12, 99, 157, 128, 141, 130, 174, 157, 15, 201, 0, 249, 200, 160, 73, 0, 176, 4, 2, 47, 50, 146, 146, 105, 196, 97, 28, 113, 4, 120, 28, 65, 252, 171, 89, 127, 242, 88, 156, 148, 28, 24, 98, 96, 123, 161, 162, 125, 84, 10, 128, 105, 106, 12, 56, 177, 9, 193, 199, 127, 10, 64, 10, 94, 206, 30, 32, 104, 17, 58, 25, 200, 42, 65, 245, 245, 126, 160, 48, 240, 23, 218, 67, 196, 62, 181, 138, 143, 229, 100, 189, 125, 175, 39, 0, 159, 2, 102, 205, 29, 39, 255, 125, 208, 147, 224, 235, 63, 5, 32, 131, 129, 47, 16, 8, 191, 153, 8, 155, 173, 184, 23, 138, 65, 146, 171, 171, 18, 164, 201, 130, 106, 97, 245, 104, 248, 73, 159, 174, 151, 72, 55, 135, 189, 179, 146, 67, 16, 112, 238, 80, 208, 166, 249, 142, 218, 52, 255, 248, 252, 73, 94, 207, 17, 38, 120, 235, 37, 28, 157, 201, 217, 12, 24, 182, 217, 108, 121, 251, 143, 157, 201, 56, 180, 0, 222, 230, 102, 189, 245, 114, 88, 62, 222, 154, 33, 191, 36, 110, 198, 155, 134, 10, 0, 176, 180, 67, 25, 114, 119, 178, 191, 147, 2, 160, 145, 138, 16, 124, 37, 215, 108, 66, 162, 138, 194, 48, 124, 208, 169, 193, 188, 14, 168, 145, 162, 205, 24, 106, 150, 63, 76, 136, 98, 17, 52, 149, 25, 53, 9, 149, 164, 17, 41, 73, 181, 236, 7, 202, 141, 185, 136, 114, 165, 166, 82, 32, 228, 54, 132, 112, 219, 230, 156, 171, 134, 83, 212, 232, 74, 161, 64, 102, 102, 151, 138, 144, 110, 148, 161, 12, 21, 165, 247, 124, 115, 244, 202, 205, 159, 153, 46, 67, 139, 222, 129, 81, 231, 220, 123, 223, 231, 251, 238, 249, 206, 185, 231, 56, 0, 128, 195, 44, 250, 224, 50, 138, 112, 249, 208, 163, 11, 189, 158, 6, 27, 139, 12, 21, 220, 241, 238, 215, 172, 17, 190, 124, 74, 113, 30, 107, 119, 176, 154, 220, 48, 141, 67, 131, 115, 174, 178, 46, 26, 3, 50, 124, 126, 191, 143, 228, 143, 42, 3, 6, 193, 15, 60, 148, 206, 142, 159, 94, 89, 92, 57, 219, 210, 223, 211, 212, 153, 206, 4, 109, 254, 80, 77, 203, 190, 186, 184, 100, 132, 143, 142, 233, 124, 95, 125, 159, 31, 104, 201, 114, 14, 201, 34, 88, 181, 79, 6, 48, 6, 48, 154, 147, 98, 223, 33, 33, 130, 241, 51, 139, 139, 43, 231, 30, 61, 125, 237, 105, 160, 61, 55, 161, 166, 4, 149, 205, 171, 149, 185, 75, 27, 225, 203, 145, 105, 184, 185, 139, 241, 187, 89, 67, 168, 66, 89, 130, 11, 64, 40, 173, 195, 195, 72, 100, 52, 22, 49, 1, 16, 193, 137, 202, 87, 61, 77, 87, 211, 109, 212, 51, 97, 46, 76, 61, 197, 83, 185, 252, 93, 86, 198, 23, 229, 63, 156, 244, 50, 155, 179, 59, 107, 211, 0, 24, 148, 12, 163, 246, 193, 128, 156, 16, 112, 122, 134, 30, 83, 6, 136, 224, 217, 93, 10, 28, 1, 40, 115, 243, 1, 142, 254, 220, 121, 233, 79, 3, 19, 252, 167, 63, 22, 117, 98, 36, 109, 119, 173, 2, 64, 150, 191, 154, 16, 146, 187, 170, 112, 157, 12, 127, 76, 0, 176, 141, 216, 32, 235, 219, 236, 206, 59, 106, 126, 126, 54, 210, 143, 21, 194, 244, 116, 210, 69, 52, 117, 54, 7, 71, 7, 200, 31, 28, 64, 24, 197, 156, 84, 123, 223, 70, 235, 246, 24, 0, 224, 237, 135, 185, 216, 182, 84, 51, 106, 114, 85, 239, 131, 191, 90, 37, 7, 235, 108, 92, 176, 91, 174, 5, 114, 87, 227, 49, 16, 228, 34, 197, 35, 231, 36, 159, 1, 96, 77, 228, 63, 63, 175, 194, 31, 146, 246, 180, 89, 89, 86, 133, 204, 101, 215, 5, 236, 240, 222, 16, 77, 8, 115, 165, 167, 186, 247, 32, 42, 159, 2, 176, 238, 159, 55, 79, 19, 51, 236, 35, 225, 211, 86, 105, 41, 54, 138, 4, 175, 42, 154, 179, 195, 85, 105, 64, 253, 72, 74, 74, 190, 117, 152, 234, 199, 50, 128, 224, 217, 23, 164, 191, 41, 124, 244, 252, 96, 29, 3, 29, 235, 118, 5, 39, 131, 127, 106, 46, 144, 90, 219, 201, 184, 176, 10, 160, 147, 191, 42, 62, 35, 124, 249, 154, 44, 187, 33, 151, 185, 159, 30, 23, 157, 74, 222, 82, 69, 111, 123, 15, 91, 204, 128, 240, 147, 127, 228, 169, 128, 226, 143, 132, 79, 0, 131, 165, 221, 224, 67, 146, 247, 238, 219, 90, 54, 223, 73, 7, 1, 88, 244, 15, 27, 189, 143, 194, 7, 0, 4, 2, 170, 3, 188, 118, 144, 197, 91, 224, 35, 127, 115, 239, 83, 37, 135, 123, 128, 127, 217, 233, 240, 0, 4, 137, 171, 119, 37, 106, 177, 146, 1, 129, 241, 175, 53, 47, 28, 254, 16, 89, 155, 170, 222, 39, 147, 15, 17, 72, 234, 19, 48, 238, 40, 75, 0, 228, 239, 12, 111, 238, 125, 235, 195, 46, 49, 32, 5, 181, 116, 237, 56, 1, 224, 254, 183, 170, 77, 82, 216, 147, 191, 52, 133, 12, 128, 228, 116, 28, 22, 31, 0, 21, 191, 211, 136, 31, 0, 102, 77, 166, 122, 184, 47, 62, 0, 66, 240, 189, 61, 89, 213, 213, 206, 106, 104, 21, 178, 111, 169, 209, 199, 76, 196, 5, 0, 254, 13, 253, 121, 107, 82, 46, 82, 96, 107, 185, 202, 210, 185, 47, 46, 0, 88, 26, 183, 95, 90, 215, 183, 237, 85, 123, 32, 62, 0, 144, 30, 53, 107, 188, 170, 224, 95, 3, 8, 93, 236, 46, 93, 236, 226, 255, 31, 125, 157, 47, 118, 0, 161, 67, 72, 32, 189, 235, 82, 220, 144, 78, 141, 230, 131, 77, 237, 166, 203, 141, 140, 140, 232, 127, 155, 1, 17, 221, 199, 98, 251, 63, 213, 87, 60, 18, 244, 24, 0, 24, 196, 133, 216, 120, 23, 194, 184, 50, 163, 70, 211, 7, 155, 28, 229, 241, 155, 9, 224, 203, 246, 28, 61, 194, 240, 91, 148, 0, 130, 231, 123, 221, 110, 239, 77, 222, 225, 118, 151, 228, 240, 138, 62, 183, 251, 161, 106, 2, 72, 35, 154, 220, 111, 174, 243, 17, 174, 148, 95, 114, 207, 139, 131, 117, 101, 153, 80, 209, 231, 117, 87, 192, 205, 240, 47, 190, 87, 112, 185, 224, 197, 3, 236, 251, 69, 7, 160, 243, 198, 122, 45, 84, 95, 44, 206, 107, 41, 245, 183, 217, 113, 45, 116, 165, 68, 36, 40, 0, 81, 162, 133, 82, 180, 107, 55, 249, 117, 5, 203, 111, 183, 105, 41, 109, 29, 17, 32, 161, 243, 163, 5, 218, 132, 230, 101, 60, 97, 253, 98, 236, 121, 189, 150, 50, 53, 17, 42, 207, 225, 251, 163, 205, 64, 78, 90, 226, 88, 90, 78, 126, 121, 98, 102, 121, 99, 254, 181, 196, 153, 52, 121, 174, 74, 78, 225, 68, 230, 204, 88, 90, 49, 63, 178, 14, 208, 145, 56, 51, 86, 168, 14, 16, 56, 183, 112, 42, 115, 172, 66, 168, 104, 1, 94, 124, 48, 148, 57, 51, 49, 245, 245, 50, 178, 22, 21, 0, 162, 248, 77, 125, 249, 242, 168, 15, 131, 113, 124, 161, 12, 113, 89, 205, 114, 98, 98, 9, 134, 240, 39, 16, 212, 178, 153, 217, 137, 51, 32, 72, 78, 128, 32, 72, 32, 128, 195, 99, 200, 229, 120, 9, 8, 2, 23, 12, 250, 210, 238, 21, 224, 106, 154, 84, 204, 54, 217, 251, 248, 61, 219, 122, 27, 151, 51, 76, 254, 38, 104, 186, 246, 233, 243, 201, 247, 249, 67, 87, 63, 73, 228, 140, 247, 67, 134, 78, 211, 79, 44, 80, 160, 145, 80, 45, 173, 62, 16, 227, 194, 218, 231, 0, 116, 55, 140, 69, 179, 157, 3, 116, 71, 146, 217, 123, 18, 230, 2, 244, 34, 198, 184, 231, 79, 252, 26, 169, 60, 27, 130, 198, 86, 34, 115, 118, 53, 44, 225, 204, 142, 17, 183, 215, 138, 61, 164, 218, 38, 98, 156, 33, 107, 149, 75, 242, 242, 102, 88, 114, 83, 37, 119, 197, 179, 250, 224, 220, 156, 22, 17, 104, 129, 5, 242, 107, 90, 87, 169, 242, 84, 8, 222, 7, 17, 218, 126, 251, 0, 96, 118, 131, 136, 155, 245, 60, 194, 83, 71, 178, 237, 9, 217, 59, 90, 161, 106, 111, 96, 196, 162, 7, 49, 87, 37, 49, 7, 65, 6, 109, 48, 80, 0, 247, 4, 160, 211, 78, 173, 73, 9, 0, 62, 112, 109, 113, 18, 230, 206, 148, 124, 169, 229, 193, 217, 97, 100, 245, 77, 105, 207, 193, 161, 74, 10, 15, 51, 190, 166, 176, 86, 8, 18, 84, 115, 128, 144, 172, 49, 138, 133, 175, 131, 1, 125, 30, 192, 7, 128, 94, 100, 94, 132, 217, 143, 133, 189, 2, 99, 165, 39, 44, 152, 46, 68, 25, 0, 212, 113, 227, 145, 228, 163, 21, 56, 204, 5, 177, 148, 32, 202, 166, 125, 49, 24, 147, 23, 149, 1, 207, 1, 128, 31, 102, 118, 112, 208, 195, 167, 45, 79, 244, 11, 243, 140, 150, 124, 51, 155, 160, 201, 27, 156, 167, 138, 224, 131, 67, 190, 100, 57, 73, 19, 65, 162, 24, 237, 30, 194, 93, 73, 94, 49, 14, 80, 180, 4, 192, 37, 98, 246, 132, 205, 231, 134, 109, 115, 209, 215, 8, 85, 41, 216, 195, 136, 185, 13, 112, 217, 207, 68, 166, 132, 174, 135, 76, 12, 26, 170, 8, 82, 65, 152, 13, 130, 132, 121, 75, 190, 67, 101, 226, 52, 13, 238, 79, 3, 44, 110, 80, 58, 144, 128, 115, 35, 102, 220, 254, 206, 107, 176, 1, 39, 217, 95, 95, 136, 139, 37, 249, 1, 56, 66, 14, 66, 204, 21, 0, 253, 156, 32, 238, 76, 139, 127, 3, 154, 120, 112, 49, 66, 206, 12, 246, 208, 39, 1, 180, 101, 34, 154, 191, 184, 2, 0, 26, 180, 242, 8, 184, 72, 48, 46, 49, 172, 5, 53, 5, 240, 186, 137, 98, 113, 208, 96, 86, 8, 210, 153, 181, 234, 144, 114, 89, 99, 60, 175, 180, 218, 90, 42, 128, 39, 21, 160, 164, 103, 48, 132, 174, 218, 97, 8, 66, 244, 126, 34, 64, 94, 54, 17, 231, 82, 34, 206, 147, 206, 211, 74, 61, 182, 7, 80, 101, 103, 104, 84, 10, 253, 104, 128, 102, 142, 227, 67, 222, 164, 204, 117, 115, 24, 220, 70, 192, 221, 209, 201, 189, 4, 0, 182, 184, 179, 39, 7, 108, 197, 163, 46, 4, 63, 19, 96, 106, 66, 27, 222, 28, 3, 22, 115, 255, 93, 181, 66, 232, 218, 177, 229, 230, 69, 240, 186, 132, 190, 27, 51, 233, 87, 73, 37, 107, 140, 142, 16, 152, 199, 92, 30, 75, 84, 1, 165, 7, 67, 70, 157, 5, 89, 194, 224, 169, 250, 9, 41, 189, 26, 24, 155, 11, 178, 55, 112, 100, 214, 19, 0, 0, 219, 15, 163, 200, 238, 22, 69, 208, 49, 4, 198, 50, 90, 106, 10, 192, 29, 226, 152, 35, 140, 47, 122, 41, 128, 221, 182, 217, 60, 83, 58, 223, 54, 189, 53, 248, 206, 34, 160, 191, 193, 244, 76, 72, 215, 107, 122, 183, 105, 18, 81, 10, 19, 120, 247, 213, 200, 195, 91, 191, 117, 154, 240, 120, 46, 81, 31, 231, 245, 131, 105, 179, 145, 55, 7, 255, 101, 110, 68, 53, 93, 215, 171, 217, 160, 50, 0, 126, 43, 122, 58, 13, 95, 146, 177, 242, 176, 115, 145, 219, 165, 123, 210, 109, 69, 66, 55, 198, 227, 113, 27, 138, 166, 252, 149, 44, 252, 53, 16, 250, 119, 181, 40, 182, 63, 123, 232, 239, 67, 232, 157, 148, 2, 80, 183, 72, 53, 168, 135, 86, 138, 183, 247, 199, 157, 149, 7, 191, 201, 218, 47, 171, 48, 155, 255, 103, 215, 242, 127, 195, 1, 70, 29, 48, 234, 128, 81, 7, 140, 58, 96, 212, 1, 163, 14, 24, 117, 0, 213, 1, 0, 87, 162, 212, 25, 139, 217, 220, 95, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130} diff --git a/v3/pkg/application/keys.go b/v3/pkg/application/keys.go deleted file mode 100644 index d7d1beaf7..000000000 --- a/v3/pkg/application/keys.go +++ /dev/null @@ -1,172 +0,0 @@ -package application - -import ( - "fmt" - "strconv" - "strings" -) - -// modifier is actually a string -type modifier int - -const ( - // CmdOrCtrlKey represents Command on Mac and Control on other platforms - CmdOrCtrlKey modifier = 0 << iota - // OptionOrAltKey represents Option on Mac and Alt on other platforms - OptionOrAltKey modifier = 1 << iota - // ShiftKey represents the shift key on all systems - ShiftKey modifier = 2 << iota - // SuperKey represents Command on Mac and the Windows key on the other platforms - SuperKey modifier = 3 << iota - // ControlKey represents the control key on all systems - ControlKey modifier = 4 << iota -) - -var modifierMap = map[string]modifier{ - "cmdorctrl": CmdOrCtrlKey, - "cmd": CmdOrCtrlKey, - "command": CmdOrCtrlKey, - "ctrl": CmdOrCtrlKey, - "optionoralt": OptionOrAltKey, - "alt": OptionOrAltKey, - "option": OptionOrAltKey, - "shift": ShiftKey, - "super": SuperKey, -} - -// accelerator holds the keyboard shortcut for a menu item -type accelerator struct { - Key string - Modifiers []modifier -} - -var namedKeys = map[string]struct{}{ - "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": {}, -} - -func parseKey(key string) (string, bool) { - - // Lowercase! - key = strings.ToLower(key) - - // Check special case - if key == "plus" { - return "+", true - } - - // Handle named keys - _, namedKey := namedKeys[key] - if namedKey { - return key, true - } - - // Check we only have a single character - if len(key) != 1 { - return "", false - } - - runeKey := rune(key[0]) - - // This may be too inclusive - if strconv.IsPrint(runeKey) { - return key, true - } - - return "", false - -} - -// parseAccelerator parses a string into an accelerator -func parseAccelerator(shortcut string) (*accelerator, error) { - - var result accelerator - - // Split the shortcut by + - components := strings.Split(shortcut, "+") - - // If we only have one it should be a key - // We require components - if len(components) == 0 { - return nil, fmt.Errorf("no components given to validateComponents") - } - - modifiers := map[modifier]struct{}{} - - // Check components - for index, component := range components { - - // If last component - if index == len(components)-1 { - processedKey, validKey := parseKey(component) - if !validKey { - return nil, fmt.Errorf("'%s' is not a valid key", component) - } - result.Key = processedKey - continue - } - - // Not last component - needs to be modifier - lowercaseComponent := strings.ToLower(component) - thisModifier, valid := modifierMap[lowercaseComponent] - if !valid { - return nil, fmt.Errorf("'%s' is not a valid modifier", component) - } - // Save this data - modifiers[thisModifier] = struct{}{} - } - // return the keys as a slice - for thisModifier := range modifiers { - result.Modifiers = append(result.Modifiers, thisModifier) - } - return &result, nil -} diff --git a/v3/pkg/application/keys_darwin.go b/v3/pkg/application/keys_darwin.go deleted file mode 100644 index 42e1c4686..000000000 --- a/v3/pkg/application/keys_darwin.go +++ /dev/null @@ -1,28 +0,0 @@ -//go:build darwin - -package application - -const ( - NSEventModifierFlagShift = 1 << 17 // Set if Shift key is pressed. - NSEventModifierFlagControl = 1 << 18 // Set if Control key is pressed. - NSEventModifierFlagOption = 1 << 19 // Set if Option or Alternate key is pressed. - NSEventModifierFlagCommand = 1 << 20 // Set if Command key is pressed. -) - -// macModifierMap maps accelerator modifiers to macOS modifiers. -var macModifierMap = map[modifier]int{ - CmdOrCtrlKey: NSEventModifierFlagCommand, - ControlKey: NSEventModifierFlagControl, - OptionOrAltKey: NSEventModifierFlagOption, - ShiftKey: NSEventModifierFlagShift, - SuperKey: NSEventModifierFlagCommand, -} - -// toMacModifier converts the accelerator to a macOS modifier. -func toMacModifier(modifiers []modifier) int { - result := 0 - for _, modifier := range modifiers { - result |= macModifierMap[modifier] - } - return result -} diff --git a/v3/pkg/application/mainthread.go b/v3/pkg/application/mainthread.go deleted file mode 100644 index f0ae2803b..000000000 --- a/v3/pkg/application/mainthread.go +++ /dev/null @@ -1,21 +0,0 @@ -package application - -import ( - "sync" -) - -var mainThreadFunctionStore = make(map[uint]func()) -var mainThreadFunctionStoreLock sync.RWMutex - -func generateFunctionStoreID() uint { - startID := 0 - for { - if _, ok := mainThreadFunctionStore[uint(startID)]; !ok { - return uint(startID) - } - startID++ - if startID == 0 { - Fatal("Too many functions have been dispatched to the main thread") - } - } -} diff --git a/v3/pkg/application/mainthread_darwin.go b/v3/pkg/application/mainthread_darwin.go deleted file mode 100644 index 65ca398ad..000000000 --- a/v3/pkg/application/mainthread_darwin.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa - -#include "Cocoa/Cocoa.h" - -extern void dispatchOnMainThreadCallback(unsigned int); - -static void dispatchOnMainThread(unsigned int id) { - dispatch_async(dispatch_get_main_queue(), ^{ - dispatchOnMainThreadCallback(id); - }); -} - -*/ -import "C" - -func (m *macosApp) dispatchOnMainThread(id uint) { - C.dispatchOnMainThread(C.uint(id)) -} - -//export dispatchOnMainThreadCallback -func dispatchOnMainThreadCallback(callbackID C.uint) { - mainThreadFunctionStoreLock.RLock() - id := uint(callbackID) - fn := mainThreadFunctionStore[id] - if fn == nil { - Fatal("dispatchCallback called with invalid id: %v", id) - } - delete(mainThreadFunctionStore, id) - mainThreadFunctionStoreLock.RUnlock() - fn() -} diff --git a/v3/pkg/application/menu.go b/v3/pkg/application/menu.go deleted file mode 100644 index 80cf213dd..000000000 --- a/v3/pkg/application/menu.go +++ /dev/null @@ -1,109 +0,0 @@ -package application - -type menuImpl interface { - update() -} - -type Menu struct { - items []*MenuItem - label string - - impl menuImpl -} - -func NewMenu() *Menu { - return &Menu{} -} - -func (m *Menu) Add(label string) *MenuItem { - result := newMenuItem(label) - m.items = append(m.items, result) - return result -} - -func (m *Menu) AddSeparator() { - result := newMenuItemSeperator() - m.items = append(m.items, result) -} - -func (m *Menu) AddCheckbox(label string, enabled bool) *MenuItem { - result := newMenuItemCheckbox(label, enabled) - m.items = append(m.items, result) - return result -} - -func (m *Menu) AddRadio(label string, enabled bool) *MenuItem { - result := newMenuItemRadio(label, enabled) - m.items = append(m.items, result) - return result -} - -func (m *Menu) Update() { - m.processRadioGroups() - if m.impl == nil { - m.impl = newMenuImpl(m) - } - m.impl.update() -} - -func (m *Menu) AddSubmenu(s string) *Menu { - result := newSubMenuItem(s) - m.items = append(m.items, result) - return result.submenu -} - -func (m *Menu) AddRole(role Role) *Menu { - result := newRole(role) - m.items = append(m.items, result) - return m -} - -func (m *Menu) processRadioGroups() { - var radioGroup []*MenuItem - for _, item := range m.items { - if item.itemType == submenu { - item.submenu.processRadioGroups() - continue - } - if item.itemType == radio { - radioGroup = append(radioGroup, item) - } else { - if len(radioGroup) > 0 { - for _, item := range radioGroup { - item.radioGroupMembers = radioGroup - } - radioGroup = nil - } - } - } - if len(radioGroup) > 0 { - for _, item := range radioGroup { - item.radioGroupMembers = radioGroup - } - } -} - -func (m *Menu) SetLabel(label string) { - m.label = label -} - -func (m *Menu) setContextData(data *ContextMenuData) { - for _, item := range m.items { - item.setContextData(data) - } -} - -func (a *App) NewMenu() *Menu { - return &Menu{} -} - -func defaultApplicationMenu() *Menu { - menu := NewMenu() - menu.AddRole(AppMenu) - menu.AddRole(FileMenu) - menu.AddRole(EditMenu) - menu.AddRole(ViewMenu) - menu.AddRole(WindowMenu) - menu.AddRole(HelpMenu) - return menu -} diff --git a/v3/pkg/application/menu_darwin.go b/v3/pkg/application/menu_darwin.go deleted file mode 100644 index b14be232a..000000000 --- a/v3/pkg/application/menu_darwin.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.10 -x objective-c -#cgo LDFLAGS: -framework Cocoa - -#include "menuitem.h" - -extern void setMenuItemChecked(void*, unsigned int, bool); - -// Clear and release all menu items in the menu -void clearMenu(void* nsMenu) { - NSMenu *menu = (NSMenu *)nsMenu; - [menu removeAllItems]; -} - - -// Create a new NSMenu -void* createNSMenu(char* label) { - NSMenu *menu = [[NSMenu alloc] init]; - if( label != NULL && strlen(label) > 0 ) { - menu.title = [NSString stringWithUTF8String:label]; - free(label); - } - [menu setAutoenablesItems:NO]; - return (void*)menu; -} - -void addMenuItem(void* nsMenu, void* nsMenuItem) { - NSMenu *menu = (NSMenu *)nsMenu; - [menu addItem:nsMenuItem]; -} - -// add seperator to menu -void addMenuSeparator(void* nsMenu) { - NSMenu *menu = (NSMenu *)nsMenu; - [menu addItem:[NSMenuItem separatorItem]]; -} - -// Set the submenu of a menu item -void setMenuItemSubmenu(void* nsMenuItem, void* nsMenu) { - NSMenuItem *menuItem = (NSMenuItem *)nsMenuItem; - NSMenu *menu = (NSMenu *)nsMenu; - [menuItem setSubmenu:menu]; -} - -// Add services menu -static void addServicesMenu(void* menu) { - NSMenu *nsMenu = (__bridge NSMenu *)menu; - [NSApp setServicesMenu:nsMenu]; -} - - -*/ -import "C" -import "unsafe" - -type macosMenu struct { - menu *Menu - - nsMenu unsafe.Pointer -} - -func newMenuImpl(menu *Menu) *macosMenu { - result := &macosMenu{ - menu: menu, - } - return result -} - -func (m *macosMenu) update() { - if m.nsMenu == nil { - m.nsMenu = C.createNSMenu(C.CString(m.menu.label)) - } else { - C.clearMenu(m.nsMenu) - } - m.processMenu(m.nsMenu, m.menu) -} - -func (m *macosMenu) processMenu(parent unsafe.Pointer, menu *Menu) { - for _, item := range menu.items { - switch item.itemType { - case submenu: - submenu := item.submenu - nsSubmenu := C.createNSMenu(C.CString(item.label)) - m.processMenu(nsSubmenu, submenu) - menuItem := newMenuItemImpl(item) - item.impl = menuItem - C.addMenuItem(parent, menuItem.nsMenuItem) - C.setMenuItemSubmenu(menuItem.nsMenuItem, nsSubmenu) - if item.role == ServicesMenu { - C.addServicesMenu(nsSubmenu) - } - case text, checkbox, radio: - menuItem := newMenuItemImpl(item) - item.impl = menuItem - C.addMenuItem(parent, menuItem.nsMenuItem) - case separator: - C.addMenuSeparator(parent) - } - - } -} diff --git a/v3/pkg/application/menuitem.go b/v3/pkg/application/menuitem.go deleted file mode 100644 index da943156b..000000000 --- a/v3/pkg/application/menuitem.go +++ /dev/null @@ -1,284 +0,0 @@ -package application - -import ( - "os" - "sync" - "sync/atomic" -) - -type menuItemType int - -const ( - text menuItemType = iota - separator - checkbox - radio - submenu -) - -var menuItemID uintptr -var menuItemMap = make(map[uint]*MenuItem) -var menuItemMapLock sync.Mutex - -func addToMenuItemMap(menuItem *MenuItem) { - menuItemMapLock.Lock() - menuItemMap[menuItem.id] = menuItem - menuItemMapLock.Unlock() -} - -func getMenuItemByID(id uint) *MenuItem { - menuItemMapLock.Lock() - defer menuItemMapLock.Unlock() - return menuItemMap[id] -} - -type menuItemImpl interface { - setTooltip(s string) - setLabel(s string) - setDisabled(disabled bool) - setChecked(checked bool) - setAccelerator(accelerator *accelerator) -} - -type MenuItem struct { - id uint - label string - tooltip string - disabled bool - checked bool - submenu *Menu - callback func(*Context) - itemType menuItemType - accelerator *accelerator - role Role - contextMenuData *ContextMenuData - - impl menuItemImpl - radioGroupMembers []*MenuItem -} - -func newMenuItem(label string) *MenuItem { - result := &MenuItem{ - id: uint(atomic.AddUintptr(&menuItemID, 1)), - label: label, - itemType: text, - } - addToMenuItemMap(result) - return result -} - -func newMenuItemSeperator() *MenuItem { - result := &MenuItem{ - itemType: separator, - } - return result -} - -func newMenuItemCheckbox(label string, checked bool) *MenuItem { - result := &MenuItem{ - id: uint(atomic.AddUintptr(&menuItemID, 1)), - label: label, - checked: checked, - itemType: checkbox, - } - addToMenuItemMap(result) - return result -} - -func newMenuItemRadio(label string, checked bool) *MenuItem { - result := &MenuItem{ - id: uint(atomic.AddUintptr(&menuItemID, 1)), - label: label, - checked: checked, - itemType: radio, - } - addToMenuItemMap(result) - return result -} - -func newSubMenuItem(label string) *MenuItem { - result := &MenuItem{ - id: uint(atomic.AddUintptr(&menuItemID, 1)), - label: label, - itemType: submenu, - submenu: &Menu{ - label: label, - }, - } - addToMenuItemMap(result) - return result -} - -func newRole(role Role) *MenuItem { - switch role { - case AppMenu: - return newAppMenu() - case EditMenu: - return newEditMenu() - case FileMenu: - return newFileMenu() - case ViewMenu: - return newViewMenu() - case ServicesMenu: - return newServicesMenu() - case SpeechMenu: - return newSpeechMenu() - case WindowMenu: - return newWindowMenu() - case HelpMenu: - return newHelpMenu() - case Hide: - return newHideMenuItem() - case HideOthers: - return newHideOthersMenuItem() - case UnHide: - return newUnhideMenuItem() - case Undo: - return newUndoMenuItem() - case Redo: - return newRedoMenuItem() - case Cut: - return newCutMenuItem() - case Copy: - return newCopyMenuItem() - case Paste: - return newPasteMenuItem() - case PasteAndMatchStyle: - return newPasteAndMatchStyleMenuItem() - case SelectAll: - return newSelectAllMenuItem() - case Delete: - return newDeleteMenuItem() - case Quit: - return newQuitMenuItem() - case Close: - return newCloseMenuItem() - case About: - return newAboutMenuItem() - case Reload: - return newReloadMenuItem() - case ForceReload: - return newForceReloadMenuItem() - case ToggleFullscreen: - return newToggleFullscreenMenuItem() - case ToggleDevTools: - return newToggleDevToolsMenuItem() - case ResetZoom: - return newZoomResetMenuItem() - case ZoomIn: - return newZoomInMenuItem() - case ZoomOut: - return newZoomOutMenuItem() - case Minimize: - return newMinimizeMenuItem() - case Zoom: - return newZoomMenuItem() - - default: - println("No support for role:", role) - os.Exit(1) - } - return nil -} - -func newServicesMenu() *MenuItem { - serviceMenu := newSubMenuItem("Services") - serviceMenu.role = ServicesMenu - return serviceMenu -} - -func (m *MenuItem) handleClick() { - var ctx = newContext(). - withClickedMenuItem(m). - withContextMenuData(m.contextMenuData) - if m.itemType == checkbox { - m.checked = !m.checked - ctx.withChecked(m.checked) - m.impl.setChecked(m.checked) - } - if m.itemType == radio { - for _, member := range m.radioGroupMembers { - member.checked = false - member.impl.setChecked(false) - } - m.checked = true - ctx.withChecked(true) - m.impl.setChecked(true) - } - if m.callback != nil { - go m.callback(ctx) - } -} - -func (m *MenuItem) SetAccelerator(shortcut string) *MenuItem { - accelerator, err := parseAccelerator(shortcut) - if err != nil { - println("ERROR: invalid accelerator:", err.Error()) - return m - } - m.accelerator = accelerator - if m.impl != nil { - m.impl.setAccelerator(accelerator) - } - return m -} - -func (m *MenuItem) SetTooltip(s string) *MenuItem { - m.tooltip = s - if m.impl != nil { - m.impl.setTooltip(s) - } - return m -} - -func (m *MenuItem) SetLabel(s string) *MenuItem { - m.label = s - if m.impl != nil { - m.impl.setLabel(s) - } - return m -} - -func (m *MenuItem) SetEnabled(enabled bool) *MenuItem { - m.disabled = !enabled - if m.impl != nil { - m.impl.setDisabled(m.disabled) - } - return m -} - -func (m *MenuItem) SetChecked(checked bool) *MenuItem { - m.checked = checked - if m.impl != nil { - m.impl.setChecked(m.checked) - } - return m -} - -func (m *MenuItem) Checked() bool { - return m.checked -} - -func (m *MenuItem) OnClick(f func(*Context)) *MenuItem { - m.callback = f - return m -} - -func (m *MenuItem) Label() string { - return m.label -} - -func (m *MenuItem) Tooltip() string { - return m.tooltip -} - -func (m *MenuItem) Enabled() bool { - return !m.disabled -} - -func (m *MenuItem) setContextData(data *ContextMenuData) { - m.contextMenuData = data - if m.submenu != nil { - m.submenu.setContextData(data) - } -} diff --git a/v3/pkg/application/menuitem.h b/v3/pkg/application/menuitem.h deleted file mode 100644 index 91fce726e..000000000 --- a/v3/pkg/application/menuitem.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef MenuItemDelegate_h -#define MenuItemDelegate_h - -#import - -extern void processMenuItemClick(unsigned int); - -@interface MenuItem : NSMenuItem - -@property unsigned int menuItemID; - -- (void) handleClick; - -@end - - -#endif /* MenuItemDelegate_h */ diff --git a/v3/pkg/application/menuitem.m b/v3/pkg/application/menuitem.m deleted file mode 100644 index f875d0de5..000000000 --- a/v3/pkg/application/menuitem.m +++ /dev/null @@ -1,13 +0,0 @@ -//go:build darwin - -#import - -#import "menuitem.h" - -@implementation MenuItem - -- (void) handleClick { - processMenuItemClick(self.menuItemID); -} - -@end diff --git a/v3/pkg/application/menuitem_darwin.go b/v3/pkg/application/menuitem_darwin.go deleted file mode 100644 index daee2a521..000000000 --- a/v3/pkg/application/menuitem_darwin.go +++ /dev/null @@ -1,620 +0,0 @@ -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -framework WebKit - -#include "Cocoa/Cocoa.h" -#include "menuitem.h" -#include "application.h" - -#define unicode(input) [NSString stringWithFormat:@"%C", input] - -// Create menu item -void* newMenuItem(unsigned int menuItemID, char *label, bool disabled, char* tooltip) { - MenuItem *menuItem = [MenuItem new]; - - // Label - menuItem.title = [NSString stringWithUTF8String:label]; - - if( disabled ) { - [menuItem setTarget:nil]; - } else { - [menuItem setTarget:menuItem]; - } - menuItem.menuItemID = menuItemID; - menuItem.action = @selector(handleClick); - menuItem.enabled = !disabled; - - // Tooltip - if( tooltip != NULL ) { - menuItem.toolTip = [NSString stringWithUTF8String:tooltip]; - free(tooltip); - } - - // Set the tag - [menuItem setTag:menuItemID]; - - return (void*)menuItem; -} - -// set menu item label -void setMenuItemLabel(void* nsMenuItem, char *label) { - MenuItem *menuItem = (MenuItem *)nsMenuItem; - menuItem.title = [NSString stringWithUTF8String:label]; -} - -// set menu item disabled -void setMenuItemDisabled(void* nsMenuItem, bool disabled) { - dispatch_async(dispatch_get_main_queue(), ^{ - MenuItem *menuItem = (MenuItem *)nsMenuItem; - [menuItem setEnabled:!disabled]; - // remove target - if( disabled ) { - [menuItem setTarget:nil]; - } else { - [menuItem setTarget:menuItem]; - } - }); -} - -// set menu item tooltip -void setMenuItemTooltip(void* nsMenuItem, char *tooltip) { - MenuItem *menuItem = (MenuItem *)nsMenuItem; - menuItem.toolTip = [NSString stringWithUTF8String:tooltip]; -} - -// Check menu item -void setMenuItemChecked(void* nsMenuItem, bool checked) { - MenuItem *menuItem = (MenuItem *)nsMenuItem; - menuItem.state = checked ? NSControlStateValueOn : NSControlStateValueOff; -} - -NSString* translateKey(NSString* key) { - - // Guard against no accelerator key - if( key == NULL ) { - return @""; - } - - if( [key isEqualToString:@"backspace"] ) { - return unicode(0x0008); - } - if( [key isEqualToString:@"tab"] ) { - return unicode(0x0009); - } - if( [key isEqualToString:@"return"] ) { - return unicode(0x000d); - } - if( [key isEqualToString:@"enter"] ) { - return unicode(0x000d); - } - if( [key isEqualToString:@"escape"] ) { - return unicode(0x001b); - } - if( [key isEqualToString:@"left"] ) { - return unicode(0x001c); - } - if( [key isEqualToString:@"right"] ) { - return unicode(0x001d); - } - if( [key isEqualToString:@"up"] ) { - return unicode(0x001e); - } - if( [key isEqualToString:@"down"] ) { - return unicode(0x001f); - } - if( [key isEqualToString:@"space"] ) { - return unicode(0x0020); - } - if( [key isEqualToString:@"delete"] ) { - return unicode(0x007f); - } - if( [key isEqualToString:@"home"] ) { - return unicode(0x2196); - } - if( [key isEqualToString:@"end"] ) { - return unicode(0x2198); - } - if( [key isEqualToString:@"page up"] ) { - return unicode(0x21de); - } - if( [key isEqualToString:@"page down"] ) { - return unicode(0x21df); - } - if( [key isEqualToString:@"f1"] ) { - return unicode(0xf704); - } - if( [key isEqualToString:@"f2"] ) { - return unicode(0xf705); - } - if( [key isEqualToString:@"f3"] ) { - return unicode(0xf706); - } - if( [key isEqualToString:@"f4"] ) { - return unicode(0xf707); - } - if( [key isEqualToString:@"f5"] ) { - return unicode(0xf708); - } - if( [key isEqualToString:@"f6"] ) { - return unicode(0xf709); - } - if( [key isEqualToString:@"f7"] ) { - return unicode(0xf70a); - } - if( [key isEqualToString:@"f8"] ) { - return unicode(0xf70b); - } - if( [key isEqualToString:@"f9"] ) { - return unicode(0xf70c); - } - if( [key isEqualToString:@"f10"] ) { - return unicode(0xf70d); - } - if( [key isEqualToString:@"f11"] ) { - return unicode(0xf70e); - } - if( [key isEqualToString:@"f12"] ) { - return unicode(0xf70f); - } - if( [key isEqualToString:@"f13"] ) { - return unicode(0xf710); - } - if( [key isEqualToString:@"f14"] ) { - return unicode(0xf711); - } - if( [key isEqualToString:@"f15"] ) { - return unicode(0xf712); - } - if( [key isEqualToString:@"f16"] ) { - return unicode(0xf713); - } - if( [key isEqualToString:@"f17"] ) { - return unicode(0xf714); - } - if( [key isEqualToString:@"f18"] ) { - return unicode(0xf715); - } - if( [key isEqualToString:@"f19"] ) { - return unicode(0xf716); - } - if( [key isEqualToString:@"f20"] ) { - return unicode(0xf717); - } - if( [key isEqualToString:@"f21"] ) { - return unicode(0xf718); - } - if( [key isEqualToString:@"f22"] ) { - return unicode(0xf719); - } - if( [key isEqualToString:@"f23"] ) { - return unicode(0xf71a); - } - if( [key isEqualToString:@"f24"] ) { - return unicode(0xf71b); - } - if( [key isEqualToString:@"f25"] ) { - return unicode(0xf71c); - } - if( [key isEqualToString:@"f26"] ) { - return unicode(0xf71d); - } - if( [key isEqualToString:@"f27"] ) { - return unicode(0xf71e); - } - if( [key isEqualToString:@"f28"] ) { - return unicode(0xf71f); - } - if( [key isEqualToString:@"f29"] ) { - return unicode(0xf720); - } - if( [key isEqualToString:@"f30"] ) { - return unicode(0xf721); - } - if( [key isEqualToString:@"f31"] ) { - return unicode(0xf722); - } - if( [key isEqualToString:@"f32"] ) { - return unicode(0xf723); - } - if( [key isEqualToString:@"f33"] ) { - return unicode(0xf724); - } - if( [key isEqualToString:@"f34"] ) { - return unicode(0xf725); - } - if( [key isEqualToString:@"f35"] ) { - return unicode(0xf726); - } - if( [key isEqualToString:@"numLock"] ) { - return unicode(0xf739); - } - return key; -} - -// Set the menuitem key equivalent -void setMenuItemKeyEquivalent(void* nsMenuItem, char *key, int modifier) { - MenuItem *menuItem = (MenuItem *)nsMenuItem; - NSString *nskey = [NSString stringWithUTF8String:key]; - menuItem.keyEquivalent = translateKey(nskey); - menuItem.keyEquivalentModifierMask = modifier; - free(key); -} - -// Call the copy selector on the pasteboard -static void copyToPasteboard(char *text) { - NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; - [pasteboard clearContents]; - [pasteboard setString:[NSString stringWithUTF8String:text] forType:NSPasteboardTypeString]; -} - -// Call the paste selector on the pasteboard -static char *pasteFromPasteboard(void) { - NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; - NSString *text = [pasteboard stringForType:NSPasteboardTypeString]; - if( text == nil ) { - return NULL; - } - return strdup([text UTF8String]); -} - -// Call paste selector to paste text -static void paste(void) { - [NSApp sendAction:@selector(paste:) to:nil from:nil]; -} - -// Call copy selector to copy text -static void copy(void) { - [NSApp sendAction:@selector(copy:) to:nil from:nil]; -} - -// Call cut selector to cut text -static void cut(void) { - [NSApp sendAction:@selector(cut:) to:nil from:nil]; -} - -// Call selectAll selector to select all text -static void selectAll(void) { - [NSApp sendAction:@selector(selectAll:) to:nil from:nil]; -} - -// Call delete selector to delete text -static void delete(void) { - [NSApp sendAction:@selector(delete:) to:nil from:nil]; -} - -// Call undo selector to undo text -static void undo(void) { - [NSApp sendAction:@selector(undo:) to:nil from:nil]; -} - -// Call redo selector to redo text -static void redo(void) { - [NSApp sendAction:@selector(redo:) to:nil from:nil]; -} - -// Call startSpeaking selector to start speaking text -static void startSpeaking(void) { - [NSApp sendAction:@selector(startSpeaking:) to:nil from:nil]; -} - -// Call stopSpeaking selector to stop speaking text -static void stopSpeaking(void) { - [NSApp sendAction:@selector(stopSpeaking:) to:nil from:nil]; -} - -static void pasteAndMatchStyle(void) { - [NSApp sendAction:@selector(pasteAndMatchStyle:) to:nil from:nil]; -} - -static void hideApplication(void) { - [[NSApplication sharedApplication] hide:nil]; -} - -// hideOthers hides all other applications -static void hideOthers(void) { - [[NSApplication sharedApplication] hideOtherApplications:nil]; -} - -// showAll shows all hidden applications -static void showAll(void) { - [[NSApplication sharedApplication] unhideAllApplications:nil]; -} - -*/ -import "C" -import ( - "runtime" - "unsafe" -) - -type macosMenuItem struct { - menuItem *MenuItem - - nsMenuItem unsafe.Pointer -} - -func (m macosMenuItem) setTooltip(tooltip string) { - C.setMenuItemTooltip(m.nsMenuItem, C.CString(tooltip)) -} - -func (m macosMenuItem) setLabel(s string) { - C.setMenuItemLabel(m.nsMenuItem, C.CString(s)) -} - -func (m macosMenuItem) setDisabled(disabled bool) { - C.setMenuItemDisabled(m.nsMenuItem, C.bool(disabled)) -} - -func (m macosMenuItem) setChecked(checked bool) { - C.setMenuItemChecked(m.nsMenuItem, C.bool(checked)) -} - -func (m macosMenuItem) setAccelerator(accelerator *accelerator) { - // Set the keyboard shortcut of the menu item - var modifier C.int - var key *C.char - if accelerator != nil { - modifier = C.int(toMacModifier(accelerator.Modifiers)) - key = C.CString(accelerator.Key) - } - - // Convert the key to a string - C.setMenuItemKeyEquivalent(m.nsMenuItem, key, modifier) -} - -func newMenuItemImpl(item *MenuItem) *macosMenuItem { - result := &macosMenuItem{ - menuItem: item, - } - - switch item.itemType { - case text, checkbox, submenu, radio: - result.nsMenuItem = unsafe.Pointer(C.newMenuItem(C.uint(item.id), C.CString(item.label), C.bool(item.disabled), C.CString(item.tooltip))) - if item.itemType == checkbox || item.itemType == radio { - C.setMenuItemChecked(result.nsMenuItem, C.bool(item.checked)) - } - if item.accelerator != nil { - result.setAccelerator(item.accelerator) - } - default: - panic("WTF") - } - return result -} - -func newSpeechMenu() *MenuItem { - speechMenu := NewMenu() - speechMenu.Add("Start Speaking"). - SetAccelerator("CmdOrCtrl+OptionOrAlt+Shift+."). - OnClick(func(ctx *Context) { - C.startSpeaking() - }) - speechMenu.Add("Stop Speaking"). - SetAccelerator("CmdOrCtrl+OptionOrAlt+Shift+,"). - OnClick(func(ctx *Context) { - C.stopSpeaking() - }) - subMenu := newSubMenuItem("Speech") - subMenu.submenu = speechMenu - return subMenu -} - -func newHideMenuItem() *MenuItem { - return newMenuItem("Hide " + globalApplication.options.Name). - SetAccelerator("CmdOrCtrl+h"). - OnClick(func(ctx *Context) { - C.hideApplication() - }) -} - -func newHideOthersMenuItem() *MenuItem { - return newMenuItem("Hide Others"). - SetAccelerator("CmdOrCtrl+OptionOrAlt+h"). - OnClick(func(ctx *Context) { - C.hideOthers() - }) -} - -func newUnhideMenuItem() *MenuItem { - return newMenuItem("Show All"). - OnClick(func(ctx *Context) { - C.showAll() - }) -} - -func newUndoMenuItem() *MenuItem { - return newMenuItem("Undo"). - SetAccelerator("CmdOrCtrl+z"). - OnClick(func(ctx *Context) { - C.undo() - }) -} - -// newRedoMenuItem creates a new menu item for redoing the last action -func newRedoMenuItem() *MenuItem { - return newMenuItem("Redo"). - SetAccelerator("CmdOrCtrl+Shift+z"). - OnClick(func(ctx *Context) { - C.redo() - }) -} - -func newCutMenuItem() *MenuItem { - return newMenuItem("Cut"). - SetAccelerator("CmdOrCtrl+x"). - OnClick(func(ctx *Context) { - C.cut() - }) -} - -func newCopyMenuItem() *MenuItem { - return newMenuItem("Copy"). - SetAccelerator("CmdOrCtrl+c"). - OnClick(func(ctx *Context) { - C.copy() - }) -} - -func newPasteMenuItem() *MenuItem { - return newMenuItem("Paste"). - SetAccelerator("CmdOrCtrl+v"). - OnClick(func(ctx *Context) { - C.paste() - }) -} - -func newPasteAndMatchStyleMenuItem() *MenuItem { - return newMenuItem("Paste and Match Style"). - SetAccelerator("CmdOrCtrl+OptionOrAlt+Shift+v"). - OnClick(func(ctx *Context) { - C.pasteAndMatchStyle() - }) -} - -func newDeleteMenuItem() *MenuItem { - return newMenuItem("Delete"). - SetAccelerator("backspace"). - OnClick(func(ctx *Context) { - C.delete() - }) -} - -func newQuitMenuItem() *MenuItem { - return newMenuItem("Quit " + globalApplication.options.Name). - SetAccelerator("CmdOrCtrl+q"). - OnClick(func(ctx *Context) { - globalApplication.Quit() - }) -} - -func newSelectAllMenuItem() *MenuItem { - return newMenuItem("Select All"). - SetAccelerator("CmdOrCtrl+a"). - OnClick(func(ctx *Context) { - C.selectAll() - }) -} - -func newAboutMenuItem() *MenuItem { - return newMenuItem("About " + globalApplication.options.Name). - OnClick(func(ctx *Context) { - globalApplication.ShowAboutDialog() - }) -} - -func newCloseMenuItem() *MenuItem { - return newMenuItem("Close"). - SetAccelerator("CmdOrCtrl+w"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.Close() - } - }) -} - -func newReloadMenuItem() *MenuItem { - return newMenuItem("Reload"). - SetAccelerator("CmdOrCtrl+r"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.Reload() - } - }) -} - -func newForceReloadMenuItem() *MenuItem { - return newMenuItem("Force Reload"). - SetAccelerator("CmdOrCtrl+Shift+r"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ForceReload() - } - }) -} - -func newToggleFullscreenMenuItem() *MenuItem { - result := newMenuItem("Toggle Full Screen"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ToggleFullscreen() - } - }) - if runtime.GOOS == "darwin" { - result.SetAccelerator("Ctrl+Command+F") - } else { - result.SetAccelerator("F11") - } - return result -} - -func newToggleDevToolsMenuItem() *MenuItem { - return newMenuItem("Toggle Developer Tools"). - SetAccelerator("Alt+Command+I"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ToggleDevTools() - } - }) -} - -func newZoomResetMenuItem() *MenuItem { - // reset zoom menu item - return newMenuItem("Actual Size"). - SetAccelerator("CmdOrCtrl+0"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ZoomReset() - } - }) -} - -func newZoomInMenuItem() *MenuItem { - return newMenuItem("Zoom In"). - SetAccelerator("CmdOrCtrl+plus"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ZoomIn() - } - }) -} - -func newZoomOutMenuItem() *MenuItem { - return newMenuItem("Zoom Out"). - SetAccelerator("CmdOrCtrl+-"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.ZoomOut() - } - }) -} - -func newMinimizeMenuItem() *MenuItem { - return newMenuItem("Minimize"). - SetAccelerator("CmdOrCtrl+M"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.Minimize() - } - }) -} - -func newZoomMenuItem() *MenuItem { - return newMenuItem("Zoom"). - OnClick(func(ctx *Context) { - currentWindow := globalApplication.CurrentWindow() - if currentWindow != nil { - currentWindow.Zoom() - } - }) -} diff --git a/v3/pkg/application/messageprocessor.go b/v3/pkg/application/messageprocessor.go deleted file mode 100644 index 21fd80f5c..000000000 --- a/v3/pkg/application/messageprocessor.go +++ /dev/null @@ -1,141 +0,0 @@ -package application - -import ( - "fmt" - "net/http" - "strconv" - "strings" - - jsoniter "github.com/json-iterator/go" -) - -// TODO maybe we could use a new struct that has the targetWindow as an attribute so we could get rid of passing the targetWindow -// as parameter through every function call. - -type MessageProcessor struct { - pluginManager *PluginManager -} - -func NewMessageProcessor() *MessageProcessor { - return &MessageProcessor{} -} - -func (m *MessageProcessor) httpError(rw http.ResponseWriter, message string, args ...any) { - m.Error(message, args...) - rw.WriteHeader(http.StatusBadRequest) - rw.Write([]byte(fmt.Sprintf(message, args...))) -} - -func (m *MessageProcessor) getTargetWindow(r *http.Request) *WebviewWindow { - windowName := r.Header.Get(webViewRequestHeaderWindowName) - if windowName != "" { - return globalApplication.GetWindowByName(windowName) - } - windowID := r.Header.Get(webViewRequestHeaderWindowId) - if windowID == "" { - return nil - } - wID, err := strconv.ParseUint(windowID, 10, 64) - if err != nil { - m.Error("Window ID '%s' not parsable: %s", windowID, err) - return nil - } - targetWindow := globalApplication.getWindowForID(uint(wID)) - if targetWindow == nil { - m.Error("Window ID %d not found", wID) - return nil - } - return targetWindow -} - -func (m *MessageProcessor) HandleRuntimeCall(rw http.ResponseWriter, r *http.Request) { - // Read "method" from query string - method := r.URL.Query().Get("method") - if method == "" { - m.httpError(rw, "No method specified") - return - } - splitMethod := strings.Split(method, ".") - if len(splitMethod) != 2 { - m.httpError(rw, "Invalid method format") - return - } - // Get the object - object := splitMethod[0] - // Get the method - method = splitMethod[1] - - params := QueryParams(r.URL.Query()) - - targetWindow := m.getTargetWindow(r) - if targetWindow == nil { - m.Error("No valid window found") - return - } - - switch object { - case "window": - m.processWindowMethod(method, rw, r, targetWindow, params) - case "clipboard": - m.processClipboardMethod(method, rw, r, targetWindow, params) - case "dialog": - m.processDialogMethod(method, rw, r, targetWindow, params) - case "events": - m.processEventsMethod(method, rw, r, targetWindow, params) - case "application": - m.processApplicationMethod(method, rw, r, targetWindow, params) - case "log": - m.processLogMethod(method, rw, r, targetWindow, params) - case "contextmenu": - m.processContextMenuMethod(method, rw, r, targetWindow, params) - case "screens": - m.processScreensMethod(method, rw, r, targetWindow, params) - case "call": - m.processCallMethod(method, rw, r, targetWindow, params) - default: - m.httpError(rw, "Unknown runtime call: %s", object) - } - -} - -func (m *MessageProcessor) Error(message string, args ...any) { - fmt.Printf("[MessageProcessor] Error: "+message, args...) -} - -func (m *MessageProcessor) Info(message string, args ...any) { - fmt.Printf("[MessageProcessor] Info: "+message, args...) -} - -func (m *MessageProcessor) json(rw http.ResponseWriter, data any) { - rw.Header().Set("Content-Type", "application/json") - // convert data to json - var jsonPayload = []byte("{}") - var err error - if data != nil { - jsonPayload, err = jsoniter.Marshal(data) - if err != nil { - m.Error("Unable to convert data to JSON. Please report this to the Wails team! Error: %s", err) - return - } - } - _, err = rw.Write(jsonPayload) - if err != nil { - m.Error("Unable to write json payload. Please report this to the Wails team! Error: %s", err) - return - } - m.ok(rw) -} - -func (m *MessageProcessor) text(rw http.ResponseWriter, data string) { - _, err := rw.Write([]byte(data)) - if err != nil { - m.Error("Unable to write json payload. Please report this to the Wails team! Error: %s", err) - return - } - rw.Header().Set("Content-Type", "text/plain") - rw.WriteHeader(http.StatusOK) -} - -func (m *MessageProcessor) ok(rw http.ResponseWriter) { - rw.WriteHeader(http.StatusOK) -} diff --git a/v3/pkg/application/messageprocessor_application.go b/v3/pkg/application/messageprocessor_application.go deleted file mode 100644 index 4eaf9e9b1..000000000 --- a/v3/pkg/application/messageprocessor_application.go +++ /dev/null @@ -1,23 +0,0 @@ -package application - -import ( - "net/http" -) - -func (m *MessageProcessor) processApplicationMethod(method string, rw http.ResponseWriter, r *http.Request, window *WebviewWindow, params QueryParams) { - - switch method { - case "Quit": - globalApplication.Quit() - m.ok(rw) - case "Hide": - globalApplication.Hide() - m.ok(rw) - case "Show": - globalApplication.Show() - m.ok(rw) - default: - m.httpError(rw, "Unknown event method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_call.go b/v3/pkg/application/messageprocessor_call.go deleted file mode 100644 index ddbddd37f..000000000 --- a/v3/pkg/application/messageprocessor_call.go +++ /dev/null @@ -1,65 +0,0 @@ -package application - -import ( - "encoding/json" - "fmt" - "net/http" - "strconv" -) - -func (m *MessageProcessor) callErrorCallback(window *WebviewWindow, message string, callID *string, err error) { - errorMsg := fmt.Sprintf(message, err) - m.Error(errorMsg) - msg := "_wails.callErrorCallback('" + *callID + "', " + strconv.Quote(errorMsg) + ");" - window.ExecJS(msg) -} - -func (m *MessageProcessor) callCallback(window *WebviewWindow, callID *string, result string, isJSON bool) { - msg := fmt.Sprintf("_wails.callCallback('%s', %s, %v);", *callID, strconv.Quote(result), isJSON) - window.ExecJS(msg) -} - -func (m *MessageProcessor) processCallMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) { - args, err := params.Args() - if err != nil { - m.httpError(rw, "Unable to parse arguments: %s", err) - return - } - callID := args.String("call-id") - if callID == nil { - m.Error("call-id is required") - return - } - switch method { - case "Call": - var options CallOptions - err := params.ToStruct(&options) - if err != nil { - m.callErrorCallback(window, "Error parsing call options: %s", callID, err) - return - } - bindings := globalApplication.bindings.Get(&options) - if bindings == nil { - m.callErrorCallback(window, "Error getting binding for method: %s", callID, fmt.Errorf("'%s' not found", options.MethodName)) - return - } - go func() { - result, err := bindings.Call(options.Args) - if err != nil { - m.callErrorCallback(window, "Error calling method: %s", callID, err) - return - } - // convert result to json - jsonResult, err := json.Marshal(result) - if err != nil { - m.callErrorCallback(window, "Error converting result to json: %s", callID, err) - return - } - m.callCallback(window, callID, string(jsonResult), true) - }() - m.ok(rw) - default: - m.httpError(rw, "Unknown dialog method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_clipboard.go b/v3/pkg/application/messageprocessor_clipboard.go deleted file mode 100644 index 0600b9c3d..000000000 --- a/v3/pkg/application/messageprocessor_clipboard.go +++ /dev/null @@ -1,25 +0,0 @@ -package application - -import ( - "net/http" -) - -func (m *MessageProcessor) processClipboardMethod(method string, rw http.ResponseWriter, _ *http.Request, _ *WebviewWindow, params QueryParams) { - - switch method { - case "SetText": - title := params.String("text") - if title == nil { - m.Error("SetText: text is required") - return - } - globalApplication.Clipboard().SetText(*title) - m.ok(rw) - case "Text": - text := globalApplication.Clipboard().Text() - m.text(rw, text) - default: - m.httpError(rw, "Unknown clipboard method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_contextmenu.go b/v3/pkg/application/messageprocessor_contextmenu.go deleted file mode 100644 index d0fe57c98..000000000 --- a/v3/pkg/application/messageprocessor_contextmenu.go +++ /dev/null @@ -1,30 +0,0 @@ -package application - -import ( - "net/http" -) - -type ContextMenuData struct { - Id string `json:"id"` - X int `json:"x"` - Y int `json:"y"` - Data any `json:"data"` -} - -func (m *MessageProcessor) processContextMenuMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) { - - switch method { - case "OpenContextMenu": - var data ContextMenuData - err := params.ToStruct(&data) - if err != nil { - m.httpError(rw, "error parsing contextmenu message: %s", err.Error()) - return - } - window.openContextMenu(&data) - m.ok(rw) - default: - m.httpError(rw, "Unknown clipboard method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_dialog.go b/v3/pkg/application/messageprocessor_dialog.go deleted file mode 100644 index 84f519a43..000000000 --- a/v3/pkg/application/messageprocessor_dialog.go +++ /dev/null @@ -1,128 +0,0 @@ -package application - -import ( - "encoding/json" - "fmt" - "net/http" - "runtime" - "strconv" -) - -func (m *MessageProcessor) dialogErrorCallback(window *WebviewWindow, message string, dialogID *string, err error) { - errorMsg := fmt.Sprintf(message, err) - m.Error(errorMsg) - msg := "_wails.dialogErrorCallback('" + *dialogID + "', " + strconv.Quote(errorMsg) + ");" - window.ExecJS(msg) -} - -func (m *MessageProcessor) dialogCallback(window *WebviewWindow, dialogID *string, result string, isJSON bool) { - msg := fmt.Sprintf("_wails.dialogCallback('%s', %s, %v);", *dialogID, strconv.Quote(result), isJSON) - window.ExecJS(msg) -} - -func (m *MessageProcessor) processDialogMethod(method string, rw http.ResponseWriter, r *http.Request, window *WebviewWindow, params QueryParams) { - - args, err := params.Args() - if err != nil { - m.httpError(rw, "Unable to parse arguments: %s", err) - return - } - dialogID := args.String("dialog-id") - if dialogID == nil { - m.Error("dialog-id is required") - return - } - switch method { - case "Info", "Warning", "Error", "Question": - var options MessageDialogOptions - err := params.ToStruct(&options) - if err != nil { - m.dialogErrorCallback(window, "Error parsing dialog options: %s", dialogID, err) - return - } - if len(options.Buttons) == 0 { - switch runtime.GOOS { - case "darwin": - options.Buttons = []*Button{{Label: "OK", IsDefault: true}} - } - } - var dialog *MessageDialog - switch method { - case "Info": - dialog = globalApplication.InfoDialog() - case "Warning": - dialog = globalApplication.WarningDialog() - case "Error": - dialog = globalApplication.ErrorDialog() - case "Question": - dialog = globalApplication.QuestionDialog() - } - // TODO: Add support for attaching Message dialogs to windows - dialog.SetTitle(options.Title) - dialog.SetMessage(options.Message) - for _, button := range options.Buttons { - label := button.Label - button.OnClick(func() { - m.dialogCallback(window, dialogID, label, false) - }) - } - dialog.AddButtons(options.Buttons) - dialog.Show() - m.ok(rw) - case "OpenFile": - var options OpenFileDialogOptions - err := params.ToStruct(&options) - if err != nil { - m.httpError(rw, "Error parsing dialog options: %s", err.Error()) - return - } - dialog := globalApplication.OpenFileDialogWithOptions(&options) - - go func() { - if options.AllowsMultipleSelection { - files, err := dialog.PromptForMultipleSelection() - if err != nil { - m.dialogErrorCallback(window, "Error getting selection: %s", dialogID, err) - return - } else { - result, err := json.Marshal(files) - if err != nil { - m.dialogErrorCallback(window, "Error marshalling files: %s", dialogID, err) - return - } - m.dialogCallback(window, dialogID, string(result), true) - } - } else { - file, err := dialog.PromptForSingleSelection() - if err != nil { - m.dialogErrorCallback(window, "Error getting selection: %s", dialogID, err) - return - } - m.dialogCallback(window, dialogID, file, false) - } - }() - m.ok(rw) - case "SaveFile": - var options SaveFileDialogOptions - err := params.ToStruct(&options) - if err != nil { - m.httpError(rw, "Error parsing dialog options: %s", err.Error()) - return - } - dialog := globalApplication.SaveFileDialogWithOptions(&options) - - go func() { - file, err := dialog.PromptForSingleSelection() - if err != nil { - m.dialogErrorCallback(window, "Error getting selection: %s", dialogID, err) - return - } - m.dialogCallback(window, dialogID, file, false) - }() - m.ok(rw) - - default: - m.httpError(rw, "Unknown dialog method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_events.go b/v3/pkg/application/messageprocessor_events.go deleted file mode 100644 index 439452a36..000000000 --- a/v3/pkg/application/messageprocessor_events.go +++ /dev/null @@ -1,28 +0,0 @@ -package application - -import ( - "net/http" -) - -func (m *MessageProcessor) processEventsMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) { - - switch method { - case "Emit": - var event WailsEvent - err := params.ToStruct(&event) - if err != nil { - m.httpError(rw, "Error parsing event: %s", err) - return - } - if event.Name == "" { - m.httpError(rw, "Event name must be specified") - return - } - event.Sender = window.Name() - globalApplication.Events.Emit(&event) - m.ok(rw) - default: - m.httpError(rw, "Unknown event method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_log.go b/v3/pkg/application/messageprocessor_log.go deleted file mode 100644 index 3352a980f..000000000 --- a/v3/pkg/application/messageprocessor_log.go +++ /dev/null @@ -1,25 +0,0 @@ -package application - -import ( - "net/http" - - "github.com/wailsapp/wails/v3/pkg/logger" -) - -func (m *MessageProcessor) processLogMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) { - switch method { - case "Log": - var msg logger.Message - err := params.ToStruct(&msg) - if err != nil { - m.httpError(rw, "error parsing log message: %s", err.Error()) - return - } - msg.Sender = window.Name() - globalApplication.Log(&msg) - m.ok(rw) - default: - m.httpError(rw, "Unknown log method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_params.go b/v3/pkg/application/messageprocessor_params.go deleted file mode 100644 index 39d741ce2..000000000 --- a/v3/pkg/application/messageprocessor_params.go +++ /dev/null @@ -1,190 +0,0 @@ -package application - -import ( - "encoding/json" - "fmt" - "strconv" -) - -type QueryParams map[string][]string - -func (qp QueryParams) String(key string) *string { - if qp == nil { - return nil - } - values := qp[key] - if len(values) == 0 { - return nil - } - return &values[0] -} - -func (qp QueryParams) Int(key string) *int { - val := qp.String(key) - if val == nil { - return nil - } - result, err := strconv.Atoi(*val) - if err != nil { - return nil - } - return &result -} - -func (qp QueryParams) UInt8(key string) *uint8 { - val := qp.String(key) - if val == nil { - return nil - } - intResult, err := strconv.Atoi(*val) - if err != nil { - return nil - } - - if intResult < 0 { - intResult = 0 - } - if intResult > 255 { - intResult = 255 - } - - var result = uint8(intResult) - - return &result -} -func (qp QueryParams) UInt(key string) *uint { - val := qp.String(key) - if val == nil { - return nil - } - intResult, err := strconv.Atoi(*val) - if err != nil { - return nil - } - - if intResult < 0 { - intResult = 0 - } - if intResult > 255 { - intResult = 255 - } - - var result = uint(intResult) - - return &result -} - -func (qp QueryParams) Bool(key string) *bool { - val := qp.String(key) - if val == nil { - return nil - } - result, err := strconv.ParseBool(*val) - if err != nil { - return nil - } - return &result -} - -func (qp QueryParams) Float64(key string) *float64 { - val := qp.String(key) - if val == nil { - return nil - } - result, err := strconv.ParseFloat(*val, 64) - if err != nil { - return nil - } - return &result -} - -func (qp QueryParams) ToStruct(str any) error { - args := qp["args"] - if len(args) == 1 { - return json.Unmarshal([]byte(args[0]), &str) - } - return nil -} - -type Args struct { - data map[string]any -} - -func (a *Args) String(key string) *string { - if a == nil { - return nil - } - if val := a.data[key]; val != nil { - result := fmt.Sprintf("%v", val) - return &result - } - return nil -} - -func (a *Args) Int(s string) *int { - if a == nil { - return nil - } - if val := a.data[s]; val != nil { - result := val.(int) - return &result - } - return nil -} - -func (a *Args) UInt8(s string) *uint8 { - if a == nil { - return nil - } - if val := a.data[s]; val != nil { - result := val.(uint8) - return &result - } - return nil -} -func (a *Args) UInt(s string) *uint { - if a == nil { - return nil - } - if val := a.data[s]; val != nil { - result := val.(uint) - return &result - } - return nil -} - -func (a *Args) Float64(s string) *float64 { - if a == nil { - return nil - } - if val := a.data[s]; val != nil { - result := val.(float64) - return &result - } - return nil -} - -func (a *Args) Bool(s string) *bool { - if a == nil { - return nil - } - if val := a.data[s]; val != nil { - result := val.(bool) - return &result - } - return nil -} - -func (qp QueryParams) Args() (*Args, error) { - argData := qp["args"] - var result = &Args{ - data: make(map[string]any), - } - if len(argData) == 1 { - err := json.Unmarshal([]byte(argData[0]), &result.data) - if err != nil { - return nil, err - } - } - return result, nil -} diff --git a/v3/pkg/application/messageprocessor_screens.go b/v3/pkg/application/messageprocessor_screens.go deleted file mode 100644 index 22a32a175..000000000 --- a/v3/pkg/application/messageprocessor_screens.go +++ /dev/null @@ -1,35 +0,0 @@ -package application - -import ( - "net/http" -) - -func (m *MessageProcessor) processScreensMethod(method string, rw http.ResponseWriter, _ *http.Request, _ *WebviewWindow, _ QueryParams) { - - switch method { - case "GetAll": - screens, err := globalApplication.GetScreens() - if err != nil { - m.Error("GetAll: %s", err.Error()) - return - } - m.json(rw, screens) - case "GetPrimary": - screen, err := globalApplication.GetPrimaryScreen() - if err != nil { - m.Error("GetPrimary: %s", err.Error()) - return - } - m.json(rw, screen) - case "GetCurrent": - screen, err := globalApplication.CurrentWindow().GetScreen() - if err != nil { - m.Error("GetCurrent: %s", err.Error()) - return - } - m.json(rw, screen) - default: - m.httpError(rw, "Unknown clipboard method: %s", method) - } - -} diff --git a/v3/pkg/application/messageprocessor_window.go b/v3/pkg/application/messageprocessor_window.go deleted file mode 100644 index cf36b9c31..000000000 --- a/v3/pkg/application/messageprocessor_window.go +++ /dev/null @@ -1,189 +0,0 @@ -package application - -import ( - "net/http" -) - -func (m *MessageProcessor) processWindowMethod(method string, rw http.ResponseWriter, _ *http.Request, window *WebviewWindow, params QueryParams) { - - args, err := params.Args() - if err != nil { - m.httpError(rw, "Unable to parse arguments: %s", err) - return - } - - switch method { - case "SetTitle": - title := args.String("title") - if title == nil { - m.Error("SetTitle: title is required") - return - } - window.SetTitle(*title) - m.ok(rw) - case "SetSize": - width := args.Int("width") - height := args.Int("height") - if width == nil || height == nil { - m.Error("Invalid SetSize Message") - return - } - window.SetSize(*width, *height) - m.ok(rw) - case "SetPosition": - x := args.Int("x") - y := args.Int("y") - if x == nil || y == nil { - m.Error("Invalid SetPosition Message") - return - } - window.SetPosition(*x, *y) - m.ok(rw) - case "Fullscreen": - window.Fullscreen() - m.ok(rw) - case "UnFullscreen": - window.UnFullscreen() - m.ok(rw) - case "Minimise": - window.Minimize() - m.ok(rw) - case "UnMinimise": - window.UnMinimise() - m.ok(rw) - case "Maximise": - window.Maximise() - m.ok(rw) - case "UnMaximise": - window.UnMaximise() - m.ok(rw) - case "Show": - window.Show() - m.ok(rw) - case "Hide": - window.Hide() - m.ok(rw) - case "Close": - window.Close() - m.ok(rw) - case "Center": - window.Center() - m.ok(rw) - case "Size": - width, height := window.Size() - m.json(rw, map[string]interface{}{ - "width": width, - "height": height, - }) - case "Position": - x, y := window.Position() - m.json(rw, map[string]interface{}{ - "x": x, - "y": y, - }) - case "SetBackgroundColour": - r := args.UInt8("r") - if r == nil { - m.Error("Invalid SetBackgroundColour Message: 'r' value required") - return - } - g := args.UInt8("g") - if g == nil { - m.Error("Invalid SetBackgroundColour Message: 'g' value required") - return - } - b := args.UInt8("b") - if b == nil { - m.Error("Invalid SetBackgroundColour Message: 'b' value required") - return - } - a := args.UInt8("a") - if a == nil { - m.Error("Invalid SetBackgroundColour Message: 'a' value required") - return - } - window.SetBackgroundColour(&RGBA{ - Red: *r, - Green: *g, - Blue: *b, - Alpha: *a, - }) - m.ok(rw) - case "SetAlwaysOnTop": - alwaysOnTop := args.Bool("alwaysOnTop") - if alwaysOnTop == nil { - m.Error("Invalid SetAlwaysOnTop Message: 'alwaysOnTop' value required") - return - } - window.SetAlwaysOnTop(*alwaysOnTop) - m.ok(rw) - case "SetResizable": - resizable := args.Bool("resizable") - if resizable == nil { - m.Error("Invalid SetResizable Message: 'resizable' value required") - return - } - window.SetResizable(*resizable) - m.ok(rw) - case "SetMinSize": - width := args.Int("width") - height := args.Int("height") - if width == nil || height == nil { - m.Error("Invalid SetMinSize Message") - return - } - window.SetMinSize(*width, *height) - m.ok(rw) - case "SetMaxSize": - width := args.Int("width") - height := args.Int("height") - if width == nil || height == nil { - m.Error("Invalid SetMaxSize Message") - return - } - window.SetMaxSize(*width, *height) - m.ok(rw) - case "Width": - width := window.Width() - m.json(rw, map[string]interface{}{ - "width": width, - }) - case "Height": - height := window.Height() - m.json(rw, map[string]interface{}{ - "height": height, - }) - case "ZoomIn": - window.ZoomIn() - m.ok(rw) - case "ZoomOut": - window.ZoomOut() - m.ok(rw) - case "ZoomReset": - window.ZoomReset() - m.ok(rw) - case "GetZoom": - zoomLevel := window.GetZoom() - m.json(rw, map[string]interface{}{ - "zoomLevel": zoomLevel, - }) - case "Screen": - screen, err := window.GetScreen() - if err != nil { - m.httpError(rw, err.Error()) - return - } - m.json(rw, screen) - case "SetZoom": - zoomLevel := args.Float64("zoomLevel") - if zoomLevel == nil { - m.Error("Invalid SetZoom Message: invalid 'zoomLevel' value") - return - } - window.SetZoom(*zoomLevel) - m.ok(rw) - default: - m.httpError(rw, "Unknown window method: %s", method) - } - -} diff --git a/v3/pkg/application/options_application.go b/v3/pkg/application/options_application.go deleted file mode 100644 index 0a768a0b7..000000000 --- a/v3/pkg/application/options_application.go +++ /dev/null @@ -1,66 +0,0 @@ -package application - -import ( - "io/fs" - "net/http" - - "github.com/wailsapp/wails/v3/pkg/logger" -) - -type Options struct { - Name string - Description string - Icon []byte - Mac MacOptions - Bind []any - Logger struct { - Silent bool - CustomLoggers []logger.Output - } - Assets AssetOptions - Plugins map[string]Plugin -} - -// AssetOptions defines the configuration of the AssetServer. -type AssetOptions struct { - // FS defines the static assets to be used. A GET request is first tried to be served from this FS. If the FS returns - // `os.ErrNotExist` for that file, the request handling will fallback to the Handler and tries to serve the GET - // request from it. - // - // If set to nil, all GET requests will be forwarded to Handler. - FS fs.FS - - // Handler will be called for every GET request that can't be served from FS, 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` - Handler http.Handler - - // 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. - // - // Multiple Middlewares can be chained together with: - // ChainMiddleware(middleware ...Middleware) Middleware - Middleware Middleware -} - -// Middleware defines a HTTP middleware that can be applied to the AssetServer. -// The handler passed as next is the next handler in the chain. One can decide to call the next handler -// or implement a specialized handling. -type Middleware func(next http.Handler) http.Handler - -// ChainMiddleware allows chaining multiple middlewares to one middleware. -func ChainMiddleware(middleware ...Middleware) Middleware { - return func(h http.Handler) http.Handler { - for i := len(middleware) - 1; i >= 0; i-- { - h = middleware[i](h) - } - return h - } -} diff --git a/v3/pkg/application/options_mac.go b/v3/pkg/application/options_mac.go deleted file mode 100644 index 7ad1c5f0f..000000000 --- a/v3/pkg/application/options_mac.go +++ /dev/null @@ -1,130 +0,0 @@ -package application - -type ActivationPolicy int - -const ( - ActivationPolicyRegular ActivationPolicy = iota - // ActivationPolicyAccessory is used for applications that do not have a main window, - // such as system tray applications or background applications. - ActivationPolicyAccessory - ActivationPolicyProhibited -) - -type MacOptions struct { - // ActivationPolicy is the activation policy for the application. Defaults to - // applicationActivationPolicyRegular. - ActivationPolicy ActivationPolicy - // If set to true, the application will terminate when the last window is closed. - ApplicationShouldTerminateAfterLastWindowClosed bool -} - -type MacBackdrop int - -const ( - MacBackdropNormal MacBackdrop = iota - MacBackdropTransparent - MacBackdropTranslucent -) - -type MacToolbarStyle int - -const ( - // MacToolbarStyleAutomatic - The default value. The style will be determined by the window's given configuration - MacToolbarStyleAutomatic MacToolbarStyle = iota - // MacToolbarStyleExpanded - The toolbar will appear below the window title - MacToolbarStyleExpanded - // MacToolbarStylePreference - The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible - MacToolbarStylePreference - // MacToolbarStyleUnified - The window title will appear inline with the toolbar when visible - MacToolbarStyleUnified - // MacToolbarStyleUnifiedCompact - Same as MacToolbarStyleUnified, but with reduced margins in the toolbar allowing more focus to be on the contents of the window - MacToolbarStyleUnifiedCompact -) - -// MacWindow contains macOS specific options -type MacWindow struct { - Backdrop MacBackdrop - TitleBar MacTitleBar - Appearance MacAppearanceType - InvisibleTitleBarHeight int -} - -// MacTitleBar contains options for the Mac titlebar -type MacTitleBar struct { - AppearsTransparent bool - Hide bool - HideTitle bool - FullSizeContent bool - UseToolbar bool - HideToolbarSeparator bool - ToolbarStyle MacToolbarStyle -} - -// MacTitleBarDefault results in the default Mac MacTitleBar -var MacTitleBarDefault = MacTitleBar{ - AppearsTransparent: false, - Hide: false, - HideTitle: false, - FullSizeContent: false, - UseToolbar: false, - HideToolbarSeparator: false, -} - -// Credit: Comments from Electron site - -// MacTitleBarHidden results in a hidden title bar and a full size content window, -// yet the title bar still has the standard window controls (“traffic lights”) -// in the top left. -var MacTitleBarHidden = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: false, - HideToolbarSeparator: false, -} - -// MacTitleBarHiddenInset results in a hidden title bar with an alternative look where -// the traffic light buttons are slightly more inset from the window edge. -var MacTitleBarHiddenInset = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: true, - HideToolbarSeparator: true, -} - -// MacTitleBarHiddenInsetUnified results in a hidden title bar with an alternative look where -// the traffic light buttons are even more inset from the window edge. -var MacTitleBarHiddenInsetUnified = MacTitleBar{ - AppearsTransparent: true, - Hide: false, - HideTitle: true, - FullSizeContent: true, - UseToolbar: true, - HideToolbarSeparator: true, - ToolbarStyle: MacToolbarStyleUnified, -} - -// MacAppearanceType is a type of Appearance for Cocoa windows -type MacAppearanceType string - -const ( - // DefaultAppearance uses the default system value - DefaultAppearance MacAppearanceType = "" - // NSAppearanceNameAqua - The standard light system appearance. - NSAppearanceNameAqua MacAppearanceType = "NSAppearanceNameAqua" - // NSAppearanceNameDarkAqua - The standard dark system appearance. - NSAppearanceNameDarkAqua MacAppearanceType = "NSAppearanceNameDarkAqua" - // NSAppearanceNameVibrantLight - The light vibrant appearance - NSAppearanceNameVibrantLight MacAppearanceType = "NSAppearanceNameVibrantLight" - // NSAppearanceNameAccessibilityHighContrastAqua - A high-contrast version of the standard light system appearance. - NSAppearanceNameAccessibilityHighContrastAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastAqua" - // NSAppearanceNameAccessibilityHighContrastDarkAqua - A high-contrast version of the standard dark system appearance. - NSAppearanceNameAccessibilityHighContrastDarkAqua MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastDarkAqua" - // NSAppearanceNameAccessibilityHighContrastVibrantLight - A high-contrast version of the light vibrant appearance. - NSAppearanceNameAccessibilityHighContrastVibrantLight MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantLight" - // NSAppearanceNameAccessibilityHighContrastVibrantDark - A high-contrast version of the dark vibrant appearance. - NSAppearanceNameAccessibilityHighContrastVibrantDark MacAppearanceType = "NSAppearanceNameAccessibilityHighContrastVibrantDark" -) diff --git a/v3/pkg/application/options_webview_window.go b/v3/pkg/application/options_webview_window.go deleted file mode 100644 index 99e40d054..000000000 --- a/v3/pkg/application/options_webview_window.go +++ /dev/null @@ -1,49 +0,0 @@ -package application - -type WindowState int - -const ( - WindowStateNormal WindowState = iota - WindowStateMinimised - WindowStateMaximised - WindowStateFullscreen -) - -type WebviewWindowOptions struct { - Name string - Title string - Width, Height int - AlwaysOnTop bool - URL string - DisableResize bool - Frameless bool - MinWidth int - MinHeight int - MaxWidth int - MaxHeight int - StartState WindowState - Mac MacWindow - BackgroundColour *RGBA - HTML string - JS string - CSS string - X int - Y int - HideOnClose bool - FullscreenButtonEnabled bool - Hidden bool - EnableFraudulentWebsiteWarnings bool - Zoom float64 - EnableDragAndDrop bool -} - -var WebviewWindowDefaults = &WebviewWindowOptions{ - Title: "", - Width: 800, - Height: 600, - URL: "", -} - -type RGBA struct { - Red, Green, Blue, Alpha uint8 -} diff --git a/v3/pkg/application/plugins.go b/v3/pkg/application/plugins.go deleted file mode 100644 index 90ade7358..000000000 --- a/v3/pkg/application/plugins.go +++ /dev/null @@ -1,50 +0,0 @@ -package application - -import "github.com/wailsapp/wails/v2/pkg/assetserver" - -type Plugin interface { - Name() string - Init(app *App) error - Shutdown() - CallableByJS() []string - InjectJS() string -} - -type PluginManager struct { - plugins map[string]Plugin - assetServer *assetserver.AssetServer - initialisedPlugins []Plugin -} - -func NewPluginManager(plugins map[string]Plugin, assetServer *assetserver.AssetServer) *PluginManager { - result := &PluginManager{ - plugins: plugins, - assetServer: assetServer, - } - return result -} - -func (p *PluginManager) Init() error { - for _, plugin := range p.plugins { - err := plugin.Init(globalApplication) - if err != nil { - globalApplication.error("Plugin '%s' failed to initialise: %s", plugin.Name(), err.Error()) - p.Shutdown() - return err - } - p.initialisedPlugins = append(p.initialisedPlugins, plugin) - injectJS := plugin.InjectJS() - if injectJS != "" { - p.assetServer.AddPluginScript(plugin.Name(), injectJS) - } - globalApplication.info("Plugin '%s' initialised", plugin.Name()) - } - return nil -} - -func (p *PluginManager) Shutdown() { - for _, plugin := range p.initialisedPlugins { - plugin.Shutdown() - globalApplication.info("Plugin '%s' shutdown", plugin.Name()) - } -} diff --git a/v3/pkg/application/roles.go b/v3/pkg/application/roles.go deleted file mode 100644 index 0aec3bd48..000000000 --- a/v3/pkg/application/roles.go +++ /dev/null @@ -1,148 +0,0 @@ -package application - -import "runtime" - -// Heavily inspired by Electron (c) 2013-2020 Github Inc. -// Electron License: https://github.com/electron/electron/blob/master/LICENSE - -// Role is a type to identify menu roles -type Role uint - -// These constants need to be kept in sync with `v2/internal/frontend/desktop/darwin/Role.h` -const ( - NoRole Role = iota - AppMenu Role = iota - EditMenu Role = iota - ViewMenu Role = iota - WindowMenu Role = iota - ServicesMenu Role = iota - HelpMenu Role = iota - - Hide Role = iota - HideOthers Role = iota - UnHide Role = iota - About Role = iota - Undo Role = iota - Redo Role = iota - Cut Role = iota - Copy Role = iota - Paste Role = iota - PasteAndMatchStyle Role = iota - SelectAll Role = iota - Delete Role = iota - SpeechMenu Role = iota - Quit Role = iota - FileMenu Role = iota - Close Role = iota - Reload Role = iota - ForceReload Role = iota - ToggleDevTools Role = iota - ResetZoom Role = iota - ZoomIn Role = iota - ZoomOut Role = iota - ToggleFullscreen Role = iota - - Minimize Role = iota - Zoom Role = iota - //Front Role = iota - //WindowRole Role = iota - - //QuitRole Role = - //TogglefullscreenRole Role = "togglefullscreen" - //ViewMenuRole Role = "viewMenu" - //WindowMenuRole Role = "windowMenu" - - //FrontRole Role = "front" - //ZoomRole Role = "zoom" - //WindowSubMenuRole Role = "windowSubMenu" - //HelpSubMenuRole Role = "helpSubMenu" - //SeparatorItemRole Role = "separatorItem" -) - -func newFileMenu() *MenuItem { - fileMenu := NewMenu() - if runtime.GOOS == "darwin" { - fileMenu.AddRole(Close) - } else { - fileMenu.AddRole(Quit) - } - subMenu := newSubMenuItem("File") - subMenu.submenu = fileMenu - return subMenu -} - -func newViewMenu() *MenuItem { - viewMenu := NewMenu() - viewMenu.AddRole(Reload) - viewMenu.AddRole(ForceReload) - viewMenu.AddRole(ToggleDevTools) - viewMenu.AddSeparator() - viewMenu.AddRole(ResetZoom) - viewMenu.AddRole(ZoomIn) - viewMenu.AddRole(ZoomOut) - viewMenu.AddSeparator() - viewMenu.AddRole(ToggleFullscreen) - subMenu := newSubMenuItem("View") - subMenu.submenu = viewMenu - return subMenu -} - -func newAppMenu() *MenuItem { - appMenu := NewMenu() - appMenu.AddRole(About) - appMenu.AddSeparator() - appMenu.AddRole(ServicesMenu) - appMenu.AddSeparator() - appMenu.AddRole(Hide) - appMenu.AddRole(HideOthers) - appMenu.AddRole(UnHide) - appMenu.AddSeparator() - appMenu.AddRole(Quit) - subMenu := newSubMenuItem(globalApplication.options.Name) - subMenu.submenu = appMenu - return subMenu -} - -func newEditMenu() *MenuItem { - editMenu := NewMenu() - editMenu.AddRole(Undo) - editMenu.AddRole(Redo) - editMenu.AddSeparator() - editMenu.AddRole(Cut) - editMenu.AddRole(Copy) - editMenu.AddRole(Paste) - if runtime.GOOS == "darwin" { - editMenu.AddRole(PasteAndMatchStyle) - editMenu.AddRole(PasteAndMatchStyle) - editMenu.AddRole(Delete) - editMenu.AddRole(SelectAll) - editMenu.AddSeparator() - editMenu.AddRole(SpeechMenu) - } else { - editMenu.AddRole(Delete) - editMenu.AddSeparator() - editMenu.AddRole(SelectAll) - } - subMenu := newSubMenuItem("Edit") - subMenu.submenu = editMenu - return subMenu -} - -func newWindowMenu() *MenuItem { - menu := NewMenu() - menu.AddRole(Minimize) - menu.AddRole(Zoom) - subMenu := newSubMenuItem("Window") - subMenu.submenu = menu - return subMenu -} - -func newHelpMenu() *MenuItem { - menu := NewMenu() - menu.Add("Learn More").OnClick(func(ctx *Context) { - globalApplication.CurrentWindow().SetURL("https://wails.io") - }) - subMenu := newSubMenuItem("Help") - subMenu.submenu = menu - return subMenu -} diff --git a/v3/pkg/application/screen.go b/v3/pkg/application/screen.go deleted file mode 100644 index b3712c9df..000000000 --- a/v3/pkg/application/screen.go +++ /dev/null @@ -1,26 +0,0 @@ -package application - -type Screen struct { - ID string // A unique identifier for the display - Name string // The name of the display - Scale float32 // The scale factor of the display - X int // The x-coordinate of the top-left corner of the rectangle - Y int // The y-coordinate of the top-left corner of the rectangle - Size Size // The size of the display - Bounds Rect // The bounds of the display - WorkArea Rect // The work area of the display - IsPrimary bool // Whether this is the primary display - Rotation float32 // The rotation of the display -} - -type Rect struct { - X int - Y int - Width int - Height int -} - -type Size struct { - Width int - Height int -} diff --git a/v3/pkg/application/screen_darwin.go b/v3/pkg/application/screen_darwin.go deleted file mode 100644 index d45753f7b..000000000 --- a/v3/pkg/application/screen_darwin.go +++ /dev/null @@ -1,151 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -x objective-c -#cgo LDFLAGS: -framework Foundation -framework Cocoa -framework WebKit -framework AppKit -#import -#import -#import -#import -#include - -typedef struct Screen { - const char* id; - const char* name; - int p_width; - int p_height; - int width; - int height; - int x; - int y; - int w_width; - int w_height; - int w_x; - int w_y; - float scale; - double rotation; - bool isPrimary; -} Screen; - - -int GetNumScreens(){ - return [[NSScreen screens] count]; -} - -Screen processScreen(NSScreen* screen){ - Screen returnScreen; - returnScreen.scale = screen.backingScaleFactor; - - // screen bounds - returnScreen.height = screen.frame.size.height; - returnScreen.width = screen.frame.size.width; - returnScreen.x = screen.frame.origin.x; - returnScreen.y = screen.frame.origin.y; - - // work area - NSRect workArea = [screen visibleFrame]; - returnScreen.w_height = workArea.size.height; - returnScreen.w_width = workArea.size.width; - returnScreen.w_x = workArea.origin.x; - returnScreen.w_y = workArea.origin.y; - - - // adapted from https://stackoverflow.com/a/1237490/4188138 - NSDictionary* screenDictionary = [screen deviceDescription]; - NSNumber* screenID = [screenDictionary objectForKey:@"NSScreenNumber"]; - CGDirectDisplayID displayID = [screenID unsignedIntValue]; - returnScreen.id = [[NSString stringWithFormat:@"%d", displayID] UTF8String]; - - // Get physical monitor size - NSValue *sizeValue = [screenDictionary objectForKey:@"NSDeviceSize"]; - NSSize physicalSize = sizeValue.sizeValue; - returnScreen.p_height = physicalSize.height; - returnScreen.p_width = physicalSize.width; - - // Get the rotation - double rotation = CGDisplayRotation(displayID); - returnScreen.rotation = rotation; - - if( @available(macOS 10.15, *) ){ - returnScreen.name = [screen.localizedName UTF8String]; - } - - return returnScreen; -} - -// Get primary screen -Screen GetPrimaryScreen(){ - // Get primary screen - NSScreen *mainScreen = [NSScreen mainScreen]; - return processScreen(mainScreen); -} - -Screen* getAllScreens() { - NSArray *screens = [NSScreen screens]; - Screen* returnScreens = malloc(sizeof(Screen) * screens.count); - for (int i = 0; i < screens.count; i++) { - NSScreen* screen = [screens objectAtIndex:i]; - returnScreens[i] = processScreen(screen); - } - return returnScreens; -} - -Screen getScreenForWindow(void* window){ - NSScreen* screen = ((NSWindow*)window).screen; - return processScreen(screen); -} - -*/ -import "C" -import "unsafe" - -func cScreenToScreen(screen C.Screen) *Screen { - - return &Screen{ - Size: Size{ - Width: int(screen.p_width), - Height: int(screen.p_height), - }, - Bounds: Rect{ - X: int(screen.x), - Y: int(screen.y), - Height: int(screen.height), - Width: int(screen.width), - }, - WorkArea: Rect{ - X: int(screen.w_x), - Y: int(screen.w_y), - Height: int(screen.w_height), - Width: int(screen.w_width), - }, - Scale: float32(screen.scale), - ID: C.GoString(screen.id), - Name: C.GoString(screen.name), - IsPrimary: bool(screen.isPrimary), - Rotation: float32(screen.rotation), - } -} - -func getPrimaryScreen() (*Screen, error) { - cScreen := C.GetPrimaryScreen() - return cScreenToScreen(cScreen), nil -} - -func getScreens() ([]*Screen, error) { - cScreens := C.getAllScreens() - defer C.free(unsafe.Pointer(cScreens)) - numScreens := int(C.GetNumScreens()) - displays := make([]*Screen, numScreens) - cScreenHeaders := (*[1 << 30]C.Screen)(unsafe.Pointer(cScreens))[:numScreens:numScreens] - for i := 0; i < numScreens; i++ { - displays[i] = cScreenToScreen(cScreenHeaders[i]) - } - return displays, nil -} - -func getScreenForWindow(window *macosWebviewWindow) (*Screen, error) { - cScreen := C.getScreenForWindow(window.nsWindow) - return cScreenToScreen(cScreen), nil -} diff --git a/v3/pkg/application/systemtray.go b/v3/pkg/application/systemtray.go deleted file mode 100644 index 23ba6f286..000000000 --- a/v3/pkg/application/systemtray.go +++ /dev/null @@ -1,106 +0,0 @@ -package application - -type IconPosition int - -const ( - NSImageNone = iota - NSImageOnly - NSImageLeft - NSImageRight - NSImageBelow - NSImageAbove - NSImageOverlaps - NSImageLeading - NSImageTrailing -) - -type systemTrayImpl interface { - setLabel(label string) - run() - setIcon(icon []byte) - setMenu(menu *Menu) - setIconPosition(position int) - setTemplateIcon(icon []byte) - destroy() -} - -type SystemTray struct { - id uint - label string - icon []byte - iconPosition int - - // Platform specific implementation - impl systemTrayImpl - menu *Menu - isTemplateIcon bool -} - -func NewSystemTray(id uint) *SystemTray { - return &SystemTray{ - id: id, - label: "", - iconPosition: NSImageLeading, - } -} - -func (s *SystemTray) SetLabel(label string) { - if s.impl == nil { - s.label = label - return - } - s.impl.setLabel(label) -} - -func (s *SystemTray) Label() string { - return s.label -} - -func (s *SystemTray) Run() { - s.impl = newSystemTrayImpl(s) - s.impl.run() -} - -func (s *SystemTray) SetIcon(icon []byte) *SystemTray { - if s.impl == nil { - s.icon = icon - } else { - s.impl.setIcon(icon) - } - return s -} - -func (s *SystemTray) SetMenu(menu *Menu) *SystemTray { - if s.impl == nil { - s.menu = menu - } else { - s.impl.setMenu(menu) - } - return s -} - -func (s *SystemTray) SetIconPosition(iconPosition int) *SystemTray { - if s.impl == nil { - s.iconPosition = iconPosition - } else { - s.impl.setIconPosition(iconPosition) - } - return s -} - -func (s *SystemTray) SetTemplateIcon(icon []byte) *SystemTray { - if s.impl == nil { - s.icon = icon - s.isTemplateIcon = true - } else { - s.impl.setTemplateIcon(icon) - } - return s -} - -func (s *SystemTray) Destroy() { - if s.impl == nil { - return - } - s.impl.destroy() -} diff --git a/v3/pkg/application/systemtray_darwin.go b/v3/pkg/application/systemtray_darwin.go deleted file mode 100644 index f5a464341..000000000 --- a/v3/pkg/application/systemtray_darwin.go +++ /dev/null @@ -1,161 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -framework WebKit - -#include "Cocoa/Cocoa.h" -#include "menuitem.h" - -// Create a new system tray -void* systemTrayNew() { - NSStatusItem *statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; - return (void*)statusItem; -} - -void systemTraySetLabel(void* nsStatusItem, char *label) { - if( label == NULL ) { - return; - } - // Set the label on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSStatusItem *statusItem = (NSStatusItem *)nsStatusItem; - statusItem.button.title = [NSString stringWithUTF8String:label]; - free(label); - }); -} - -// Create an nsimage from a byte array -NSImage* imageFromBytes(const unsigned char *bytes, int length) { - NSData *data = [NSData dataWithBytes:bytes length:length]; - NSImage *image = [[NSImage alloc] initWithData:data]; - return image; -} - -// Set the icon on the system tray -void systemTraySetIcon(void* nsStatusItem, void* nsImage, int position, bool isTemplate) { - // Set the icon on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSStatusItem *statusItem = (NSStatusItem *)nsStatusItem; - NSImage *image = (NSImage *)nsImage; - - NSStatusBar *statusBar = [NSStatusBar systemStatusBar]; - CGFloat thickness = [statusBar thickness]; - [image setSize:NSMakeSize(thickness, thickness)]; - if( isTemplate ) { - [image setTemplate:YES]; - } - statusItem.button.image = [image autorelease]; - statusItem.button.imagePosition = position; - }); -} - -// Add menu to system tray -void systemTraySetMenu(void* nsStatusItem, void* nsMenu) { - // Set the menu on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSStatusItem *statusItem = (NSStatusItem *)nsStatusItem; - NSMenu *menu = (NSMenu *)nsMenu; - statusItem.menu = menu; - }); -} - -// Destroy system tray -void systemTrayDestroy(void* nsStatusItem) { - // Remove the status item from the status bar and its associated menu - dispatch_async(dispatch_get_main_queue(), ^{ - NSStatusItem *statusItem = (NSStatusItem *)nsStatusItem; - [[NSStatusBar systemStatusBar] removeStatusItem:statusItem]; - [statusItem release]; - }); -} - -*/ -import "C" -import ( - "unsafe" -) - -type macosSystemTray struct { - id uint - label string - icon []byte - menu *Menu - - nsStatusItem unsafe.Pointer - nsImage unsafe.Pointer - nsMenu unsafe.Pointer - iconPosition int - isTemplateIcon bool -} - -func (s *macosSystemTray) setIconPosition(position int) { - s.iconPosition = position -} - -func (s *macosSystemTray) setMenu(menu *Menu) { - s.menu = menu -} - -func (s *macosSystemTray) run() { - globalApplication.dispatchOnMainThread(func() { - if s.nsStatusItem != nil { - Fatal("System tray '%d' already running", s.id) - } - s.nsStatusItem = unsafe.Pointer(C.systemTrayNew()) - if s.label != "" { - C.systemTraySetLabel(s.nsStatusItem, C.CString(s.label)) - } - if s.icon != nil { - s.nsImage = unsafe.Pointer(C.imageFromBytes((*C.uchar)(&s.icon[0]), C.int(len(s.icon)))) - C.systemTraySetIcon(s.nsStatusItem, s.nsImage, C.int(s.iconPosition), C.bool(s.isTemplateIcon)) - } - if s.menu != nil { - s.menu.Update() - // Convert impl to macosMenu object - s.nsMenu = (s.menu.impl).(*macosMenu).nsMenu - C.systemTraySetMenu(s.nsStatusItem, s.nsMenu) - } - - }) -} - -func (s *macosSystemTray) setIcon(icon []byte) { - s.icon = icon - globalApplication.dispatchOnMainThread(func() { - s.nsImage = unsafe.Pointer(C.imageFromBytes((*C.uchar)(&icon[0]), C.int(len(icon)))) - C.systemTraySetIcon(s.nsStatusItem, s.nsImage, C.int(s.iconPosition), C.bool(s.isTemplateIcon)) - }) -} - -func (s *macosSystemTray) setTemplateIcon(icon []byte) { - s.icon = icon - s.isTemplateIcon = true - globalApplication.dispatchOnMainThread(func() { - s.nsImage = unsafe.Pointer(C.imageFromBytes((*C.uchar)(&icon[0]), C.int(len(icon)))) - C.systemTraySetIcon(s.nsStatusItem, s.nsImage, C.int(s.iconPosition), C.bool(s.isTemplateIcon)) - }) -} - -func newSystemTrayImpl(s *SystemTray) systemTrayImpl { - return &macosSystemTray{ - id: s.id, - label: s.label, - icon: s.icon, - menu: s.menu, - iconPosition: s.iconPosition, - isTemplateIcon: s.isTemplateIcon, - } -} - -func (s *macosSystemTray) setLabel(label string) { - s.label = label - C.systemTraySetLabel(s.nsStatusItem, C.CString(label)) -} - -func (s *macosSystemTray) destroy() { - // Remove the status item from the status bar and its associated menu - C.systemTrayDestroy(s.nsStatusItem) -} diff --git a/v3/pkg/application/webview_drag.h b/v3/pkg/application/webview_drag.h deleted file mode 100644 index aca00d970..000000000 --- a/v3/pkg/application/webview_drag.h +++ /dev/null @@ -1,7 +0,0 @@ -//go:build darwin - -#import - -@interface WebviewDrag : NSView -@property unsigned int windowId; -@end \ No newline at end of file diff --git a/v3/pkg/application/webview_drag.m b/v3/pkg/application/webview_drag.m deleted file mode 100644 index 057e68d95..000000000 --- a/v3/pkg/application/webview_drag.m +++ /dev/null @@ -1,60 +0,0 @@ -//go:build darwin - -#import -#import -#import "webview_drag.h" - -#import "../events/events.h" - -extern void processDragItems(unsigned int windowId, char** arr, int length); - -@implementation WebviewDrag - -- (instancetype)initWithFrame:(NSRect)frameRect { - self = [super initWithFrame:frameRect]; - if (self) { - [self registerForDraggedTypes:@[NSFilenamesPboardType]]; - } - - return self; -} - -- (NSDragOperation)draggingEntered:(id)sender { - NSPasteboard *pasteboard = [sender draggingPasteboard]; - if ([[pasteboard types] containsObject:NSFilenamesPboardType]) { - processWindowEvent(self.windowId, EventWindowFileDraggingEntered); - return NSDragOperationCopy; - } - return NSDragOperationNone; -} - - -- (void)draggingExited:(id)sender { - processWindowEvent(self.windowId, EventWindowFileDraggingExited); -} - -- (BOOL)prepareForDragOperation:(id)sender { - return YES; -} - -- (BOOL)performDragOperation:(id)sender { - NSPasteboard *pasteboard = [sender draggingPasteboard]; - processWindowEvent(self.windowId, EventWindowFileDraggingPerformed); - if ([[pasteboard types] containsObject:NSFilenamesPboardType]) { - NSArray *files = [pasteboard propertyListForType:NSFilenamesPboardType]; - NSUInteger count = [files count]; - char** cArray = (char**)malloc(count * sizeof(char*)); - for (NSUInteger i = 0; i < count; i++) { - NSString* str = files[i]; - cArray[i] = (char*)[str UTF8String]; - } - processDragItems(self.windowId, cArray, (int)count); - free(cArray); - return YES; - } - return NO; -} - - -@end - diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go deleted file mode 100644 index e9899fe82..000000000 --- a/v3/pkg/application/webview_window.go +++ /dev/null @@ -1,659 +0,0 @@ -package application - -import ( - "fmt" - "sync" - "time" - - "github.com/wailsapp/wails/v3/pkg/logger" - - "github.com/wailsapp/wails/v3/pkg/events" -) - -type ( - webviewWindowImpl interface { - setTitle(title string) - setSize(width, height int) - setAlwaysOnTop(alwaysOnTop bool) - setURL(url string) - setResizable(resizable bool) - setMinSize(width, height int) - setMaxSize(width, height int) - execJS(js string) - restore() - setBackgroundColour(color *RGBA) - run() - center() - size() (int, int) - width() int - height() int - position() (int, int) - destroy() - reload() - forceReload() - toggleDevTools() - zoomReset() - zoomIn() - zoomOut() - getZoom() float64 - setZoom(zoom float64) - close() - zoom() - setHTML(html string) - setPosition(x int, y int) - on(eventID uint) - minimise() - unminimise() - maximise() - unmaximise() - fullscreen() - unfullscreen() - isMinimised() bool - isMaximised() bool - isFullscreen() bool - disableSizeConstraints() - setFullscreenButtonEnabled(enabled bool) - show() - hide() - getScreen() (*Screen, error) - setFrameless(bool) - openContextMenu(menu *Menu, data *ContextMenuData) - } -) - -type WebviewWindow struct { - options *WebviewWindowOptions - impl webviewWindowImpl - implLock sync.RWMutex - id uint - - eventListeners map[uint][]func(ctx *WindowEventContext) - eventListenersLock sync.RWMutex - - contextMenus map[string]*Menu - contextMenusLock sync.RWMutex -} - -var windowID uint -var windowIDLock sync.RWMutex - -func getWindowID() uint { - windowIDLock.Lock() - defer windowIDLock.Unlock() - windowID++ - return windowID -} - -func NewWindow(options *WebviewWindowOptions) *WebviewWindow { - if options.Width == 0 { - options.Width = 800 - } - if options.Height == 0 { - options.Height = 600 - } - if options.URL == "" { - options.URL = "/" - } - - result := &WebviewWindow{ - id: getWindowID(), - options: options, - eventListeners: make(map[uint][]func(ctx *WindowEventContext)), - contextMenus: make(map[string]*Menu), - } - - return result -} - -func (w *WebviewWindow) SetTitle(title string) *WebviewWindow { - w.implLock.RLock() - defer w.implLock.RUnlock() - w.options.Title = title - if w.impl != nil { - w.impl.setTitle(title) - } - return w -} - -func (w *WebviewWindow) Name() string { - return w.options.Name -} - -func (w *WebviewWindow) SetSize(width, height int) *WebviewWindow { - // Don't set size if fullscreen - if w.IsFullscreen() { - return w - } - w.options.Width = width - w.options.Height = height - - var newMaxWidth = w.options.MaxWidth - var newMaxHeight = w.options.MaxHeight - if width > w.options.MaxWidth && w.options.MaxWidth != 0 { - newMaxWidth = width - } - if height > w.options.MaxHeight && w.options.MaxHeight != 0 { - newMaxHeight = height - } - - if newMaxWidth != 0 || newMaxHeight != 0 { - w.SetMaxSize(newMaxWidth, newMaxHeight) - } - - var newMinWidth = w.options.MinWidth - var newMinHeight = w.options.MinHeight - if width < w.options.MinWidth && w.options.MinWidth != 0 { - newMinWidth = width - } - if height < w.options.MinHeight && w.options.MinHeight != 0 { - newMinHeight = height - } - - if newMinWidth != 0 || newMinHeight != 0 { - w.SetMinSize(newMinWidth, newMinHeight) - } - - if w.impl != nil { - w.impl.setSize(width, height) - } - return w -} - -func (w *WebviewWindow) run() { - if w.impl != nil { - return - } - w.implLock.Lock() - w.impl = newWindowImpl(w) - w.implLock.Unlock() - w.impl.run() -} - -func (w *WebviewWindow) SetAlwaysOnTop(b bool) *WebviewWindow { - w.options.AlwaysOnTop = b - if w.impl == nil { - w.impl.setAlwaysOnTop(b) - } - return w -} - -func (w *WebviewWindow) Show() *WebviewWindow { - if globalApplication.impl == nil { - return w - } - if w.impl == nil { - w.run() - return w - } - w.impl.show() - return w -} -func (w *WebviewWindow) Hide() *WebviewWindow { - w.options.Hidden = true - if w.impl != nil { - w.impl.hide() - } - return w -} - -func (w *WebviewWindow) SetURL(s string) *WebviewWindow { - w.options.URL = s - if w.impl != nil { - w.impl.setURL(s) - } - return w -} - -func (w *WebviewWindow) SetZoom(magnification float64) *WebviewWindow { - w.options.Zoom = magnification - if w.impl != nil { - w.impl.setZoom(magnification) - } - return w -} - -func (w *WebviewWindow) GetZoom() float64 { - if w.impl != nil { - return w.impl.getZoom() - } - return 1 -} - -func (w *WebviewWindow) SetResizable(b bool) *WebviewWindow { - w.options.DisableResize = !b - if w.impl != nil { - w.impl.setResizable(b) - } - return w -} - -func (w *WebviewWindow) Resizable() bool { - return !w.options.DisableResize -} - -func (w *WebviewWindow) SetMinSize(minWidth, minHeight int) *WebviewWindow { - w.options.MinWidth = minWidth - w.options.MinHeight = minHeight - - currentWidth, currentHeight := w.Size() - newWidth, newHeight := currentWidth, currentHeight - - var newSize bool - if minHeight != 0 && currentHeight < minHeight { - newHeight = minHeight - w.options.Height = newHeight - newSize = true - } - if minWidth != 0 && currentWidth < minWidth { - newWidth = minWidth - w.options.Width = newWidth - newSize = true - } - if w.impl != nil { - if newSize { - w.impl.setSize(newWidth, newHeight) - } - w.impl.setMinSize(minWidth, minHeight) - } - return w -} - -func (w *WebviewWindow) SetMaxSize(maxWidth, maxHeight int) *WebviewWindow { - w.options.MaxWidth = maxWidth - w.options.MaxHeight = maxHeight - - currentWidth, currentHeight := w.Size() - newWidth, newHeight := currentWidth, currentHeight - - var newSize bool - if maxHeight != 0 && currentHeight > maxHeight { - newHeight = maxHeight - w.options.Height = maxHeight - newSize = true - } - if maxWidth != 0 && currentWidth > maxWidth { - newWidth = maxWidth - w.options.Width = maxWidth - newSize = true - } - if w.impl != nil { - if newSize { - w.impl.setSize(newWidth, newHeight) - } - w.impl.setMaxSize(maxWidth, maxHeight) - } - return w -} - -func (w *WebviewWindow) ExecJS(js string) { - if w.impl == nil { - return - } - w.impl.execJS(js) -} - -func (w *WebviewWindow) Fullscreen() *WebviewWindow { - if w.impl == nil { - w.options.StartState = WindowStateFullscreen - return w - } - if !w.IsFullscreen() { - w.disableSizeConstraints() - w.impl.fullscreen() - } - return w -} - -func (w *WebviewWindow) SetFullscreenButtonEnabled(enabled bool) *WebviewWindow { - w.options.FullscreenButtonEnabled = enabled - if w.impl != nil { - w.impl.setFullscreenButtonEnabled(enabled) - } - return w -} - -// IsMinimised returns true if the window is minimised -func (w *WebviewWindow) IsMinimised() bool { - if w.impl == nil { - return false - } - return w.impl.isMinimised() -} - -// IsMaximised returns true if the window is maximised -func (w *WebviewWindow) IsMaximised() bool { - if w.impl == nil { - return false - } - return w.impl.isMaximised() -} - -// Size returns the size of the window -func (w *WebviewWindow) Size() (width int, height int) { - if w.impl == nil { - return 0, 0 - } - return w.impl.size() -} - -// IsFullscreen returns true if the window is fullscreen -func (w *WebviewWindow) IsFullscreen() bool { - w.implLock.RLock() - defer w.implLock.RUnlock() - if w.impl == nil { - return false - } - return w.impl.isFullscreen() -} - -func (w *WebviewWindow) SetBackgroundColour(colour *RGBA) *WebviewWindow { - w.options.BackgroundColour = colour - if w.impl != nil { - w.impl.setBackgroundColour(colour) - } - return w -} - -func (w *WebviewWindow) handleMessage(message string) { - w.info(message) - // Check for special messages - if message == "test" { - w.SetTitle("Hello World") - } - w.info("ProcessMessage from front end:", message) - -} - -func (w *WebviewWindow) Center() { - if w.impl == nil { - return - } - w.impl.center() -} - -func (w *WebviewWindow) On(eventType events.WindowEventType, callback func(ctx *WindowEventContext)) { - eventID := uint(eventType) - w.eventListenersLock.Lock() - defer w.eventListenersLock.Unlock() - w.eventListeners[eventID] = append(w.eventListeners[eventID], callback) - if w.impl != nil { - w.impl.on(eventID) - } -} - -func (w *WebviewWindow) handleWindowEvent(id uint) { - w.eventListenersLock.RLock() - for _, callback := range w.eventListeners[id] { - go callback(blankWindowEventContext) - } - w.eventListenersLock.RUnlock() -} - -func (w *WebviewWindow) Width() int { - if w.impl == nil { - return 0 - } - return w.impl.width() -} - -func (w *WebviewWindow) Height() int { - if w.impl == nil { - return 0 - } - return w.impl.height() -} - -func (w *WebviewWindow) Position() (int, int) { - w.implLock.RLock() - defer w.implLock.RUnlock() - if w.impl == nil { - return 0, 0 - } - return w.impl.position() -} - -func (w *WebviewWindow) Destroy() { - if w.impl == nil { - return - } - w.impl.destroy() -} - -func (w *WebviewWindow) Reload() { - if w.impl == nil { - return - } - w.impl.reload() -} - -func (w *WebviewWindow) ForceReload() { - if w.impl == nil { - return - } - w.impl.forceReload() -} - -func (w *WebviewWindow) ToggleFullscreen() { - if w.impl == nil { - return - } - if w.IsFullscreen() { - w.UnFullscreen() - } else { - w.Fullscreen() - } -} - -func (w *WebviewWindow) ToggleDevTools() { - if w.impl == nil { - return - } - w.impl.toggleDevTools() -} - -func (w *WebviewWindow) ZoomReset() *WebviewWindow { - if w.impl != nil { - w.impl.zoomReset() - } - return w - -} - -func (w *WebviewWindow) ZoomIn() { - if w.impl == nil { - return - } - w.impl.zoomIn() -} - -func (w *WebviewWindow) ZoomOut() { - if w.impl == nil { - return - } - w.impl.zoomOut() -} - -func (w *WebviewWindow) Close() { - if w.impl == nil { - return - } - w.impl.close() -} - -func (w *WebviewWindow) Minimize() { - if w.impl == nil { - return - } - w.impl.minimise() -} - -func (w *WebviewWindow) Zoom() { - if w.impl == nil { - return - } - w.impl.zoom() -} - -func (w *WebviewWindow) SetHTML(html string) *WebviewWindow { - w.options.HTML = html - if w.impl != nil { - w.impl.setHTML(html) - } - return w -} - -func (w *WebviewWindow) SetPosition(x, y int) *WebviewWindow { - w.options.X = x - w.options.Y = y - if w.impl != nil { - w.impl.setPosition(x, y) - } - return w -} - -func (w *WebviewWindow) Minimise() *WebviewWindow { - if w.impl == nil { - w.options.StartState = WindowStateMinimised - return w - } - if !w.IsMinimised() { - w.impl.minimise() - } - return w -} - -func (w *WebviewWindow) Maximise() *WebviewWindow { - if w.impl == nil { - w.options.StartState = WindowStateMaximised - return w - } - if !w.IsMaximised() { - w.disableSizeConstraints() - w.impl.maximise() - } - return w -} - -func (w *WebviewWindow) UnMinimise() { - if w.impl == nil { - return - } - w.impl.unminimise() -} - -func (w *WebviewWindow) UnMaximise() { - if w.impl == nil { - return - } - w.enableSizeConstraints() - w.impl.unmaximise() -} - -func (w *WebviewWindow) UnFullscreen() { - if w.impl == nil { - return - } - w.enableSizeConstraints() - w.impl.unfullscreen() -} - -func (w *WebviewWindow) Restore() { - if w.impl == nil { - return - } - if w.IsMinimised() { - w.UnMinimise() - } else if w.IsMaximised() { - w.UnMaximise() - } else if w.IsFullscreen() { - w.UnFullscreen() - } -} - -func (w *WebviewWindow) disableSizeConstraints() { - if w.impl == nil { - return - } - w.impl.setMinSize(0, 0) - w.impl.setMaxSize(0, 0) -} - -func (w *WebviewWindow) enableSizeConstraints() { - if w.impl == nil { - return - } - w.SetMinSize(w.options.MinWidth, w.options.MinHeight) - w.SetMaxSize(w.options.MaxWidth, w.options.MaxHeight) -} - -func (w *WebviewWindow) GetScreen() (*Screen, error) { - if w.impl == nil { - return nil, nil - } - return w.impl.getScreen() -} - -func (w *WebviewWindow) SetFrameless(frameless bool) *WebviewWindow { - w.options.Frameless = frameless - if w.impl != nil { - w.impl.setFrameless(frameless) - } - return w -} - -func (w *WebviewWindow) dispatchWailsEvent(event *WailsEvent) { - msg := fmt.Sprintf("_wails.dispatchWailsEvent(%s);", event.ToJSON()) - w.ExecJS(msg) -} - -func (w *WebviewWindow) info(message string, args ...any) { - - globalApplication.Log(&logger.Message{ - Level: "INFO", - Message: message, - Data: args, - Sender: w.Name(), - Time: time.Now(), - }) -} -func (w *WebviewWindow) error(message string, args ...any) { - - globalApplication.Log(&logger.Message{ - Level: "ERROR", - Message: message, - Data: args, - Sender: w.Name(), - Time: time.Now(), - }) -} - -func (w *WebviewWindow) handleDragAndDropMessage(event *dragAndDropMessage) { - ctx := newWindowEventContext() - ctx.setDroppedFiles(event.filenames) - for _, listener := range w.eventListeners[uint(events.FilesDropped)] { - listener(ctx) - } -} - -func (w *WebviewWindow) openContextMenu(data *ContextMenuData) { - menu, ok := w.contextMenus[data.Id] - if !ok { - // try application level context menu - menu, ok = globalApplication.getContextMenu(data.Id) - if !ok { - w.error("No context menu found for id: %s", data.Id) - return - } - } - menu.setContextData(data) - if w.impl == nil { - return - } - w.impl.openContextMenu(menu, data) -} - -func (w *WebviewWindow) RegisterContextMenu(name string, menu *Menu) { - w.contextMenusLock.Lock() - defer w.contextMenusLock.Unlock() - w.contextMenus[name] = menu -} diff --git a/v3/pkg/application/webview_window.h b/v3/pkg/application/webview_window.h deleted file mode 100644 index 280ec934c..000000000 --- a/v3/pkg/application/webview_window.h +++ /dev/null @@ -1,35 +0,0 @@ -//go:build darwin - -#ifndef WebviewWindowDelegate_h -#define WebviewWindowDelegate_h - -#import -#import - -@interface WebviewWindow : NSWindow -- (BOOL) canBecomeKeyWindow; -- (BOOL) canBecomeMainWindow; -- (BOOL) acceptsFirstResponder; -- (BOOL) becomeFirstResponder; -- (BOOL) resignFirstResponder; -- (WebviewWindow*) initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation; - -@property (assign) WKWebView* webView; // We already retain WKWebView since it's part of the Window. - -@end - -@interface WebviewWindowDelegate : NSObject - -@property bool hideOnClose; -@property unsigned int windowId; -@property (retain) NSEvent* leftMouseEvent; -@property unsigned int invisibleTitleBarHeight; -@property NSWindowStyleMask previousStyleMask; // Used to restore the window style mask when using frameless - -- (void)handleLeftMouseUp:(NSWindow *)window; -- (void)handleLeftMouseDown:(NSEvent*)event; - -@end - - -#endif /* WebviewWindowDelegate_h */ diff --git a/v3/pkg/application/webview_window.m b/v3/pkg/application/webview_window.m deleted file mode 100644 index 70636fc47..000000000 --- a/v3/pkg/application/webview_window.m +++ /dev/null @@ -1,585 +0,0 @@ -//go:build darwin -#import -#import -#import "webview_window.h" -#import "../events/events.h" -extern void processMessage(unsigned int, const char*); -extern void processURLRequest(unsigned int, void *); -extern bool hasListeners(unsigned int); -@implementation WebviewWindow -- (WebviewWindow*) initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation; -{ - self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; - [self setAlphaValue:1.0]; - [self setBackgroundColor:[NSColor clearColor]]; - [self setOpaque:NO]; - [self setMovableByWindowBackground:YES]; - return self; -} -- (void)keyDown:(NSEvent *)event { -} -- (BOOL)canBecomeKeyWindow { - return YES; -} -- (BOOL) canBecomeMainWindow { - return YES; -} -- (BOOL) acceptsFirstResponder { - return YES; -} -- (BOOL) becomeFirstResponder { - return YES; -} -- (BOOL) resignFirstResponder { - return YES; -} -- (void) setDelegate:(id) delegate { - [delegate retain]; - [super setDelegate: delegate]; -} -- (void) dealloc { - // Remove the script handler, otherwise WebviewWindowDelegate won't get deallocated - // See: https://stackoverflow.com/questions/26383031/wkwebview-causes-my-view-controller-to-leak - [self.webView.configuration.userContentController removeScriptMessageHandlerForName:@"external"]; - if (self.delegate) { - [self.delegate release]; - } - [super dealloc]; -} -@end -@implementation WebviewWindowDelegate -- (BOOL)windowShouldClose:(NSWindow *)sender { - if( self.hideOnClose ) { - [sender orderOut:nil]; - return false; - } - return true; -} -- (void) dealloc { - // Makes sure to remove the retained properties so the reference counter of the retains are decreased - self.leftMouseEvent = nil; - [super dealloc]; -} -// Handle script messages from the external bridge -- (void)userContentController:(nonnull WKUserContentController *)userContentController didReceiveScriptMessage:(nonnull WKScriptMessage *)message { - NSString *m = message.body; - /* - // TODO: Check for drag - if ( [m isEqualToString:@"drag"] ) { - if( [self IsFullScreen] ) { - return; - } - if( self.mouseEvent != nil ) { - [self.mainWindow performWindowDragWithEvent:self.mouseEvent]; - } - return; - } - */ - const char *_m = [m UTF8String]; - processMessage(self.windowId, _m); -} -- (void)handleLeftMouseDown:(NSEvent *)event { - self.leftMouseEvent = event; - NSWindow *window = [event window]; - WebviewWindowDelegate* delegate = (WebviewWindowDelegate*)[window delegate]; - if( self.invisibleTitleBarHeight > 0 ) { - NSPoint location = [event locationInWindow]; - NSRect frame = [window frame]; - if( location.y > frame.size.height - self.invisibleTitleBarHeight ) { - [window performWindowDragWithEvent:event]; - return; - } - } -} -- (void)handleLeftMouseUp:(NSWindow *)window { - self.leftMouseEvent = nil; -} -- (void)webView:(nonnull WKWebView *)webView startURLSchemeTask:(nonnull id)urlSchemeTask { - processURLRequest(self.windowId, urlSchemeTask); -} -- (void)webView:(nonnull WKWebView *)webView stopURLSchemeTask:(nonnull id)urlSchemeTask { - NSInputStream *stream = urlSchemeTask.request.HTTPBodyStream; - if (stream) { - NSStreamStatus status = stream.streamStatus; - if (status != NSStreamStatusClosed && status != NSStreamStatusNotOpen) { - [stream close]; - } - } -} -// GENERATED EVENTS START -- (void)windowDidBecomeKey:(NSNotification *)notification { - if( hasListeners(EventWindowDidBecomeKey) ) { - processWindowEvent(self.windowId, EventWindowDidBecomeKey); - } -} - -- (void)windowDidBecomeMain:(NSNotification *)notification { - if( hasListeners(EventWindowDidBecomeMain) ) { - processWindowEvent(self.windowId, EventWindowDidBecomeMain); - } -} - -- (void)windowDidBeginSheet:(NSNotification *)notification { - if( hasListeners(EventWindowDidBeginSheet) ) { - processWindowEvent(self.windowId, EventWindowDidBeginSheet); - } -} - -- (void)windowDidChangeAlpha:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeAlpha) ) { - processWindowEvent(self.windowId, EventWindowDidChangeAlpha); - } -} - -- (void)windowDidChangeBackingLocation:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeBackingLocation) ) { - processWindowEvent(self.windowId, EventWindowDidChangeBackingLocation); - } -} - -- (void)windowDidChangeBackingProperties:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeBackingProperties) ) { - processWindowEvent(self.windowId, EventWindowDidChangeBackingProperties); - } -} - -- (void)windowDidChangeCollectionBehavior:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeCollectionBehavior) ) { - processWindowEvent(self.windowId, EventWindowDidChangeCollectionBehavior); - } -} - -- (void)windowDidChangeEffectiveAppearance:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeEffectiveAppearance) ) { - processWindowEvent(self.windowId, EventWindowDidChangeEffectiveAppearance); - } -} - -- (void)windowDidChangeOcclusionState:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeOcclusionState) ) { - processWindowEvent(self.windowId, EventWindowDidChangeOcclusionState); - } -} - -- (void)windowDidChangeOrderingMode:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeOrderingMode) ) { - processWindowEvent(self.windowId, EventWindowDidChangeOrderingMode); - } -} - -- (void)windowDidChangeScreen:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeScreen) ) { - processWindowEvent(self.windowId, EventWindowDidChangeScreen); - } -} - -- (void)windowDidChangeScreenParameters:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeScreenParameters) ) { - processWindowEvent(self.windowId, EventWindowDidChangeScreenParameters); - } -} - -- (void)windowDidChangeScreenProfile:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeScreenProfile) ) { - processWindowEvent(self.windowId, EventWindowDidChangeScreenProfile); - } -} - -- (void)windowDidChangeScreenSpace:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeScreenSpace) ) { - processWindowEvent(self.windowId, EventWindowDidChangeScreenSpace); - } -} - -- (void)windowDidChangeScreenSpaceProperties:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeScreenSpaceProperties) ) { - processWindowEvent(self.windowId, EventWindowDidChangeScreenSpaceProperties); - } -} - -- (void)windowDidChangeSharingType:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeSharingType) ) { - processWindowEvent(self.windowId, EventWindowDidChangeSharingType); - } -} - -- (void)windowDidChangeSpace:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeSpace) ) { - processWindowEvent(self.windowId, EventWindowDidChangeSpace); - } -} - -- (void)windowDidChangeSpaceOrderingMode:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeSpaceOrderingMode) ) { - processWindowEvent(self.windowId, EventWindowDidChangeSpaceOrderingMode); - } -} - -- (void)windowDidChangeTitle:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeTitle) ) { - processWindowEvent(self.windowId, EventWindowDidChangeTitle); - } -} - -- (void)windowDidChangeToolbar:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeToolbar) ) { - processWindowEvent(self.windowId, EventWindowDidChangeToolbar); - } -} - -- (void)windowDidChangeVisibility:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeVisibility) ) { - processWindowEvent(self.windowId, EventWindowDidChangeVisibility); - } -} - -- (void)windowDidDeminiaturize:(NSNotification *)notification { - if( hasListeners(EventWindowDidDeminiaturize) ) { - processWindowEvent(self.windowId, EventWindowDidDeminiaturize); - } -} - -- (void)windowDidEndSheet:(NSNotification *)notification { - if( hasListeners(EventWindowDidEndSheet) ) { - processWindowEvent(self.windowId, EventWindowDidEndSheet); - } -} - -- (void)windowDidEnterFullScreen:(NSNotification *)notification { - if( hasListeners(EventWindowDidEnterFullScreen) ) { - processWindowEvent(self.windowId, EventWindowDidEnterFullScreen); - } -} - -- (void)windowDidEnterVersionBrowser:(NSNotification *)notification { - if( hasListeners(EventWindowDidEnterVersionBrowser) ) { - processWindowEvent(self.windowId, EventWindowDidEnterVersionBrowser); - } -} - -- (void)windowDidExitFullScreen:(NSNotification *)notification { - if( hasListeners(EventWindowDidExitFullScreen) ) { - processWindowEvent(self.windowId, EventWindowDidExitFullScreen); - } -} - -- (void)windowDidExitVersionBrowser:(NSNotification *)notification { - if( hasListeners(EventWindowDidExitVersionBrowser) ) { - processWindowEvent(self.windowId, EventWindowDidExitVersionBrowser); - } -} - -- (void)windowDidExpose:(NSNotification *)notification { - if( hasListeners(EventWindowDidExpose) ) { - processWindowEvent(self.windowId, EventWindowDidExpose); - } -} - -- (void)windowDidFocus:(NSNotification *)notification { - if( hasListeners(EventWindowDidFocus) ) { - processWindowEvent(self.windowId, EventWindowDidFocus); - } -} - -- (void)windowDidMiniaturize:(NSNotification *)notification { - if( hasListeners(EventWindowDidMiniaturize) ) { - processWindowEvent(self.windowId, EventWindowDidMiniaturize); - } -} - -- (void)windowDidMove:(NSNotification *)notification { - if( hasListeners(EventWindowDidMove) ) { - processWindowEvent(self.windowId, EventWindowDidMove); - } -} - -- (void)windowDidOrderOffScreen:(NSNotification *)notification { - if( hasListeners(EventWindowDidOrderOffScreen) ) { - processWindowEvent(self.windowId, EventWindowDidOrderOffScreen); - } -} - -- (void)windowDidOrderOnScreen:(NSNotification *)notification { - if( hasListeners(EventWindowDidOrderOnScreen) ) { - processWindowEvent(self.windowId, EventWindowDidOrderOnScreen); - } -} - -- (void)windowDidResignKey:(NSNotification *)notification { - if( hasListeners(EventWindowDidResignKey) ) { - processWindowEvent(self.windowId, EventWindowDidResignKey); - } -} - -- (void)windowDidResignMain:(NSNotification *)notification { - if( hasListeners(EventWindowDidResignMain) ) { - processWindowEvent(self.windowId, EventWindowDidResignMain); - } -} - -- (void)windowDidResize:(NSNotification *)notification { - if( hasListeners(EventWindowDidResize) ) { - processWindowEvent(self.windowId, EventWindowDidResize); - } -} - -- (void)windowDidUnfocus:(NSNotification *)notification { - if( hasListeners(EventWindowDidUnfocus) ) { - processWindowEvent(self.windowId, EventWindowDidUnfocus); - } -} - -- (void)windowDidUpdate:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdate) ) { - processWindowEvent(self.windowId, EventWindowDidUpdate); - } -} - -- (void)windowDidUpdateAlpha:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateAlpha) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateAlpha); - } -} - -- (void)windowDidUpdateCollectionBehavior:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateCollectionBehavior) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateCollectionBehavior); - } -} - -- (void)windowDidUpdateCollectionProperties:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateCollectionProperties) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateCollectionProperties); - } -} - -- (void)windowDidUpdateShadow:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateShadow) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateShadow); - } -} - -- (void)windowDidUpdateTitle:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateTitle) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateTitle); - } -} - -- (void)windowDidUpdateToolbar:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateToolbar) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateToolbar); - } -} - -- (void)windowDidUpdateVisibility:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateVisibility) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateVisibility); - } -} - -- (void)windowWillBecomeKey:(NSNotification *)notification { - if( hasListeners(EventWindowWillBecomeKey) ) { - processWindowEvent(self.windowId, EventWindowWillBecomeKey); - } -} - -- (void)windowWillBecomeMain:(NSNotification *)notification { - if( hasListeners(EventWindowWillBecomeMain) ) { - processWindowEvent(self.windowId, EventWindowWillBecomeMain); - } -} - -- (void)windowWillBeginSheet:(NSNotification *)notification { - if( hasListeners(EventWindowWillBeginSheet) ) { - processWindowEvent(self.windowId, EventWindowWillBeginSheet); - } -} - -- (void)windowWillChangeOrderingMode:(NSNotification *)notification { - if( hasListeners(EventWindowWillChangeOrderingMode) ) { - processWindowEvent(self.windowId, EventWindowWillChangeOrderingMode); - } -} - -- (void)windowWillClose:(NSNotification *)notification { - if( hasListeners(EventWindowWillClose) ) { - processWindowEvent(self.windowId, EventWindowWillClose); - } -} - -- (void)windowWillDeminiaturize:(NSNotification *)notification { - if( hasListeners(EventWindowWillDeminiaturize) ) { - processWindowEvent(self.windowId, EventWindowWillDeminiaturize); - } -} - -- (void)windowWillEnterFullScreen:(NSNotification *)notification { - if( hasListeners(EventWindowWillEnterFullScreen) ) { - processWindowEvent(self.windowId, EventWindowWillEnterFullScreen); - } -} - -- (void)windowWillEnterVersionBrowser:(NSNotification *)notification { - if( hasListeners(EventWindowWillEnterVersionBrowser) ) { - processWindowEvent(self.windowId, EventWindowWillEnterVersionBrowser); - } -} - -- (void)windowWillExitFullScreen:(NSNotification *)notification { - if( hasListeners(EventWindowWillExitFullScreen) ) { - processWindowEvent(self.windowId, EventWindowWillExitFullScreen); - } -} - -- (void)windowWillExitVersionBrowser:(NSNotification *)notification { - if( hasListeners(EventWindowWillExitVersionBrowser) ) { - processWindowEvent(self.windowId, EventWindowWillExitVersionBrowser); - } -} - -- (void)windowWillFocus:(NSNotification *)notification { - if( hasListeners(EventWindowWillFocus) ) { - processWindowEvent(self.windowId, EventWindowWillFocus); - } -} - -- (void)windowWillMiniaturize:(NSNotification *)notification { - if( hasListeners(EventWindowWillMiniaturize) ) { - processWindowEvent(self.windowId, EventWindowWillMiniaturize); - } -} - -- (void)windowWillMove:(NSNotification *)notification { - if( hasListeners(EventWindowWillMove) ) { - processWindowEvent(self.windowId, EventWindowWillMove); - } -} - -- (void)windowWillOrderOffScreen:(NSNotification *)notification { - if( hasListeners(EventWindowWillOrderOffScreen) ) { - processWindowEvent(self.windowId, EventWindowWillOrderOffScreen); - } -} - -- (void)windowWillOrderOnScreen:(NSNotification *)notification { - if( hasListeners(EventWindowWillOrderOnScreen) ) { - processWindowEvent(self.windowId, EventWindowWillOrderOnScreen); - } -} - -- (void)windowWillResignMain:(NSNotification *)notification { - if( hasListeners(EventWindowWillResignMain) ) { - processWindowEvent(self.windowId, EventWindowWillResignMain); - } -} - -- (void)windowWillResize:(NSNotification *)notification { - if( hasListeners(EventWindowWillResize) ) { - processWindowEvent(self.windowId, EventWindowWillResize); - } -} - -- (void)windowWillUnfocus:(NSNotification *)notification { - if( hasListeners(EventWindowWillUnfocus) ) { - processWindowEvent(self.windowId, EventWindowWillUnfocus); - } -} - -- (void)windowWillUpdate:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdate) ) { - processWindowEvent(self.windowId, EventWindowWillUpdate); - } -} - -- (void)windowWillUpdateAlpha:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateAlpha) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateAlpha); - } -} - -- (void)windowWillUpdateCollectionBehavior:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateCollectionBehavior) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateCollectionBehavior); - } -} - -- (void)windowWillUpdateCollectionProperties:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateCollectionProperties) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateCollectionProperties); - } -} - -- (void)windowWillUpdateShadow:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateShadow) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateShadow); - } -} - -- (void)windowWillUpdateTitle:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateTitle) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateTitle); - } -} - -- (void)windowWillUpdateToolbar:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateToolbar) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateToolbar); - } -} - -- (void)windowWillUpdateVisibility:(NSNotification *)notification { - if( hasListeners(EventWindowWillUpdateVisibility) ) { - processWindowEvent(self.windowId, EventWindowWillUpdateVisibility); - } -} - -- (void)windowWillUseStandardFrame:(NSNotification *)notification { - if( hasListeners(EventWindowWillUseStandardFrame) ) { - processWindowEvent(self.windowId, EventWindowWillUseStandardFrame); - } -} - -- (void)windowFileDraggingEntered:(NSNotification *)notification { - if( hasListeners(EventWindowFileDraggingEntered) ) { - processWindowEvent(self.windowId, EventWindowFileDraggingEntered); - } -} - -- (void)windowFileDraggingPerformed:(NSNotification *)notification { - if( hasListeners(EventWindowFileDraggingPerformed) ) { - processWindowEvent(self.windowId, EventWindowFileDraggingPerformed); - } -} - -- (void)windowFileDraggingExited:(NSNotification *)notification { - if( hasListeners(EventWindowFileDraggingExited) ) { - processWindowEvent(self.windowId, EventWindowFileDraggingExited); - } -} - -- (void)webView:(WKWebView *)webview didStartProvisionalNavigation:(WKNavigation *)navigation { - if( hasListeners(EventWebViewDidStartProvisionalNavigation) ) { - processWindowEvent(self.windowId, EventWebViewDidStartProvisionalNavigation); - } -} - -- (void)webView:(WKWebView *)webview didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation { - if( hasListeners(EventWebViewDidReceiveServerRedirectForProvisionalNavigation) ) { - processWindowEvent(self.windowId, EventWebViewDidReceiveServerRedirectForProvisionalNavigation); - } -} - -- (void)webView:(WKWebView *)webview didFinishNavigation:(WKNavigation *)navigation { - if( hasListeners(EventWebViewDidFinishNavigation) ) { - processWindowEvent(self.windowId, EventWebViewDidFinishNavigation); - } -} - -- (void)webView:(WKWebView *)webview didCommitNavigation:(WKNavigation *)navigation { - if( hasListeners(EventWebViewDidCommitNavigation) ) { - processWindowEvent(self.windowId, EventWebViewDidCommitNavigation); - } -} - -// GENERATED EVENTS END -@end diff --git a/v3/pkg/application/webview_window_darwin.go b/v3/pkg/application/webview_window_darwin.go deleted file mode 100644 index c8728f2e9..000000000 --- a/v3/pkg/application/webview_window_darwin.go +++ /dev/null @@ -1,1178 +0,0 @@ -//go:build darwin - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -framework WebKit - -#include "application.h" -#include "webview_window.h" -#include -#include "Cocoa/Cocoa.h" -#import -#import -#import "webview_drag.h" - - -extern void registerListener(unsigned int event); - -// Create a new Window -void* windowNew(unsigned int id, int width, int height, bool fraudulentWebsiteWarningEnabled, bool frameless, bool enableDragAndDrop, bool hideOnClose) { - NSWindowStyleMask styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable; - if (frameless) { - styleMask = NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable; - } - WebviewWindow* window = [[WebviewWindow alloc] initWithContentRect:NSMakeRect(0, 0, width-1, height-1) - styleMask:styleMask - backing:NSBackingStoreBuffered - defer:NO]; - - // Create delegate - WebviewWindowDelegate* delegate = [[WebviewWindowDelegate alloc] init]; - [delegate autorelease]; - - // Set delegate - [window setDelegate:delegate]; - delegate.windowId = id; - - // Add NSView to window - NSView* view = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, width-1, height-1)]; - [view autorelease]; - - [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - if( frameless ) { - [view setWantsLayer:YES]; - view.layer.cornerRadius = 8.0; - } - [window setContentView:view]; - - // Embed wkwebview in window - NSRect frame = NSMakeRect(0, 0, width, height); - WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc] init]; - [config autorelease]; - - config.suppressesIncrementalRendering = true; - config.applicationNameForUserAgent = @"wails.io"; - [config setURLSchemeHandler:delegate forURLScheme:@"wails"]; - if (@available(macOS 10.15, *)) { - config.preferences.fraudulentWebsiteWarningEnabled = fraudulentWebsiteWarningEnabled; - } - - // Setup user content controller - WKUserContentController* userContentController = [WKUserContentController new]; - [userContentController autorelease]; - - [userContentController addScriptMessageHandler:delegate name:@"external"]; - config.userContentController = userContentController; - - WKWebView* webView = [[WKWebView alloc] initWithFrame:frame configuration:config]; - [webView autorelease]; - - [view addSubview:webView]; - - // support webview events - [webView setNavigationDelegate:delegate]; - - // Ensure webview resizes with the window - [webView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - - delegate.hideOnClose = hideOnClose; - - if( enableDragAndDrop ) { - WebviewDrag* dragView = [[WebviewDrag alloc] initWithFrame:NSMakeRect(0, 0, width-1, height-1)]; - [dragView autorelease]; - - [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [view addSubview:dragView]; - dragView.windowId = id; - } - - window.webView = webView; - return window; -} - - -void printWindowStyle(void *window) { - WebviewWindow* nsWindow = (WebviewWindow*)window; - NSWindowStyleMask styleMask = [nsWindow styleMask]; - // Get delegate - WebviewWindowDelegate* windowDelegate = (WebviewWindowDelegate*)[nsWindow delegate]; - - printf("Window %d style mask: ", windowDelegate.windowId); - - if (styleMask & NSWindowStyleMaskTitled) - { - printf("NSWindowStyleMaskTitled "); - } - - if (styleMask & NSWindowStyleMaskClosable) - { - printf("NSWindowStyleMaskClosable "); - } - - if (styleMask & NSWindowStyleMaskMiniaturizable) - { - printf("NSWindowStyleMaskMiniaturizable "); - } - - if (styleMask & NSWindowStyleMaskResizable) - { - printf("NSWindowStyleMaskResizable "); - } - - if (styleMask & NSWindowStyleMaskFullSizeContentView) - { - printf("NSWindowStyleMaskFullSizeContentView "); - } - - if (styleMask & NSWindowStyleMaskNonactivatingPanel) - { - printf("NSWindowStyleMaskNonactivatingPanel "); - } - - if (styleMask & NSWindowStyleMaskFullScreen) - { - printf("NSWindowStyleMaskFullScreen "); - } - - if (styleMask & NSWindowStyleMaskBorderless) - { - printf("MSWindowStyleMaskBorderless "); - } - - printf("\n"); -} - - -// setInvisibleTitleBarHeight sets the invisible title bar height -void setInvisibleTitleBarHeight(void* window, unsigned int height) { - WebviewWindow* nsWindow = (WebviewWindow*)window; - // Get delegate - WebviewWindowDelegate* delegate = (WebviewWindowDelegate*)[nsWindow delegate]; - // Set height - delegate.invisibleTitleBarHeight = height; -} - -// Make NSWindow transparent -void windowSetTransparent(void* nsWindow) { - // On main thread - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* window = (WebviewWindow*)nsWindow; - [window setOpaque:NO]; - [window setBackgroundColor:[NSColor clearColor]]; - }); -} - -void windowSetInvisibleTitleBar(void* nsWindow, unsigned int height) { - // On main thread - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Get delegate - WebviewWindowDelegate* delegate = (WebviewWindowDelegate*)[window delegate]; - // Set height - delegate.invisibleTitleBarHeight = height; - }); -} - - -// Set the title of the NSWindow -void windowSetTitle(void* nsWindow, char* title) { - // Set window title on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSString* nsTitle = [NSString stringWithUTF8String:title]; - [(WebviewWindow*)nsWindow setTitle:nsTitle]; - free(title); - }); -} - -// Set the size of the NSWindow -void windowSetSize(void* nsWindow, int width, int height) { - // Set window size on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* window = (WebviewWindow*)nsWindow; - NSSize contentSize = [window contentRectForFrameRect:NSMakeRect(0, 0, width, height)].size; - [window setContentSize:contentSize]; - [window setFrame:NSMakeRect(window.frame.origin.x, window.frame.origin.y, width, height) display:YES animate:YES]; - }); -} - -// Set NSWindow always on top -void windowSetAlwaysOnTop(void* nsWindow, bool alwaysOnTop) { - // Set window always on top on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - [(WebviewWindow*)nsWindow setLevel:alwaysOnTop ? NSStatusWindowLevel : NSNormalWindowLevel]; - }); -} - -// Load URL in NSWindow -void navigationLoadURL(void* nsWindow, char* url) { - // Load URL on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSURL* nsURL = [NSURL URLWithString:[NSString stringWithUTF8String:url]]; - NSURLRequest* request = [NSURLRequest requestWithURL:nsURL]; - WebviewWindow* window = (WebviewWindow*)nsWindow; - [window.webView loadRequest:request]; - free(url); - }); -} - -// Set NSWindow resizable -void windowSetResizable(void* nsWindow, bool resizable) { - // Set window resizable on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* window = (WebviewWindow*)nsWindow; - if (resizable) { - NSWindowStyleMask styleMask = [window styleMask] | NSWindowStyleMaskResizable; - [window setStyleMask:styleMask]; - } else { - NSWindowStyleMask styleMask = [window styleMask] & ~NSWindowStyleMaskResizable; - [window setStyleMask:styleMask]; - } - }); -} - -// Set NSWindow min size -void windowSetMinSize(void* nsWindow, int width, int height) { - // Set window min size on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* window = (WebviewWindow*)nsWindow; - NSSize contentSize = [window contentRectForFrameRect:NSMakeRect(0, 0, width, height)].size; - [window setContentMinSize:contentSize]; - NSSize size = { width, height }; - [window setMinSize:size]; - }); -} - -// Set NSWindow max size -void windowSetMaxSize(void* nsWindow, int width, int height) { - // Set window max size on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - NSSize size = { FLT_MAX, FLT_MAX }; - size.width = width > 0 ? width : FLT_MAX; - size.height = height > 0 ? height : FLT_MAX; - WebviewWindow* window = (WebviewWindow*)nsWindow; - NSSize contentSize = [window contentRectForFrameRect:NSMakeRect(0, 0, size.width, size.height)].size; - [window setContentMaxSize:contentSize]; - [window setMaxSize:size]; - }); -} - -// Enable NSWindow devtools -void windowEnableDevTools(void* nsWindow) { - // Enable devtools on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Enable devtools in webview - [window.webView.configuration.preferences setValue:@YES forKey:@"developerExtrasEnabled"]; - }); -} - -// windowZoomReset -void windowZoomReset(void* nsWindow) { - // Reset zoom on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Reset zoom - [window.webView setMagnification:1.0]; - }); -} - -// windowZoomSet -void windowZoomSet(void* nsWindow, double zoom) { - // Reset zoom on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Reset zoom - [window.webView setMagnification:zoom]; - }); -} - -// windowZoomGet -float windowZoomGet(void* nsWindow) { - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Get zoom - return [window.webView magnification]; -} - -// windowZoomIn -void windowZoomIn(void* nsWindow) { - // Zoom in on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Zoom in - [window.webView setMagnification:window.webView.magnification + 0.05]; - }); -} - -// windowZoomOut -void windowZoomOut(void* nsWindow) { - // Zoom out on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Zoom out - if( window.webView.magnification > 1.05 ) { - [window.webView setMagnification:window.webView.magnification - 0.05]; - } else { - [window.webView setMagnification:1.0]; - } - }); -} - -// set the window position -void windowSetPosition(void* nsWindow, int x, int y) { - // Set window position on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - [(WebviewWindow*)nsWindow setFrameOrigin:NSMakePoint(x, y)]; - }); -} - -// Execute JS in NSWindow -void windowExecJS(void* nsWindow, const char* js) { - // Execute JS on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - [window.webView evaluateJavaScript:[NSString stringWithUTF8String:js] completionHandler:nil]; - free((void*)js); - }); -} - -// Make NSWindow backdrop translucent -void windowSetTranslucent(void* nsWindow) { - // Set window transparent on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - - // Get window - WebviewWindow* window = (WebviewWindow*)nsWindow; - - id contentView = [window contentView]; - NSVisualEffectView *effectView = [NSVisualEffectView alloc]; - NSRect bounds = [contentView bounds]; - [effectView initWithFrame:bounds]; - [effectView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [effectView setBlendingMode:NSVisualEffectBlendingModeBehindWindow]; - [effectView setState:NSVisualEffectStateActive]; - [contentView addSubview:effectView positioned:NSWindowBelow relativeTo:nil]; - }); -} - -// Make webview background transparent -void webviewSetTransparent(void* nsWindow) { - // Set webview transparent on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Set webview background transparent - [window.webView setValue:@NO forKey:@"drawsBackground"]; - }); -} - -// Set webview background colour -void webviewSetBackgroundColour(void* nsWindow, int r, int g, int b, int alpha) { - // Set webview background color on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Set webview background color - [window.webView setValue:[NSColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:alpha/255.0] forKey:@"backgroundColor"]; - }); -} - -// Set the window background colour -void windowSetBackgroundColour(void* nsWindow, int r, int g, int b, int alpha) { - // Set window background color on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // Get window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // Set window background color - [window setBackgroundColor:[NSColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:alpha/255.0]]; - }); -} - -bool windowIsMaximised(void* nsWindow) { - return [(WebviewWindow*)nsWindow isZoomed]; -} - -bool windowIsFullscreen(void* nsWindow) { - return [(WebviewWindow*)nsWindow styleMask] & NSWindowStyleMaskFullScreen; -} - -bool windowIsMinimised(void* nsWindow) { - return [(WebviewWindow*)nsWindow isMiniaturized]; -} - -// Set Window fullscreen -void windowFullscreen(void* nsWindow) { - if( windowIsFullscreen(nsWindow) ) { - return; - } - dispatch_async(dispatch_get_main_queue(), ^{ - [(WebviewWindow*)nsWindow toggleFullScreen:nil]; - });} - -void windowUnFullscreen(void* nsWindow) { - if( !windowIsFullscreen(nsWindow) ) { - return; - } - dispatch_async(dispatch_get_main_queue(), ^{ - [(WebviewWindow*)nsWindow toggleFullScreen:nil]; - }); -} - -// restore window to normal size -void windowRestore(void* nsWindow) { - // Set window normal on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // If window is fullscreen - if([(WebviewWindow*)nsWindow styleMask] & NSWindowStyleMaskFullScreen) { - [(WebviewWindow*)nsWindow toggleFullScreen:nil]; - } - // If window is maximised - if([(WebviewWindow*)nsWindow isZoomed]) { - [(WebviewWindow*)nsWindow zoom:nil]; - } - // If window in minimised - if([(WebviewWindow*)nsWindow isMiniaturized]) { - [(WebviewWindow*)nsWindow deminiaturize:nil]; - } - }); -} - -// disable window fullscreen button -void setFullscreenButtonEnabled(void* nsWindow, bool enabled) { - // Disable fullscreen button on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // Get window - WebviewWindow* window = (WebviewWindow*)nsWindow; - NSButton *fullscreenButton = [window standardWindowButton:NSWindowZoomButton]; - fullscreenButton.enabled = enabled; - }); -} - -// Set the titlebar style -void windowSetTitleBarAppearsTransparent(void* nsWindow, bool transparent) { - // Set window titlebar style on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - if( transparent ) { - [(WebviewWindow*)nsWindow setTitlebarAppearsTransparent:true]; - } else { - [(WebviewWindow*)nsWindow setTitlebarAppearsTransparent:false]; - } - }); -} - -// Set window fullsize content view -void windowSetFullSizeContent(void* nsWindow, bool fullSize) { - // Set window fullsize content view on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - if( fullSize ) { - [(WebviewWindow*)nsWindow setStyleMask:[(WebviewWindow*)nsWindow styleMask] | NSWindowStyleMaskFullSizeContentView]; - } else { - [(WebviewWindow*)nsWindow setStyleMask:[(WebviewWindow*)nsWindow styleMask] & ~NSWindowStyleMaskFullSizeContentView]; - } - }); -} - -// Set Hide Titlebar -void windowSetHideTitleBar(void* nsWindow, bool hideTitlebar) { - // Set window titlebar hidden on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - if( hideTitlebar ) { - [(WebviewWindow*)nsWindow setStyleMask:[(WebviewWindow*)nsWindow styleMask] & ~NSWindowStyleMaskTitled]; - } else { - [(WebviewWindow*)nsWindow setStyleMask:[(WebviewWindow*)nsWindow styleMask] | NSWindowStyleMaskTitled]; - } - }); -} - -// Set Hide Title in Titlebar -void windowSetHideTitle(void* nsWindow, bool hideTitle) { - // Set window titlebar hidden on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - if( hideTitle ) { - [(WebviewWindow*)nsWindow setTitleVisibility:NSWindowTitleHidden]; - } else { - [(WebviewWindow*)nsWindow setTitleVisibility:NSWindowTitleVisible]; - } - }); -} - -// Set Window use toolbar -void windowSetUseToolbar(void* nsWindow, bool useToolbar, int toolbarStyle) { - // Set window use toolbar on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - if( useToolbar ) { - NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:@"wails.toolbar"]; - [toolbar autorelease]; - [window setToolbar:toolbar]; - - // If macos 11 or higher, set toolbar style - if (@available(macOS 11.0, *)) { - [window setToolbarStyle:toolbarStyle]; - } - - } else { - [window setToolbar:nil]; - } - }); -} - -// Set window toolbar style -void windowSetToolbarStyle(void* nsWindow, int style) { - // use @available to check if the function is available - // if not, return - if (@available(macOS 11.0, *)) { - // Set window toolbar style on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get toolbar - NSToolbar* toolbar = [window toolbar]; - // set toolbar style - [toolbar setShowsBaselineSeparator:style]; - }); - } -} - -// Set Hide Toolbar Separator -void windowSetHideToolbarSeparator(void* nsWindow, bool hideSeparator) { - // Set window hide toolbar separator on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get toolbar - NSToolbar* toolbar = [window toolbar]; - // Return if toolbar nil - if( toolbar == nil ) { - return; - } - if( hideSeparator ) { - [toolbar setShowsBaselineSeparator:false]; - } else { - [toolbar setShowsBaselineSeparator:true]; - } - }); -} - -// Set Window appearance type -void windowSetAppearanceTypeByName(void* nsWindow, const char *appearanceName) { - // Set window appearance type on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // set window appearance type by name - // Convert appearance name to NSString - NSString* appearanceNameString = [NSString stringWithUTF8String:appearanceName]; - // Set appearance - [window setAppearance:[NSAppearance appearanceNamed:appearanceNameString]]; - - free((void*)appearanceName); - }); -} - -// Center window on current monitor -void windowCenter(void* nsWindow) { - // Center window on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - [window center]; - }); -} - -// Get the current size of the window -void windowGetSize(void* nsWindow, int* width, int* height) { - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get window frame - NSRect frame = [window frame]; - // set width and height - *width = frame.size.width; - *height = frame.size.height; -} - -// Get window width -int windowGetWidth(void* nsWindow) { - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get window frame - NSRect frame = [window frame]; - // return width - return frame.size.width; -} - -// Get window height -int windowGetHeight(void* nsWindow) { - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get window frame - NSRect frame = [window frame]; - // return height - return frame.size.height; -} - -// Get window position -void windowGetPosition(void* nsWindow, int* x, int* y) { - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // get window frame - NSRect frame = [window frame]; - // set x and y - *x = frame.origin.x; - *y = frame.origin.y; -} - -// Destroy window -void windowDestroy(void* nsWindow) { - // Destroy window on main thread - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* window = (WebviewWindow*)nsWindow; - // close window - [window close]; - }); -} - - -// windowClose closes the current window -static void windowClose(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // close window - [(WebviewWindow*)window close]; - }); -} - -// windowZoom -static void windowZoom(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // zoom window - [(WebviewWindow*)window zoom:nil]; - }); -} - -// webviewRenderHTML renders the given HTML -static void windowRenderHTML(void *window, const char *html) { - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - // get window delegate - WebviewWindowDelegate* windowDelegate = (WebviewWindowDelegate*)[nsWindow delegate]; - // render html - [nsWindow.webView loadHTMLString:[NSString stringWithUTF8String:html] baseURL:nil]; - }); -} - -static void windowInjectCSS(void *window, const char *css) { - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - // inject css - [nsWindow.webView evaluateJavaScript:[NSString stringWithFormat:@"(function() { var style = document.createElement('style'); style.appendChild(document.createTextNode('%@')); document.head.appendChild(style); })();", [NSString stringWithUTF8String:css]] completionHandler:nil]; - free((void*)css); - }); -} - -static void windowMinimise(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // minimize window - [(WebviewWindow*)window miniaturize:nil]; - }); -} - -// zoom maximizes the window to the screen dimensions -static void windowMaximise(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // maximize window - [(WebviewWindow*)window zoom:nil]; - }); -} - -static bool isFullScreen(void *window) { - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - long mask = [nsWindow styleMask]; - return (mask & NSWindowStyleMaskFullScreen) == NSWindowStyleMaskFullScreen; -} - -// windowSetFullScreen -static void windowSetFullScreen(void *window, bool fullscreen) { - if (isFullScreen(window)) { - return; - } - dispatch_async(dispatch_get_main_queue(), ^{ - WebviewWindow* nsWindow = (WebviewWindow*)window; - windowSetMaxSize(nsWindow, 0, 0); - windowSetMinSize(nsWindow, 0, 0); - [nsWindow toggleFullScreen:nil]; - }); -} - -// windowUnminimise -static void windowUnminimise(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // unminimize window - [(WebviewWindow*)window deminiaturize:nil]; - }); -} - -// windowUnmaximise -static void windowUnmaximise(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // unmaximize window - [(WebviewWindow*)window zoom:nil]; - }); -} - -static void windowDisableSizeConstraints(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - // disable size constraints - [nsWindow setContentMinSize:CGSizeZero]; - [nsWindow setContentMaxSize:CGSizeZero]; - }); -} - -static void windowShow(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - // show window - [(WebviewWindow*)window makeKeyAndOrderFront:nil]; - }); -} - -static void windowHide(void *window) { - dispatch_async(dispatch_get_main_queue(), ^{ - [(WebviewWindow*)window orderOut:nil]; - }); -} - -// windowShowMenu opens an NSMenu at the given coordinates -static void windowShowMenu(void *window, void *menu, int x, int y) { - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - // get menu - NSMenu* nsMenu = (NSMenu*)menu; - // get webview - WKWebView* webView = nsWindow.webView; - NSPoint point = NSMakePoint(x, y); - [nsMenu popUpMenuPositioningItem:nil atLocation:point inView:webView]; - }); -} - - - -// Make the given window frameless -static void windowSetFrameless(void *window, bool frameless) { - dispatch_async(dispatch_get_main_queue(), ^{ - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - // set the window style to be frameless - if (frameless) { - [nsWindow setStyleMask:([nsWindow styleMask] | NSWindowStyleMaskFullSizeContentView)]; - } else { - [nsWindow setStyleMask:([nsWindow styleMask] & ~NSWindowStyleMaskFullSizeContentView)]; - } - }); -} - -*/ -import "C" -import ( - "net/url" - "sync" - "unsafe" - - "github.com/wailsapp/wails/v3/pkg/events" -) - -var showDevTools = func(window unsafe.Pointer) {} - -type macosWebviewWindow struct { - nsWindow unsafe.Pointer - parent *WebviewWindow -} - -func (w *macosWebviewWindow) openContextMenu(menu *Menu, data *ContextMenuData) { - // Create the menu - thisMenu := newMenuImpl(menu) - thisMenu.update() - C.windowShowMenu(w.nsWindow, thisMenu.nsMenu, C.int(data.X), C.int(data.Y)) -} - -func (w *macosWebviewWindow) getZoom() float64 { - return float64(C.windowZoomGet(w.nsWindow)) -} - -func (w *macosWebviewWindow) setZoom(zoom float64) { - C.windowZoomSet(w.nsWindow, C.double(zoom)) -} - -func (w *macosWebviewWindow) setFrameless(frameless bool) { - C.windowSetFrameless(w.nsWindow, C.bool(frameless)) - if frameless { - C.windowSetTitleBarAppearsTransparent(w.nsWindow, C.bool(true)) - C.windowSetHideTitle(w.nsWindow, C.bool(true)) - } else { - macOptions := w.parent.options.Mac - appearsTransparent := macOptions.TitleBar.AppearsTransparent - hideTitle := macOptions.TitleBar.HideTitle - C.windowSetTitleBarAppearsTransparent(w.nsWindow, C.bool(appearsTransparent)) - C.windowSetHideTitle(w.nsWindow, C.bool(hideTitle)) - } -} - -func (w *macosWebviewWindow) getScreen() (*Screen, error) { - return getScreenForWindow(w) -} - -func (w *macosWebviewWindow) show() { - C.windowShow(w.nsWindow) -} - -func (w *macosWebviewWindow) hide() { - C.windowHide(w.nsWindow) -} - -func (w *macosWebviewWindow) setFullscreenButtonEnabled(enabled bool) { - C.setFullscreenButtonEnabled(w.nsWindow, C.bool(enabled)) -} - -func (w *macosWebviewWindow) disableSizeConstraints() { - C.windowDisableSizeConstraints(w.nsWindow) -} - -func (w *macosWebviewWindow) unfullscreen() { - C.windowUnFullscreen(w.nsWindow) -} - -func (w *macosWebviewWindow) fullscreen() { - C.windowFullscreen(w.nsWindow) -} - -func (w *macosWebviewWindow) unminimise() { - C.windowUnminimise(w.nsWindow) -} - -func (w *macosWebviewWindow) unmaximise() { - C.windowUnmaximise(w.nsWindow) -} - -func (w *macosWebviewWindow) maximise() { - C.windowMaximise(w.nsWindow) -} - -func (w *macosWebviewWindow) minimise() { - C.windowMinimise(w.nsWindow) -} - -func (w *macosWebviewWindow) on(eventID uint) { - C.registerListener(C.uint(eventID)) -} - -func (w *macosWebviewWindow) zoom() { - C.windowZoom(w.nsWindow) -} - -func (w *macosWebviewWindow) windowZoom() { - C.windowZoom(w.nsWindow) -} - -func (w *macosWebviewWindow) close() { - C.windowClose(w.nsWindow) - if !w.parent.options.HideOnClose { - globalApplication.deleteWindowByID(w.parent.id) - } -} - -func (w *macosWebviewWindow) zoomIn() { - C.windowZoomIn(w.nsWindow) -} - -func (w *macosWebviewWindow) zoomOut() { - C.windowZoomOut(w.nsWindow) -} - -func (w *macosWebviewWindow) zoomReset() { - C.windowZoomReset(w.nsWindow) -} - -func (w *macosWebviewWindow) toggleDevTools() { - showDevTools(w.nsWindow) -} - -func (w *macosWebviewWindow) reload() { - //TODO: Implement - println("reload called on WebviewWindow", w.parent.id) -} - -func (w *macosWebviewWindow) forceReload() { - //TODO: Implement - println("forceReload called on WebviewWindow", w.parent.id) -} - -func (w *macosWebviewWindow) center() { - C.windowCenter(w.nsWindow) -} - -func (w *macosWebviewWindow) isMinimised() bool { - return w.syncMainThreadReturningBool(func() bool { - return bool(C.windowIsMinimised(w.nsWindow)) - }) -} - -func (w *macosWebviewWindow) isMaximised() bool { - return w.syncMainThreadReturningBool(func() bool { - return bool(C.windowIsMaximised(w.nsWindow)) - }) -} - -func (w *macosWebviewWindow) isFullscreen() bool { - return w.syncMainThreadReturningBool(func() bool { - return bool(C.windowIsFullscreen(w.nsWindow)) - }) -} - -func (w *macosWebviewWindow) syncMainThreadReturningBool(fn func() bool) bool { - var wg sync.WaitGroup - wg.Add(1) - var result bool - globalApplication.dispatchOnMainThread(func() { - result = fn() - wg.Done() - }) - wg.Wait() - return result -} - -func (w *macosWebviewWindow) restore() { - // restore window to normal size - C.windowRestore(w.nsWindow) -} - -func (w *macosWebviewWindow) restoreWindow() { - C.windowRestore(w.nsWindow) -} - -func (w *macosWebviewWindow) execJS(js string) { - C.windowExecJS(w.nsWindow, C.CString(js)) -} - -func (w *macosWebviewWindow) setURL(uri string) { - if uri != "" { - url, err := url.Parse(uri) - if err == nil && url.Scheme == "" && url.Host == "" { - // TODO handle this in a central location, the scheme and host might be platform dependant. - url.Scheme = "wails" - url.Host = "wails" - uri = url.String() - } - } - C.navigationLoadURL(w.nsWindow, C.CString(uri)) -} - -func (w *macosWebviewWindow) setAlwaysOnTop(alwaysOnTop bool) { - C.windowSetAlwaysOnTop(w.nsWindow, C.bool(alwaysOnTop)) -} - -func newWindowImpl(parent *WebviewWindow) *macosWebviewWindow { - result := &macosWebviewWindow{ - parent: parent, - } - return result -} - -func (w *macosWebviewWindow) setTitle(title string) { - if !w.parent.options.Frameless { - cTitle := C.CString(title) - C.windowSetTitle(w.nsWindow, cTitle) - } -} - -func (w *macosWebviewWindow) setSize(width, height int) { - C.windowSetSize(w.nsWindow, C.int(width), C.int(height)) -} - -func (w *macosWebviewWindow) setMinSize(width, height int) { - C.windowSetMinSize(w.nsWindow, C.int(width), C.int(height)) -} -func (w *macosWebviewWindow) setMaxSize(width, height int) { - C.windowSetMaxSize(w.nsWindow, C.int(width), C.int(height)) -} - -func (w *macosWebviewWindow) setResizable(resizable bool) { - C.windowSetResizable(w.nsWindow, C.bool(resizable)) -} -func (w *macosWebviewWindow) enableDevTools() { - C.windowEnableDevTools(w.nsWindow) -} - -func (w *macosWebviewWindow) size() (int, int) { - var width, height C.int - var wg sync.WaitGroup - wg.Add(1) - globalApplication.dispatchOnMainThread(func() { - C.windowGetSize(w.nsWindow, &width, &height) - wg.Done() - }) - wg.Wait() - return int(width), int(height) -} - -func (w *macosWebviewWindow) setPosition(x, y int) { - C.windowSetPosition(w.nsWindow, C.int(x), C.int(y)) -} - -func (w *macosWebviewWindow) width() int { - var width C.int - var wg sync.WaitGroup - wg.Add(1) - globalApplication.dispatchOnMainThread(func() { - width = C.windowGetWidth(w.nsWindow) - wg.Done() - }) - wg.Wait() - return int(width) -} -func (w *macosWebviewWindow) height() int { - var height C.int - var wg sync.WaitGroup - wg.Add(1) - globalApplication.dispatchOnMainThread(func() { - height = C.windowGetHeight(w.nsWindow) - wg.Done() - }) - wg.Wait() - return int(height) -} - -func (w *macosWebviewWindow) run() { - for eventId := range w.parent.eventListeners { - w.on(eventId) - } - globalApplication.dispatchOnMainThread(func() { - w.nsWindow = C.windowNew(C.uint(w.parent.id), - C.int(w.parent.options.Width), - C.int(w.parent.options.Height), - C.bool(w.parent.options.EnableFraudulentWebsiteWarnings), - C.bool(w.parent.options.Frameless), - C.bool(w.parent.options.EnableDragAndDrop), - C.bool(w.parent.options.HideOnClose), - ) - w.setTitle(w.parent.options.Title) - w.setAlwaysOnTop(w.parent.options.AlwaysOnTop) - w.setResizable(!w.parent.options.DisableResize) - if w.parent.options.MinWidth != 0 || w.parent.options.MinHeight != 0 { - w.setMinSize(w.parent.options.MinWidth, w.parent.options.MinHeight) - } - if w.parent.options.MaxWidth != 0 || w.parent.options.MaxHeight != 0 { - w.setMaxSize(w.parent.options.MaxWidth, w.parent.options.MaxHeight) - } - //w.setZoom(w.parent.options.Zoom) - w.enableDevTools() - w.setBackgroundColour(w.parent.options.BackgroundColour) - - macOptions := w.parent.options.Mac - switch macOptions.Backdrop { - case MacBackdropTransparent: - C.windowSetTransparent(w.nsWindow) - C.webviewSetTransparent(w.nsWindow) - case MacBackdropTranslucent: - C.windowSetTranslucent(w.nsWindow) - C.webviewSetTransparent(w.nsWindow) - } - - titleBarOptions := macOptions.TitleBar - if !w.parent.options.Frameless { - C.windowSetTitleBarAppearsTransparent(w.nsWindow, C.bool(titleBarOptions.AppearsTransparent)) - C.windowSetHideTitleBar(w.nsWindow, C.bool(titleBarOptions.Hide)) - C.windowSetHideTitle(w.nsWindow, C.bool(titleBarOptions.HideTitle)) - C.windowSetFullSizeContent(w.nsWindow, C.bool(titleBarOptions.FullSizeContent)) - if titleBarOptions.UseToolbar { - C.windowSetUseToolbar(w.nsWindow, C.bool(titleBarOptions.UseToolbar), C.int(titleBarOptions.ToolbarStyle)) - } - C.windowSetHideToolbarSeparator(w.nsWindow, C.bool(titleBarOptions.HideToolbarSeparator)) - } - if macOptions.Appearance != "" { - C.windowSetAppearanceTypeByName(w.nsWindow, C.CString(string(macOptions.Appearance))) - } - - if macOptions.InvisibleTitleBarHeight != 0 { - C.windowSetInvisibleTitleBar(w.nsWindow, C.uint(macOptions.InvisibleTitleBarHeight)) - } - - switch w.parent.options.StartState { - case WindowStateMaximised: - w.maximise() - case WindowStateMinimised: - w.minimise() - case WindowStateFullscreen: - w.fullscreen() - - } - C.windowCenter(w.nsWindow) - - if w.parent.options.URL != "" { - w.setURL(w.parent.options.URL) - } - // We need to wait for the HTML to load before we can execute the javascript - w.parent.On(events.Mac.WebViewDidFinishNavigation, func(_ *WindowEventContext) { - if w.parent.options.JS != "" { - w.execJS(w.parent.options.JS) - } - if w.parent.options.CSS != "" { - C.windowInjectCSS(w.nsWindow, C.CString(w.parent.options.CSS)) - } - }) - - w.parent.On(events.Mac.WindowWillClose, func(_ *WindowEventContext) { - globalApplication.deleteWindowByID(w.parent.id) - }) - - if w.parent.options.HTML != "" { - w.setHTML(w.parent.options.HTML) - } - if w.parent.options.Hidden == false { - C.windowShow(w.nsWindow) - } - }) -} - -func (w *macosWebviewWindow) setBackgroundColour(colour *RGBA) { - if colour == nil { - return - } - C.windowSetBackgroundColour(w.nsWindow, C.int(colour.Red), C.int(colour.Green), C.int(colour.Blue), C.int(colour.Alpha)) -} - -func (w *macosWebviewWindow) position() (int, int) { - var x, y C.int - var wg sync.WaitGroup - wg.Add(1) - go globalApplication.dispatchOnMainThread(func() { - C.windowGetPosition(w.nsWindow, &x, &y) - wg.Done() - }) - wg.Wait() - return int(x), int(y) -} - -func (w *macosWebviewWindow) destroy() { - C.windowDestroy(w.nsWindow) -} - -func (w *macosWebviewWindow) setHTML(html string) { - // Convert HTML to C string - cHTML := C.CString(html) - // Render HTML - C.windowRenderHTML(w.nsWindow, cHTML) -} diff --git a/v3/pkg/application/webview_window_devtools.go b/v3/pkg/application/webview_window_devtools.go deleted file mode 100644 index 7dce43c52..000000000 --- a/v3/pkg/application/webview_window_devtools.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build darwin && !production - -package application - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa - -#import - -#include "webview_window.h" - -@interface _WKInspector : NSObject -- (void)show; -- (void)detach; -@end - -@interface WKWebView () -- (_WKInspector *)_inspector; -@end - -void showDevTools(void *window) { - // get main window - WebviewWindow* nsWindow = (WebviewWindow*)window; - dispatch_async(dispatch_get_main_queue(), ^{ - [nsWindow.webView._inspector show]; - }); -} - -*/ -import "C" -import "unsafe" - -func init() { - showDevTools = func(window unsafe.Pointer) { - C.showDevTools(window) - } -} diff --git a/v3/pkg/events/events.go b/v3/pkg/events/events.go deleted file mode 100644 index f26f53b2e..000000000 --- a/v3/pkg/events/events.go +++ /dev/null @@ -1,262 +0,0 @@ -package events - -type ApplicationEventType uint -type WindowEventType uint - -const ( - FilesDropped WindowEventType = iota -) - -var Mac = newMacEvents() - -type macEvents struct { - ApplicationDidBecomeActive ApplicationEventType - ApplicationDidChangeBackingProperties ApplicationEventType - ApplicationDidChangeEffectiveAppearance ApplicationEventType - ApplicationDidChangeIcon ApplicationEventType - ApplicationDidChangeOcclusionState ApplicationEventType - ApplicationDidChangeScreenParameters ApplicationEventType - ApplicationDidChangeStatusBarFrame ApplicationEventType - ApplicationDidChangeStatusBarOrientation ApplicationEventType - ApplicationDidFinishLaunching ApplicationEventType - ApplicationDidHide ApplicationEventType - ApplicationDidResignActive ApplicationEventType - ApplicationDidUnhide ApplicationEventType - ApplicationDidUpdate ApplicationEventType - ApplicationWillBecomeActive ApplicationEventType - ApplicationWillFinishLaunching ApplicationEventType - ApplicationWillHide ApplicationEventType - ApplicationWillResignActive ApplicationEventType - ApplicationWillTerminate ApplicationEventType - ApplicationWillUnhide ApplicationEventType - ApplicationWillUpdate ApplicationEventType - WindowDidBecomeKey WindowEventType - WindowDidBecomeMain WindowEventType - WindowDidBeginSheet WindowEventType - WindowDidChangeAlpha WindowEventType - WindowDidChangeBackingLocation WindowEventType - WindowDidChangeBackingProperties WindowEventType - WindowDidChangeCollectionBehavior WindowEventType - WindowDidChangeEffectiveAppearance WindowEventType - WindowDidChangeOcclusionState WindowEventType - WindowDidChangeOrderingMode WindowEventType - WindowDidChangeScreen WindowEventType - WindowDidChangeScreenParameters WindowEventType - WindowDidChangeScreenProfile WindowEventType - WindowDidChangeScreenSpace WindowEventType - WindowDidChangeScreenSpaceProperties WindowEventType - WindowDidChangeSharingType WindowEventType - WindowDidChangeSpace WindowEventType - WindowDidChangeSpaceOrderingMode WindowEventType - WindowDidChangeTitle WindowEventType - WindowDidChangeToolbar WindowEventType - WindowDidChangeVisibility WindowEventType - WindowDidDeminiaturize WindowEventType - WindowDidEndSheet WindowEventType - WindowDidEnterFullScreen WindowEventType - WindowDidEnterVersionBrowser WindowEventType - WindowDidExitFullScreen WindowEventType - WindowDidExitVersionBrowser WindowEventType - WindowDidExpose WindowEventType - WindowDidFocus WindowEventType - WindowDidMiniaturize WindowEventType - WindowDidMove WindowEventType - WindowDidOrderOffScreen WindowEventType - WindowDidOrderOnScreen WindowEventType - WindowDidResignKey WindowEventType - WindowDidResignMain WindowEventType - WindowDidResize WindowEventType - WindowDidUnfocus WindowEventType - WindowDidUpdate WindowEventType - WindowDidUpdateAlpha WindowEventType - WindowDidUpdateCollectionBehavior WindowEventType - WindowDidUpdateCollectionProperties WindowEventType - WindowDidUpdateShadow WindowEventType - WindowDidUpdateTitle WindowEventType - WindowDidUpdateToolbar WindowEventType - WindowDidUpdateVisibility WindowEventType - WindowWillBecomeKey WindowEventType - WindowWillBecomeMain WindowEventType - WindowWillBeginSheet WindowEventType - WindowWillChangeOrderingMode WindowEventType - WindowWillClose WindowEventType - WindowWillDeminiaturize WindowEventType - WindowWillEnterFullScreen WindowEventType - WindowWillEnterVersionBrowser WindowEventType - WindowWillExitFullScreen WindowEventType - WindowWillExitVersionBrowser WindowEventType - WindowWillFocus WindowEventType - WindowWillMiniaturize WindowEventType - WindowWillMove WindowEventType - WindowWillOrderOffScreen WindowEventType - WindowWillOrderOnScreen WindowEventType - WindowWillResignMain WindowEventType - WindowWillResize WindowEventType - WindowWillUnfocus WindowEventType - WindowWillUpdate WindowEventType - WindowWillUpdateAlpha WindowEventType - WindowWillUpdateCollectionBehavior WindowEventType - WindowWillUpdateCollectionProperties WindowEventType - WindowWillUpdateShadow WindowEventType - WindowWillUpdateTitle WindowEventType - WindowWillUpdateToolbar WindowEventType - WindowWillUpdateVisibility WindowEventType - WindowWillUseStandardFrame WindowEventType - MenuWillOpen ApplicationEventType - MenuDidOpen ApplicationEventType - MenuDidClose ApplicationEventType - MenuWillSendAction ApplicationEventType - MenuDidSendAction ApplicationEventType - MenuWillHighlightItem ApplicationEventType - MenuDidHighlightItem ApplicationEventType - MenuWillDisplayItem ApplicationEventType - MenuDidDisplayItem ApplicationEventType - MenuWillAddItem ApplicationEventType - MenuDidAddItem ApplicationEventType - MenuWillRemoveItem ApplicationEventType - MenuDidRemoveItem ApplicationEventType - MenuWillBeginTracking ApplicationEventType - MenuDidBeginTracking ApplicationEventType - MenuWillEndTracking ApplicationEventType - MenuDidEndTracking ApplicationEventType - MenuWillUpdate ApplicationEventType - MenuDidUpdate ApplicationEventType - MenuWillPopUp ApplicationEventType - MenuDidPopUp ApplicationEventType - MenuWillSendActionToItem ApplicationEventType - MenuDidSendActionToItem ApplicationEventType - WebViewDidStartProvisionalNavigation WindowEventType - WebViewDidReceiveServerRedirectForProvisionalNavigation WindowEventType - WebViewDidFinishNavigation WindowEventType - WebViewDidCommitNavigation WindowEventType - WindowFileDraggingEntered WindowEventType - WindowFileDraggingPerformed WindowEventType - WindowFileDraggingExited WindowEventType -} - -func newMacEvents() macEvents { - return macEvents{ - ApplicationDidBecomeActive: 1024, - ApplicationDidChangeBackingProperties: 1025, - ApplicationDidChangeEffectiveAppearance: 1026, - ApplicationDidChangeIcon: 1027, - ApplicationDidChangeOcclusionState: 1028, - ApplicationDidChangeScreenParameters: 1029, - ApplicationDidChangeStatusBarFrame: 1030, - ApplicationDidChangeStatusBarOrientation: 1031, - ApplicationDidFinishLaunching: 1032, - ApplicationDidHide: 1033, - ApplicationDidResignActive: 1034, - ApplicationDidUnhide: 1035, - ApplicationDidUpdate: 1036, - ApplicationWillBecomeActive: 1037, - ApplicationWillFinishLaunching: 1038, - ApplicationWillHide: 1039, - ApplicationWillResignActive: 1040, - ApplicationWillTerminate: 1041, - ApplicationWillUnhide: 1042, - ApplicationWillUpdate: 1043, - WindowDidBecomeKey: 1044, - WindowDidBecomeMain: 1045, - WindowDidBeginSheet: 1046, - WindowDidChangeAlpha: 1047, - WindowDidChangeBackingLocation: 1048, - WindowDidChangeBackingProperties: 1049, - WindowDidChangeCollectionBehavior: 1050, - WindowDidChangeEffectiveAppearance: 1051, - WindowDidChangeOcclusionState: 1052, - WindowDidChangeOrderingMode: 1053, - WindowDidChangeScreen: 1054, - WindowDidChangeScreenParameters: 1055, - WindowDidChangeScreenProfile: 1056, - WindowDidChangeScreenSpace: 1057, - WindowDidChangeScreenSpaceProperties: 1058, - WindowDidChangeSharingType: 1059, - WindowDidChangeSpace: 1060, - WindowDidChangeSpaceOrderingMode: 1061, - WindowDidChangeTitle: 1062, - WindowDidChangeToolbar: 1063, - WindowDidChangeVisibility: 1064, - WindowDidDeminiaturize: 1065, - WindowDidEndSheet: 1066, - WindowDidEnterFullScreen: 1067, - WindowDidEnterVersionBrowser: 1068, - WindowDidExitFullScreen: 1069, - WindowDidExitVersionBrowser: 1070, - WindowDidExpose: 1071, - WindowDidFocus: 1072, - WindowDidMiniaturize: 1073, - WindowDidMove: 1074, - WindowDidOrderOffScreen: 1075, - WindowDidOrderOnScreen: 1076, - WindowDidResignKey: 1077, - WindowDidResignMain: 1078, - WindowDidResize: 1079, - WindowDidUnfocus: 1080, - WindowDidUpdate: 1081, - WindowDidUpdateAlpha: 1082, - WindowDidUpdateCollectionBehavior: 1083, - WindowDidUpdateCollectionProperties: 1084, - WindowDidUpdateShadow: 1085, - WindowDidUpdateTitle: 1086, - WindowDidUpdateToolbar: 1087, - WindowDidUpdateVisibility: 1088, - WindowWillBecomeKey: 1089, - WindowWillBecomeMain: 1090, - WindowWillBeginSheet: 1091, - WindowWillChangeOrderingMode: 1092, - WindowWillClose: 1093, - WindowWillDeminiaturize: 1094, - WindowWillEnterFullScreen: 1095, - WindowWillEnterVersionBrowser: 1096, - WindowWillExitFullScreen: 1097, - WindowWillExitVersionBrowser: 1098, - WindowWillFocus: 1099, - WindowWillMiniaturize: 1100, - WindowWillMove: 1101, - WindowWillOrderOffScreen: 1102, - WindowWillOrderOnScreen: 1103, - WindowWillResignMain: 1104, - WindowWillResize: 1105, - WindowWillUnfocus: 1106, - WindowWillUpdate: 1107, - WindowWillUpdateAlpha: 1108, - WindowWillUpdateCollectionBehavior: 1109, - WindowWillUpdateCollectionProperties: 1110, - WindowWillUpdateShadow: 1111, - WindowWillUpdateTitle: 1112, - WindowWillUpdateToolbar: 1113, - WindowWillUpdateVisibility: 1114, - WindowWillUseStandardFrame: 1115, - MenuWillOpen: 1116, - MenuDidOpen: 1117, - MenuDidClose: 1118, - MenuWillSendAction: 1119, - MenuDidSendAction: 1120, - MenuWillHighlightItem: 1121, - MenuDidHighlightItem: 1122, - MenuWillDisplayItem: 1123, - MenuDidDisplayItem: 1124, - MenuWillAddItem: 1125, - MenuDidAddItem: 1126, - MenuWillRemoveItem: 1127, - MenuDidRemoveItem: 1128, - MenuWillBeginTracking: 1129, - MenuDidBeginTracking: 1130, - MenuWillEndTracking: 1131, - MenuDidEndTracking: 1132, - MenuWillUpdate: 1133, - MenuDidUpdate: 1134, - MenuWillPopUp: 1135, - MenuDidPopUp: 1136, - MenuWillSendActionToItem: 1137, - MenuDidSendActionToItem: 1138, - WebViewDidStartProvisionalNavigation: 1139, - WebViewDidReceiveServerRedirectForProvisionalNavigation: 1140, - WebViewDidFinishNavigation: 1141, - WebViewDidCommitNavigation: 1142, - WindowFileDraggingEntered: 1143, - WindowFileDraggingPerformed: 1144, - WindowFileDraggingExited: 1145, - } -} diff --git a/v3/pkg/events/events.h b/v3/pkg/events/events.h deleted file mode 100644 index 67cbdbef5..000000000 --- a/v3/pkg/events/events.h +++ /dev/null @@ -1,135 +0,0 @@ -//go:build darwin - -#ifndef _events_h -#define _events_h - -extern void processApplicationEvent(unsigned int); -extern void processWindowEvent(unsigned int, unsigned int); - -#define EventApplicationDidBecomeActive 1024 -#define EventApplicationDidChangeBackingProperties 1025 -#define EventApplicationDidChangeEffectiveAppearance 1026 -#define EventApplicationDidChangeIcon 1027 -#define EventApplicationDidChangeOcclusionState 1028 -#define EventApplicationDidChangeScreenParameters 1029 -#define EventApplicationDidChangeStatusBarFrame 1030 -#define EventApplicationDidChangeStatusBarOrientation 1031 -#define EventApplicationDidFinishLaunching 1032 -#define EventApplicationDidHide 1033 -#define EventApplicationDidResignActive 1034 -#define EventApplicationDidUnhide 1035 -#define EventApplicationDidUpdate 1036 -#define EventApplicationWillBecomeActive 1037 -#define EventApplicationWillFinishLaunching 1038 -#define EventApplicationWillHide 1039 -#define EventApplicationWillResignActive 1040 -#define EventApplicationWillTerminate 1041 -#define EventApplicationWillUnhide 1042 -#define EventApplicationWillUpdate 1043 -#define EventWindowDidBecomeKey 1044 -#define EventWindowDidBecomeMain 1045 -#define EventWindowDidBeginSheet 1046 -#define EventWindowDidChangeAlpha 1047 -#define EventWindowDidChangeBackingLocation 1048 -#define EventWindowDidChangeBackingProperties 1049 -#define EventWindowDidChangeCollectionBehavior 1050 -#define EventWindowDidChangeEffectiveAppearance 1051 -#define EventWindowDidChangeOcclusionState 1052 -#define EventWindowDidChangeOrderingMode 1053 -#define EventWindowDidChangeScreen 1054 -#define EventWindowDidChangeScreenParameters 1055 -#define EventWindowDidChangeScreenProfile 1056 -#define EventWindowDidChangeScreenSpace 1057 -#define EventWindowDidChangeScreenSpaceProperties 1058 -#define EventWindowDidChangeSharingType 1059 -#define EventWindowDidChangeSpace 1060 -#define EventWindowDidChangeSpaceOrderingMode 1061 -#define EventWindowDidChangeTitle 1062 -#define EventWindowDidChangeToolbar 1063 -#define EventWindowDidChangeVisibility 1064 -#define EventWindowDidDeminiaturize 1065 -#define EventWindowDidEndSheet 1066 -#define EventWindowDidEnterFullScreen 1067 -#define EventWindowDidEnterVersionBrowser 1068 -#define EventWindowDidExitFullScreen 1069 -#define EventWindowDidExitVersionBrowser 1070 -#define EventWindowDidExpose 1071 -#define EventWindowDidFocus 1072 -#define EventWindowDidMiniaturize 1073 -#define EventWindowDidMove 1074 -#define EventWindowDidOrderOffScreen 1075 -#define EventWindowDidOrderOnScreen 1076 -#define EventWindowDidResignKey 1077 -#define EventWindowDidResignMain 1078 -#define EventWindowDidResize 1079 -#define EventWindowDidUnfocus 1080 -#define EventWindowDidUpdate 1081 -#define EventWindowDidUpdateAlpha 1082 -#define EventWindowDidUpdateCollectionBehavior 1083 -#define EventWindowDidUpdateCollectionProperties 1084 -#define EventWindowDidUpdateShadow 1085 -#define EventWindowDidUpdateTitle 1086 -#define EventWindowDidUpdateToolbar 1087 -#define EventWindowDidUpdateVisibility 1088 -#define EventWindowWillBecomeKey 1089 -#define EventWindowWillBecomeMain 1090 -#define EventWindowWillBeginSheet 1091 -#define EventWindowWillChangeOrderingMode 1092 -#define EventWindowWillClose 1093 -#define EventWindowWillDeminiaturize 1094 -#define EventWindowWillEnterFullScreen 1095 -#define EventWindowWillEnterVersionBrowser 1096 -#define EventWindowWillExitFullScreen 1097 -#define EventWindowWillExitVersionBrowser 1098 -#define EventWindowWillFocus 1099 -#define EventWindowWillMiniaturize 1100 -#define EventWindowWillMove 1101 -#define EventWindowWillOrderOffScreen 1102 -#define EventWindowWillOrderOnScreen 1103 -#define EventWindowWillResignMain 1104 -#define EventWindowWillResize 1105 -#define EventWindowWillUnfocus 1106 -#define EventWindowWillUpdate 1107 -#define EventWindowWillUpdateAlpha 1108 -#define EventWindowWillUpdateCollectionBehavior 1109 -#define EventWindowWillUpdateCollectionProperties 1110 -#define EventWindowWillUpdateShadow 1111 -#define EventWindowWillUpdateTitle 1112 -#define EventWindowWillUpdateToolbar 1113 -#define EventWindowWillUpdateVisibility 1114 -#define EventWindowWillUseStandardFrame 1115 -#define EventMenuWillOpen 1116 -#define EventMenuDidOpen 1117 -#define EventMenuDidClose 1118 -#define EventMenuWillSendAction 1119 -#define EventMenuDidSendAction 1120 -#define EventMenuWillHighlightItem 1121 -#define EventMenuDidHighlightItem 1122 -#define EventMenuWillDisplayItem 1123 -#define EventMenuDidDisplayItem 1124 -#define EventMenuWillAddItem 1125 -#define EventMenuDidAddItem 1126 -#define EventMenuWillRemoveItem 1127 -#define EventMenuDidRemoveItem 1128 -#define EventMenuWillBeginTracking 1129 -#define EventMenuDidBeginTracking 1130 -#define EventMenuWillEndTracking 1131 -#define EventMenuDidEndTracking 1132 -#define EventMenuWillUpdate 1133 -#define EventMenuDidUpdate 1134 -#define EventMenuWillPopUp 1135 -#define EventMenuDidPopUp 1136 -#define EventMenuWillSendActionToItem 1137 -#define EventMenuDidSendActionToItem 1138 -#define EventWebViewDidStartProvisionalNavigation 1139 -#define EventWebViewDidReceiveServerRedirectForProvisionalNavigation 1140 -#define EventWebViewDidFinishNavigation 1141 -#define EventWebViewDidCommitNavigation 1142 -#define EventWindowFileDraggingEntered 1143 -#define EventWindowFileDraggingPerformed 1144 -#define EventWindowFileDraggingExited 1145 - -#define MAX_EVENTS 1146 - - -#endif \ No newline at end of file diff --git a/v3/pkg/events/events.txt b/v3/pkg/events/events.txt deleted file mode 100644 index dbbe98db4..000000000 --- a/v3/pkg/events/events.txt +++ /dev/null @@ -1,123 +0,0 @@ -mac:ApplicationDidBecomeActive -mac:ApplicationDidChangeBackingProperties -mac:ApplicationDidChangeEffectiveAppearance -mac:ApplicationDidChangeIcon -mac:ApplicationDidChangeOcclusionState -mac:ApplicationDidChangeScreenParameters -mac:ApplicationDidChangeStatusBarFrame -mac:ApplicationDidChangeStatusBarOrientation -mac:ApplicationDidFinishLaunching -mac:ApplicationDidHide -mac:ApplicationDidResignActive -mac:ApplicationDidUnhide -mac:ApplicationDidUpdate -mac:ApplicationWillBecomeActive -mac:ApplicationWillFinishLaunching -mac:ApplicationWillHide -mac:ApplicationWillResignActive -mac:ApplicationWillTerminate -mac:ApplicationWillUnhide -mac:ApplicationWillUpdate -mac:WindowDidBecomeKey -mac:WindowDidBecomeMain -mac:WindowDidBeginSheet -mac:WindowDidChangeAlpha -mac:WindowDidChangeBackingLocation -mac:WindowDidChangeBackingProperties -mac:WindowDidChangeCollectionBehavior -mac:WindowDidChangeEffectiveAppearance -mac:WindowDidChangeOcclusionState -mac:WindowDidChangeOrderingMode -mac:WindowDidChangeScreen -mac:WindowDidChangeScreenParameters -mac:WindowDidChangeScreenProfile -mac:WindowDidChangeScreenSpace -mac:WindowDidChangeScreenSpaceProperties -mac:WindowDidChangeSharingType -mac:WindowDidChangeSpace -mac:WindowDidChangeSpaceOrderingMode -mac:WindowDidChangeTitle -mac:WindowDidChangeToolbar -mac:WindowDidChangeVisibility -mac:WindowDidDeminiaturize -mac:WindowDidEndSheet -mac:WindowDidEnterFullScreen -mac:WindowDidEnterVersionBrowser -mac:WindowDidExitFullScreen -mac:WindowDidExitVersionBrowser -mac:WindowDidExpose -mac:WindowDidFocus -mac:WindowDidMiniaturize -mac:WindowDidMove -mac:WindowDidOrderOffScreen -mac:WindowDidOrderOnScreen -mac:WindowDidResignKey -mac:WindowDidResignMain -mac:WindowDidResize -mac:WindowDidUnfocus -mac:WindowDidUpdate -mac:WindowDidUpdateAlpha -mac:WindowDidUpdateCollectionBehavior -mac:WindowDidUpdateCollectionProperties -mac:WindowDidUpdateShadow -mac:WindowDidUpdateTitle -mac:WindowDidUpdateToolbar -mac:WindowDidUpdateVisibility -mac:WindowWillBecomeKey -mac:WindowWillBecomeMain -mac:WindowWillBeginSheet -mac:WindowWillChangeOrderingMode -mac:WindowWillClose -mac:WindowWillDeminiaturize -mac:WindowWillEnterFullScreen -mac:WindowWillEnterVersionBrowser -mac:WindowWillExitFullScreen -mac:WindowWillExitVersionBrowser -mac:WindowWillFocus -mac:WindowWillMiniaturize -mac:WindowWillMove -mac:WindowWillOrderOffScreen -mac:WindowWillOrderOnScreen -mac:WindowWillResignMain -mac:WindowWillResize -mac:WindowWillUnfocus -mac:WindowWillUpdate -mac:WindowWillUpdateAlpha -mac:WindowWillUpdateCollectionBehavior -mac:WindowWillUpdateCollectionProperties -mac:WindowWillUpdateShadow -mac:WindowWillUpdateTitle -mac:WindowWillUpdateToolbar -mac:WindowWillUpdateVisibility -mac:WindowWillUseStandardFrame -mac:MenuWillOpen -mac:MenuDidOpen -mac:MenuDidClose -mac:MenuWillSendAction -mac:MenuDidSendAction -mac:MenuWillHighlightItem -mac:MenuDidHighlightItem -mac:MenuWillDisplayItem -mac:MenuDidDisplayItem -mac:MenuWillAddItem -mac:MenuDidAddItem -mac:MenuWillRemoveItem -mac:MenuDidRemoveItem -mac:MenuWillBeginTracking -mac:MenuDidBeginTracking -mac:MenuWillEndTracking -mac:MenuDidEndTracking -mac:MenuWillUpdate -mac:MenuDidUpdate -mac:MenuWillPopUp -mac:MenuDidPopUp -mac:MenuWillSendActionToItem -mac:MenuDidSendActionToItem -mac:WebViewDidStartProvisionalNavigation -mac:WebViewDidReceiveServerRedirectForProvisionalNavigation -mac:WebViewDidFinishNavigation -mac:WebViewDidCommitNavigation -mac:WindowFileDraggingEntered -mac:WindowFileDraggingPerformed -mac:WindowFileDraggingExited - diff --git a/v3/pkg/events/events_darwin.go b/v3/pkg/events/events_darwin.go deleted file mode 100644 index 12a7c3af4..000000000 --- a/v3/pkg/events/events_darwin.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build darwin - -package events - -/* -#cgo CFLAGS: -x objective-c -#cgo LDFLAGS: -framework Cocoa -mmacosx-version-min=10.13 - -#include "events.h" -#include -#include - -#include "events.h" - -bool hasListener[MAX_EVENTS] = {false}; - -void registerListener(unsigned int event) { - hasListener[event] = true; -} - -bool hasListeners(unsigned int event) { - return hasListener[event]; -} - -*/ -import "C" diff --git a/v3/pkg/logger/log.go b/v3/pkg/logger/log.go deleted file mode 100644 index 75024d49d..000000000 --- a/v3/pkg/logger/log.go +++ /dev/null @@ -1,35 +0,0 @@ -package logger - -import ( - "fmt" -) - -type Logger struct { - output []Output -} - -func New(outputs ...Output) *Logger { - result := &Logger{} - if outputs != nil { - result.output = outputs - } - return result -} - -func (l *Logger) AddOutput(output Output) { - l.output = append(l.output, output) -} - -func (l *Logger) Log(message *Message) { - for _, o := range l.output { - go o.Log(message) - } -} - -func (l *Logger) Flush() { - for _, o := range l.output { - if err := o.Flush(); err != nil { - fmt.Printf("Error flushing '%s' Logger: %s\n", o.Name(), err.Error()) - } - } -} diff --git a/v3/pkg/logger/log_console.go b/v3/pkg/logger/log_console.go deleted file mode 100644 index abaafcb36..000000000 --- a/v3/pkg/logger/log_console.go +++ /dev/null @@ -1,27 +0,0 @@ -package logger - -import "fmt" - -type Console struct{} - -func (l *Console) Name() string { - return "Console" -} - -func (l *Console) Log(message *Message) { - msg := fmt.Sprintf(message.Message+"\n", message.Data...) - level := "" - if message.Level != "" { - level = fmt.Sprintf("[%s] ", message.Level) - } - sender := "" - if message.Sender != "" { - sender = fmt.Sprintf("%s: ", message.Sender) - } - - fmt.Printf("%s%s%s", level, sender, msg) -} - -func (l *Console) Flush() error { - return nil -} diff --git a/v3/pkg/logger/message.go b/v3/pkg/logger/message.go deleted file mode 100644 index a60ac8965..000000000 --- a/v3/pkg/logger/message.go +++ /dev/null @@ -1,11 +0,0 @@ -package logger - -import "time" - -type Message struct { - Level string `json:"log"` - Message string `json:"message"` - Data []any `json:"data,omitempty"` - Sender string `json:"-"` - Time time.Time `json:"-"` -} diff --git a/v3/pkg/logger/output.go b/v3/pkg/logger/output.go deleted file mode 100644 index 65b359c70..000000000 --- a/v3/pkg/logger/output.go +++ /dev/null @@ -1,7 +0,0 @@ -package logger - -type Output interface { - Name() string - Log(message *Message) - Flush() error -} diff --git a/v3/pkg/mac/mac.go b/v3/pkg/mac/mac.go deleted file mode 100644 index 73e0258b0..000000000 --- a/v3/pkg/mac/mac.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build darwin - -// Package mac provides a set of functions to interact with the macOS platform. -package mac - -/* -#cgo CFLAGS: -x objective-c -#cgo LDFLAGS: -framework Foundation -framework ServiceManagement - -#import -#import - -// Get the bundle ID -char* getBundleID() { - NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier]; - return (char*)[bundleID UTF8String]; -} -*/ -import "C" - -// GetBundleID returns the bundle ID of the application. -func GetBundleID() string { - return C.GoString(C.getBundleID()) -} diff --git a/v3/plugins/browser/README.md b/v3/plugins/browser/README.md deleted file mode 100644 index f5103d33b..000000000 --- a/v3/plugins/browser/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Browser Plugin - -This plugin provides the ability to open a URL or local file in the default browser. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go -package main - -import ( - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/plugins/browser" -) - -func main() { - browserPlugin := browser.NewPlugin() - app := application.New(application.Options{ - // ... - Plugins: map[string]application.Plugin{ - "browser": browserPlugin, - }, - }) -``` - -## Usage - -### Go - -You can call the methods exported by the plugin directly: - -```go - browserPlugin.OpenURL("https://www.google.com") - // or - browserPlugin.OpenFile("/path/to/file") -``` - -### Javascript - -You can call the methods from the frontend using the Plugin method: - -```js - wails.Plugin("browser","OpenURL","https://www.google.com") - // or - wails.Plugin("browser","OpenFile","/path/to/file") -``` - -## Support - -If you find a bug in this plugin, please raise a ticket on the Wails [Issue Tracker](https://github.com/wailsapp/wails/issues). diff --git a/v3/plugins/browser/plugin.go b/v3/plugins/browser/plugin.go deleted file mode 100644 index 85925cd70..000000000 --- a/v3/plugins/browser/plugin.go +++ /dev/null @@ -1,48 +0,0 @@ -package browser - -import ( - "github.com/pkg/browser" - "github.com/wailsapp/wails/v3/pkg/application" -) - -// ---------------- Plugin Setup ---------------- -// This is the main plugin struct. It can be named anything you like. -// It must implement the application.Plugin interface. -// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. - -type Plugin struct{} - -func NewPlugin() *Plugin { - return &Plugin{} -} - -func (p *Plugin) Shutdown() {} - -func (p *Plugin) Name() string { - return "github.com/wailsapp/wails/v3/plugins/browser" -} - -func (p *Plugin) Init(_ *application.App) error { - return nil -} - -func (p *Plugin) CallableByJS() []string { - return []string{ - "OpenURL", - "OpenFile", - } -} - -func (p *Plugin) InjectJS() string { - return "" -} - -// ---------------- Plugin Methods ---------------- - -func (p *Plugin) OpenURL(url string) error { - return browser.OpenURL(url) -} - -func (p *Plugin) OpenFile(path string) error { - return browser.OpenFile(path) -} diff --git a/v3/plugins/browser/plugin.js b/v3/plugins/browser/plugin.js deleted file mode 100644 index d2f304fa3..000000000 --- a/v3/plugins/browser/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ - -/** - * Opens the given URL in the default browser. - * @param url {string} - The URL to open. - * @returns {Promise} - */ -function OpenURL(url) { - return wails.Plugin("browser", "OpenURL", url); -} - -/** - * Opens the given filename in the default browser. - * @param filename {string} - The file to open. - * @returns {Promise} - */ -function OpenFile(filename) { - return wails.Plugin("browser", "OpenFile", filename); -} - -export default { - Browser: { - OpenURL, - OpenFile, - } -}; diff --git a/v3/plugins/browser/plugin.toml b/v3/plugins/browser/plugin.toml deleted file mode 100644 index 47e547389..000000000 --- a/v3/plugins/browser/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "browser" plugin. - -Name = "browser" -Description = "Opens URLs and files in the default browser." -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io" -Repository = "https://github.com/wailsapp/wails/v3/plugins/browser" -License = "MIT" - - diff --git a/v3/plugins/kvstore/README.md b/v3/plugins/kvstore/README.md deleted file mode 100644 index bb6dd0f07..000000000 --- a/v3/plugins/kvstore/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# KVStore Plugin - -This plugin provides a simple key/value store for your Wails applications. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go -package main - -import ( - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/plugins/kvstore" -) - -func main() { - kvstorePlugin := kvstore.NewPlugin(&kvstore.Config{ - Filename: "myapp.db", - }) - app := application.New(application.Options{ - // ... - Plugins: map[string]application.Plugin{ - "kvstore": kvstorePlugin, - }, - }) - -``` - -## Usage - -### Go - -You can call the methods exported by the plugin directly: - -```go - err := kvstore.Set("url", "https://www.google.com") - if err != nil { - // handle error - } - url := kvstore.Get("url").(string) - - // If you have not enables AutoSave, you will need to call Save() to persist the changes - err = kvstore.Save() - if err != nil { - // handle error - } -``` - -### Javascript - -You can call the methods from the frontend using the Plugin method: - -```js - wails.Plugin("kvstore","Set", "url", "https://www.google.com") - wails.Plugin("kvstore","Get", "url").then((url) => { - - }) - - // or - wails.Plugin("browser","OpenFile","/path/to/file") -``` - -## Support - -If you find a bug in this plugin, please raise a ticket on the Wails [Issue Tracker](https://github.com/wailsapp/wails/issues). diff --git a/v3/plugins/kvstore/kvstore.go b/v3/plugins/kvstore/kvstore.go deleted file mode 100644 index 2fb9d49f2..000000000 --- a/v3/plugins/kvstore/kvstore.go +++ /dev/null @@ -1,171 +0,0 @@ -package kvstore - -import ( - "encoding/json" - "io" - "os" - "sync" - - "github.com/wailsapp/wails/v3/pkg/application" - "github.com/wailsapp/wails/v3/pkg/logger" -) - -type KeyValueStore struct { - config *Config - filename string - data map[string]any - unsaved bool - lock sync.RWMutex - app *application.App -} - -func (kvs *KeyValueStore) InjectJS() string { - return "" -} - -type Config struct { - Filename string - AutoSave bool -} - -type Plugin struct{} - -func NewPlugin(config *Config) *KeyValueStore { - return &KeyValueStore{ - config: config, - data: make(map[string]any), - } -} - -// Shutdown will save the store to disk if there are unsaved changes. -func (kvs *KeyValueStore) Shutdown() { - if kvs.unsaved { - err := kvs.Save() - if err != nil { - println("Error saving store: " + err.Error()) - } - } -} - -// Name returns the name of the plugin. -func (kvs *KeyValueStore) Name() string { - return "github.com/wailsapp/wails/v3/plugins/kvstore" -} - -// Init is called when the plugin is loaded. It is passed the application.App -// instance. This is where you should do any setup. -func (kvs *KeyValueStore) Init(app *application.App) error { - kvs.app = app - err := kvs.open(kvs.config.Filename) - if err != nil { - return err - } - - return nil -} - -func (kvs *KeyValueStore) CallableByJS() []string { - return []string{ - "Set", - "Get", - "Save", - } -} - -func (p *Plugin) InjectJS() string { - return "" -} - -// ---------------- Plugin Methods ---------------- - -func (kvs *KeyValueStore) open(filename string) (err error) { - kvs.filename = filename - kvs.data = make(map[string]any) - - file, err := os.Open(filename) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - defer func() { - err2 := file.Close() - if err2 != nil { - if err == nil { - err = err2 - } else { - kvs.app.Log(&logger.Message{ - Level: "error", - Message: err.Error(), - }) - } - } - }() - - bytes, err := io.ReadAll(file) - if err != nil { - return err - } - - if len(bytes) > 0 { - if err := json.Unmarshal(bytes, &kvs.data); err != nil { - return err - } - } - - return nil -} - -// Save saves the store to disk -func (kvs *KeyValueStore) Save() error { - kvs.lock.Lock() - defer kvs.lock.Unlock() - - bytes, err := json.Marshal(kvs.data) - if err != nil { - return err - } - - err = os.WriteFile(kvs.filename, bytes, 0644) - if err != nil { - return err - } - - kvs.unsaved = false - - return nil -} - -// Get returns the value for the given key. If key is empty, the entire store is returned. -func (kvs *KeyValueStore) Get(key string) any { - kvs.lock.RLock() - defer kvs.lock.RUnlock() - - if key == "" { - return kvs.data - } - - return kvs.data[key] -} - -// Set sets the value for the given key. If AutoSave is true, the store is saved to disk. -func (kvs *KeyValueStore) Set(key string, value any) error { - kvs.lock.Lock() - if value == nil { - delete(kvs.data, key) - } else { - kvs.data[key] = value - } - kvs.lock.Unlock() - if kvs.config.AutoSave { - err := kvs.Save() - if err != nil { - return err - } - kvs.unsaved = false - } else { - kvs.unsaved = true - } - return nil -} diff --git a/v3/plugins/kvstore/plugin.js b/v3/plugins/kvstore/plugin.js deleted file mode 100644 index 1b2faec49..000000000 --- a/v3/plugins/kvstore/plugin.js +++ /dev/null @@ -1,31 +0,0 @@ -// plugin.js -// This file should contain helper functions for the that can be used by the frontend. -// Below are examples of how to use JSDoc to define the Hashes struct and the exported functions. - -/** - * Get the value of a key. - * @param key {string} - The store key. - * @returns {Promise} - The value of the key. - */ -export function Get(key) { - return wails.Plugin("kvstore", "Get", key); -} - -/** - * Set the value of a key. - @param key {string} - The store key. - @param value {any} - The value to set. - * @returns {Promise} - */ -export function Set(key, value) { - return wails.Plugin("kvstore", "Set", key, value); -} - - -/** - * Save the database to disk. - * @returns {Promise} - */ -export function Save() { - return wails.Plugin("kvstore", "Save"); -} diff --git a/v3/plugins/kvstore/plugin.toml b/v3/plugins/kvstore/plugin.toml deleted file mode 100644 index cebd76c8a..000000000 --- a/v3/plugins/kvstore/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "kvstore" plugin. - -Name = "kvstore" -Description = "A Simple Key/Value Store for Wails Applications" -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io" -Repository = "https://github.com/wailsapp/wails/v3/plugins/kvstore" -License = "MIT" - - diff --git a/v3/plugins/log/README.md b/v3/plugins/log/README.md deleted file mode 100644 index ae02ab72f..000000000 --- a/v3/plugins/log/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# log Plugin - -This example plugin provides a way to generate hashes of strings. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go - Plugins: map[string]application.Plugin{ - "log": log.NewPlugin(), - }, -``` - -## Usage - -You can then call the methods from the frontend: - -```js - wails.Plugin("log","All","hello world").then((result) => console.log(result)) -``` - -This method returns a struct with the following fields: - -```typescript - interface Hashes { - MD5: string; - SHA1: string; - SHA256: string; - } -``` - -A TypeScript definition file is provided for this interface. - -## Support - -If you find a bug in this plugin, please raise a ticket [here](https://github.com/plugin/repository). -Please do not contact the Wails team for support. \ No newline at end of file diff --git a/v3/plugins/log/plugin.go b/v3/plugins/log/plugin.go deleted file mode 100644 index 704c842f9..000000000 --- a/v3/plugins/log/plugin.go +++ /dev/null @@ -1,152 +0,0 @@ -package log - -import ( - _ "embed" - "fmt" - "io" - "os" - - "github.com/wailsapp/wails/v3/pkg/application" -) - -//go:embed plugin.js -var pluginJS string - -// ---------------- Plugin Setup ---------------- -// This is the main plugin struct. It can be named anything you like. -// It must implement the application.Plugin interface. -// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. - -type LogLevel = float64 - -const ( - Trace LogLevel = iota + 1 - Debug - Info - Warning - Error - Fatal -) - -type Config struct { - // Where the logs are written to. Defaults to os.Stderr - // If you want to write to a file, use os.OpenFile() - // e.g. os.OpenFile("mylog.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - // Closes the writer when the app shuts down - Writer io.WriteCloser - - // The initial log level. Defaults to Debug - Level LogLevel - - // Disables the log level prefixes - DisablePrefix bool - - // Handles errors that occur when writing to the log - ErrorHandler func(err error) -} - -type Plugin struct { - config *Config - app *application.App - level LogLevel -} - -func NewPluginWithConfig(config *Config) *Plugin { - if config.Level == 0 { - config.Level = Debug - } - if config.Writer == nil { - config.Writer = os.Stderr - } - return &Plugin{ - config: config, - level: config.Level, - } -} - -func NewPlugin() *Plugin { - return NewPluginWithConfig(&Config{}) -} - -// Shutdown is called when the app is shutting down -// You can use this to clean up any resources you have allocated -func (p *Plugin) Shutdown() { - p.config.Writer.Close() -} - -// Name returns the name of the plugin. -// You should use the go module format e.g. github.com/myuser/myplugin -func (p *Plugin) Name() string { - return "github.com/wailsapp/wails/v3/plugins/log" -} - -func (p *Plugin) Init(app *application.App) error { - p.app = app - return nil -} - -// CallableByJS returns a list of methods that can be called from the frontend -func (p *Plugin) CallableByJS() []string { - return []string{ - "Trace", - "Debug", - "Info", - "Warning", - "Error", - "Fatal", - "SetLevel", - } -} - -func (p *Plugin) InjectJS() string { - return pluginJS -} - -// ---------------- Plugin Methods ---------------- -// Plugin methods are just normal Go methods. You can add as many as you like. -// The only requirement is that they are exported (start with a capital letter). -// You can also return any type that is JSON serializable. -// See https://golang.org/pkg/encoding/json/#Marshal for more information. - -func (p *Plugin) write(prefix string, level LogLevel, message string, args ...any) { - if level >= p.level { - if !p.config.DisablePrefix { - message = prefix + " " + message - } - _, err := fmt.Fprintln(p.config.Writer, fmt.Sprintf(message, args...)) - if err != nil && p.config.ErrorHandler != nil { - p.config.ErrorHandler(err) - } - } -} - -func (p *Plugin) Trace(message string, args ...any) { - p.write("[Trace]", Trace, message, args...) -} - -func (p *Plugin) Debug(message string, args ...any) { - p.write("[Debug]", Debug, message, args...) -} - -func (p *Plugin) Info(message string, args ...any) { - p.write("[Info]", Info, message, args...) -} - -func (p *Plugin) Warning(message string, args ...any) { - p.write("[Warning]", Warning, message, args...) -} - -func (p *Plugin) Error(message string, args ...any) { - p.write("[Error]", Error, message, args...) -} - -func (p *Plugin) Fatal(message string, args ...any) { - p.write("[FATAL]", Fatal, message, args...) -} - -func (p *Plugin) SetLevel(newLevel LogLevel) { - if newLevel == 0 { - newLevel = Debug - } - p.level = newLevel -} diff --git a/v3/plugins/log/plugin.js b/v3/plugins/log/plugin.js deleted file mode 100644 index 16811d5d1..000000000 --- a/v3/plugins/log/plugin.js +++ /dev/null @@ -1,98 +0,0 @@ -// plugin.js -// This file should contain helper functions for the that can be used by the frontend. -// Below are examples of how to use JSDoc to define the Hashes struct and the exported functions. - -/** - * Log at the Trace level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ -function Trace(input, ...args) { - return wails.Plugin("log", "Trace", input, ...args); -} - -/** - * Log at the Debug level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ - -function Debug(input, ...args) { - return wails.Plugin("log", "Debug", input, ...args); -} - -/** - * Log at the Info level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ -function Info(input, ...args) { - return wails.Plugin("log", "Info", input, ...args); -} - -/** - * Log at the Warning level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ -function Warning(input, ...args) { - return wails.Plugin("log", "Warning", input, ...args); -} - -/** - * Log at the Error level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ -function Error(input, ...args) { - return wails.Plugin("log", "Error", input, ...args); -} - -/** - * Log at the Fatal level. - * @param input {string} - The message in printf format. - * @param args {...any} - The arguments for the log message. - * @returns {Promise} - */ -function Fatal(input, ...args) { - return wails.Plugin("log", "Fatal", input, ...args); -} - -/** - * SetLevel sets the logging level - * @param level {Level} The log level to set - * @returns {Promise} - */ -function SetLevel(level) { - return wails.Plugin("log", "SetLevel", level); -} - -/** - * Log Level. - * @readonly - * @enum {number} - */ -let Level = { - Trace: 1, - Debug: 2, - Info: 3, - Warning: 4, - Error: 5, - Fatal: 6, -}; - -window.Logger = { - Trace, - Debug, - Info, - Warning, - Error, - Fatal, - SetLevel, - Level, -} diff --git a/v3/plugins/log/plugin.toml b/v3/plugins/log/plugin.toml deleted file mode 100644 index 0315468df..000000000 --- a/v3/plugins/log/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "log" plugin. - -Name = "log" -Description = "A basic logger" -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io" -Repository = "https://github.com/wailsapp/wails/v3/plugins/log" -License = "MIT" - - diff --git a/v3/plugins/single_instance/README.md b/v3/plugins/single_instance/README.md deleted file mode 100644 index 1dc48ddc6..000000000 --- a/v3/plugins/single_instance/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# single-instance Plugin - -This example plugin provides a way to generate hashes of strings. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go - Plugins: map[string]application.Plugin{ - "single_instance": single_instance.NewPlugin(&single_instance.Config{ - // When true, the original app will be activated when a second instance is launched - ActivateAppOnSubsequentLaunch: true, - } - }, -``` - -## Usage - -This plugin prevents the launch of multiple copies of your application. -If you set `ActivateAppOnSubsequentLaunch` to true the original app will be activated when a second instance is launched. - -## Support - -If you find a bug in this plugin, please raise a ticket [here](https://github.com/plugin/repository). -Please do not contact the Wails team for support. - -## Credit - -This plugin contains modified code from the awesome [go-singleinstance](https://github.com/allan-simon/go-singleinstance) module (c) 2015 Allan Simon. -Original license file has been renamed `go-singleinstance.LICENSE` and is available [here](./singleinstance_LICENSE). \ No newline at end of file diff --git a/v3/plugins/single_instance/go-singleinstance.LICENSE b/v3/plugins/single_instance/go-singleinstance.LICENSE deleted file mode 100644 index 67bb9ea50..000000000 --- a/v3/plugins/single_instance/go-singleinstance.LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Allan Simon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/v3/plugins/single_instance/lock.go b/v3/plugins/single_instance/lock.go deleted file mode 100644 index ba2758769..000000000 --- a/v3/plugins/single_instance/lock.go +++ /dev/null @@ -1,16 +0,0 @@ -package single_instance - -import ( - "os" - "strconv" -) - -func GetLockFilePid(filename string) (pid int, err error) { - contents, err := os.ReadFile(filename) - if err != nil { - return - } - - pid, err = strconv.Atoi(string(contents)) - return -} diff --git a/v3/plugins/single_instance/lock_posix.go b/v3/plugins/single_instance/lock_posix.go deleted file mode 100644 index 06139d52b..000000000 --- a/v3/plugins/single_instance/lock_posix.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build !windows - -package single_instance - -import ( - "os" - "strconv" - "syscall" -) - -// CreateLockFile tries to create a file with given name and acquire an -// exclusive lock on it. If the file already exists AND is still locked, it will -// fail. -func CreateLockFile(filename string, PID int) (*os.File, error) { - file, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0600) - if err != nil { - return nil, err - } - - err = syscall.Flock(int(file.Fd()), syscall.LOCK_EX|syscall.LOCK_NB) - if err != nil { - file.Close() - return nil, err - } - - // Write PID to lock file - contents := strconv.Itoa(PID) - if err := file.Truncate(0); err != nil { - file.Close() - return nil, err - } - if _, err := file.WriteString(contents); err != nil { - file.Close() - return nil, err - } - - return file, nil -} diff --git a/v3/plugins/single_instance/lock_windows.go b/v3/plugins/single_instance/lock_windows.go deleted file mode 100644 index 67aabe685..000000000 --- a/v3/plugins/single_instance/lock_windows.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build windows - -package single_instance - -import ( - "os" - "strconv" -) - -// CreateLockFile tries to create a file with given name and acquire an -// exclusive lock on it. If the file already exists AND is still locked, it will -// fail. -func CreateLockFile(filename string, PID int) (*os.File, error) { - if _, err := os.Stat(filename); err == nil { - // If the file exists, we first try to remove it - if err = os.Remove(filename); err != nil { - return nil, err - } - } else if !os.IsNotExist(err) { - return nil, err - } - - file, err := os.OpenFile(filename, os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0600) - if err != nil { - return nil, err - } - - // Write PID to lock file - _, err = file.WriteString(strconv.Itoa(PID)) - if err != nil { - return nil, err - } - - return file, nil -} diff --git a/v3/plugins/single_instance/plugin.go b/v3/plugins/single_instance/plugin.go deleted file mode 100644 index af52ea133..000000000 --- a/v3/plugins/single_instance/plugin.go +++ /dev/null @@ -1,83 +0,0 @@ -package single_instance - -import ( - "fmt" - "github.com/wailsapp/wails/v3/pkg/application" - "os" - "path/filepath" -) - -type Config struct { - // Add any configuration options here - LockFileName string - LockFilePath string - ActivateAppOnSubsequentLaunch bool -} - -type Plugin struct { - config *Config - app *application.App - lockfile *os.File -} - -func (p *Plugin) CallableByJS() []string { - return []string{} -} - -func (p *Plugin) InjectJS() string { - return "" -} - -func NewPlugin(config *Config) *Plugin { - if config.LockFilePath == "" { - // Use the system default temp directory - config.LockFilePath = os.TempDir() - } - if config.LockFileName == "" { - // Use the executable name - config.LockFileName = filepath.Base(os.Args[0]) + ".lock" - } - return &Plugin{ - config: config, - } -} - -// Shutdown is called when the app is shutting down -func (p *Plugin) Shutdown() { - p.lockfile.Close() -} - -// Name returns the name of the plugin. -func (p *Plugin) Name() string { - return "github.com/wailsapp/wails/v3/plugins/single-instance" -} - -// Init is called when the app is starting up. You can use this to -// initialise any resources you need. You can also access the application -// instance via the app property. -func (p *Plugin) Init(app *application.App) error { - p.app = app - - var err error - lockfileName := p.config.LockFilePath + "/" + p.config.LockFileName - p.lockfile, err = CreateLockFile(lockfileName, p.app.GetPID()) - if err != nil { - if p.config.ActivateAppOnSubsequentLaunch { - pid, err := GetLockFilePid(lockfileName) - if err != nil { - return err - } - err = p.activeInstance(pid) - if err != nil { - return err - } - } - return fmt.Errorf("another instance of this application is already running") - } - return nil -} - -// Exported returns a list of exported methods that can be called from the frontend -func (p *Plugin) Exported() []string { - return []string{} -} diff --git a/v3/plugins/single_instance/plugin.toml b/v3/plugins/single_instance/plugin.toml deleted file mode 100644 index 6682e4493..000000000 --- a/v3/plugins/single_instance/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "single-instance" plugin. - -Name = "single-instance" -Description = "Allows only a single instance of your application to run" -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io" -Repository = "https://github.com/wailsapp/wails/v3/plugins/single-instance -License = "MIT" - - diff --git a/v3/plugins/single_instance/plugin_darwin.go b/v3/plugins/single_instance/plugin_darwin.go deleted file mode 100644 index c4f47f715..000000000 --- a/v3/plugins/single_instance/plugin_darwin.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build darwin - -package single_instance - -/* -#cgo CFLAGS: -mmacosx-version-min=10.13 -x objective-c -#cgo LDFLAGS: -framework Cocoa -framework AppKit -mmacosx-version-min=10.13 - -#import - -void activateApplicationWithProcessID(int pid) { - NSRunningApplication *app = [NSRunningApplication runningApplicationWithProcessIdentifier:pid]; - if (app != nil) { - [app unhide]; - [app activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)]; - } -} -*/ -import "C" - -func (p *Plugin) activeInstance(pid int) error { - C.activateApplicationWithProcessID(C.int(pid)) - return nil -} diff --git a/v3/plugins/sqlite/plugin.go b/v3/plugins/sqlite/plugin.go deleted file mode 100644 index 95c5ef52a..000000000 --- a/v3/plugins/sqlite/plugin.go +++ /dev/null @@ -1,173 +0,0 @@ -package sqlite - -import ( - "database/sql" - _ "embed" - "errors" - "fmt" - "github.com/wailsapp/wails/v3/pkg/application" - _ "modernc.org/sqlite" - "strings" -) - -//go:embed sqlite_close.js -var closejs string - -//go:embed sqlite_open.js -var openjs string - -//go:embed sqlite_execute_select.js -var executeselectjs string - -// ---------------- Plugin Setup ---------------- -// This is the main plugin struct. It can be named anything you like. -// It must implement the application.Plugin interface. -// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops. - -type Config struct { - // Add any configuration options here - CanOpenFromJS bool - CanCloseFromJS bool - DBFile string -} - -type Plugin struct { - config *Config - app *application.App - conn *sql.DB - callableMethods []string - js string -} - -func NewPlugin(config *Config) *Plugin { - return &Plugin{ - config: config, - } -} - -// Shutdown is called when the app is shutting down -// You can use this to clean up any resources you have allocated -func (p *Plugin) Shutdown() { - if p.conn != nil { - p.conn.Close() - } -} - -// Name returns the name of the plugin. -// You should use the go module format e.g. github.com/myuser/myplugin -func (p *Plugin) Name() string { - return "github.com/wailsapp/wails/v3/plugins/sqlite" -} - -// Init is called when the app is starting up. You can use this to -// initialise any resources you need. You can also access the application -// instance via the app property. -func (p *Plugin) Init(app *application.App) error { - p.app = app - p.callableMethods = []string{"Execute", "Select"} - p.js = executeselectjs - if p.config.CanOpenFromJS { - p.callableMethods = append(p.callableMethods, "Open") - p.js += openjs - } - if p.config.CanCloseFromJS { - p.callableMethods = append(p.callableMethods, "Close") - p.js += closejs - } - if p.config.DBFile == "" { - return errors.New(`no database file specified. Please set DBFile in the config to either a filename or use ":memory:" to use an in-memory database`) - } - _, err := p.Open(p.config.DBFile) - if err != nil { - return err - } - - p.js += fmt.Sprintf("\nwindow.sqlite = { %s };", strings.Join(p.callableMethods, ", ")) - return nil -} - -// CallableByJS returns a list of exported methods that can be called from the frontend -func (p *Plugin) CallableByJS() []string { - return p.callableMethods -} - -func (p *Plugin) InjectJS() string { - return p.js -} - -// ---------------- Plugin Methods ---------------- -// Plugin methods are just normal Go methods. You can add as many as you like. -// The only requirement is that they are exported (start with a capital letter). -// You can also return any type that is JSON serializable. -// Any methods that you want to be callable from the frontend must be returned by the -// Exported() method above. -// See https://golang.org/pkg/encoding/json/#Marshal for more information. - -func (p *Plugin) Open(dbPath string) (string, error) { - var err error - p.conn, err = sql.Open("sqlite", dbPath) - if err != nil { - return "", err - } - return "Database connection opened", nil -} - -func (p *Plugin) Execute(query string, args ...any) error { - if p.conn == nil { - return errors.New("no open database connection") - } - - _, err := p.conn.Exec(query, args...) - if err != nil { - return err - } - return nil -} - -func (p *Plugin) Select(query string, args ...any) ([]map[string]any, error) { - if p.conn == nil { - return nil, errors.New("no open database connection") - } - - rows, err := p.conn.Query(query, args...) - if err != nil { - return nil, err - } - defer rows.Close() - - columns, err := rows.Columns() - var results []map[string]any - for rows.Next() { - values := make([]any, len(columns)) - pointers := make([]any, len(columns)) - - for i := range values { - pointers[i] = &values[i] - } - - if err := rows.Scan(pointers...); err != nil { - return nil, err - } - - row := make(map[string]any, len(columns)) - for i, column := range columns { - row[column] = values[i] - } - results = append(results, row) - } - - return results, nil -} - -func (p *Plugin) Close() error { - if p.conn == nil { - return errors.New("no open database connection") - } - - err := p.conn.Close() - if err != nil { - return err - } - p.conn = nil - return nil -} diff --git a/v3/plugins/sqlite/plugin.toml b/v3/plugins/sqlite/plugin.toml deleted file mode 100644 index 7e53e00d6..000000000 --- a/v3/plugins/sqlite/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "sqlite" plugin. - -Name = "sqlite" -Description = "Provides easy access to SQLite DBs" -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io/plugins/sqlite" -Repository = "https://github.com/wailsapp/wails/v3/plugins/sqlite" -License = "MIT" - - diff --git a/v3/plugins/sqlite/sqlite_close.js b/v3/plugins/sqlite/sqlite_close.js deleted file mode 100644 index 1bf476dec..000000000 --- a/v3/plugins/sqlite/sqlite_close.js +++ /dev/null @@ -1,8 +0,0 @@ - -/** - * Close a sqlite DB. - * @returns {Promise} - */ -function Close() { - return wails.Plugin("sqlite", "Close"); -} diff --git a/v3/plugins/sqlite/sqlite_execute_select.js b/v3/plugins/sqlite/sqlite_execute_select.js deleted file mode 100644 index 0d20cb552..000000000 --- a/v3/plugins/sqlite/sqlite_execute_select.js +++ /dev/null @@ -1,20 +0,0 @@ - -/** - * Execute a SQL statement. - * @param statement {string} - SQL statement to execute. - @param args {...any} - Arguments to pass to the statement. - * @returns {Promise} - */ -function Execute(statement, ...args) { - return wails.Plugin("sqlite", "Execute", statement, ...args); -} - -/** - * Perform a select query. - * @param statement {string} - Select SQL statement. - * @param args {...any} - Arguments to pass to the statement. - * @returns {Promise} - */ -function Select(statement, ...args) { - return wails.Plugin("sqlite", "Select", statement, ...args); -} diff --git a/v3/plugins/sqlite/sqlite_open.js b/v3/plugins/sqlite/sqlite_open.js deleted file mode 100644 index 22526210f..000000000 --- a/v3/plugins/sqlite/sqlite_open.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Open a sqlite DB. - * @param filename {string} - file to open. - * @returns {Promise} - */ -function Open(filename) { - return wails.Plugin("sqlite", "Open", filename); -} diff --git a/v3/plugins/start_at_login/README.md b/v3/plugins/start_at_login/README.md deleted file mode 100644 index b69960d38..000000000 --- a/v3/plugins/start_at_login/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# start_at_login Plugin - -This example plugin provides a way to generate hashes of strings. - -## Installation - -Add the plugin to the `Plugins` option in the Applications options: - -```go - Plugins: map[string]application.Plugin{ - "start_at_login": start_at_login.NewPlugin(), - }, -``` - -## Usage - -You can then call the methods from the frontend: - -```js - wails.Plugin("start_at_login","StartAtLogin", true).then((result) => console.log(result)) - wails.Plugin("start_at_login","IsStartAtLogin").then((result) => console.log(result)) -``` - -To use this from Go, create a new instance of the plugin, then call the methods on that: - -```go - start_at_login := start_at_login.NewPlugin() - start_at_login.StartAtLogin(true) -``` - -## Support - -If you find a bug in this plugin, please raise a ticket [here](https://github.com/plugin/repository). -Please do not contact the Wails team for support. \ No newline at end of file diff --git a/v3/plugins/start_at_login/plugin.go b/v3/plugins/start_at_login/plugin.go deleted file mode 100644 index 44cbae6c6..000000000 --- a/v3/plugins/start_at_login/plugin.go +++ /dev/null @@ -1,45 +0,0 @@ -package start_at_login - -import ( - "github.com/wailsapp/wails/v3/pkg/application" -) - -type Plugin struct { - app *application.App - disabled bool -} - -func NewPlugin() *Plugin { - return &Plugin{} -} - -// Shutdown is called when the app is shutting down -// You can use this to clean up any resources you have allocated -func (p *Plugin) Shutdown() {} - -// Name returns the name of the plugin. -// You should use the go module format e.g. github.com/myuser/myplugin -func (p *Plugin) Name() string { - return "github.com/wailsapp/wails/v3/plugins/start_at_login" -} - -func (p *Plugin) Init(app *application.App) error { - p.app = app - // OS specific initialiser - err := p.init() - if err != nil { - return err - } - return nil -} - -func (p *Plugin) CallableByJS() []string { - return []string{ - "StartAtLogin", - "IsStartAtLogin", - } -} - -func (p *Plugin) InjectJS() string { - return "" -} diff --git a/v3/plugins/start_at_login/plugin.toml b/v3/plugins/start_at_login/plugin.toml deleted file mode 100644 index fa359f46b..000000000 --- a/v3/plugins/start_at_login/plugin.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the plugin definition file for the "start_at_login" plugin. - -Name = "start_at_login" -Description = "Plugin to control whether the application should start at login" -Author = "Lea Anthony" -Version = "v1.0.0" -Website = "https://wails.io/plugins/start_at_login" -Repository = "https://github.com/wailsapp/wails/v3/plugins/start_at_login" -License = "MIT" - - diff --git a/v3/plugins/start_at_login/plugin_darwin.go b/v3/plugins/start_at_login/plugin_darwin.go deleted file mode 100644 index f3d88390c..000000000 --- a/v3/plugins/start_at_login/plugin_darwin.go +++ /dev/null @@ -1,80 +0,0 @@ -//go:build darwin - -package start_at_login - -import ( - "fmt" - "github.com/pkg/errors" - "github.com/samber/lo" - "github.com/wailsapp/wails/v3/pkg/logger" - "github.com/wailsapp/wails/v3/pkg/mac" - "os" - "os/exec" - "path/filepath" - "strings" -) - -func (p *Plugin) init() error { - bundleID := mac.GetBundleID() - if bundleID == "" { - p.app.Log(&logger.Message{ - Level: "INFO", - Message: "Application is not in bundle. StartAtLogin will not work.", - }) - p.disabled = true - } - return nil -} - -func (p *Plugin) StartAtLogin(enabled bool) error { - if p.disabled { - return nil - } - exe, err := os.Executable() - if err != nil { - return errors.Wrap(err, "Error running os.Executable:") - } - binName := filepath.Base(exe) - if !strings.HasSuffix(exe, "/Contents/MacOS/"+binName) { - return fmt.Errorf("app needs to be running as package.app file to start at login") - } - appPath := strings.TrimSuffix(exe, "/Contents/MacOS/"+binName) - var command string - if enabled { - command = fmt.Sprintf("tell application \"System Events\" to make login item at end with properties {name: \"%s\",path:\"%s\", hidden:false}", binName, appPath) - } else { - command = fmt.Sprintf("tell application \"System Events\" to delete login item \"%s\"", binName) - } - - cmd := exec.Command("osascript", "-e", command) - _, err = cmd.CombinedOutput() - if err != nil { - return err - } - return nil -} - -func (p *Plugin) IsStartAtLogin() (bool, error) { - if p.disabled { - return false, nil - } - exe, err := os.Executable() - if err != nil { - return false, err - } - binName := filepath.Base(exe) - if !strings.HasSuffix(exe, "/Contents/MacOS/"+binName) { - return false, fmt.Errorf("app needs to be running as package.app file to start at login") - } - appPath := strings.TrimSuffix(exe, "/Contents/MacOS/"+binName) - appName := strings.TrimSuffix(filepath.Base(appPath), ".app") - cmd := exec.Command("osascript", "-e", `tell application "System Events" to get the name of every login item`) - results, err := cmd.CombinedOutput() - if err != nil { - return false, err - } - resultsString := strings.TrimSpace(string(results)) - startupApps := strings.Split(resultsString, ", ") - result := lo.Contains(startupApps, appName) - return result, nil -} diff --git a/v3/plugins/start_at_login/plugin_linux.go b/v3/plugins/start_at_login/plugin_linux.go deleted file mode 100644 index 22d1b244d..000000000 --- a/v3/plugins/start_at_login/plugin_linux.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build linux - -package start_at_login - -func (p *Plugin) init() error { - // TBD - return nil -} diff --git a/v3/plugins/start_at_login/plugin_window.go b/v3/plugins/start_at_login/plugin_window.go deleted file mode 100644 index 7018077ac..000000000 --- a/v3/plugins/start_at_login/plugin_window.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build windows - -package start_at_login - -func (p *Plugin) init() error { - // TBD - return nil -} diff --git a/v3/tasks/Taskfile.yml b/v3/tasks/Taskfile.yml deleted file mode 100644 index 1949fb8f9..000000000 --- a/v3/tasks/Taskfile.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: '3' - -tasks: - generate: - dir: ./events - cmds: - - go run generate.go diff --git a/v3/tasks/contribs/main.go b/v3/tasks/contribs/main.go deleted file mode 100644 index 64fba1968..000000000 --- a/v3/tasks/contribs/main.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "log" - "os/exec" - "strings" -) - -func main() { - cmd := exec.Command("npx", "all-contributors-cli", "check") - //cmd.Stdin = strings.NewReader("some input") - var out strings.Builder - cmd.Stdout = &out - err := cmd.Run() - missingSplit := strings.Split(out.String(), "\n") - if len(missingSplit) < 2 { - log.Fatal(out.String()) - } - missing := missingSplit[1] - missing = strings.TrimSpace(missing) - // Split on comma - for _, contrib := range strings.Split(missing, ",") { - // Trim whitespace - contrib = strings.TrimSpace(contrib) - if contrib == "dependabot[bot]" || contrib == "" { - continue - } - // Add contributor - cmd := exec.Command("npx", "all-contributors-cli", "add", contrib, "code") - err := cmd.Run() - if err != nil { - log.Fatal(err) - } - } - if err != nil { - log.Fatal(err) - } -} diff --git a/v3/tasks/events/generate.go b/v3/tasks/events/generate.go deleted file mode 100644 index eafa27f89..000000000 --- a/v3/tasks/events/generate.go +++ /dev/null @@ -1,222 +0,0 @@ -package main - -import ( - "bytes" - "os" - "strconv" - "strings" -) - -var eventsGo = `package events - -type ApplicationEventType uint -type WindowEventType uint - -const ( - FilesDropped WindowEventType = iota -) - -var Mac = newMacEvents() - -type macEvents struct { -$$MACEVENTSDECL} - -func newMacEvents() macEvents { - return macEvents{ -$$MACEVENTSVALUES } -} -` - -var eventsH = `//go:build darwin - -#ifndef _events_h -#define _events_h - -extern void processApplicationEvent(unsigned int); -extern void processWindowEvent(unsigned int, unsigned int); - -$$CHEADEREVENTS - -#endif` - -func main() { - - eventNames, err := os.ReadFile("../../pkg/events/events.txt") - if err != nil { - panic(err) - } - - macEventsDecl := bytes.NewBufferString("") - macEventsValues := bytes.NewBufferString("") - cHeaderEvents := bytes.NewBufferString("") - windowDelegateEvents := bytes.NewBufferString("") - applicationDelegateEvents := bytes.NewBufferString("") - webviewDelegateEvents := bytes.NewBufferString("") - - var id int - var line []byte - // Loop over each line in the file - for id, line = range bytes.Split(eventNames, []byte{'\n'}) { - - // First 1024 is reserved - id = id + 1024 - - // Skip empty lines - if len(line) == 0 { - continue - } - - // split on the colon - split := bytes.Split(line, []byte{':'}) - platform := strings.TrimSpace(string(split[0])) - event := strings.TrimSpace(string(split[1])) - var ignoreEvent bool - if strings.HasSuffix(event, "!") { - event = event[:len(event)-1] - ignoreEvent = true - } - - // Title case the event name - eventTitle := string(bytes.ToUpper([]byte{event[0]})) + event[1:] - // delegate function name has a lowercase first character - delegateEventFunction := string(bytes.ToLower([]byte{event[0]})) + event[1:] - - // Add to buffer - switch platform { - case "mac": - eventType := "ApplicationEventType" - if strings.HasPrefix(event, "Window") { - eventType = "WindowEventType" - } - if strings.HasPrefix(event, "WebView") { - eventType = "WindowEventType" - } - macEventsDecl.WriteString("\t" + eventTitle + " " + eventType + "\n") - macEventsValues.WriteString("\t\t" + event + ": " + strconv.Itoa(id) + ",\n") - cHeaderEvents.WriteString("#define Event" + eventTitle + " " + strconv.Itoa(id) + "\n") - if ignoreEvent { - continue - } - // Check if this is a window event - if strings.HasPrefix(event, "Window") { - windowDelegateEvents.WriteString(`- (void)` + delegateEventFunction + `:(NSNotification *)notification { - if( hasListeners(Event` + eventTitle + `) ) { - processWindowEvent(self.windowId, Event` + eventTitle + `); - } -} - -`) - } - // Check if this is a webview event - if strings.HasPrefix(event, "WebView") { - webViewFunction := strings.TrimPrefix(event, "WebView") - webViewFunction = string(bytes.ToLower([]byte{webViewFunction[0]})) + webViewFunction[1:] - webviewDelegateEvents.WriteString(`- (void)webView:(WKWebView *)webview ` + webViewFunction + `:(WKNavigation *)navigation { - if( hasListeners(Event` + eventTitle + `) ) { - processWindowEvent(self.windowId, Event` + eventTitle + `); - } -} - -`) - } - if strings.HasPrefix(event, "Application") { - applicationDelegateEvents.WriteString(`- (void)` + delegateEventFunction + `:(NSNotification *)notification { - if( hasListeners(Event` + eventTitle + `) ) { - processApplicationEvent(Event` + eventTitle + `); - } -} - -`) - } - - } - } - - cHeaderEvents.WriteString("\n#define MAX_EVENTS " + strconv.Itoa(id-1) + "\n") - - // Save the eventsGo template substituting the values and decls - templateToWrite := strings.ReplaceAll(eventsGo, "$$MACEVENTSDECL", macEventsDecl.String()) - templateToWrite = strings.ReplaceAll(templateToWrite, "$$MACEVENTSVALUES", macEventsValues.String()) - err = os.WriteFile("../../pkg/events/events.go", []byte(templateToWrite), 0644) - if err != nil { - panic(err) - } - - // Save the eventsH template substituting the values and decls - templateToWrite = strings.ReplaceAll(eventsH, "$$CHEADEREVENTS", cHeaderEvents.String()) - err = os.WriteFile("../../pkg/events/events.h", []byte(templateToWrite), 0644) - if err != nil { - panic(err) - } - - // Load the window_delegate.m file - windowDelegate, err := os.ReadFile("../../pkg/application/webview_window.m") - if err != nil { - panic(err) - } - // iterate over the lines until we reach a line that says "// GENERATED EVENTS START" - // then we insert the events - // then we iterate until we reach a line that says "// GENERATED EVENTS END" - // then we write the file - var buffer bytes.Buffer - var inGeneratedEvents bool - for _, line := range bytes.Split(windowDelegate, []byte{'\n'}) { - if bytes.Contains(line, []byte("// GENERATED EVENTS START")) { - inGeneratedEvents = true - buffer.WriteString("// GENERATED EVENTS START\n") - buffer.WriteString(windowDelegateEvents.String()) - buffer.WriteString(webviewDelegateEvents.String()) - continue - } - if bytes.Contains(line, []byte("// GENERATED EVENTS END")) { - inGeneratedEvents = false - buffer.WriteString("// GENERATED EVENTS END\n") - continue - } - if !inGeneratedEvents { - if len(line) > 0 { - buffer.Write(line) - buffer.WriteString("\n") - } - } - } - err = os.WriteFile("../../pkg/application/webview_window.m", buffer.Bytes(), 0755) - if err != nil { - panic(err) - } - - // Load the app_delegate.m file - appDelegate, err := os.ReadFile("../../pkg/application/app_delegate.m") - if err != nil { - panic(err) - } - // iterate over the lines until we reach a line that says "// GENERATED EVENTS START" - // then we insert the events - // then we iterate until we reach a line that says "// GENERATED EVENTS END" - // then we write the file - buffer.Reset() - for _, line := range bytes.Split(appDelegate, []byte{'\n'}) { - if bytes.Contains(line, []byte("// GENERATED EVENTS START")) { - inGeneratedEvents = true - buffer.WriteString("// GENERATED EVENTS START\n") - buffer.WriteString(applicationDelegateEvents.String()) - continue - } - if bytes.Contains(line, []byte("// GENERATED EVENTS END")) { - inGeneratedEvents = false - buffer.WriteString("// GENERATED EVENTS END\n") - continue - } - if !inGeneratedEvents { - if len(line) > 0 { - buffer.Write(line) - buffer.WriteString("\n") - } - } - } - err = os.WriteFile("../../pkg/application/app_delegate.m", buffer.Bytes(), 0755) - if err != nil { - panic(err) - } - -} diff --git a/v3/tasks/png2bytes/png2bytes.go b/v3/tasks/png2bytes/png2bytes.go deleted file mode 100644 index b51a472b6..000000000 --- a/v3/tasks/png2bytes/png2bytes.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "bytes" - "os" - "strconv" -) - -func main() { - - if len(os.Args) != 2 { - println("Please provide a filename") - os.Exit(1) - } - - data, err := os.ReadFile(os.Args[1]) - if err != nil { - println("Error reading file:", err.Error()) - os.Exit(1) - } - - var buffer bytes.Buffer - buffer.WriteString("var image = []byte{") - // Iterate over the bytes and print them out in decimal - for _, b := range data { - // convert byte to decimal - buffer.WriteString(strconv.Itoa(int(b)) + ", ") - } - buffer.WriteString("}\n") - - // write to file - err = os.WriteFile(os.Args[1]+".go", buffer.Bytes(), 0644) - if err != nil { - println("Error writing file:", err.Error()) - os.Exit(1) - } - -} diff --git a/v3/tasks/sed/sed.go b/v3/tasks/sed/sed.go deleted file mode 100644 index 12e55f8d3..000000000 --- a/v3/tasks/sed/sed.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" - "strings" - - "github.com/leaanthony/clir" - - "github.com/samber/lo" -) - -func main() { - app := clir.NewCli("sed", "A simple sed replacement", "v1") - app.NewSubCommandFunction("replace", "Replace a string in files", ReplaceInFiles) - err := app.Run() - if err != nil { - println(err.Error()) - os.Exit(1) - } -} - -type ReplaceInFilesOptions struct { - Dir string `name:"dir" help:"Directory to search in"` - OldString string `name:"old" description:"The string to replace"` - NewString string `name:"new" description:"The string to replace with"` - Extensions string `name:"ext" description:"The file extensions to process"` - Ignore string `name:"ignore" description:"The files to ignore"` -} - -func ReplaceInFiles(options *ReplaceInFilesOptions) error { - extensions := strings.Split(options.Extensions, ",") - ignore := strings.Split(options.Ignore, ",") - err := filepath.Walk(options.Dir, func(path string, info os.FileInfo, err error) error { - if info.IsDir() { - return nil - } - - ext := filepath.Ext(path) - if !lo.Contains(extensions, ext) { - println("Skipping", path) - return nil - } - filename := filepath.Base(path) - if lo.Contains(ignore, filename) { - println("Ignoring:", path) - return nil - } - - println("Processing file:", path) - - content, err := os.ReadFile(path) - if err != nil { - return err - } - - newContent := strings.Replace(string(content), options.OldString, options.NewString, -1) - - return os.WriteFile(path, []byte(newContent), info.Mode()) - }) - - if err != nil { - return fmt.Errorf("Error while replacing in files: %v", err) - } - - return nil -}