functui 0.0.4__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.
Files changed (67) hide show
  1. functui-0.0.4/.gitignore +32 -0
  2. functui-0.0.4/.readthedocs.yml +23 -0
  3. functui-0.0.4/LICENSE.txt +21 -0
  4. functui-0.0.4/PKG-INFO +50 -0
  5. functui-0.0.4/README.md +18 -0
  6. functui-0.0.4/docs/Makefile +20 -0
  7. functui-0.0.4/docs/build_and_run.bash +6 -0
  8. functui-0.0.4/docs/conf.py +43 -0
  9. functui-0.0.4/docs/index.rst +83 -0
  10. functui-0.0.4/docs/make.bat +35 -0
  11. functui-0.0.4/docs/reference/classes.rst +7 -0
  12. functui-0.0.4/docs/reference/common.rst +7 -0
  13. functui-0.0.4/docs/reference/flex.rst +7 -0
  14. functui-0.0.4/docs/reference/index.rst +12 -0
  15. functui-0.0.4/docs/reference/io.ansi.rst +6 -0
  16. functui-0.0.4/docs/reference/io.curses.rst +6 -0
  17. functui-0.0.4/docs/reference/io.html.rst +6 -0
  18. functui-0.0.4/docs/reference/io.index.rst +11 -0
  19. functui-0.0.4/docs/reference/io.raw.rst +6 -0
  20. functui-0.0.4/docs/reference/nav.rst +6 -0
  21. functui-0.0.4/docs/reference/rich_text.rst +5 -0
  22. functui-0.0.4/docs/requirements.txt +2 -0
  23. functui-0.0.4/docs/user_guide/examples.rst +76 -0
  24. functui-0.0.4/docs/user_guide/glossary.rst +37 -0
  25. functui-0.0.4/docs/user_guide/index.rst +10 -0
  26. functui-0.0.4/docs/user_guide/interactivity.rst +213 -0
  27. functui-0.0.4/docs/user_guide/introduction.rst +181 -0
  28. functui-0.0.4/docs/user_guide/io.rst +117 -0
  29. functui-0.0.4/docs/user_guide/keycodes.rst +110 -0
  30. functui-0.0.4/docs/user_guide/nav.rst +231 -0
  31. functui-0.0.4/docs/user_guide/nodes.rst +120 -0
  32. functui-0.0.4/docs/user_guide/styling.rst +320 -0
  33. functui-0.0.4/examples/color.py +92 -0
  34. functui-0.0.4/examples/curses_elm_print_input.py +72 -0
  35. functui-0.0.4/examples/curses_elm_template.py +61 -0
  36. functui-0.0.4/examples/elm_counter_app.py +39 -0
  37. functui-0.0.4/examples/elm_multiple_interactibles.py +69 -0
  38. functui-0.0.4/examples/elm_print_input.py +71 -0
  39. functui-0.0.4/examples/elm_template.py +61 -0
  40. functui-0.0.4/examples/todo.py +223 -0
  41. functui-0.0.4/examples/visual_demo.py +80 -0
  42. functui-0.0.4/pyproject.toml +66 -0
  43. functui-0.0.4/src/functui/__init__.py +5 -0
  44. functui-0.0.4/src/functui/canvas.py +194 -0
  45. functui-0.0.4/src/functui/classes.py +962 -0
  46. functui-0.0.4/src/functui/color_data.py +270 -0
  47. functui-0.0.4/src/functui/common.py +1003 -0
  48. functui-0.0.4/src/functui/flex.py +348 -0
  49. functui-0.0.4/src/functui/grid.py +58 -0
  50. functui-0.0.4/src/functui/io/__init__.py +0 -0
  51. functui-0.0.4/src/functui/io/_xterm_escape_data.py +305 -0
  52. functui-0.0.4/src/functui/io/_xterm_parser.py +124 -0
  53. functui-0.0.4/src/functui/io/ansi.py +99 -0
  54. functui-0.0.4/src/functui/io/curses.py +324 -0
  55. functui-0.0.4/src/functui/io/html.py +97 -0
  56. functui-0.0.4/src/functui/io/raw.py +380 -0
  57. functui-0.0.4/src/functui/nav.py +731 -0
  58. functui-0.0.4/src/functui/resizable_split.py +97 -0
  59. functui-0.0.4/src/functui/rich_text.py +335 -0
  60. functui-0.0.4/src/functui/textfield.py +85 -0
  61. functui-0.0.4/tests/__init__.py +0 -0
  62. functui-0.0.4/tests/test_cache.py +96 -0
  63. functui-0.0.4/tests/test_color.py +26 -0
  64. functui-0.0.4/tests/test_flex.py +164 -0
  65. functui-0.0.4/tests/test_nav.py +175 -0
  66. functui-0.0.4/tests/test_performance.py +149 -0
  67. functui-0.0.4/tests/test_rich_text.py +226 -0
@@ -0,0 +1,32 @@
1
+ # environemt and packaging
2
+ .venv
3
+ .env
4
+ node_modules
5
+ package.json
6
+ package-lock.json
7
+
8
+ # profiling data
9
+ .codspeed
10
+ perf
11
+ **.prof
12
+
13
+
14
+ # build data
15
+ build/
16
+ _build/
17
+ docs/_build
18
+ **.egg-info
19
+ dist/
20
+
21
+ *.pyc
22
+ **__pycache__
23
+ **.pytest_cache
24
+
25
+ # others
26
+ foo.py
27
+ bar.py
28
+ baz.py
29
+
30
+ foo.md
31
+ bar.md
32
+ baz.md
@@ -0,0 +1,23 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Build documentation in the docs/ directory with Sphinx
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ # Optionally build your docs in additional formats such as PDF and ePub
12
+ formats: all
13
+
14
+ build:
15
+ os: "ubuntu-24.04"
16
+ tools:
17
+ python: "3.14"
18
+
19
+ python:
20
+ install:
21
+ - requirements: docs/requirements.txt
22
+ - method: pip
23
+ path: .
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Viacheslav Andrushenko
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.
functui-0.0.4/PKG-INFO ADDED
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: functui
3
+ Version: 0.0.4
4
+ Summary: Immediate mode TUI library.
5
+ Author: Viacheslav Andrushenko
6
+ License-Expression: MIT
7
+ License-File: LICENSE.txt
8
+ Classifier: Development Status :: 2 - Pre-Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
14
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 11
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Typing :: Typed
21
+ Requires-Python: >=3.14
22
+ Requires-Dist: wcwidth
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest; extra == 'dev'
25
+ Requires-Dist: pytest-codspeed; extra == 'dev'
26
+ Requires-Dist: snakeviz; extra == 'dev'
27
+ Provides-Extra: doc
28
+ Requires-Dist: furo; extra == 'doc'
29
+ Requires-Dist: sphinx; extra == 'doc'
30
+ Requires-Dist: sphinx-autobuild; extra == 'doc'
31
+ Description-Content-Type: text/markdown
32
+
33
+ > [!WARNING]
34
+ > This library is in early development and the API **will** change.
35
+
36
+ Functui is a python library for creating immediate mode text user interfaces.
37
+
38
+ Documentation can be found at [readthedocs](https://functui.readthedocs.io/en/latest/index.html).
39
+
40
+ To run the examples, you need to install this library as a python package.
41
+
42
+ ```bash
43
+ # (assuming a bash shell and being in the cloned directory)
44
+
45
+ python3 -m venv .venv # create virtual environment
46
+ source .venv/bin/activate # activate virtual environment
47
+
48
+ pip install . # install library as a package in virtual environment
49
+ ```
50
+
@@ -0,0 +1,18 @@
1
+ > [!WARNING]
2
+ > This library is in early development and the API **will** change.
3
+
4
+ Functui is a python library for creating immediate mode text user interfaces.
5
+
6
+ Documentation can be found at [readthedocs](https://functui.readthedocs.io/en/latest/index.html).
7
+
8
+ To run the examples, you need to install this library as a python package.
9
+
10
+ ```bash
11
+ # (assuming a bash shell and being in the cloned directory)
12
+
13
+ python3 -m venv .venv # create virtual environment
14
+ source .venv/bin/activate # activate virtual environment
15
+
16
+ pip install . # install library as a package in virtual environment
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,6 @@
1
+ rm -r _build/html
2
+ rm -r _build/doctest
3
+ make doctest
4
+ make html
5
+ firefox _build/html/index.html
6
+
@@ -0,0 +1,43 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ import os
7
+ import sys
8
+ sys.path.insert(0, os.path.abspath('..'))
9
+
10
+ # -- Project information -----------------------------------------------------
11
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
12
+
13
+ project = 'functui'
14
+ copyright = '2025, Slsv15'
15
+ author = 'Slsv15'
16
+
17
+ # -- General configuration ---------------------------------------------------
18
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
19
+
20
+ extensions = [
21
+ 'sphinx.ext.intersphinx',
22
+ 'sphinx.ext.autodoc',
23
+ 'sphinx.ext.napoleon',
24
+ 'sphinx.ext.todo',
25
+ 'sphinx.ext.doctest',
26
+ 'sphinx.ext.autosummary',
27
+ 'sphinx.ext.viewcode',
28
+ ]
29
+
30
+ templates_path = ['_templates']
31
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
32
+ intersphinx_mapping = {
33
+ 'python': ('https://docs.python.org/3', None)
34
+ }
35
+
36
+
37
+ # -- Options for HTML output -------------------------------------------------
38
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
39
+ # html_theme = 'pydata_sphinx_theme'
40
+ html_theme = 'furo'
41
+ html_static_path = ['_static']
42
+ html_theme_options = {"show_toc_level": 2}
43
+ # html_use_modindex = True
@@ -0,0 +1,83 @@
1
+ functui documentation
2
+ =====================
3
+
4
+ .. raw:: html
5
+
6
+ <pre style="font-family:monospace">
7
+ ┌Colors──────────────────────────────────────────────────────────────────────────────────────────────┐
8
+ │ <span style="color:#008000">4 bit</span> <span style="color:#ffffff; background-color:#000000"> 16 </span><span style="color:#ffffff; background-color:#00005f"> 17 </span><span style="color:#ffffff; background-color:#000087"> 18 </span><span style="color:#ffffff; background-color:#0000af"> 19 </span><span style="color:#ffffff; background-color:#0000d7"> 20 </span><span style="color:#ffffff; background-color:#0000ff"> 21 </span><span style="color:#ffffff; background-color:#005f00"> 22 </span><span style="color:#ffffff; background-color:#005f5f"> 23 </span><span style="color:#ffffff; background-color:#005f87"> 24 </span><span style="color:#ffffff; background-color:#005faf"> 25 </span><span style="color:#ffffff; background-color:#005fd7"> 26 </span><span style="color:#ffffff; background-color:#005fff"> 27 </span><span style="color:#ffffff; background-color:#008700"> 28 </span><span style="color:#ffffff; background-color:#00875f"> 29 </span><span style="color:#ffffff; background-color:#008787"> 30 </span><span style="color:#ffffff; background-color:#0087af"> 31 </span><span style="color:#ffffff; background-color:#0087d7"> 32 </span><span style="color:#ffffff; background-color:#0087ff"> 33 </span>│
9
+ │ <span style="color:#00d7ff">8 bit</span> <span style="color:#ffffff; background-color:#5f0000"> 52 </span><span style="color:#ffffff; background-color:#5f005f"> 53 </span><span style="color:#ffffff; background-color:#5f0087"> 54 </span><span style="color:#ffffff; background-color:#5f00af"> 55 </span><span style="color:#ffffff; background-color:#5f00d7"> 56 </span><span style="color:#ffffff; background-color:#5f00ff"> 57 </span><span style="color:#ffffff; background-color:#5f5f00"> 58 </span><span style="color:#ffffff; background-color:#5f5f5f"> 59 </span><span style="color:#ffffff; background-color:#5f5f87"> 60 </span><span style="color:#ffffff; background-color:#5f5faf"> 61 </span><span style="color:#ffffff; background-color:#5f5fd7"> 62 </span><span style="color:#ffffff; background-color:#5f5fff"> 63 </span><span style="color:#ffffff; background-color:#5f8700"> 64 </span><span style="color:#ffffff; background-color:#5f875f"> 65 </span><span style="color:#ffffff; background-color:#5f8787"> 66 </span><span style="color:#ffffff; background-color:#5f87af"> 67 </span><span style="color:#ffffff; background-color:#5f87d7"> 68 </span><span style="color:#ffffff; background-color:#5f87ff"> 69 </span>│
10
+ │ <span style="color:#ff0000">True</span> <span style="color:#ffffff; background-color:#870000"> 88 </span><span style="color:#ffffff; background-color:#87005f"> 89 </span><span style="color:#ffffff; background-color:#870087"> 90 </span><span style="color:#ffffff; background-color:#8700af"> 91 </span><span style="color:#ffffff; background-color:#8700d7"> 92 </span><span style="color:#ffffff; background-color:#8700ff"> 93 </span><span style="color:#ffffff; background-color:#875f00"> 94 </span><span style="color:#ffffff; background-color:#875f5f"> 95 </span><span style="color:#ffffff; background-color:#875f87"> 96 </span><span style="color:#ffffff; background-color:#875faf"> 97 </span><span style="color:#ffffff; background-color:#875fd7"> 98 </span><span style="color:#ffffff; background-color:#875fff"> 99 </span><span style="color:#ffffff; background-color:#878700"> 100 </span><span style="color:#ffffff; background-color:#87875f"> 101 </span><span style="color:#ffffff; background-color:#878787"> 102 </span><span style="color:#ffffff; background-color:#8787af"> 103 </span><span style="color:#ffffff; background-color:#8787d7"> 104 </span><span style="color:#ffffff; background-color:#8787ff"> 105 </span>│
11
+ │ <span style="color:#ff0000">color</span> <span style="color:#ffffff; background-color:#af0000"> 124 </span><span style="color:#ffffff; background-color:#af005f"> 125 </span><span style="color:#ffffff; background-color:#af0087"> 126 </span><span style="color:#ffffff; background-color:#af00af"> 127 </span><span style="color:#ffffff; background-color:#af00d7"> 128 </span><span style="color:#ffffff; background-color:#af00ff"> 129 </span><span style="color:#ffffff; background-color:#af5f00"> 130 </span><span style="color:#ffffff; background-color:#af5f5f"> 131 </span><span style="color:#ffffff; background-color:#af5f87"> 132 </span><span style="color:#ffffff; background-color:#af5faf"> 133 </span><span style="color:#ffffff; background-color:#af5fd7"> 134 </span><span style="color:#ffffff; background-color:#af5fff"> 135 </span><span style="color:#ffffff; background-color:#af8700"> 136 </span><span style="color:#ffffff; background-color:#af875f"> 137 </span><span style="color:#ffffff; background-color:#af8787"> 138 </span><span style="color:#ffffff; background-color:#af87af"> 139 </span><span style="color:#ffffff; background-color:#af87d7"> 140 </span><span style="color:#ffffff; background-color:#af87ff"> 141 </span>│
12
+ │ <span style="color:#ffffff; background-color:#d70000"> 160 </span><span style="color:#ffffff; background-color:#d7005f"> 161 </span><span style="color:#ffffff; background-color:#d70087"> 162 </span><span style="color:#ffffff; background-color:#d700af"> 163 </span><span style="color:#ffffff; background-color:#d700d7"> 164 </span><span style="color:#ffffff; background-color:#d700ff"> 165 </span><span style="color:#ffffff; background-color:#d75f00"> 166 </span><span style="color:#ffffff; background-color:#d75f5f"> 167 </span><span style="color:#ffffff; background-color:#d75f87"> 168 </span><span style="color:#ffffff; background-color:#d75faf"> 169 </span><span style="color:#ffffff; background-color:#d75fd7"> 170 </span><span style="color:#ffffff; background-color:#d75fff"> 171 </span><span style="color:#ffffff; background-color:#d78700"> 172 </span><span style="color:#ffffff; background-color:#d7875f"> 173 </span><span style="color:#ffffff; background-color:#d78787"> 174 </span><span style="color:#ffffff; background-color:#d787af"> 175 </span><span style="color:#ffffff; background-color:#d787d7"> 176 </span><span style="color:#ffffff; background-color:#d787ff"> 177 </span>│
13
+ │ <span style="color:#ffffff; background-color:#ff0000"> 196 </span><span style="color:#ffffff; background-color:#ff005f"> 197 </span><span style="color:#ffffff; background-color:#ff0087"> 198 </span><span style="color:#ffffff; background-color:#ff00af"> 199 </span><span style="color:#ffffff; background-color:#ff00d7"> 200 </span><span style="color:#ffffff; background-color:#ff00ff"> 201 </span><span style="color:#ffffff; background-color:#ff5f00"> 202 </span><span style="color:#ffffff; background-color:#ff5f5f"> 203 </span><span style="color:#ffffff; background-color:#ff5f87"> 204 </span><span style="color:#ffffff; background-color:#ff5faf"> 205 </span><span style="color:#ffffff; background-color:#ff5fd7"> 206 </span><span style="color:#ffffff; background-color:#ff5fff"> 207 </span><span style="color:#ffffff; background-color:#ff8700"> 208 </span><span style="color:#ffffff; background-color:#ff875f"> 209 </span><span style="color:#ffffff; background-color:#ff8787"> 210 </span><span style="color:#ffffff; background-color:#ff87af"> 211 </span><span style="color:#ffffff; background-color:#ff87d7"> 212 </span><span style="color:#ffffff; background-color:#ff87ff"> 213 </span>│
14
+ │ <span style="color:#000000; background-color:#00af00"> 34 </span><span style="color:#000000; background-color:#00af5f"> 35 </span><span style="color:#000000; background-color:#00af87"> 36 </span><span style="color:#000000; background-color:#00afaf"> 37 </span><span style="color:#000000; background-color:#00afd7"> 38 </span><span style="color:#000000; background-color:#00afff"> 39 </span><span style="color:#000000; background-color:#00d700"> 40 </span><span style="color:#000000; background-color:#00d75f"> 41 </span><span style="color:#000000; background-color:#00d787"> 42 </span><span style="color:#000000; background-color:#00d7af"> 43 </span><span style="color:#000000; background-color:#00d7d7"> 44 </span><span style="color:#000000; background-color:#00d7ff"> 45 </span><span style="color:#000000; background-color:#00ff00"> 46 </span><span style="color:#000000; background-color:#00ff5f"> 47 </span><span style="color:#000000; background-color:#00ff87"> 48 </span><span style="color:#000000; background-color:#00ffaf"> 49 </span><span style="color:#000000; background-color:#00ffd7"> 50 </span><span style="color:#000000; background-color:#00ffff"> 51 </span>│
15
+ │ <span style="color:#000000; background-color:#5faf00"> 70 </span><span style="color:#000000; background-color:#5faf5f"> 71 </span><span style="color:#000000; background-color:#5faf87"> 72 </span><span style="color:#000000; background-color:#5fafaf"> 73 </span><span style="color:#000000; background-color:#5fafd7"> 74 </span><span style="color:#000000; background-color:#5fafff"> 75 </span><span style="color:#000000; background-color:#5fd700"> 76 </span><span style="color:#000000; background-color:#5fd75f"> 77 </span><span style="color:#000000; background-color:#5fd787"> 78 </span><span style="color:#000000; background-color:#5fd7af"> 79 </span><span style="color:#000000; background-color:#5fd7d7"> 80 </span><span style="color:#000000; background-color:#5fd7ff"> 81 </span><span style="color:#000000; background-color:#5fff00"> 82 </span><span style="color:#000000; background-color:#5fff5f"> 83 </span><span style="color:#000000; background-color:#5fff87"> 84 </span><span style="color:#000000; background-color:#5fffaf"> 85 </span><span style="color:#000000; background-color:#5fffd7"> 86 </span><span style="color:#000000; background-color:#5fffff"> 87 </span>│
16
+ │ <span style="color:#000000; background-color:#87af00"> 106 </span><span style="color:#000000; background-color:#87af5f"> 107 </span><span style="color:#000000; background-color:#87af87"> 108 </span><span style="color:#000000; background-color:#87afaf"> 109 </span><span style="color:#000000; background-color:#87afd7"> 110 </span><span style="color:#000000; background-color:#87afff"> 111 </span><span style="color:#000000; background-color:#87d700"> 112 </span><span style="color:#000000; background-color:#87d75f"> 113 </span><span style="color:#000000; background-color:#87d787"> 114 </span><span style="color:#000000; background-color:#87d7af"> 115 </span><span style="color:#000000; background-color:#87d7d7"> 116 </span><span style="color:#000000; background-color:#87d7ff"> 117 </span><span style="color:#000000; background-color:#87ff00"> 118 </span><span style="color:#000000; background-color:#87ff5f"> 119 </span><span style="color:#000000; background-color:#87ff87"> 120 </span><span style="color:#000000; background-color:#87ffaf"> 121 </span><span style="color:#000000; background-color:#87ffd7"> 122 </span><span style="color:#000000; background-color:#87ffff"> 123 </span>│
17
+ │ <span style="color:#000000; background-color:#afaf00"> 142 </span><span style="color:#000000; background-color:#afaf5f"> 143 </span><span style="color:#000000; background-color:#afaf87"> 144 </span><span style="color:#000000; background-color:#afafaf"> 145 </span><span style="color:#000000; background-color:#afafd7"> 146 </span><span style="color:#000000; background-color:#afafff"> 147 </span><span style="color:#000000; background-color:#afd700"> 148 </span><span style="color:#000000; background-color:#afd75f"> 149 </span><span style="color:#000000; background-color:#afd787"> 150 </span><span style="color:#000000; background-color:#afd7af"> 151 </span><span style="color:#000000; background-color:#afd7d7"> 152 </span><span style="color:#000000; background-color:#afd7ff"> 153 </span><span style="color:#000000; background-color:#afff00"> 154 </span><span style="color:#000000; background-color:#afff5f"> 155 </span><span style="color:#000000; background-color:#afff87"> 156 </span><span style="color:#000000; background-color:#afffaf"> 157 </span><span style="color:#000000; background-color:#afffd7"> 158 </span><span style="color:#000000; background-color:#afffff"> 159 </span>│
18
+ │ <span style="color:#000000; background-color:#d7af00"> 178 </span><span style="color:#000000; background-color:#d7af5f"> 179 </span><span style="color:#000000; background-color:#d7af87"> 180 </span><span style="color:#000000; background-color:#d7afaf"> 181 </span><span style="color:#000000; background-color:#d7afd7"> 182 </span><span style="color:#000000; background-color:#d7afff"> 183 </span><span style="color:#000000; background-color:#d7d700"> 184 </span><span style="color:#000000; background-color:#d7d75f"> 185 </span><span style="color:#000000; background-color:#d7d787"> 186 </span><span style="color:#000000; background-color:#d7d7af"> 187 </span><span style="color:#000000; background-color:#d7d7d7"> 188 </span><span style="color:#000000; background-color:#d7d7ff"> 189 </span><span style="color:#000000; background-color:#d7ff00"> 190 </span><span style="color:#000000; background-color:#d7ff5f"> 191 </span><span style="color:#000000; background-color:#d7ff87"> 192 </span><span style="color:#000000; background-color:#d7ffaf"> 193 </span><span style="color:#000000; background-color:#d7ffd7"> 194 </span><span style="color:#000000; background-color:#d7ffff"> 195 </span>│
19
+ │ <span style="color:#000000; background-color:#ffaf00"> 214 </span><span style="color:#000000; background-color:#ffaf5f"> 215 </span><span style="color:#000000; background-color:#ffaf87"> 216 </span><span style="color:#000000; background-color:#ffafaf"> 217 </span><span style="color:#000000; background-color:#ffafd7"> 218 </span><span style="color:#000000; background-color:#ffafff"> 219 </span><span style="color:#000000; background-color:#ffd700"> 220 </span><span style="color:#000000; background-color:#ffd75f"> 221 </span><span style="color:#000000; background-color:#ffd787"> 222 </span><span style="color:#000000; background-color:#ffd7af"> 223 </span><span style="color:#000000; background-color:#ffd7d7"> 224 </span><span style="color:#000000; background-color:#ffd7ff"> 225 </span><span style="color:#000000; background-color:#ffff00"> 226 </span><span style="color:#000000; background-color:#ffff5f"> 227 </span><span style="color:#000000; background-color:#ffff87"> 228 </span><span style="color:#000000; background-color:#ffffaf"> 229 </span><span style="color:#000000; background-color:#ffffd7"> 230 </span><span style="color:#000000; background-color:#ffffff"> 231 </span>│
20
+ └────────────────────────────────────────────────────────────────────────────────────────────────────┘
21
+ ┌Styles──────────────────────────────────────────────────────────────────────────────────────────────┐
22
+ │<b>BOLD</b> REVERSE <i>ITALIC</i> <u>UNDERLINE</u> <strike>STRIKE_THROUGH</strike> DIM │
23
+ └────────────────────────────────────────────────────────────────────────────────────────────────────┘
24
+ ┌Flexible Containers──────────────────────────────┐┌Flexible and Wrappable Containers────────────────┐
25
+ │ │ │ ││<span style="color:#000000">┌──────┐</span><span style="color:#800000">┌──────┐</span><span style="color:#008000">┌──────┐</span><span style="color:#808000">┌──────┐</span><span style="color:#000080">┌──────┐</span><span style="color:#800080">┌───────┐</span>│
26
+ │ flex │ flex_custom(2) │ no flex ││<span style="color:#000000">│</span> <span style="color:#000000">│</span><span style="color:#800000">│</span> <span style="color:#800000">│</span><span style="color:#008000">│</span> <span style="color:#008000">│</span><span style="color:#808000">│</span> <span style="color:#808000">│</span><span style="color:#000080">│</span> <span style="color:#000080">│</span><span style="color:#800080">│</span> <span style="color:#800080">│</span>│
27
+ │ │ │ ││<span style="color:#000000">│</span> flex <span style="color:#000000">│</span><span style="color:#800000">│</span> flex <span style="color:#800000">│</span><span style="color:#008000">│</span> flex <span style="color:#008000">│</span><span style="color:#808000">│</span> flex <span style="color:#808000">│</span><span style="color:#000080">│</span> flex <span style="color:#000080">│</span><span style="color:#800080">│</span> flex <span style="color:#800080">│</span>│
28
+ └─────────────────────────────────────────────────┘│<span style="color:#000000">│</span> <span style="color:#000000">│</span><span style="color:#800000">│</span> <span style="color:#800000">│</span><span style="color:#008000">│</span> <span style="color:#008000">│</span><span style="color:#808000">│</span> <span style="color:#808000">│</span><span style="color:#000080">│</span> <span style="color:#000080">│</span><span style="color:#800080">│</span> <span style="color:#800080">│</span>│
29
+ ┌Text wrapping────────────────────────────────────┐│<span style="color:#000000">└──────┘</span><span style="color:#800000">└──────┘</span><span style="color:#008000">└──────┘</span><span style="color:#808000">└──────┘</span><span style="color:#000080">└──────┘</span><span style="color:#800080">└───────┘</span>│
30
+ │ Lorem ipsum dolor sit amet, consectetur ││<span style="color:#008080">┌──────────┐</span><span style="color:#c0c0c0">┌──────────┐</span><span style="color:#808080">┌──────────┐</span><span style="color:#ff0000">┌───────────┐</span>│
31
+ │ adipiscing elit, sed do eiusmod tempor ││<span style="color:#008080">│</span> <span style="color:#008080">│</span><span style="color:#c0c0c0">│</span> <span style="color:#c0c0c0">│</span><span style="color:#808080">│</span> <span style="color:#808080">│</span><span style="color:#ff0000">│</span> <span style="color:#ff0000">│</span>│
32
+ │ incididunt ut labore et dolore magna aliqua. Ut ││<span style="color:#008080">│</span> flex <span style="color:#008080">│</span><span style="color:#c0c0c0">│</span> flex <span style="color:#c0c0c0">│</span><span style="color:#808080">│</span> flex <span style="color:#808080">│</span><span style="color:#ff0000">│</span> flex <span style="color:#ff0000">│</span>│
33
+ │ enim ad minim veniam, quis nostrud exercitation ││<span style="color:#008080">│</span> <span style="color:#008080">│</span><span style="color:#c0c0c0">│</span> <span style="color:#c0c0c0">│</span><span style="color:#808080">│</span> <span style="color:#808080">│</span><span style="color:#ff0000">│</span> <span style="color:#ff0000">│</span>│
34
+ │ ullamco laboris nisi ut aliquip ex ea commodo ││<span style="color:#008080">└──────────┘</span><span style="color:#c0c0c0">└──────────┘</span><span style="color:#808080">└──────────┘</span><span style="color:#ff0000">└───────────┘</span>│
35
+ │ consequat. Duis aute irure dolor in ││ │
36
+ │ reprehenderit in voluptate velit esse cillum ││ │
37
+ │ dolore eu fugiat nulla pariatur. Excepteur sint ││ │
38
+ │ occaecat cupidatat non proident, sunt in culpa ││ │
39
+ │ qui officia deserunt mollit anim id est ││ │
40
+ │ laborum. ││ │
41
+ │ ││ │
42
+ │ ││ │
43
+ │ ││ │
44
+ └─────────────────────────────────────────────────┘└─────────────────────────────────────────────────┘
45
+ </pre>
46
+
47
+ .. toctree::
48
+ :maxdepth: 1
49
+ :caption: User Guide
50
+
51
+ user_guide/introduction
52
+ user_guide/styling
53
+ user_guide/interactivity
54
+ user_guide/nav
55
+ user_guide/io
56
+
57
+
58
+ .. toctree::
59
+ :maxdepth: 1
60
+ :caption: Reference
61
+
62
+ reference/classes
63
+ reference/common
64
+ reference/flex
65
+ reference/rich_text
66
+ reference/nav
67
+ reference/io.index
68
+
69
+ .. toctree::
70
+ :maxdepth: 1
71
+ :caption: Appendix
72
+
73
+ user_guide/nodes
74
+ user_guide/glossary
75
+ user_guide/keycodes
76
+ user_guide/examples
77
+
78
+
79
+ .. toctree::
80
+ :maxdepth: 1
81
+ :caption: Project
82
+
83
+ GitHub <https://github.com/Slsv1/functui>
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,7 @@
1
+ ``functui.classes``
2
+ ===================
3
+
4
+
5
+ .. automodule:: functui.classes
6
+ :members:
7
+
@@ -0,0 +1,7 @@
1
+ ``functui.common``
2
+ ==================
3
+
4
+ .. automodule:: functui.common
5
+ :members:
6
+
7
+
@@ -0,0 +1,7 @@
1
+ ``functui.flex``
2
+ ================
3
+
4
+ .. automodule:: functui.flex
5
+ :members:
6
+
7
+
@@ -0,0 +1,12 @@
1
+ Api Reference
2
+ =============
3
+
4
+
5
+
6
+ .. toctree::
7
+ :caption: Classes
8
+ :maxdepth: 3
9
+
10
+ classes
11
+
12
+
@@ -0,0 +1,6 @@
1
+ ``functui.io.ansi``
2
+ ===================
3
+
4
+ .. automodule:: functui.io.ansi
5
+ :members:
6
+
@@ -0,0 +1,6 @@
1
+ ``functui.io.curses``
2
+ =====================
3
+
4
+ .. automodule:: functui.io.curses
5
+ :members:
6
+
@@ -0,0 +1,6 @@
1
+ ``functui.io.html``
2
+ ===================
3
+
4
+ .. automodule:: functui.io.html
5
+ :members:
6
+
@@ -0,0 +1,11 @@
1
+ ``functui.io``
2
+ ==============
3
+
4
+ .. toctree::
5
+ :maxdepth: 1
6
+ :caption: Modules
7
+
8
+ io.raw
9
+ io.ansi
10
+ io.curses
11
+ io.html
@@ -0,0 +1,6 @@
1
+ ``functui.io.raw``
2
+ =================
3
+
4
+ .. automodule:: functui.io.raw
5
+ :members:
6
+
@@ -0,0 +1,6 @@
1
+ ``functui.nav``
2
+ ===============
3
+
4
+
5
+ .. automodule:: functui.nav
6
+ :members:
@@ -0,0 +1,5 @@
1
+ ``functui.rich_text``
2
+ =========================
3
+
4
+ .. automodule:: functui.rich_text
5
+ :members:
@@ -0,0 +1,2 @@
1
+ furo
2
+ sphinx
@@ -0,0 +1,76 @@
1
+ Examples
2
+ ========
3
+
4
+ Layouting Examples
5
+ ------------------
6
+
7
+ .. _example_visual_demo:
8
+
9
+ Visual Demo
10
+ ~~~~~~~~~~~
11
+ .. literalinclude:: ../../examples/visual_demo.py
12
+
13
+
14
+ .. _example_color:
15
+
16
+ Color Capabilities Test
17
+ ~~~~~~~~~~~~~~~~~~~~~~~
18
+ .. literalinclude:: ../../examples/color.py
19
+
20
+ ----
21
+
22
+ .. _examples_elm:
23
+
24
+ Interactive examples using the elm architecture
25
+ -----------------------------------------------
26
+
27
+ .. _example_elm_template:
28
+
29
+ Template for ELM projects using raw IO
30
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
+ .. literalinclude:: ../../examples/elm_template.py
32
+
33
+
34
+ .. _example_elm_counter_app:
35
+
36
+ ELM Counter App with ansi IO
37
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38
+ .. literalinclude:: ../../examples/elm_counter_app.py
39
+
40
+
41
+
42
+ .. _example_multiple_interactibles:
43
+
44
+ Multiple interactibles with ELM
45
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
+ .. literalinclude:: ../../examples/elm_multiple_interactibles.py
47
+
48
+
49
+
50
+
51
+ .. _example_elm_print_input:
52
+
53
+ Print Input Event with ELM and curses
54
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
+ .. literalinclude:: ../../examples/elm_print_input.py
56
+
57
+
58
+ ----
59
+
60
+ .. _examples_curses_elm:
61
+
62
+ Interactive examples with elm and curses
63
+ ----------------------------------------
64
+
65
+ .. _example_curses_elm_template:
66
+
67
+ Template for ELM projects using curses IO
68
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
+ .. literalinclude:: ../../examples/curses_elm_template.py
70
+
71
+
72
+ .. _example_curses_elm_print_input:
73
+
74
+ Print Input Event with ELM and curses
75
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+ .. literalinclude:: ../../examples/curses_elm_print_input.py
@@ -0,0 +1,37 @@
1
+ Glossary
2
+ ========
3
+
4
+
5
+ .. glossary::
6
+
7
+ ``|``
8
+ A pipe.
9
+ An operator that passes the left operant into the function on the right.
10
+
11
+ node
12
+ A function that returns a :obj:`functui.classes.Layout`.
13
+
14
+ wrapper node
15
+ A type of node that both returns and takes in a layout as an argument.
16
+ Example wrapper nodes are :obj:`functui.common.border` and :obj:`functui.common.shrink`.
17
+
18
+ container node
19
+ A type of node that takes in multiple nodes. Names for container nodes often contain a 'box' suffix.
20
+ Example container nodes are :obj:`functui.common.vbox` and :obj:`functui.common.static_box`.
21
+
22
+ data node
23
+ A type of node that does not take in any child layouts.
24
+ Example data nodes are :obj:`functui.common.text` and :obj:`functui.common.vbar`.
25
+
26
+ child
27
+ In a layout, a child layout is a layout returned by a note to the right of the pipe (``|``).
28
+ In the layout ``text("foo") | border`` text is a child of border.
29
+
30
+ parent
31
+ In a layout, a parent layout is a layout returned by a note to the left of the pipe (``|``).
32
+ In the layout ``text("foo") | border`` border is a parent of text.
33
+
34
+ descendants
35
+ In a layout, descendants are layouts returned by nodes to the right of the pipe (``|``).
36
+ In the layout ``text("foo") | border | center`` text and border are descendants of center.
37
+
@@ -0,0 +1,10 @@
1
+ User Guide
2
+ ==========
3
+
4
+ .. toctree::
5
+ :maxdepth: 2
6
+ :caption: Contents
7
+
8
+ introduction
9
+ glossary
10
+ io