haybale-studio 0.0.2__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.
- haybale_studio-0.0.2/.gitignore +205 -0
- haybale_studio-0.0.2/PKG-INFO +9 -0
- haybale_studio-0.0.2/haybale_studio/__init__.py +116 -0
- haybale_studio-0.0.2/haybale_studio/adapters/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/editors/__init__.py +15 -0
- haybale_studio-0.0.2/haybale_studio/editors/code_editor.py +445 -0
- haybale_studio-0.0.2/haybale_studio/editors/file_browser.py +374 -0
- haybale_studio-0.0.2/haybale_studio/editors/file_browser_menu/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/editors/file_browser_menu/actions.py +32 -0
- haybale_studio-0.0.2/haybale_studio/editors/file_browser_menu/provider.py +61 -0
- haybale_studio-0.0.2/haybale_studio/editors/file_viewer.py +182 -0
- haybale_studio-0.0.2/haybale_studio/editors/properties_editor.py +452 -0
- haybale_studio-0.0.2/haybale_studio/editors/terminal_editor.py +118 -0
- haybale_studio-0.0.2/haybale_studio/file_focus.py +34 -0
- haybale_studio-0.0.2/haybale_studio/focuses.py +26 -0
- haybale_studio-0.0.2/haybale_studio/nodes/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/panels/__init__.py +27 -0
- haybale_studio-0.0.2/haybale_studio/panels/app_panels.py +83 -0
- haybale_studio-0.0.2/haybale_studio/panels/canvas_settings.py +124 -0
- haybale_studio-0.0.2/haybale_studio/panels/context_menu/__init__.py +1 -0
- haybale_studio-0.0.2/haybale_studio/panels/context_menu/file_actions.py +122 -0
- haybale_studio-0.0.2/haybale_studio/panels/debug_panel.py +44 -0
- haybale_studio-0.0.2/haybale_studio/panels/execution_panel.py +41 -0
- haybale_studio-0.0.2/haybale_studio/py.typed +0 -0
- haybale_studio-0.0.2/haybale_studio/settings/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/settings/node_skin_settings.py +101 -0
- haybale_studio-0.0.2/haybale_studio/settings/theme_settings.py +45 -0
- haybale_studio-0.0.2/haybale_studio/skins/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/skins/default_skin.py +175 -0
- haybale_studio-0.0.2/haybale_studio/skins/error_skin.py +100 -0
- haybale_studio-0.0.2/haybale_studio/skins/node_skin.py +351 -0
- haybale_studio-0.0.2/haybale_studio/state/__init__.py +8 -0
- haybale_studio-0.0.2/haybale_studio/state/file_browser_state.py +30 -0
- haybale_studio-0.0.2/haybale_studio/themes/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/themes/node.py +28 -0
- haybale_studio-0.0.2/haybale_studio/themes/workbench.py +190 -0
- haybale_studio-0.0.2/haybale_studio/types/__init__.py +0 -0
- haybale_studio-0.0.2/haybale_studio/widgets/__init__.py +0 -0
- haybale_studio-0.0.2/pyproject.toml +27 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
**/.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
.idea/
|
|
169
|
+
|
|
170
|
+
# Abstra
|
|
171
|
+
# Abstra is an AI-powered process automation framework.
|
|
172
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
173
|
+
# Learn more at https://abstra.io/docs
|
|
174
|
+
.abstra/
|
|
175
|
+
|
|
176
|
+
# Visual Studio Code
|
|
177
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
178
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
179
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
180
|
+
# you could uncomment the following to ignore the enitre vscode folder
|
|
181
|
+
.vscode/
|
|
182
|
+
|
|
183
|
+
# Ruff stuff:
|
|
184
|
+
.ruff_cache/
|
|
185
|
+
|
|
186
|
+
# PyPI configuration file
|
|
187
|
+
.pypirc
|
|
188
|
+
|
|
189
|
+
# Cursor
|
|
190
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
191
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
192
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
193
|
+
.cursorignore
|
|
194
|
+
.cursorindexingignore
|
|
195
|
+
|
|
196
|
+
.DS_Store
|
|
197
|
+
saves/*.*
|
|
198
|
+
|
|
199
|
+
# Dev-mode graphs (local testing only, not part of the repo)
|
|
200
|
+
graphs/*.json
|
|
201
|
+
# MkDocs build output
|
|
202
|
+
site/
|
|
203
|
+
|
|
204
|
+
# Local git worktrees (claude-code workflow)
|
|
205
|
+
.worktrees/
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Local haybale library for the studio project.
|
|
3
|
+
|
|
4
|
+
Add your custom components in the corresponding folders:
|
|
5
|
+
- nodes/ — node definitions
|
|
6
|
+
- types/ — custom data types
|
|
7
|
+
- widgets/ — UI widgets for data types
|
|
8
|
+
- skins/ — custom node skins
|
|
9
|
+
- adapters/ — type-to-type conversion adapters
|
|
10
|
+
- settings/ — library settings definitions
|
|
11
|
+
- themes/ — workbench and node themes
|
|
12
|
+
- panels/ — custom UI panels
|
|
13
|
+
- editors/ — custom UI editors
|
|
14
|
+
- state/ — per-session library state (SessionState subclasses)
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from importlib.metadata import version as _pkg_version
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
from haywire.core.library.base import BaseLibrary
|
|
21
|
+
from haywire.core.library.decorator import library
|
|
22
|
+
from haywire.core.adapter.registry import AdapterRegistry
|
|
23
|
+
from haywire.core.node.registry import NodeRegistry
|
|
24
|
+
from haywire.core.settings.registry import SettingsRegistry
|
|
25
|
+
from haywire.core.state import LibraryStateRegistry
|
|
26
|
+
from haywire.core.types.registry import TypeRegistry
|
|
27
|
+
|
|
28
|
+
from haywire.ui.editor.registry import EditorTypeRegistry
|
|
29
|
+
from haywire.ui.panel.registry import PanelRegistry
|
|
30
|
+
from haywire.ui.skin.registry import SkinRegistry
|
|
31
|
+
from haywire.ui.themes.registry import ThemeRegistry
|
|
32
|
+
from haywire.ui.widget.registry import WidgetRegistry
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@library(
|
|
36
|
+
label="Haywire Studio",
|
|
37
|
+
id="studio",
|
|
38
|
+
version=_pkg_version("haybale-studio"),
|
|
39
|
+
description="Required library for haywire studio",
|
|
40
|
+
url="",
|
|
41
|
+
help_url="",
|
|
42
|
+
author="",
|
|
43
|
+
author_url="",
|
|
44
|
+
dependencies=[],
|
|
45
|
+
tags=["experimental", "project-local"],
|
|
46
|
+
file_watcher=True,
|
|
47
|
+
)
|
|
48
|
+
class Library(BaseLibrary):
|
|
49
|
+
"""Local project library — add your components in the subfolders."""
|
|
50
|
+
|
|
51
|
+
def register_components(self):
|
|
52
|
+
"""Register all components with the global registries."""
|
|
53
|
+
base_path = Path(__file__).parent
|
|
54
|
+
|
|
55
|
+
# state/ MUST be scanned first. Panel and editor modules in later
|
|
56
|
+
# scans transitively import classes from state/ (e.g. EditState).
|
|
57
|
+
# Once a state module is in sys.modules, the state/ scan's
|
|
58
|
+
# force_reload would replace the class object — leaving any
|
|
59
|
+
# already-imported references stale. The container would then key
|
|
60
|
+
# on the new class while writers held the old one, causing
|
|
61
|
+
# KeyError on ctx.data[StateClass] lookups. Registering state/
|
|
62
|
+
# first means every later import resolves to the same class
|
|
63
|
+
# the container holds.
|
|
64
|
+
self.add_folder_to_registry(
|
|
65
|
+
folder_path=str(base_path / "state"),
|
|
66
|
+
registry_cls=LibraryStateRegistry,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
self.add_folder_to_registry(
|
|
70
|
+
folder_path=str(base_path / "settings"),
|
|
71
|
+
registry_cls=SettingsRegistry,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
self.add_folder_to_registry(
|
|
75
|
+
folder_path=str(base_path / "themes"),
|
|
76
|
+
registry_cls=ThemeRegistry,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
self.add_folder_to_registry(
|
|
80
|
+
folder_path=str(base_path / "types"),
|
|
81
|
+
registry_cls=TypeRegistry,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
self.add_folder_to_registry(
|
|
85
|
+
folder_path=str(base_path / "adapters"),
|
|
86
|
+
registry_cls=AdapterRegistry,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
self.add_folder_to_registry(
|
|
90
|
+
folder_path=str(base_path / "widgets"),
|
|
91
|
+
registry_cls=WidgetRegistry,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
self.add_folder_to_registry(
|
|
95
|
+
folder_path=str(base_path / "skins"),
|
|
96
|
+
registry_cls=SkinRegistry,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
self.add_folder_to_registry(
|
|
100
|
+
folder_path=str(base_path / "nodes"),
|
|
101
|
+
registry_cls=NodeRegistry,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
self.add_folder_to_registry(
|
|
105
|
+
folder_path=str(base_path / "panels"),
|
|
106
|
+
registry_cls=PanelRegistry,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
self.add_folder_to_registry(
|
|
110
|
+
folder_path=str(base_path / "editors"),
|
|
111
|
+
registry_cls=EditorTypeRegistry,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def validate(self) -> bool:
|
|
115
|
+
"""Validate library structure."""
|
|
116
|
+
return True
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from .code_editor import CodeEditor
|
|
2
|
+
from .file_browser import LazyFileBrowserEditor
|
|
3
|
+
from .file_viewer import FileViewerEditor
|
|
4
|
+
from .properties_editor import PropertiesEditor
|
|
5
|
+
from .terminal_editor import _LogHandler
|
|
6
|
+
from .terminal_editor import TerminalEditor
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"CodeEditor",
|
|
10
|
+
"FileViewerEditor",
|
|
11
|
+
"LazyFileBrowserEditor",
|
|
12
|
+
"PropertiesEditor",
|
|
13
|
+
"TerminalEditor",
|
|
14
|
+
"_LogHandler",
|
|
15
|
+
]
|