nativelayout 1.2.0__tar.gz → 1.2.1__tar.gz
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.
- nativelayout-1.2.1/PKG-INFO +108 -0
- nativelayout-1.2.1/README.md +82 -0
- nativelayout-1.2.1/nativelayout.egg-info/PKG-INFO +108 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/pyproject.toml +1 -1
- nativelayout-1.2.0/PKG-INFO +0 -93
- nativelayout-1.2.0/README.md +0 -67
- nativelayout-1.2.0/nativelayout.egg-info/PKG-INFO +0 -93
- {nativelayout-1.2.0 → nativelayout-1.2.1}/LICENSE +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/__init__.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/draw.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/flex.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/kivy_host.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/native_view.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/android/nativelayout/host/widgets.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/__init__.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/css.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/differ.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/errors.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/expander.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/html_parser.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/icons.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/layout_engine.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/layout_host.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/program.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/scopes.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/core/nativelayout/core/tree.py +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/nativelayout.egg-info/SOURCES.txt +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/nativelayout.egg-info/dependency_links.txt +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/nativelayout.egg-info/requires.txt +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/nativelayout.egg-info/top_level.txt +0 -0
- {nativelayout-1.2.0 → nativelayout-1.2.1}/setup.cfg +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nativelayout
|
|
3
|
+
Version: 1.2.1
|
|
4
|
+
Summary: Create native interfaces from HTML, in any language. Python core and Kivy host.
|
|
5
|
+
Author: Adilson C. Rafael
|
|
6
|
+
License-Expression: MPL-2.0
|
|
7
|
+
Project-URL: Homepage, https://getnativelayout.github.io/nativelayout/
|
|
8
|
+
Project-URL: Source, https://github.com/getnativelayout/nativelayout
|
|
9
|
+
Project-URL: Issues, https://github.com/getnativelayout/nativelayout/issues
|
|
10
|
+
Project-URL: Specification, https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md
|
|
11
|
+
Keywords: ui,layout,html,css,native,kivy,android
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Provides-Extra: kivy
|
|
24
|
+
Requires-Dist: kivy>=2.0; extra == "kivy"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# nativelayout
|
|
28
|
+
|
|
29
|
+
**Describe a screen in HTML-like text and get a native interface.**
|
|
30
|
+
|
|
31
|
+
nativelayout is a declarative language for user interfaces.
|
|
32
|
+
|
|
33
|
+
You write a screen once, in a plain text file (`.nl`) that looks like HTML, and each programming language shows it with its own host. There is no WebView.
|
|
34
|
+
|
|
35
|
+
A `.nl` file has:
|
|
36
|
+
|
|
37
|
+
- HTML tags you already know (`div`, `p`, `button`, `input`, `img`, ...);
|
|
38
|
+
- `{values}` that your code fills in;
|
|
39
|
+
- `if` and `for` lines, for conditions and repetition;
|
|
40
|
+
- a `<style>` with simple CSS selectors.
|
|
41
|
+
|
|
42
|
+
The file only describes the screen. The logic (state and taps) stays in your own code, in a screen function.
|
|
43
|
+
|
|
44
|
+
nativelayout is a specification with implementations: [Kotlin for Android](https://github.com/getnativelayout/nativelayout/tree/main/android), Python (this package) and JavaScript (used by the [online editor](https://nativelayoutpad.vercel.app/)). The same `.nl` file works unchanged in all of them.
|
|
45
|
+
|
|
46
|
+
**This package** is the Python implementation: a pure Python core (parser, expander, layout engine and differ) and a Kivy host that draws the screen.
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install nativelayout # core only, pure Python, no dependencies
|
|
52
|
+
pip install "nativelayout[kivy]" # core + Kivy host
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Python 3.10 or newer. The host needs Kivy 2.x. On Android, package the app with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
56
|
+
|
|
57
|
+
## Example
|
|
58
|
+
|
|
59
|
+
`screen.nl`:
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<nativelayout>
|
|
63
|
+
<style>
|
|
64
|
+
body { padding: 16px; gap: 12px; }
|
|
65
|
+
.mais { background-color: #2F81F7; color: white; border-radius: 20px; }
|
|
66
|
+
</style>
|
|
67
|
+
<body>
|
|
68
|
+
<h1>Hello, {name}</h1>
|
|
69
|
+
<p>Total: {n}</p>
|
|
70
|
+
<button class="mais">+ add</button>
|
|
71
|
+
</body>
|
|
72
|
+
</nativelayout>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`main.py`:
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import kivy # noqa: F401
|
|
79
|
+
from nativelayout import state, view, click, run_app, file_loader
|
|
80
|
+
|
|
81
|
+
def screen():
|
|
82
|
+
s = state({"n": 0, "name": "world"})
|
|
83
|
+
if click(".mais"):
|
|
84
|
+
s["n"] += 1
|
|
85
|
+
return view("screen.nl", s)
|
|
86
|
+
|
|
87
|
+
run_app(file_loader("."), app=screen)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The file describes the screen. The logic (state and taps) stays in your Python code, in a screen function.
|
|
91
|
+
|
|
92
|
+
## What is in the package
|
|
93
|
+
|
|
94
|
+
- `nativelayout.core`: parser, expander, layout engine, differ and the program side (`state`, `view`, `click`, `go`, `value`, `save`, ...). Pure Python.
|
|
95
|
+
- `nativelayout.host`: the Kivy host. It draws on a canvas; it does not build platform-native views.
|
|
96
|
+
|
|
97
|
+
Everything is also available from the top level: `from nativelayout import state, view, click, run_app, file_loader`. The Kivy host is loaded only when you use it.
|
|
98
|
+
|
|
99
|
+
## Links
|
|
100
|
+
|
|
101
|
+
- [Website](https://getnativelayout.github.io/nativelayout/)
|
|
102
|
+
- [Specification](https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md)
|
|
103
|
+
- [Source and issues](https://github.com/getnativelayout/nativelayout)
|
|
104
|
+
- [Online editor](https://nativelayoutpad.vercel.app/)
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
Mozilla Public License 2.0. Copyright (c) 2026 Adilson C. Rafael.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# nativelayout
|
|
2
|
+
|
|
3
|
+
**Describe a screen in HTML-like text and get a native interface.**
|
|
4
|
+
|
|
5
|
+
nativelayout is a declarative language for user interfaces.
|
|
6
|
+
|
|
7
|
+
You write a screen once, in a plain text file (`.nl`) that looks like HTML, and each programming language shows it with its own host. There is no WebView.
|
|
8
|
+
|
|
9
|
+
A `.nl` file has:
|
|
10
|
+
|
|
11
|
+
- HTML tags you already know (`div`, `p`, `button`, `input`, `img`, ...);
|
|
12
|
+
- `{values}` that your code fills in;
|
|
13
|
+
- `if` and `for` lines, for conditions and repetition;
|
|
14
|
+
- a `<style>` with simple CSS selectors.
|
|
15
|
+
|
|
16
|
+
The file only describes the screen. The logic (state and taps) stays in your own code, in a screen function.
|
|
17
|
+
|
|
18
|
+
nativelayout is a specification with implementations: [Kotlin for Android](https://github.com/getnativelayout/nativelayout/tree/main/android), Python (this package) and JavaScript (used by the [online editor](https://nativelayoutpad.vercel.app/)). The same `.nl` file works unchanged in all of them.
|
|
19
|
+
|
|
20
|
+
**This package** is the Python implementation: a pure Python core (parser, expander, layout engine and differ) and a Kivy host that draws the screen.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
pip install nativelayout # core only, pure Python, no dependencies
|
|
26
|
+
pip install "nativelayout[kivy]" # core + Kivy host
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Python 3.10 or newer. The host needs Kivy 2.x. On Android, package the app with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
`screen.nl`:
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<nativelayout>
|
|
37
|
+
<style>
|
|
38
|
+
body { padding: 16px; gap: 12px; }
|
|
39
|
+
.mais { background-color: #2F81F7; color: white; border-radius: 20px; }
|
|
40
|
+
</style>
|
|
41
|
+
<body>
|
|
42
|
+
<h1>Hello, {name}</h1>
|
|
43
|
+
<p>Total: {n}</p>
|
|
44
|
+
<button class="mais">+ add</button>
|
|
45
|
+
</body>
|
|
46
|
+
</nativelayout>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`main.py`:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import kivy # noqa: F401
|
|
53
|
+
from nativelayout import state, view, click, run_app, file_loader
|
|
54
|
+
|
|
55
|
+
def screen():
|
|
56
|
+
s = state({"n": 0, "name": "world"})
|
|
57
|
+
if click(".mais"):
|
|
58
|
+
s["n"] += 1
|
|
59
|
+
return view("screen.nl", s)
|
|
60
|
+
|
|
61
|
+
run_app(file_loader("."), app=screen)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The file describes the screen. The logic (state and taps) stays in your Python code, in a screen function.
|
|
65
|
+
|
|
66
|
+
## What is in the package
|
|
67
|
+
|
|
68
|
+
- `nativelayout.core`: parser, expander, layout engine, differ and the program side (`state`, `view`, `click`, `go`, `value`, `save`, ...). Pure Python.
|
|
69
|
+
- `nativelayout.host`: the Kivy host. It draws on a canvas; it does not build platform-native views.
|
|
70
|
+
|
|
71
|
+
Everything is also available from the top level: `from nativelayout import state, view, click, run_app, file_loader`. The Kivy host is loaded only when you use it.
|
|
72
|
+
|
|
73
|
+
## Links
|
|
74
|
+
|
|
75
|
+
- [Website](https://getnativelayout.github.io/nativelayout/)
|
|
76
|
+
- [Specification](https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md)
|
|
77
|
+
- [Source and issues](https://github.com/getnativelayout/nativelayout)
|
|
78
|
+
- [Online editor](https://nativelayoutpad.vercel.app/)
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
Mozilla Public License 2.0. Copyright (c) 2026 Adilson C. Rafael.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nativelayout
|
|
3
|
+
Version: 1.2.1
|
|
4
|
+
Summary: Create native interfaces from HTML, in any language. Python core and Kivy host.
|
|
5
|
+
Author: Adilson C. Rafael
|
|
6
|
+
License-Expression: MPL-2.0
|
|
7
|
+
Project-URL: Homepage, https://getnativelayout.github.io/nativelayout/
|
|
8
|
+
Project-URL: Source, https://github.com/getnativelayout/nativelayout
|
|
9
|
+
Project-URL: Issues, https://github.com/getnativelayout/nativelayout/issues
|
|
10
|
+
Project-URL: Specification, https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md
|
|
11
|
+
Keywords: ui,layout,html,css,native,kivy,android
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Provides-Extra: kivy
|
|
24
|
+
Requires-Dist: kivy>=2.0; extra == "kivy"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# nativelayout
|
|
28
|
+
|
|
29
|
+
**Describe a screen in HTML-like text and get a native interface.**
|
|
30
|
+
|
|
31
|
+
nativelayout is a declarative language for user interfaces.
|
|
32
|
+
|
|
33
|
+
You write a screen once, in a plain text file (`.nl`) that looks like HTML, and each programming language shows it with its own host. There is no WebView.
|
|
34
|
+
|
|
35
|
+
A `.nl` file has:
|
|
36
|
+
|
|
37
|
+
- HTML tags you already know (`div`, `p`, `button`, `input`, `img`, ...);
|
|
38
|
+
- `{values}` that your code fills in;
|
|
39
|
+
- `if` and `for` lines, for conditions and repetition;
|
|
40
|
+
- a `<style>` with simple CSS selectors.
|
|
41
|
+
|
|
42
|
+
The file only describes the screen. The logic (state and taps) stays in your own code, in a screen function.
|
|
43
|
+
|
|
44
|
+
nativelayout is a specification with implementations: [Kotlin for Android](https://github.com/getnativelayout/nativelayout/tree/main/android), Python (this package) and JavaScript (used by the [online editor](https://nativelayoutpad.vercel.app/)). The same `.nl` file works unchanged in all of them.
|
|
45
|
+
|
|
46
|
+
**This package** is the Python implementation: a pure Python core (parser, expander, layout engine and differ) and a Kivy host that draws the screen.
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install nativelayout # core only, pure Python, no dependencies
|
|
52
|
+
pip install "nativelayout[kivy]" # core + Kivy host
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Python 3.10 or newer. The host needs Kivy 2.x. On Android, package the app with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
56
|
+
|
|
57
|
+
## Example
|
|
58
|
+
|
|
59
|
+
`screen.nl`:
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<nativelayout>
|
|
63
|
+
<style>
|
|
64
|
+
body { padding: 16px; gap: 12px; }
|
|
65
|
+
.mais { background-color: #2F81F7; color: white; border-radius: 20px; }
|
|
66
|
+
</style>
|
|
67
|
+
<body>
|
|
68
|
+
<h1>Hello, {name}</h1>
|
|
69
|
+
<p>Total: {n}</p>
|
|
70
|
+
<button class="mais">+ add</button>
|
|
71
|
+
</body>
|
|
72
|
+
</nativelayout>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`main.py`:
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import kivy # noqa: F401
|
|
79
|
+
from nativelayout import state, view, click, run_app, file_loader
|
|
80
|
+
|
|
81
|
+
def screen():
|
|
82
|
+
s = state({"n": 0, "name": "world"})
|
|
83
|
+
if click(".mais"):
|
|
84
|
+
s["n"] += 1
|
|
85
|
+
return view("screen.nl", s)
|
|
86
|
+
|
|
87
|
+
run_app(file_loader("."), app=screen)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The file describes the screen. The logic (state and taps) stays in your Python code, in a screen function.
|
|
91
|
+
|
|
92
|
+
## What is in the package
|
|
93
|
+
|
|
94
|
+
- `nativelayout.core`: parser, expander, layout engine, differ and the program side (`state`, `view`, `click`, `go`, `value`, `save`, ...). Pure Python.
|
|
95
|
+
- `nativelayout.host`: the Kivy host. It draws on a canvas; it does not build platform-native views.
|
|
96
|
+
|
|
97
|
+
Everything is also available from the top level: `from nativelayout import state, view, click, run_app, file_loader`. The Kivy host is loaded only when you use it.
|
|
98
|
+
|
|
99
|
+
## Links
|
|
100
|
+
|
|
101
|
+
- [Website](https://getnativelayout.github.io/nativelayout/)
|
|
102
|
+
- [Specification](https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md)
|
|
103
|
+
- [Source and issues](https://github.com/getnativelayout/nativelayout)
|
|
104
|
+
- [Online editor](https://nativelayoutpad.vercel.app/)
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
Mozilla Public License 2.0. Copyright (c) 2026 Adilson C. Rafael.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nativelayout"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.1"
|
|
8
8
|
description = "Create native interfaces from HTML, in any language. Python core and Kivy host."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
nativelayout-1.2.0/PKG-INFO
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: nativelayout
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: Create native interfaces from HTML, in any language. Python core and Kivy host.
|
|
5
|
-
Author: Adilson C. Rafael
|
|
6
|
-
License-Expression: MPL-2.0
|
|
7
|
-
Project-URL: Homepage, https://getnativelayout.github.io/nativelayout/
|
|
8
|
-
Project-URL: Source, https://github.com/getnativelayout/nativelayout
|
|
9
|
-
Project-URL: Issues, https://github.com/getnativelayout/nativelayout/issues
|
|
10
|
-
Project-URL: Specification, https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md
|
|
11
|
-
Keywords: ui,layout,html,css,native,kivy,android
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Topic :: Software Development :: User Interfaces
|
|
20
|
-
Requires-Python: >=3.10
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
License-File: LICENSE
|
|
23
|
-
Provides-Extra: kivy
|
|
24
|
-
Requires-Dist: kivy>=2.0; extra == "kivy"
|
|
25
|
-
Dynamic: license-file
|
|
26
|
-
|
|
27
|
-
# nativelayout (Python)
|
|
28
|
-
|
|
29
|
-
Python port of the nativelayout core. It follows the Kotlin core feature for feature
|
|
30
|
-
(currently v1.2.0: `<include>`, identity inside `for`, `<footer>` and `dock`,
|
|
31
|
-
`position: absolute`, `background-image`, `object-fit`).
|
|
32
|
-
|
|
33
|
-
- `core/` pure Python, no Kivy: parser, expander, layout engine, differ, program side
|
|
34
|
-
- `android/` Kivy host for Android (`nativelayout/host`)
|
|
35
|
-
- `desktop/` Kivy host for the desktop (`nativelayout/host`)
|
|
36
|
-
- `examples/` examples (`contador/`)
|
|
37
|
-
|
|
38
|
-
The Kivy hosts draw on a canvas; they do not build platform-native views.
|
|
39
|
-
|
|
40
|
-
## Install
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
pip install nativelayout # core only (pure Python, no dependencies)
|
|
44
|
-
pip install "nativelayout[kivy]" # core + Kivy host
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Requires Python 3.10 or newer. On Android, package with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
48
|
-
|
|
49
|
-
`nativelayout` is a namespace package (no `__init__.py` at its root): the core is `nativelayout.core` and the Kivy host is `nativelayout.host`. The package published on PyPI carries the Android host (`android/`), which includes the stencil mask that rounds `background-image` corners. To work from the repository instead, put `core` and the folder of the host on `sys.path`.
|
|
50
|
-
|
|
51
|
-
## Usage
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
import kivy # noqa: F401 (Pydroid starts the Kivy window only if the opened file imports kivy)
|
|
55
|
-
from nativelayout.core.program import state, view, click
|
|
56
|
-
from nativelayout.host import run_app, file_loader
|
|
57
|
-
|
|
58
|
-
def screen():
|
|
59
|
-
s = state({"n": 0})
|
|
60
|
-
if click(".more"):
|
|
61
|
-
s["n"] += 1
|
|
62
|
-
return view("screen.nl", s)
|
|
63
|
-
|
|
64
|
-
run_app(file_loader("."), app=screen)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
The host needs Kivy 2.x.
|
|
68
|
-
|
|
69
|
-
## Tests
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
cd python/core
|
|
73
|
-
python -m unittest discover -s tests -t .
|
|
74
|
-
|
|
75
|
-
cd python/android
|
|
76
|
-
python -m unittest discover -s tests -t .
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The core tests mirror the Kotlin ones (`IncludeTest`, `FooterTest`, `AbsoluteTest`). The host tests
|
|
80
|
-
cover `flex.py`, which does not need Kivy.
|
|
81
|
-
|
|
82
|
-
## Status of the host (v1.2.0)
|
|
83
|
-
|
|
84
|
-
Done: columns and rows, `flex`, `gap`, `justify`, `align`, wrap, header, footer and `dock`, dialogs,
|
|
85
|
-
`position: absolute` (with `z-index`), `background-image` (`background-size`, `background-position`),
|
|
86
|
-
`object-fit`, icons, gradients, shadows, rounded corners.
|
|
87
|
-
|
|
88
|
-
Not done yet:
|
|
89
|
-
- `virtual` lists draw all items (no recycling)
|
|
90
|
-
- animations: only the fade-in of the screen (slide-up and slide-left are missing)
|
|
91
|
-
- `letter-spacing` and `overflow: hidden` (clipping) are not applied
|
|
92
|
-
- the Android keyboard can cover fields (adjust `softinput_mode`)
|
|
93
|
-
- the Kivy drawing of `background-image` and `object-fit` has not been tried on a device yet
|
nativelayout-1.2.0/README.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# nativelayout (Python)
|
|
2
|
-
|
|
3
|
-
Python port of the nativelayout core. It follows the Kotlin core feature for feature
|
|
4
|
-
(currently v1.2.0: `<include>`, identity inside `for`, `<footer>` and `dock`,
|
|
5
|
-
`position: absolute`, `background-image`, `object-fit`).
|
|
6
|
-
|
|
7
|
-
- `core/` pure Python, no Kivy: parser, expander, layout engine, differ, program side
|
|
8
|
-
- `android/` Kivy host for Android (`nativelayout/host`)
|
|
9
|
-
- `desktop/` Kivy host for the desktop (`nativelayout/host`)
|
|
10
|
-
- `examples/` examples (`contador/`)
|
|
11
|
-
|
|
12
|
-
The Kivy hosts draw on a canvas; they do not build platform-native views.
|
|
13
|
-
|
|
14
|
-
## Install
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
pip install nativelayout # core only (pure Python, no dependencies)
|
|
18
|
-
pip install "nativelayout[kivy]" # core + Kivy host
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Requires Python 3.10 or newer. On Android, package with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
22
|
-
|
|
23
|
-
`nativelayout` is a namespace package (no `__init__.py` at its root): the core is `nativelayout.core` and the Kivy host is `nativelayout.host`. The package published on PyPI carries the Android host (`android/`), which includes the stencil mask that rounds `background-image` corners. To work from the repository instead, put `core` and the folder of the host on `sys.path`.
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
```python
|
|
28
|
-
import kivy # noqa: F401 (Pydroid starts the Kivy window only if the opened file imports kivy)
|
|
29
|
-
from nativelayout.core.program import state, view, click
|
|
30
|
-
from nativelayout.host import run_app, file_loader
|
|
31
|
-
|
|
32
|
-
def screen():
|
|
33
|
-
s = state({"n": 0})
|
|
34
|
-
if click(".more"):
|
|
35
|
-
s["n"] += 1
|
|
36
|
-
return view("screen.nl", s)
|
|
37
|
-
|
|
38
|
-
run_app(file_loader("."), app=screen)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The host needs Kivy 2.x.
|
|
42
|
-
|
|
43
|
-
## Tests
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
cd python/core
|
|
47
|
-
python -m unittest discover -s tests -t .
|
|
48
|
-
|
|
49
|
-
cd python/android
|
|
50
|
-
python -m unittest discover -s tests -t .
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
The core tests mirror the Kotlin ones (`IncludeTest`, `FooterTest`, `AbsoluteTest`). The host tests
|
|
54
|
-
cover `flex.py`, which does not need Kivy.
|
|
55
|
-
|
|
56
|
-
## Status of the host (v1.2.0)
|
|
57
|
-
|
|
58
|
-
Done: columns and rows, `flex`, `gap`, `justify`, `align`, wrap, header, footer and `dock`, dialogs,
|
|
59
|
-
`position: absolute` (with `z-index`), `background-image` (`background-size`, `background-position`),
|
|
60
|
-
`object-fit`, icons, gradients, shadows, rounded corners.
|
|
61
|
-
|
|
62
|
-
Not done yet:
|
|
63
|
-
- `virtual` lists draw all items (no recycling)
|
|
64
|
-
- animations: only the fade-in of the screen (slide-up and slide-left are missing)
|
|
65
|
-
- `letter-spacing` and `overflow: hidden` (clipping) are not applied
|
|
66
|
-
- the Android keyboard can cover fields (adjust `softinput_mode`)
|
|
67
|
-
- the Kivy drawing of `background-image` and `object-fit` has not been tried on a device yet
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: nativelayout
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: Create native interfaces from HTML, in any language. Python core and Kivy host.
|
|
5
|
-
Author: Adilson C. Rafael
|
|
6
|
-
License-Expression: MPL-2.0
|
|
7
|
-
Project-URL: Homepage, https://getnativelayout.github.io/nativelayout/
|
|
8
|
-
Project-URL: Source, https://github.com/getnativelayout/nativelayout
|
|
9
|
-
Project-URL: Issues, https://github.com/getnativelayout/nativelayout/issues
|
|
10
|
-
Project-URL: Specification, https://github.com/getnativelayout/nativelayout/blob/main/SPEC.md
|
|
11
|
-
Keywords: ui,layout,html,css,native,kivy,android
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Topic :: Software Development :: User Interfaces
|
|
20
|
-
Requires-Python: >=3.10
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
License-File: LICENSE
|
|
23
|
-
Provides-Extra: kivy
|
|
24
|
-
Requires-Dist: kivy>=2.0; extra == "kivy"
|
|
25
|
-
Dynamic: license-file
|
|
26
|
-
|
|
27
|
-
# nativelayout (Python)
|
|
28
|
-
|
|
29
|
-
Python port of the nativelayout core. It follows the Kotlin core feature for feature
|
|
30
|
-
(currently v1.2.0: `<include>`, identity inside `for`, `<footer>` and `dock`,
|
|
31
|
-
`position: absolute`, `background-image`, `object-fit`).
|
|
32
|
-
|
|
33
|
-
- `core/` pure Python, no Kivy: parser, expander, layout engine, differ, program side
|
|
34
|
-
- `android/` Kivy host for Android (`nativelayout/host`)
|
|
35
|
-
- `desktop/` Kivy host for the desktop (`nativelayout/host`)
|
|
36
|
-
- `examples/` examples (`contador/`)
|
|
37
|
-
|
|
38
|
-
The Kivy hosts draw on a canvas; they do not build platform-native views.
|
|
39
|
-
|
|
40
|
-
## Install
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
pip install nativelayout # core only (pure Python, no dependencies)
|
|
44
|
-
pip install "nativelayout[kivy]" # core + Kivy host
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Requires Python 3.10 or newer. On Android, package with buildozer (`requirements = python3,kivy,nativelayout`).
|
|
48
|
-
|
|
49
|
-
`nativelayout` is a namespace package (no `__init__.py` at its root): the core is `nativelayout.core` and the Kivy host is `nativelayout.host`. The package published on PyPI carries the Android host (`android/`), which includes the stencil mask that rounds `background-image` corners. To work from the repository instead, put `core` and the folder of the host on `sys.path`.
|
|
50
|
-
|
|
51
|
-
## Usage
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
import kivy # noqa: F401 (Pydroid starts the Kivy window only if the opened file imports kivy)
|
|
55
|
-
from nativelayout.core.program import state, view, click
|
|
56
|
-
from nativelayout.host import run_app, file_loader
|
|
57
|
-
|
|
58
|
-
def screen():
|
|
59
|
-
s = state({"n": 0})
|
|
60
|
-
if click(".more"):
|
|
61
|
-
s["n"] += 1
|
|
62
|
-
return view("screen.nl", s)
|
|
63
|
-
|
|
64
|
-
run_app(file_loader("."), app=screen)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
The host needs Kivy 2.x.
|
|
68
|
-
|
|
69
|
-
## Tests
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
cd python/core
|
|
73
|
-
python -m unittest discover -s tests -t .
|
|
74
|
-
|
|
75
|
-
cd python/android
|
|
76
|
-
python -m unittest discover -s tests -t .
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The core tests mirror the Kotlin ones (`IncludeTest`, `FooterTest`, `AbsoluteTest`). The host tests
|
|
80
|
-
cover `flex.py`, which does not need Kivy.
|
|
81
|
-
|
|
82
|
-
## Status of the host (v1.2.0)
|
|
83
|
-
|
|
84
|
-
Done: columns and rows, `flex`, `gap`, `justify`, `align`, wrap, header, footer and `dock`, dialogs,
|
|
85
|
-
`position: absolute` (with `z-index`), `background-image` (`background-size`, `background-position`),
|
|
86
|
-
`object-fit`, icons, gradients, shadows, rounded corners.
|
|
87
|
-
|
|
88
|
-
Not done yet:
|
|
89
|
-
- `virtual` lists draw all items (no recycling)
|
|
90
|
-
- animations: only the fade-in of the screen (slide-up and slide-left are missing)
|
|
91
|
-
- `letter-spacing` and `overflow: hidden` (clipping) are not applied
|
|
92
|
-
- the Android keyboard can cover fields (adjust `softinput_mode`)
|
|
93
|
-
- the Kivy drawing of `background-image` and `object-fit` has not been tried on a device yet
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|