├── .github └── workflows │ └── test.yml ├── .gitignore ├── Examples └── Github-App │ ├── Github-App.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Github-App.xcscheme │ └── xcuserdata │ │ └── ryu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── Github-App │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Client │ │ └── GithubRepositoryClient.swift │ ├── GithubApp.swift │ ├── Model │ │ └── Repository.swift │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ └── View │ │ ├── RepositoryView.swift │ │ └── RootView.swift │ └── Github-AppTests │ ├── RepositoryReducerTests.swift │ └── RootReducerTests.swift ├── LICENSE ├── Makefile ├── Mintfile ├── Package.resolved ├── Package.swift ├── README.md ├── Sources ├── SimplexArchitecture │ ├── ActionSendable.swift │ ├── Internal │ │ ├── ActionTransition.swift │ │ ├── Collection+safe.swift │ │ ├── Dependencies+isTesting.swift │ │ ├── EffectContext.swift │ │ ├── Exported.swift │ │ ├── RuntimeWarning.swift │ │ ├── Task+withEffectContext.swift │ │ └── TestOnly.swift │ ├── Macros.swift │ ├── Reducer │ │ ├── DependenciesOverrideModifier.swift │ │ ├── ReducerModifier.swift │ │ └── ReducerProtocol.swift │ ├── Send.swift │ ├── SendTask.swift │ ├── SideEffect │ │ ├── CancellationStorage.swift │ │ └── SideEffect.swift │ ├── StateContainer.swift │ ├── Store │ │ ├── Store+pullback.swift │ │ ├── Store+send.swift │ │ └── Store.swift │ ├── SwiftUI │ │ ├── Alert.swift │ │ └── ConfirmationDialog.swift │ ├── TaskResult+VoidSuccess.swift │ ├── TaskResult.swift │ ├── TestStore.swift │ └── ViewStateProtocol.swift ├── SimplexArchitectureMacrosPlugin │ ├── Extensions │ │ ├── DeclGroupSyntax.swift │ │ ├── DeclModifierListSyntax+accessModifier.swift │ │ ├── HasName.swift │ │ ├── String+modifiying.swift │ │ ├── StructDeclSyntax+variables.swift │ │ ├── VariableDeclSyntax+filter.swift │ │ └── VariableDeclSyntax+variableName.swift │ ├── Reducer │ │ ├── ReducerMacro+extensionMacro.swift │ │ ├── ReducerMacro+memberMacro.swift │ │ └── ReducerMacroDiagnostic.swift │ ├── SimplexArchitectureMacrosPlugin.swift │ └── ViewState │ │ ├── ViewStateMacro+extensionMacro.swift │ │ ├── ViewStateMacro+memberMacro.swift │ │ └── ViewStateMacroDiagnostic.swift └── swiftui-simplex-architecture-benchmark │ ├── ActionSendable.swift │ └── main.swift ├── Tests └── SimplexArchitectureTests │ ├── ActionSendableTests.swift │ ├── CollectionTests.swift │ ├── DependenciesOverrideModifierTests.swift │ ├── ReducerMacroTests.swift │ ├── ReducerTests.swift │ ├── SendTests.swift │ ├── StateContainerTests.swift │ ├── StoreTests.swift │ ├── TaskResultTests.swift │ ├── TestOnlyTests.swift │ ├── TestStoreTests.swift │ ├── TestUtilities.swift │ └── ViewStateMacroTests.swift ├── docs ├── css │ ├── chunk-c0335d80.10a2f091.css │ ├── documentation-topic.1d1eec04.css │ ├── documentation-topic~topic.b6287bcf.css │ ├── documentation-topic~topic~tutorials-overview.d6f5411c.css │ ├── index.038e887c.css │ ├── topic.d8c126f3.css │ └── tutorials-overview.c249c765.css ├── data │ └── documentation │ │ ├── simplexarchitecture.json │ │ └── simplexarchitecture │ │ ├── actionprotocol.json │ │ ├── actionprotocol │ │ ├── init(reduceraction:).json │ │ ├── init(viewaction:).json │ │ ├── reduceraction.json │ │ └── viewaction.json │ │ ├── actionsendable.json │ │ ├── actionsendable │ │ ├── pullback(to:parent:).json │ │ ├── pullback(to:parent:id:).json │ │ ├── reducer.json │ │ ├── send(_:).json │ │ ├── send(_:animation:).json │ │ ├── send(_:transaction:).json │ │ ├── store.json │ │ ├── teststore(viewstate:withdependencies:).json │ │ └── viewstate.json │ │ ├── reducer().json │ │ ├── reducermodifier.json │ │ ├── reducermodifier │ │ ├── base.json │ │ └── reduce(into:action:).json │ │ ├── reducerprotocol.json │ │ ├── reducerprotocol │ │ ├── action.json │ │ ├── dependency(_:value:).json │ │ ├── reduce(into:action:).json │ │ ├── reduceraction.json │ │ ├── reducerstate.json │ │ ├── target.json │ │ └── viewaction.json │ │ ├── send.json │ │ ├── send │ │ ├── callasfunction(_:).json │ │ ├── callasfunction(_:animation:).json │ │ └── callasfunction(_:transaction:).json │ │ ├── sendtask.json │ │ ├── sendtask │ │ ├── !=(_:_:).json │ │ ├── cancel().json │ │ ├── equatable-implementations.json │ │ └── wait().json │ │ ├── sideeffect.json │ │ ├── sideeffect │ │ ├── cancel(id:).json │ │ ├── cancellable(id:cancelinflight:).json │ │ ├── concurrent(_:)-4qgg9.json │ │ ├── concurrent(_:)-96jm6.json │ │ ├── debounce(id:for:clock:).json │ │ ├── none.json │ │ ├── run(priority:_:catch:).json │ │ ├── send(_:).json │ │ ├── serial(_:)-7ic0r.json │ │ └── serial(_:)-z10u.json │ │ ├── statecontainer.json │ │ ├── statecontainer │ │ ├── reducerstate.json │ │ └── subscript(dynamicmember:).json │ │ ├── store.json │ │ ├── store │ │ ├── init(reducer:)-3qp8v.json │ │ ├── init(reducer:)-3zvo7.json │ │ ├── init(reducer:initialreducerstate:)-19w60.json │ │ └── init(reducer:initialreducerstate:)-4p9ee.json │ │ ├── swiftui.json │ │ ├── swiftui │ │ ├── view.json │ │ └── view │ │ │ ├── alert(target:unwrapping:).json │ │ │ └── confirmationdialog(target:unwrapping:).json │ │ ├── taskresult.json │ │ ├── taskresult │ │ ├── !=(_:_:).json │ │ ├── ==(_:_:).json │ │ ├── equatable-implementations.json │ │ ├── failure(_:).json │ │ ├── get().json │ │ ├── hash(into:).json │ │ ├── hashable-implementations.json │ │ ├── init(catching:)-24rm0.json │ │ ├── init(catching:)-52auo.json │ │ ├── map(_:).json │ │ └── success(_:).json │ │ ├── teststore.json │ │ ├── teststore │ │ ├── receive(_:timeout:expected:file:line:).json │ │ ├── receivewithoutstatecheck(_:timeout:file:line:).json │ │ ├── send(_:assert:file:line:)-1dcq7.json │ │ ├── send(_:assert:file:line:)-1kmy.json │ │ ├── send(_:assert:file:line:)-4ym.json │ │ ├── send(_:assert:file:line:)-6po0d.json │ │ └── waitforall().json │ │ ├── viewstate().json │ │ ├── viewstateprotocol.json │ │ ├── viewstateprotocol │ │ ├── keypathmap.json │ │ └── target.json │ │ ├── voidsuccess.json │ │ └── voidsuccess │ │ ├── !=(_:_:).json │ │ ├── equatable-implementations.json │ │ ├── init().json │ │ └── init(from:).json ├── developer-og-twitter.jpg ├── developer-og.jpg ├── documentation │ └── simplexarchitecture │ │ ├── actionprotocol │ │ ├── index.html │ │ ├── init(reduceraction:) │ │ │ └── index.html │ │ ├── init(viewaction:) │ │ │ └── index.html │ │ ├── reduceraction │ │ │ └── index.html │ │ └── viewaction │ │ │ └── index.html │ │ ├── actionsendable │ │ ├── index.html │ │ ├── pullback(to:parent:) │ │ │ └── index.html │ │ ├── pullback(to:parent:id:) │ │ │ └── index.html │ │ ├── reducer │ │ │ └── index.html │ │ ├── send(_:) │ │ │ └── index.html │ │ ├── send(_:animation:) │ │ │ └── index.html │ │ ├── send(_:transaction:) │ │ │ └── index.html │ │ ├── store │ │ │ └── index.html │ │ ├── teststore(viewstate:withdependencies:) │ │ │ └── index.html │ │ └── viewstate │ │ │ └── index.html │ │ ├── index.html │ │ ├── reducer() │ │ └── index.html │ │ ├── reducermodifier │ │ ├── base │ │ │ └── index.html │ │ ├── index.html │ │ └── reduce(into:action:) │ │ │ └── index.html │ │ ├── reducerprotocol │ │ ├── action │ │ │ └── index.html │ │ ├── dependency(_:value:) │ │ │ └── index.html │ │ ├── index.html │ │ ├── reduce(into:action:) │ │ │ └── index.html │ │ ├── reduceraction │ │ │ └── index.html │ │ ├── reducerstate │ │ │ └── index.html │ │ ├── target │ │ │ └── index.html │ │ └── viewaction │ │ │ └── index.html │ │ ├── send │ │ ├── callasfunction(_:) │ │ │ └── index.html │ │ ├── callasfunction(_:animation:) │ │ │ └── index.html │ │ ├── callasfunction(_:transaction:) │ │ │ └── index.html │ │ └── index.html │ │ ├── sendtask │ │ ├── !=(_:_:) │ │ │ └── index.html │ │ ├── cancel() │ │ │ └── index.html │ │ ├── equatable-implementations │ │ │ └── index.html │ │ ├── index.html │ │ └── wait() │ │ │ └── index.html │ │ ├── sideeffect │ │ ├── cancel(id:) │ │ │ └── index.html │ │ ├── cancellable(id:cancelinflight:) │ │ │ └── index.html │ │ ├── concurrent(_:)-4qgg9 │ │ │ └── index.html │ │ ├── concurrent(_:)-96jm6 │ │ │ └── index.html │ │ ├── debounce(id:for:clock:) │ │ │ └── index.html │ │ ├── index.html │ │ ├── none │ │ │ └── index.html │ │ ├── run(priority:_:catch:) │ │ │ └── index.html │ │ ├── send(_:) │ │ │ └── index.html │ │ ├── serial(_:)-7ic0r │ │ │ └── index.html │ │ └── serial(_:)-z10u │ │ │ └── index.html │ │ ├── statecontainer │ │ ├── index.html │ │ ├── reducerstate │ │ │ └── index.html │ │ └── subscript(dynamicmember:) │ │ │ └── index.html │ │ ├── store │ │ ├── index.html │ │ ├── init(reducer:)-3qp8v │ │ │ └── index.html │ │ ├── init(reducer:)-3zvo7 │ │ │ └── index.html │ │ ├── init(reducer:initialreducerstate:)-19w60 │ │ │ └── index.html │ │ └── init(reducer:initialreducerstate:)-4p9ee │ │ │ └── index.html │ │ ├── swiftui │ │ ├── index.html │ │ └── view │ │ │ ├── alert(target:unwrapping:) │ │ │ └── index.html │ │ │ ├── confirmationdialog(target:unwrapping:) │ │ │ └── index.html │ │ │ └── index.html │ │ ├── taskresult │ │ ├── !=(_:_:) │ │ │ └── index.html │ │ ├── ==(_:_:) │ │ │ └── index.html │ │ ├── equatable-implementations │ │ │ └── index.html │ │ ├── failure(_:) │ │ │ └── index.html │ │ ├── get() │ │ │ └── index.html │ │ ├── hash(into:) │ │ │ └── index.html │ │ ├── hashable-implementations │ │ │ └── index.html │ │ ├── index.html │ │ ├── init(catching:)-24rm0 │ │ │ └── index.html │ │ ├── init(catching:)-52auo │ │ │ └── index.html │ │ ├── map(_:) │ │ │ └── index.html │ │ └── success(_:) │ │ │ └── index.html │ │ ├── teststore │ │ ├── index.html │ │ ├── receive(_:timeout:expected:file:line:) │ │ │ └── index.html │ │ ├── receivewithoutstatecheck(_:timeout:file:line:) │ │ │ └── index.html │ │ ├── send(_:assert:file:line:)-1dcq7 │ │ │ └── index.html │ │ ├── send(_:assert:file:line:)-1kmy │ │ │ └── index.html │ │ ├── send(_:assert:file:line:)-4ym │ │ │ └── index.html │ │ ├── send(_:assert:file:line:)-6po0d │ │ │ └── index.html │ │ └── waitforall() │ │ │ └── index.html │ │ ├── viewstate() │ │ └── index.html │ │ ├── viewstateprotocol │ │ ├── index.html │ │ ├── keypathmap │ │ │ └── index.html │ │ └── target │ │ │ └── index.html │ │ └── voidsuccess │ │ ├── !=(_:_:) │ │ └── index.html │ │ ├── equatable-implementations │ │ └── index.html │ │ ├── index.html │ │ ├── init() │ │ └── index.html │ │ └── init(from:) │ │ └── index.html ├── favicon.ico ├── favicon.svg ├── img │ ├── added-icon.d6f7e47d.svg │ ├── deprecated-icon.015b4f17.svg │ ├── modified-icon.f496e73d.svg │ └── no-image@2x.df2a0a50.png ├── index.html ├── index │ └── index.json ├── js │ ├── chunk-2d0d3105.cd72cc8e.js │ ├── chunk-c0335d80.76a68cc5.js │ ├── chunk-vendors.ba2dd0cb.js │ ├── documentation-topic.57e91f8a.js │ ├── documentation-topic~topic.1679ec90.js │ ├── documentation-topic~topic~tutorials-overview.90c61522.js │ ├── highlight-js-bash.1b52852f.js │ ├── highlight-js-c.d1db3f17.js │ ├── highlight-js-cpp.eaddddbe.js │ ├── highlight-js-css.75eab1fe.js │ ├── highlight-js-custom-markdown.7cffc4b3.js │ ├── highlight-js-custom-swift.5cda5c20.js │ ├── highlight-js-diff.62d66733.js │ ├── highlight-js-http.163e45b6.js │ ├── highlight-js-java.8326d9d8.js │ ├── highlight-js-javascript.acb8a8eb.js │ ├── highlight-js-json.471128d2.js │ ├── highlight-js-llvm.6100b125.js │ ├── highlight-js-markdown.90077643.js │ ├── highlight-js-objectivec.bcdf5156.js │ ├── highlight-js-perl.757d7b6f.js │ ├── highlight-js-php.cc8d6c27.js │ ├── highlight-js-python.c214ed92.js │ ├── highlight-js-ruby.f889d392.js │ ├── highlight-js-scss.62ee18da.js │ ├── highlight-js-shell.dd7f411f.js │ ├── highlight-js-swift.84f3e88c.js │ ├── highlight-js-xml.9c3688c7.js │ ├── index.e8a5d294.js │ ├── topic.8cd0c0c4.js │ └── tutorials-overview.2a32cd6f.js └── metadata.json └── renovate.json /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | pull_request: 5 | branches: [ "main" ] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | name: Test 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | os: [macos-13] 15 | runs-on: ${{ matrix.os }} 16 | steps: 17 | - name: Setup Xcode 18 | uses: maxim-lobanov/setup-xcode@v1 19 | with: 20 | xcode-version: '15.0' 21 | 22 | - name: Checkout 23 | uses: actions/checkout@v4 24 | 25 | - name: Disable Macro Validation 26 | run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES 27 | 28 | - name: Test 29 | run: | 30 | make test 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .swiftpm/ 2 | .build 3 | Examples/Github-App/Github-App.xcodeproj/project.xcworkspace/contents.xcworkspacedata 4 | Examples/Github-App/Github-App.xcodeproj/project.xcworkspace/xcuserdata/ 5 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App.xcodeproj/xcshareddata/xcschemes/Github-App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 35 | 41 | 42 | 43 | 44 | 45 | 55 | 57 | 63 | 64 | 65 | 66 | 72 | 74 | 80 | 81 | 82 | 83 | 85 | 86 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App.xcodeproj/xcuserdata/ryu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App.xcodeproj/xcuserdata/ryu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Github-App.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 42E697E32ACC0C26008514B1 16 | 17 | primary 18 | 19 | 20 | 42E697F32ACC0C27008514B1 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Client/GithubRepositoryClient.swift: -------------------------------------------------------------------------------- 1 | import Dependencies 2 | import DependenciesMacro 3 | import Foundation 4 | 5 | @Dependencies 6 | struct RepositoryClient { 7 | var fetchRepositories: @Sendable (_ query: String) async throws -> [Repository] 8 | } 9 | 10 | extension RepositoryClient: DependencyKey { 11 | static let liveValue: RepositoryClient = .init( 12 | fetchRepositories: { query in 13 | var component = URLComponents() 14 | component.scheme = "https" 15 | component.host = "api.github.com" 16 | component.path = "/search/repositories" 17 | component.queryItems = [ 18 | URLQueryItem(name: "q", value: query), 19 | ] 20 | 21 | guard let url = component.url else { 22 | return [] 23 | } 24 | 25 | let request = URLRequest(url: url) 26 | let (data, _) = try await URLSession.shared.data(for: request) 27 | let decoder = JSONDecoder() 28 | decoder.keyDecodingStrategy = .convertFromSnakeCase 29 | let response = try decoder.decode(Response.self, from: data) 30 | 31 | return response.items.map { Repository(item: $0) } 32 | } 33 | ) 34 | } 35 | 36 | @DependencyValue(RepositoryClient.self) 37 | extension DependencyValues {} 38 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/GithubApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @main 4 | struct GithubApp: App { 5 | var body: some Scene { 6 | WindowGroup { 7 | RootView() 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Model/Repository.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | struct Repository: Identifiable, Equatable, Hashable { 4 | let id: Int 5 | let url: String 6 | let fullName: String 7 | let avatarUrl: String 8 | let description: String? 9 | let language: String? 10 | let stargazersCount: Int 11 | 12 | init(item: Response.Item) { 13 | id = item.id 14 | url = item.svnUrl 15 | fullName = item.fullName 16 | avatarUrl = item.owner.avatarUrl 17 | description = item.description 18 | language = item.language 19 | stargazersCount = item.stargazersCount 20 | } 21 | } 22 | 23 | struct Response: Decodable { 24 | let items: [Item] 25 | 26 | struct Item: Decodable { 27 | let id: Int 28 | let svnUrl: String 29 | let owner: Owner 30 | let fullName: String 31 | let description: String? 32 | let language: String? 33 | let stargazersCount: Int 34 | 35 | struct Owner: Decodable { 36 | let avatarUrl: String 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-App/View/RepositoryView.swift: -------------------------------------------------------------------------------- 1 | import SimplexArchitecture 2 | import SwiftUI 3 | 4 | @Reducer 5 | struct RepositoryReducer { 6 | enum ViewAction { 7 | case onOpenURLButtonTapped 8 | } 9 | 10 | struct ReducerState { 11 | let url: String 12 | } 13 | 14 | @Dependency(\.openURL) private var openURL 15 | 16 | func reduce( 17 | into state: StateContainer, 18 | action: Action 19 | ) -> SideEffect { 20 | switch action { 21 | case .onOpenURLButtonTapped: 22 | return .run { _ in 23 | await openURL(URL(string: state.reducerState.url)!) 24 | } 25 | } 26 | } 27 | } 28 | 29 | @ViewState 30 | struct RepositoryView: View { 31 | let store: Store 32 | let repository: Repository 33 | 34 | init(repository: Repository) { 35 | self.repository = repository 36 | store = Store( 37 | reducer: RepositoryReducer(), 38 | initialReducerState: RepositoryReducer.ReducerState(url: repository.url) 39 | ) 40 | } 41 | 42 | var body: some View { 43 | ScrollView { 44 | VStack(spacing: 40) { 45 | VStack { 46 | AsyncImage(url: URL(string: repository.avatarUrl)!) 47 | if let description = repository.description { 48 | Text(description) 49 | .font(.headline) 50 | } 51 | } 52 | 53 | VStack(alignment: .leading) { 54 | Text("star: \(repository.stargazersCount)") 55 | Text("language: \(repository.language ?? "unknown")") 56 | } 57 | .font(.subheadline) 58 | 59 | Button { 60 | send(.onOpenURLButtonTapped) 61 | } label: { 62 | Text("Open GitHub URL") 63 | .font(.body) 64 | .foregroundStyle(.white) 65 | .padding() 66 | .background(.black) 67 | .clipShape(Capsule()) 68 | } 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-AppTests/RepositoryReducerTests.swift: -------------------------------------------------------------------------------- 1 | import Dependencies 2 | @testable import Github_App 3 | import SimplexArchitecture 4 | import XCTest 5 | 6 | @MainActor 7 | final class RepositoryReducerTests: XCTestCase { 8 | func testOpenURLButtonTapped() async { 9 | let isCalled = LockIsolated(false) 10 | 11 | let store = RepositoryView(repository: .stub) 12 | .testStore(viewState: .init()) { 13 | $0.openURL = .init { _ in isCalled.setValue(true); return true } 14 | } 15 | 16 | await store.send(.onOpenURLButtonTapped) 17 | 18 | XCTAssertTrue(isCalled.value) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Examples/Github-App/Github-AppTests/RootReducerTests.swift: -------------------------------------------------------------------------------- 1 | @testable import Github_App 2 | import SimplexArchitecture 3 | import XCTest 4 | 5 | @MainActor 6 | final class RootReducerTests: XCTestCase { 7 | func testTextChanged() async { 8 | let store = RootView().testStore(viewState: .init(searchText: "text")) { 9 | $0.repositoryClient.fetchRepositories = { _ in [.stub] } 10 | $0.continuousClock = ImmediateClock() 11 | } 12 | 13 | await store.send(.textChanged) 14 | await store.receive(\.queryChangeDebounced, timeout: 1) { 15 | $0.isLoading = true 16 | } 17 | await store.receive(\.fetchRepositoriesResponse.success, timeout: 1) { 18 | $0.repositories = [.stub] 19 | $0.isLoading = false 20 | } 21 | } 22 | 23 | func testTextChangedWithFailure() async { 24 | let error = CancellationError() 25 | let store = RootView().testStore(viewState: .init(searchText: "text")) { 26 | $0.repositoryClient.fetchRepositories = { _ in throw error } 27 | $0.continuousClock = ImmediateClock() 28 | } 29 | 30 | await store.send(.textChanged) 31 | await store.receive(\.queryChangeDebounced, timeout: 1) { 32 | $0.isLoading = true 33 | } 34 | await store.receive(\.fetchRepositoriesResponse.failure, timeout: 1) { 35 | $0.isLoading = false 36 | $0.alertState = .init { 37 | TextState("An Error has occurred.") 38 | } actions: { 39 | ButtonState { 40 | TextState("OK") 41 | } 42 | ButtonState(action: .alert(.retry)) { 43 | TextState("Retry") 44 | } 45 | } message: { 46 | TextState(error.localizedDescription) 47 | } 48 | } 49 | } 50 | 51 | func testEmptyTextChanged() async { 52 | let store = RootView().testStore(viewState: .init(repositories: [.stub])) 53 | await store.send(.textChanged) { 54 | $0.repositories = [] 55 | } 56 | } 57 | } 58 | 59 | extension Repository { 60 | static let stub = Repository( 61 | item: Response.Item( 62 | id: 0, 63 | svnUrl: "https://github.com/Ryu0118", 64 | owner: .init(avatarUrl: "https://github.com/Ryu0118.png"), 65 | fullName: "", 66 | description: "", 67 | language: "", 68 | stargazersCount: 0 69 | ) 70 | ) 71 | } 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Ryu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | MINTRUN = mint run 2 | DOCC_TARGET = SimplexArchitecture 3 | DOCC_DIR = ./docs 4 | 5 | .PHONY: bootstrap 6 | format: 7 | mint bootstrap 8 | 9 | .PHONY: format 10 | format: 11 | $(MINTRUN) swiftformat . 12 | 13 | .PHONY: test 14 | test: 15 | swift test -v 16 | 17 | .PHONY: benchmark 18 | benchmark: 19 | swift run --configuration release swiftui-simplex-architecture-benchmark 20 | 21 | .PHONY: docc 22 | docc: 23 | swift package --allow-writing-to-directory $(DOCC_DIR) \ 24 | generate-documentation --target $(DOCC_TARGET) \ 25 | --disable-indexing \ 26 | --transform-for-static-hosting \ 27 | --hosting-base-path swiftui-simplex-architecture \ 28 | --output-path $(DOCC_DIR) 29 | 30 | .PHONY: docc-preview 31 | docc-preview: 32 | swift package --disable-sandbox preview-documentation --target $(DOCC_TARGET) 33 | -------------------------------------------------------------------------------- /Mintfile: -------------------------------------------------------------------------------- 1 | nicklockwood/SwiftFormat@0.54.6 2 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import CompilerPluginSupport 5 | import PackageDescription 6 | 7 | let package = Package( 8 | name: "swiftui-simplex-architecture", 9 | platforms: [ 10 | .iOS(.v13), 11 | .macOS(.v10_15), 12 | .tvOS(.v13), 13 | .watchOS(.v6), 14 | ], 15 | products: [ 16 | // Products define the executables and libraries a package produces, making them visible to other packages. 17 | .library( 18 | name: "SimplexArchitecture", 19 | targets: ["SimplexArchitecture"] 20 | ), 21 | ], 22 | dependencies: [ 23 | .package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.2"), 24 | .package(url: "https://github.com/pointfreeco/swift-case-paths.git", from: "1.2.1"), 25 | .package(url: "https://github.com/pointfreeco/swift-custom-dump.git", from: "1.1.2"), 26 | .package(url: "https://github.com/pointfreeco/swift-dependencies.git", from: "1.3.9"), 27 | .package(url: "https://github.com/pointfreeco/swiftui-navigation.git", from: "1.2.0"), 28 | .package(url: "https://github.com/pointfreeco/swift-macro-testing.git", from: "0.2.2"), 29 | .package(url: "https://github.com/google/swift-benchmark", from: "0.1.2"), 30 | .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"), 31 | .package(url: "https://github.com/pointfreeco/swift-concurrency-extras.git", from: "1.1.0") 32 | ], 33 | targets: [ 34 | // Targets are the basic building blocks of a package, defining a module or a test suite. 35 | // Targets can depend on other targets in this package and products from dependencies. 36 | .target( 37 | name: "SimplexArchitecture", 38 | dependencies: [ 39 | "SimplexArchitectureMacrosPlugin", 40 | .product(name: "CasePaths", package: "swift-case-paths"), 41 | .product(name: "CustomDump", package: "swift-custom-dump"), 42 | .product(name: "Dependencies", package: "swift-dependencies"), 43 | .product(name: "SwiftUINavigation", package: "swiftui-navigation"), 44 | .product(name: "DependenciesMacros", package: "swift-dependencies"), 45 | .product(name: "ConcurrencyExtras", package: "swift-concurrency-extras") 46 | ] 47 | ), 48 | .executableTarget( 49 | name: "swiftui-simplex-architecture-benchmark", 50 | dependencies: [ 51 | "SimplexArchitecture", 52 | .product(name: "Benchmark", package: "swift-benchmark"), 53 | ] 54 | ), 55 | .macro( 56 | name: "SimplexArchitectureMacrosPlugin", 57 | dependencies: [ 58 | .product(name: "SwiftSyntax", package: "swift-syntax"), 59 | .product(name: "SwiftSyntaxMacros", package: "swift-syntax"), 60 | .product(name: "SwiftCompilerPlugin", package: "swift-syntax"), 61 | .product(name: "SwiftSyntaxBuilder", package: "swift-syntax"), 62 | ] 63 | ), 64 | .testTarget( 65 | name: "SimplexArchitectureTests", 66 | dependencies: [ 67 | "SimplexArchitecture", 68 | "SimplexArchitectureMacrosPlugin", 69 | .product(name: "SwiftSyntaxMacros", package: "swift-syntax"), 70 | .product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"), 71 | .product(name: "MacroTesting", package: "swift-macro-testing"), 72 | ] 73 | ), 74 | ] 75 | ) 76 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/ActionSendable.swift: -------------------------------------------------------------------------------- 1 | import CasePaths 2 | import SwiftUI 3 | import Dependencies 4 | 5 | /// A protocol for send actions to a store. 6 | public protocol ActionSendable { 7 | associatedtype Reducer: ReducerProtocol 8 | associatedtype ViewState: ViewStateProtocol 9 | 10 | /// The store to which actions will be sent. 11 | var store: Store { get } 12 | } 13 | 14 | public extension ActionSendable { 15 | /// Send an action to the store 16 | @discardableResult 17 | func send(_ action: consuming Reducer.ViewAction) -> SendTask { 18 | threadCheck() 19 | return store.send(action, target: self) 20 | } 21 | 22 | @discardableResult 23 | func send(_ action: consuming Reducer.ViewAction, animation: Animation?) -> SendTask { 24 | threadCheck() 25 | return withAnimation(animation) { 26 | store.send(action, target: self) 27 | } 28 | } 29 | 30 | /// Send an action to the store with transaction 31 | @discardableResult 32 | func send(_ action: consuming Reducer.ViewAction, transaction: Transaction) -> SendTask { 33 | threadCheck() 34 | return withTransaction(transaction) { 35 | store.send(action, target: self) 36 | } 37 | } 38 | 39 | @inline(__always) 40 | private func threadCheck() { 41 | #if DEBUG 42 | guard !Thread.isMainThread else { 43 | return 44 | } 45 | runtimeWarning( 46 | """ 47 | "ActionSendable.send" was called on a non-main thread. 48 | 49 | The "Store" class is not thread-safe, and so all interactions with an instance of \ 50 | "Store" must be done on the main thread. 51 | """ 52 | ) 53 | #endif 54 | } 55 | } 56 | 57 | public extension ActionSendable { 58 | /// Pullbacks the `Action` to the specified case path in the parent's reducer. 59 | /// 60 | /// - Parameters: 61 | /// - casePath: The case path to which the action will be pulled back. 62 | /// - parent: The parent `ActionSendable` to which the action will be sent. 63 | /// - Returns: Self 64 | @inlinable 65 | @discardableResult 66 | func pullback( 67 | to casePath: CasePath, 68 | parent: Parent 69 | ) -> Self where Reducer.ReducerState == Never { 70 | store.pullback(to: casePath, parent: parent) 71 | return self 72 | } 73 | 74 | /// Pullbacks the `Action` to the specified case path with an associated identifier in the parent's reducer. 75 | /// This specifies an id to identify which View sent the Action in the ForEach. 76 | /// 77 | /// - Parameters: 78 | /// - casePath: The case path with an associated identifier to which the action will be pulled back. 79 | /// - parent: The parent `ActionSendable` to which the action will be sent. 80 | /// - id: The identifier associated with the action. 81 | /// - Returns: Self. 82 | @inlinable 83 | @discardableResult 84 | func pullback( 85 | to casePath: CasePath, 86 | parent: Parent, 87 | id: ID 88 | ) -> Self where Reducer.ReducerState == Never { 89 | store.pullback(to: casePath, parent: parent, id: id) 90 | return self 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/ActionTransition.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// ``ActionTransition`` represents a transition between viewState in a reducer. It captures the previous and next viewState, the associated side effect,effect context, and the action triggering the transition. 4 | struct ActionTransition { 5 | /// Represents a state. It includes the target state and the reducer state. 6 | struct State { 7 | let state: Reducer.Target.ViewState? 8 | let reducerState: Reducer.ReducerState? 9 | } 10 | 11 | /// The previous state. 12 | let previous: Self.State 13 | /// The next state. 14 | let next: Self.State 15 | /// The associated side effect. 16 | let effect: SideEffect 17 | /// The unique effect context that represents root effect. 18 | let effectContext: UUID 19 | /// The Action that cause a change of state 20 | let action: Reducer.Action 21 | 22 | /// - Parameters: 23 | /// - previous: The previous state. 24 | /// - next: The next state. 25 | /// - effect: The unique effect context that represents parent effect. 26 | /// - effectContext: The unique effect context that represents root effect. 27 | /// - action: The action responsible for the transition. 28 | init( 29 | previous: Self.State, 30 | next: Self.State, 31 | effect: SideEffect, 32 | effectContext: UUID, 33 | for action: Reducer.Action 34 | ) { 35 | self.previous = previous 36 | self.next = next 37 | self.effect = effect 38 | self.effectContext = effectContext 39 | self.action = action 40 | } 41 | 42 | /// Converts the `ActionTransition` to a `StateContainer` representing the next state. 43 | /// 44 | /// - Parameter target: The target reducer. 45 | /// - Returns: A `StateContainer` representing the next state. 46 | func asNextStateContainer(from target: Reducer.Target) -> StateContainer { 47 | asStateContainer(from: target, state: next) 48 | } 49 | 50 | /// Converts the `ActionTransition` to a `StateContainer` representing the previous state. 51 | /// 52 | /// - Parameter target: The target reducer. 53 | /// - Returns: A `StateContainer` representing the previous state. 54 | func asPreviousStateContainer(from target: Reducer.Target) -> StateContainer { 55 | asStateContainer(from: target, state: previous) 56 | } 57 | 58 | private func asStateContainer( 59 | from target: Reducer.Target, 60 | state: Self.State 61 | ) -> StateContainer { 62 | .init( 63 | target, 64 | viewState: state.state, 65 | reducerState: state.reducerState 66 | ) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/Collection+safe.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Collection { 4 | subscript(safe index: Index) -> Element? { 5 | indices.contains(index) ? self[index] : nil 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/Dependencies+isTesting.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | enum IsTestingKey: DependencyKey { 4 | static let liveValue: Bool = _XCTIsTesting 5 | static let testValue: Bool = _XCTIsTesting 6 | } 7 | 8 | extension DependencyValues { 9 | var isTesting: Bool { 10 | get { self[IsTestingKey.self] } 11 | set { self[IsTestingKey.self] = newValue } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/EffectContext.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Enum to determine parent's Effect 4 | enum EffectContext { 5 | @TaskLocal static var id: UUID? 6 | } 7 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/Exported.swift: -------------------------------------------------------------------------------- 1 | @_exported import Dependencies 2 | @_exported import SwiftUINavigation 3 | @_exported import ConcurrencyExtras 4 | @_exported import CasePaths 5 | @_exported import DependenciesMacros 6 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/RuntimeWarning.swift: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // 3 | // Copyright (c) 2020 Point-Free, Inc. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | // https://www.pointfree.co/blog/posts/70-unobtrusive-runtime-warnings-for-libraries 24 | 25 | import Foundation 26 | import os 27 | 28 | func runtimeWarning(_ message: String) { 29 | #if DEBUG 30 | var info = Dl_info() 31 | dladdr( 32 | dlsym( 33 | dlopen(nil, RTLD_LAZY), 34 | "$s10Foundation15AttributeScopesO7SwiftUIE05swiftE0AcDE0D12UIAttributesVmvg" 35 | ), 36 | &info 37 | ) 38 | os_log( 39 | .fault, 40 | dso: dso, 41 | log: OSLog( 42 | subsystem: "com.apple.runtime-issues", 43 | category: "SimplexArchitecture" 44 | ), 45 | "%@", 46 | message 47 | ) 48 | #endif 49 | } 50 | 51 | @usableFromInline 52 | let dso = { () -> UnsafeMutableRawPointer in 53 | let count = _dyld_image_count() 54 | for i in 0 ..< count { 55 | if let name = _dyld_get_image_name(i) { 56 | let swiftString = String(cString: name) 57 | if swiftString.hasSuffix("/SwiftUI") { 58 | if let header = _dyld_get_image_header(i) { 59 | return UnsafeMutableRawPointer(mutating: UnsafeRawPointer(header)) 60 | } 61 | } 62 | } 63 | } 64 | return UnsafeMutableRawPointer(mutating: #dsohandle) 65 | }() 66 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/Task+withEffectContext.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Task where Failure == any Error { 4 | // Granted when there is no EffectContext in the Task. 5 | @discardableResult 6 | static func withEffectContext( 7 | priority: TaskPriority? = nil, 8 | @_inheritActorContext @_implicitSelfCapture operation: @Sendable @escaping () async throws -> Success 9 | ) -> Self { 10 | if let _ = EffectContext.id { 11 | Self(priority: priority, operation: operation) 12 | } else { 13 | Self(priority: priority) { 14 | try await EffectContext.$id.withValue(UUID()) { 15 | try await operation() 16 | } 17 | } 18 | } 19 | } 20 | } 21 | 22 | extension Task where Failure == Never { 23 | // Granted when there is no EffectContext in the Task. 24 | @discardableResult 25 | static func withEffectContext( 26 | priority: TaskPriority? = nil, 27 | @_inheritActorContext @_implicitSelfCapture operation: @Sendable @escaping () async -> Success 28 | ) -> Self { 29 | if let _ = EffectContext.id { 30 | Self(priority: priority, operation: operation) 31 | } else { 32 | Self(priority: priority) { 33 | await EffectContext.$id.withValue(UUID()) { 34 | await operation() 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Internal/TestOnly.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTestDynamicOverlay 3 | 4 | @propertyWrapper 5 | struct TestOnly { 6 | private var _value: T 7 | 8 | @Dependency(\.isTesting) var isTesting 9 | 10 | var wrappedValue: T { 11 | _read { 12 | #if DEBUG 13 | if !isTesting { 14 | runtimeWarning("\(Self.self) is accessible only during Unit tests") 15 | } 16 | #endif 17 | yield _value 18 | } 19 | set { 20 | #if DEBUG 21 | if isTesting { 22 | _value = newValue 23 | } 24 | #endif 25 | } 26 | } 27 | 28 | init(wrappedValue: T) { 29 | _value = wrappedValue 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Macros.swift: -------------------------------------------------------------------------------- 1 | /// Macro to create ViewState struct by extracting properties to which property wrappers such as @State, @Binding @Published, etc. are applied. 2 | /// 3 | /// It is conformed to the `ActionSendable` protocol by the `ViewState` macro. 4 | /// 5 | /// Here is a example code. 6 | /// ```Swift 7 | /// @ViewState 8 | /// struct MyView: View { 9 | /// let store: Store = Store(reducer: MyReducer()) 10 | /// 11 | /// var body: some View { 12 | /// Text("MyView") 13 | /// } 14 | /// } 15 | /// @Reducer 16 | /// struct MyReducer { 17 | /// enum ViewAction { 18 | /// case someAction 19 | /// } 20 | /// 21 | /// @Dependency(\.authRepository) var authRepository 22 | /// @Dependency(\.selfRepository) var selfRepository 23 | /// 24 | /// func reduce(into state: StateContainer, action: Action) -> SideEffect { 25 | /// switch action { 26 | /// case .someAction: 27 | /// return .none 28 | /// } 29 | /// } 30 | /// } 31 | /// ``` 32 | /// Here is a sample code if you want to use ReducerState. 33 | /// ```Swift 34 | /// @ViewState 35 | /// struct MyView: View { 36 | /// let store: Store 37 | /// 38 | /// init() { 39 | /// store = Store(reducer: MyReducer(), initialReducerState: .init(counter: 0)) 40 | /// } 41 | /// 42 | /// var body: some View { 43 | /// Text("MyView") 44 | /// .onTapGesture { 45 | /// send(.someAction) 46 | /// } 47 | /// } 48 | /// } 49 | /// @Reducer 50 | /// struct MyReducer { 51 | /// enum ViewAction { 52 | /// case someAction 53 | /// } 54 | /// 55 | /// struct ReducerState { 56 | /// var counter: Int 57 | /// } 58 | /// 59 | /// func reduce(into state: StateContainer, action: Action) -> SideEffect { 60 | /// switch action { 61 | /// case .someAction: 62 | /// state.reducerState.counter += 1 63 | /// return .none 64 | /// } 65 | /// } 66 | /// } 67 | /// ``` 68 | @attached(member, names: named(ViewState)) 69 | @attached(extension, conformances: ActionSendable) 70 | public macro ViewState() = 71 | #externalMacro(module: "SimplexArchitectureMacrosPlugin", type: "ViewStateMacro") 72 | 73 | /// Macro for creating Action from ViewAction and ReducerAction, and conforming Reducer to ReducerProtocol 74 | @attached(member, names: named(Action), named(ReducerAction)) 75 | @attached(extension, conformances: ReducerProtocol) 76 | public macro Reducer() = 77 | #externalMacro(module: "SimplexArchitectureMacrosPlugin", type: "ReducerMacro") 78 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Reducer/DependenciesOverrideModifier.swift: -------------------------------------------------------------------------------- 1 | import Dependencies 2 | 3 | public struct _DependenciesOverrideModifier: ReducerModifier { 4 | public let base: Base 5 | public let override: (inout DependencyValues) -> Void 6 | 7 | @usableFromInline 8 | init(base: Base, override: @escaping (inout DependencyValues) -> Void) { 9 | self.base = base 10 | self.override = override 11 | } 12 | 13 | @inlinable 14 | public func reduce(into state: StateContainer, action: Base.Action) -> SideEffect { 15 | withDependencies(override) { 16 | base.reduce(into: state, action: action) 17 | } 18 | } 19 | 20 | @inlinable 21 | public func dependency( 22 | _ keyPath: WritableKeyPath, 23 | value: Value 24 | ) -> Self { 25 | Self(base: base) { values in 26 | values[keyPath: keyPath] = value 27 | override(&values) 28 | } 29 | } 30 | } 31 | 32 | public extension ReducerProtocol { 33 | @inlinable 34 | func dependency( 35 | _ keyPath: WritableKeyPath, 36 | value: Value 37 | ) -> _DependenciesOverrideModifier { 38 | .init(base: self) { values in 39 | values[keyPath: keyPath] = value 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Reducer/ReducerModifier.swift: -------------------------------------------------------------------------------- 1 | import Dependencies 2 | import Foundation 3 | 4 | /// Protocols for modifying Reducer behavior 5 | public protocol ReducerModifier { 6 | /// Reducer you want to change behavior 7 | associatedtype Base: ReducerProtocol 8 | 9 | /// Evolve the current state of ActionSendable to the next state. 10 | /// 11 | /// - Parameters: 12 | /// - state: Current state of ActionSendable and ReducerState. ReducerState can be accessed from the `reducerState` property of State.. 13 | /// - action: An Action that can change the state of View and ReducerState. 14 | /// - Returns: An `SideEffect` representing the side effects generated by the reducer. 15 | func reduce(into state: StateContainer, action: Base.Action) -> SideEffect 16 | } 17 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Send.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | /// A type that can send actions back into the system when used from run(priority:operation:catch:fileID:line:). 4 | public struct Send: Sendable { 5 | @usableFromInline 6 | let sendAction: @Sendable (Reducer.Action) -> SendTask 7 | 8 | @usableFromInline 9 | init(sendAction: @Sendable @escaping (Reducer.Action) -> SendTask) { 10 | self.sendAction = sendAction 11 | } 12 | 13 | /// Sends an action back into the system from an effect. 14 | @MainActor 15 | @discardableResult 16 | @inlinable 17 | public func callAsFunction( 18 | _ action: Reducer.Action 19 | ) -> SendTask { 20 | sendAction(action) 21 | } 22 | 23 | /// Sends an action back into the system from an effect. 24 | @MainActor 25 | @discardableResult 26 | @inlinable 27 | public func callAsFunction( 28 | _ action: Reducer.Action, 29 | animation: Animation? 30 | ) -> SendTask { 31 | withAnimation(animation) { 32 | sendAction(action) 33 | } 34 | } 35 | 36 | /// Sends an action back into the system from an effect. 37 | @MainActor 38 | @discardableResult 39 | @inlinable 40 | public func callAsFunction( 41 | _ action: Reducer.Action, 42 | transaction: Transaction 43 | ) -> SendTask { 44 | withTransaction(transaction) { 45 | sendAction(action) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/SendTask.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// The type returned from send(_:) that represents the lifecycle of the effect started from sending an action. 4 | public struct SendTask: Sendable, Hashable { 5 | @usableFromInline 6 | static let never = SendTask(task: nil) 7 | 8 | @usableFromInline 9 | let task: Task? 10 | 11 | @inlinable 12 | init(task: consuming Task?) { 13 | self.task = task 14 | } 15 | 16 | /// Waits for the task to complete asynchronously. 17 | @Sendable 18 | @inlinable 19 | public func wait() async { 20 | await withTaskCancellationHandler { 21 | await task?.value 22 | } onCancel: { 23 | task?.cancel() 24 | } 25 | } 26 | 27 | /// Cancel the task. 28 | @inlinable 29 | public func cancel() { 30 | task?.cancel() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/SideEffect/CancellationStorage.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | final class CancellationStorage { 4 | private var cancellableTasks: [AnyHashable: Set>] = [:] 5 | private let lock = NSRecursiveLock() 6 | 7 | @inlinable 8 | func cancel(id: AnyHashable) { 9 | withLock { 10 | cancellableTasks[id]?.forEach { $0.cancel() } 11 | cancellableTasks[id] = nil 12 | } 13 | } 14 | 15 | @inlinable 16 | func append(id: AnyHashable, task: Task) { 17 | withLock { 18 | cancellableTasks[id, default: []].insert(task) 19 | } 20 | } 21 | 22 | @inlinable 23 | func cancelAll() { 24 | withLock { 25 | cancellableTasks.values.forEach { 26 | $0.forEach { $0.cancel() } 27 | } 28 | cancellableTasks.removeAll() 29 | } 30 | } 31 | 32 | private func withLock(_ operation: () -> T) -> T { 33 | lock.lock() 34 | defer { lock.unlock() } 35 | return operation() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/StateContainer.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTestDynamicOverlay 3 | 4 | /// Container that holds the reducer state and state for a given target conforming to `ActionSendable`. 5 | /// 6 | /// StateContainer is not thread-safe. StateContainer must be accessed from MainActor. 7 | @dynamicMemberLookup 8 | public final class StateContainer { 9 | /// Instance of ReducerState 10 | public var reducerState: Target.Reducer.ReducerState { 11 | _read { yield _reducerState! } 12 | _modify { yield &_reducerState! } 13 | } 14 | 15 | @Dependency(\.isTesting) private var isTesting 16 | @TestOnly var viewState: Target.ViewState? 17 | 18 | var _reducerState: Target.Reducer.ReducerState? 19 | 20 | @usableFromInline 21 | var target: Target 22 | 23 | init( 24 | _ target: consuming Target, 25 | viewState: Target.ViewState? = nil, 26 | reducerState: consuming Target.Reducer.ReducerState? = nil 27 | ) { 28 | self.target = target 29 | self.viewState = viewState 30 | self._reducerState = reducerState 31 | } 32 | 33 | /// Returns Target value from Target.ViewState key path 34 | public subscript(dynamicMember keyPath: WritableKeyPath) -> Value { 35 | _read { 36 | #if DEBUG 37 | guard !isTesting || viewState == nil else { 38 | yield viewState![keyPath: keyPath] 39 | return 40 | } 41 | #endif 42 | if let viewKeyPath = Target.ViewState.keyPathMap[keyPath] as? WritableKeyPath { 43 | yield target[keyPath: viewKeyPath] 44 | } else { 45 | fatalError( 46 | """ 47 | Failed to get WritableKeyPath from \(keyPath). 48 | This operation does not normally fail 49 | """ 50 | ) 51 | } 52 | } 53 | _modify { 54 | #if DEBUG 55 | guard !isTesting || viewState == nil else { 56 | yield &viewState![keyPath: keyPath] 57 | return 58 | } 59 | #endif 60 | if let viewKeyPath = Target.ViewState.keyPathMap[keyPath] as? WritableKeyPath { 61 | yield &target[keyPath: viewKeyPath] 62 | } else { 63 | fatalError( 64 | """ 65 | Failed to get WritableKeyPath from \(keyPath). 66 | This operation does not normally fail 67 | """ 68 | ) 69 | } 70 | } 71 | } 72 | 73 | func copy() -> Self { 74 | Self(target, viewState: viewState, reducerState: _reducerState) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Store/Store+pullback.swift: -------------------------------------------------------------------------------- 1 | import CasePaths 2 | import Foundation 3 | 4 | // MARK: - Pullback 5 | 6 | extension Store { 7 | @inlinable 8 | func pullback( 9 | to casePath: consuming CasePath, 10 | parent: Parent 11 | ) { 12 | pullbackAction = { childAction in 13 | parent.store.send(casePath.embed(childAction), target: parent) 14 | } 15 | } 16 | 17 | @inlinable 18 | func pullback( 19 | to casePath: consuming CasePath, 20 | parent: Parent, 21 | id: consuming ID 22 | ) { 23 | pullbackAction = { childAction in 24 | parent.store.send(casePath.embed((id, childAction)), target: parent) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/Store/Store.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTestDynamicOverlay 3 | 4 | /// `Store` is responsible for managing state and handling actions. 5 | public final class Store { 6 | // The container that holds the ViewState and ReducerState 7 | @usableFromInline 8 | var container: StateContainer? { 9 | didSet { 10 | guard let container else { return } 11 | _send = makeSend(for: container) 12 | } 13 | } 14 | 15 | // Pullback Action to parent Store 16 | @usableFromInline 17 | var pullbackAction: ((Reducer.Action) -> Void)? 18 | // Buffer to store Actions recurrently invoked through SideEffect in a single Action sent from View 19 | @TestOnly 20 | var sentFromEffectActions: [ActionTransition] = [] 21 | // If debounce or cancel is used in SideEffect, the task is stored here 22 | var cancellationStorage = CancellationStorage() 23 | 24 | var _send: Send? 25 | var initialReducerState: (() -> Reducer.ReducerState)? 26 | let reduce: (StateContainer, Reducer.Action) -> SideEffect 27 | 28 | /// Initialize `Store` with the given reducer when the `ReducerState` is `Never`. 29 | public init(reducer: Reducer) where Reducer.ReducerState == Never { 30 | reduce = reducer.reduce 31 | } 32 | 33 | /// Initialize `Store` with the given `Reducer` and initial `ReducerState`. 34 | public init( 35 | reducer: Reducer, 36 | initialReducerState: @autoclosure @escaping () -> Reducer.ReducerState 37 | ) { 38 | reduce = reducer.reduce 39 | self.initialReducerState = initialReducerState 40 | } 41 | 42 | public init>( 43 | reducer: R 44 | ) where Reducer.ReducerState == Never { 45 | reduce = reducer.reduce 46 | } 47 | 48 | /// Initialize `Store` with the given `Reducer` and initial `ReducerState`. 49 | public init>( 50 | reducer: R, 51 | initialReducerState: @autoclosure @escaping () -> Reducer.ReducerState 52 | ) { 53 | reduce = reducer.reduce 54 | self.initialReducerState = initialReducerState 55 | } 56 | 57 | deinit { 58 | cancellationStorage.cancelAll() 59 | } 60 | 61 | @discardableResult 62 | @usableFromInline 63 | func setContainerIfNeeded( 64 | for target: Reducer.Target, 65 | viewState: Reducer.Target.ViewState? = nil 66 | ) -> StateContainer { 67 | if let container { 68 | container.target = target 69 | return container 70 | } else { 71 | let container = StateContainer( 72 | target, 73 | viewState: viewState, 74 | reducerState: initialReducerState?() 75 | ) 76 | self.container = container 77 | return container 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/SwiftUI/Alert.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @available(iOS 15, macOS 12, tvOS 15, watchOS 8, *) 4 | public extension View { 5 | func alert( 6 | target: Target, 7 | unwrapping value: Binding?> 8 | ) -> some View { 9 | alert( 10 | (value.wrappedValue?.title).map(Text.init) ?? Text(""), 11 | isPresented: value.isPresent(), 12 | presenting: value.wrappedValue, 13 | actions: { alertState in 14 | ForEach(alertState.buttons) { button in 15 | Button(role: button.role.map(ButtonRole.init)) { 16 | switch button.action.type { 17 | case let .send(action): 18 | if let action = action { 19 | target.store.send(action, target: target) 20 | } 21 | case let .animatedSend(action, animation): 22 | if let action = action { 23 | _ = withAnimation(animation) { 24 | target.store.send(action, target: target) 25 | } 26 | } 27 | } 28 | } label: { 29 | Text(button.label) 30 | } 31 | } 32 | }, 33 | message: { $0.message.map { Text($0) } } 34 | ) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/SwiftUI/ConfirmationDialog.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | @available(iOS 15, macOS 12, tvOS 15, watchOS 8, *) 4 | public extension View { 5 | func confirmationDialog( 6 | target: Target, 7 | unwrapping value: Binding?> 8 | ) -> some View { 9 | confirmationDialog( 10 | value.wrappedValue.flatMap { Text($0.title) } ?? Text(""), 11 | isPresented: value.isPresent(), 12 | titleVisibility: value.wrappedValue.map { .init($0.titleVisibility) } ?? .automatic, 13 | presenting: value.wrappedValue, 14 | actions: { confirmationDialogState in 15 | ForEach(confirmationDialogState.buttons) { button in 16 | Button(role: button.role.map(ButtonRole.init)) { 17 | switch button.action.type { 18 | case let .send(action): 19 | if let action = action { 20 | target.store.send(action, target: target) 21 | } 22 | case let .animatedSend(action, animation): 23 | if let action = action { 24 | _ = withAnimation(animation) { 25 | target.store.send(action, target: target) 26 | } 27 | } 28 | } 29 | } label: { 30 | Text(button.label) 31 | } 32 | } 33 | }, 34 | message: { $0.message.map { Text($0) } } 35 | ) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/TaskResult+VoidSuccess.swift: -------------------------------------------------------------------------------- 1 | /// A marker type indicating a successful void result. 2 | public struct VoidSuccess: Codable, Sendable, Hashable { 3 | public init() {} 4 | } 5 | 6 | /// An extension on `TaskResult` where the success type is `VoidSuccess`. 7 | public extension TaskResult where Success == VoidSuccess { 8 | /// Creates a new task result by evaluating an async throwing closure. 9 | /// 10 | /// This initializer is used to handle asynchronous operations that produce a result of type `Void`. 11 | /// The provided async, throwing closure is executed in an asynchronous context. If the closure 12 | /// succeeds, the `TaskResult` is created with a success marker of type `VoidSuccess`. If the 13 | /// closure throws an error, the `TaskResult` is generated with the provided error as a failure. 14 | /// 15 | /// This initializer is often used within an async effect that's returned from a reducer. 16 | /// 17 | /// - Parameter body: An async, throwing closure. 18 | @_disfavoredOverload 19 | init(catching body: @Sendable () async throws -> Void) async { 20 | do { 21 | try await body() 22 | self = .success(VoidSuccess()) 23 | } catch { 24 | self = .failure(error) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/TaskResult.swift: -------------------------------------------------------------------------------- 1 | import CustomDump 2 | 3 | /// Result-like type that converts async throws to TaskResult objects 4 | public enum TaskResult: Sendable { 5 | case success(Success) 6 | case failure(any Error) 7 | 8 | @inlinable 9 | public init(catching body: @Sendable () async throws -> Success) async { 10 | do { 11 | self = try .success(await body()) 12 | } catch { 13 | self = .failure(error) 14 | } 15 | } 16 | 17 | @inlinable 18 | public func get() throws -> Success { 19 | switch self { 20 | case let .success(success): 21 | success 22 | case let .failure(error): 23 | throw error 24 | } 25 | } 26 | 27 | @inlinable 28 | public func map(_ transform: (Success) -> T) -> TaskResult { 29 | switch self { 30 | case let .success(value): 31 | return .success(transform(value)) 32 | case let .failure(error): 33 | return .failure(error) 34 | } 35 | } 36 | } 37 | 38 | extension TaskResult: Equatable where Success: Equatable { 39 | public static func == (lhs: TaskResult, rhs: TaskResult) -> Bool { 40 | switch (lhs, rhs) { 41 | case let (.success(lhsValue), .success(rhsValue)): 42 | lhsValue == rhsValue 43 | case let (.failure(lhsError), .failure(rhsError)): 44 | String(customDumping: lhsError) == String(customDumping: rhsError) 45 | default: false 46 | } 47 | } 48 | } 49 | 50 | extension TaskResult: Hashable where Success: Hashable { 51 | public func hash(into hasher: inout Hasher) { 52 | switch self { 53 | case let .success(success): 54 | hasher.combine(success) 55 | case let .failure(error): 56 | if let error = error as? AnyHashable { 57 | hasher.combine(error) 58 | } else { 59 | hasher.combine("error") 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Sources/SimplexArchitecture/ViewStateProtocol.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A protocol that defines the ViewState of a specific Target. 4 | /// Also, it must not use directly, since @ViewState generates a ViewState structure in Target that conforms to the ViewStateProtocol. 5 | public protocol ViewStateProtocol { 6 | /// Copy the properties of the Target that conform to ActionSendable to ViewState. 7 | associatedtype Target: ActionSendable 8 | 9 | /// This is used by StateContainer to obtain the KeyPath of the Target property from the KeyPath of the ViewState property. 10 | /// This property is created by @ViewState. 11 | static var keyPathMap: [PartialKeyPath: PartialKeyPath] { get } 12 | } 13 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/DeclGroupSyntax.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | extension DeclGroupSyntax { 4 | var name: String? { 5 | switch self { 6 | case let structDecl as StructDeclSyntax: 7 | return structDecl.name.text 8 | case let classDecl as ClassDeclSyntax: 9 | return classDecl.name.text 10 | default: 11 | return nil 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/DeclModifierListSyntax+accessModifier.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | extension DeclModifierListSyntax { 4 | var accessModifier: String { 5 | let accessModifiers = [ 6 | "open", "public", "package", "internal", 7 | "fileprivate", "private", 8 | ] 9 | return compactMap { $0.as(DeclModifierSyntax.self)?.name.text } 10 | .filter { accessModifiers.contains($0 ?? "") }.first? 11 | .map { 12 | if $0 == "fileprivate" || $0 == "private" { 13 | "internal" 14 | } else { 15 | $0 16 | } 17 | } ?? "" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/HasName.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | protocol HasName: DeclSyntaxProtocol { 4 | var name: TokenSyntax { get } 5 | } 6 | 7 | extension MemberBlockItemListSyntax.Element { 8 | var hasName: (any HasName)? { 9 | if let enumDecl = decl.as(EnumDeclSyntax.self) { 10 | enumDecl 11 | } else if let structDecl = decl.as(StructDeclSyntax.self) { 12 | structDecl 13 | } else if let classDecl = decl.as(ClassDeclSyntax.self) { 14 | classDecl 15 | } else if let actorDecl = decl.as(ActorDeclSyntax.self) { 16 | actorDecl 17 | } else { 18 | nil 19 | } 20 | } 21 | } 22 | 23 | extension DeclGroupSyntax { 24 | var hasName: (any HasName)? { 25 | if let enumDecl = `as`(EnumDeclSyntax.self) { 26 | enumDecl 27 | } else if let structDecl = `as`(StructDeclSyntax.self) { 28 | structDecl 29 | } else if let classDecl = `as`(ClassDeclSyntax.self) { 30 | classDecl 31 | } else if let actorDecl = `as`(ActorDeclSyntax.self) { 32 | actorDecl 33 | } else if let protocolDecl = `as`(ProtocolDeclSyntax.self) { 34 | protocolDecl 35 | } else { 36 | nil 37 | } 38 | } 39 | } 40 | 41 | extension StructDeclSyntax: HasName {} 42 | extension ClassDeclSyntax: HasName {} 43 | extension ActorDeclSyntax: HasName {} 44 | extension EnumDeclSyntax: HasName {} 45 | extension ProtocolDeclSyntax: HasName {} 46 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/String+modifiying.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | func modifying(_ transform: (Self) throws -> Self) rethrows -> String { 5 | try transform(self) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/StructDeclSyntax+variables.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | extension DeclGroupSyntax { 4 | var variables: [VariableDeclSyntax] { 5 | memberBlock 6 | .members 7 | .compactMap { $0.decl.as(VariableDeclSyntax.self) } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/VariableDeclSyntax+filter.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | extension [VariableDeclSyntax] { 4 | func filter(propertyWrappers: [String]) -> Self { 5 | filter { 6 | $0.attributes.compactMap { $0.as(AttributeSyntax.self) } 7 | .contains { 8 | propertyWrappers.contains($0.attributeName.trimmed.description) 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Extensions/VariableDeclSyntax+variableName.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | 3 | extension VariableDeclSyntax { 4 | var variableName: String? { 5 | bindings.first?.pattern.trimmed.description 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Reducer/ReducerMacro+extensionMacro.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | import SwiftSyntaxMacros 3 | 4 | extension ReducerMacro: ExtensionMacro { 5 | public static func expansion( 6 | of _: SwiftSyntax.AttributeSyntax, 7 | attachedTo declaration: some SwiftSyntax.DeclGroupSyntax, 8 | providingExtensionsOf type: some SwiftSyntax.TypeSyntaxProtocol, 9 | conformingTo _: [SwiftSyntax.TypeSyntax], 10 | in _: some SwiftSyntaxMacros.MacroExpansionContext 11 | ) throws -> [SwiftSyntax.ExtensionDeclSyntax] { 12 | if let inheritedTypes = declaration.inheritanceClause?.inheritedTypes, 13 | inheritedTypes.contains(where: { inherited in 14 | inherited.type.trimmedDescription == "ReducerProtocol" 15 | }) 16 | { 17 | return [] 18 | } 19 | let declSyntax: DeclSyntax = 20 | """ 21 | extension \(type.trimmed): ReducerProtocol {} 22 | """ 23 | return [ 24 | declSyntax.cast(ExtensionDeclSyntax.self), 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/Reducer/ReducerMacroDiagnostic.swift: -------------------------------------------------------------------------------- 1 | import SwiftDiagnostics 2 | import SwiftSyntax 3 | import SwiftSyntaxMacros 4 | 5 | public enum ReducerMacroDiagnostic { 6 | case typealiasCannotBeUsed(name: String) 7 | case cannotFindViewAction(reducer: String) 8 | case notStruct 9 | case duplicatedCase 10 | case noMatchInheritanceClause 11 | case actionMustBeEnum(actionName: String) 12 | } 13 | 14 | extension ReducerMacroDiagnostic: DiagnosticMessage { 15 | func diagnose(at node: some SyntaxProtocol) -> Diagnostic { 16 | Diagnostic(node: Syntax(node), message: self) 17 | } 18 | 19 | public var message: String { 20 | switch self { 21 | case let .typealiasCannotBeUsed(type): 22 | "\(type) cannot be defined with typealias" 23 | 24 | case let .cannotFindViewAction(reducer): 25 | "ViewAction not found in \(reducer)" 26 | 27 | case .notStruct: 28 | "@Reducer can only be applied to struct" 29 | 30 | case .duplicatedCase: 31 | "Cannot have duplicate cases in ViewAction and ReducerAction" 32 | 33 | case .noMatchInheritanceClause: 34 | "The inheritance clause must match between ViewAction and ReducerAction" 35 | 36 | case let .actionMustBeEnum(actionName): 37 | "\(actionName) must be enum" 38 | } 39 | } 40 | 41 | public var severity: DiagnosticSeverity { .error } 42 | 43 | public var diagnosticID: MessageID { 44 | switch self { 45 | case .typealiasCannotBeUsed: 46 | MessageID(domain: "ReducerMacroDiagnostic", id: "typealiasCannotBeUsed") 47 | 48 | case .cannotFindViewAction: 49 | MessageID(domain: "ReducerMacroDiagnostic", id: "cannotFindViewAction") 50 | 51 | case .notStruct: 52 | MessageID(domain: "ReducerMacroDiagnostic", id: "notStruct") 53 | 54 | case .duplicatedCase: 55 | MessageID(domain: "ReducerMacroDiagnostic", id: "duplicatedCase") 56 | 57 | case .noMatchInheritanceClause: 58 | MessageID(domain: "ReducerMacroDiagnostic", id: "noMatchInheritanceClause") 59 | 60 | case .actionMustBeEnum: 61 | MessageID(domain: "ReducerMacroDiagnostic", id: "actionMustBeEnum") 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/SimplexArchitectureMacrosPlugin.swift: -------------------------------------------------------------------------------- 1 | #if canImport(SwiftCompilerPlugin) 2 | import SwiftCompilerPlugin 3 | import SwiftSyntaxMacros 4 | 5 | @main 6 | struct SimplexArchitectureMacrosPlugin: CompilerPlugin { 7 | let providingMacros: [Macro.Type] = [ 8 | ViewStateMacro.self, 9 | ReducerMacro.self, 10 | ] 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/ViewState/ViewStateMacro+extensionMacro.swift: -------------------------------------------------------------------------------- 1 | import SwiftSyntax 2 | import SwiftSyntaxMacros 3 | 4 | extension ViewStateMacro: ExtensionMacro { 5 | public static func expansion( 6 | of _: SwiftSyntax.AttributeSyntax, 7 | attachedTo declaration: some SwiftSyntax.DeclGroupSyntax, 8 | providingExtensionsOf type: some SwiftSyntax.TypeSyntaxProtocol, 9 | conformingTo _: [SwiftSyntax.TypeSyntax], 10 | in _: some SwiftSyntaxMacros.MacroExpansionContext 11 | ) throws -> [SwiftSyntax.ExtensionDeclSyntax] { 12 | try diagnoseDeclaration(attachedTo: declaration) 13 | 14 | if let inheritedTypes = declaration.inheritanceClause?.inheritedTypes, 15 | inheritedTypes.contains(where: { inherited in 16 | inherited.type.trimmedDescription == "ActionSendable" 17 | }) 18 | { 19 | return [] 20 | } 21 | let declSyntax: DeclSyntax = 22 | """ 23 | extension \(type.trimmed): ActionSendable {} 24 | """ 25 | return [ 26 | declSyntax.cast(ExtensionDeclSyntax.self), 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/ViewState/ViewStateMacro+memberMacro.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SwiftSyntax 3 | import SwiftSyntaxBuilder 4 | import SwiftSyntaxMacros 5 | 6 | public struct ViewStateMacro: MemberMacro { 7 | public static func expansion< 8 | Declaration: DeclGroupSyntax, 9 | Context: MacroExpansionContext 10 | >( 11 | of _: AttributeSyntax, 12 | providingMembersOf declaration: Declaration, 13 | in _: Context 14 | ) throws -> [DeclSyntax] { 15 | try diagnoseDeclaration(attachedTo: declaration) 16 | 17 | // SwiftUI's propertyWrapper 18 | let detectingPropertyWrapper = [ 19 | "State", 20 | "Binding", 21 | "ObservableState", 22 | "ObservedObject", 23 | "StateObject", 24 | "FocusState", 25 | "EnvironmentObject", 26 | "GestureState", 27 | "AppStorage", 28 | "Published", 29 | "SceneStorage", 30 | ] 31 | 32 | let viewState = declaration.variables 33 | .filter(propertyWrappers: detectingPropertyWrapper) 34 | .map { $0.with(\.attributes, []).with(\.modifiers, []) } 35 | 36 | let keyPathPairs = viewState 37 | .compactMap(\.variableName) 38 | .filter { !$0.isEmpty } 39 | .map { "\\.\($0): \\.\($0)" } 40 | .joined(separator: ", ") 41 | .modifying { 42 | if $0.isEmpty { 43 | ":" 44 | } else { 45 | $0 46 | } 47 | } 48 | 49 | let accessModifier = declaration.modifiers.accessModifier 50 | 51 | return [ 52 | DeclSyntax( 53 | StructDeclSyntax( 54 | modifiers: [DeclModifierSyntax(name: .identifier(accessModifier))], 55 | name: "ViewState", 56 | inheritanceClause: InheritanceClauseSyntax { 57 | InheritedTypeSyntax(type: TypeSyntax(stringLiteral: "ViewStateProtocol")) 58 | } 59 | ) { 60 | MemberBlockItemListSyntax(viewState.map { MemberBlockItemSyntax(decl: $0) }) 61 | MemberBlockItemListSyntax { 62 | MemberBlockItemSyntax( 63 | decl: DeclSyntax( 64 | "\(raw: accessModifier) static let keyPathMap: [PartialKeyPath: PartialKeyPath<\(raw: declaration.name ?? "")>] = [\(raw: keyPathPairs)]" 65 | ) 66 | ) 67 | } 68 | } 69 | ), 70 | ] 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Sources/SimplexArchitectureMacrosPlugin/ViewState/ViewStateMacroDiagnostic.swift: -------------------------------------------------------------------------------- 1 | import SwiftDiagnostics 2 | import SwiftSyntax 3 | import SwiftSyntaxMacros 4 | 5 | public enum ViewStateMacroDiagnostic { 6 | case requiresStructOrClass 7 | case invalidArgument 8 | } 9 | 10 | extension ViewStateMacroDiagnostic: DiagnosticMessage { 11 | func diagnose(at node: some SyntaxProtocol) -> Diagnostic { 12 | Diagnostic(node: Syntax(node), message: self) 13 | } 14 | 15 | public var message: String { 16 | switch self { 17 | case .requiresStructOrClass: 18 | return "'ViewState' macro can only be applied to struct or class" 19 | case .invalidArgument: 20 | return "invalid arguments" 21 | } 22 | } 23 | 24 | public var severity: DiagnosticSeverity { .error } 25 | 26 | public var diagnosticID: MessageID { 27 | MessageID(domain: "Swift", id: "ViewState.\(self)") 28 | } 29 | } 30 | 31 | public extension ViewStateMacro { 32 | static func diagnoseDeclaration( 33 | attachedTo declaration: some DeclGroupSyntax 34 | ) throws { 35 | guard declaration.as(StructDeclSyntax.self) == nil, 36 | declaration.as(ClassDeclSyntax.self) == nil 37 | else { 38 | return 39 | } 40 | 41 | if let tokenName = declaration.hasName?.name { 42 | throw DiagnosticsError( 43 | diagnostics: [ 44 | ViewStateMacroDiagnostic 45 | .requiresStructOrClass 46 | .diagnose(at: tokenName), 47 | ] 48 | ) 49 | } else { 50 | throw DiagnosticsError( 51 | diagnostics: [ 52 | ViewStateMacroDiagnostic 53 | .requiresStructOrClass 54 | .diagnose(at: declaration), 55 | ] 56 | ) 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Sources/swiftui-simplex-architecture-benchmark/ActionSendable.swift: -------------------------------------------------------------------------------- 1 | import Benchmark 2 | import Combine 3 | import SimplexArchitecture 4 | 5 | let actionSendableSuite = BenchmarkSuite(name: "ActionSendable") { 6 | let testState = TestState() 7 | 8 | $0.benchmark("Write directly to @Published") { 9 | testState.count += 1 10 | } 11 | 12 | $0.benchmark("Send action") { 13 | testState.send(.increment) 14 | } 15 | } 16 | 17 | @Reducer 18 | private struct TestReducer { 19 | enum ViewAction: Equatable { 20 | case increment 21 | } 22 | 23 | func reduce( 24 | into state: StateContainer, 25 | action: Action 26 | ) -> SideEffect { 27 | switch action { 28 | case .increment: 29 | state.count += 1 30 | return .none 31 | } 32 | } 33 | } 34 | 35 | @ViewState 36 | private final class TestState: ObservableObject { 37 | @Published var count = 0 38 | let store: Store = .init(reducer: TestReducer()) 39 | 40 | init(count: Int = 0) { 41 | self.count = count 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Sources/swiftui-simplex-architecture-benchmark/main.swift: -------------------------------------------------------------------------------- 1 | import Benchmark 2 | import SimplexArchitecture 3 | 4 | Benchmark.main([ 5 | actionSendableSuite, 6 | ]) 7 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/ActionSendableTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import SwiftUI 3 | import XCTest 4 | 5 | final class ActionSendableTests: XCTestCase { 6 | func testSend() { 7 | let testView = TestView() 8 | let sendTask1 = testView.send(.c1) 9 | XCTAssertNil(sendTask1.task) 10 | let sendTask2 = testView.send(.c2) 11 | XCTAssertNotNil(sendTask2.task) 12 | } 13 | 14 | func testAnimationSend() { 15 | let testView = TestView() 16 | let sendTask1 = testView.send(.c1, animation: .default) 17 | XCTAssertNil(sendTask1.task) 18 | let sendTask2 = testView.send(.c2, animation: .default) 19 | XCTAssertNotNil(sendTask2.task) 20 | } 21 | 22 | func testTransactionSend() { 23 | let testView = TestView() 24 | let sendTask1 = testView.send(.c1, transaction: .init(animation: .default)) 25 | XCTAssertNil(sendTask1.task) 26 | let sendTask2 = testView.send(.c2, transaction: .init(animation: .default)) 27 | XCTAssertNotNil(sendTask2.task) 28 | } 29 | } 30 | 31 | @Reducer 32 | private struct TestReducer { 33 | enum ViewAction: Equatable { 34 | case c1 35 | case c2 36 | } 37 | 38 | func reduce(into _: StateContainer, action: Action) -> SideEffect { 39 | switch action { 40 | case .c1: 41 | return .none 42 | case .c2: 43 | return .send(.c1) 44 | } 45 | } 46 | } 47 | 48 | @ViewState 49 | private struct TestView: View { 50 | let store: Store 51 | 52 | init(store: Store = Store(reducer: TestReducer())) { 53 | self.store = store 54 | } 55 | 56 | var body: some View { 57 | EmptyView() 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/CollectionTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import XCTest 3 | 4 | final class CollectionTests: XCTestCase { 5 | func testSafe() throws { 6 | let array = ["a", "b"] 7 | XCTAssertNotNil(array[safe: 1]) 8 | XCTAssertNil(array[safe: 2]) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/DependenciesOverrideModifierTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import SwiftUI 3 | import XCTest 4 | 5 | @MainActor 6 | final class DependenciesOverrideModifierTests: XCTestCase { 7 | func testModifier() async { 8 | let isCalled = LockIsolated(false) 9 | let base = BaseView( 10 | store: Store( 11 | reducer: _DependenciesOverrideModifier(base: BaseReducer()) { 12 | $0.test = .init(asyncThrows: { 13 | isCalled.setValue(true) 14 | }) 15 | } 16 | ) 17 | ) 18 | let container = base.store.setContainerIfNeeded(for: base, viewState: .init()) 19 | await base.send(.test).wait() 20 | XCTAssertEqual(container.count, 1) 21 | XCTAssertTrue(isCalled.value) 22 | } 23 | } 24 | 25 | @Reducer 26 | struct BaseReducer { 27 | enum ViewAction { 28 | case test 29 | case callback 30 | } 31 | 32 | @Dependency(\.test) var test 33 | 34 | func reduce(into state: StateContainer, action: Action) -> SideEffect { 35 | switch action { 36 | case .test: 37 | return .run { send in 38 | try await test.asyncThrows() 39 | await send(.callback) 40 | } 41 | case .callback: 42 | state.count += 1 43 | return .none 44 | } 45 | } 46 | } 47 | 48 | @ViewState 49 | struct BaseView: View { 50 | @State var count: Int = 0 51 | let store: Store 52 | 53 | init(store: Store = .init(reducer: BaseReducer())) { 54 | self.store = store 55 | } 56 | 57 | var body: some View { EmptyView() } 58 | } 59 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/SendTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import SwiftUI 3 | import XCTest 4 | 5 | @MainActor 6 | final class SendTests: XCTestCase { 7 | func testNormalSend() { 8 | let isCalled = LockIsolated(false) 9 | let send: Send = Send { _ in 10 | isCalled.setValue(true) 11 | return .never 12 | } 13 | send(.test) 14 | XCTAssertTrue(isCalled.value) 15 | } 16 | 17 | func testAnimationSend() { 18 | let isCalled = LockIsolated(false) 19 | let send: Send = Send { _ in 20 | isCalled.setValue(true) 21 | return .never 22 | } 23 | send(.test, animation: .default) 24 | XCTAssertTrue(isCalled.value) 25 | } 26 | 27 | func testTransactionSend() { 28 | let isCalled = LockIsolated(false) 29 | let send: Send = Send { _ in 30 | isCalled.setValue(true) 31 | return .never 32 | } 33 | send(.test, transaction: .init(animation: .default)) 34 | XCTAssertTrue(isCalled.value) 35 | } 36 | } 37 | 38 | @Reducer 39 | struct EmptyReducer { 40 | enum ViewAction { 41 | case test 42 | } 43 | 44 | func reduce( 45 | into _: StateContainer, 46 | action _: Action 47 | ) -> SideEffect { 48 | .none 49 | } 50 | } 51 | 52 | @ViewState 53 | final class EmptyViewState: ObservableObject { 54 | let store: Store = .init(reducer: EmptyReducer()) 55 | } 56 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/StateContainerTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import SwiftUI 3 | import XCTest 4 | 5 | final class StateContainerTests: XCTestCase { 6 | func testInitialize() throws { 7 | let container = StateContainer(TestView(), viewState: .init()) 8 | XCTAssertNotNil(container.target) 9 | XCTAssertNotNil(container.viewState) 10 | XCTAssertNil(container._reducerState) 11 | } 12 | 13 | func testStateChange() throws { 14 | let container = StateContainer(TestView(), viewState: .init()) 15 | XCTAssertEqual(container.count, 0) 16 | XCTAssertEqual(container.viewState?.count ?? .max, 0) 17 | container.count += 1 18 | XCTAssertEqual(container.count, 1) 19 | XCTAssertEqual(container.viewState?.count ?? .max, 1) 20 | } 21 | 22 | func testCopy() throws { 23 | let container = StateContainer(TestView(), viewState: .init(), reducerState: .init(count: 100)) 24 | let copy = container.copy() 25 | XCTAssertEqual(String(customDumping: container.target), String(customDumping: copy.target)) 26 | XCTAssertEqual(String(customDumping: container.viewState), String(customDumping: copy.viewState)) 27 | XCTAssertEqual(container.reducerState, copy.reducerState) 28 | } 29 | } 30 | 31 | @Reducer 32 | private struct TestReducer { 33 | struct ReducerState: Equatable { 34 | var count = 0 35 | } 36 | 37 | enum ViewAction: Equatable { 38 | case c1 39 | case c2 40 | } 41 | 42 | func reduce(into _: StateContainer, action: Action) -> SideEffect { 43 | switch action { 44 | case .c1: 45 | return .none 46 | case .c2: 47 | return .send(.c1) 48 | } 49 | } 50 | } 51 | 52 | @ViewState 53 | private struct TestView: View { 54 | @State var count = 0 55 | let store: Store 56 | 57 | init(store: Store = Store(reducer: TestReducer(), initialReducerState: .init())) { 58 | self.store = store 59 | } 60 | 61 | var body: some View { 62 | EmptyView() 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/TaskResultTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import XCTest 3 | 4 | final class TaskResultTests: XCTestCase { 5 | func testCatching() async { 6 | let result1 = await TaskResult { 7 | throw CancellationError() 8 | } 9 | switch result1 { 10 | case .success: 11 | XCTFail() 12 | case let .failure(error): 13 | XCTAssertTrue(error is CancellationError) 14 | } 15 | 16 | let result2 = await TaskResult {} 17 | switch result2 { 18 | case .success: 19 | break 20 | case .failure: 21 | XCTFail() 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/TestOnlyTests.swift: -------------------------------------------------------------------------------- 1 | @testable import SimplexArchitecture 2 | import XCTest 3 | 4 | final class TestOnlyTests: XCTestCase { 5 | func testIsTesting() { 6 | var testOnly = withDependencies { 7 | $0.isTesting = true 8 | } operation: { 9 | TestOnly(wrappedValue: true) 10 | } 11 | testOnly.wrappedValue = false 12 | XCTAssertFalse(testOnly.wrappedValue) 13 | } 14 | 15 | func testIsNotTesting() { 16 | var testOnly = withDependencies { 17 | $0.isTesting = false 18 | } operation: { 19 | TestOnly(wrappedValue: true) 20 | } 21 | testOnly.wrappedValue = false 22 | XCTAssertTrue(testOnly.wrappedValue) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/SimplexArchitectureTests/TestUtilities.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | typealias Original = @convention(thin) (UnownedJob) -> Void 4 | typealias Hook = @convention(thin) (UnownedJob, Original) -> Void 5 | 6 | private let _swift_task_enqueueGlobal_hook = dlsym( 7 | dlopen(nil, 0), "swift_task_enqueueGlobal_hook" 8 | ).assumingMemoryBound(to: Hook?.self) 9 | 10 | var swift_task_enqueueGlobal_hook: Hook? { 11 | get { _swift_task_enqueueGlobal_hook.pointee } 12 | set { _swift_task_enqueueGlobal_hook.pointee = newValue } 13 | } 14 | -------------------------------------------------------------------------------- /docs/css/documentation-topic~topic.b6287bcf.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */.generic-modal[data-v-795f7b59]{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;z-index:11000;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;background:none;overflow:auto}.modal-fullscreen[data-v-795f7b59]{align-items:stretch}.modal-fullscreen .container[data-v-795f7b59]{margin:0;flex:1;width:100%;height:100%;padding-top:env(safe-area-inset-top);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left)}.modal-standard[data-v-795f7b59]{padding:20px}.modal-standard .container[data-v-795f7b59]{padding:60px;border-radius:var(--border-radius,4px)}@media screen{[data-color-scheme=dark] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media only screen and (max-width:735px){.modal-standard[data-v-795f7b59]{padding:0;align-items:stretch}.modal-standard .container[data-v-795f7b59]{margin:20px 0 0;padding:50px 30px;flex:1;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}}.backdrop[data-v-795f7b59]{overflow:auto;background:var(--backdrop-background,rgba(0,0,0,.4));-webkit-overflow-scrolling:touch;width:100%;height:100%;position:fixed}.container[data-v-795f7b59]{margin-left:auto;margin-right:auto;width:980px;background:var(--colors-generic-modal-background,var(--color-generic-modal-background));z-index:1;position:relative;overflow:auto;max-width:100%}@media only screen and (max-width:1250px){.container[data-v-795f7b59]{width:692px}}@media only screen and (max-width:735px){.container[data-v-795f7b59]{width:87.5%}}@media only screen and (max-width:320px){.container[data-v-795f7b59]{width:215px}}.close[data-v-795f7b59]{position:absolute;z-index:9999;top:22px;left:22px;width:17px;height:17px;color:#666;cursor:pointer;background:none;border:0;display:flex;align-items:center}.close .close-icon[data-v-795f7b59]{fill:currentColor;width:100%;height:100%}.theme-dark .container[data-v-795f7b59]{background:#000}.theme-dark .container .close[data-v-795f7b59]{color:#b0b0b0}.theme-code .container[data-v-795f7b59]{background-color:var(--code-background,var(--color-code-background))} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionprotocol/init(reduceraction:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducerAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerAction"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionprotocol\/init(reduceraction:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/init(reducerAction:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"init(reducerAction:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducerAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerAction"},{"kind":"text","text":")"}],"symbolKind":"init","externalID":"s:19SimplexArchitecture14ActionProtocolP07reducerC0x07ReducerC0Qz_tcfc","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol":{"role":"symbol","title":"ActionProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionProtocol"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionProtocol"}],"url":"\/documentation\/simplexarchitecture\/actionprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol/init(reducerAction:)":{"role":"symbol","title":"init(reducerAction:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducerAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerAction"},{"kind":"text","text":")"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/init(reducerAction:)","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionprotocol\/init(reduceraction:)"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionprotocol/init(viewaction:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"viewAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ViewAction"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionprotocol\/init(viewaction:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/init(viewAction:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"init(viewAction:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"viewAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ViewAction"},{"kind":"text","text":")"}],"symbolKind":"init","externalID":"s:19SimplexArchitecture14ActionProtocolP04viewC0x04ViewC0Qz_tcfc","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol/init(viewAction:)":{"role":"symbol","title":"init(viewAction:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"viewAction"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ViewAction"},{"kind":"text","text":")"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/init(viewAction:)","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionprotocol\/init(viewaction:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol":{"role":"symbol","title":"ActionProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionProtocol"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionProtocol"}],"url":"\/documentation\/simplexarchitecture\/actionprotocol"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionprotocol/reduceraction.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionprotocol\/reduceraction"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/ReducerAction","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"ReducerAction","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture14ActionProtocolP07ReducerC0Qa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol":{"role":"symbol","title":"ActionProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionProtocol"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionProtocol"}],"url":"\/documentation\/simplexarchitecture\/actionprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol/ReducerAction":{"role":"symbol","title":"ReducerAction","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/ReducerAction","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionprotocol\/reduceraction"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionprotocol/viewaction.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionprotocol\/viewaction"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/ViewAction","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"ViewAction","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture14ActionProtocolP04ViewC0Qa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol/ViewAction":{"role":"symbol","title":"ViewAction","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol\/ViewAction","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionprotocol\/viewaction"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol":{"role":"symbol","title":"ActionProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionProtocol"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionProtocol"}],"url":"\/documentation\/simplexarchitecture\/actionprotocol"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionsendable/reducer.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP","text":"ReducerProtocol"},{"kind":"text","text":" "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Target"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionsendable\/reducer"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/Reducer","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"Reducer","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture14ActionSendableP7ReducerQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable":{"role":"symbol","title":"ActionSendable","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionSendable"}],"abstract":[{"type":"text","text":"A protocol for send actions to a store."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionSendable"}],"url":"\/documentation\/simplexarchitecture\/actionsendable"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/Reducer","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionsendable\/reducer"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionsendable/store.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"store"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store","preciseIdentifier":"s:19SimplexArchitecture5StoreC","text":"Store"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionsendable\/store"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/store","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The store to which actions will be sent."}],"kind":"symbol","metadata":{"role":"symbol","title":"store","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"store"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Store","preciseIdentifier":"s:19SimplexArchitecture5StoreC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":">"}],"symbolKind":"property","externalID":"s:19SimplexArchitecture14ActionSendableP5storeAA5StoreCy7ReducerQzGvp","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable/store":{"role":"symbol","title":"store","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"store"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Store","preciseIdentifier":"s:19SimplexArchitecture5StoreC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"The store to which actions will be sent."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/store","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionsendable\/store"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/Store":{"role":"symbol","title":"Store","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Store"}],"abstract":[{"type":"codeVoice","code":"Store"},{"type":"text","text":" is responsible for managing state and handling actions."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Store"}],"url":"\/documentation\/simplexarchitecture\/store"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable":{"role":"symbol","title":"ActionSendable","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionSendable"}],"abstract":[{"type":"text","text":"A protocol for send actions to a store."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionSendable"}],"url":"\/documentation\/simplexarchitecture\/actionsendable"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/actionsendable/viewstate.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol","preciseIdentifier":"s:19SimplexArchitecture17ViewStateProtocolP","text":"ViewStateProtocol"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/actionsendable\/viewstate"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/ViewState","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"role":"symbol","title":"ViewState","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ViewStateProtocol","preciseIdentifier":"s:19SimplexArchitecture17ViewStateProtocolP"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture14ActionSendableP9ViewStateQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable/ViewState":{"role":"symbol","title":"ViewState","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ViewStateProtocol","preciseIdentifier":"s:19SimplexArchitecture17ViewStateProtocolP"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable\/ViewState","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/actionsendable\/viewstate"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ViewStateProtocol":{"role":"symbol","title":"ViewStateProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewStateProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines the ViewState of a specific Target."},{"type":"text","text":" "},{"type":"text","text":"Also, it must not use directly, since @ViewState generates a ViewState structure in Target that conforms to the ViewStateProtocol."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ViewStateProtocol"}],"url":"\/documentation\/simplexarchitecture\/viewstateprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable":{"role":"symbol","title":"ActionSendable","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionSendable"}],"abstract":[{"type":"text","text":"A protocol for send actions to a store."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionSendable"}],"url":"\/documentation\/simplexarchitecture\/actionsendable"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducer().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@attached"},{"kind":"text","text":"(member, names: named(Action), named(ReducerAction)) "},{"kind":"attribute","text":"@attached"},{"kind":"text","text":"(extension, conformances: "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP","text":"ReducerProtocol"},{"kind":"text","text":") "},{"kind":"keyword","text":"macro"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducer()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Reducer()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Macro for creating Action from ViewAction and ReducerAction, and conforming Reducer to ReducerProtocol"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"macro"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":"()"}],"title":"Reducer()","roleHeading":"Macro","role":"symbol","symbolKind":"macro","externalID":"s:19SimplexArchitecture7Reduceryycfm","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/Reducer()":{"role":"symbol","title":"Reducer()","fragments":[{"kind":"keyword","text":"macro"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Macro for creating Action from ViewAction and ReducerAction, and conforming Reducer to ReducerProtocol"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Reducer()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/reducer()"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducermodifier/base.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Base"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP","text":"ReducerProtocol"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducermodifier\/base"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerModifier\/Base","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reducer you want to change behavior"}],"kind":"symbol","metadata":{"role":"symbol","title":"Base","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Base"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture15ReducerModifierP4BaseQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerModifier"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerModifier":{"role":"symbol","title":"ReducerModifier","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerModifier"}],"abstract":[{"type":"text","text":"Protocols for modifying Reducer behavior"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerModifier","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerModifier"}],"url":"\/documentation\/simplexarchitecture\/reducermodifier"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerModifier/Base":{"role":"symbol","title":"Base","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Base"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ReducerProtocol","preciseIdentifier":"s:19SimplexArchitecture15ReducerProtocolP"}],"abstract":[{"type":"text","text":"Reducer you want to change behavior"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerModifier\/Base","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/reducermodifier\/base"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducerprotocol/action.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Action"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","preciseIdentifier":"s:19SimplexArchitecture14ActionProtocolP","text":"ActionProtocol"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"Action"},{"type":"text","text":" is generated by macro"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducerprotocol\/action"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/Action","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Combined ViewAction and ReducerAction type"}],"kind":"symbol","metadata":{"role":"symbol","title":"Action","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Action"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ActionProtocol","preciseIdentifier":"s:19SimplexArchitecture14ActionProtocolP"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture15ReducerProtocolP6ActionQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol/Action":{"role":"symbol","title":"Action","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Action"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ActionProtocol","preciseIdentifier":"s:19SimplexArchitecture14ActionProtocolP"}],"abstract":[{"type":"text","text":"Combined ViewAction and ReducerAction type"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/Action","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/reducerprotocol\/action"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionProtocol":{"role":"symbol","title":"ActionProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionProtocol"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionProtocol"}],"url":"\/documentation\/simplexarchitecture\/actionprotocol"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducerprotocol/reduceraction.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"},{"kind":"text","text":" "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerAction"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Action"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerAction"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Use when there are Actions that you do not want to expose to the View."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducerprotocol\/reduceraction"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ReducerAction","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Action used only within Reducer."}],"kind":"symbol","metadata":{"role":"symbol","title":"ReducerAction","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture15ReducerProtocolP0C6ActionQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol/ReducerAction":{"role":"symbol","title":"ReducerAction","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerAction"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"abstract":[{"type":"text","text":"Action used only within Reducer."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ReducerAction","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/reducerprotocol\/reduceraction"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducerprotocol/reducerstate.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerState"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducerprotocol\/reducerstate"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ReducerState","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"State used by Reducer. Since the View is not update when the value of ReducerState is changed, it is used for the purpose of improving performance, etc."},{"type":"text","text":" "},{"type":"text","text":"The default is Never."}],"kind":"symbol","metadata":{"role":"symbol","title":"ReducerState","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerState"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture15ReducerProtocolP0C5StateQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol/ReducerState":{"role":"symbol","title":"ReducerState","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerState"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"abstract":[{"type":"text","text":"State used by Reducer. Since the View is not update when the value of ReducerState is changed, it is used for the purpose of improving performance, etc."},{"type":"text","text":" "},{"type":"text","text":"The default is Never."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ReducerState","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/reducerprotocol\/reducerstate"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/reducerprotocol/viewaction.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"},{"kind":"text","text":" "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ViewAction"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Action"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ViewAction"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/reducerprotocol\/viewaction"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ViewAction","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type that holds actions that change the state of the View."}],"kind":"symbol","metadata":{"role":"symbol","title":"ViewAction","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture15ReducerProtocolP10ViewActionQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol/ViewAction":{"role":"symbol","title":"ViewAction","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewAction"}],"abstract":[{"type":"text","text":"A type that holds actions that change the state of the View."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol\/ViewAction","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/reducerprotocol\/viewaction"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ReducerProtocol":{"role":"symbol","title":"ReducerProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines a reducer for a target type."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ReducerProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerProtocol"}],"url":"\/documentation\/simplexarchitecture\/reducerprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/sendtask/cancel().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"cancel"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/sendtask\/cancel()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/cancel()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Cancel the task."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"cancel"},{"kind":"text","text":"()"}],"title":"cancel()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:19SimplexArchitecture8SendTaskV6cancelyyF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask":{"role":"symbol","title":"SendTask","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"SendTask"}],"abstract":[{"type":"text","text":"The type returned from send(_:) that represents the lifecycle of the effect started from sending an action."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SendTask"}],"url":"\/documentation\/simplexarchitecture\/sendtask"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask/cancel()":{"role":"symbol","title":"cancel()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"cancel"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Cancel the task."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/cancel()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/sendtask\/cancel()"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/sendtask/equatable-implementations.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"paths":["\/documentation\/simplexarchitecture\/sendtask\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"SimplexArchitecture"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/sendtask\/!=(_:_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask":{"role":"symbol","title":"SendTask","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"SendTask"}],"abstract":[{"type":"text","text":"The type returned from send(_:) that represents the lifecycle of the effect started from sending an action."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SendTask"}],"url":"\/documentation\/simplexarchitecture\/sendtask"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/sendtask/wait().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@Sendable"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"wait"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/sendtask\/wait()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/wait()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Waits for the task to complete asynchronously."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"wait"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"title":"wait()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:19SimplexArchitecture8SendTaskV4waityyYaYbF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask/wait()":{"role":"symbol","title":"wait()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"wait"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"abstract":[{"type":"text","text":"Waits for the task to complete asynchronously."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask\/wait()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/sendtask\/wait()"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/SendTask":{"role":"symbol","title":"SendTask","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"SendTask"}],"abstract":[{"type":"text","text":"The type returned from send(_:) that represents the lifecycle of the effect started from sending an action."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SendTask","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SendTask"}],"url":"\/documentation\/simplexarchitecture\/sendtask"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/statecontainer/reducerstate.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"reducerState"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Target"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerState"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/statecontainer\/reducerstate"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/StateContainer\/reducerState","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"reducerState"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Target"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerState"}],"title":"reducerState","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:19SimplexArchitecture14StateContainerC07reducerC07Reducer_0fC0QZvp","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/StateContainer"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/StateContainer":{"role":"symbol","title":"StateContainer","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"StateContainer"}],"abstract":[{"type":"text","text":"Container that holds the reducer state and state for a given target conforming to "},{"type":"codeVoice","code":"ActionSendable"},{"type":"text","text":"."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/StateContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"StateContainer"}],"url":"\/documentation\/simplexarchitecture\/statecontainer"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/StateContainer/reducerState":{"role":"symbol","title":"reducerState","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"reducerState"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Target"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerState"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/StateContainer\/reducerState","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/statecontainer\/reducerstate"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/store/init(reducer:)-3zvo7.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducer"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":") "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ReducerState"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Never","preciseIdentifier":"s:s5NeverO"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/store\/init(reducer:)-3zvo7"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store\/init(reducer:)-3zvo7","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initialize "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" with the given reducer when the "},{"type":"codeVoice","code":"ReducerState"},{"type":"text","text":" is "},{"type":"codeVoice","code":"Never"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducer"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":")"}],"title":"init(reducer:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:19SimplexArchitecture5StoreC7reducerACyxGx_tcs5NeverO12ReducerStateRtzrlufc","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/Store":{"role":"symbol","title":"Store","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Store"}],"abstract":[{"type":"codeVoice","code":"Store"},{"type":"text","text":" is responsible for managing state and handling actions."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Store"}],"url":"\/documentation\/simplexarchitecture\/store"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/Store/init(reducer:)-3zvo7":{"role":"symbol","title":"init(reducer:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reducer"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Initialize "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" with the given reducer when the "},{"type":"codeVoice","code":"ReducerState"},{"type":"text","text":" is "},{"type":"codeVoice","code":"Never"},{"type":"text","text":"."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/Store\/init(reducer:)-3zvo7","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/store\/init(reducer:)-3zvo7"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/swiftui.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"paths":["\/documentation\/simplexarchitecture\/swiftui"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SwiftUI","interfaceLanguage":"swift"},"topicSections":[{"title":"Extended Protocols","identifiers":["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SwiftUI\/View"]}],"kind":"symbol","metadata":{"roleHeading":"Extended Module","externalID":"s:m:s:e:s:7SwiftUI4ViewP19SimplexArchitectureE18confirmationDialog6target10unwrappingQrqd___AA7BindingVy0A16UINavigationCore012ConfirmationG5StateVy7Reducer_6ActionQYd__GSgGtAD0P8SendableRd__lF","title":"SwiftUI","symbolKind":"extension","role":"collection","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/SwiftUI/View":{"role":"symbol","title":"View","fragments":[{"kind":"keyword","text":"extension"},{"kind":"text","text":" "},{"kind":"identifier","text":"View","preciseIdentifier":"s:7SwiftUI4ViewP"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SwiftUI\/View","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"View"}],"url":"\/documentation\/simplexarchitecture\/swiftui\/view"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/SwiftUI":{"role":"collection","title":"SwiftUI","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/SwiftUI","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/swiftui"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/equatable-implementations.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/!=(_:_:)","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/==(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"SimplexArchitecture"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/!=(_:_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/==(_:_:)":{"conformance":{"constraints":[{"type":"codeVoice","code":"Success"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Equatable"},{"type":"text","text":" and "},{"type":"codeVoice","code":"Sendable"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"==(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TaskResult","preciseIdentifier":"s:19SimplexArchitecture10TaskResultO"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":">, "},{"kind":"typeIdentifier","text":"TaskResult","preciseIdentifier":"s:19SimplexArchitecture10TaskResultO"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/==(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/==(_:_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/failure(_:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"failure"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Error","preciseIdentifier":"s:s5ErrorP"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/failure(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/failure(_:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"failure"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Error","preciseIdentifier":"s:s5ErrorP"},{"kind":"text","text":")"}],"title":"TaskResult.failure(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:19SimplexArchitecture10TaskResultO7failureyACyxGs5Error_pcAEms8SendableRzlF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/failure(_:)":{"role":"symbol","title":"TaskResult.failure(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"failure"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Error","preciseIdentifier":"s:s5ErrorP"},{"kind":"text","text":")"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/failure(_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/failure(_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/get().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"get"},{"kind":"text","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/get()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/get()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"get"},{"kind":"text","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"}],"title":"get()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:19SimplexArchitecture10TaskResultO3getxyKF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/get()":{"role":"symbol","title":"get()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"get"},{"kind":"text","text":"() "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/get()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/get()"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/hashable-implementations.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/hashable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/Hashable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/hash(into:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"SimplexArchitecture"}],"role":"collectionGroup","title":"Hashable Implementations"},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/hash(into:)":{"conformance":{"constraints":[{"type":"codeVoice","code":"Success"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" and "},{"type":"codeVoice","code":"Sendable"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"hash(into:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"hash"},{"kind":"text","text":"("},{"kind":"externalParam","text":"into"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Hasher","preciseIdentifier":"s:s6HasherV"},{"kind":"text","text":")"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/hash(into:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/hash(into:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/init(catching:)-24rm0.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"catching"},{"kind":"text","text":" "},{"kind":"internalParam","text":"body"},{"kind":"text","text":": () "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/init(catching:)-24rm0"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/init(catching:)-24rm0","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"catching"},{"kind":"text","text":": () "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"}],"title":"init(catching:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:19SimplexArchitecture10TaskResultO8catchingACyxGxyYaYbKXE_tYacfc","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/init(catching:)-24rm0":{"role":"symbol","title":"init(catching:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"catching"},{"kind":"text","text":": () "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/init(catching:)-24rm0","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/init(catching:)-24rm0"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/map(_:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"map"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","preciseIdentifier":"s:19SimplexArchitecture10TaskResultO","text":"TaskResult"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"Sendable","preciseIdentifier":"s:s8SendableP"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/map(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/map(_:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"map"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">(("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"TaskResult","preciseIdentifier":"s:19SimplexArchitecture10TaskResultO"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"map(_:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:19SimplexArchitecture10TaskResultO3mapyACyqd__Gqd__xXEs8SendableRd__lF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/map(_:)":{"role":"symbol","title":"map(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"map"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">(("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"TaskResult","preciseIdentifier":"s:19SimplexArchitecture10TaskResultO"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/map(_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/map(_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/taskresult/success(_:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"success"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/taskresult\/success(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/success(_:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"success"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":")"}],"title":"TaskResult.success(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:19SimplexArchitecture10TaskResultO7successyACyxGxcAEms8SendableRzlF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult/success(_:)":{"role":"symbol","title":"TaskResult.success(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"success"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Success"},{"kind":"text","text":")"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult\/success(_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/taskresult\/success(_:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TaskResult":{"role":"symbol","title":"TaskResult","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"TaskResult"}],"abstract":[{"type":"text","text":"Result-like type that converts async throws to TaskResult objects"}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TaskResult","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TaskResult"}],"url":"\/documentation\/simplexarchitecture\/taskresult"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/teststore/waitforall().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"waitForAll"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/teststore\/waitforall()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TestStore\/waitForAll()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Wait for all of the TestStore’s remaining SendTasks to complete."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"waitForAll"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"title":"waitForAll()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:19SimplexArchitecture9TestStoreC10waitForAllyyYaF","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TestStore"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TestStore/waitForAll()":{"role":"symbol","title":"waitForAll()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"waitForAll"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"}],"abstract":[{"type":"text","text":"Wait for all of the TestStore’s remaining SendTasks to complete."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TestStore\/waitForAll()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/teststore\/waitforall()"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/TestStore":{"role":"symbol","title":"TestStore","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"TestStore"}],"abstract":[{"type":"text","text":"TestStore is a utility class for testing stores that use Reducer protocols."},{"type":"text","text":" "},{"type":"text","text":"It provides methods for sending actions and verifying state changes."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/TestStore","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"TestStore"}],"url":"\/documentation\/simplexarchitecture\/teststore"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/viewstateprotocol/target.json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Target"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable","preciseIdentifier":"s:19SimplexArchitecture14ActionSendableP","text":"ActionSendable"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/viewstateprotocol\/target"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol\/Target","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Copy the properties of the Target that conform to ActionSendable to ViewState."}],"kind":"symbol","metadata":{"role":"symbol","title":"Target","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Target"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ActionSendable","preciseIdentifier":"s:19SimplexArchitecture14ActionSendableP"}],"symbolKind":"associatedtype","externalID":"s:19SimplexArchitecture17ViewStateProtocolP6TargetQa","required":true,"modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/ViewStateProtocol/Target":{"role":"symbol","title":"Target","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Target"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ActionSendable","preciseIdentifier":"s:19SimplexArchitecture14ActionSendableP"}],"abstract":[{"type":"text","text":"Copy the properties of the Target that conform to ActionSendable to ViewState."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol\/Target","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/simplexarchitecture\/viewstateprotocol\/target"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ViewStateProtocol":{"role":"symbol","title":"ViewStateProtocol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ViewStateProtocol"}],"abstract":[{"type":"text","text":"A protocol that defines the ViewState of a specific Target."},{"type":"text","text":" "},{"type":"text","text":"Also, it must not use directly, since @ViewState generates a ViewState structure in Target that conforms to the ViewStateProtocol."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ViewStateProtocol","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ViewStateProtocol"}],"url":"\/documentation\/simplexarchitecture\/viewstateprotocol"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/ActionSendable":{"role":"symbol","title":"ActionSendable","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ActionSendable"}],"abstract":[{"type":"text","text":"A protocol for send actions to a store."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/ActionSendable","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ActionSendable"}],"url":"\/documentation\/simplexarchitecture\/actionsendable"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/voidsuccess/equatable-implementations.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"paths":["\/documentation\/simplexarchitecture\/voidsuccess\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"SimplexArchitecture"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess":{"role":"symbol","title":"VoidSuccess","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"VoidSuccess"}],"abstract":[{"type":"text","text":"A marker type indicating a successful void result."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"VoidSuccess"}],"url":"\/documentation\/simplexarchitecture\/voidsuccess"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/voidsuccess\/!=(_:_:)"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/voidsuccess/init().json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/voidsuccess\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:19SimplexArchitecture11VoidSuccessVACycfc","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/init()","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/voidsuccess\/init()"},"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess":{"role":"symbol","title":"VoidSuccess","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"VoidSuccess"}],"abstract":[{"type":"text","text":"A marker type indicating a successful void result."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"VoidSuccess"}],"url":"\/documentation\/simplexarchitecture\/voidsuccess"}}} -------------------------------------------------------------------------------- /docs/data/documentation/simplexarchitecture/voidsuccess/init(from:).json: -------------------------------------------------------------------------------- 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"from"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Decoder","preciseIdentifier":"s:s7DecoderP"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/simplexarchitecture\/voidsuccess\/init(from:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/init(from:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Decodable.init(from:)"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"from"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Decoder","preciseIdentifier":"s:s7DecoderP"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"title":"init(from:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:19SimplexArchitecture11VoidSuccessV4fromACs7Decoder_p_tKcfc","modules":[{"name":"SimplexArchitecture"}]},"hierarchy":{"paths":[["doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess"]]},"references":{"doc://SimplexArchitecture/documentation/SimplexArchitecture":{"role":"collection","title":"SimplexArchitecture","abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess/init(from:)":{"role":"symbol","title":"init(from:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"from"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Decoder","preciseIdentifier":"s:s7DecoderP"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"abstract":[],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess\/init(from:)","kind":"symbol","type":"topic","url":"\/documentation\/simplexarchitecture\/voidsuccess\/init(from:)"},"doc://SimplexArchitecture/documentation/SimplexArchitecture/VoidSuccess":{"role":"symbol","title":"VoidSuccess","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"VoidSuccess"}],"abstract":[{"type":"text","text":"A marker type indicating a successful void result."}],"identifier":"doc:\/\/SimplexArchitecture\/documentation\/SimplexArchitecture\/VoidSuccess","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"VoidSuccess"}],"url":"\/documentation\/simplexarchitecture\/voidsuccess"}}} -------------------------------------------------------------------------------- /docs/developer-og-twitter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ryu0118/swiftui-simplex-architecture/22a2d370b1a5b7bd7016e1beccdfab3ca79e1b77/docs/developer-og-twitter.jpg -------------------------------------------------------------------------------- /docs/developer-og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ryu0118/swiftui-simplex-architecture/22a2d370b1a5b7bd7016e1beccdfab3ca79e1b77/docs/developer-og.jpg -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ryu0118/swiftui-simplex-architecture/22a2d370b1a5b7bd7016e1beccdfab3ca79e1b77/docs/favicon.ico -------------------------------------------------------------------------------- /docs/favicon.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/img/added-icon.d6f7e47d.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/img/deprecated-icon.015b4f17.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/img/modified-icon.f496e73d.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/img/no-image@2x.df2a0a50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ryu0118/swiftui-simplex-architecture/22a2d370b1a5b7bd7016e1beccdfab3ca79e1b77/docs/img/no-image@2x.df2a0a50.png -------------------------------------------------------------------------------- /docs/js/highlight-js-bash.1b52852f.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-bash"],{f0f8:function(e,s){function t(e){const s=e.regex,t={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={className:"",begin:/\\"/},r={className:"string",begin:/'/,end:/'/},l={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],d=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],u=["true","false"],b={match:/(\/[a-z._-]+)+/},g=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],f=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:m,literal:u,built_in:[...g,...f,"set","shopt",...w,...k]},contains:[d,e.SHEBANG(),h,l,e.HASH_COMMENT_MODE,i,b,c,o,r,t]}}e.exports=t}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-custom-markdown.7cffc4b3.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-custom-markdown","highlight-js-markdown"],{"04b0":function(n,e){function a(n){const e=n.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},t={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},g={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};g.contains.push(o),o.contains.push(g);let r=[a,l];g.contains=g.contains.concat(r),o.contains=o.contains.concat(r),r=r.concat(g,o);const b={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:r},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:r}]}]},u={className:"quote",begin:"^>\\s+",contains:r,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[b,a,t,g,o,u,s,i,l,c]}}n.exports=a},"84cb":function(n,e,a){"use strict";a.r(e);var i=a("04b0"),s=a.n(i);const t={begin:"",returnBegin:!0,contains:[{className:"link",begin:"doc:",end:">",excludeEnd:!0}]},c={className:"link",begin:/`{2}(?!`)/,end:/`{2}(?!`)/,excludeBegin:!0,excludeEnd:!0},d={begin:"^>\\s+[Note:|Tip:|Important:|Experiment:|Warning:]",end:"$",returnBegin:!0,contains:[{className:"quote",begin:"^>",end:"\\s+"},{className:"type",begin:"Note|Tip|Important|Experiment|Warning",end:":"},{className:"quote",begin:".*",end:"$",endsParent:!0}]},l={begin:"@",end:"[{\\)\\s]",returnBegin:!0,contains:[{className:"title",begin:"@",end:"[\\s+(]",excludeEnd:!0},{begin:":",end:"[,\\)\n\t]",excludeBegin:!0,keywords:{literal:"true false null undefined"},contains:[{className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",endsWithParent:!0,excludeEnd:!0},{className:"string",variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}],endsParent:!0},{className:"link",begin:"http|https",endsWithParent:!0,excludeEnd:!0}]}]};e["default"]=function(n){const e=s()(n),a=e.contains.find(({className:n})=>"code"===n);a.variants=a.variants.filter(({begin:n})=>!n.includes("( {4}|\\t)"));const i=[...e.contains.filter(({className:n})=>"code"!==n),a];return{...e,contains:[c,t,d,l,...i]}}}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-diff.62d66733.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-diff"],{"48b8":function(e,n){function a(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-http.163e45b6.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-http"],{c01d:function(e,n){function a(e){const n=e.regex,a="HTTP/(2|1\\.[01])",s=/[A-Za-z][A-Za-z0-9-]*/,t={className:"attribute",begin:n.concat("^",s,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},i=[t,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})",end:/$/,contains:[{className:"meta",begin:a},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},{begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},e.inherit(t,{relevance:0})]}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-java.8326d9d8.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-java"],{"332f":function(e,a){var n="[0-9](_*[0-9])*",s=`\\.(${n})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",t={className:"number",variants:[{begin:`(\\b(${n})((${s})|\\.)?|(${s}))[eE][+-]?(${n})[fFdD]?\\b`},{begin:`\\b(${n})((${s})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${s})[fFdD]?\\b`},{begin:`\\b(${n})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${n})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function r(e,a,n){return-1===n?"":e.replace(a,s=>r(e,a,n-1))}function c(e){e.regex;const a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=a+r("(?:<"+a+"~~~(?:\\s*,\\s*"+a+"~~~)*>)?",/~~~/g,2),s=["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do"],i=["super","this"],c=["false","true","null"],l=["char","boolean","long","float","int","byte","short","double"],o={keyword:s,literal:c,type:l,built_in:i},b={className:"meta",begin:"@"+a,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[a,/\s+/,a,/\s+/,/=/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,a],className:{1:"keyword",3:"title.class"},contains:[_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},t,b]}}e.exports=c}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-json.471128d2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-json"],{"5ad2":function(n,e){function a(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[e,a,n.QUOTE_STRING_MODE,s,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}n.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-llvm.6100b125.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-llvm"],{"7c30":function(e,n){function a(e){const n=e.regex,a=/([-a-zA-Z$._][\w$.-]*)/,t={className:"type",begin:/\bi\d+(?=\s|\b)/},i={className:"operator",relevance:0,begin:/=/},c={className:"punctuation",relevance:0,begin:/,/},l={className:"number",variants:[{begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},r={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},s={className:"variable",variants:[{begin:n.concat(/%/,a)},{begin:/%\d+/},{begin:/#\d+/}]},o={className:"title",variants:[{begin:n.concat(/@/,a)},{begin:/@\d+/},{begin:n.concat(/!/,a)},{begin:n.concat(/!\d+/,a)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[t,e.COMMENT(/;\s*$/,null,{relevance:0}),e.COMMENT(/;/,/$/),e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:/"/,end:/[^\\]"/}]},o,c,i,s,r,l]}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-markdown.90077643.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-markdown"],{"04b0":function(n,e){function a(n){const e=n.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},t={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},g=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,g,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};l.contains.push(o),o.contains.push(l);let b=[a,d];l.contains=l.contains.concat(b),o.contains=o.contains.concat(b),b=b.concat(l,o);const r={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},m={className:"quote",begin:"^>\\s+",contains:b,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[r,a,c,l,o,m,s,i,d,t]}}n.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-objectivec.bcdf5156.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-objectivec"],{"9bf2":function(e,n){function _(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_=/[a-zA-Z@][a-zA-Z0-9_]*/,i=["int","float","while","char","export","sizeof","typedef","const","struct","for","union","unsigned","long","volatile","static","bool","mutable","if","do","return","goto","void","enum","else","break","extern","asm","case","short","default","double","register","explicit","signed","typename","this","switch","continue","wchar_t","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","super","unichar","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],t=["false","true","FALSE","TRUE","nil","YES","NO","NULL"],a=["BOOL","dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],o={$pattern:_,keyword:i,literal:t,built_in:a},s={$pattern:_,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+s.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:s,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}e.exports=_}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-python.c214ed92.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-python"],{9510:function(e,n){function a(e){const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s=["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],t=["__debug__","Ellipsis","False","None","NotImplemented","True"],r=["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:s,literal:t,type:r},o={className:"meta",begin:/^(>>>|\.\.\.) /},b={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,c,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,c,b]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,b]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?\\b`},{begin:`(${g})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${p})[jJ]\\b`}]},_={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},u={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",o,m,d,e.HASH_COMMENT_MODE]}]};return b.contains=[d,m,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|->|\?)|=>/,contains:[o,m,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,_,e.HASH_COMMENT_MODE,{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[u]},{variants:[{match:[/class/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/class/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,u,d]}]}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-ruby.f889d392.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-ruby"],{"82cb":function(e,n){function a(e){const n=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__",built_in:"proc lambda",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],r={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,r]})]}]},t="[1-9](_?[0-9])*|0",o="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${t})(\\.(${o}))?([eE][+-]?(${o})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:i},_=[d,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE,relevance:0}]}].concat(c)},{className:"function",begin:n.concat(/def\s+/,n.lookahead(a+"\\s*(\\(|;|$)")),relevance:0,keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:a}),l].concat(c)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:a}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(b,c),relevance:0}].concat(b,c);r.contains=_,l.contains=_;const w="[>?]>",E="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",N=[{begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta",begin:"^("+w+"|"+E+"|"+u+")(?=[ ])",starts:{end:"$",contains:_}}];return c.unshift(b),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(c).concat(_)}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-shell.dd7f411f.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-shell"],{b65b:function(s,n){function e(s){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}s.exports=e}}]); -------------------------------------------------------------------------------- /docs/js/highlight-js-xml.9c3688c7.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * This source file is part of the Swift.org open source project 3 | * 4 | * Copyright (c) 2021 Apple Inc. and the Swift project authors 5 | * Licensed under Apache License v2.0 with Runtime Library Exception 6 | * 7 | * See https://swift.org/LICENSE.txt for license information 8 | * See https://swift.org/CONTRIBUTORS.txt for Swift project authors 9 | */ 10 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-xml"],{"8dcb":function(e,n){function a(e){const n=e.regex,a=n.concat(/[A-Z_]/,n.optional(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),s=/[A-Za-z0-9._:-]+/,t={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),r=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),g={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,r,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,c,r,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},t,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[g],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[g],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:g}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}e.exports=a}}]); -------------------------------------------------------------------------------- /docs/metadata.json: -------------------------------------------------------------------------------- 1 | {"bundleDisplayName":"SimplexArchitecture","bundleIdentifier":"SimplexArchitecture","schemaVersion":{"major":0,"minor":1,"patch":0}} -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ] 6 | } 7 | --------------------------------------------------------------------------------