-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
485 changed files
with
23,785 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,9 @@ out/ | |
build/ | ||
testaction/output/ | ||
|
||
# Logs | ||
*.log | ||
|
||
# Node.js | ||
node_modules/ | ||
kotlin-js-store/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# KeepLink | ||
Kotlin multiplatform deep-link management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Module deeplink | ||
|
||
Build a typesafe deep-link hierarchy with sealed classes | ||
|
||
# Package com.motorro.keeplink.deeplink | ||
|
||
Contains tools to build deep-link actions and some useful action parsers |
22 changes: 22 additions & 0 deletions
22
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action-parser/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[ActionParser](index.md) | ||
|
||
# ActionParser | ||
|
||
[common]\ | ||
fun interface [ActionParser](index.md)<out [A](index.md) : [Action](../-action/index.md)> | ||
|
||
Parses action from action components | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [parse](parse.md) | [common]<br>abstract fun [parse](parse.md)(components: [PshComponents](../../../../uri/uri/com.motorro.keeplink.uri.data/-psh-components/index.md), pathIndex: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [A](index.md)?<br>Tries to parse given path | | ||
|
||
## Inheritors | ||
|
||
| Name | | ||
|---| | ||
| [BranchActionParser](../-branch-action-parser/index.md) | | ||
| [DefaultActionParser](../-default-action-parser/index.md) | | ||
| [SegmentCheckParser](../-segment-check-parser/index.md) | |
17 changes: 17 additions & 0 deletions
17
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action-parser/parse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[ActionParser](index.md)/[parse](parse.md) | ||
|
||
# parse | ||
|
||
[common]\ | ||
abstract fun [parse](parse.md)(components: [PshComponents](../../../../uri/uri/com.motorro.keeplink.uri.data/-psh-components/index.md), pathIndex: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [A](index.md)? | ||
|
||
Tries to parse given path | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| components | Source action components | | ||
| pathIndex | Path index to start parsing at | |
6 changes: 6 additions & 0 deletions
6
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/-action.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md)/[Action](-action.md) | ||
|
||
# Action | ||
|
||
[common]\ | ||
fun [Action](-action.md)() |
12 changes: 12 additions & 0 deletions
12
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/get-hash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md)/[getHash](get-hash.md) | ||
|
||
# getHash | ||
|
||
[common]\ | ||
open override fun [getHash](get-hash.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | ||
|
||
Hash component - what to display. Represents extra action to do in activity. | ||
|
||
For example, you may instruct your document activity to scroll to specified anchor: | ||
|
||
`/open/settings#background_location` |
12 changes: 12 additions & 0 deletions
12
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/get-path.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md)/[getPath](get-path.md) | ||
|
||
# getPath | ||
|
||
[common]\ | ||
open override fun [getPath](get-path.md)(): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)> | ||
|
||
Path component - where to go. Represents a path to activity in an application: screen, action, etc. Parameters exactly identifying the activity may be represented as path. | ||
|
||
For example, the following link opens chat with ID 123: | ||
|
||
`/open/chat/123` |
12 changes: 12 additions & 0 deletions
12
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/get-search.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md)/[getSearch](get-search.md) | ||
|
||
# getSearch | ||
|
||
[common]\ | ||
open override fun [getSearch](get-search.md)(): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[Param](../../../../uri/uri/com.motorro.keeplink.uri.data/-param/index.md)> | ||
|
||
Search component - what to do. Represents parameters to activity specified by [getPath](get-path.md) which instruct activity what to do. | ||
|
||
For example, the following link opens search activity and instructs it to search with specific parameters: | ||
|
||
`/open/search?type=TRAIN&from=MOSCOW&to=PARIS&date=2021-01-28` |
37 changes: 37 additions & 0 deletions
37
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md) | ||
|
||
# Action | ||
|
||
[common]\ | ||
abstract class [Action](index.md) : [PshComponents](../../../../uri/uri/com.motorro.keeplink.uri.data/-psh-components/index.md) | ||
|
||
Deep link action marker class. | ||
|
||
Represents an action part of deep-link - what needs to be done by application. Extend with a sealed class | ||
|
||
For example: | ||
|
||
- | ||
To open some application page | ||
- | ||
To run data update | ||
|
||
## Constructors | ||
|
||
| | | | ||
|---|---| | ||
| [Action](-action.md) | [common]<br>fun [Action](-action.md)() | | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [getHash](get-hash.md) | [common]<br>open override fun [getHash](get-hash.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Hash component - what to display. Represents extra action to do in activity. | | ||
| [getPath](get-path.md) | [common]<br>open override fun [getPath](get-path.md)(): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)><br>Path component - where to go. Represents a path to activity in an application: screen, action, etc. Parameters exactly identifying the activity may be represented as path. | | ||
| [getSearch](get-search.md) | [common]<br>open override fun [getSearch](get-search.md)(): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[Param](../../../../uri/uri/com.motorro.keeplink.uri.data/-param/index.md)><br>Search component - what to do. Represents parameters to activity specified by [getPath](get-path.md) which instruct activity what to do. | | ||
|
||
## Properties | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [isValid](is-valid.md) | [common]<br>open val [isValid](is-valid.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true<br>True if action is valid to execute | |
8 changes: 8 additions & 0 deletions
8
doc/gfm/deeplink/deeplink/com.motorro.keeplink.deeplink/-action/is-valid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[Action](index.md)/[isValid](is-valid.md) | ||
|
||
# isValid | ||
|
||
[common]\ | ||
open val [isValid](is-valid.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = true | ||
|
||
True if action is valid to execute |
28 changes: 28 additions & 0 deletions
28
...nk/com.motorro.keeplink.deeplink/-branch-action-parser/-branch-action-parser.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[BranchActionParser](index.md)/[BranchActionParser](-branch-action-parser.md) | ||
|
||
# BranchActionParser | ||
|
||
[common]\ | ||
fun <[A](index.md) : [Action](../-action/index.md)> [BranchActionParser](-branch-action-parser.md)(vararg children: [ActionParser](../-action-parser/index.md)<[A](index.md)>) | ||
|
||
Constructor with no default action | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| children | Children to pass parsing. First non-null result is used as a return value from [parse](parse.md) | | ||
|
||
[common]\ | ||
fun <[A](index.md) : [Action](../-action/index.md)> [BranchActionParser](-branch-action-parser.md)(children: [Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)<[ActionParser](../-action-parser/index.md)<[A](index.md)>>, default: [ActionParser](../-action-parser/index.md)<[A](index.md)>) | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| children | Children to pass parsing. First non-null result is used as a return value from [parse](parse.md) | | ||
| default | Called when no child parser matches given components | |
30 changes: 30 additions & 0 deletions
30
.../deeplink/deeplink/com.motorro.keeplink.deeplink/-branch-action-parser/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[BranchActionParser](index.md) | ||
|
||
# BranchActionParser | ||
|
||
[common]\ | ||
open class [BranchActionParser](index.md)<[A](index.md) : [Action](../-action/index.md)>(children: [Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)<[ActionParser](../-action-parser/index.md)<[A](index.md)>>, default: [ActionParser](../-action-parser/index.md)<[A](index.md)>) : [ActionParser](../-action-parser/index.md)<[A](index.md)> | ||
|
||
Parser to parse path branch | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| children | Children to pass parsing. First non-null result is used as a return value from [parse](parse.md) | | ||
| default | Called when no child parser matches given components | | ||
|
||
## Constructors | ||
|
||
| | | | ||
|---|---| | ||
| [BranchActionParser](-branch-action-parser.md) | [common]<br>fun <[A](index.md) : [Action](../-action/index.md)> [BranchActionParser](-branch-action-parser.md)(vararg children: [ActionParser](../-action-parser/index.md)<[A](index.md)>)<br>Constructor with no default action | | ||
| [BranchActionParser](-branch-action-parser.md) | [common]<br>fun <[A](index.md) : [Action](../-action/index.md)> [BranchActionParser](-branch-action-parser.md)(children: [Iterable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-iterable/index.html)<[ActionParser](../-action-parser/index.md)<[A](index.md)>>, default: [ActionParser](../-action-parser/index.md)<[A](index.md)>) | | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [parse](parse.md) | [common]<br>open override fun [parse](parse.md)(components: [PshComponents](../../../../uri/uri/com.motorro.keeplink.uri.data/-psh-components/index.md), pathIndex: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [A](index.md)?<br>Handles parsing to registered children Parser increments [pathIndex](parse.md) for children as it counts current index as its own | |
17 changes: 17 additions & 0 deletions
17
.../deeplink/deeplink/com.motorro.keeplink.deeplink/-branch-action-parser/parse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[BranchActionParser](index.md)/[parse](parse.md) | ||
|
||
# parse | ||
|
||
[common]\ | ||
open override fun [parse](parse.md)(components: [PshComponents](../../../../uri/uri/com.motorro.keeplink.uri.data/-psh-components/index.md), pathIndex: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [A](index.md)? | ||
|
||
Handles parsing to registered children Parser increments [pathIndex](parse.md) for children as it counts current index as its own | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| components | Source action components | | ||
| pathIndex | Path index to start parsing at | |
15 changes: 15 additions & 0 deletions
15
...nk/com.motorro.keeplink.deeplink/-deep-link-serializer/-deep-link-serializer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[DeepLinkSerializer](index.md)/[DeepLinkSerializer](-deep-link-serializer.md) | ||
|
||
# DeepLinkSerializer | ||
|
||
[common]\ | ||
fun <[A](index.md) : [Action](../-action/index.md)> [DeepLinkSerializer](-deep-link-serializer.md)(builder: [LinkBuilder](../-link-builder/index.md)<[A](index.md)>, parser: [LinkParser](../-link-parser/index.md)<[A](index.md)>) | ||
|
||
## Parameters | ||
|
||
common | ||
|
||
| | | | ||
|---|---| | ||
| builder | Link builder | | ||
| parser | Link parser | |
8 changes: 8 additions & 0 deletions
8
...link/deeplink/com.motorro.keeplink.deeplink/-deep-link-serializer/descriptor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[DeepLinkSerializer](index.md)/[descriptor](descriptor.md) | ||
|
||
# descriptor | ||
|
||
[common]\ | ||
open override val [descriptor](descriptor.md): SerialDescriptor | ||
|
||
Descriptor |
8 changes: 8 additions & 0 deletions
8
...ink/deeplink/com.motorro.keeplink.deeplink/-deep-link-serializer/deserialize.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//[deeplink](../../../index.md)/[com.motorro.keeplink.deeplink](../index.md)/[DeepLinkSerializer](index.md)/[deserialize](deserialize.md) | ||
|
||
# deserialize | ||
|
||
[common]\ | ||
open override fun [deserialize](deserialize.md)(decoder: Decoder): [DeepLink](../-deep-link/index.md)<[A](index.md)> | ||
|
||
Deserializes from components and parses using internal parser |
Oops, something went wrong.