Re-generate documentation

This commit is contained in:
Alban Diquet
2019-08-03 19:48:16 -07:00
parent b980fb1f32
commit c06934b24c
39 changed files with 618 additions and 242 deletions
@@ -394,8 +394,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -361,8 +361,8 @@ for this server, thereby returning <code>TSKTrustDecisionShouldAllowConnection</
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
+6 -5
View File
@@ -647,9 +647,10 @@ of the App&rsquo;s other components.</p>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span>
<span class="nf">initWithConfiguration</span><span class="p">:</span>
<span class="p">(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span><span class="o">&lt;</span><span class="n"><a href="../Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span><span class="p">,</span> <span class="n">id</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">trustKitConfig</span>
<span class="nf">sharedContainerIdentifier</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">sharedContainerIdentifier</span><span class="p">;</span></code></pre>
<span class="nf">initWithConfiguration</span><span class="p">:</span>
<span class="p">(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span><span class="o">&lt;</span><span class="n"><a href="../Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span><span class="p">,</span> <span class="n">id</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span>
<span class="n">trustKitConfig</span>
<span class="n">sharedContainerIdentifier</span><span class="o">:</span><span class="p">(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="n">sharedContainerIdentifier</span><span class="p">;</span></code></pre>
</div>
<div class="language">
@@ -752,8 +753,8 @@ logger will not print any messages at all.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -526,8 +526,8 @@ pin set, such as when the user disables App updates.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -292,8 +292,8 @@ Because this will happen in an authentication handler, it means that the server&
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -385,8 +385,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -378,8 +378,8 @@ FAQ at <a href="https://www.chromium.org/Home/chromium-security/security-faq">ht
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -271,8 +271,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
+2 -2
View File
@@ -298,8 +298,8 @@ pinning validation within the App&rsquo;s network authentication handlers.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
+32 -7
View File
@@ -227,13 +227,18 @@
<code>
<a name="/c:@kTSKPublicKeyAlgorithms"></a>
<a name="//apple_ref/objc/Constant/kTSKPublicKeyAlgorithms" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
<a class="token discouraged" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>DEPRECATED since 1.6.0: this configuration key is no longer needed.</p>
@@ -278,13 +283,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmRsa2048"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa2048" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>RSA 2048.</p>
@@ -310,13 +320,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmRsa4096"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa4096" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>RSA 4096.</p>
@@ -342,13 +357,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmEcDsaSecp256r1"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp256r1" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>ECDSA with secp256r1 curve.</p>
@@ -374,13 +394,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmEcDsaSecp384r1"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp384r1" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp384r1">kTSKAlgorithmEcDsaSecp384r1</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmEcDsaSecp384r1">kTSKAlgorithmEcDsaSecp384r1</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>ECDSA with secp384r1 curve.</p>
@@ -409,8 +434,8 @@ only one algorithm should be enabled.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -191,13 +191,18 @@
<code>
<a name="/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm"></a>
<a name="//apple_ref/objc/Type/TSKSupportedAlgorithm" class="dashAnchor"></a>
<a class="token" href="#/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
<a class="token discouraged" href="#/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKSupportedAlgorithm from your configuration.</p>
</div>
<div class="abstract">
<p>DEPRECATED since 1.6.0: this configuration key is no longer needed.</p>
@@ -228,8 +233,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -343,8 +343,8 @@ performed against a specific server.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
+7 -3
View File
@@ -63,6 +63,10 @@ a {
a:hover, a:focus {
outline: 0;
text-decoration: underline; }
a.discouraged {
text-decoration: line-through; }
a.discouraged:hover, a.discouraged:focus {
text-decoration: underline line-through; }
table {
background: #fff;
@@ -225,7 +229,7 @@ pre code {
.item a[name]:before {
content: "";
display: block; }
.item .token {
.item .token, .item .direct-link {
padding-left: 3px;
margin-left: 0px;
font-size: 1rem; }
@@ -287,9 +291,9 @@ pre code {
.language .aside-title {
color: #4183c4; }
.aside-warning {
.aside-warning, .aside-deprecated, .aside-unavailable {
border-left: 5px solid #ff6666; }
.aside-warning .aside-title {
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
color: #ff0000; }
.graybox {
@@ -394,8 +394,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -361,8 +361,8 @@ for this server, thereby returning <code>TSKTrustDecisionShouldAllowConnection</
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -647,9 +647,10 @@ of the App&rsquo;s other components.</p>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span>
<span class="nf">initWithConfiguration</span><span class="p">:</span>
<span class="p">(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span><span class="o">&lt;</span><span class="n"><a href="../Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span><span class="p">,</span> <span class="n">id</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">trustKitConfig</span>
<span class="nf">sharedContainerIdentifier</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">sharedContainerIdentifier</span><span class="p">;</span></code></pre>
<span class="nf">initWithConfiguration</span><span class="p">:</span>
<span class="p">(</span><span class="n">nonnull</span> <span class="n">NSDictionary</span><span class="o">&lt;</span><span class="n"><a href="../Global Configuration Keys.html#/c:TSKTrustKitConfig.h@T@TSKGlobalConfigurationKey">TSKGlobalConfigurationKey</a></span><span class="p">,</span> <span class="n">id</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span>
<span class="n">trustKitConfig</span>
<span class="n">sharedContainerIdentifier</span><span class="o">:</span><span class="p">(</span><span class="n">nullable</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="n">sharedContainerIdentifier</span><span class="p">;</span></code></pre>
</div>
<div class="language">
@@ -752,8 +753,8 @@ logger will not print any messages at all.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -526,8 +526,8 @@ pin set, such as when the user disables App updates.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -292,8 +292,8 @@ Because this will happen in an authentication handler, it means that the server&
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -385,8 +385,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -378,8 +378,8 @@ FAQ at <a href="https://www.chromium.org/Home/chromium-security/security-faq">ht
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -271,8 +271,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -298,8 +298,8 @@ pinning validation within the App&rsquo;s network authentication handlers.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -227,13 +227,18 @@
<code>
<a name="/c:@kTSKPublicKeyAlgorithms"></a>
<a name="//apple_ref/objc/Constant/kTSKPublicKeyAlgorithms" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
<a class="token discouraged" href="#/c:@kTSKPublicKeyAlgorithms">kTSKPublicKeyAlgorithms</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>DEPRECATED since 1.6.0: this configuration key is no longer needed.</p>
@@ -278,13 +283,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmRsa2048"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa2048" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmRsa2048">kTSKAlgorithmRsa2048</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>RSA 2048.</p>
@@ -310,13 +320,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmRsa4096"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmRsa4096" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmRsa4096">kTSKAlgorithmRsa4096</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>RSA 4096.</p>
@@ -342,13 +357,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmEcDsaSecp256r1"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp256r1" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmEcDsaSecp256r1">kTSKAlgorithmEcDsaSecp256r1</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>ECDSA with secp256r1 curve.</p>
@@ -374,13 +394,18 @@ only one algorithm should be enabled.</p>
<code>
<a name="/c:@kTSKAlgorithmEcDsaSecp384r1"></a>
<a name="//apple_ref/objc/Constant/kTSKAlgorithmEcDsaSecp384r1" class="dashAnchor"></a>
<a class="token" href="#/c:@kTSKAlgorithmEcDsaSecp384r1">kTSKAlgorithmEcDsaSecp384r1</a>
<a class="token discouraged" href="#/c:@kTSKAlgorithmEcDsaSecp384r1">kTSKAlgorithmEcDsaSecp384r1</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKPublicKeyAlgorithms from your configuration.</p>
</div>
<div class="abstract">
<p>ECDSA with secp384r1 curve.</p>
@@ -409,8 +434,8 @@ only one algorithm should be enabled.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -191,13 +191,18 @@
<code>
<a name="/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm"></a>
<a name="//apple_ref/objc/Type/TSKSupportedAlgorithm" class="dashAnchor"></a>
<a class="token" href="#/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
<a class="token discouraged" href="#/c:TSKTrustKitConfig.h@T@TSKSupportedAlgorithm">TSKSupportedAlgorithm</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="aside aside-deprecated">
<p class="aside-title">Deprecated</p>
<p>Starting with TrustKit 1.6.0, key algorithms no longer need to be specified; remove TSKSupportedAlgorithm from your configuration.</p>
</div>
<div class="abstract">
<p>DEPRECATED since 1.6.0: this configuration key is no longer needed.</p>
@@ -228,8 +233,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -343,8 +343,8 @@ performed against a specific server.</p>
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -63,6 +63,10 @@ a {
a:hover, a:focus {
outline: 0;
text-decoration: underline; }
a.discouraged {
text-decoration: line-through; }
a.discouraged:hover, a.discouraged:focus {
text-decoration: underline line-through; }
table {
background: #fff;
@@ -225,7 +229,7 @@ pre code {
.item a[name]:before {
content: "";
display: block; }
.item .token {
.item .token, .item .direct-link {
padding-left: 3px;
margin-left: 0px;
font-size: 1rem; }
@@ -287,9 +291,9 @@ pre code {
.language .aside-title {
color: #4183c4; }
.aside-warning {
.aside-warning, .aside-deprecated, .aside-unavailable {
border-left: 5px solid #ff6666; }
.aside-warning .aside-title {
.aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
color: #ff0000; }
.graybox {
@@ -189,8 +189,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
@@ -8,26 +8,41 @@ if (navigator.userAgent.match(/xcode/i)) {
window.jazzy.docset = true
}
// On doc load, toggle the URL hash discussion if present
$(document).ready(function() {
if (!window.jazzy.docset) {
var linkToHash = $('a[href="' + window.location.hash +'"]');
linkToHash.trigger("click");
}
});
function toggleItem($link, $content) {
var animationDuration = 300;
$link.toggleClass('token-open');
$content.slideToggle(animationDuration);
}
// On token click, toggle its discussion and animate token.marginLeft
$(".token").click(function(event) {
function itemLinkToContent($link) {
return $link.parent().parent().next();
}
// On doc load + hash-change, open any targetted item
function openCurrentItemIfClosed() {
if (window.jazzy.docset) {
return;
}
var link = $(this);
var animationDuration = 300;
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
var $link = $(`.token[href="${location.hash}"]`);
$content = itemLinkToContent($link);
if ($content.is(':hidden')) {
toggleItem($link, $content);
}
}
$(openCurrentItemIfClosed);
$(window).on('hashchange', openCurrentItemIfClosed);
// On item link ('token') click, toggle its discussion
$('.token').on('click', function(event) {
if (window.jazzy.docset) {
return;
}
var $link = $(this);
toggleItem($link, itemLinkToContent($link));
// Keeps the document from jumping to the hash.
var href = $(this).attr('href');
var href = $link.attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
@@ -36,8 +51,9 @@ $(".token").click(function(event) {
event.preventDefault();
});
// Dumb down quotes within code blocks that delimit strings instead of quotations
// https://github.com/realm/jazzy/issues/714
$("code q").replaceWith(function () {
return ["\"", $(this).contents(), "\""];
// Clicks on links to the current, closed, item need to open the item
$("a:not('.token')").on('click', function() {
if (location == this.href) {
openCurrentItemIfClosed();
}
});
@@ -1,9 +1,4 @@
$(function(){
var searchIndex = lunr(function() {
this.ref('url');
this.field('name');
});
var $typeahead = $('[data-typeahead]');
var $form = $typeahead.parents('form');
var searchURL = $form.attr('action');
@@ -26,21 +21,34 @@ $(function(){
$form.addClass('loading');
$.getJSON(searchURL).then(function(searchData) {
$.each(searchData, function (url, doc) {
searchIndex.add({url: url, name: doc.name});
const searchIndex = lunr(function() {
this.ref('url');
this.field('name');
this.field('abstract');
for (const [url, doc] of Object.entries(searchData)) {
this.add({url: url, name: doc.name, abstract: doc.abstract});
}
});
$typeahead.typeahead(
{
highlight: true,
minLength: 3
minLength: 3,
autoselect: true
},
{
limit: 10,
display: displayTemplate,
templates: { suggestion: suggestionTemplate },
source: function(query, sync) {
var results = searchIndex.search(query).map(function(result) {
const lcSearch = query.toLowerCase();
const results = searchIndex.query(function(q) {
q.term(lcSearch, { boost: 100 });
q.term(lcSearch, {
boost: 10,
wildcard: lunr.Query.wildcard.TRAILING
});
}).map(function(result) {
var doc = searchData[result.ref];
doc.url = result.ref;
return doc;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,18 +1,18 @@
/*!
* typeahead.js 0.11.1
* typeahead.js 1.2.0
* https://github.com/twitter/typeahead.js
* Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
* Copyright 2013-2017 Twitter, Inc. and other contributors; Licensed MIT
*/
(function(root, factory) {
if (typeof define === "function" && define.amd) {
define("typeahead.js", [ "jquery" ], function(a0) {
define([ "jquery" ], function(a0) {
return factory(a0);
});
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"));
} else {
factory(jQuery);
factory(root["jQuery"]);
}
})(this, function($) {
var _ = function() {
@@ -148,6 +148,13 @@
stringify: function(val) {
return _.isString(val) ? val : JSON.stringify(val);
},
guid: function() {
function _p8(s) {
var p = (Math.random().toString(16) + "000000000").substr(2, 8);
return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
}
return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
},
noop: function() {}
};
}();
@@ -189,7 +196,7 @@
function buildHtml(c) {
return {
wrapper: '<span class="' + c.wrapper + '"></span>',
menu: '<div class="' + c.menu + '"></div>'
menu: '<div role="listbox" class="' + c.menu + '"></div>'
};
}
function buildSelectors(classes) {
@@ -264,10 +271,8 @@
}
_.mixin(EventBus.prototype, {
_trigger: function(type, args) {
var $e;
$e = $.Event(namespace + type);
(args = args || []).unshift($e);
this.$el.trigger.apply(this.$el, args);
var $e = $.Event(namespace + type);
this.$el.trigger.call(this.$el, $e, args || []);
return $e;
},
before: function(type) {
@@ -384,7 +389,36 @@
tagName: "strong",
className: null,
wordsOnly: false,
caseSensitive: false
caseSensitive: false,
diacriticInsensitive: false
};
var accented = {
A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
};
return function hightlight(o) {
var regex;
@@ -393,7 +427,7 @@
return;
}
o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
traverse(o.node, hightlightTextNode);
function hightlightTextNode(textNode) {
var match, patternNode, wrapperNode;
@@ -419,10 +453,17 @@
}
}
};
function getRegex(patterns, caseSensitive, wordsOnly) {
function accent_replacer(chr) {
return accented[chr.toUpperCase()] || chr;
}
function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
var escapedPatterns = [], regexStr;
for (var i = 0, len = patterns.length; i < len; i++) {
escapedPatterns.push(_.escapeRegExChars(patterns[i]));
var escapedWord = _.escapeRegExChars(patterns[i]);
if (diacriticInsensitive) {
escapedWord = escapedWord.replace(/\S/g, accent_replacer);
}
escapedPatterns.push(escapedWord);
}
regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
@@ -448,6 +489,14 @@
www.mixin(this);
this.$hint = $(o.hint);
this.$input = $(o.input);
this.$input.attr({
"aria-activedescendant": "",
"aria-owns": this.$input.attr("id") + "_listbox",
role: "combobox",
"aria-readonly": "true",
"aria-autocomplete": "list"
});
$(www.menu).attr("id", this.$input.attr("id") + "_listbox");
this.query = this.$input.val();
this.queryWhenFocused = this.hasFocus() ? this.query : null;
this.$overflowHelper = buildOverflowHelper(this.$input);
@@ -455,6 +504,7 @@
if (this.$hint.length === 0) {
this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
}
this.onSync("cursorchange", this._updateDescendent);
}
Input.normalizeQuery = function(str) {
return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
@@ -524,6 +574,9 @@
this.trigger("whitespaceChanged", this.query);
}
},
_updateDescendent: function updateDescendent(event, id) {
this.$input.attr("aria-activedescendant", id);
},
bind: function() {
var that = this, onBlur, onFocus, onKeydown, onInput;
onBlur = _.bind(this._onBlur, this);
@@ -647,6 +700,7 @@
"use strict";
var keys, nameGenerator;
keys = {
dataset: "tt-selectable-dataset",
val: "tt-selectable-display",
obj: "tt-selectable-object"
};
@@ -666,19 +720,20 @@
}
www.mixin(this);
this.highlight = !!o.highlight;
this.name = o.name || nameGenerator();
this.name = _.toStr(o.name || nameGenerator());
this.limit = o.limit || 5;
this.displayFn = getDisplayFn(o.display || o.displayKey);
this.templates = getTemplates(o.templates, this.displayFn);
this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
this._resetLastSuggestion();
this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
}
Dataset.extractData = function extractData(el) {
var $el = $(el);
if ($el.data(keys.obj)) {
return {
dataset: $el.data(keys.dataset) || "",
val: $el.data(keys.val) || "",
obj: $el.data(keys.obj) || null
};
@@ -697,7 +752,7 @@
} else {
this._empty();
}
this.trigger("rendered", this.name, suggestions, false);
this.trigger("rendered", suggestions, false, this.name);
},
_append: function append(query, suggestions) {
suggestions = suggestions || [];
@@ -708,7 +763,7 @@
} else if (!this.$lastSuggestion.length && this.templates.notFound) {
this._renderNotFound(query);
}
this.trigger("rendered", this.name, suggestions, true);
this.trigger("rendered", suggestions, true, this.name);
},
_renderSuggestions: function renderSuggestions(query, suggestions) {
var $fragment;
@@ -749,7 +804,7 @@
_.each(suggestions, function getSuggestionNode(suggestion) {
var $el, context;
context = that._injectQuery(query, suggestion);
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
$el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
fragment.appendChild($el[0]);
});
this.highlight && highlight({
@@ -787,7 +842,7 @@
this.cancel = function cancel() {
canceled = true;
that.cancel = $.noop;
that.async && that.trigger("asyncCanceled", query);
that.async && that.trigger("asyncCanceled", query, that.name);
};
this.source(query, sync, async);
!syncCalled && sync([]);
@@ -800,16 +855,17 @@
rendered = suggestions.length;
that._overwrite(query, suggestions);
if (rendered < that.limit && that.async) {
that.trigger("asyncRequested", query);
that.trigger("asyncRequested", query, that.name);
}
}
function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
rendered += suggestions.length;
that._append(query, suggestions.slice(0, that.limit - rendered));
that.async && that.trigger("asyncReceived", query);
var idx = Math.abs(rendered - that.limit);
rendered += idx;
that._append(query, suggestions.slice(0, idx));
that.async && that.trigger("asyncReceived", query, that.name);
}
}
},
@@ -843,7 +899,7 @@
suggestion: templates.suggestion || suggestionTemplate
};
function suggestionTemplate(context) {
return $("<div>").text(displayFn(context));
return $('<div role="option">').attr("id", _.guid()).text(displayFn(context));
}
}
function isValidName(str) {
@@ -884,10 +940,11 @@
this.trigger.apply(this, arguments);
},
_allDatasetsEmpty: function allDatasetsEmpty() {
return _.every(this.datasets, isDatasetEmpty);
function isDatasetEmpty(dataset) {
return dataset.isEmpty();
}
return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
var isEmpty = dataset.isEmpty();
this.$node.attr("aria-expanded", !isEmpty);
return isEmpty;
}, this));
},
_getSelectables: function getSelectables() {
return this.$node.find(this.selectors.selectable);
@@ -912,6 +969,12 @@
var that = this, onSelectableClick;
onSelectableClick = _.bind(this._onSelectableClick, this);
this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
this.$node.on("mouseover", this.selectors.selectable, function() {
that.setCursor($(this));
});
this.$node.on("mouseleave", function() {
that._removeCursor();
});
_.each(this.datasets, function(dataset) {
dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
});
@@ -921,9 +984,11 @@
return this.$node.hasClass(this.classes.open);
},
open: function open() {
this.$node.scrollTop(0);
this.$node.addClass(this.classes.open);
},
close: function close() {
this.$node.attr("aria-expanded", false);
this.$node.removeClass(this.classes.open);
this._removeCursor();
},
@@ -988,6 +1053,55 @@
});
return Menu;
}();
var Status = function() {
"use strict";
function Status(options) {
this.$el = $("<span></span>", {
role: "status",
"aria-live": "polite"
}).css({
position: "absolute",
padding: "0",
border: "0",
height: "1px",
width: "1px",
"margin-bottom": "-1px",
"margin-right": "-1px",
overflow: "hidden",
clip: "rect(0 0 0 0)",
"white-space": "nowrap"
});
options.$input.after(this.$el);
_.each(options.menu.datasets, _.bind(function(dataset) {
if (dataset.onSync) {
dataset.onSync("rendered", _.bind(this.update, this));
dataset.onSync("cleared", _.bind(this.cleared, this));
}
}, this));
}
_.mixin(Status.prototype, {
update: function update(event, suggestions) {
var length = suggestions.length;
var words;
if (length === 1) {
words = {
result: "result",
is: "is"
};
} else {
words = {
result: "results",
is: "are"
};
}
this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
},
cleared: function() {
this.$el.text("");
}
});
return Status;
}();
var DefaultMenu = function() {
"use strict";
var s = Menu.prototype;
@@ -1052,6 +1166,7 @@
this.input = o.input;
this.menu = o.menu;
this.enabled = true;
this.autoselect = !!o.autoselect;
this.active = false;
this.input.hasFocus() && this.activate();
this.dir = this.input.getLangDir();
@@ -1098,8 +1213,12 @@
_onDatasetCleared: function onDatasetCleared() {
this._updateHint();
},
_onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
this._updateHint();
if (this.autoselect) {
var cursorClass = this.selectors.cursor.substr(1);
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
}
this.eventBus.trigger("render", suggestions, async, dataset);
},
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
@@ -1122,7 +1241,15 @@
_onEnterKeyed: function onEnterKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
this.select($selectable) && $e.preventDefault();
if (this.select($selectable)) {
$e.preventDefault();
$e.stopPropagation();
}
} else if (this.autoselect) {
if (this.select(this.menu.getTopSelectable())) {
$e.preventDefault();
$e.stopPropagation();
}
}
},
_onTabKeyed: function onTabKeyed(type, $e) {
@@ -1144,12 +1271,12 @@
},
_onLeftKeyed: function onLeftKeyed() {
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getTopSelectable());
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onRightKeyed: function onRightKeyed() {
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getTopSelectable());
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onQueryChanged: function onQueryChanged(e, query) {
@@ -1249,9 +1376,9 @@
},
select: function select($selectable) {
var data = this.menu.getSelectableData($selectable);
if (data && !this.eventBus.before("select", data.obj)) {
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
this.input.setQuery(data.val, true);
this.eventBus.trigger("select", data.obj);
this.eventBus.trigger("select", data.obj, data.dataset);
this.close();
return true;
}
@@ -1262,21 +1389,24 @@
query = this.input.getQuery();
data = this.menu.getSelectableData($selectable);
isValid = data && query !== data.val;
if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
this.input.setQuery(data.val);
this.eventBus.trigger("autocomplete", data.obj);
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
return true;
}
return false;
},
moveCursor: function moveCursor(delta) {
var query, $candidate, data, payload, cancelMove;
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
query = this.input.getQuery();
$candidate = this.menu.selectableRelativeToCursor(delta);
data = this.menu.getSelectableData($candidate);
payload = data ? data.obj : null;
suggestion = data ? data.obj : null;
datasetName = data ? data.dataset : null;
id = $candidate ? $candidate.attr("id") : null;
this.input.trigger("cursorchange", id);
cancelMove = this._minLengthMet() && this.menu.update(query);
if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
this.menu.setCursor($candidate);
if (data) {
this.input.setInputValue(data.val);
@@ -1284,7 +1414,7 @@
this.input.resetInputValue();
this._updateHint();
}
this.eventBus.trigger("cursorchange", payload);
this.eventBus.trigger("cursorchange", suggestion, datasetName);
return true;
}
return false;
@@ -1322,7 +1452,7 @@
www = WWW(o.classNames);
return this.each(attach);
function attach() {
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
_.each(datasets, function(d) {
d.highlight = !!o.highlight;
});
@@ -1353,11 +1483,16 @@
node: $menu,
datasets: datasets
}, www);
status = new Status({
$input: $input,
menu: menu
});
typeahead = new Typeahead({
input: input,
menu: menu,
eventBus: eventBus,
minLength: o.minLength
minLength: o.minLength,
autoselect: o.autoselect
}, www);
$input.data(keys.www, www);
$input.data(keys.typeahead, typeahead);
@@ -1450,7 +1585,7 @@
return query;
} else {
ttEach(this, function(t) {
t.setVal(newVal);
t.setVal(_.toStr(newVal));
});
return this;
}
@@ -1481,8 +1616,10 @@
});
}
function buildHintFromInput($input, www) {
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder required").attr({
autocomplete: "off",
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
readonly: true,
required: false
}).removeAttr("id name placeholder").removeClass("required").attr({
spellcheck: "false",
tabindex: -1
});
@@ -1495,7 +1632,6 @@
style: $input.attr("style")
});
$input.addClass(www.classes.input).attr({
autocomplete: "off",
spellcheck: false
});
try {
+2 -2
View File
@@ -189,8 +189,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 2018 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2018-09-25)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2019 <a class="link" href="https://datatheorem.github.io" target="_blank" rel="external">Data Theorem</a>. All rights reserved. (Last updated: 2019-08-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.10.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
</div>
+34 -18
View File
@@ -8,26 +8,41 @@ if (navigator.userAgent.match(/xcode/i)) {
window.jazzy.docset = true
}
// On doc load, toggle the URL hash discussion if present
$(document).ready(function() {
if (!window.jazzy.docset) {
var linkToHash = $('a[href="' + window.location.hash +'"]');
linkToHash.trigger("click");
}
});
function toggleItem($link, $content) {
var animationDuration = 300;
$link.toggleClass('token-open');
$content.slideToggle(animationDuration);
}
// On token click, toggle its discussion and animate token.marginLeft
$(".token").click(function(event) {
function itemLinkToContent($link) {
return $link.parent().parent().next();
}
// On doc load + hash-change, open any targetted item
function openCurrentItemIfClosed() {
if (window.jazzy.docset) {
return;
}
var link = $(this);
var animationDuration = 300;
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
var $link = $(`.token[href="${location.hash}"]`);
$content = itemLinkToContent($link);
if ($content.is(':hidden')) {
toggleItem($link, $content);
}
}
$(openCurrentItemIfClosed);
$(window).on('hashchange', openCurrentItemIfClosed);
// On item link ('token') click, toggle its discussion
$('.token').on('click', function(event) {
if (window.jazzy.docset) {
return;
}
var $link = $(this);
toggleItem($link, itemLinkToContent($link));
// Keeps the document from jumping to the hash.
var href = $(this).attr('href');
var href = $link.attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
@@ -36,8 +51,9 @@ $(".token").click(function(event) {
event.preventDefault();
});
// Dumb down quotes within code blocks that delimit strings instead of quotations
// https://github.com/realm/jazzy/issues/714
$("code q").replaceWith(function () {
return ["\"", $(this).contents(), "\""];
// Clicks on links to the current, closed, item need to open the item
$("a:not('.token')").on('click', function() {
if (location == this.href) {
openCurrentItemIfClosed();
}
});
+17 -9
View File
@@ -1,9 +1,4 @@
$(function(){
var searchIndex = lunr(function() {
this.ref('url');
this.field('name');
});
var $typeahead = $('[data-typeahead]');
var $form = $typeahead.parents('form');
var searchURL = $form.attr('action');
@@ -26,21 +21,34 @@ $(function(){
$form.addClass('loading');
$.getJSON(searchURL).then(function(searchData) {
$.each(searchData, function (url, doc) {
searchIndex.add({url: url, name: doc.name});
const searchIndex = lunr(function() {
this.ref('url');
this.field('name');
this.field('abstract');
for (const [url, doc] of Object.entries(searchData)) {
this.add({url: url, name: doc.name, abstract: doc.abstract});
}
});
$typeahead.typeahead(
{
highlight: true,
minLength: 3
minLength: 3,
autoselect: true
},
{
limit: 10,
display: displayTemplate,
templates: { suggestion: suggestionTemplate },
source: function(query, sync) {
var results = searchIndex.search(query).map(function(result) {
const lcSearch = query.toLowerCase();
const results = searchIndex.query(function(q) {
q.term(lcSearch, { boost: 100 });
q.term(lcSearch, {
boost: 10,
wildcard: lunr.Query.wildcard.TRAILING
});
}).map(function(result) {
var doc = searchData[result.ref];
doc.url = result.ref;
return doc;
File diff suppressed because one or more lines are too long
Vendored Executable → Regular
+1 -6
View File
File diff suppressed because one or more lines are too long
+182 -46
View File
@@ -1,18 +1,18 @@
/*!
* typeahead.js 0.11.1
* typeahead.js 1.2.0
* https://github.com/twitter/typeahead.js
* Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
* Copyright 2013-2017 Twitter, Inc. and other contributors; Licensed MIT
*/
(function(root, factory) {
if (typeof define === "function" && define.amd) {
define("typeahead.js", [ "jquery" ], function(a0) {
define([ "jquery" ], function(a0) {
return factory(a0);
});
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"));
} else {
factory(jQuery);
factory(root["jQuery"]);
}
})(this, function($) {
var _ = function() {
@@ -148,6 +148,13 @@
stringify: function(val) {
return _.isString(val) ? val : JSON.stringify(val);
},
guid: function() {
function _p8(s) {
var p = (Math.random().toString(16) + "000000000").substr(2, 8);
return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
}
return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
},
noop: function() {}
};
}();
@@ -189,7 +196,7 @@
function buildHtml(c) {
return {
wrapper: '<span class="' + c.wrapper + '"></span>',
menu: '<div class="' + c.menu + '"></div>'
menu: '<div role="listbox" class="' + c.menu + '"></div>'
};
}
function buildSelectors(classes) {
@@ -264,10 +271,8 @@
}
_.mixin(EventBus.prototype, {
_trigger: function(type, args) {
var $e;
$e = $.Event(namespace + type);
(args = args || []).unshift($e);
this.$el.trigger.apply(this.$el, args);
var $e = $.Event(namespace + type);
this.$el.trigger.call(this.$el, $e, args || []);
return $e;
},
before: function(type) {
@@ -384,7 +389,36 @@
tagName: "strong",
className: null,
wordsOnly: false,
caseSensitive: false
caseSensitive: false,
diacriticInsensitive: false
};
var accented = {
A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
};
return function hightlight(o) {
var regex;
@@ -393,7 +427,7 @@
return;
}
o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
traverse(o.node, hightlightTextNode);
function hightlightTextNode(textNode) {
var match, patternNode, wrapperNode;
@@ -419,10 +453,17 @@
}
}
};
function getRegex(patterns, caseSensitive, wordsOnly) {
function accent_replacer(chr) {
return accented[chr.toUpperCase()] || chr;
}
function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
var escapedPatterns = [], regexStr;
for (var i = 0, len = patterns.length; i < len; i++) {
escapedPatterns.push(_.escapeRegExChars(patterns[i]));
var escapedWord = _.escapeRegExChars(patterns[i]);
if (diacriticInsensitive) {
escapedWord = escapedWord.replace(/\S/g, accent_replacer);
}
escapedPatterns.push(escapedWord);
}
regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
@@ -448,6 +489,14 @@
www.mixin(this);
this.$hint = $(o.hint);
this.$input = $(o.input);
this.$input.attr({
"aria-activedescendant": "",
"aria-owns": this.$input.attr("id") + "_listbox",
role: "combobox",
"aria-readonly": "true",
"aria-autocomplete": "list"
});
$(www.menu).attr("id", this.$input.attr("id") + "_listbox");
this.query = this.$input.val();
this.queryWhenFocused = this.hasFocus() ? this.query : null;
this.$overflowHelper = buildOverflowHelper(this.$input);
@@ -455,6 +504,7 @@
if (this.$hint.length === 0) {
this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
}
this.onSync("cursorchange", this._updateDescendent);
}
Input.normalizeQuery = function(str) {
return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
@@ -524,6 +574,9 @@
this.trigger("whitespaceChanged", this.query);
}
},
_updateDescendent: function updateDescendent(event, id) {
this.$input.attr("aria-activedescendant", id);
},
bind: function() {
var that = this, onBlur, onFocus, onKeydown, onInput;
onBlur = _.bind(this._onBlur, this);
@@ -647,6 +700,7 @@
"use strict";
var keys, nameGenerator;
keys = {
dataset: "tt-selectable-dataset",
val: "tt-selectable-display",
obj: "tt-selectable-object"
};
@@ -666,19 +720,20 @@
}
www.mixin(this);
this.highlight = !!o.highlight;
this.name = o.name || nameGenerator();
this.name = _.toStr(o.name || nameGenerator());
this.limit = o.limit || 5;
this.displayFn = getDisplayFn(o.display || o.displayKey);
this.templates = getTemplates(o.templates, this.displayFn);
this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
this._resetLastSuggestion();
this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
}
Dataset.extractData = function extractData(el) {
var $el = $(el);
if ($el.data(keys.obj)) {
return {
dataset: $el.data(keys.dataset) || "",
val: $el.data(keys.val) || "",
obj: $el.data(keys.obj) || null
};
@@ -697,7 +752,7 @@
} else {
this._empty();
}
this.trigger("rendered", this.name, suggestions, false);
this.trigger("rendered", suggestions, false, this.name);
},
_append: function append(query, suggestions) {
suggestions = suggestions || [];
@@ -708,7 +763,7 @@
} else if (!this.$lastSuggestion.length && this.templates.notFound) {
this._renderNotFound(query);
}
this.trigger("rendered", this.name, suggestions, true);
this.trigger("rendered", suggestions, true, this.name);
},
_renderSuggestions: function renderSuggestions(query, suggestions) {
var $fragment;
@@ -749,7 +804,7 @@
_.each(suggestions, function getSuggestionNode(suggestion) {
var $el, context;
context = that._injectQuery(query, suggestion);
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
$el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
fragment.appendChild($el[0]);
});
this.highlight && highlight({
@@ -787,7 +842,7 @@
this.cancel = function cancel() {
canceled = true;
that.cancel = $.noop;
that.async && that.trigger("asyncCanceled", query);
that.async && that.trigger("asyncCanceled", query, that.name);
};
this.source(query, sync, async);
!syncCalled && sync([]);
@@ -800,16 +855,17 @@
rendered = suggestions.length;
that._overwrite(query, suggestions);
if (rendered < that.limit && that.async) {
that.trigger("asyncRequested", query);
that.trigger("asyncRequested", query, that.name);
}
}
function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
rendered += suggestions.length;
that._append(query, suggestions.slice(0, that.limit - rendered));
that.async && that.trigger("asyncReceived", query);
var idx = Math.abs(rendered - that.limit);
rendered += idx;
that._append(query, suggestions.slice(0, idx));
that.async && that.trigger("asyncReceived", query, that.name);
}
}
},
@@ -843,7 +899,7 @@
suggestion: templates.suggestion || suggestionTemplate
};
function suggestionTemplate(context) {
return $("<div>").text(displayFn(context));
return $('<div role="option">').attr("id", _.guid()).text(displayFn(context));
}
}
function isValidName(str) {
@@ -884,10 +940,11 @@
this.trigger.apply(this, arguments);
},
_allDatasetsEmpty: function allDatasetsEmpty() {
return _.every(this.datasets, isDatasetEmpty);
function isDatasetEmpty(dataset) {
return dataset.isEmpty();
}
return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
var isEmpty = dataset.isEmpty();
this.$node.attr("aria-expanded", !isEmpty);
return isEmpty;
}, this));
},
_getSelectables: function getSelectables() {
return this.$node.find(this.selectors.selectable);
@@ -912,6 +969,12 @@
var that = this, onSelectableClick;
onSelectableClick = _.bind(this._onSelectableClick, this);
this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
this.$node.on("mouseover", this.selectors.selectable, function() {
that.setCursor($(this));
});
this.$node.on("mouseleave", function() {
that._removeCursor();
});
_.each(this.datasets, function(dataset) {
dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
});
@@ -921,9 +984,11 @@
return this.$node.hasClass(this.classes.open);
},
open: function open() {
this.$node.scrollTop(0);
this.$node.addClass(this.classes.open);
},
close: function close() {
this.$node.attr("aria-expanded", false);
this.$node.removeClass(this.classes.open);
this._removeCursor();
},
@@ -988,6 +1053,55 @@
});
return Menu;
}();
var Status = function() {
"use strict";
function Status(options) {
this.$el = $("<span></span>", {
role: "status",
"aria-live": "polite"
}).css({
position: "absolute",
padding: "0",
border: "0",
height: "1px",
width: "1px",
"margin-bottom": "-1px",
"margin-right": "-1px",
overflow: "hidden",
clip: "rect(0 0 0 0)",
"white-space": "nowrap"
});
options.$input.after(this.$el);
_.each(options.menu.datasets, _.bind(function(dataset) {
if (dataset.onSync) {
dataset.onSync("rendered", _.bind(this.update, this));
dataset.onSync("cleared", _.bind(this.cleared, this));
}
}, this));
}
_.mixin(Status.prototype, {
update: function update(event, suggestions) {
var length = suggestions.length;
var words;
if (length === 1) {
words = {
result: "result",
is: "is"
};
} else {
words = {
result: "results",
is: "are"
};
}
this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
},
cleared: function() {
this.$el.text("");
}
});
return Status;
}();
var DefaultMenu = function() {
"use strict";
var s = Menu.prototype;
@@ -1052,6 +1166,7 @@
this.input = o.input;
this.menu = o.menu;
this.enabled = true;
this.autoselect = !!o.autoselect;
this.active = false;
this.input.hasFocus() && this.activate();
this.dir = this.input.getLangDir();
@@ -1098,8 +1213,12 @@
_onDatasetCleared: function onDatasetCleared() {
this._updateHint();
},
_onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
this._updateHint();
if (this.autoselect) {
var cursorClass = this.selectors.cursor.substr(1);
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
}
this.eventBus.trigger("render", suggestions, async, dataset);
},
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
@@ -1122,7 +1241,15 @@
_onEnterKeyed: function onEnterKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
this.select($selectable) && $e.preventDefault();
if (this.select($selectable)) {
$e.preventDefault();
$e.stopPropagation();
}
} else if (this.autoselect) {
if (this.select(this.menu.getTopSelectable())) {
$e.preventDefault();
$e.stopPropagation();
}
}
},
_onTabKeyed: function onTabKeyed(type, $e) {
@@ -1144,12 +1271,12 @@
},
_onLeftKeyed: function onLeftKeyed() {
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getTopSelectable());
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onRightKeyed: function onRightKeyed() {
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getTopSelectable());
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onQueryChanged: function onQueryChanged(e, query) {
@@ -1249,9 +1376,9 @@
},
select: function select($selectable) {
var data = this.menu.getSelectableData($selectable);
if (data && !this.eventBus.before("select", data.obj)) {
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
this.input.setQuery(data.val, true);
this.eventBus.trigger("select", data.obj);
this.eventBus.trigger("select", data.obj, data.dataset);
this.close();
return true;
}
@@ -1262,21 +1389,24 @@
query = this.input.getQuery();
data = this.menu.getSelectableData($selectable);
isValid = data && query !== data.val;
if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
this.input.setQuery(data.val);
this.eventBus.trigger("autocomplete", data.obj);
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
return true;
}
return false;
},
moveCursor: function moveCursor(delta) {
var query, $candidate, data, payload, cancelMove;
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
query = this.input.getQuery();
$candidate = this.menu.selectableRelativeToCursor(delta);
data = this.menu.getSelectableData($candidate);
payload = data ? data.obj : null;
suggestion = data ? data.obj : null;
datasetName = data ? data.dataset : null;
id = $candidate ? $candidate.attr("id") : null;
this.input.trigger("cursorchange", id);
cancelMove = this._minLengthMet() && this.menu.update(query);
if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
this.menu.setCursor($candidate);
if (data) {
this.input.setInputValue(data.val);
@@ -1284,7 +1414,7 @@
this.input.resetInputValue();
this._updateHint();
}
this.eventBus.trigger("cursorchange", payload);
this.eventBus.trigger("cursorchange", suggestion, datasetName);
return true;
}
return false;
@@ -1322,7 +1452,7 @@
www = WWW(o.classNames);
return this.each(attach);
function attach() {
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
_.each(datasets, function(d) {
d.highlight = !!o.highlight;
});
@@ -1353,11 +1483,16 @@
node: $menu,
datasets: datasets
}, www);
status = new Status({
$input: $input,
menu: menu
});
typeahead = new Typeahead({
input: input,
menu: menu,
eventBus: eventBus,
minLength: o.minLength
minLength: o.minLength,
autoselect: o.autoselect
}, www);
$input.data(keys.www, www);
$input.data(keys.typeahead, typeahead);
@@ -1450,7 +1585,7 @@
return query;
} else {
ttEach(this, function(t) {
t.setVal(newVal);
t.setVal(_.toStr(newVal));
});
return this;
}
@@ -1481,8 +1616,10 @@
});
}
function buildHintFromInput($input, www) {
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder required").attr({
autocomplete: "off",
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
readonly: true,
required: false
}).removeAttr("id name placeholder").removeClass("required").attr({
spellcheck: "false",
tabindex: -1
});
@@ -1495,7 +1632,6 @@
style: $input.attr("style")
});
$input.addClass(www.classes.input).attr({
autocomplete: "off",
spellcheck: false
});
try {