motui 1.0.0__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.
- motui-1.0.0/.github/workflows/ci.yml +64 -0
- motui-1.0.0/.github/workflows/release.yml +61 -0
- motui-1.0.0/.gitignore +8 -0
- motui-1.0.0/LICENSE +21 -0
- motui-1.0.0/PKG-INFO +641 -0
- motui-1.0.0/README.md +617 -0
- motui-1.0.0/docs/API.md +1665 -0
- motui-1.0.0/docs/COMPONENTS.md +1416 -0
- motui-1.0.0/docs/DESIGN.md +1140 -0
- motui-1.0.0/pyproject.toml +60 -0
- motui-1.0.0/src/motui/__init__.py +146 -0
- motui-1.0.0/src/motui/__main__.py +15 -0
- motui-1.0.0/src/motui/app.py +1208 -0
- motui-1.0.0/src/motui/chrome.py +1260 -0
- motui-1.0.0/src/motui/demo/__init__.py +87 -0
- motui-1.0.0/src/motui/demo/__main__.py +8 -0
- motui-1.0.0/src/motui/demo/content.py +80 -0
- motui-1.0.0/src/motui/demo/fixture.md +346 -0
- motui-1.0.0/src/motui/demo/page.py +61 -0
- motui-1.0.0/src/motui/demo/pages/__init__.py +1 -0
- motui-1.0.0/src/motui/demo/pages/action.py +51 -0
- motui-1.0.0/src/motui/demo/pages/choice.py +57 -0
- motui-1.0.0/src/motui/demo/pages/chrome.py +151 -0
- motui-1.0.0/src/motui/demo/pages/content.py +137 -0
- motui-1.0.0/src/motui/demo/pages/data.py +94 -0
- motui-1.0.0/src/motui/demo/pages/feedback.py +75 -0
- motui-1.0.0/src/motui/demo/pages/input.py +57 -0
- motui-1.0.0/src/motui/demo/pages/layout.py +74 -0
- motui-1.0.0/src/motui/demo/pages/overview.py +38 -0
- motui-1.0.0/src/motui/demo/pages/streaming.py +192 -0
- motui-1.0.0/src/motui/demo/pages/styles.py +87 -0
- motui-1.0.0/src/motui/demo/registry.py +49 -0
- motui-1.0.0/src/motui/demo/script.py +175 -0
- motui-1.0.0/src/motui/demo/session.py +444 -0
- motui-1.0.0/src/motui/demo/shell.py +107 -0
- motui-1.0.0/src/motui/interaction/__init__.py +31 -0
- motui-1.0.0/src/motui/interaction/focus.py +267 -0
- motui-1.0.0/src/motui/interaction/gesture.py +616 -0
- motui-1.0.0/src/motui/interaction/pointer.py +266 -0
- motui-1.0.0/src/motui/interaction/search.py +403 -0
- motui-1.0.0/src/motui/kernel/__init__.py +170 -0
- motui-1.0.0/src/motui/kernel/ansi.py +277 -0
- motui-1.0.0/src/motui/kernel/block.py +298 -0
- motui-1.0.0/src/motui/kernel/events.py +121 -0
- motui-1.0.0/src/motui/kernel/frame.py +1286 -0
- motui-1.0.0/src/motui/kernel/lines.py +661 -0
- motui-1.0.0/src/motui/kernel/painter.py +201 -0
- motui-1.0.0/src/motui/kernel/screen.py +329 -0
- motui-1.0.0/src/motui/kernel/selection.py +297 -0
- motui-1.0.0/src/motui/kernel/style.py +407 -0
- motui-1.0.0/src/motui/kernel/text.py +581 -0
- motui-1.0.0/src/motui/kernel/theme.py +172 -0
- motui-1.0.0/src/motui/kernel/viewport.py +334 -0
- motui-1.0.0/src/motui/keys/__init__.py +53 -0
- motui-1.0.0/src/motui/keys/console.py +425 -0
- motui-1.0.0/src/motui/keys/decoder.py +429 -0
- motui-1.0.0/src/motui/keys/keymap.py +95 -0
- motui-1.0.0/src/motui/keys/sources.py +305 -0
- motui-1.0.0/src/motui/py.typed +0 -0
- motui-1.0.0/src/motui/testing.py +61 -0
- motui-1.0.0/src/motui/widgets/__init__.py +99 -0
- motui-1.0.0/src/motui/widgets/autocomplete.py +105 -0
- motui-1.0.0/src/motui/widgets/button.py +109 -0
- motui-1.0.0/src/motui/widgets/checkbox.py +96 -0
- motui-1.0.0/src/motui/widgets/choice.py +437 -0
- motui-1.0.0/src/motui/widgets/collapsible.py +172 -0
- motui-1.0.0/src/motui/widgets/decor.py +245 -0
- motui-1.0.0/src/motui/widgets/diff.py +281 -0
- motui-1.0.0/src/motui/widgets/editor.py +107 -0
- motui-1.0.0/src/motui/widgets/field.py +369 -0
- motui-1.0.0/src/motui/widgets/input.py +152 -0
- motui-1.0.0/src/motui/widgets/layout.py +304 -0
- motui-1.0.0/src/motui/widgets/link.py +75 -0
- motui-1.0.0/src/motui/widgets/list.py +366 -0
- motui-1.0.0/src/motui/widgets/markdown/__init__.py +104 -0
- motui-1.0.0/src/motui/widgets/markdown/blocks.py +336 -0
- motui-1.0.0/src/motui/widgets/markdown/component.py +473 -0
- motui-1.0.0/src/motui/widgets/markdown/context.py +35 -0
- motui-1.0.0/src/motui/widgets/markdown/inline.py +233 -0
- motui-1.0.0/src/motui/widgets/markdown/nested.py +252 -0
- motui-1.0.0/src/motui/widgets/markdown/tables.py +113 -0
- motui-1.0.0/src/motui/widgets/palette.py +145 -0
- motui-1.0.0/src/motui/widgets/progress.py +96 -0
- motui-1.0.0/src/motui/widgets/radio.py +221 -0
- motui-1.0.0/src/motui/widgets/shortcutbar.py +74 -0
- motui-1.0.0/src/motui/widgets/slider.py +249 -0
- motui-1.0.0/src/motui/widgets/spinner.py +60 -0
- motui-1.0.0/src/motui/widgets/statusline.py +111 -0
- motui-1.0.0/src/motui/widgets/syntax.py +566 -0
- motui-1.0.0/src/motui/widgets/table.py +698 -0
- motui-1.0.0/src/motui/widgets/tabs.py +240 -0
- motui-1.0.0/src/motui/widgets/textbuf.py +813 -0
- motui-1.0.0/src/motui/widgets/tree.py +403 -0
- motui-1.0.0/tests/_doubles.py +83 -0
- motui-1.0.0/tests/golden/README.md +20 -0
- motui-1.0.0/tests/golden/pages/action.txt +71 -0
- motui-1.0.0/tests/golden/pages/choice.txt +71 -0
- motui-1.0.0/tests/golden/pages/chrome.txt +71 -0
- motui-1.0.0/tests/golden/pages/content.txt +71 -0
- motui-1.0.0/tests/golden/pages/data.txt +71 -0
- motui-1.0.0/tests/golden/pages/feedback.txt +71 -0
- motui-1.0.0/tests/golden/pages/input.txt +71 -0
- motui-1.0.0/tests/golden/pages/layout.txt +71 -0
- motui-1.0.0/tests/golden/pages/overview.txt +71 -0
- motui-1.0.0/tests/golden/pages/streaming.txt +71 -0
- motui-1.0.0/tests/golden/pages/styles.txt +71 -0
- motui-1.0.0/tests/test_ansi.py +135 -0
- motui-1.0.0/tests/test_api_doc.py +94 -0
- motui-1.0.0/tests/test_api_root.py +195 -0
- motui-1.0.0/tests/test_app.py +936 -0
- motui-1.0.0/tests/test_block.py +91 -0
- motui-1.0.0/tests/test_chrome.py +1155 -0
- motui-1.0.0/tests/test_container_hit.py +175 -0
- motui-1.0.0/tests/test_core_text.py +860 -0
- motui-1.0.0/tests/test_decoder_fuzz.py +157 -0
- motui-1.0.0/tests/test_demo_protocol.py +503 -0
- motui-1.0.0/tests/test_focus.py +466 -0
- motui-1.0.0/tests/test_frame.py +955 -0
- motui-1.0.0/tests/test_gesture.py +745 -0
- motui-1.0.0/tests/test_golden_frames.py +110 -0
- motui-1.0.0/tests/test_keys.py +291 -0
- motui-1.0.0/tests/test_keys_sources.py +422 -0
- motui-1.0.0/tests/test_packaging.py +102 -0
- motui-1.0.0/tests/test_painter.py +266 -0
- motui-1.0.0/tests/test_pointer.py +331 -0
- motui-1.0.0/tests/test_readme_examples.py +202 -0
- motui-1.0.0/tests/test_render_invariants.py +157 -0
- motui-1.0.0/tests/test_screen.py +247 -0
- motui-1.0.0/tests/test_search.py +250 -0
- motui-1.0.0/tests/test_selection.py +302 -0
- motui-1.0.0/tests/test_style.py +146 -0
- motui-1.0.0/tests/test_theme.py +164 -0
- motui-1.0.0/tests/test_viewport.py +363 -0
- motui-1.0.0/tests/test_widgets_action.py +301 -0
- motui-1.0.0/tests/test_widgets_autocomplete.py +147 -0
- motui-1.0.0/tests/test_widgets_basics.py +720 -0
- motui-1.0.0/tests/test_widgets_choice.py +338 -0
- motui-1.0.0/tests/test_widgets_containers.py +244 -0
- motui-1.0.0/tests/test_widgets_diff.py +145 -0
- motui-1.0.0/tests/test_widgets_editing.py +997 -0
- motui-1.0.0/tests/test_widgets_forms.py +369 -0
- motui-1.0.0/tests/test_widgets_list.py +271 -0
- motui-1.0.0/tests/test_widgets_markdown.py +713 -0
- motui-1.0.0/tests/test_widgets_palette.py +233 -0
- motui-1.0.0/tests/test_widgets_statusline.py +134 -0
- motui-1.0.0/tests/test_widgets_syntax.py +378 -0
- motui-1.0.0/tests/test_widgets_table.py +596 -0
- motui-1.0.0/tools/apidoc.py +348 -0
- motui-1.0.0/tools/framebench.py +219 -0
- motui-1.0.0/tools/golden.py +151 -0
- motui-1.0.0/uv.lock +151 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# The gate, on both platforms, on every push and pull request.
|
|
2
|
+
#
|
|
3
|
+
# One interpreter (3.12, the package's floor), one pinned uv (the version
|
|
4
|
+
# the group's agents ran the local gates with), and the spec's gate lines:
|
|
5
|
+
# pytest, framebench, the golden check and the two piped demo runs. The
|
|
6
|
+
# lines a shell would spell differently are the redirect (``< /dev/null`` /
|
|
7
|
+
# ``< NUL``) and the framebench pipe (its output kept in the log while the
|
|
8
|
+
# hash line is checked), so those two steps carry a small ``python -c``
|
|
9
|
+
# wrapper instead of branching on ``runner.os``: one spelling, every shell.
|
|
10
|
+
|
|
11
|
+
name: ci
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
pull_request:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
name: ${{ matrix.os }}
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
os: [ubuntu-latest, windows-latest]
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
|
|
35
|
+
- name: uv, pinned to the dev toolchain
|
|
36
|
+
uses: astral-sh/setup-uv@v5
|
|
37
|
+
with:
|
|
38
|
+
version: "0.12.21"
|
|
39
|
+
|
|
40
|
+
- name: install -- the lock is the dependency set, CI does not drift it
|
|
41
|
+
run: uv sync --locked
|
|
42
|
+
|
|
43
|
+
- name: pytest
|
|
44
|
+
run: uv run pytest -q
|
|
45
|
+
|
|
46
|
+
- name: framebench -- exit 0 and the render-hash line present
|
|
47
|
+
# The digest's *value* is not asserted: it is a property of the
|
|
48
|
+
# machine's rendering, and a moved hash is a finding for a human,
|
|
49
|
+
# not a red CI. The exit code and the line's presence are asserted.
|
|
50
|
+
run: |
|
|
51
|
+
uv run python -c "import re, subprocess, sys; done = subprocess.run([sys.executable, 'tools/framebench.py'], capture_output=True, text=True); sys.stdout.write(done.stdout); sys.stderr.write(done.stderr); raise SystemExit(0 if done.returncode == 0 and re.search(r'^render-hash : [0-9a-f]{64}$', done.stdout, re.M) else 1)"
|
|
52
|
+
|
|
53
|
+
- name: golden frames -- every page byte for byte
|
|
54
|
+
run: uv run python tools/golden.py --check
|
|
55
|
+
|
|
56
|
+
- name: demo -- the piped replay, stdin on the null device
|
|
57
|
+
# ``< /dev/null`` is bash's spelling and ``< NUL`` is cmd's;
|
|
58
|
+
# PowerShell has no redirection operator at all. The wrapper is the
|
|
59
|
+
# one spelling all three shells run, so the step needs no branch.
|
|
60
|
+
run: |
|
|
61
|
+
uv run python -c "import subprocess, sys; raise SystemExit(subprocess.run([sys.executable, '-m', 'motui'], stdin=subprocess.DEVNULL).returncode)"
|
|
62
|
+
|
|
63
|
+
- name: demo -- every page dumped
|
|
64
|
+
run: uv run python -m motui --pages
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Releases: a ``v*`` tag builds the package and publishes it.
|
|
2
|
+
#
|
|
3
|
+
# Written now, run later: this group ships the file configured and does not
|
|
4
|
+
# push, tag or execute it -- the first real run is the maintainer's call.
|
|
5
|
+
#
|
|
6
|
+
# Publishing is PyPI **trusted publishing** (an OIDC exchange, no API token):
|
|
7
|
+
# there are no secrets in this repository. The one-time setup lives on PyPI:
|
|
8
|
+
# add a publisher (or a "pending publisher") for this repository and this
|
|
9
|
+
# workflow file, and give it the environment name spelled below -- ``pypi``.
|
|
10
|
+
# The job's ``environment:`` must match that name exactly; the job-level
|
|
11
|
+
# ``id-token: write`` is what lets the publish step mint the token PyPI
|
|
12
|
+
# verifies. Change the name here if the publisher is configured with
|
|
13
|
+
# another one; nothing else in this file needs touching.
|
|
14
|
+
#
|
|
15
|
+
# The matrix builds on both platforms -- the cross-platform proof -- and the
|
|
16
|
+
# wheel is pure Python (``py3-none-any``), so exactly one upload happens:
|
|
17
|
+
# the Linux leg's. A run of this workflow without the publisher configured
|
|
18
|
+
# fails at the last step and publishes nothing.
|
|
19
|
+
|
|
20
|
+
name: release
|
|
21
|
+
|
|
22
|
+
on:
|
|
23
|
+
push:
|
|
24
|
+
tags: ["v*"]
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
release:
|
|
31
|
+
name: ${{ matrix.os }}
|
|
32
|
+
runs-on: ${{ matrix.os }}
|
|
33
|
+
# The environment name PyPI's trusted publisher must carry (see above).
|
|
34
|
+
# It gates the whole job -- the Windows leg included, deliberately: the
|
|
35
|
+
# two legs are one release.
|
|
36
|
+
environment: pypi
|
|
37
|
+
permissions:
|
|
38
|
+
contents: read
|
|
39
|
+
id-token: write
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
os: [ubuntu-latest, windows-latest]
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.12"
|
|
50
|
+
|
|
51
|
+
- name: uv, pinned to the dev toolchain
|
|
52
|
+
uses: astral-sh/setup-uv@v5
|
|
53
|
+
with:
|
|
54
|
+
version: "0.12.21"
|
|
55
|
+
|
|
56
|
+
- name: build -- the sdist and the wheel, from the locked tree
|
|
57
|
+
run: uv build
|
|
58
|
+
|
|
59
|
+
- name: publish to PyPI -- trusted publishing, one upload
|
|
60
|
+
if: runner.os == 'Linux'
|
|
61
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
motui-1.0.0/.gitignore
ADDED
motui-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shingwha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|