-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic loading of
BookProvider
conformers + new #StorybookPage
m…
…acro (#35) ## `#StorybookPage` macro: ```swift #StorybookPage<Namespace.MyView> { VStack { MyView() Text("test") } .tint(.accentColor) } ``` ```swift #StorybookPage(title: "My View") { VStack { MyView() Text("test") } .tint(.accentColor) } ``` ## Dynamically loading of all `BookProvider` ### Search only `#StorybookPage` macro usages ```swift struct RootView: View { var body: some View { StorybookDisplayRootView( bookStore: .init( book: .init(title: "#StorybookPage macro") { Book.allStorybookPages() .map({ $0.bookBody }) } ) ) } } ``` ### Search all `BookProvider` conformances, including `#StorybookPage` macro usages ```swift struct RootView: View { var body: some View { StorybookDisplayRootView( bookStore: .init( book: .init(title: "All BookProviders") { Book.allBookProviders() .map({ $0.bookBody }) } ) ) } } ``` ## Other changes - Updated Demo app to include both uses of previous `Book` declaring methods and the new `#StorybookPage` usage - Changed `#file` usages to `#fileID` to hide machine usernames in paths - Reorganized source file directories
- Loading branch information
1 parent
8985fa9
commit 8c716b5
Showing
20 changed files
with
931 additions
and
104 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,20 +4,20 @@ on: [push] | |
|
||
jobs: | ||
build-storybook-kit: | ||
runs-on: macos-13 | ||
runs-on: macos-14 | ||
steps: | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: "14.3" | ||
xcode-version: "15.0" | ||
- uses: actions/checkout@v2 | ||
- name: xcodebuild | ||
run: xcodebuild -scheme StorybookKit -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8,OS=16.2' | ||
run: xcodebuild -scheme StorybookKit -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' | ||
build-storybook-kit-texture-support: | ||
runs-on: macos-13 | ||
runs-on: macos-14 | ||
steps: | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: "14.3" | ||
xcode-version: "15.0" | ||
- uses: actions/checkout@v2 | ||
- name: xcodebuild | ||
run: xcodebuild -scheme StorybookKitTextureSupport -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8,OS=16.2' | ||
run: xcodebuild -scheme StorybookKitTextureSupport -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' |
53 changes: 53 additions & 0 deletions
53
.swiftpm/xcode/xcshareddata/xcschemes/StorybookMacrosTests.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,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1520" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "StorybookMacrosTests" | ||
BuildableName = "StorybookMacrosTests" | ||
BlueprintName = "StorybookMacrosTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</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"> | ||
</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
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
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
Oops, something went wrong.