-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # README.md
- Loading branch information
Showing
178 changed files
with
4,978 additions
and
4,252 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ version: 1 | |
builder: | ||
configs: | ||
- documentation_targets: [Puddles] | ||
platform: ios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
66 changes: 66 additions & 0 deletions
66
...ples/PuddlesExamples/Core/.swiftpm/xcode/xcshareddata/xcschemes/Services-Package.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
66 changes: 66 additions & 0 deletions
66
Examples/PuddlesExamples/Core/.swiftpm/xcode/xcshareddata/xcschemes/Services.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
) | ||
] | ||
) |
26 changes: 26 additions & 0 deletions
26
Examples/PuddlesExamples/Core/Sources/CultureMinds/CultureMinds.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
Examples/PuddlesExamples/Core/Sources/Extensions/AVPlayer.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
44
Examples/PuddlesExamples/Core/Sources/Extensions/Array.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Oops, something went wrong.