This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @available(iOS 15.0, *) | |
| public struct RichTextEditor : SwiftUICore.View { | |
| public init(text: SwiftUICore.Binding<Foundation.AttributedString>) | |
| @_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View { | |
| get | |
| } | |
| @available(iOS 15.0, *) | |
| public typealias Body = @_opaqueReturnTypeOf("$s7SwiftUI14RichTextEditorV4bodyQrvp", 0) __ | |
| } | |
| @available(*, unavailable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
| ## Core Principles | |
| 1. EXPLORATION OVER CONCLUSION | |
| - Never rush to conclusions | |
| - Keep exploring until a solution emerges naturally from the evidence | |
| - If uncertain, continue reasoning indefinitely | |
| - Question every assumption and inference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import SwiftUI | |
| import UIKit | |
| extension UIBlurEffect { | |
| public static func variableBlurEffect(radius: Double, imageMask: UIImage) -> UIBlurEffect? { | |
| let methodType = (@convention(c) (AnyClass, Selector, Double, UIImage) -> UIBlurEffect).self | |
| let selectorName = ["imageMask:", "effectWithVariableBlurRadius:"].reversed().joined() | |
| let selector = NSSelectorFromString(selectorName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use objc::{msg_send, sel, sel_impl}; | |
| use rand::{distributions::Alphanumeric, Rng}; | |
| use tauri::{ | |
| plugin::{Builder, TauriPlugin}, | |
| Manager, Runtime, Window, | |
| }; // 0.8 | |
| const WINDOW_CONTROL_PAD_X: f64 = 15.0; | |
| const WINDOW_CONTROL_PAD_Y: f64 = 23.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // NSApplication+openSettings.swift | |
| // | |
| // Created by Stephan Casas on 12/3/23. | |
| // | |
| import SwiftUI; | |
| fileprivate let kAppMenuInternalIdentifier = "app" | |
| fileprivate let kSettingsLocalizedStringKey = "Settings\\U2026"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| final class SwiftUIView<Content: View>: UIView { | |
| private var heightConstraint: NSLayoutConstraint? | |
| init(content: Content, onSizeChanged: @escaping (CGSize) -> Void) { | |
| super.init(frame: .zero) | |
| let sizeReadingContent = content.readSize { [weak self] newSize in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// MIT License | |
| /// | |
| /// Copyright (c) 2021 Lukas Kubanek, Structured Path GmbH | |
| /// | |
| /// 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CFLAGS := -O2 -fPIC | |
| test: libdontfree.dylib test.swift | |
| swiftc -L. -ldontfree test.swift | |
| %.o: %.c | |
| $(CC) $(CFLAGS) -c -o $@ $^ | |
| libdontfree.dylib: dont-free.o | |
| $(CC) $(LDFLAGS) -shared -o $@ $^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import Combine | |
| public struct ChangeObserver<V: Equatable>: ViewModifier { | |
| public init(newValue: V, action: @escaping (V) -> Void) { | |
| self.newValue = newValue | |
| self.newAction = action | |
| } | |
| private typealias Action = (V) -> Void |