Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
SwiftedMind committed Jul 13, 2023
2 parents 4fd332a + 82a7904 commit a26a634
Show file tree
Hide file tree
Showing 178 changed files with 4,978 additions and 4,252 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/publish-documentation.yml

This file was deleted.

Empty file added .nvimlog
Empty file.
1 change: 1 addition & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ version: 1
builder:
configs:
- documentation_targets: [Puddles]
platform: ios
23 changes: 23 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

## 1.0.0 (Upcoming)

### Added

- Added landing page for the project: [swiftedmind.com/puddles](https://www.swiftedmind.com/puddles)
- Added documentation for the Puddles architecture
- Added full example project: ["Scrumdinger in Puddles"](https://github.com/SwiftedMind/Scrumdinger) – A re-implementation of Apple's Scrumdinger tutorial app
- Added support for watchOS 8+ and tvOS 15+
- Added Signals (previously known as `StateConfiguration`, but now useable in any SwiftUI View)

### Changed

- Removed `Coordinator` and `Provider`. The architecture has evolved to a point where these have become unnecessary overhead and bloat.
- Removed `Navigator`, as it has moved from being a protocol type to a concept within the Puddles architecture.
- Renamed `Interface.handled(by:)` to `Interface.consume(_:)` and `Interface.forward(to:)` to clarify functionality
- Renamed `Interface.unhandled` to `Interface.ignore` to clarify functionality
- Removed the `QueryableItem` and `Queryable` property wrappers, since they have moved to a dedicated package: [Queryable](https://github.com/SwiftedMind/Queryable)

### Fixed

- Fixed macOS support
9 changes: 9 additions & 0 deletions Examples/PuddlesExamples/Core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Services"
BuildableName = "Services"
BlueprintName = "Services"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Services"
BuildableName = "Services"
BlueprintName = "Services"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Services"
BuildableName = "Services"
BlueprintName = "Services"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Services"
BuildableName = "Services"
BlueprintName = "Services"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
58 changes: 58 additions & 0 deletions Examples/PuddlesExamples/Core/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// swift-tools-version: 5.8

import PackageDescription

let package = Package(
name: "Core",
platforms: [.iOS(.v16)],
products: [
.library(
name: "Core",
targets: [
"Models",
"Extensions",
"NumbersAPI",
"CultureMinds",
"MockData"
]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "0.7.1"),
.package(url: "https://github.com/kean/Get", from: "2.1.6"),
],
targets: [
.target(
name: "Models",
dependencies: [
.product(name: "IdentifiedCollections", package: "swift-identified-collections")
]
),
.target(
name: "Extensions",
dependencies: [
.product(name: "IdentifiedCollections", package: "swift-identified-collections")
]
),.target(
name: "MockData",
dependencies: [
.product(name: "IdentifiedCollections", package: "swift-identified-collections"),
"Models"
]
),
.target(
name: "CultureMinds",
dependencies: [
.product(name: "IdentifiedCollections", package: "swift-identified-collections"),
"MockData"
]
),
.target(
name: "NumbersAPI",
dependencies: [
.product(name: "IdentifiedCollections", package: "swift-identified-collections"),
"Get",
"MockData"
]
)
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import Foundation
import MockData

public final class CultureMinds {
public init() { }

public func randomName() -> String {
Mock.cultureMindNames.randomElement()!
}

public func allNames() -> [String] {
Mock.cultureMindNames
}

public func generateNames() -> AsyncStream<String> {
return .init { continuation in
Task {
for name in Mock.cultureMindNames.shuffled() {
continuation.yield(name)
try? await Task.sleep(for: .seconds(1))
}
continuation.finish()
}
}
}
}
13 changes: 13 additions & 0 deletions Examples/PuddlesExamples/Core/Sources/Extensions/AVPlayer.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
See LICENSE folder for this sample’s licensing information.
*/

import Foundation
import AVFoundation

public extension AVPlayer {
static let sharedDingPlayer: AVPlayer = {
guard let url = Bundle.main.url(forResource: "ding", withExtension: "wav") else { fatalError("Failed to find sound file.") }
return AVPlayer(url: url)
}()
}
44 changes: 44 additions & 0 deletions Examples/PuddlesExamples/Core/Sources/Extensions/Array.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Copyright © 2023 Dennis Müller and all collaborators
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

import Foundation
import IdentifiedCollections

extension Array {
public static func repeating(_ closure: @autoclosure () -> Element, count: Int) -> [Element] {
var elements: [Element] = []
for _ in 0..<count {
elements.append(closure())
}
return elements
}
}

extension IdentifiedArray where Element: Identifiable {
public static func repeating(_ closure: @autoclosure () -> Element, count: Int) -> IdentifiedArrayOf<Element> {
var elements: IdentifiedArrayOf<Element> = []
for _ in 0..<count {
elements.append(closure())
}
return elements
}
}
Loading

0 comments on commit a26a634

Please sign in to comment.