FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

deploy: 0b21046eac010bc0781d08577a245e919c660cc2 · pythonnative/pythonnative@6f9e381 · GitHub

Repository navigation

Commit 6f9e381

Browse files
committed
deploy: 0b21046
1 parent 4ac45ec commit 6f9e381

26 files changed

Lines changed: 1853 additions & 449 deletions

File tree

‎api/component/index.html‎

Lines changed: 46 additions & 15 deletions
Large diffs are not rendered by default.

‎api/components/index.html‎

Lines changed: 1027 additions & 193 deletions
Large diffs are not rendered by default.

‎api/element/index.html‎

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,9 +3508,14 @@ <h1 id="element">Element<a class="headerlink" href="#element" title="Permanent l
35083508
<div class="doc doc-contents first">
35093509

35103510
<p>Lightweight element descriptors for the virtual view tree.</p>
3511-
<p>An <a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt;" href="#pythonnative.element.Element"><code>Element</code></a> is an immutable description of a UI
3512-
node, analogous to a React element. It captures a type, a props dict,
3513-
and an ordered list of children without creating any native platform
3511+
<p>An <a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt;
3512+
3513+
3514+
&lt;span class=&quot;doc doc-labels&quot;&gt;
3515+
&lt;small class=&quot;doc doc-label doc-label-dataclass&quot;&gt;&lt;code&gt;dataclass&lt;/code&gt;&lt;/small&gt;
3516+
&lt;/span&gt;" href="#pythonnative.element.Element"><code>Element</code></a> is an immutable description of a UI
3517+
node, analogous to a React element. It captures a type, a read-only property snapshot,
3518+
and an immutable sequence of children without creating any native platform
35143519
objects. The reconciler consumes these trees to determine what native
35153520
views must be created, updated, or removed.</p>
35163521
<p>An element's <code>type</code> is one of three things:</p>
@@ -3581,7 +3586,12 @@ <h1 id="element">Element<a class="headerlink" href="#element" title="Permanent l
35813586
</td>
35823587
</tr>
35833588
<tr class="doc-section-item">
3584-
<td><code><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="#pythonnative.element.Element">Element</a></code></td>
3589+
<td><code><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt;
3590+
3591+
3592+
&lt;span class=&quot;doc doc-labels&quot;&gt;
3593+
&lt;small class=&quot;doc doc-label doc-label-dataclass&quot;&gt;&lt;code&gt;dataclass&lt;/code&gt;&lt;/small&gt;
3594+
&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="#pythonnative.element.Element">Element</a></code></td>
35853595
<td>
35863596
<div class="doc-md-description">
35873597
<p>Immutable description of a single UI node.</p>
@@ -3785,7 +3795,12 @@ <h2 id="pythonnative.element.Node" class="doc doc-heading">
37853795
</span>
37863796

37873797
<a href="#pythonnative.element.Node" class="headerlink" title="Permanent link">&para;</a></h2>
3788-
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">Node</span> <span class="o">=</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Union&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="#pythonnative.element.Element">Element</a></span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#bool">bool</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Iterable&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]]</span>
3798+
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="n">Node</span> <span class="o">=</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Union&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Union">Union</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt;
3799+
3800+
3801+
&lt;span class=&quot;doc doc-labels&quot;&gt;
3802+
&lt;small class=&quot;doc doc-label doc-label-dataclass&quot;&gt;&lt;code&gt;dataclass&lt;/code&gt;&lt;/small&gt;
3803+
&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="#pythonnative.element.Element">Element</a></span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#bool">bool</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Iterable&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]]</span>
37893804
</span></code></pre></div>
37903805

37913806
<div class="doc doc-contents ">
@@ -3861,10 +3876,14 @@ <h2 id="pythonnative.element.Element" class="doc doc-heading">
38613876
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">Element</span>
38623877

38633878

3879+
<span class="doc doc-labels">
3880+
<small class="doc doc-label doc-label-dataclass"><code>dataclass</code></small>
3881+
</span>
3882+
38643883
<a href="#pythonnative.element.Element" class="headerlink" title="Permanent link">&para;</a></h2>
38653884
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">Element</span><span class="p">(</span>
38663885
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="n">type_</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">,</span>
3867-
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">props</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Dict&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Dict">Dict</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
3886+
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">props</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Mapping&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Mapping">Mapping</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
38683887
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="n">children</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Iterable&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
38693888
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">key</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
38703889
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="p">)</span>
@@ -3896,6 +3915,7 @@ <h2 id="pythonnative.element.Element" class="doc doc-heading">
38963915
<tr class="doc-section-item">
38973916
<td><code><span title="pythonnative.element.Element.type">type</span></code></td>
38983917
<td>
3918+
<code><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></code>
38993919
</td>
39003920
<td>
39013921
<div class="doc-md-description">
@@ -3906,23 +3926,23 @@ <h2 id="pythonnative.element.Element" class="doc doc-heading">
39063926
<tr class="doc-section-item">
39073927
<td><code><span title="pythonnative.element.Element.props">props</span></code></td>
39083928
<td>
3909-
<code><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Dict&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Dict">Dict</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]</code>
3929+
<code><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Mapping&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Mapping">Mapping</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]</code>
39103930
</td>
39113931
<td>
39123932
<div class="doc-md-description">
3913-
<p>Dict of properties passed to the native handler or the
3933+
<p>Read-only snapshot of properties passed to the native handler or the
39143934
component function.</p>
39153935
</div>
39163936
</td>
39173937
</tr>
39183938
<tr class="doc-section-item">
39193939
<td><code><span title="pythonnative.element.Element.children">children</span></code></td>
39203940
<td>
3921-
<code><a class="autorefs autorefs-external" title="&lt;code&gt;typing.List&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.List">List</a>[<a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]</code>
3941+
<code><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#tuple">tuple</a>[<a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>, ...]</code>
39223942
</td>
39233943
<td>
39243944
<div class="doc-md-description">
3925-
<p>Ordered list of child nodes. <code>None</code> and <code>False</code>
3945+
<p>Immutable tuple of child nodes. <code>None</code> and <code>False</code>
39263946
entries are permitted and dropped during reconciliation, so
39273947
conditional children (<code>cond and Text(...)</code>) need no special
39283948
casing. Components receive these as their <code>*children</code>.</p>
@@ -3932,6 +3952,7 @@ <h2 id="pythonnative.element.Element" class="doc doc-heading">
39323952
<tr class="doc-section-item">
39333953
<td><code><span title="pythonnative.element.Element.key">key</span></code></td>
39343954
<td>
3955+
<code><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>]</code>
39353956
</td>
39363957
<td>
39373958
<div class="doc-md-description">

‎api/hooks/index.html‎

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2439,6 +2439,17 @@
24392439
</ul>
24402440
</nav>
24412441

2442+
</li>
2443+
2444+
<li class="md-nav__item">
2445+
<a href="#pythonnative.hooks.provider_environment" class="md-nav__link">
2446+
<span class="md-ellipsis">
2447+
2448+
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;provider_environment
2449+
2450+
</span>
2451+
</a>
2452+
24422453
</li>
24432454

24442455
<li class="md-nav__item">
@@ -4246,6 +4257,17 @@
42464257
</ul>
42474258
</nav>
42484259

4260+
</li>
4261+
4262+
<li class="md-nav__item">
4263+
<a href="#pythonnative.hooks.provider_environment" class="md-nav__link">
4264+
<span class="md-ellipsis">
4265+
4266+
<code class="doc-symbol doc-symbol-toc doc-symbol-function"></code>&nbsp;provider_environment
4267+
4268+
</span>
4269+
</a>
4270+
42494271
</li>
42504272

42514273
<li class="md-nav__item">
@@ -6327,7 +6349,12 @@ <h3 id="pythonnative.hooks.Context.Provider" class="doc doc-heading">
63276349
&lt;span class=&quot;doc doc-labels&quot;&gt;
63286350
&lt;small class=&quot;doc doc-label doc-label-module-attribute&quot;&gt;&lt;code&gt;module-attribute&lt;/code&gt;&lt;/small&gt;
63296351
&lt;/span&gt; (&lt;code&gt;pythonnative.element.Node&lt;/code&gt;)" href="../element/#pythonnative.element.Node">Node</a></span><span class="p">,</span> <span class="n">key</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Optional&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Optional">Optional</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
6330-
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n"><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="../element/#pythonnative.element.Element">Element</a></span>
6352+
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n"><a class="autorefs autorefs-internal" title="&lt;code class=&quot;doc-symbol doc-symbol-heading doc-symbol-class&quot;&gt;&lt;/code&gt; &lt;span class=&quot;doc doc-object-name doc-class-name&quot;&gt;Element&lt;/span&gt;
6353+
6354+
6355+
&lt;span class=&quot;doc doc-labels&quot;&gt;
6356+
&lt;small class=&quot;doc doc-label doc-label-dataclass&quot;&gt;&lt;code&gt;dataclass&lt;/code&gt;&lt;/small&gt;
6357+
&lt;/span&gt; (&lt;code&gt;pythonnative.element.Element&lt;/code&gt;)" href="../element/#pythonnative.element.Element">Element</a></span>
63316358
</span></code></pre></div>
63326359

63336360
<div class="doc doc-contents ">
@@ -6454,6 +6481,26 @@ <h3 id="pythonnative.hooks.Context.current" class="doc doc-heading">
64546481
<div class="doc doc-object doc-function">
64556482

64566483

6484+
<h2 id="pythonnative.hooks.provider_environment" class="doc doc-heading">
6485+
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">provider_environment</span>
6486+
6487+
6488+
<a href="#pythonnative.hooks.provider_environment" class="headerlink" title="Permanent link">&para;</a></h2>
6489+
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">provider_environment</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Dict&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Dict">Dict</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="&lt;code&gt;typing.Any&lt;/code&gt;" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]</span>
6490+
</span></code></pre></div>
6491+
6492+
<div class="doc doc-contents ">
6493+
6494+
<p>Return the current immutable provider environment for render identity.</p>
6495+
6496+
6497+
</div>
6498+
6499+
</div>
6500+
6501+
<div class="doc doc-object doc-function">
6502+
6503+
64576504
<h2 id="pythonnative.hooks.current_hook_state" class="doc doc-heading">
64586505
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">current_hook_state</span>
64596506

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL