hybrid-navigation 2.7.10 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/reactnative/hybridnavigation/Garden.java +4 -0
  4. package/android/src/main/java/com/reactnative/hybridnavigation/HybridFragment.java +6 -0
  5. package/android/src/main/java/com/reactnative/hybridnavigation/NavigationModule.java +35 -28
  6. package/ios/HybridNavigation/Bridge/HBDGardenModule.m +2 -1
  7. package/ios/HybridNavigation/GlobalStyle.h +4 -0
  8. package/ios/HybridNavigation/GlobalStyle.m +13 -0
  9. package/ios/HybridNavigation/HybridNavigation.h +1 -1
  10. package/ios/HybridNavigation/Navigator/HBDStackNavigator.m +12 -1
  11. package/ios/HybridNavigation/Navigator/HBDTabNavigator.m +2 -1
  12. package/ios/HybridNavigation/View/HBDNavigationBar.h +2 -3
  13. package/ios/HybridNavigation/View/HBDNavigationBar.m +31 -35
  14. package/ios/HybridNavigation/ViewController/HBDModalViewController.m +7 -0
  15. package/ios/HybridNavigation/ViewController/HBDNavigationController.m +18 -26
  16. package/ios/HybridNavigation/ViewController/HBDViewController+Garden.h +21 -0
  17. package/ios/HybridNavigation/{HBDGarden.m → ViewController/HBDViewController+Garden.m} +19 -45
  18. package/ios/HybridNavigation/ViewController/HBDViewController.h +1 -5
  19. package/ios/HybridNavigation/ViewController/HBDViewController.m +17 -14
  20. package/ios/HybridNavigation/ViewController/UINavigationController+HBD.m +5 -8
  21. package/ios/HybridNavigation/ViewController/UIViewController+HBD.m +10 -7
  22. package/lib/typing.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/docs/deeplink.html +0 -376
  25. package/docs/deeplink.pdf +0 -0
  26. package/ios/HybridNavigation/HBDGarden.h +0 -36
@@ -1,376 +0,0 @@
1
- <!DOCTYPE html><html><head>
2
- <title>deeplink</title>
3
- <meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
-
6
- <link rel="stylesheet" href="file:////Users/listen/.vscode/extensions/shd101wyy.markdown-preview-enhanced-0.6.2/node_modules/@shd101wyy/mume/dependencies/katex/katex.min.css">
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
- <style>
17
- /**
18
- * prism.js Github theme based on GitHub's theme.
19
- * @author Sam Clarke
20
- */
21
- code[class*="language-"],
22
- pre[class*="language-"] {
23
- color: #333;
24
- background: none;
25
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
26
- text-align: left;
27
- white-space: pre;
28
- word-spacing: normal;
29
- word-break: normal;
30
- word-wrap: normal;
31
- line-height: 1.4;
32
-
33
- -moz-tab-size: 8;
34
- -o-tab-size: 8;
35
- tab-size: 8;
36
-
37
- -webkit-hyphens: none;
38
- -moz-hyphens: none;
39
- -ms-hyphens: none;
40
- hyphens: none;
41
- }
42
-
43
- /* Code blocks */
44
- pre[class*="language-"] {
45
- padding: .8em;
46
- overflow: auto;
47
- /* border: 1px solid #ddd; */
48
- border-radius: 3px;
49
- /* background: #fff; */
50
- background: #f5f5f5;
51
- }
52
-
53
- /* Inline code */
54
- :not(pre) > code[class*="language-"] {
55
- padding: .1em;
56
- border-radius: .3em;
57
- white-space: normal;
58
- background: #f5f5f5;
59
- }
60
-
61
- .token.comment,
62
- .token.blockquote {
63
- color: #969896;
64
- }
65
-
66
- .token.cdata {
67
- color: #183691;
68
- }
69
-
70
- .token.doctype,
71
- .token.punctuation,
72
- .token.variable,
73
- .token.macro.property {
74
- color: #333;
75
- }
76
-
77
- .token.operator,
78
- .token.important,
79
- .token.keyword,
80
- .token.rule,
81
- .token.builtin {
82
- color: #a71d5d;
83
- }
84
-
85
- .token.string,
86
- .token.url,
87
- .token.regex,
88
- .token.attr-value {
89
- color: #183691;
90
- }
91
-
92
- .token.property,
93
- .token.number,
94
- .token.boolean,
95
- .token.entity,
96
- .token.atrule,
97
- .token.constant,
98
- .token.symbol,
99
- .token.command,
100
- .token.code {
101
- color: #0086b3;
102
- }
103
-
104
- .token.tag,
105
- .token.selector,
106
- .token.prolog {
107
- color: #63a35c;
108
- }
109
-
110
- .token.function,
111
- .token.namespace,
112
- .token.pseudo-element,
113
- .token.class,
114
- .token.class-name,
115
- .token.pseudo-class,
116
- .token.id,
117
- .token.url-reference .token.variable,
118
- .token.attr-name {
119
- color: #795da3;
120
- }
121
-
122
- .token.entity {
123
- cursor: help;
124
- }
125
-
126
- .token.title,
127
- .token.title .token.punctuation {
128
- font-weight: bold;
129
- color: #1d3e81;
130
- }
131
-
132
- .token.list {
133
- color: #ed6a43;
134
- }
135
-
136
- .token.inserted {
137
- background-color: #eaffea;
138
- color: #55a532;
139
- }
140
-
141
- .token.deleted {
142
- background-color: #ffecec;
143
- color: #bd2c00;
144
- }
145
-
146
- .token.bold {
147
- font-weight: bold;
148
- }
149
-
150
- .token.italic {
151
- font-style: italic;
152
- }
153
-
154
-
155
- /* JSON */
156
- .language-json .token.property {
157
- color: #183691;
158
- }
159
-
160
- .language-markup .token.tag .token.punctuation {
161
- color: #333;
162
- }
163
-
164
- /* CSS */
165
- code.language-css,
166
- .language-css .token.function {
167
- color: #0086b3;
168
- }
169
-
170
- /* YAML */
171
- .language-yaml .token.atrule {
172
- color: #63a35c;
173
- }
174
-
175
- code.language-yaml {
176
- color: #183691;
177
- }
178
-
179
- /* Ruby */
180
- .language-ruby .token.function {
181
- color: #333;
182
- }
183
-
184
- /* Markdown */
185
- .language-markdown .token.url {
186
- color: #795da3;
187
- }
188
-
189
- /* Makefile */
190
- .language-makefile .token.symbol {
191
- color: #795da3;
192
- }
193
-
194
- .language-makefile .token.variable {
195
- color: #183691;
196
- }
197
-
198
- .language-makefile .token.builtin {
199
- color: #0086b3;
200
- }
201
-
202
- /* Bash */
203
- .language-bash .token.keyword {
204
- color: #0086b3;
205
- }
206
-
207
- /* highlight */
208
- pre[data-line] {
209
- position: relative;
210
- padding: 1em 0 1em 3em;
211
- }
212
- pre[data-line] .line-highlight-wrapper {
213
- position: absolute;
214
- top: 0;
215
- left: 0;
216
- background-color: transparent;
217
- display: block;
218
- width: 100%;
219
- }
220
-
221
- pre[data-line] .line-highlight {
222
- position: absolute;
223
- left: 0;
224
- right: 0;
225
- padding: inherit 0;
226
- margin-top: 1em;
227
- background: hsla(24, 20%, 50%,.08);
228
- background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
229
- pointer-events: none;
230
- line-height: inherit;
231
- white-space: pre;
232
- }
233
-
234
- pre[data-line] .line-highlight:before,
235
- pre[data-line] .line-highlight[data-end]:after {
236
- content: attr(data-start);
237
- position: absolute;
238
- top: .4em;
239
- left: .6em;
240
- min-width: 1em;
241
- padding: 0 .5em;
242
- background-color: hsla(24, 20%, 50%,.4);
243
- color: hsl(24, 20%, 95%);
244
- font: bold 65%/1.5 sans-serif;
245
- text-align: center;
246
- vertical-align: .3em;
247
- border-radius: 999px;
248
- text-shadow: none;
249
- box-shadow: 0 1px white;
250
- }
251
-
252
- pre[data-line] .line-highlight[data-end]:after {
253
- content: attr(data-end);
254
- top: auto;
255
- bottom: .4em;
256
- }html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% - 300px);padding:2em calc(50% - 457px - 150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
257
- /* Please visit the URL below for more information: */
258
- /* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
259
-
260
- </style>
261
- </head>
262
- <body for="html-export">
263
- <div class="mume markdown-preview ">
264
- <h1 class="mume-header" id="deeplink">DeepLink</h1>
265
-
266
- <p>0.5.0 &#x7248;&#x672C;&#x5F00;&#x59CB;&#x652F;&#x6301; DeepLink.</p>
267
- <h2 class="mume-header" id="%E6%B3%A8%E5%86%8C">&#x6CE8;&#x518C;</h2>
268
-
269
- <p><a name="router-config" href></a></p>
270
- <p>&#x9700;&#x8981;&#x652F;&#x6301; DeepLink &#x7684;&#x9875;&#x9762;&#xFF0C;&#x5728;&#x6CE8;&#x518C;&#x65F6;&#x9700;&#x8981;&#x4F20;&#x5165;&#x7B2C;&#x4E09;&#x4E2A;&#x53C2;&#x6570;</p>
271
- <pre data-role="codeBlock" data-info="javascript" class="language-javascript"><span class="token maybe-class-name">ReactRegistry</span><span class="token punctuation">.</span><span class="token method function property-access">registerComponent</span><span class="token punctuation">(</span><span class="token string">&apos;TopBarStyle&apos;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token maybe-class-name">TopBarStyle</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
272
- path<span class="token operator">:</span> <span class="token string">&apos;/topBarStyle/:who&apos;</span><span class="token punctuation">,</span>
273
- dependency<span class="token operator">:</span> <span class="token string">&apos;TopBarMisc&apos;</span><span class="token punctuation">,</span>
274
- <span class="token punctuation">}</span><span class="token punctuation">)</span>
275
- </pre><p>&#x8FD9;&#x4E2A;&#x53C2;&#x6570;&#x662F;&#x4E2A;&#x5BF9;&#x8C61;&#xFF0C;&#x4E00;&#x5171;&#x6709;&#x4E09;&#x4E2A;&#x53EF;&#x9009;&#x9879;</p>
276
- <p>path &#x8868;&#x793A;&#x8DEF;&#x5F84;&#xFF0C;&#x5176;&#x4E2D;&#x5192;&#x53F7;&#x5F00;&#x5934;&#x7684;&#x7247;&#x6BB5;&#x8868;&#x793A;&#x53C2;&#x6570;&#xFF0C;&#x8FD9;&#x4E9B;&#x53C2;&#x6570;&#x5C06;&#x4F1A;&#x901A;&#x8FC7; props &#x4F20;&#x9012;&#x7ED9;&#x76EE;&#x6807;&#x9875;&#x9762;&#x3002;</p>
277
- <p>dependency &#x8868;&#x793A;&#x524D;&#x7F6E;&#x9875;&#x9762;&#xFF0C;&#x8B6C;&#x5982;&#x4E00;&#x4E2A;&#x8BE6;&#x60C5;&#x9875;&#x53EF;&#x80FD;&#x4F1A;&#x4F9D;&#x8D56;&#x4E00;&#x4E2A;&#x5217;&#x8868;&#x9875;&#xFF0C;&#x5F53;&#x70B9;&#x51FB;&#x8FD4;&#x56DE;&#x6309;&#x94AE;&#x65F6;&#xFF0C;&#x4F1A;&#x56DE;&#x5230;&#x5217;&#x8868;&#x9875;&#x3002;&#x8FD9;&#x4E2A;&#x9009;&#x9879;&#x53EF;&#x4EE5;&#x786E;&#x5B9A;&#x4F9D;&#x8D56;&#x94FE;&#x3002;&#x770B; example &#x4E2D;&#x7684;&#x4F8B;&#x5B50;&#xFF1A;</p>
278
- <pre data-role="codeBlock" data-info="javascript" class="language-javascript"><span class="token maybe-class-name">ReactRegistry</span><span class="token punctuation">.</span><span class="token method function property-access">registerComponent</span><span class="token punctuation">(</span><span class="token string">&apos;Options&apos;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token maybe-class-name">Options</span><span class="token punctuation">)</span>
279
- <span class="token maybe-class-name">ReactRegistry</span><span class="token punctuation">.</span><span class="token method function property-access">registerComponent</span><span class="token punctuation">(</span><span class="token string">&apos;TopBarMisc&apos;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token maybe-class-name">TopBarMisc</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> dependency<span class="token operator">:</span> <span class="token string">&apos;Options&apos;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span>
280
- <span class="token maybe-class-name">ReactRegistry</span><span class="token punctuation">.</span><span class="token method function property-access">registerComponent</span><span class="token punctuation">(</span><span class="token string">&apos;TopBarStyle&apos;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token maybe-class-name">TopBarStyle</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>
281
- path<span class="token operator">:</span> <span class="token string">&apos;/topBarStyle/:who&apos;</span><span class="token punctuation">,</span>
282
- dependency<span class="token operator">:</span> <span class="token string">&apos;TopBarMisc&apos;</span><span class="token punctuation">,</span>
283
- <span class="token punctuation">}</span><span class="token punctuation">)</span>
284
- </pre><p>TopBarStyle &#x4F9D;&#x8D56; TopBarMisc, TopBarMisc &#x4F9D;&#x8D56; Options, &#x5F53;&#x6211;&#x4EEC;&#x901A;&#x8FC7; <code>hbd://topBarStyle/xxxx?greeting=yyyy</code> &#x8FD9;&#x6837;&#x7684; url &#x6253;&#x5F00; TopBarStyle &#x8FD9;&#x4E2A;&#x9875;&#x9762;&#x65F6;&#xFF0C;&#x4F1A;&#x68C0;&#x67E5; app &#x5F53;&#x524D;&#x7684;&#x8DEF;&#x7531;&#x56FE;&#xFF0C;&#x4EE5;&#x51B3;&#x5B9A;&#x662F;&#x5426;&#x5207;&#x6362;&#x5230; tab Options, &#x5728;&#x6253;&#x5F00; TopBarStyle &#x4E4B;&#x524D;&#x662F;&#x5426;&#x9700;&#x8981;&#x521B;&#x5EFA; TopBarMisc&#x3002;</p>
285
- <p>mode &#x8868;&#x793A;&#x8DF3;&#x8F6C;&#x6A21;&#x5F0F;&#xFF0C;present &#x8868;&#x793A;&#x4F7F;&#x7528; <code>navigator.present</code> &#x6253;&#x5F00;&#x76EE;&#x6807;&#x9875;&#x9762;&#xFF0C; <code>modal</code> &#x8868;&#x793A;&#x4F7F;&#x7528; <code>navigator.showModal</code> &#x6253;&#x5F00;&#x9875;&#x9762;&#xFF0C;&#x9ED8;&#x8BA4;&#x662F;&#x901A;&#x8FC7; push &#x7684;&#x65B9;&#x5F0F;&#x6253;&#x5F00;&#x3002;</p>
286
- <blockquote>
287
- <p>0.23.0 &#x5F00;&#x59CB;&#x652F;&#x6301; queryString&#xFF0C;queryString &#x4E0D;&#x80FD;&#x6CE8;&#x518C;&#x5728; path &#x4E2D;</p>
288
- </blockquote>
289
- <h2 class="mume-header" id="%E6%BF%80%E6%B4%BB">&#x6FC0;&#x6D3B;</h2>
290
-
291
- <p>&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5728;&#x4E00;&#x4E2A;&#x7A33;&#x5B9A;&#x7684;&#x9875;&#x9762;&#xFF08;&#x901A;&#x5E38;&#x662F;&#x4E3B;&#x9875;&#x9762;&#xFF09;&#x6FC0;&#x6D3B; DeepLink &#x529F;&#x80FD;&#x3002;</p>
292
- <p>&#x8B6C;&#x5982; example &#x9879;&#x76EE;&#xFF0C;&#x5728; Navigation.js &#x6FC0;&#x6D3B;&#x4E86;&#x8DEF;&#x7531;&#x529F;&#x80FD;</p>
293
- <pre data-role="codeBlock" data-info="javascript" class="language-javascript"><span class="token keyword module keyword-import">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">DeepLink</span> <span class="token punctuation">}</span></span> <span class="token keyword module keyword-from">from</span> <span class="token string">&apos;hybrid-navigation&apos;</span><span class="token punctuation">;</span>
294
-
295
- <span class="token function">componentDidMount</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
296
- <span class="token keyword keyword-const">const</span> prefix <span class="token operator">=</span> <span class="token string">&apos;hbd://&apos;</span><span class="token punctuation">;</span>
297
- <span class="token maybe-class-name">DeepLink</span><span class="token punctuation">.</span><span class="token method function property-access">activate</span><span class="token punctuation">(</span>prefix<span class="token punctuation">)</span><span class="token punctuation">;</span>
298
- <span class="token punctuation">}</span>
299
-
300
- <span class="token function">componentWillUnmount</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
301
- <span class="token maybe-class-name">DeepLink</span><span class="token punctuation">.</span><span class="token method function property-access">deactivate</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
302
- <span class="token punctuation">}</span>
303
- </pre><p>&#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x65B9;&#x5F0F;&#x6FC0;&#x6D3B;</p>
304
- <pre data-role="codeBlock" data-info="javascript" class="language-javascript"><span class="token comment">// &#x6FC0;&#x6D3B; DeepLink&#xFF0C;&#x5728; Navigator.setRoot &#x4E4B;&#x524D;</span>
305
- <span class="token maybe-class-name">Navigator</span><span class="token punctuation">.</span><span class="token method function property-access">setRootLayoutUpdateListener</span><span class="token punctuation">(</span>
306
- <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token punctuation">{</span>
307
- <span class="token maybe-class-name">DeepLink</span><span class="token punctuation">.</span><span class="token method function property-access">deactivate</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
308
- <span class="token punctuation">}</span><span class="token punctuation">,</span>
309
- <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=&gt;</span> <span class="token punctuation">{</span>
310
- <span class="token keyword keyword-const">const</span> prefix <span class="token operator">=</span> <span class="token string">&apos;hbd://&apos;</span>
311
- <span class="token maybe-class-name">DeepLink</span><span class="token punctuation">.</span><span class="token method function property-access">activate</span><span class="token punctuation">(</span>prefix<span class="token punctuation">)</span>
312
- <span class="token punctuation">}</span><span class="token punctuation">,</span>
313
- <span class="token punctuation">)</span>
314
-
315
- <span class="token comment">// &#x8BBE;&#x7F6E; UI &#x5C42;&#x7EA7;</span>
316
- <span class="token maybe-class-name">Navigator</span><span class="token punctuation">.</span><span class="token method function property-access">setRoot</span><span class="token punctuation">(</span>drawer<span class="token punctuation">,</span> <span class="token boolean">true</span><span class="token punctuation">)</span>
317
- </pre><h2 class="mume-header" id="%E6%8B%A6%E6%88%AA">&#x62E6;&#x622A;</h2>
318
-
319
- <p>&#x6709;&#x65F6;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x62E6;&#x622A;&#x9ED8;&#x8BA4;&#x7684;&#x8DF3;&#x8F6C;&#x884C;&#x4E3A;</p>
320
- <p>router &#x5BF9;&#x8C61;&#x4E3A;&#x6211;&#x4EEC;&#x63D0;&#x4F9B;&#x4E86;&#x6CE8;&#x518C;&#x548C;&#x79FB;&#x9664;&#x62E6;&#x622A;&#x5668;&#x7684;&#x4E00;&#x5BF9;&#x65B9;&#x6CD5;</p>
321
- <pre data-role="codeBlock" data-info="javascript" class="language-javascript"><span class="token keyword module keyword-import">import</span> <span class="token imports"><span class="token punctuation">{</span> router <span class="token punctuation">}</span></span> <span class="token keyword module keyword-from">from</span> <span class="token string">&apos;hybrid-navigation&apos;</span>
322
- router<span class="token punctuation">.</span><span class="token method function property-access">addInterceptor</span><span class="token punctuation">(</span>func<span class="token punctuation">)</span>
323
- router<span class="token punctuation">.</span><span class="token method function property-access">removeInterceptor</span><span class="token punctuation">(</span>func<span class="token punctuation">)</span>
324
- </pre><p>func &#x662F;&#x4E00;&#x4E2A;&#x63A5;&#x6536; path &#x4E3A;&#x53C2;&#x6570;&#xFF0C;&#x8FD4;&#x56DE; boolen &#x7684;&#x51FD;&#x6570;&#xFF0C;&#x8FD4;&#x56DE; true &#x8868;&#x793A;&#x62E6;&#x622A;&#x3002;</p>
325
- <p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <code>router.pathToRoute(path)</code> &#x6765;&#x83B7;&#x53D6;&#x8DEF;&#x7531;&#x4FE1;&#x606F;</p>
326
- <h2 class="mume-header" id="ios-%E9%85%8D%E7%BD%AE">iOS &#x914D;&#x7F6E;</h2>
327
-
328
- <p>Let&apos;s configure the native iOS app to open based on the mychat:// URI scheme.</p>
329
- <p>In SimpleApp/ios/SimpleApp/AppDelegate.m:</p>
330
- <pre data-role="codeBlock" data-info="objc" class="language-objectivec"><span class="token comment">// Add the header at the top of the file:</span>
331
- <span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">import</span> <span class="token expression"><span class="token operator">&lt;</span>React<span class="token operator">/</span>RCTLinkingManager<span class="token punctuation">.</span>h<span class="token operator">&gt;</span></span></span>
332
-
333
- <span class="token comment">// Add this above the `@end`:</span>
334
- <span class="token operator">-</span> <span class="token punctuation">(</span>BOOL<span class="token punctuation">)</span>application<span class="token punctuation">:</span><span class="token punctuation">(</span>UIApplication <span class="token operator">*</span><span class="token punctuation">)</span>application openURL<span class="token punctuation">:</span><span class="token punctuation">(</span>NSURL <span class="token operator">*</span><span class="token punctuation">)</span>url
335
- sourceApplication<span class="token punctuation">:</span><span class="token punctuation">(</span>NSString <span class="token operator">*</span><span class="token punctuation">)</span>sourceApplication annotation<span class="token punctuation">:</span><span class="token punctuation">(</span>id<span class="token punctuation">)</span>annotation
336
- <span class="token punctuation">{</span>
337
- <span class="token keyword keyword-return">return</span> <span class="token punctuation">[</span>RCTLinkingManager application<span class="token punctuation">:</span>application openURL<span class="token punctuation">:</span>url
338
- sourceApplication<span class="token punctuation">:</span>sourceApplication annotation<span class="token punctuation">:</span>annotation<span class="token punctuation">]</span><span class="token punctuation">;</span>
339
- <span class="token punctuation">}</span>
340
- </pre><p>In Xcode, open the project at SimpleApp/ios/SimpleApp.xcodeproj. Select the project in sidebar and navigate to the info tab. Scroll down to &quot;URL Types&quot; and add one. In the new URL type, set the identifier and the url scheme to your desired url scheme.</p>
341
- <p><img src="https://todoit.oss-cn-shanghai.aliyuncs.com/todoit/deeplink-2021-10-19-15-37-05.png" alt="deeplink-2021-10-19-15-37-05"></p>
342
- <h2 class="mume-header" id="android-%E9%85%8D%E7%BD%AE">Android &#x914D;&#x7F6E;</h2>
343
-
344
- <p>To configure the external linking in Android, you can create a new intent in the manifest.</p>
345
- <p>In SimpleApp/android/app/src/main/AndroidManifest.xml, add the new intent-filter inside the MainActivity entry with a VIEW type action:</p>
346
- <pre data-role="codeBlock" data-info="xml" class="language-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>intent-filter</span><span class="token punctuation">&gt;</span></span>
347
- <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>action</span> <span class="token attr-name"><span class="token namespace">android:</span>name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>android.intent.action.VIEW<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
348
- <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>category</span> <span class="token attr-name"><span class="token namespace">android:</span>name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>android.intent.category.DEFAULT<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
349
- <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>category</span> <span class="token attr-name"><span class="token namespace">android:</span>name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>android.intent.category.BROWSABLE<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
350
- <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>data</span> <span class="token attr-name"><span class="token namespace">android:</span>scheme</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>mychat<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
351
- <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>intent-filter</span><span class="token punctuation">&gt;</span></span>
352
- </pre><blockquote>
353
- <p>MainActivity &#x7684; launchMode &#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x4E3A; singleTask</p>
354
- </blockquote>
355
- <h2 class="mume-header" id="%E6%B5%8B%E8%AF%95">&#x6D4B;&#x8BD5;</h2>
356
-
357
- <p>&#x5177;&#x4F53;&#x53EF;&#x4EE5;&#x53C2;&#x8003; example &#x8FD9;&#x4E2A;&#x9879;&#x76EE;&#x4E2D;&#x76F8;&#x5173;&#x914D;&#x7F6E;</p>
358
- <p>&#x53EF;&#x4EE5;&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x4E24;&#x4E2A;&#x547D;&#x4EE4;&#x5206;&#x522B;&#x6D4B;&#x8BD5; iOS &#x548C; Android &#x7684;&#x6548;&#x679C;</p>
359
- <p>iOS:</p>
360
- <pre data-role="codeBlock" data-info class="language-"><code>xcrun simctl openurl booted &quot;hbd://topBarStyle/xxxx?greeting=yyyy&quot;
361
- </code></pre><p>Android:</p>
362
- <pre data-role="codeBlock" data-info class="language-"><code>adb shell am start -W -a android.intent.action.VIEW -d &quot;hbd://topBarStyle/xxxx?greeting=yyyy&quot;
363
- </code></pre>
364
- </div>
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
- </body></html>
package/docs/deeplink.pdf DELETED
Binary file
@@ -1,36 +0,0 @@
1
- //
2
- // HBDGarden.h
3
- // HybridNavigation
4
- //
5
- // Created by Listen on 2017/11/26.
6
- // Copyright © 2018年 Listen. All rights reserved.
7
- //
8
-
9
- #import <UIKit/UIKit.h>
10
- #import "HBDViewController.h"
11
- #import "GlobalStyle.h"
12
-
13
- @class HBDViewController;
14
-
15
- @interface HBDGarden : NSObject
16
-
17
- + (void)createGlobalStyleWithOptions:(NSDictionary *)options;
18
-
19
- + (GlobalStyle *)globalStyle;
20
-
21
- // ------
22
-
23
- - (instancetype)initWithViewController:(HBDViewController *)vc;
24
-
25
- - (void)setLeftBarButtonItem:(NSDictionary *)item;
26
-
27
- - (void)setRightBarButtonItem:(NSDictionary *)item;
28
-
29
- - (void)setLeftBarButtonItems:(NSArray *)items;
30
-
31
- - (void)setRightBarButtonItems:(NSArray *)items;
32
-
33
- - (void)setPassThroughTouches:(BOOL)passThrough;
34
-
35
-
36
- @end