├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── swift.yml ├── .gitignore ├── .swiftpm └── xcode │ ├── package.xcworkspace │ └── contents.xcworkspacedata │ └── xcshareddata │ └── xcschemes │ └── Deeplink.xcscheme ├── CODE_OF_CONDUCT.md ├── LICENSE ├── Package.resolved ├── Package.swift ├── README.md ├── Sources └── Deeplink │ ├── AnyDeeplink.swift │ ├── Deeplink.swift │ ├── DeeplinkBuilder.swift │ ├── DeeplinkErrors.swift │ ├── DeeplinkInterpolation.swift │ ├── DeeplinksCenter.swift │ ├── DefaultInitializable.swift │ ├── Documentation.docc │ ├── Deeplink enum.md │ ├── Deeplink.md │ ├── DeeplinkCenter.md │ ├── Getting started with Deeplinking.md │ ├── Resources │ │ ├── ExampleParsing.png │ │ ├── ExampleParsing@2x.png │ │ ├── ExampleParsing~dark.png │ │ ├── ExampleParsing~dark@2x.png │ │ ├── ExampleURL.png │ │ ├── ExampleURL@2x.png │ │ ├── ExampleURL~dark.png │ │ ├── ExampleURL~dark@2x.png │ │ ├── Visual.png │ │ └── Visual@2x.png │ └── Tutorials │ │ ├── Adding a Deeplink.tutorial │ │ ├── Advanced Usage.tutorial │ │ ├── Sources │ │ ├── AddingADeeplink 1.swift │ │ ├── AddingADeeplink 2.swift │ │ ├── AddingADeeplink 3.swift │ │ ├── AddingADeeplink 4.swift │ │ ├── AddingADeeplinkList 1.swift │ │ ├── AddingADeeplinkList 2.swift │ │ ├── AddingADeeplinkList 3.swift │ │ ├── AddingMultipleDeeplinks 1.swift │ │ ├── AddingMultipleDeeplinks 2.swift │ │ ├── AddingMultipleDeeplinks 3.swift │ │ ├── AdvancedUsage 1.swift │ │ ├── AdvancedUsage 2.swift │ │ ├── AdvancedUsage 3.swift │ │ ├── AdvancedUsage 4.swift │ │ ├── AdvancedUsage 5.swift │ │ ├── AdvancedUsage 6.swift │ │ ├── ResultBuilder 1.swift │ │ ├── ResultBuilder 2.swift │ │ ├── ResultBuilder 3.swift │ │ ├── ResultBuilder 4.swift │ │ └── ResultBuilder 5.swift │ │ ├── Table of Contents.tutorial │ │ └── Using a ResultBuilder.tutorial │ ├── SampleDeeplink.swift │ ├── URLPatternMatcher.swift │ └── Utilities │ ├── String+utilities.swift │ └── URL+relativePathWithQueryItemsAndFragments.swift ├── Tests └── DeeplinkTests │ ├── CatchAllDeeplinkTests.swift │ ├── DeeplinkBuilderTests.swift │ ├── DeeplinkDeclarationTests.swift │ ├── DeeplinksCenterTests.swift │ ├── EncodingDeeplinkTests.swift │ ├── Generated tests │ └── ValidDeeplinkTests.swift │ ├── InvalidDeeplinkTests.swift │ ├── LiteralDeeplinksTests.swift │ ├── StringUtilitiesTests.swift │ ├── TicketSwapDeeplinkTests.swift │ ├── URLPatternMatcherTests.swift │ └── Utilities │ └── URL+initWithStringLiteral.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 │ │ ├── deeplink.json │ │ └── deeplink │ │ │ ├── anydeeplink.json │ │ │ ├── anydeeplink │ │ │ └── description.json │ │ │ ├── deeplink.json │ │ │ ├── deeplink │ │ │ ├── !=(_:_:).json │ │ │ ├── callasfunction(_:)-34acp.json │ │ │ ├── callasfunction(_:)-9eb8h.json │ │ │ ├── callasfunction(assigningto:_:).json │ │ │ ├── catchall.json │ │ │ ├── customstringconvertible-implementations.json │ │ │ ├── description.json │ │ │ ├── encode(_:).json │ │ │ ├── equatable-implementations.json │ │ │ ├── expressiblebyextendedgraphemeclusterliteral-implementations.json │ │ │ ├── expressiblebystringinterpolation-implementations.json │ │ │ ├── expressiblebystringliteral-implementations.json │ │ │ ├── expressiblebyunicodescalarliteral-implementations.json │ │ │ ├── init(extendedgraphemeclusterliteral:).json │ │ │ ├── init(stringinterpolation:).json │ │ │ ├── init(stringliteral:).json │ │ │ ├── init(unicodescalarliteral:).json │ │ │ ├── interpolated(_:).json │ │ │ ├── literal(_:).json │ │ │ ├── parse(_:).json │ │ │ ├── parse(_:into:).json │ │ │ └── stringliteraltype.json │ │ │ ├── deeplinkbuilder.json │ │ │ ├── deeplinkbuilder │ │ │ ├── buildarray(_:).json │ │ │ ├── buildblock(_:).json │ │ │ ├── buildeither(first:).json │ │ │ ├── buildeither(second:).json │ │ │ ├── buildexpression(_:)-6kuwv.json │ │ │ ├── buildexpression(_:)-8a26a.json │ │ │ ├── buildlimitedavailability(_:).json │ │ │ ├── buildoptional(_:).json │ │ │ └── component.json │ │ │ ├── deeplinkinterpolation.json │ │ │ ├── deeplinkinterpolation │ │ │ ├── !=(_:_:).json │ │ │ ├── appendinterpolation(_:).json │ │ │ ├── appendinterpolation(_:separator:).json │ │ │ ├── appendliteral(_:).json │ │ │ ├── customstringconvertible-implementations.json │ │ │ ├── description.json │ │ │ ├── equatable-implementations.json │ │ │ └── init(literalcapacity:interpolationcount:).json │ │ │ ├── deeplinkscenter.json │ │ │ ├── deeplinkscenter │ │ │ ├── init().json │ │ │ ├── init(_:).json │ │ │ ├── parse(url:).json │ │ │ ├── register(deeplink:assigningto:ifmatching:).json │ │ │ ├── register(deeplink:ifmatching:).json │ │ │ ├── register(deeplinks:assigningto:ifmatching:).json │ │ │ ├── register(deeplinks:ifmatching:).json │ │ │ └── testsampledeeplink(_:).json │ │ │ ├── defaultinitializable.json │ │ │ ├── defaultinitializable │ │ │ └── init().json │ │ │ ├── getting-started-with-deeplinking.json │ │ │ ├── sampledeeplink.json │ │ │ └── sampledeeplink │ │ │ ├── init(deeplinktemplate:urltoparse:assigningtoinstance:expectation:assertions:).json │ │ │ └── init(deeplinktemplate:urltoparse:expectation:).json │ └── tutorials │ │ ├── deeplink │ │ ├── adding-a-deeplink.json │ │ ├── advanced-usage.json │ │ └── using-a-resultbuilder.json │ │ └── table-of-contents.json ├── developer-og-twitter.jpg ├── developer-og.jpg ├── documentation │ └── deeplink │ │ ├── anydeeplink │ │ ├── description │ │ │ └── index.html │ │ └── index.html │ │ ├── deeplink │ │ ├── !=(_:_:) │ │ │ └── index.html │ │ ├── callasfunction(_:)-34acp │ │ │ └── index.html │ │ ├── callasfunction(_:)-9eb8h │ │ │ └── index.html │ │ ├── callasfunction(assigningto:_:) │ │ │ └── index.html │ │ ├── catchall │ │ │ └── index.html │ │ ├── customstringconvertible-implementations │ │ │ └── index.html │ │ ├── description │ │ │ └── index.html │ │ ├── encode(_:) │ │ │ └── index.html │ │ ├── equatable-implementations │ │ │ └── index.html │ │ ├── expressiblebyextendedgraphemeclusterliteral-implementations │ │ │ └── index.html │ │ ├── expressiblebystringinterpolation-implementations │ │ │ └── index.html │ │ ├── expressiblebystringliteral-implementations │ │ │ └── index.html │ │ ├── expressiblebyunicodescalarliteral-implementations │ │ │ └── index.html │ │ ├── index.html │ │ ├── init(extendedgraphemeclusterliteral:) │ │ │ └── index.html │ │ ├── init(stringinterpolation:) │ │ │ └── index.html │ │ ├── init(stringliteral:) │ │ │ └── index.html │ │ ├── init(unicodescalarliteral:) │ │ │ └── index.html │ │ ├── interpolated(_:) │ │ │ └── index.html │ │ ├── literal(_:) │ │ │ └── index.html │ │ ├── parse(_:) │ │ │ └── index.html │ │ ├── parse(_:into:) │ │ │ └── index.html │ │ └── stringliteraltype │ │ │ └── index.html │ │ ├── deeplinkbuilder │ │ ├── buildarray(_:) │ │ │ └── index.html │ │ ├── buildblock(_:) │ │ │ └── index.html │ │ ├── buildeither(first:) │ │ │ └── index.html │ │ ├── buildeither(second:) │ │ │ └── index.html │ │ ├── buildexpression(_:)-6kuwv │ │ │ └── index.html │ │ ├── buildexpression(_:)-8a26a │ │ │ └── index.html │ │ ├── buildlimitedavailability(_:) │ │ │ └── index.html │ │ ├── buildoptional(_:) │ │ │ └── index.html │ │ ├── component │ │ │ └── index.html │ │ └── index.html │ │ ├── deeplinkinterpolation │ │ ├── !=(_:_:) │ │ │ └── index.html │ │ ├── appendinterpolation(_:) │ │ │ └── index.html │ │ ├── appendinterpolation(_:separator:) │ │ │ └── index.html │ │ ├── appendliteral(_:) │ │ │ └── index.html │ │ ├── customstringconvertible-implementations │ │ │ └── index.html │ │ ├── description │ │ │ └── index.html │ │ ├── equatable-implementations │ │ │ └── index.html │ │ ├── index.html │ │ └── init(literalcapacity:interpolationcount:) │ │ │ └── index.html │ │ ├── deeplinkscenter │ │ ├── index.html │ │ ├── init() │ │ │ └── index.html │ │ ├── init(_:) │ │ │ └── index.html │ │ ├── parse(url:) │ │ │ └── index.html │ │ ├── register(deeplink:assigningto:ifmatching:) │ │ │ └── index.html │ │ ├── register(deeplink:ifmatching:) │ │ │ └── index.html │ │ ├── register(deeplinks:assigningto:ifmatching:) │ │ │ └── index.html │ │ ├── register(deeplinks:ifmatching:) │ │ │ └── index.html │ │ └── testsampledeeplink(_:) │ │ │ └── index.html │ │ ├── defaultinitializable │ │ ├── index.html │ │ └── init() │ │ │ └── index.html │ │ ├── getting-started-with-deeplinking │ │ └── index.html │ │ ├── index.html │ │ └── sampledeeplink │ │ ├── index.html │ │ ├── init(deeplinktemplate:urltoparse:assigningtoinstance:expectation:assertions:) │ │ └── index.html │ │ └── init(deeplinktemplate:urltoparse:expectation:) │ │ └── index.html ├── favicon.ico ├── favicon.svg ├── images │ ├── ExampleParsing.png │ ├── ExampleParsing@2x.png │ ├── ExampleParsing~dark.png │ ├── ExampleParsing~dark@2x.png │ ├── ExampleURL.png │ ├── ExampleURL@2x.png │ ├── ExampleURL~dark.png │ ├── ExampleURL~dark@2x.png │ ├── Visual.png │ └── Visual@2x.png ├── 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 └── tutorials │ ├── deeplink │ ├── adding-a-deeplink │ │ └── index.html │ ├── advanced-usage │ │ └── index.html │ └── using-a-resultbuilder │ │ └── index.html │ └── table-of-contents │ └── index.html └── generate-docs /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: TizianoCoroneo 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Please include a snippet of code to reproduce the issue. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **OS version:** 20 | - iOS: [e.g. iOS 9] 21 | or 22 | - macOS: [e.g. macOS 10.12] 23 | 24 | **Additional context** 25 | Add any other context about the problem here. 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: TizianoCoroneo 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots or links about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: macos-latest 13 | 14 | steps: 15 | - uses: actions/cache@v2 16 | with: 17 | path: .build 18 | key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} 19 | restore-keys: | 20 | ${{ runner.os }}-spm- 21 | 22 | - uses: actions/checkout@v2 23 | - name: Build 24 | run: swift build -v 25 | - name: Run tests 26 | run: swift test -v 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.swiftpm/xcode/xcshareddata/xcschemes/Deeplink.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 54 | 55 | 61 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Tiziano Coroneo 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 | -------------------------------------------------------------------------------- /Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "swift-docc-plugin", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/apple/swift-docc-plugin", 7 | "state" : { 8 | "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", 9 | "version" : "1.3.0" 10 | } 11 | }, 12 | { 13 | "identity" : "swift-docc-symbolkit", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/apple/swift-docc-symbolkit", 16 | "state" : { 17 | "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", 18 | "version" : "1.0.0" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.6 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Deeplink", 7 | platforms: [ 8 | .iOS(.v9), 9 | .macOS(.v10_10), 10 | ], 11 | products: [ 12 | .library( 13 | name: "Deeplink", 14 | targets: ["Deeplink"]), 15 | ], 16 | dependencies: [ 17 | .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), 18 | ], 19 | targets: [ 20 | .target( 21 | name: "Deeplink", 22 | dependencies: []), 23 | .testTarget( 24 | name: "DeeplinkTests", 25 | dependencies: ["Deeplink"]), 26 | ] 27 | ) 28 | -------------------------------------------------------------------------------- /Sources/Deeplink/AnyDeeplink.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnyDeeplink.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | 10 | /// Type-erased version of ``Deeplink/Deeplink``. Used to keep a list of Deeplinks in the ``Deeplink/DeeplinksCenter`` where every element of the list might have different type parameters. 11 | public struct AnyDeeplink: CustomStringConvertible { 12 | var parseURLIntoInstance: @MainActor (URL) throws -> Bool 13 | public let description: String 14 | 15 | /// Designated initializer. 16 | /// 17 | /// - Parameters: 18 | /// - deeplink: The ``Deeplink/Deeplink`` template to type-erase. 19 | /// - assigningTo: The value to which the content of the `URL` arguments will be assigned to. 20 | /// - completion: The completion handler to invoke if the `URL` passed to the `parse(_ url:)` function matches the deeplink template. 21 | init( 22 | deeplink: Deeplink, 23 | assigningTo instance: Value, 24 | ifMatching completion: @escaping @MainActor (URL, Value) throws -> Bool 25 | ) { 26 | self.parseURLIntoInstance = { url in 27 | var newInstance = instance 28 | try deeplink.parse(url, into: &newInstance) 29 | return try completion(url, newInstance) 30 | } 31 | 32 | self.description = deeplink.description 33 | } 34 | 35 | /// Initializer that assigns the deeplink values to a fresh new instance of `Value`. 36 | /// 37 | /// - Parameters: 38 | /// - deeplink: The ``Deeplink/Deeplink`` template to type-erase. 39 | /// - completion: The completion handler to invoke if the `URL` passed to the `parse(_ url:)` function matches the deeplink template. 40 | init( 41 | deeplink: Deeplink, 42 | ifMatching completion: @escaping @MainActor (URL, Value) throws -> Bool 43 | ) 44 | where Value: DefaultInitializable 45 | { 46 | self.init( 47 | deeplink: deeplink, 48 | assigningTo: .init(), 49 | ifMatching: completion) 50 | } 51 | } 52 | 53 | extension AnyDeeplink { 54 | 55 | /// Attempts to parse the argument `url` using the `deeplink` previously passed to the initializer. 56 | /// If the pattern is recognized successfully, the arguments of the template will get assigned to the `assigningTo` parameter, which will be then forwarded to the `ifMatching` closure, together with the matching `url`. 57 | /// - Parameter url: The `URL` to match. 58 | @MainActor func parse( 59 | _ url: URL 60 | ) throws -> Bool { 61 | try self.parseURLIntoInstance(url) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Sources/Deeplink/DeeplinkBuilder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeeplinkBuilder.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 22/01/2021. 6 | // 7 | 8 | import Foundation 9 | 10 | /// A `@resultBuilder` that allows you to register deeplink templates using a DSL-like syntax. 11 | /// 12 | /// See for more information. 13 | @resultBuilder 14 | public struct DeeplinkBuilder { 15 | // https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md 16 | 17 | /// The type of a partial result, which will be carried through all of the 18 | /// build methods. 19 | public typealias Component = [AnyDeeplink] 20 | 21 | /// Required by every result builder to build combined results from 22 | /// statement blocks. 23 | public static func buildBlock(_ components: Component...) -> Component { 24 | components.flatMap { $0 } 25 | } 26 | 27 | /// If declared, provides contextual type information for statement 28 | /// expressions to translate them into partial results. 29 | public static func buildExpression( 30 | _ anyDeeplink: AnyDeeplink 31 | ) -> Component { 32 | [anyDeeplink] 33 | } 34 | 35 | public static func buildExpression( 36 | _ anyDeeplink: AnyDeeplink? 37 | ) -> Component { 38 | guard let component = anyDeeplink else { return [] } 39 | return buildExpression(component) 40 | } 41 | 42 | /// Enables support for `if` statements that do not have an `else`. 43 | public static func buildOptional(_ component: Component?) -> Component { 44 | guard let component = component else { return [] } 45 | return component 46 | } 47 | 48 | /// With buildEither(second:), enables support for 'if-else' and 'switch' 49 | /// statements by folding conditional results into a single result. 50 | public static func buildEither(first component: Component) -> Component { 51 | component 52 | } 53 | 54 | /// With buildEither(first:), enables support for 'if-else' and 'switch' 55 | /// statements by folding conditional results into a single result. 56 | public static func buildEither(second component: Component) -> Component { 57 | component 58 | } 59 | 60 | // Requires Swift 5.4 61 | /// Enables support for 'for..in' loops by combining the 62 | /// results of all iterations into a single result. 63 | public static func buildArray(_ components: [Component]) -> Component { 64 | components.flatMap { $0 } 65 | } 66 | 67 | // Requires Swift 5.4 68 | /// If declared, this will be called on the partial result of an `if 69 | /// #available` block to allow the result builder to erase type 70 | /// information. 71 | public static func buildLimitedAvailability(_ component: Component) -> Component { 72 | component 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Sources/Deeplink/DefaultInitializable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DefaultInitializable.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 22/01/2021. 6 | // 7 | 8 | /// A protocol which only requirement is an empty initializer. 9 | /// 10 | /// This is used by the library to create an empty instance of the `Value` type of a ``Deeplink/Deeplink`` template. In case of successful match between the template and deeplink `URL`, the ``Deeplink/DeeplinksCenter`` will assign values to the properties on the newly created instance. 11 | public protocol DefaultInitializable { 12 | init() 13 | } 14 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Deeplink enum.md: -------------------------------------------------------------------------------- 1 | # ``Deeplink/Deeplink`` 2 | 3 | An `enum` that represents a deeplink template. 4 | 5 | ## Overview 6 | 7 | You can define one of these and use it to check if a URL matches the same pattern, and extract some information from it. 8 | 9 | ![Example of a URL that contains one parameter.](ExampleURL) 10 | 11 | ```swift 12 | struct Product { 13 | var productId: String? 14 | } 15 | 16 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 17 | 18 | var productInfo = Product() 19 | productDeeplink.parse(url: someURL, into: &productInfo) 20 | 21 | print(productInfo.productId ?? "nil") 22 | ``` 23 | 24 | A Deeplink can be or a literal deeplink with no parameters or an interpolated deeplink, where there are one or more parameters each represented by a `KeyPath`. 25 | 26 | ```swift 27 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 28 | let accountDeeplink: Deeplink = "/account" 29 | ``` 30 | 31 | The string interpolation initializer `throws` because there are a couple cases that cannot be handled via Deeplink templates yet: 32 | * We cannot define a template with two consecutive parameters because we don't know when the first parameter needs to end and where the second one starts. 33 | * We cannot define a template that uses the same keypath twice or more in the same template. No technical reason, I just thought that this would be result of a mistake in most cases, and I'd prefer to catch it early. 34 | 35 | ```swift 36 | let badDeeplink1: Deeplink = try! "/product/\(\.productId)\(\.name)" 37 | let badDeeplink2: Deeplink = try! "/product/\(\.productId)/\(\.productId)" 38 | ``` 39 | 40 | ## Topics 41 | 42 | ### Create a Deeplink template 43 | 44 | Don't use these initializer directly, use String literals and String interpolation instead. 45 | 46 | - ``init(stringLiteral:)`` 47 | - ``init(stringInterpolation:)`` 48 | 49 | ### Parse a URL 50 | 51 | - ``parse(_:)`` 52 | - ``parse(_:into:)`` 53 | 54 | ### DeeplinkBuilder closures 55 | 56 | - ``callAsFunction(_:)-9eb8h`` 57 | - ``callAsFunction(_:)-34acp`` 58 | - ``callAsFunction(assigningTo:_:)`` 59 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Deeplink.md: -------------------------------------------------------------------------------- 1 | # ``Deeplink`` 2 | 3 | A microlibrary to parse deeplinks and their arguments. 4 | 5 | ## Overview 6 | 7 | To support deeplinking in your app you just need to follow these steps: 8 | 9 | - Define the data you want to parse as simple `struct`s. 10 | - Define the deeplink templates that you want to support using the ``Deeplink`` object. 11 | - Register behaviors for each template using the ``DeeplinksCenter`` `register` methods. 12 | - You're ready to parse URLs now 🙌! Follow the tutorial for more details and examples. 13 | 14 | When parsing a URL, the parameter is associated with the KeyPath that occupies the same location in the URL: if the match is successful, the value of the parameter will be assigned to an instance of the Deeplink's `Value` type, to the corresponding keypath. 15 | 16 | ![How data goes from inside the URL to inside your model object](ExampleParsing) 17 | 18 | ## Topics 19 | 20 | ### Essentials 21 | 22 | - 23 | - ``Deeplink/Deeplink`` 24 | - ``Deeplink/DeeplinksCenter`` 25 | 26 | ### Tests 27 | - ``Deeplink/SampleDeeplink`` 28 | 29 | ### Utility 30 | 31 | - ``Deeplink/DefaultInitializable`` 32 | 33 | ### Implementation details 34 | 35 | - ``Deeplink/AnyDeeplink`` 36 | - ``Deeplink/DeeplinkInterpolation`` 37 | - ``Deeplink/DeeplinkBuilder`` 38 | 39 | ### Tutorial 40 | 41 | - 42 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/DeeplinkCenter.md: -------------------------------------------------------------------------------- 1 | # ``Deeplink/DeeplinksCenter`` 2 | 3 | Register deeplinks and parse URLs. 4 | 5 | @Metadata { 6 | @DocumentationExtension(mergeBehavior: override) 7 | } 8 | 9 | ## Overview 10 | 11 | The `DeeplinksCenter` is the object you use to register behaviors for your ``Deeplink/Deeplink`` templates: when a template matches the URL you're parsing, the `ifMatching` closure on the `register` method is triggered. 12 | 13 | Then, you can use the `parse` method to attempt matching a URL against the list of registered deeplink templates you built. 14 | 15 | ## Topics 16 | 17 | ### Initialize a center 18 | 19 | - ``init()`` 20 | - ``init(_:)`` 21 | 22 | ### Registering deeplinks 23 | 24 | - ``register(deeplink:assigningTo:ifMatching:)`` 25 | - ``register(deeplink:ifMatching:)`` 26 | - ``register(deeplinks:assigningTo:ifMatching:)`` 27 | - ``register(deeplinks:ifMatching:)`` 28 | 29 | ### Parsing URLs 30 | 31 | - ``parse(url:)`` 32 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Getting started with Deeplinking.md: -------------------------------------------------------------------------------- 1 | # Getting started with Deeplinking 2 | 3 | From 0 to `/hero`. 4 | 5 | ## Overview 6 | 7 | ### What is deeplinking? 8 | 9 | [Mobile apps' deep links](https://branch.io/what-is-deep-linking/) are URLs that point to the content inside an app. If you want to share a pair of shoes from Amazon with a friend, you can send a deep link that brings your friend directly to those shoes in the Amazon app. 10 | Without a deep link, your friend would have to find the Amazon app on the App Store or Play Store, open the app to the homepage, locate the Search function, and then try to find the same pair of shoes you found. 11 | 12 | This package provides the tools to define a specific deeplink template, pattern match a URL with a deeplink template, and parse the information contained in the URL into an object. 13 | 14 | It does the parsing so you don't have to! 15 | 16 | ### Using this library 17 | 18 | Follow the shiny new DocC tutorial: ! 19 | 20 | ### Installing 21 | 22 | The library only supports the Swift Package Manager. 23 | To install `Deeplink` for use in an app, command-line tool, or server-side application, add Deeplink as a dependency to your `Package.swift` file. For more information, please see the [Swift Package Manager documentation](https://github.com/apple/swift-package-manager/tree/master/Documentation). 24 | 25 | ```swift 26 | .package(url: "https://github.com/TizianoCoroneo/Deeplink", from: "0.1.0") 27 | ``` 28 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleParsing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleParsing.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleParsing@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleParsing@2x.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleParsing~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleParsing~dark.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleParsing~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleParsing~dark@2x.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleURL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleURL.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleURL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleURL@2x.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleURL~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleURL~dark.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/ExampleURL~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/ExampleURL~dark@2x.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/Visual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/Visual.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Resources/Visual@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/Sources/Deeplink/Documentation.docc/Resources/Visual@2x.png -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Advanced Usage.tutorial: -------------------------------------------------------------------------------- 1 | @Tutorial(time: 10) { 2 | @Intro(title: "Advanced Usage") { 3 | This tutorial is a small collection of advanced tips and tricks. 4 | } 5 | 6 | @Section(title: "Altering the matching behavior") { 7 | In normal usage of this library, you `return true` from the `ifMatching` closure on the ``Deeplink/DeeplinksCenter`` `register` methods. 8 | 9 | What if we returned false? Why would you do that? 10 | 11 | In this section, we'll implement a simple AB testing behavior for interpreting deeplinks. 12 | 13 | @Steps { 14 | @Step { 15 | Let's start from a simple setup: we have only our product deeplink. 16 | 17 | What we want is to show one screen to 50% of the users and a different version of that screen to the rest. Let's say that we have some kind of `isMagicOn()` function that returns `true` if we should show the alternative view. 18 | 19 | @Code(name: "Altering matching.swift", file: "AdvancedUsage 1.swift") 20 | } 21 | 22 | @Step { 23 | We can embed the check directly inside the `ifMatching` function... 24 | 25 | @Code(name: "Altering matching.swift", file: "AdvancedUsage 2.swift") 26 | } 27 | 28 | @Step { 29 | Or we can register the same deeplink template twice. 30 | 31 | In the first registration we check `isMagicOn` and we only continue if it is `true`. This means that if the other registration will only ever be executed if `isMagicOn` is `false`, since ``Deeplink/DeeplinksCenter`` will stop evaluating templates at the first successful match. This also makes it really easy to remove the Magic part if... needed. 32 | 33 | @Code(name: "Altering matching.swift", file: "AdvancedUsage 3.swift") 34 | } 35 | 36 | @Step { 37 | Since you also get the original URL that is being evaluated, you can also perform additional URL checking logic in the `ifMatching` closure, returning `false` if the checks fail. 38 | 39 | @Code(name: "Altering matching.swift", file: "AdvancedUsage 4.swift") 40 | } 41 | } 42 | } 43 | 44 | @Section(title: "Using DefaultInitializable") { 45 | "Why do I have to pass an instance of my value to the register function?" 46 | 47 | The problem is that the library needs an initialized object to assign values to. That's it: or you give an initialized object, or you define a struct that conforms to the utility protocol ``Deeplink/DefaultInitializable``, which only requirement is a empty `init()`. 48 | 49 | @Steps { 50 | @Step { 51 | Let's start from our product deeplink. 52 | 53 | Normally, we pass an instance of Product to the register function. 54 | 55 | @Code(name: "DefaultInitializable demo.swift", file: "AdvancedUsage 5.swift") 56 | } 57 | 58 | @Step { 59 | We can make Product conform to ``Deeplink/DefaultInitializable`` so that we don't have to pass an instance at registration time, but a new instance will be generated every time you need to parse a URL. 60 | 61 | @Code(name: "DefaultInitializable demo.swift", file: "AdvancedUsage 6.swift") 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplink 1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | struct Product { 5 | var productId: String? 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplink 2.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | // The type variable indicates which type do you want to use the keypaths of: using the `Product` type allows us to use the `\.productId` keypath. 11 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 12 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplink 3.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | // The type variable indicates which type do you want to use the keypaths of: using the `Product` type allows us to use the `\.productId` keypath. 11 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 12 | 13 | let center = DeeplinksCenter() 14 | 15 | center.register( 16 | deeplink: productDeeplink, 17 | assigningTo: Product(), // When the template matches the input URL, the values extracted will be assigned to the object passed in this property. 18 | ifMatching: { url, value in 19 | 20 | // We can do what we need here with a ready `Product` value, parsed from the received deeplink URL if it is parsed successfully. 21 | print("ProductId: \(value.productId)") 22 | 23 | // We return `true` to indicate that we handled the deeplink successfully. 24 | return true 25 | }) 26 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplink 4.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | // The type variable indicates which type do you want to use the keypaths of: using the `Product` type allows us to use the `\.productId` keypath. 11 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 12 | 13 | let center = DeeplinksCenter() 14 | 15 | center.register( 16 | deeplink: productDeeplink, 17 | assigningTo: Product(), // When the template matches the input URL, the values extracted will be assigned to the object passed in this property. 18 | ifMatching: { url, value in 19 | 20 | // We can do what we need here with a ready `Product` value, parsed from the received deeplink URL if it is parsed successfully. 21 | print("ProductId: \(value.productId)") 22 | 23 | // We return `true` to indicate that we handled the deeplink successfully. 24 | return true 25 | }) 26 | 27 | 28 | // Now the center is ready to parse URLs! 29 | 30 | let url = URL(string: "https://example.com/product/123abc")! 31 | try! center.parse(url: url) 32 | 33 | // This will run the closure that we registered for the `productDeeplink` template since the format matches, and it will print `ProductId: 123abc`. 34 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplinkList 1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/items?ids=1,2,3,4` 3 | 4 | struct Items { 5 | var ids: [String]? 6 | } 7 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplinkList 2.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/items?ids=1,2,3,4` 3 | 4 | struct Items { 5 | var ids: [String]? 6 | } 7 | 8 | let itemsDeeplink: Deeplink = try! "/items?ids=\(\.ids, separator: ",")" 9 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingADeeplinkList 3.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/items?ids=1,2,3,4` 3 | 4 | struct Items { 5 | var ids: [String]? 6 | } 7 | 8 | let itemsDeeplink: Deeplink = try! "/items?ids=\(\.ids, separator: ",")" 9 | 10 | let center = DeeplinksCenter() 11 | 12 | center.register( 13 | deeplink: itemsDeeplink, 14 | assigningTo: Items(), // When the template matches the input URL, the values extracted will be assigned to the object passed in this property. 15 | ifMatching: { url, value in 16 | 17 | // We can do what we need here with a ready `Items` value, parsed from the received deeplink URL if it is parsed successfully. 18 | print("Items: \(value.items!.joined(separator: "-"))") 19 | 20 | // We return `true` to indicate that we handled the deeplink successfully. 21 | return true 22 | }) 23 | 24 | let url = URL(string: "https://example.com/items?ids=1,2,3,4")! 25 | try! center.parse(url: url) 26 | 27 | // This will run the closure that we registered for the `itemsDeeplink` template since the format matches, and it will print `Items: 1-2-3-4`. 28 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingMultipleDeeplinks 1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | let accountDeeplink: Deeplink = "/account" 13 | 14 | let productDetailDeeplink: Deeplink = try! "/product/\(\.productId)/detail" 15 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingMultipleDeeplinks 2.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | let accountDeeplink: Deeplink = "/account" 13 | 14 | let productDetailDeeplink: Deeplink = try! "/product/\(\.productId)/detail" 15 | 16 | let center = DeeplinksCenter() 17 | 18 | center 19 | .register( 20 | deeplink: productDeeplink, 21 | assigningTo: Product(), 22 | ifMatching: { url, value in 23 | 24 | print(value.productId) 25 | 26 | return true 27 | }) 28 | 29 | .register( 30 | deeplink: accountDeeplink, 31 | ifMatching: { url in 32 | 33 | return true 34 | }) 35 | 36 | .register( 37 | deeplink: productDetailDeeplink, 38 | assigningTo: Product(), 39 | ifMatching: { url, value in 40 | 41 | print(value.productId) 42 | 43 | return true 44 | }) 45 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AddingMultipleDeeplinks 3.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | import SwiftUI 6 | 7 | struct Product { 8 | var productId: String? 9 | } 10 | 11 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 12 | 13 | let accountDeeplink: Deeplink = "/account" 14 | 15 | let productDetailDeeplink: Deeplink = try! "/product/\(\.productId)/detail" 16 | 17 | let center = DeeplinksCenter() 18 | 19 | center 20 | .register( 21 | deeplink: productDetailDeeplink, 22 | assigningTo: Product(), 23 | ifMatching: { url, value in 24 | 25 | print(value.productId) 26 | 27 | return true 28 | }) 29 | 30 | .register( 31 | deeplink: accountDeeplink, 32 | ifMatching: { url in 33 | 34 | return true 35 | }) 36 | 37 | .register( 38 | deeplink: productDeeplink, 39 | assigningTo: Product(), 40 | ifMatching: { url, value in 41 | 42 | print(value.productId) 43 | 44 | return true 45 | }) 46 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | func isMagicOn() -> Bool { true } 13 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 2.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | func isMagicOn() -> Bool { true } 13 | 14 | let center = DeeplinksCenter() 15 | 16 | center 17 | .register( 18 | deeplink: productDeeplink, 19 | assigningTo: Product(), 20 | ifMatching: { url, value in 21 | 22 | if isMagicOn() { 23 | // Present the magic product view. 24 | } else { 25 | // Present the normal product view. 26 | } 27 | 28 | return true 29 | }) 30 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 3.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | func isMagicOn() -> Bool { true } 13 | 14 | let center = DeeplinksCenter() 15 | 16 | center 17 | .register( 18 | deeplink: productDeeplink, 19 | assigningTo: Product(), 20 | ifMatching: { url, value in 21 | 22 | guard isMagicOn() else { return false } 23 | // Present the magic product view. 24 | 25 | return true 26 | }) 27 | .register( 28 | deeplink: productDeeplink, 29 | assigningTo: Product(), 30 | ifMatching: { url, value in 31 | 32 | // Present the normal product view. 33 | 34 | return true 35 | }) 36 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 4.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | func isMagicOn() -> Bool { true } 13 | 14 | let center = DeeplinksCenter() 15 | 16 | center 17 | .register( 18 | deeplink: productDeeplink, 19 | assigningTo: Product(), 20 | ifMatching: { url, value in 21 | 22 | guard isMagicOn() else { return false } 23 | // Present the magic product view. 24 | 25 | return true 26 | }) 27 | .register( 28 | deeplink: productDeeplink, 29 | assigningTo: Product(), 30 | ifMatching: { url, value in 31 | 32 | guard url.absoluteString?.starts(with: "https") ?? false 33 | else { return false } 34 | 35 | // Present the normal product view. 36 | 37 | return true 38 | }) 39 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 5.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | let center = DeeplinksCenter() 13 | 14 | center 15 | .register( 16 | deeplink: productDeeplink, 17 | assigningTo: Product(), 18 | ifMatching: { url, value in 19 | 20 | // Present the product view. 21 | 22 | return true 23 | }) 24 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/AdvancedUsage 6.swift: -------------------------------------------------------------------------------- 1 | 2 | // Example link: `https://example.com/product/123` 3 | 4 | import Deeplink 5 | 6 | struct Product: DefaultInitializable { 7 | var productId: String? 8 | } 9 | 10 | let productDeeplink: Deeplink = try! "/product/\(\.productId)" 11 | 12 | let center = DeeplinksCenter() 13 | 14 | center 15 | .register( 16 | deeplink: productDeeplink, 17 | ifMatching: { url, value in 18 | 19 | // Present the product view. 20 | 21 | return true 22 | }) 23 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/ResultBuilder 1.swift: -------------------------------------------------------------------------------- 1 | import Deeplink 2 | 3 | let link1 = "/test/1" as Deeplink 4 | 5 | let center = DeeplinksCenter { 6 | 7 | link1 { url in 8 | XCTAssertEqual(url.absoluteString, "https://apple.com/test/1") 9 | return true 10 | } 11 | } 12 | 13 | try center.parse(url: URL(string: "https://apple.com/test/1")!) 14 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/ResultBuilder 2.swift: -------------------------------------------------------------------------------- 1 | import Deeplink 2 | 3 | struct TestData: DefaultInitializable { 4 | var arg1: String? 5 | var arg2: String? 6 | } 7 | 8 | let link1 = "/test/1" as Deeplink 9 | let link2 = try "/test/\(\.arg1)/\(\.arg2)" as Deeplink 10 | 11 | let center = DeeplinksCenter { 12 | 13 | link1 { url in 14 | XCTAssertEqual(url.absoluteString, "https://apple.com/test/1") 15 | return true 16 | } 17 | 18 | link2 { url, value in 19 | XCTAssertEqual(url.absoluteString, "https://apple.com/test/a/b") 20 | XCTAssertEqual(value.arg1, "a") 21 | XCTAssertEqual(value.arg2, "b") 22 | return true 23 | } 24 | } 25 | 26 | try center.parse(url: URL(string: "https://apple.com/test/1")!) 27 | try center.parse(url: URL(string: "https://apple.com/test/a/b")!) 28 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/ResultBuilder 3.swift: -------------------------------------------------------------------------------- 1 | import Deeplink 2 | 3 | struct TestData: DefaultInitializable { 4 | var arg1: String? 5 | var arg2: String? 6 | } 7 | 8 | struct TestData2 { 9 | var arg1: String? 10 | var arg2: String? 11 | } 12 | 13 | let link1 = "/test/1" as Deeplink 14 | let link2 = try "/test/\(\.arg1)/\(\.arg2)" as Deeplink 15 | let link3 = try "/test2/\(\.arg1)/\(\.arg2)" as Deeplink 16 | 17 | let center = DeeplinksCenter { 18 | 19 | link1 { url in 20 | XCTAssertEqual(url.absoluteString, "https://apple.com/test/1") 21 | return true 22 | } 23 | 24 | link2 { url, value in 25 | XCTAssertEqual(url.absoluteString, "https://apple.com/test/a/b") 26 | XCTAssertEqual(value.arg1, "a") 27 | XCTAssertEqual(value.arg2, "b") 28 | return true 29 | } 30 | 31 | link3( 32 | assigningTo: .init(arg1: "default", arg2: "default") 33 | ) { (url, value) -> Bool in 34 | XCTAssertEqual(url.absoluteString, "https://apple.com/test2/a/b") 35 | XCTAssertEqual(value.arg1, "a") 36 | XCTAssertEqual(value.arg2, "b") 37 | return true 38 | } 39 | } 40 | 41 | try center.parse(url: URL(string: "https://apple.com/test/1")!) 42 | try center.parse(url: URL(string: "https://apple.com/test/a/b")!) 43 | try center.parse(url: URL(string: "https://apple.com/test2/a/b")!) 44 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/ResultBuilder 4.swift: -------------------------------------------------------------------------------- 1 | import Deeplink 2 | 3 | let link1 = "/test/1" as Deeplink 4 | 5 | func magicABTestIsOn() -> Bool { Bool.random() } 6 | 7 | let center = DeeplinksCenter { 8 | 9 | link1 { url in 10 | if !magicABTestIsOn() { return false } 11 | 12 | // Present Screen A 13 | return true 14 | } 15 | 16 | link1 { url in 17 | 18 | // Present WebView 19 | return true 20 | } 21 | } 22 | 23 | try center.parse(url: URL(string: "https://apple.com/test/1")!) 24 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Sources/ResultBuilder 5.swift: -------------------------------------------------------------------------------- 1 | import Deeplink 2 | 3 | let link1 = "/test/1" as Deeplink 4 | 5 | func magicABTestIsOn() -> Bool { Bool.random() } 6 | 7 | let center = DeeplinksCenter { 8 | 9 | if magicABTestIsOn() { 10 | link1 { url in 11 | // Present Screen A 12 | return true 13 | } 14 | } 15 | 16 | link1 { url in 17 | 18 | // Present WebView 19 | return true 20 | } 21 | } 22 | 23 | try center.parse(url: URL(string: "https://apple.com/test/1")!) 24 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Table of Contents.tutorial: -------------------------------------------------------------------------------- 1 | @Tutorials(name: "Documentation") { 2 | @Intro(title: "🎣 All about Deeplinks") { 3 | These tutorials will explain how to add deeplinks to your app, and how to manage more complex situations like overlapping deeplink templates or choosing at runtime whether to match a URL or not. 4 | } 5 | 6 | @Chapter(name: "Using the library") { 7 | This chapter is all about how to use the library: from the basics to more advanced usage. 8 | 9 | @Image(source: "Visual.png", alt: "A visual representation of transforming some parameters in a URL into values assigned to specific properties of a struct.") 10 | 11 | @TutorialReference(tutorial: "doc:Adding-a-Deeplink") 12 | @TutorialReference(tutorial: "doc:Using-a-ResultBuilder") 13 | @TutorialReference(tutorial: "doc:Advanced-Usage") 14 | } 15 | 16 | @Resources { 17 | Explore more resources for learning about deeplinks. 18 | 19 | @Videos(destination: "https://developer.apple.com/videos/play/wwdc2017/250/") { 20 | Several WWDC videos explain deeplinking and Universal links: 21 | 22 | - [2017 - Extend Your App’s Presence with Deep Linking](https://developer.apple.com/videos/play/wwdc2017/250/) 23 | - [2019 - What's new in Universal links](https://developer.apple.com/videos/play/wwdc2019/717/) 24 | - [2020 - What's new in Universal links](https://developer.apple.com/videos/play/wwdc2020/10098/) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Deeplink/Documentation.docc/Tutorials/Using a ResultBuilder.tutorial: -------------------------------------------------------------------------------- 1 | @Tutorial(time: 10) { 2 | @Intro(title: "Registering Deeplinks with a ResultBuilder") { 3 | If you need advanced behaviors, you can also register your ``Deeplink/Deeplink`` templates using a `@resultBuilder`. 4 | 5 | For example, you could enable or disable a specific deeplinking behavior based on a feature flag, or some AB testing parameters. 6 | } 7 | 8 | @Section(title: "Implementation") { 9 | Let's go through an example where I want to AB test presenting a specific screen, versus just presenting a webview with the corresponding web content. 10 | 11 | @Steps { 12 | @Step { 13 | You can use the ``Deeplink/DeeplinksCenter/init(_:)`` initializer to open a closure where you can register deeplinks in a different way. 14 | 15 | Registering a literal deeplink template with no arguments only gives you back the URL, in case of a match. 16 | 17 | @Code(name: "ResultBuilder demo.swift", file: "ResultBuilder 1.swift") 18 | } 19 | 20 | @Step { 21 | Registering a deeplink template with arguments is very similar, but you will get a `Value` inside the closure as well. 22 | 23 | @Code(name: "ResultBuilder demo.swift", file: "ResultBuilder 2.swift") 24 | } 25 | 26 | @Step { 27 | Since our old `TestData` type conforms to ``Deeplink/DefaultInitializable``, we don't need to provide an instance to assign values to. 28 | 29 | In case we cannot conform to this protocol, we can still provide an instance using this other overload. 30 | 31 | @Code(name: "ResultBuilder demo.swift", file: "ResultBuilder 3.swift") 32 | } 33 | } 34 | } 35 | 36 | @Section(title: "Conditionally removing templates") { 37 | 38 | Let's go through an example where I want to AB test presenting a specific screen, versus just presenting a webview with the corresponding web content. 39 | 40 | @Steps { 41 | One way to approach this is to add a check inside the `isMatching` function. 42 | 43 | @Step { 44 | If you have a function `magicABTestIsOn` that gives you a `Bool` to enable/disable a specific behavior, you can call it from inside the `isMatching` function. 45 | 46 | This function is called every time a new URL is evaluated. 47 | 48 | @Code(name: "ResultBuilder demo.swift", file: "ResultBuilder 4.swift") 49 | } 50 | 51 | @Step { 52 | If you only want to check once when you first initialize your ``Deeplink/DeeplinksCenter``, you can use the `@resultBuilder` capabilities to potentially remove a template registration from the evaluation list all together. 53 | 54 | @Code(name: "ResultBuilder demo.swift", file: "ResultBuilder 5.swift") 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Sources/Deeplink/Utilities/String+utilities.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+utilities.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | 10 | extension String { 11 | /// Like the `split(separator:)` function, but only splitting on the first occurrence of the pattern. 12 | func splitFirstOccurrence( 13 | of string: String 14 | ) -> [String] { 15 | guard let firstOccurrenceRange = self.range(of: string) 16 | else { return [self] } 17 | 18 | return [ 19 | String(self[ 20 | .. String { 30 | // `components` is never empty even for the empty string 🤔 31 | components(separatedBy: CharacterSet(charactersIn: string))[0] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Deeplink/Utilities/URL+relativePathWithQueryItemsAndFragments.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URL+relativePathWithQueryItemsAndFragments.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | 10 | extension URL { 11 | /// Get the relative path part out of a `URL`. 12 | /// 13 | /// Example: for the url `"https://apple.com/test?query=some#fragment"`, the relative path is `/test?query=some#fragment`, including query items (`?query=some`) and URL fragments (`#fragment`). 14 | var relativePathWithQueryItemsAndFragments: String? { 15 | var components = URLComponents( 16 | url: self, 17 | resolvingAgainstBaseURL: false) 18 | 19 | components?.host = nil 20 | components?.scheme = nil 21 | components?.port = nil 22 | components?.user = nil 23 | 24 | return components?.string 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Tests/DeeplinkTests/CatchAllDeeplinkTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CatchAllDeeplinkTests.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 02/02/2022. 6 | // 7 | 8 | import XCTest 9 | @testable import Deeplink 10 | 11 | class CatchAllDeeplinkTests: XCTestCase { 12 | 13 | func testMatchesPath() { 14 | let deeplink = Deeplink.catchAll 15 | XCTAssertNoThrow(try deeplink.parse("apple:///test")) 16 | } 17 | 18 | func testMatchesEmptyPath() { 19 | let deeplink = Deeplink.catchAll 20 | XCTAssertNoThrow(try deeplink.parse("apple://")) 21 | } 22 | 23 | func testMatchesSlashPath() { 24 | let deeplink = Deeplink.catchAll 25 | XCTAssertNoThrow(try deeplink.parse("apple:///")) 26 | } 27 | 28 | func testMatchesPathIgnoringNextPath() { 29 | let deeplink = Deeplink.catchAll 30 | XCTAssertNoThrow(try deeplink.parse("apple:///test/again")) 31 | } 32 | 33 | func testMatchesPathIgnoringQueryItems() { 34 | let deeplink = Deeplink.catchAll 35 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1")) 36 | } 37 | 38 | func testMatchesPathIgnoringFragments() { 39 | let deeplink = Deeplink.catchAll 40 | XCTAssertNoThrow(try deeplink.parse("apple:///test#fragment")) 41 | } 42 | 43 | func testMatchesPathIgnoringEverything() { 44 | let deeplink = Deeplink.catchAll 45 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1&b=2#fragment")) 46 | } 47 | 48 | func testMatchesPathAndQueryItems() { 49 | let deeplink = Deeplink.catchAll 50 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1")) 51 | } 52 | 53 | func testMatchesPathAndQueryItemsIgnoringNextQueryItems() { 54 | let deeplink = Deeplink.catchAll 55 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1&b=2")) 56 | } 57 | 58 | func testMatchesPathAndQueryItemsIgnoringFragments() { 59 | let deeplink = Deeplink.catchAll 60 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1#fragment")) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Tests/DeeplinkTests/EncodingDeeplinkTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EncodingDeeplinkTests.swift 3 | // 4 | // 5 | // Created by Dmitry Lobanov on 28.01.2024. 6 | // 7 | 8 | import Foundation 9 | import XCTest 10 | @testable import Deeplink 11 | 12 | @MainActor 13 | class EncodingDeeplinkTests: XCTestCase { 14 | 15 | struct Artist: Equatable { 16 | var id: String? 17 | var slug: String? 18 | } 19 | 20 | struct Event: Equatable { 21 | var id: String? 22 | var slug: String? 23 | } 24 | 25 | struct EventType: Equatable { 26 | var id: String? 27 | var slug: String? 28 | var event = Event() 29 | } 30 | 31 | struct Search: Equatable { 32 | var query: String? 33 | } 34 | 35 | struct CustomData: Equatable { 36 | var testData: Int? 37 | 38 | var testDataString: String? { 39 | get { testData.map { "\($0)" } } 40 | set { testData = newValue.flatMap(Int.init) } 41 | } 42 | } 43 | 44 | struct Restaurants: Equatable { 45 | var ids: [String]? 46 | } 47 | 48 | func testEncoding_Artist() { 49 | let deeplink = try! "/artist/\(\.slug)/\(\.id)" as Deeplink 50 | 51 | let url = "/artist/123/1" 52 | 53 | var object = Artist() 54 | object.slug = "123" 55 | object.id = "1" 56 | XCTAssertEqual(url, deeplink.encode(object)) 57 | } 58 | 59 | func testEncoding_EventType() { 60 | let deeplink = try! "/event/\(\.event.slug)/\(\.slug)/\(\.event.id)/\(\.id)" as Deeplink 61 | 62 | let url = "/event/food/restaurants/123/1" 63 | 64 | var object = EventType() 65 | var event = Event() 66 | 67 | event.slug = "food" 68 | object.slug = "restaurants" 69 | event.id = "123" 70 | object.id = "1" 71 | object.event = event 72 | 73 | XCTAssertEqual(url, deeplink.encode(object)) 74 | } 75 | 76 | func testEncoding_Search() { 77 | let deeplink = try! "/search?query=\(\.query)" as Deeplink 78 | 79 | let url = "/search?query=food" 80 | 81 | var object = Search() 82 | object.query = "food" 83 | XCTAssertEqual(url, deeplink.encode(object)) 84 | } 85 | 86 | func testEncoding_CustomData() { 87 | let deeplink = try! "/test/\(\.testDataString)" as Deeplink 88 | 89 | let url = "/test/123" 90 | 91 | var object = CustomData() 92 | object.testData = 123 93 | 94 | XCTAssertEqual(url, deeplink.encode(object)) 95 | } 96 | 97 | func testEncoding_Restaurants() { 98 | let deeplink = try! "/restaurants/ids=\(\.ids, separator: ",")" as Deeplink 99 | 100 | let url = "/restaurants/ids=123,456,789" 101 | 102 | var object = Restaurants() 103 | object.ids = ["123", "456", "789"] 104 | 105 | XCTAssertEqual(url, deeplink.encode(object)) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Tests/DeeplinkTests/LiteralDeeplinksTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LiteralDeeplinkTests.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | import XCTest 10 | @testable import Deeplink 11 | 12 | fileprivate struct TestData { 13 | var arg1: String? 14 | var arg2: String? 15 | } 16 | 17 | class LiteralDeeplinkTests: XCTestCase { 18 | 19 | func testMatchesPath() { 20 | let deeplink = "/test" as Deeplink 21 | XCTAssertNoThrow(try deeplink.parse("apple:///test")) 22 | } 23 | 24 | func testMatchesEmptyPath() { 25 | let deeplink = "" as Deeplink 26 | XCTAssertNoThrow(try deeplink.parse("apple://")) 27 | } 28 | 29 | func testEverythingMatchesEmptyPath() { 30 | let deeplink = "" as Deeplink 31 | XCTAssertNoThrow(try deeplink.parse("apple:///")) 32 | XCTAssertNoThrow(try deeplink.parse("apple://test")) 33 | XCTAssertNoThrow(try deeplink.parse("apple:///test/again")) 34 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1")) 35 | XCTAssertNoThrow(try deeplink.parse("apple:///test#fragment")) 36 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1&b=2#fragment")) 37 | } 38 | 39 | func testMatchesSlashPath() { 40 | let deeplink = "/" as Deeplink 41 | XCTAssertNoThrow(try deeplink.parse("apple:///")) 42 | } 43 | 44 | func testMatchesPathIgnoringNextPath() { 45 | let deeplink = "/test" as Deeplink 46 | XCTAssertNoThrow(try deeplink.parse("apple:///test/again")) 47 | } 48 | 49 | func testMatchesPathIgnoringQueryItems() { 50 | let deeplink = "/test" as Deeplink 51 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1")) 52 | } 53 | 54 | func testMatchesPathIgnoringFragments() { 55 | let deeplink = "/test" as Deeplink 56 | XCTAssertNoThrow(try deeplink.parse("apple:///test#fragment")) 57 | } 58 | 59 | func testMatchesPathIgnoringEverything() { 60 | let deeplink = "/test" as Deeplink 61 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1&b=2#fragment")) 62 | } 63 | 64 | func testMatchesPathAndQueryItems() { 65 | let deeplink = "/test?a=1" as Deeplink 66 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1")) 67 | } 68 | 69 | func testMatchesPathAndQueryItemsIgnoringNextQueryItems() { 70 | let deeplink = "/test?a=1" as Deeplink 71 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1&b=2")) 72 | } 73 | 74 | func testMatchesPathAndQueryItemsIgnoringFragments() { 75 | let deeplink = "/test?a=1" as Deeplink 76 | XCTAssertNoThrow(try deeplink.parse("apple:///test?a=1#fragment")) 77 | } 78 | 79 | func testThrowsIfDoesntMatch() { 80 | let deeplink = "/test?a=1" as Deeplink 81 | 82 | XCTAssertThrowsError( 83 | try deeplink.parse("apple:///test/help?a=1#fragment"), 84 | "Expected non matching path", 85 | { error in 86 | guard let deeplinkError = error as? DeeplinkError 87 | else { XCTFail("Error is of wrong type: \(error)"); return } 88 | 89 | print(deeplinkError.localizedDescription) 90 | 91 | XCTAssertEqual( 92 | DeeplinkError.pathDoesntMatchWithLiteralDeepLink( 93 | path: "/test/help?a=1#fragment", 94 | deepLink: "/test?a=1"), 95 | deeplinkError) 96 | }) 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Tests/DeeplinkTests/StringUtilitiesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StringUtilitiesTests.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | import XCTest 10 | @testable import Deeplink 11 | 12 | class StringUtilitiesTests: XCTestCase { 13 | 14 | func testSplitFirstOccurrence() { 15 | 16 | let test = "abcdefabcdefabcdefabcdef" 17 | 18 | let result = test.splitFirstOccurrence(of: "def") 19 | 20 | XCTAssertEqual([ 21 | "abc", 22 | "abcdefabcdefabcdef" 23 | ], result) 24 | } 25 | 26 | func testSplitFirstOccurrenceOnEmptyString() { 27 | 28 | let test = "" 29 | 30 | let result = test.splitFirstOccurrence(of: "def") 31 | 32 | XCTAssertEqual([ 33 | test 34 | ], result) 35 | } 36 | 37 | 38 | func testSplitFirstOccurrenceOnStringStart() { 39 | 40 | let test = "defabcdefabcdefabcdef" 41 | 42 | let result = test.splitFirstOccurrence(of: "def") 43 | 44 | XCTAssertEqual([ 45 | "", 46 | "abcdefabcdefabcdef" 47 | ], result) 48 | } 49 | 50 | func testSplitFirstOccurrenceOnStringEnd() { 51 | 52 | let test = "abcdef" 53 | 54 | let result = test.splitFirstOccurrence(of: "def") 55 | 56 | XCTAssertEqual([ 57 | "abc", 58 | "" 59 | ], result) 60 | } 61 | 62 | func testRemoveAfterAnyCharacterIn() { 63 | 64 | let test = "abcdefghijklmnopqrstuvwxyz" 65 | 66 | let result = test.removeAfterAnyCharacterIn(string: "yis") 67 | 68 | XCTAssertEqual( 69 | "abcdefgh", 70 | result) 71 | } 72 | 73 | func testRemoveAfterAnyCharacterInOnEmptyString() { 74 | 75 | let test = "" 76 | 77 | let result = test.removeAfterAnyCharacterIn(string: "yis") 78 | 79 | XCTAssertEqual( 80 | "", 81 | result) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Tests/DeeplinkTests/Utilities/URL+initWithStringLiteral.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URL+initWithStringLiteral.swift 3 | // 4 | // 5 | // Created by Tiziano Coroneo on 29/02/2020. 6 | // 7 | 8 | import Foundation 9 | 10 | extension URL: ExpressibleByStringLiteral { 11 | public typealias StringLiteralType = StaticString 12 | 13 | public init( 14 | stringLiteral value: StaticString 15 | ) { 16 | self.init(string: value 17 | .withUTF8Buffer { String(decoding: $0, as: UTF8.self) })! 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /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/deeplink/anydeeplink/description.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/deeplink\/anydeeplink\/description"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"description"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"modules":[{"name":"Deeplink"}],"role":"symbol","roleHeading":"Instance Property","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"description"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"externalID":"s:8Deeplink03AnyA0V11descriptionSSvp","title":"description","symbolKind":"property"},"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/AnyDeeplink\/description","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Inherited from "},{"code":"CustomStringConvertible.description","type":"codeVoice"},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/AnyDeeplink"]]},"references":{"doc://Deeplink/documentation/Deeplink/AnyDeeplink":{"url":"\/documentation\/deeplink\/anydeeplink","role":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/AnyDeeplink","navigatorTitle":[{"text":"AnyDeeplink","kind":"identifier"}],"kind":"symbol","type":"topic","abstract":[{"type":"text","text":"Type-erased version of "},{"type":"reference","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","isActive":true},{"type":"text","text":". Used to keep a list of Deeplinks in the "},{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter","type":"reference","isActive":true},{"text":" where every element of the list might have different type parameters.","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AnyDeeplink","kind":"identifier"}],"title":"AnyDeeplink"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/AnyDeeplink/description":{"type":"topic","abstract":[],"url":"\/documentation\/deeplink\/anydeeplink\/description","kind":"symbol","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"description","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/AnyDeeplink\/description","title":"description"},"doc://Deeplink/documentation/Deeplink/DeeplinksCenter":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinksCenter"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter","navigatorTitle":[{"text":"DeeplinksCenter","kind":"identifier"}],"role":"symbol","title":"DeeplinksCenter","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkscenter","type":"topic","abstract":[{"type":"text","text":"Register deeplinks and parse URLs."}]},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/!=(_:_:).json: -------------------------------------------------------------------------------- 1 | {"sections":[],"kind":"symbol","abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"rhs","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]}]}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/!=(_:_:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/!=(_:_:)"]}],"metadata":{"role":"symbol","roleHeading":"Operator","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"title":"!=(_:_:)","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:8DeeplinkAAO","extendedModule":"Swift","symbolKind":"op","modules":[{"relatedModules":["Swift"],"name":"Deeplink"}]},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/Equatable-Implementations"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/Deeplink/!=(_:_:)":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/!=(_:_:)","url":"\/documentation\/deeplink\/deeplink\/!=(_:_:)","title":"!=(_:_:)","role":"symbol","type":"topic","abstract":[],"kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]},"doc://Deeplink/documentation/Deeplink/Deeplink/Equatable-Implementations":{"url":"\/documentation\/deeplink\/deeplink\/equatable-implementations","kind":"article","role":"collectionGroup","type":"topic","abstract":[],"title":"Equatable Implementations","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/Equatable-Implementations"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/catchall.json: -------------------------------------------------------------------------------- 1 | {"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/catchAll","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"catchAll"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","text":"Deeplink","preciseIdentifier":"s:8DeeplinkAAO"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]}],"abstract":[{"type":"text","text":"A placeholder deeplink to match any URL."}],"metadata":{"externalID":"s:8DeeplinkAAOAAytRszlE8catchAllAByytGvpZ","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"constraints":[{"type":"codeVoice","code":"Value"},{"type":"text","text":" is "},{"code":"()","type":"codeVoice"},{"type":"text","text":"."}]},"roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"catchAll","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Deeplink","preciseIdentifier":"s:8DeeplinkAAO","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":">","kind":"text"}],"title":"catchAll","extendedModule":"Deeplink","symbolKind":"property","role":"symbol","modules":[{"name":"Deeplink"}]},"variants":[{"paths":["\/documentation\/deeplink\/deeplink\/catchall"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink/catchAll":{"url":"\/documentation\/deeplink\/deeplink\/catchall","kind":"symbol","role":"symbol","type":"topic","abstract":[{"text":"A placeholder deeplink to match any URL.","type":"text"}],"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"catchAll"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Deeplink","preciseIdentifier":"s:8DeeplinkAAO"},{"kind":"text","text":"<"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":">"}],"title":"catchAll","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"code":"Value","type":"codeVoice"},{"text":" is ","type":"text"},{"type":"codeVoice","code":"()"},{"type":"text","text":"."}],"conformancePrefix":[{"text":"Conforms when","type":"text"}]},"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/catchAll"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/customstringconvertible-implementations.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"kind":"article","topicSections":[{"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/description"],"title":"Instance Properties","generated":true}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/CustomStringConvertible-Implementations","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/customstringconvertible-implementations"]}],"metadata":{"role":"collectionGroup","title":"CustomStringConvertible Implementations","modules":[{"name":"Deeplink"}]},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Deeplink/documentation/Deeplink/Deeplink/description":{"kind":"symbol","title":"description","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"description"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/description","url":"\/documentation\/deeplink\/deeplink\/description","abstract":[]},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/description.json: -------------------------------------------------------------------------------- 1 | {"abstract":[{"text":"Inherited from ","type":"text"},{"code":"CustomStringConvertible.description","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/description"]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/description"},"metadata":{"symbolKind":"property","extendedModule":"Deeplink","externalID":"s:8DeeplinkAAO11descriptionSSvp","modules":[{"name":"Deeplink"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"description","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"title":"description","role":"symbol","roleHeading":"Instance Property"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"description","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/CustomStringConvertible-Implementations"]]},"references":{"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/Deeplink/description":{"kind":"symbol","title":"description","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"description"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/description","url":"\/documentation\/deeplink\/deeplink\/description","abstract":[]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink/CustomStringConvertible-Implementations":{"url":"\/documentation\/deeplink\/deeplink\/customstringconvertible-implementations","kind":"article","role":"collectionGroup","type":"topic","abstract":[],"title":"CustomStringConvertible Implementations","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/CustomStringConvertible-Implementations"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/encode(_:).json: -------------------------------------------------------------------------------- 1 | {"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/encode(_:)"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"value"},{"kind":"text","text":": "},{"text":"Value","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"object to encode","type":"text"}]}],"name":"value"}]},{"content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"string representation of deeplink with specified object"}]}],"kind":"content"},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"inlineContent":[{"text":"Example","type":"text"}],"type":"paragraph"},{"code":["struct Ticket {"," var ticketId: String?","}","","let deeplink = try! \"\/sell\/\\(\\.ticketId)\" as Deeplink","","var ticket = Ticket(ticketId: \"123\")","let encoded = deeplink.encode(ticket)","","print(encoded) \/\/ \"\/sell\/123\""],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Opposite to parse"}]}]}],"abstract":[{"type":"text","text":"Encodes object into string representation of deeplink"}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/encode(_:)"},"sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"encode"},{"kind":"text","text":"("},{"text":"Value","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}],"title":"encode(_:)","externalID":"s:8DeeplinkAAO6encodeySSxF","roleHeading":"Instance Method","modules":[{"name":"Deeplink"}],"symbolKind":"method","role":"symbol"},"references":{"doc://Deeplink/documentation/Deeplink/Deeplink/encode(_:)":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/encode(_:)","url":"\/documentation\/deeplink\/deeplink\/encode(_:)","type":"topic","title":"encode(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"text":"Value","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"kind":"symbol","abstract":[{"type":"text","text":"Encodes object into string representation of deeplink"}]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/equatable-implementations.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/equatable-implementations"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/Equatable-Implementations"},"topicSections":[{"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/!=(_:_:)"],"title":"Operators","generated":true}],"metadata":{"modules":[{"name":"Deeplink"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/Deeplink/!=(_:_:)":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/!=(_:_:)","url":"\/documentation\/deeplink\/deeplink\/!=(_:_:)","title":"!=(_:_:)","role":"symbol","type":"topic","abstract":[],"kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/expressiblebyextendedgraphemeclusterliteral-implementations.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/ExpressibleByExtendedGraphemeClusterLiteral-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(extendedGraphemeClusterLiteral:)"],"generated":true}],"metadata":{"modules":[{"name":"Deeplink"}],"role":"collectionGroup","title":"ExpressibleByExtendedGraphemeClusterLiteral Implementations"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/expressiblebyextendedgraphemeclusterliteral-implementations"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Deeplink/documentation/Deeplink/Deeplink/init(extendedGraphemeClusterLiteral:)":{"title":"init(extendedGraphemeClusterLiteral:)","role":"symbol","type":"topic","conformance":{"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"type":"codeVoice","code":"ExtendedGraphemeClusterLiteralType"},{"text":" is ","type":"text"},{"type":"codeVoice","code":"Self.StringLiteralType"},{"type":"text","text":"."}]},"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(extendedGraphemeClusterLiteral:)","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"extendedGraphemeClusterLiteral","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"StringLiteralType","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[],"kind":"symbol","url":"\/documentation\/deeplink\/deeplink\/init(extendedgraphemeclusterliteral:)"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/expressiblebystringinterpolation-implementations.json: -------------------------------------------------------------------------------- 1 | {"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"metadata":{"modules":[{"name":"Deeplink"}],"role":"collectionGroup","title":"ExpressibleByStringInterpolation Implementations"},"kind":"article","topicSections":[{"generated":true,"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(stringInterpolation:)"],"title":"Initializers"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/ExpressibleByStringInterpolation-Implementations"},"variants":[{"paths":["\/documentation\/deeplink\/deeplink\/expressiblebystringinterpolation-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Deeplink/documentation/Deeplink/Deeplink/init(stringInterpolation:)":{"url":"\/documentation\/deeplink\/deeplink\/init(stringinterpolation:)","kind":"symbol","role":"symbol","type":"topic","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(stringInterpolation:)","abstract":[{"type":"text","text":"Initialize a deeplink template with a string interpolation pattern. This will attempt to pattern match the string components of the interpolation, while assigning the extra parts of the URL to the property specified by keypaths from the argument components."}],"title":"init(stringInterpolation:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"stringInterpolation","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"DeeplinkInterpolation","preciseIdentifier":"s:8Deeplink0A13InterpolationV"},{"kind":"text","text":"<"},{"text":"Value","kind":"typeIdentifier"},{"text":">)","kind":"text"}]},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/expressiblebystringliteral-implementations.json: -------------------------------------------------------------------------------- 1 | {"metadata":{"title":"ExpressibleByStringLiteral Implementations","modules":[{"name":"Deeplink"}],"role":"collectionGroup"},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"kind":"article","sections":[],"topicSections":[{"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(stringLiteral:)"],"title":"Initializers","generated":true}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/expressiblebystringliteral-implementations"]}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/ExpressibleByStringLiteral-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/Deeplink/init(stringLiteral:)":{"url":"\/documentation\/deeplink\/deeplink\/init(stringliteral:)","kind":"symbol","role":"symbol","type":"topic","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(stringLiteral:)","abstract":[{"text":"Initialize a deeplink template with a ","type":"text"},{"code":"String","type":"codeVoice"},{"text":" literal. This will simply attempt to pattern match this string with the ","type":"text"},{"type":"codeVoice","code":"URL"},{"text":" passed to the ","type":"text"},{"type":"codeVoice","code":"parse(_:into:)"},{"type":"text","text":" function."}],"title":"init(stringLiteral:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"stringLiteral"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:8DeeplinkAAO","text":"Deeplink"},{"text":"<","kind":"text"},{"text":"Value","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"text":"StringLiteralType","kind":"typeIdentifier","preciseIdentifier":"s:8DeeplinkAAO17StringLiteralTypea"},{"text":")","kind":"text"}]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/expressiblebyunicodescalarliteral-implementations.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"variants":[{"paths":["\/documentation\/deeplink\/deeplink\/expressiblebyunicodescalarliteral-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"generated":true,"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(unicodeScalarLiteral:)"],"title":"Initializers"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/ExpressibleByUnicodeScalarLiteral-Implementations"},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"title":"ExpressibleByUnicodeScalarLiteral Implementations","modules":[{"name":"Deeplink"}],"role":"collectionGroup"},"kind":"article","references":{"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/Deeplink/init(unicodeScalarLiteral:)":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"unicodeScalarLiteral","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"ExtendedGraphemeClusterLiteralType","kind":"typeIdentifier"},{"kind":"text","text":")"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/init(unicodeScalarLiteral:)","conformance":{"constraints":[{"code":"ExtendedGraphemeClusterLiteralType","type":"codeVoice"},{"text":" is ","type":"text"},{"code":"Self.UnicodeScalarLiteralType","type":"codeVoice"},{"type":"text","text":"."}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"availabilityPrefix":[{"type":"text","text":"Available when"}]},"abstract":[],"title":"init(unicodeScalarLiteral:)","url":"\/documentation\/deeplink\/deeplink\/init(unicodescalarliteral:)","role":"symbol"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/literal(_:).json: -------------------------------------------------------------------------------- 1 | {"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/literal(_:)"},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"literal","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":")"}]}],"kind":"declarations"}],"abstract":[{"text":"A “literal” deeplink is a simple string: you can have a deeplink with no arguments and still attempt pattern matching it with a URL.","type":"text"}],"metadata":{"symbolKind":"case","externalID":"s:8DeeplinkAAO7literalyAByxGSScADmlF","roleHeading":"Case","role":"symbol","title":"Deeplink.literal(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"literal","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":")"}],"modules":[{"name":"Deeplink"}]},"variants":[{"paths":["\/documentation\/deeplink\/deeplink\/literal(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Deeplink/documentation/Deeplink/Deeplink/literal(_:)":{"url":"\/documentation\/deeplink\/deeplink\/literal(_:)","kind":"symbol","role":"symbol","type":"topic","abstract":[{"text":"A “literal” deeplink is a simple string: you can have a deeplink with no arguments and still attempt pattern matching it with a URL.","type":"text"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"literal","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"title":"Deeplink.literal(_:)","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/literal(_:)"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplink/stringliteraltype.json: -------------------------------------------------------------------------------- 1 | {"metadata":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"StringLiteralType","kind":"identifier"}],"symbolKind":"typealias","roleHeading":"Type Alias","externalID":"s:8DeeplinkAAO17StringLiteralTypea","navigatorTitle":[{"text":"StringLiteralType","kind":"identifier"}],"role":"symbol","title":"Deeplink.StringLiteralType","modules":[{"name":"Deeplink"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/StringLiteralType"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplink\/stringliteraltype"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StringLiteralType"},{"text":" = ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]}],"kind":"declarations"}],"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"ExpressibleByStringLiteral.StringLiteralType"},{"type":"text","text":"."}],"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink/StringLiteralType":{"abstract":[],"type":"topic","url":"\/documentation\/deeplink\/deeplink\/stringliteraltype","title":"Deeplink.StringLiteralType","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"StringLiteralType"}],"navigatorTitle":[{"kind":"identifier","text":"StringLiteralType"}],"kind":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink\/StringLiteralType","role":"symbol"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/!=(_:_:).json: -------------------------------------------------------------------------------- 1 | {"metadata":{"roleHeading":"Operator","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:8Deeplink0A13InterpolationV","symbolKind":"op","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"role":"symbol","modules":[{"name":"Deeplink","relatedModules":["Swift"]}],"title":"!=(_:_:)","extendedModule":"Swift"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/!=(_:_:)"},"variants":[{"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"text":"rhs","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}]}]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/Equatable-Implementations"]]},"abstract":[{"type":"text","text":"Inherited from "},{"code":"Equatable.!=(_:_:)","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","references":{"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/Equatable-Implementations":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/Equatable-Implementations","role":"collectionGroup","kind":"article","title":"Equatable Implementations","url":"\/documentation\/deeplink\/deeplinkinterpolation\/equatable-implementations","type":"topic","abstract":[]},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/!=(_:_:)":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/!=(_:_:)","abstract":[],"title":"!=(_:_:)","type":"topic","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation\/!=(_:_:)","role":"symbol"},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/appendliteral(_:).json: -------------------------------------------------------------------------------- 1 | {"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Method called by Swift when the string interpolation contains a string literal.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"appendLiteral","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"literal"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"inlineContent":[{"type":"text","text":"Example: the deeplink "},{"code":"\"\/sell\/ticket\/\\(\\.id)\"","type":"codeVoice"},{"type":"text","text":" will trigger the following calls in order:"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["var interpolation = DeeplinkInterpolation(literalCapacity: 13, interpolationCount: 1)","interpolation.appendLiteral(\"\/sell\/ticket\/\")","interpolation.appendInterpolation(\\.id)"]}]}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/appendLiteral(_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/appendliteral(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation"]]},"metadata":{"symbolKind":"method","roleHeading":"Instance Method","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"appendLiteral"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":")","kind":"text"}],"modules":[{"name":"Deeplink"}],"externalID":"s:8Deeplink0A13InterpolationV13appendLiteralyySSF","title":"appendLiteral(_:)"},"references":{"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/appendLiteral(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"appendLiteral"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/appendLiteral(_:)","role":"symbol","kind":"symbol","title":"appendLiteral(_:)","url":"\/documentation\/deeplink\/deeplinkinterpolation\/appendliteral(_:)","type":"topic","abstract":[{"text":"Method called by Swift when the string interpolation contains a string literal.","type":"text"}]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/customstringconvertible-implementations.json: -------------------------------------------------------------------------------- 1 | {"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/customstringconvertible-implementations"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation"]]},"metadata":{"role":"collectionGroup","title":"CustomStringConvertible Implementations","modules":[{"name":"Deeplink"}]},"topicSections":[{"identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/description"],"title":"Instance Properties","generated":true}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/CustomStringConvertible-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"kind":"article","references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/description":{"abstract":[],"title":"description","url":"\/documentation\/deeplink\/deeplinkinterpolation\/description","role":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/description","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"description","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/description.json: -------------------------------------------------------------------------------- 1 | {"sections":[],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"CustomStringConvertible.description"},{"text":".","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"description","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/description"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/CustomStringConvertible-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/description"},"metadata":{"role":"symbol","externalID":"s:8Deeplink0A13InterpolationV11descriptionSSvp","extendedModule":"Deeplink","title":"description","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"description","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"modules":[{"name":"Deeplink"}]},"references":{"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/description":{"abstract":[],"title":"description","url":"\/documentation\/deeplink\/deeplinkinterpolation\/description","role":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/description","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"description","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"}]},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/CustomStringConvertible-Implementations":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/CustomStringConvertible-Implementations","role":"collectionGroup","title":"CustomStringConvertible Implementations","kind":"article","type":"topic","url":"\/documentation\/deeplink\/deeplinkinterpolation\/customstringconvertible-implementations","abstract":[]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/equatable-implementations.json: -------------------------------------------------------------------------------- 1 | {"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/!=(_:_:)"],"generated":true}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/Equatable-Implementations"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/equatable-implementations"]}],"metadata":{"role":"collectionGroup","modules":[{"name":"Deeplink"}],"title":"Equatable Implementations"},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/!=(_:_:)":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/!=(_:_:)","abstract":[],"title":"!=(_:_:)","type":"topic","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation\/!=(_:_:)","role":"symbol"},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkinterpolation/init(literalcapacity:interpolationcount:).json: -------------------------------------------------------------------------------- 1 | {"abstract":[{"type":"text","text":"Initializer used by Swift when creating a "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation"},{"type":"text","text":" from a string interpolation."},{"type":"text","text":" "},{"type":"text","text":"The arguments should be used for performance tuning, but we cannot use them because of how the components are stored in a list."}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/deeplink\/deeplinkinterpolation\/init(literalcapacity:interpolationcount:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/init(literalCapacity:interpolationCount:)","interfaceLanguage":"swift"},"sections":[],"metadata":{"symbolKind":"init","externalID":"s:8Deeplink0A13InterpolationV15literalCapacity18interpolationCountACyxGSi_Sitcfc","modules":[{"name":"Deeplink"}],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"literalCapacity"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"text":", ","kind":"text"},{"text":"interpolationCount","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"init(literalCapacity:interpolationCount:)","role":"symbol","roleHeading":"Initializer"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"literalCapacity"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"interpolationCount"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"},{"text":")","kind":"text"}]}]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation"]]},"references":{"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation/init(literalCapacity:interpolationCount:)":{"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"literalCapacity","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"},{"kind":"text","text":", "},{"text":"interpolationCount","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation\/init(literalCapacity:interpolationCount:)","role":"symbol","kind":"symbol","title":"init(literalCapacity:interpolationCount:)","url":"\/documentation\/deeplink\/deeplinkinterpolation\/init(literalcapacity:interpolationcount:)","type":"topic","abstract":[{"type":"text","text":"Initializer used by Swift when creating a "},{"isActive":true,"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","type":"reference"},{"type":"text","text":" from a string interpolation."},{"text":" ","type":"text"},{"text":"The arguments should be used for performance tuning, but we cannot use them because of how the components are stored in a list.","type":"text"}]},"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DeeplinkInterpolation":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinkInterpolation"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinkInterpolation","navigatorTitle":[{"text":"DeeplinkInterpolation","kind":"identifier"}],"role":"symbol","title":"DeeplinkInterpolation","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkinterpolation","type":"topic","abstract":[]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/deeplinkscenter/init().json: -------------------------------------------------------------------------------- 1 | {"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter\/init()"},"seeAlsoSections":[{"title":"Initialize a center","identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter\/init(_:)"],"generated":true}],"metadata":{"roleHeading":"Initializer","fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"externalID":"s:8Deeplink15DeeplinksCenterCACycfc","modules":[{"name":"Deeplink"}],"title":"init()","symbolKind":"init","role":"symbol"},"kind":"symbol","sections":[],"abstract":[{"text":"Public initializer that makes an empty center. Use the ","type":"text"},{"code":"register","type":"codeVoice"},{"text":" functions to add your deeplinks.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/deeplinkscenter\/init()"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DeeplinksCenter":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinksCenter"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter","navigatorTitle":[{"text":"DeeplinksCenter","kind":"identifier"}],"role":"symbol","title":"DeeplinksCenter","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkscenter","type":"topic","abstract":[{"type":"text","text":"Register deeplinks and parse URLs."}]},"doc://Deeplink/documentation/Deeplink/DeeplinksCenter/init(_:)":{"url":"\/documentation\/deeplink\/deeplinkscenter\/init(_:)","role":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter\/init(_:)","kind":"symbol","type":"topic","abstract":[{"type":"text","text":"Initializer that takes a DeeplinkBuilder closure."}],"fragments":[{"kind":"keyword","text":"convenience"},{"kind":"text","text":" "},{"text":"init","kind":"identifier"},{"text":"(() -> [","kind":"text"},{"text":"AnyDeeplink","preciseIdentifier":"s:8Deeplink03AnyA0V","kind":"typeIdentifier"},{"text":"])","kind":"text"}],"title":"init(_:)"},"doc://Deeplink/documentation/Deeplink/DeeplinksCenter/init()":{"url":"\/documentation\/deeplink\/deeplinkscenter\/init()","role":"symbol","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter\/init()","kind":"symbol","type":"topic","abstract":[{"type":"text","text":"Public initializer that makes an empty center. Use the "},{"type":"codeVoice","code":"register"},{"type":"text","text":" functions to add your deeplinks."}],"fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()"}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/defaultinitializable.json: -------------------------------------------------------------------------------- 1 | {"identifier":{"url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"metadata":{"role":"symbol","roleHeading":"Protocol","title":"DefaultInitializable","symbolKind":"protocol","navigatorTitle":[{"text":"DefaultInitializable","kind":"identifier"}],"externalID":"s:8Deeplink20DefaultInitializableP","modules":[{"name":"Deeplink"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"DefaultInitializable","kind":"identifier"}]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable\/init()"]}],"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"DefaultInitializable","kind":"identifier"}],"languages":["swift"]}]},{"content":[{"text":"Overview","type":"heading","level":2,"anchor":"overview"},{"inlineContent":[{"text":"This is used by the library to create an empty instance of the ","type":"text"},{"type":"codeVoice","code":"Value"},{"text":" type of a ","type":"text"},{"type":"reference","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","isActive":true},{"text":" template. In case of successful match between the template and deeplink ","type":"text"},{"type":"codeVoice","code":"URL"},{"text":", the ","type":"text"},{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter","isActive":true,"type":"reference"},{"text":" will assign values to the properties on the newly created instance.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/deeplink\/defaultinitializable"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"A protocol which only requirement is an empty initializer."}],"references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/Deeplink":{"url":"\/documentation\/deeplink\/deeplink","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/Deeplink","navigatorTitle":[{"text":"Deeplink","kind":"identifier"}],"abstract":[{"type":"text","text":"An "},{"code":"enum","type":"codeVoice"},{"text":" that represents a deeplink template.","type":"text"}],"title":"Deeplink","kind":"symbol","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Deeplink"}],"type":"topic"},"doc://Deeplink/documentation/Deeplink/DefaultInitializable/init()":{"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable\/init()","role":"symbol","abstract":[],"title":"init()","kind":"symbol","url":"\/documentation\/deeplink\/defaultinitializable\/init()","required":true},"doc://Deeplink/documentation/Deeplink/DefaultInitializable":{"type":"topic","navigatorTitle":[{"text":"DefaultInitializable","kind":"identifier"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable","role":"symbol","abstract":[{"text":"A protocol which only requirement is an empty initializer.","type":"text"}],"kind":"symbol","title":"DefaultInitializable","url":"\/documentation\/deeplink\/defaultinitializable","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"DefaultInitializable"}]},"doc://Deeplink/documentation/Deeplink/DeeplinksCenter":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DeeplinksCenter"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DeeplinksCenter","navigatorTitle":[{"text":"DeeplinksCenter","kind":"identifier"}],"role":"symbol","title":"DeeplinksCenter","kind":"symbol","url":"\/documentation\/deeplink\/deeplinkscenter","type":"topic","abstract":[{"type":"text","text":"Register deeplinks and parse URLs."}]}}} -------------------------------------------------------------------------------- /docs/data/documentation/deeplink/defaultinitializable/init().json: -------------------------------------------------------------------------------- 1 | {"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"]}]}],"metadata":{"externalID":"s:8Deeplink20DefaultInitializablePxycfc","modules":[{"name":"Deeplink"}],"roleHeading":"Initializer","symbolKind":"init","role":"symbol","title":"init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"required":true},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable\/init()"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Deeplink\/documentation\/Deeplink","doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/deeplink\/defaultinitializable\/init()"]}],"kind":"symbol","references":{"doc://Deeplink/documentation/Deeplink":{"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink","url":"\/documentation\/deeplink","abstract":[{"text":"A microlibrary to parse deeplinks and their arguments.","type":"text"}],"type":"topic","kind":"symbol","title":"Deeplink","role":"collection"},"doc://Deeplink/documentation/Deeplink/DefaultInitializable/init()":{"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable\/init()","role":"symbol","abstract":[],"title":"init()","kind":"symbol","url":"\/documentation\/deeplink\/defaultinitializable\/init()","required":true},"doc://Deeplink/documentation/Deeplink/DefaultInitializable":{"type":"topic","navigatorTitle":[{"text":"DefaultInitializable","kind":"identifier"}],"identifier":"doc:\/\/Deeplink\/documentation\/Deeplink\/DefaultInitializable","role":"symbol","abstract":[{"text":"A protocol which only requirement is an empty initializer.","type":"text"}],"kind":"symbol","title":"DefaultInitializable","url":"\/documentation\/deeplink\/defaultinitializable","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"DefaultInitializable"}]}}} -------------------------------------------------------------------------------- /docs/developer-og-twitter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/developer-og-twitter.jpg -------------------------------------------------------------------------------- /docs/developer-og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/developer-og.jpg -------------------------------------------------------------------------------- /docs/documentation/deeplink/anydeeplink/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/deeplink/!=(_:_:)/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/deeplink/catchall/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/deeplink/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/deeplink/parse(_:)/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/deeplinkbuilder/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/documentation/deeplink/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/favicon.ico -------------------------------------------------------------------------------- /docs/favicon.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /docs/images/ExampleParsing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleParsing.png -------------------------------------------------------------------------------- /docs/images/ExampleParsing@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleParsing@2x.png -------------------------------------------------------------------------------- /docs/images/ExampleParsing~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleParsing~dark.png -------------------------------------------------------------------------------- /docs/images/ExampleParsing~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleParsing~dark@2x.png -------------------------------------------------------------------------------- /docs/images/ExampleURL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleURL.png -------------------------------------------------------------------------------- /docs/images/ExampleURL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleURL@2x.png -------------------------------------------------------------------------------- /docs/images/ExampleURL~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleURL~dark.png -------------------------------------------------------------------------------- /docs/images/ExampleURL~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/ExampleURL~dark@2x.png -------------------------------------------------------------------------------- /docs/images/Visual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/Visual.png -------------------------------------------------------------------------------- /docs/images/Visual@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/images/Visual@2x.png -------------------------------------------------------------------------------- /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/TizianoCoroneo/Deeplink/00e36bd74043a692b5642f4b354d88204b18cbd5/docs/img/no-image@2x.df2a0a50.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /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-c.d1db3f17.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-c"],{"1fe5":function(e,n){function s(e){const n=e.regex,s=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),t="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",i="<[^<>]+>",r="("+t+"|"+n.optional(a)+"[a-zA-Z_]\\w*"+n.optional(i)+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},o="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+o+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},s,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:n.optional(a)+e.IDENT_RE,relevance:0},p=n.optional(a)+e.IDENT_RE+"\\s*\\(",m=["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],_=["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],f={keyword:m,type:_,literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[u,l,s,e.C_BLOCK_COMMENT_MODE,d,c],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:f,contains:b.concat([{begin:/\(/,end:/\)/,keywords:f,contains:b.concat(["self"]),relevance:0}]),relevance:0},h={begin:"("+r+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:t,keywords:f,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[s,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:["self",s,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,s,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C",aliases:["h"],keywords:f,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:u,strings:c,keywords:f}}}e.exports=s}}]); -------------------------------------------------------------------------------- /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":"Deeplink","bundleIdentifier":"Deeplink","schemaVersion":{"minor":1,"patch":0,"major":0}} -------------------------------------------------------------------------------- /docs/tutorials/deeplink/adding-a-deeplink/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/tutorials/deeplink/advanced-usage/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /docs/tutorials/table-of-contents/index.html: -------------------------------------------------------------------------------- 1 | Documentation
-------------------------------------------------------------------------------- /generate-docs: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | swift package \ 4 | --allow-writing-to-directory ./docs \ 5 | generate-documentation --target Deeplink \ 6 | --disable-indexing \ 7 | --transform-for-static-hosting \ 8 | --hosting-base-path Deeplink \ 9 | --output-path ./docs 10 | --------------------------------------------------------------------------------