pythonx-compose 0.1.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pythonx/compose/__init__.py +4 -0
- pythonx/compose/__init__.pyi +1 -0
- pythonx/compose/_reexport.py +512 -0
- pythonx/compose/foundation/__init__.py +5 -0
- pythonx/compose/foundation/__init__.pyi +17 -0
- pythonx/compose/foundation/layout/__init__.py +5 -0
- pythonx/compose/foundation/layout/__init__.pyi +2 -0
- pythonx/compose/foundation/text/__init__.py +5 -0
- pythonx/compose/foundation/text/input/__init__.py +5 -0
- pythonx/compose/foundation/text/input/__init__.pyi +78 -0
- pythonx/compose/layout/__init__.py +25 -0
- pythonx/compose/layout/__init__.pyi +878 -0
- pythonx/compose/layout/arrangement.py +34 -0
- pythonx/compose/material/__init__.py +8 -0
- pythonx/compose/material/__init__.pyi +1 -0
- pythonx/compose/material/icons/__init__.py +9 -0
- pythonx/compose/material/icons/__init__.pyi +1159 -0
- pythonx/compose/material3/__init__.py +24 -0
- pythonx/compose/material3/__init__.pyi +3305 -0
- pythonx/compose/py.typed +0 -0
- pythonx/compose/pythonx-map.toml +73 -0
- pythonx/compose/runtime/__init__.py +128 -0
- pythonx/compose/runtime/__init__.pyi +180 -0
- pythonx/compose/ui/__init__.py +21 -0
- pythonx/compose/ui/__init__.pyi +975 -0
- pythonx/compose/ui/alignment.py +47 -0
- pythonx/compose/ui/graphics/__init__.py +5 -0
- pythonx/compose/ui/graphics/__init__.pyi +795 -0
- pythonx/compose/ui/graphics/vector/__init__.py +5 -0
- pythonx/compose/ui/graphics/vector/__init__.pyi +221 -0
- pythonx/compose/ui/modifier.py +110 -0
- pythonx/compose/ui/text/__init__.py +5 -0
- pythonx/compose/ui/text/__init__.pyi +703 -0
- pythonx/compose/ui/unit/__init__.py +19 -0
- pythonx/compose/ui/unit/__init__.pyi +348 -0
- pythonx_compose-0.1.0a1.dist-info/METADATA +228 -0
- pythonx_compose-0.1.0a1.dist-info/RECORD +40 -0
- pythonx_compose-0.1.0a1.dist-info/WHEEL +5 -0
- pythonx_compose-0.1.0a1.dist-info/licenses/LICENSE +21 -0
- pythonx_compose-0.1.0a1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""`pythonx/compose/ui/alignment.py` -- what the adaptation layer now produces, and how to spell it.
|
|
2
|
+
|
|
3
|
+
`Alignment` and its constants used to be blocked: the walker bound top-level functions and, later,
|
|
4
|
+
value-class constructors, and a constant held by a companion was neither. `PythonMultiplatform`'s
|
|
5
|
+
`80318c16` added that binding (`CallableKind.STATIC_GETTER`), and `6d896fba` proved a constant
|
|
6
|
+
crosses and changes a layout.
|
|
7
|
+
|
|
8
|
+
The binding exists only under its Kotlin name. Re-exporting it as `pythonx.compose.ui.Alignment` is
|
|
9
|
+
this package's job, not the binder's -- the earlier rule that whatever the layer produces gets no
|
|
10
|
+
wrapper here (`0856d08`, `f7e21f8`) was the wrong way round. Until that re-export can land, this file
|
|
11
|
+
records the two things a caller cannot read off the layer.
|
|
12
|
+
|
|
13
|
+
## The names the layer produces
|
|
14
|
+
|
|
15
|
+
Bottom BottomCenter BottomEnd BottomStart Center CenterEnd CenterHorizontally
|
|
16
|
+
CenterStart CenterVertically End Start Top TopCenter TopEnd TopStart
|
|
17
|
+
|
|
18
|
+
Read out of the walked table, not from Compose's own source: a name Compose declares but the walker
|
|
19
|
+
declines would not be here.
|
|
20
|
+
|
|
21
|
+
## They are read, not called
|
|
22
|
+
|
|
23
|
+
from pythonx.compose.ui import Alignment
|
|
24
|
+
Alignment.Center # no parentheses
|
|
25
|
+
|
|
26
|
+
`PythonMultiplatform`'s `46be0212` taught the layer to branch on the kind column: a static getter is
|
|
27
|
+
evaluated on attribute access and handed back as a value, so `Alignment.Center()` -- the spelling
|
|
28
|
+
this file used to prescribe -- now raises `TypeError` because the value is not callable.
|
|
29
|
+
|
|
30
|
+
`pythonx.compose.ui.Alignment` is the Kotlin object `androidx.compose.ui.Alignment` seen through the
|
|
31
|
+
re-export rule (`pythonx/compose/_reexport.py`, `KotlinObject`): constants keep their Kotlin
|
|
32
|
+
spelling and are read again on every access, as the binder serves them.
|
|
33
|
+
|
|
34
|
+
## Grouped by declared type
|
|
35
|
+
|
|
36
|
+
The notebook's grouped spelling works beside Kotlin's flat one (INTENT section 5.3):
|
|
37
|
+
|
|
38
|
+
Alignment.Horizontal.End # the same read as Alignment.End
|
|
39
|
+
Alignment.Vertical.Top # the same read as Alignment.Top
|
|
40
|
+
|
|
41
|
+
`Alignment.Horizontal` holds the constants declared as `Alignment.Horizontal` (`CenterHorizontally`,
|
|
42
|
+
`End`, `Start`) and `Alignment.Vertical` those declared as `Alignment.Vertical` (`Bottom`,
|
|
43
|
+
`CenterVertically`, `Top`). A constant declared as `Alignment` itself (`Center`, `TopStart`, ...) is
|
|
44
|
+
in neither. The grouping is the re-export rule's (`ConstantGroup`), read from the declared types
|
|
45
|
+
`python_multiplatform.describe(module, name)` reports without running a getter (python-multiplatform
|
|
46
|
+
#36), so no list here drives it.
|
|
47
|
+
"""
|