Commit graph

249 commits

Author SHA1 Message Date
github-actions[bot]
3256041d8b chore(v3): bump to v3.0.0-alpha.54 and update changelog [skip ci] 2025-12-29 02:52:26 +00:00
Lea Anthony
0de429b8fc
feat(macos): add CollectionBehavior option to MacWindow (#4799)
* feat(macos): add CollectionBehavior option to MacWindow (#4756)

Add configurable NSWindowCollectionBehavior support for macOS windows,
allowing control over window behavior across Spaces and fullscreen.

New options include:
- MacWindowCollectionBehaviorCanJoinAllSpaces
- MacWindowCollectionBehaviorFullScreenAuxiliary
- MacWindowCollectionBehaviorMoveToActiveSpace
- And more...

This enables building Spotlight-like apps that appear on all Spaces
or overlay fullscreen applications.

Closes #4756

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Potential fix for code scanning alert no. 140: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 139: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat(examples): add spotlight example for CollectionBehavior

Demonstrates creating a Spotlight-like launcher window that:
- Appears on all macOS Spaces
- Floats above other windows
- Uses accessory activation policy (no Dock icon)
- Has frameless translucent design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(macos): support bitwise OR for CollectionBehavior options

Update CollectionBehavior to use actual NSWindowCollectionBehavior
bitmask values, allowing multiple behaviors to be combined:

```go
CollectionBehavior: application.MacWindowCollectionBehaviorCanJoinAllSpaces |
                    application.MacWindowCollectionBehaviorFullScreenAuxiliary,
```

Changes:
- Update Go constants to use actual bitmask values (1<<0, 1<<1, etc.)
- Simplify C function to pass through combined bitmask directly
- Add ParticipatesInCycle, IgnoresCycle, FullScreenDisallowsTiling options
- Update documentation with combined behavior examples
- Update spotlight example to demonstrate combining behaviors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-29 11:07:37 +11:00
github-actions[bot]
9ebdf229bb chore(v3): bump to v3.0.0-alpha.53 and update changelog [skip ci] 2025-12-27 02:40:47 +00:00
Lea Anthony
ab33eb594e
docs: fix custom protocol association documentation (#4825)
* docs: fix custom protocol association documentation

The documentation was incorrectly referencing `wails.json` with JSON format
when the actual configuration file is `build/config.yml` using YAML format.

Changes:
- Update config file reference from `wails.json` to `build/config.yml`
- Change format from JSON to YAML in code examples
- Fix structure: `protocols` is at root level, not nested under `info`
- Correct template variable references from `{{.Info.Protocols}}` to `{{.Protocols}}`
- Update Info.plist example to show actual generated format (`wails.com.scheme`)
- Add note about running `wails3 task common:update:build-assets` after changes
- Clean up redundant file path references in platform-specific sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: consolidate custom protocol docs and add Universal Links

- Remove duplicate custom-protocol-association.mdx
- Add Universal Links section to macOS tab
- Add Web-to-App Linking section to Windows tab
- Keep the more comprehensive distribution/custom-protocols.mdx

Addresses review comment about duplicate documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(windows): add custom protocol support to MSIX packaging

- Add uap3 namespace and protocol extension to MSIX template
- Protocols defined in build/config.yml are now automatically
  registered when building MSIX packages
- Update docs with MSIX section and clarify Web-to-App linking
  requires manual manifest configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-27 09:52:26 +11:00
github-actions[bot]
3b055efcae chore(v3): bump to v3.0.0-alpha.52 and update changelog [skip ci] 2025-12-26 02:43:00 +00:00
github-actions[bot]
e34c172f0c chore(v3): bump to v3.0.0-alpha.51 and update changelog [skip ci] 2025-12-23 02:43:45 +00:00
github-actions[bot]
0271c9e10c chore(v3): bump to v3.0.0-alpha.50 and update changelog [skip ci] 2025-12-21 02:47:21 +00:00
ruhuang
618489800c
docs: add examples for window X/Y coordinate options (#4817)
* docs: add examples for window X/Y coordinate options

* Update UNRELEASED_CHANGELOG.md
2025-12-20 15:50:32 +11:00
github-actions[bot]
6b8c8d495f chore(v3): bump to v3.0.0-alpha.49 and update changelog [skip ci] 2025-12-18 02:41:03 +00:00
Ndianabasi Udonkang
a81cb18f0c
Enhance bindings generation documentation (#4773)
* Enhance bindings generation documentation

Added TypeScript option and help command for bindings generation.

* Update UNRELEASED_CHANGELOG with new events and docs

Updated the changelog to include new WebKit2 load-change events and additional documentation for frontend bindings.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-12-17 10:40:18 +00:00
github-actions[bot]
a13a426bcc chore(v3): bump to v3.0.0-alpha.48 and update changelog [skip ci] 2025-12-16 02:42:52 +00:00
Ndianabasi Udonkang
6eb9415d37
Update asset-server Documentation to Reflect Current Implementation (#4802)
* Refactor asset-server documentation for clarity

Updated references from 'frontend/Taskfile.yml' to 'build/Taskfile.yml' and adjusted environment variable names for clarity. Enhanced the explanation of how the dev proxy works and clarified the roles of the tasks in the templates.

* Update changelog

* Apply suggestion from @coderabbitai[bot]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-16 06:08:45 +11:00
Lea Anthony
84b9021ea9
docs: Update dialogs documentation to match actual v3 API (#4793)
* All the documentation files have been updated. Here's a summary of the changes I made:

## Summary of Documentation Updates

### Key API Corrections Made:

1. **Dialog Creation**:
   - Changed `app.InfoDialog()` → `application.InfoDialog()` (package-level functions)
   - Also documented `app.Dialog.Info()` via DialogManager

2. **Question Dialog Buttons**:
   - Removed non-existent `SetButtons("Save", "Don't Save", "Cancel")` method
   - Now uses `AddButton("label")` which returns a `*Button`
   - Button callbacks via `button.OnClick(func() { ... })`

3. **Default/Cancel Buttons**:
   - Changed `SetDefaultButton("Cancel")` (string) → `SetDefaultButton(cancelBtn)` (`*Button`)
   - Changed `SetCancelButton("Cancel")` (string) → `SetCancelButton(cancelBtn)` (`*Button`)
   - Also documented fluent `SetAsDefault()` and `SetAsCancel()` methods on Button

4. **File Dialog Filters**:
   - Changed `SetFilters([]application.FileFilter{...})` → `AddFilter("Display Name", "*.ext;*.ext2")`

5. **Save Dialog Filename**:
   - Changed `SetDefaultFilename()` → `SetFilename()`

6. **Folder Selection**:
   - Removed non-existent `app.SelectFolderDialog()`
   - Now uses `application.OpenFileDialog().CanChooseDirectories(true).CanChooseFiles(false)`

7. **Show() Return Value**:
   - Removed incorrect `result, err := dialog.Show()` pattern
   - `Show()` returns nothing - responses are handled via button callbacks

### Files Modified:
- `docs/src/content/docs/features/dialogs/message.mdx` - Complete rewrite of question dialog examples
- `docs/src/content/docs/features/dialogs/overview.mdx` - Updated all code examples
- `docs/src/content/docs/features/dialogs/file.mdx` - Updated file dialog examples
- `v3/UNRELEASED_CHANGELOG.md` - Added changelog entry

* All changes are complete. Here's a summary of what was updated:

## Summary

I've updated the Wails v3 dialogs documentation to match the actual API. The documentation now consistently uses:

### DialogManager Pattern (Recommended)
- `app.Dialog.Info()`, `app.Dialog.Question()`, `app.Dialog.Warning()`, `app.Dialog.Error()`
- `app.Dialog.OpenFile()`, `app.Dialog.SaveFile()`

This is consistent with other runtime features like `app.Window`, `app.Event`, etc.

### Key API Corrections

1. **Dialog Creation**: Both `app.Dialog.*()` (DialogManager) and `application.*Dialog()` (package-level) are documented
2. **Question Dialog Buttons**: Use `AddButton("label")` which returns `*Button`, then `button.OnClick(callback)`
3. **Default/Cancel Buttons**: `SetDefaultButton(button)` and `SetCancelButton(button)` take `*Button` pointers
4. **File Filters**: Use `AddFilter("Display Name", "*.ext")` instead of `SetFilters()`
5. **Save Dialog Filename**: Use `SetFilename()` instead of `SetDefaultFilename()`
6. **Folder Selection**: Use `app.Dialog.OpenFile().CanChooseDirectories(true).CanChooseFiles(false)`

### Files Modified
- `docs/src/content/docs/features/dialogs/overview.mdx`
- `docs/src/content/docs/features/dialogs/message.mdx`
- `docs/src/content/docs/features/dialogs/file.mdx`
- `v3/UNRELEASED_CHANGELOG.md`

* Audit complete! All documentation files now consistently use `app.Dialog.*` for all code examples. Here's the summary:

## Audit Complete

All dialog documentation has been updated to consistently use the `app.Dialog.*` pattern:

### Changes Made:

**message.mdx:**
- All examples now use `app.Dialog.Info()`, `app.Dialog.Question()`, `app.Dialog.Warning()`, `app.Dialog.Error()`
- Function signatures updated to accept `app *application.App` parameter
- Nested dialog calls within callbacks also updated

**file.mdx:**
- All examples now use `app.Dialog.OpenFile()`, `app.Dialog.SaveFile()`
- Function signatures updated to accept `app *application.App` parameter
- All error/info dialogs within file operations also updated

**overview.mdx:**
- Already consistent from earlier edits

### Documentation Structure:
Each file now properly documents both approaches in a dedicated section:

```go
// Via DialogManager (recommended when you have an app instance):
app.Dialog.Info()
app.Dialog.OpenFile()

// Package-level functions (useful in callbacks or when app isn't in scope):
application.InfoDialog()
application.OpenFileDialog()
```

But all code examples use the `app.Dialog.*` pattern for consistency with other runtime features like `app.Window`, `app.Event`, etc.

* docs: Fix reference/dialogs.mdx and reference/application.mdx API documentation

Updated docs to match actual Wails v3 Dialogs API:

- reference/dialogs.mdx: Complete rewrite with correct API
  - Use `app.Dialog.OpenFile()` and `app.Dialog.SaveFile()` instead of `app.OpenFileDialog()`
  - Use `AddFilter("name", "pattern")` instead of `SetFilters([]FileFilter{...})`
  - Use `SetFilename()` instead of `SetDefaultFilename()`
  - Use `SetDirectory()` instead of `SetDefaultDirectory()`
  - Remove non-existent `SelectFolderDialog()` - use `OpenFile().CanChooseDirectories(true).CanChooseFiles(false)`
  - Use `AddButton()` with callbacks instead of `SetButtons()`
  - Use `SetDefaultButton(*Button)` instead of `SetDefaultButton(int)`
  - Document that `Show()` returns nothing, use callbacks

- reference/application.mdx: Fix Dialog Methods section
  - Use `app.Dialog.*` manager pattern
  - Show correct Question dialog with button callbacks
  - Fix file dialog examples with `AddFilter()`
  - Remove `SelectFolderDialog()` reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Remove package-level dialog function references

Remove all references to package-level dialog functions
(application.InfoDialog(), application.OpenFileDialog(), etc.)
from documentation. Only the app.Dialog manager pattern
should be used.

Updated files:
- reference/dialogs.mdx
- features/dialogs/overview.mdx
- features/dialogs/message.mdx
- features/dialogs/file.mdx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Remove package-level dialog functions in favor of app.Dialog manager

BREAKING CHANGE: Remove package-level dialog functions. Use app.Dialog manager instead.

Removed functions:
- application.InfoDialog()
- application.QuestionDialog()
- application.WarningDialog()
- application.ErrorDialog()
- application.OpenFileDialog()
- application.SaveFileDialog()

Use the Dialog manager pattern instead:
- app.Dialog.Info()
- app.Dialog.Question()
- app.Dialog.Warning()
- app.Dialog.Error()
- app.Dialog.OpenFile()
- app.Dialog.SaveFile()

This aligns dialogs with other runtime managers like app.Window and app.Event.

Updated files:
- v3/pkg/application/application.go - Remove exported dialog functions
- v3/pkg/application/dialog_manager.go - Use internal newMessageDialog/newOpenFileDialog
- v3/pkg/application/messageprocessor_dialog.go - Use internal dialog constructors
- v3/examples/* - Update all examples to use app.Dialog pattern
- v3/internal/commands/appimage_testfiles/main.go - Update test file
- v3/UNRELEASED_CHANGELOG.md - Document breaking change

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Use application.Get() in dialogs-basic example and correct filter docs

- Update dialogs-basic helper functions to use application.Get() instead
  of passing app through function parameters
- Fix incorrect documentation claiming space/comma delimiters work for
  filter patterns (only semicolons are supported)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-16 06:05:40 +11:00
Ndianabasi Udonkang
9b03981d06
Fix documentation to Use singular 'Screen' (#4784)
* Fix documentation to use singular 'Screen'

Updated references from 'Screens' to 'Screen' in documentation.

* Update UNRELEASED_CHANGELOG.md
2025-12-15 22:19:51 +11:00
github-actions[bot]
c5af373c43 chore(v3): bump to v3.0.0-alpha.47 and update changelog [skip ci] 2025-12-15 02:46:36 +00:00
Lea Anthony
2c9d23b040
fix(macos): fix print dialog not opening and add Window.Print() to runtime (#4789)
fix(macos): fix print dialog not opening and add Window.Print() to runtime (#4290)

The print dialog was not opening on macOS because the CGO windowPrint function was passing the wrong pointer type to NSPrintOperation's runOperationModalForWindow method. It was passing the raw void* window instead of the properly cast WebviewWindow* nsWindow.

This also adds a Window.Print() method to the JavaScript runtime, allowing frontend code to trigger the print dialog directly without needing a Go binding.

Changes:
- Fix webview_window_darwin.go to use nsWindow instead of window
- Add WindowPrint constant (51) and handler to messageprocessor_window.go
- Add Print() method to window.ts in the runtime
- Rebuild bundled runtime (runtime.js and runtime.debug.js)
- Add print example in v3/examples/print to demonstrate both Go API and JS runtime methods
- Update API documentation for Window.Print() in both Go and JavaScript references

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-14 15:04:54 +11:00
github-actions[bot]
780568b030 chore(v3): bump to v3.0.0-alpha.46 and update changelog [skip ci] 2025-12-14 02:47:08 +00:00
Lea Anthony
f0a8bcad34
feat(linux): add WebKit2 load-change events (#4783)
* All changes are complete. Here's a summary of what was implemented for issue #3896:

## Summary

Added four new WebKit2 load-change events for Linux to match WebKitGTK's documented load-change signals:

### New Events
| Event | ID | WebKit Signal | Description |
|-------|-----|---------------|-------------|
| `WindowLoadStarted` | 1059 | `WEBKIT_LOAD_STARTED` | Fired when page load begins |
| `WindowLoadRedirected` | 1060 | `WEBKIT_LOAD_REDIRECTED` | Fired when a redirect occurs |
| `WindowLoadCommitted` | 1061 | `WEBKIT_LOAD_COMMITTED` | Fired when load is committed |
| `WindowLoadFinished` | 1062 | `WEBKIT_LOAD_FINISHED` | Fired when load completes |

### Files Modified
1. **`v3/pkg/events/events.go`** - Added new event types to `linuxEvents` struct and updated all platform event IDs (Mac, Windows, iOS shifted by +4 to accommodate new Linux events)
2. **`v3/pkg/events/events_linux.h`** - Added C defines for new events
3. **`v3/pkg/application/linux_cgo.go`** - Updated `handleLoadChanged()` to dispatch all four load events
4. **`v3/UNRELEASED_CHANGELOG.md`** - Documented the new feature

### Backward Compatibility
- The existing `WindowLoadChanged` event (1058) continues to fire on `WEBKIT_LOAD_FINISHED` for backward compatibility
- `WindowLoadFinished` also fires on `WEBKIT_LOAD_FINISHED` for consistent naming with the new events

Would you like me to commit these changes?

* These are the remaining changes that need to be committed - the generator properly updated:
1. `events.txt` - source of truth for events
2. `event_types.ts` - TypeScript runtime types for JS/TS clients
3. `events_darwin.h` - Mac C header with updated event IDs
4. `events_ios.h` - iOS C header with updated event IDs

These are the final changes needed on top of the previous commit. Would you like me to commit these changes?

* chore: add new Linux WebKit2 load events to known_events.go

Add WindowLoadStarted, WindowLoadRedirected, WindowLoadCommitted,
and WindowLoadFinished to the known events registry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: add Linux WebKit2 load events to events-reference guide

Document the new WindowLoadStarted, WindowLoadRedirected,
WindowLoadCommitted, and WindowLoadFinished events in the
Linux Events section of the events reference guide.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update UNRELEASED_CHANGELOG

* refactor(linux): remove deprecated WindowLoadChanged event

Remove the legacy WindowLoadChanged event and replace all internal
references with WindowLoadFinished. This simplifies the event system
by having granular events (LoadStarted, LoadRedirected, LoadCommitted,
LoadFinished) rather than a generic LoadChanged that fired on any state.

- Remove WindowLoadChanged from events.go and event_types.ts
- Update linux_cgo.go to only fire WindowLoadFinished
- Update webview_window_linux.go hooks to use WindowLoadFinished
- Regenerate runtime bundles and known_events
- Update events documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add breaking change note for WindowLoadChanged removal

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-14 06:59:01 +11:00
github-actions[bot]
bf1173c831 chore(v3): bump to v3.0.0-alpha.45 and update changelog [skip ci] 2025-12-13 02:39:16 +00:00
Lea Anthony
e0cd24272c
fix(linux): auto-detect and handle .relr.dyn sections for AppImage builds (#4772)
Modern Linux distributions (Arch, Fedora 39+, Ubuntu 24.04+) compile
libraries with .relr.dyn ELF sections. The bundled strip binary in
linuxdeploy cannot process these sections, causing AppImage builds to fail.

This commit:
- Adds hasRelrDynSections() to proactively detect modern toolchains
- Automatically disables stripping (NO_STRIP=1) when detected
- Fixes error output to properly display as string
- Adds documentation explaining the issue and workaround

Fixes #4642

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 09:56:13 +11:00
Lea Anthony
38c89e06b5 Revert "fix(linux): auto-detect and handle .relr.dyn sections for AppImage builds"
This reverts commit 3d46f4867d.
2025-12-13 08:16:14 +11:00
Lea Anthony
3d46f4867d fix(linux): auto-detect and handle .relr.dyn sections for AppImage builds
Modern Linux distributions (Arch, Fedora 39+, Ubuntu 24.04+) compile
libraries with .relr.dyn ELF sections. The bundled strip binary in
linuxdeploy cannot process these sections, causing AppImage builds to fail.

This commit:
- Adds hasRelrDynSections() to proactively detect modern toolchains
- Automatically disables stripping (NO_STRIP=1) when detected
- Fixes error output to properly display as string
- Adds documentation explaining the issue and workaround

Fixes #4642

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 08:14:21 +11:00
github-actions[bot]
726c7546ce chore(v3): bump to v3.0.0-alpha.44 and update changelog [skip ci] 2025-12-12 02:42:17 +00:00
github-actions[bot]
47d827c394 chore(v3): bump to v3.0.0-alpha.43 and update changelog [skip ci] 2025-12-11 02:42:53 +00:00
Lea Anthony
873848a077 Merge iOS support from v3-alpha-feature/ios-support
This commit integrates iOS platform support for Wails v3, adapting the
iOS-specific code to work with the new transport layer architecture.

Key changes:
- Add iOS-specific application, webview, and runtime files
- Add iOS event types and processing
- Add iOS examples and templates
- Update messageprocessor to handle iOS requests
- Move badge_ios.go to dock package

Note: The iOS branch was based on an older v3-alpha and required
significant conflict resolution due to the transport layer refactor
(PR #4702). Some iOS-specific code may need further adaptation:
- processIOSMethod needs to be implemented with new RuntimeRequest signature
- iOS event generation in tasks/events/generate.go needs updating

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 18:34:21 +11:00
github-actions[bot]
f4d1a5db5d chore(v3): bump to v3.0.0-alpha.42 and update changelog [skip ci] 2025-12-10 02:41:47 +00:00
Lea Anthony
c863d2ce87 fix(docs): use Starlight admonition syntax instead of Aside component
Replace <Aside type="caution"> JSX with :::caution markdown syntax
to fix the docs build error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 08:26:36 +11:00
Andrey Pshenkin
dc20ce1fd6
Update RawMessageHandler to include originInfo parameter in documentation (#4758)
* Update `RawMessageHandler` to include `originInfo` parameter in documentation

- Expanded examples and handler signature to reflect the additional `originInfo` parameter.
- Detailed `OriginInfo` structure and its platform-specific behaviors added.

* Expand `raw-messages` documentation to include origin validation guidance
2025-12-09 23:30:45 +11:00
Andrey Pshenkin
9336875969
[V3] Add universal link support for macOS (#4712)
* Rename `HandleCustomProtocol` to `HandleOpenURL` and add universal link support on macOS.

* Update changelog.

* add docs

* add docs

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-12-08 08:46:21 +00:00
Lea Anthony
f50061f7c9 docs: add RawMessageHandler documentation
- Add RawMessageHandler section to Application API reference
- Add System.invoke() to Frontend Runtime reference
- Create comprehensive Raw Messages guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 19:32:34 +11:00
Andrey Pshenkin
561473d992
[V3] Refactor binding transport layer (#4702)
* custom transport initial

* transport codecs

* runtime set transport

* events transport

* clauded example

* bundled runtime

* wip: transport

* rework transports

* rework dialog responses

* cleanup

* cleanup

* improve error handling in HTTPTransport

* cleanup

* cleanup

* cleanup

* cleanup

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* move documentation to website docs

* update doc

* update changelog

* introduce JSClient method for transport for embedding JS part in transport

---------

Co-authored-by: Atterpac <Capretta.Michael@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-12-07 22:19:12 +11:00
Lea Anthony
3594b77666 feat(v3): add cross-platform build system and signing support
Add Docker-based cross-compilation for building Wails apps on any platform:
- Linux builds from macOS/Windows using Docker with Zig
- Windows builds with CGO from Linux/macOS using Docker
- macOS builds from Linux/Windows using Docker with osxcross

Add wails3 tool lipo command using konoui/lipo library for creating
macOS universal binaries on any platform.

Add code signing infrastructure:
- wails3 sign wrapper command (like build/package)
- wails3 tool sign low-level command for Taskfiles
- wails3 setup signing interactive wizard
- wails3 setup entitlements for macOS entitlements
- Keychain integration for secure credential storage

Update all platform Taskfiles with signing tasks:
- darwin:sign, darwin:sign:notarize
- windows:sign, windows:sign:installer
- linux:sign:deb, linux:sign:rpm, linux:sign:packages

Reorganize documentation:
- Move building/signing guides to guides/build/
- Add platform-specific packaging guides (macos, linux, windows)
- Add cross-platform build documentation
- Add comprehensive signing guide with CI/CD examples
- Add auto-updates guide and updater reference
- Add distribution tutorial

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 13:53:37 +11:00
Lea Anthony
f8175363cf fix(docs): rewrite lifecycle documentation with correct v3 API
- Replace incorrect OnStartup hook with actual v3 lifecycle mechanisms
- Document Services with ServiceStartup/ServiceShutdown interfaces
- Document application-level hooks: ShouldQuit, OnShutdown, PostShutdown
- Document event-based lifecycle with OnApplicationEvent and OnWindowEvent
- Document window hooks with RegisterHook for cancellable events
- Add correct platform-specific defaults for quit-on-last-window-close
- Add JavaScript example to services Quick Start
- Make Taskfile dev task depend on setup task

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 06:34:45 +11:00
Lea Anthony
3f0091aba9 fix(docs): update starlight-blog to v0.25.1 to fix build error 2025-11-24 21:54:59 +11:00
Lea Anthony
55f2782559 fix(docs): update starlight to v0.36.2 to support social links array 2025-11-24 21:52:26 +11:00
Lea Anthony
0d02db8ce6 fix(docs): comment out all broken d2 diagrams and fix invalid aside type 2025-11-24 21:46:26 +11:00
Lea Anthony
7e21ce614a fix(docs): disable broken d2 diagram and fix installer 2025-11-24 21:33:15 +11:00
Lea Anthony
3c78e45426 docs: Trigger rebuild with minor update 2025-11-23 22:36:06 +11:00
Lea Anthony
c8c5bd15e7 fix: Add React integration to Astro config to resolve JSX renderer issue 2025-11-23 21:30:24 +11:00
Lea Anthony
fc510586df fix: Add D2 installation to GitHub Pages workflow and remove temp dev file
- Install D2 binary in GitHub Actions before building docs
- Remove DEVELOPER_GUIDE.md temporary file from docs content
- This fixes the docs build failure on GitHub Pages
2025-11-23 21:28:46 +11:00
Lea Anthony
c84506a8a8 docs: Comprehensive documentation redesign and v3-alpha updates
This commit represents a complete redesign of the Wails v3 documentation structure
and includes all recent v3-alpha updates.

## Major Changes

### Documentation Restructure
- Migrated from /learn to organized /features, /guides, /reference structure
- Created new Quick Start section with installation and first app guides
- Added comprehensive Concepts section explaining architecture and lifecycle
- Reorganized Contributing section with detailed guides for different contribution types
- Added complete API Reference with separate pages for each major component

### New Documentation
- Custom URL Protocols guide with NSIS automatic registration
- Windows Packaging guide with NSIS, MSI, and MSIX options
- Typed Events system with TypeScript binding generation
- Complete menu documentation (Application, Context, System Tray)
- Comprehensive dialog documentation (File, Message, Custom)
- Window management guides (Basics, Events, Frameless, Multiple Windows)
- Bindings documentation (Services, Methods, Models, Best Practices)
- New tutorials: Todo app and Notes app (vanilla JS)

### v3-alpha API Updates
- Typed Events: RegisterEvent[T] with strict mode and binding generation
- Custom Protocols: NSIS macros for automatic Windows protocol registration
- System Tray: Windows Show/Hide now fully functional with tooltip limits
- Window Hidden: Fixed white flash on Windows when creating hidden windows
- Notifications: Corrected import path to pkg/services/notifications
- Frontend Runtime: Events.Emit now returns Promise<boolean> for cancellation

### Documentation Improvements
- Updated all code examples to use @wailsio/runtime imports
- Added platform-specific event tables and examples
- Created comprehensive event reference with use cases
- Added security best practices and validation patterns
- Improved code examples with real-world use cases
- Added troubleshooting sections and common patterns

### Files
- Created: 60+ new documentation pages
- Deleted: Old /learn structure (13 files)
- Modified: 15 existing files for v3-alpha compatibility
- Added: Tutorial assets and showcase images
2025-11-23 20:57:25 +11:00
github-actions[bot]
986efc7e7f chore(v3): bump to v3.0.0-alpha.41 and update changelog [skip ci] 2025-11-23 02:46:07 +00:00
github-actions[bot]
c36618c2ac chore(v3): bump to v3.0.0-alpha.40 and update changelog [skip ci] 2025-11-13 02:38:55 +00:00
github-actions[bot]
c3b169f0d3 chore(v3): bump to v3.0.0-alpha.39 and update changelog [skip ci] 2025-11-12 02:38:00 +00:00
Ian VanSchooten
bbd5d99667
[v3] Typed Events, revisited (#4633)
* Add strong event typings

* Make `EmitEvent` take one data argument only

* Add event registration logic

* Report event cancellation to the emitter

* Prevent registration of system events

* Add support for typed event data initialisation

* Binding generation for events

* Tests for event bindings

* Add vite plugin for typed events

* Fix dev command execution order

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>

* Propagate module path to templates

* Update templates

Co-authored-by: Ian VanSchooten <ian.vanschooten@gmail.com>

* Go mod tidy for examples

* Switch to tsconfig.json for jetbrains IDE support

* Replace jsconfig in example

* Convert vite plugin to typescript

* Downgrade vite for now

The templates all use 5.x

* Remove root plugins dir from npm files

It's now '/dist/plugins'

* Include types for Create

But keep out of the docs

* Assign a type for cancelAll results

* Restore variadic argument in EmitEvent methods

* Support registered events with void data

* Test cases for void alias support

* Support strict mode

* Support custom event hooks

* Update docs

* Update changelog

* Testdata for typed events

* Test data for void alias support

* fix webview_window emit event

* Update changelog.mdx

* Update events

* Fix generator test path normalization for cross-platform compatibility

The generator tests were failing on CI because they compared absolute file paths
in warning messages. These paths differ between development machines and CI environments.

Changes:
- Normalize file paths in warnings to be relative to testcases/ directory
- Handle both Unix and Windows path separators
- Use Unix line endings consistently in test output
- Update all test expectation files to use normalized paths

This ensures tests pass consistently across different environments including
Windows, macOS, Linux, and CI systems.

* Remove stale comment

* Handle errors returned from validation

* Restore variadic argument to Emit (fix bad rebase)

* Event emitters return a boolean

* Don't use `EmitEvent` in docs

Supposedly it's for internal use, according to comment

* Fix event docs (from rebase)

* Ensure all templates specify @wailsio/runtime: "latest"

* Fix Windows test failure due to CRLF line endings

The test was failing on Windows because:
1. Hardcoded "\n" was being used instead of render.Newline when writing
   warning logs, causing CRLF vs LF mismatch
2. The render package import was missing
3. .got.log files weren't being skipped when building expected file list

Changes:
- Add render package import
- Use render.Newline instead of hardcoded "\n" for cross-platform compatibility
- Skip .got.log files in test file walker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix template tests by using local runtime package

The template tests were failing because they were installing @wailsio/runtime@latest from npm, which doesn't have the new vite plugin yet. This change packs the local runtime and uses it in template tests instead.

Changes:
- Pack the runtime to a tarball in test_js job
- Upload the runtime package as an artifact
- Download and install the local runtime in template tests before building
- Update cleanup job to delete the runtime package artifact

* Apply suggestion from @leaanthony

* Fix: Install local runtime in frontend directory with correct path

The previous fix wasn't working because:
1. npm install was run in the project root, not in frontend/
2. wails3 build runs npm install again, which would reinstall from npm

Fixed by:
- Using npm pkg set to modify package.json to use file:// protocol
- This ensures subsequent npm install calls use the local tarball

* Fix Vue template syntax conflicts with Go template delimiters

The Vue templates were converted to .tmpl files to support dynamic module
paths, but Vue's template syntax {{ }} conflicts with Go's template syntax.

Fixed by escaping Vue template braces:
- {{ becomes {{"{{"}}
- }} becomes {{"}}"}}

This allows the Go template engine to output the literal {{ }} for Vue to process.

* Fix Vue template escaping and Windows shell compatibility

Two issues fixed:

1. Vue template escaping: Changed from {{"{{"}} to {{ "{{" }}
   - The previous syntax caused "missing value for command" error
   - Correct Go template syntax uses spaces between delimiters and strings

2. Windows PowerShell compatibility: Added 'shell: bash' to template generation step
   - The bash syntax (ls, head, $()) doesn't work in PowerShell
   - Git Bash is available on all GitHub runners including Windows

* Fix: test_templates depends on test_js for runtime package artifact

The runtime-package artifact is created in test_js job, not test_go.
Added test_js to the needs array so the artifact is available for download.

* Fix Windows path compatibility for runtime package artifact

Changed from absolute Unix path '/tmp/wails-runtime' to relative path
'wails-runtime-temp' which works cross-platform. Using realpath to
convert to absolute path for file:// URL in npm pkg set command.

* Fix realpath issue on Windows for runtime package

realpath on Windows Git Bash was producing malformed paths with duplicate
drive letters (D:\d\a\...). Replaced with portable solution using pwd
that works correctly across all platforms.

* Use pwd -W on Windows to get native Windows paths

Git Bash's pwd returns Unix-style paths (/d/a/wails/wails) which npm
then incorrectly resolves as D:/d/a/wails/wails. Using pwd -W returns
native Windows paths (D:\a\wails\wails) that npm can handle correctly.

This is the root cause of all the Windows path issues.

* Improve typechecking for Events.Emit()

* [docs] Clarify where `Events` is imported from in each example

* Add docs for runtime Events.Emit()

* Revert to v2-style Events.Emit (name, data)

* Update changelog

---------

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>
Co-authored-by: Atterpac <Capretta.Michael@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-11 20:25:57 +11:00
github-actions[bot]
6e4e340ade chore(v3): bump to v3.0.0-alpha.38 and update changelog [skip ci] 2025-11-04 02:38:30 +00:00
github-actions[bot]
8ac5984dfd chore(v3): bump to v3.0.0-alpha.37 and update changelog [skip ci] 2025-11-02 02:39:44 +00:00
github-actions[bot]
57d55643bc chore(v3): bump to v3.0.0-alpha.36 and update changelog [skip ci] 2025-10-15 02:36:28 +00:00
github-actions[bot]
8cd89fc5ef chore(v3): bump to v3.0.0-alpha.35 and update changelog [skip ci] 2025-10-14 02:34:13 +00:00
github-actions[bot]
ca594c5919 chore(v3): bump to v3.0.0-alpha.34 and update changelog [skip ci] 2025-10-06 02:34:59 +00:00