nannokit-diff 0.0.0__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.
nannokit/app.py ADDED
@@ -0,0 +1,29 @@
1
+
2
+ # supernanno/app.py
3
+ #
4
+ # Example of how the SuperNanno main App integrates with diff.
5
+ #
6
+ # The App must call DialogManager.attach(self) once — typically in on_mount.
7
+ # After that, diff works anywhere without passing `app` manually.
8
+
9
+ from textual.app import App, ComposeResult
10
+ from textual.widgets import Label
11
+ from diff.core.manager import DialogManager
12
+
13
+ class SuperNannoApp(App):
14
+ def on_mount(self) -> None:
15
+ DialogManager.attach(self)
16
+
17
+ def compose(self) -> ComposeResult:
18
+ yield Label("diff — Press D to run the example")
19
+
20
+ def on_key(self, event) -> None:
21
+ if event.key == "d":
22
+ self._demo_dialog()
23
+
24
+ def _demo_dialog(self) -> None:
25
+ def resposta(btn: str) -> None:
26
+ self.notify(f"User clicked a button")
27
+
28
+ if __name__ == "__main__":
29
+ SuperNannoApp().run()
nannokit/demo_app.py ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Heitor Bardemaker A. Bisneto
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.1
2
+ Name: nannokit-diff
3
+ Version: 0.0.0
4
+ Summary: Official diff extension for SuperNanno
5
+ Home-page: https://github.com/hbisneto/SuperNanno
6
+ Author: Heitor Bardemaker A. Bisneto
7
+ Author-email: bisnetoinc@gmail.com
8
+ License: BSD-3-Clause
9
+ Platform: UNKNOWN
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: User Interfaces
20
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
21
+ Classifier: Topic :: Text Editors
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: textual>=8.2.7
27
+
28
+ # NannoKit.diff
29
+
30
+ **Official diff extension for SuperNanno** — Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
31
+
32
+ NannoKit.diff provides clean, high-level APIs for common user interactions, inspired by modern desktop application patterns.
33
+
34
+ > Designed to integrate seamlessly into **SuperNanno** and work standalone in any Textual app.
35
+
36
+ ---
37
+
38
+ ## ✨ Features
39
+
40
+ - Automatic resolution of the running Textual `App` (no manual passing required in most cases)
41
+ - Full keyboard and mouse support
42
+ - Consistent behavior: Escape to cancel
43
+ - Internal composition between components
44
+ - Full test coverage with Textual Pilot
45
+ - Installable as a standalone package or as part of the SuperNanno ecosystem
46
+ - Modern and clean API design
47
+
48
+ ---
49
+
50
+ ## 📦 Installation
51
+
52
+ ```bash
53
+ pip install nannokit-diff
54
+ ```
55
+
56
+ To also install with SuperNanno (when available):
57
+
58
+ ```bash
59
+ pip install "nannokit-diff[supernanno]"
60
+ ```
61
+
62
+ ---
63
+
64
+ ## 🚀 Quick Start
65
+
66
+ ```python
67
+ from nannokit.diff import example_class_1, example_class_2
68
+ from pathlib import Path
69
+
70
+ # Example usage
71
+ example_class_1.show(
72
+ # parameters here
73
+ callback=lambda result: print("Result:", result),
74
+ )
75
+
76
+ # Another example
77
+ example_class_2.show(
78
+ title="Example Title",
79
+ callback=lambda value: print("Value:", value),
80
+ )
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Integration with SuperNanno
86
+
87
+ In your main `App` class, attach the manager once (recommended):
88
+
89
+ ```python
90
+ from textual.app import App
91
+ from nannokit.diff.core import manager_class
92
+
93
+ class SuperNannoApp(App):
94
+ def on_mount(self) -> None:
95
+ manager_class.attach(self)
96
+ # ... rest of your app
97
+ ```
98
+
99
+ After this setup, you can call any diff component from anywhere in your application.
100
+
101
+ ---
102
+
103
+ ## 📖 API
104
+
105
+ ### Main Components
106
+
107
+ - **`main_class_1.show(...)`** — Lorem ipsum dolor sit amet, consectetur adipiscing elit.
108
+ - **`main_class_2.show(...)`** — Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
109
+ - **`main_class_3.show(...)`** — Ut enim ad minim veniam, quis nostrud exercitation.
110
+
111
+ All components accept common parameters such as `title`, `initial_value`, `callback`, and `show_hidden`.
112
+
113
+ ### section_name
114
+
115
+ ```python
116
+ section_example
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Package Structure
122
+
123
+ ```
124
+ nannokit/diff/
125
+ ├── core/ # Shared manager, base classes and utilities
126
+ ├── module_1/ # module_1_description
127
+ ├── module_2/ # module_2_description
128
+ ├── module_3/ # module_3_description
129
+ └── styles/ # TCSS stylesheets
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Development
135
+
136
+ ```bash
137
+ # Install in editable mode with dev dependencies
138
+ pip install -e ".[dev]"
139
+
140
+ # Run tests
141
+ pytest
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Changelog
147
+
148
+ See [CHANGELOG.md](CHANGELOG.md) for recent changes (architecture refactor, bug fixes, new features, end-to-end tests, etc.).
149
+
150
+ ---
151
+
152
+ ## License
153
+
154
+ **BSD 3-Clause License** — see the [LICENSE](LICENSE) file for details.
155
+
156
+ ---
157
+
158
+ **Part of the [SuperNanno](https://github.com/hbisneto/SuperNanno) ecosystem.**
159
+
160
+ Built to make Textual application development even more powerful and enjoyable.
161
+
162
+ **Author:** Heitor Bardemaker A. Bisneto (@BisnetoDev)
163
+
164
+
@@ -0,0 +1,9 @@
1
+ nannokit/app.py,sha256=L29uWS-RU6DyNEFPlO40s-wnS8HmPZGyEqRYbhpOLYo,829
2
+ nannokit/demo_app.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ nannokit/diff/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ nannokit/diff/test_main.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
+ nannokit_diff-0.0.0.dist-info/LICENSE,sha256=-aU3JbMXTrQ_ZXSVMyeCyL7MkTtKOXY-Ztpfsz-4WDE,1515
6
+ nannokit_diff-0.0.0.dist-info/METADATA,sha256=FoYto6BpLMyp_zRcCoesbeVJ5UDb9Fc9CF4a_TF0ZPY,4232
7
+ nannokit_diff-0.0.0.dist-info/WHEEL,sha256=51RkbunBAw4BWsgaQWTpPhg4Diwp3c9P5iaLk67Hdtg,92
8
+ nannokit_diff-0.0.0.dist-info/top_level.txt,sha256=UXavXuOUaHoGN_BVGdnzlNFiOOuLXhK6J17vX-ePTlk,9
9
+ nannokit_diff-0.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.47.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ nannokit