Swiftpack.co - Swift Packages by j-f1

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by j-f1

j-f1/MenuBuilder v3.0.0
Swift Function Builder for creating NSMenuItems
⭐️ 53
🕓 1 year ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v3.0.0
1 year ago
* (Potentially **BREAKING**) When your app has a deployment target of macOS 12 or newer, passing a string literal to `MenuItem("Title Here")` will now create a `String.LocalizationValue`, which will make it easier to localize your app if you use MenuBuilder. * If your app is not localized (or your deployment target is macOS 11 or older), you shouldn’t notice any changes. * If your app is localized, review your UI that uses MenuBuilder and make sure that you’re not getting any unexpected translations. You can migrate to `MenuItem(verbatim: "Title Here")` if you want to opt out of the new behavior. * Thanks to @ShikiSuen for getting this started!
1 year ago
Check out the new API docs! https://menubuilder.jedfox.com New Features: * Add `action` and `tag` modifiers (Thanks @patr0nus!) * Update the SwiftUI custom view wrapper to use Auto Layout (Thanks @rurza!) * Add support for menu item titles using `AttributedString` on macOS 12+ * Add a convenience initializer to `NSMenu` that takes a `title` and an `@MenuBuilder` closure * Deprecate the `MenuItem(_:children:)` initializer in favor of `MenuItem(title).submenu { ... children ... }` * Add an `onSelect(target:action:)` convenience method to set the `target` and `action` at the same time. Bugfixes: * Update the SwiftUI custom view wrapper’s selection indicator to match the menu styling of macOS Big Sur and later (Thanks @rurza!) * Make the parameter to `toolTip` optional (Thanks @mlch911!) * `update()` is now called on an `NSMenu` when you use the `replaceItems` API
macOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics