Skip to content

Commit

Permalink
🌲 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Aug 12, 2023
1 parent 5926ed7 commit 7a44582
Show file tree
Hide file tree
Showing 9 changed files with 349 additions and 75 deletions.
66 changes: 66 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/StorybookUI.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "StorybookUI"
BuildableName = "StorybookUI"
BlueprintName = "StorybookUI"
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 = "StorybookUI"
BuildableName = "StorybookUI"
BlueprintName = "StorybookUI"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
11 changes: 10 additions & 1 deletion Development/Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@
// THE SOFTWARE.

import UIKit
import SwiftUI

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

let controller = UIHostingController(rootView: RootView())

let newWindow = UIWindow()
self.window = newWindow

newWindow.makeKeyAndVisible()
newWindow.rootViewController = controller

// Override point for customization after application launch.
window?.tintColor = .systemRed
return true
Expand Down
58 changes: 0 additions & 58 deletions Development/Demo/Base.lproj/Main.storyboard

This file was deleted.

2 changes: 0 additions & 2 deletions Development/Demo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand Down
66 changes: 66 additions & 0 deletions Development/Demo/RootView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
//
// Copyright (c) 2020 Eureka, Inc.
//
// 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 MyUIKit
import StorybookUI
import SwiftUI
import SwiftUISupport

struct RootView: View {

var body: some View {
NavigationView {
VStack {

NavigationLink("Open swiftui") {
StorybookDisplayRootView(
book: myBook,
targetViewController: UIViewController()
)
}

NavigationLink("Open classic") {
ViewControllerHost(
instantiated: {
let controller = StorybookViewController(book: myBook) {
$0.dismiss(animated: true, completion: nil)
}
return controller
}()
)
}

NavigationLink("Open filter") {
ViewControllerHost(
instantiated: {
let controller = StorybookFilterViewController(book: myBook) {
$0.dismiss(animated: true, completion: nil)
}
return controller
}()
)
}

}
}
}
}
38 changes: 26 additions & 12 deletions Development/Storybook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
4B81F791246F34BE009C7602 /* DSLCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B81F790246F34BE009C7602 /* DSLCheck.swift */; };
4BB03C0922267064006E9E49 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BB03C0822267064006E9E49 /* AppDelegate.swift */; };
4BB03C0B22267064006E9E49 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BB03C0A22267064006E9E49 /* ViewController.swift */; };
4BB03C0E22267064006E9E49 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4BB03C0C22267064006E9E49 /* Main.storyboard */; };
4BB03C1022267065006E9E49 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4BB03C0F22267065006E9E49 /* Assets.xcassets */; };
4BB03C1322267065006E9E49 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4BB03C1122267065006E9E49 /* LaunchScreen.storyboard */; };
4BB03C2A2226709D006E9E49 /* MyUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB03C282226709D006E9E49 /* MyUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
4BB03C2D2226709D006E9E49 /* MyUIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BB03C262226709D006E9E49 /* MyUIKit.framework */; };
4BB03C2E2226709D006E9E49 /* MyUIKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4BB03C262226709D006E9E49 /* MyUIKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4BB13678246F2DC700A2DFFE /* MyBook.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BB13677246F2DC700A2DFFE /* MyBook.swift */; };
4BB655B72A87B01000F2E2D7 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BB655B62A87B01000F2E2D7 /* RootView.swift */; };
4BB655BA2A87B0C200F2E2D7 /* SwiftUISupport in Frameworks */ = {isa = PBXBuildFile; productRef = 4BB655B92A87B0C200F2E2D7 /* SwiftUISupport */; };
4BBE1109247557CB009E401C /* MyComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBE1108247557CB009E401C /* MyComponent.swift */; };
9523242A23D1C76C00677D5A /* MyLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9523242923D1C76C00677D5A /* MyLabel.swift */; };
9523242C23D1C81A00677D5A /* LightLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9523242B23D1C81A00677D5A /* LightLabel.swift */; };
Expand Down Expand Up @@ -57,14 +58,14 @@
4BB03C0622267064006E9E49 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
4BB03C0822267064006E9E49 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4BB03C0A22267064006E9E49 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
4BB03C0D22267064006E9E49 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4BB03C0F22267065006E9E49 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4BB03C1222267065006E9E49 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4BB03C1422267065006E9E49 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4BB03C262226709D006E9E49 /* MyUIKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MyUIKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4BB03C282226709D006E9E49 /* MyUIKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyUIKit.h; sourceTree = "<group>"; };
4BB03C292226709D006E9E49 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4BB13677246F2DC700A2DFFE /* MyBook.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyBook.swift; sourceTree = "<group>"; };
4BB655B62A87B01000F2E2D7 /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
4BBE1108247557CB009E401C /* MyComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyComponent.swift; sourceTree = "<group>"; };
9523242923D1C76C00677D5A /* MyLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyLabel.swift; sourceTree = "<group>"; };
9523242B23D1C81A00677D5A /* LightLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LightLabel.swift; sourceTree = "<group>"; };
Expand All @@ -76,6 +77,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4BB655BA2A87B0C200F2E2D7 /* SwiftUISupport in Frameworks */,
4B0BDD812A87A4C800CF2633 /* StorybookKitTextureSupport in Frameworks */,
4B0BDD832A87A4C800CF2633 /* StorybookUI in Frameworks */,
4B0BDD7F2A87A4C800CF2633 /* StorybookKit in Frameworks */,
Expand Down Expand Up @@ -106,11 +108,11 @@
children = (
4BB03C0822267064006E9E49 /* AppDelegate.swift */,
4BB03C0A22267064006E9E49 /* ViewController.swift */,
4BB03C0C22267064006E9E49 /* Main.storyboard */,
4BB03C0F22267065006E9E49 /* Assets.xcassets */,
4BB03C1122267065006E9E49 /* LaunchScreen.storyboard */,
4BB03C1422267065006E9E49 /* Info.plist */,
4B81F790246F34BE009C7602 /* DSLCheck.swift */,
4BB655B62A87B01000F2E2D7 /* RootView.swift */,
);
path = Demo;
sourceTree = "<group>";
Expand Down Expand Up @@ -192,6 +194,7 @@
4B0BDD7E2A87A4C800CF2633 /* StorybookKit */,
4B0BDD802A87A4C800CF2633 /* StorybookKitTextureSupport */,
4B0BDD822A87A4C800CF2633 /* StorybookUI */,
4BB655B92A87B0C200F2E2D7 /* SwiftUISupport */,
);
productName = Demo;
productReference = 4BB03C0622267064006E9E49 /* Demo.app */;
Expand Down Expand Up @@ -247,6 +250,9 @@
Base,
);
mainGroup = 957A89272226610200CDD25D;
packageReferences = (
4BB655B82A87B0C200F2E2D7 /* XCRemoteSwiftPackageReference "swiftui-support" */,
);
productRefGroup = 957A89322226610200CDD25D /* Products */;
projectDirPath = "";
projectRoot = "";
Expand All @@ -264,7 +270,6 @@
files = (
4BB03C1322267065006E9E49 /* LaunchScreen.storyboard in Resources */,
4BB03C1022267065006E9E49 /* Assets.xcassets in Resources */,
4BB03C0E22267064006E9E49 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -282,6 +287,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4BB655B72A87B01000F2E2D7 /* RootView.swift in Sources */,
4BB03C0B22267064006E9E49 /* ViewController.swift in Sources */,
4BB03C0922267064006E9E49 /* AppDelegate.swift in Sources */,
4B81F791246F34BE009C7602 /* DSLCheck.swift in Sources */,
Expand Down Expand Up @@ -311,14 +317,6 @@
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
4BB03C0C22267064006E9E49 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
4BB03C0D22267064006E9E49 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
4BB03C1122267065006E9E49 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand Down Expand Up @@ -585,6 +583,17 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
4BB655B82A87B0C200F2E2D7 /* XCRemoteSwiftPackageReference "swiftui-support" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/FluidGroup/swiftui-support/";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.4.1;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
4B0BDD7E2A87A4C800CF2633 /* StorybookKit */ = {
isa = XCSwiftPackageProductDependency;
Expand All @@ -602,6 +611,11 @@
isa = XCSwiftPackageProductDependency;
productName = StorybookKit;
};
4BB655B92A87B0C200F2E2D7 /* SwiftUISupport */ = {
isa = XCSwiftPackageProductDependency;
package = 4BB655B82A87B0C200F2E2D7 /* XCRemoteSwiftPackageReference "swiftui-support" */;
productName = SwiftUISupport;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 957A89282226610200CDD25D /* Project object */;
Expand Down
Loading

0 comments on commit 7a44582

Please sign in to comment.