meltygui 0.1.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.
- meltygui/__init__.py +107 -0
- meltygui/accounts/__init__.py +0 -0
- meltygui/accounts/internet_accounts.py +1355 -0
- meltygui/chat/__init__.py +91 -0
- meltygui/chat/activity.py +75 -0
- meltygui/chat/backends.py +36 -0
- meltygui/chat/chat_interface.py +732 -0
- meltygui/chat/chat_proxy.py +352 -0
- meltygui/chat/codex_proxy.py +592 -0
- meltygui/chat/codex_settings.py +100 -0
- meltygui/chat/codex_transport.py +60 -0
- meltygui/chat/command_parser.py +204 -0
- meltygui/chat/images.py +227 -0
- meltygui/chat/messages.py +417 -0
- meltygui/chat/metadata.py +139 -0
- meltygui/chat/writer_locks.py +64 -0
- meltygui/code/__init__.py +0 -0
- meltygui/code/basic_converters.py +533 -0
- meltygui/code/chain_converters.py +2111 -0
- meltygui/code/code_checks.py +2209 -0
- meltygui/code/core_syntax.py +1430 -0
- meltygui/code/file_converters.py +1933 -0
- meltygui/code/fileref.py +702 -0
- meltygui/code/hotswap_guard.py +144 -0
- meltygui/code/libcst_conversion.py +9724 -0
- meltygui/code/live_instrument.py +392 -0
- meltygui/code/live_view.py +2490 -0
- meltygui/code/melty_scan.py +2684 -0
- meltygui/code/new_codecs.py +1255 -0
- meltygui/code/new_converters.py +3017 -0
- meltygui/code/project_code.py +278 -0
- meltygui/code/source_context.py +63 -0
- meltygui/code/symbol_roster.py +1588 -0
- meltygui/code/syntax_check.py +34 -0
- meltygui/code/syntax_check_worker.py +114 -0
- meltygui/completion/__init__.py +0 -0
- meltygui/completion/fim.py +1232 -0
- meltygui/completion/fim_context.py +481 -0
- meltygui/completion/providers/__init__.py +0 -0
- meltygui/completion/providers/anthropic_oauth.py +446 -0
- meltygui/completion/providers/anthropic_requests.py +69 -0
- meltygui/completion/providers/claude.py +203 -0
- meltygui/completion/providers/claude_usage.py +499 -0
- meltygui/completion/providers/codex_accounts.py +180 -0
- meltygui/completion/providers/copilot.py +617 -0
- meltygui/completion/providers/oauth_popup.py +220 -0
- meltygui/completion/providers/ollama.py +320 -0
- meltygui/completion/providers/profiles.py +23 -0
- meltygui/core/README.md +88 -0
- meltygui/core/__init__.py +1 -0
- meltygui/core/automation/__init__.py +1 -0
- meltygui/core/automation/action_core.py +153 -0
- meltygui/core/automation/collection_action.py +45 -0
- meltygui/core/automation/mcp_eval.py +167 -0
- meltygui/core/automation/mcp_hotswap.py +107 -0
- meltygui/core/automation/mcp_query.py +552 -0
- meltygui/core/automation/mcp_server.py +657 -0
- meltygui/core/automation/orchestration_core.py +2636 -0
- meltygui/core/automation/query_core.py +124 -0
- meltygui/core/automation/search_core.py +26 -0
- meltygui/core/automation/selector_core.py +340 -0
- meltygui/core/automation/value_core.py +1752 -0
- meltygui/core/cache/__init__.py +1 -0
- meltygui/core/cache/cache_diagnostics.py +0 -0
- meltygui/core/cache/invalidation_decoration.py +153 -0
- meltygui/core/cache/invalidation_tracker.py +43 -0
- meltygui/core/cache/tile_cache.py +5968 -0
- meltygui/core/conversion/__init__.py +1 -0
- meltygui/core/conversion/bubbling.py +599 -0
- meltygui/core/conversion/cache_tree.py +188 -0
- meltygui/core/conversion/chain.py +113 -0
- meltygui/core/conversion/converter_register.py +145 -0
- meltygui/core/conversion/data_decoration.py +67 -0
- meltygui/core/conversion/dict_conversion.py +1815 -0
- meltygui/core/conversion/dict_conversion_util.py +177 -0
- meltygui/core/conversion/dynamic_obj.py +89 -0
- meltygui/core/conversion/graph_compare.py +183 -0
- meltygui/core/conversion/load_save_v2.py +1032 -0
- meltygui/core/conversion/missing_saved_class.py +39 -0
- meltygui/core/conversion/path_finder.py +606 -0
- meltygui/core/conversion/render_host.py +1083 -0
- meltygui/core/core_render.py +6537 -0
- meltygui/core/definition_hotswap.py +231 -0
- meltygui/core/diagnostics/__init__.py +1 -0
- meltygui/core/diagnostics/attribute_churn.py +38 -0
- meltygui/core/diagnostics/fps_counter.py +39 -0
- meltygui/core/diagnostics/gpu_frame_timer.py +103 -0
- meltygui/core/diagnostics/inspection_core.py +169 -0
- meltygui/core/diagnostics/monitor_core.py +105 -0
- meltygui/core/diagnostics/notifications.py +706 -0
- meltygui/core/diagnostics/perf_trace.py +281 -0
- meltygui/core/diagnostics/profile_decoration.py +88 -0
- meltygui/core/diagnostics/resize_trace.py +62 -0
- meltygui/core/diagnostics/screenshot_core.py +247 -0
- meltygui/core/diagnostics/session_status.py +98 -0
- meltygui/core/diagnostics/trace_core.py +445 -0
- meltygui/core/files/__init__.py +1 -0
- meltygui/core/files/file_core.py +208 -0
- meltygui/core/files/file_explorer_core.py +104 -0
- meltygui/core/files/file_tree_core.py +198 -0
- meltygui/core/files/file_watch_core.py +43 -0
- meltygui/core/files/import_graph_core.py +43 -0
- meltygui/core/files/metadata_core.py +51 -0
- meltygui/core/graphics/__init__.py +1 -0
- meltygui/core/graphics/cuda_context_core.py +166 -0
- meltygui/core/graphics/cuda_interop_core.py +136 -0
- meltygui/core/graphics/cuda_kernel_core.py +91 -0
- meltygui/core/graphics/framebuffer_recorder.py +337 -0
- meltygui/core/graphics/gl_state.py +658 -0
- meltygui/core/graphics/lut_core.py +52 -0
- meltygui/core/graphics/overlay_renderer.py +984 -0
- meltygui/core/graphics/scene_target.py +180 -0
- meltygui/core/graphics/screenshot.py +439 -0
- meltygui/core/graphics/shader_func.py +478 -0
- meltygui/core/graphics/tensor_core.py +45 -0
- meltygui/core/graphics/text_texture.py +329 -0
- meltygui/core/graphics/wayland_color.py +635 -0
- meltygui/core/input/__init__.py +1 -0
- meltygui/core/input/collision.py +165 -0
- meltygui/core/input/drag_drop_core.py +1525 -0
- meltygui/core/input/hypr_left_drag.py +323 -0
- meltygui/core/input/input_core.py +245 -0
- meltygui/core/input/input_handler.py +1101 -0
- meltygui/core/input/mouse_cursor.py +355 -0
- meltygui/core/input/pynput_backend.py +1054 -0
- meltygui/core/input/space_mouse.py +338 -0
- meltygui/core/input/touchpad_backend.py +393 -0
- meltygui/core/input/view_selection.py +177 -0
- meltygui/core/layout/__init__.py +1 -0
- meltygui/core/layout/column_core.py +2153 -0
- meltygui/core/layout/cursor_core.py +161 -0
- meltygui/core/layout/dropdown_core.py +278 -0
- meltygui/core/layout/edge_constraints.py +155 -0
- meltygui/core/layout/grid_core.py +117 -0
- meltygui/core/layout/header_core.py +23 -0
- meltygui/core/layout/header_runtime.py +67 -0
- meltygui/core/layout/layout_core.py +87 -0
- meltygui/core/layout/tile_manager_core.py +591 -0
- meltygui/core/melty.py +6726 -0
- meltygui/core/module_map.json +896 -0
- meltygui/core/module_names.py +19 -0
- meltygui/core/rendering/__init__.py +1 -0
- meltygui/core/rendering/core_decoration.py +431 -0
- meltygui/core/rendering/core_render_helpers.py +328 -0
- meltygui/core/rendering/func_metadata.py +398 -0
- meltygui/core/rendering/mode.py +818 -0
- meltygui/core/rendering/mode_defaults.py +41 -0
- meltygui/core/rendering/modes.py +136 -0
- meltygui/core/rendering/parameter_core.py +1665 -0
- meltygui/core/rendering/render_dispatch.py +1891 -0
- meltygui/core/rendering/render_funcs.py +273 -0
- meltygui/core/rendering/shaped.py +312 -0
- meltygui/core/rendering/window_decoration.py +25 -0
- meltygui/core/runtime/__init__.py +1 -0
- meltygui/core/runtime/app.py +735 -0
- meltygui/core/runtime/app_session.py +140 -0
- meltygui/core/runtime/background.py +564 -0
- meltygui/core/runtime/extensions.py +53 -0
- meltygui/core/runtime/gc_manager.py +1163 -0
- meltygui/core/runtime/lifecycle.py +21 -0
- meltygui/core/runtime/paths.py +27 -0
- meltygui/core/runtime/settings.py +14 -0
- meltygui/core/runtime/singleton.py +16 -0
- meltygui/core/runtime/thread_safe_bool.py +24 -0
- meltygui/core/runtime/thread_signal.py +30 -0
- meltygui/core/runtime/toggles.py +3115 -0
- meltygui/core/services/__init__.py +1 -0
- meltygui/core/services/account_core.py +10 -0
- meltygui/core/services/chat_core.py +19 -0
- meltygui/core/services/claude_terminal_core.py +346 -0
- meltygui/core/services/terminal_core.py +458 -0
- meltygui/core/services/terminal_runtime.py +78 -0
- meltygui/core/styling/__init__.py +1 -0
- meltygui/core/styling/color_core.py +46 -0
- meltygui/core/styling/fonts.py +639 -0
- meltygui/core/styling/global_style.py +338 -0
- meltygui/core/styling/style.py +198 -0
- meltygui/core/styling/style_core.py +522 -0
- meltygui/core/styling/warm_start.py +149 -0
- meltygui/core/windowing/__init__.py +1 -0
- meltygui/core/windowing/backends/PYIMGUI_LICENSE +28 -0
- meltygui/core/windowing/backends/__init__.py +1 -0
- meltygui/core/windowing/backends/imgui_renderer.py +138 -0
- meltygui/core/windowing/backends/native_wayland.py +850 -0
- meltygui/core/windowing/backends/protocols/xdg-decoration-unstable-v1.xml +156 -0
- meltygui/core/windowing/backends/protocols/xdg-shell.xml +1420 -0
- meltygui/core/windowing/backends/wayland_protocol.py +101 -0
- meltygui/core/windowing/dock_core.py +182 -0
- meltygui/core/windowing/frame_geometry.py +42 -0
- meltygui/core/windowing/geometry_feed.py +864 -0
- meltygui/core/windowing/glfw_utils.py +1343 -0
- meltygui/core/windowing/os_frame.py +1552 -0
- meltygui/core/windowing/surface.py +643 -0
- meltygui/core/windowing/titlebar.py +1560 -0
- meltygui/core/windowing/titlebar_buttons.py +281 -0
- meltygui/core/windowing/wayland_move.py +932 -0
- meltygui/core/windowing/window_api.py +62 -0
- meltygui/core/windowing/window_constants.py +339 -0
- meltygui/core/windowing/window_visibility.py +162 -0
- meltygui/debug/__init__.py +0 -0
- meltygui/debug/app_view_utils.py +9 -0
- meltygui/editor/__init__.py +0 -0
- meltygui/editor/bash_syntax.py +30 -0
- meltygui/editor/code_line_fast.py +152 -0
- meltygui/editor/diff.py +139 -0
- meltygui/editor/external_changes.py +159 -0
- meltygui/editor/file_header.py +41 -0
- meltygui/editor/live_usage.py +169 -0
- meltygui/editor/live_view_views.py +1803 -0
- meltygui/editor/pending_save.py +1351 -0
- meltygui/editor/roster_tints.py +547 -0
- meltygui/editor/source_preview.py +16 -0
- meltygui/editor/source_tools.py +10 -0
- meltygui/editor/source_ui.py +70 -0
- meltygui/editor/spell_check.py +77 -0
- meltygui/editor/text_editor.py +9076 -0
- meltygui/editor/usage_picker.py +538 -0
- meltygui/events/__init__.py +0 -0
- meltygui/events/example.py +118 -0
- meltygui/examples/__init__.py +0 -0
- meltygui/examples/columns_demo.py +33 -0
- meltygui/examples/columns_window_demo.py +60 -0
- meltygui/examples/context_menu_demo.py +24 -0
- meltygui/examples/context_menu_window_demo.py +49 -0
- meltygui/examples/gui_playground.py +127 -0
- meltygui/examples/live_view_playground.py +256 -0
- meltygui/examples/lora.py +43 -0
- meltygui/examples/lora_data.py +59 -0
- meltygui/examples/lora_policies.py +67 -0
- meltygui/examples/mode_demo.py +49 -0
- meltygui/examples/modifies_demo.py +119 -0
- meltygui/examples/scalar_policies.py +60 -0
- meltygui/examples/style_layouts.py +149 -0
- meltygui/examples/tile_manager_demo.py +74 -0
- meltygui/examples/tint_demo.py +160 -0
- meltygui/examples/tint_functions.py +56 -0
- meltygui/examples/trace_demo.py +88 -0
- meltygui/examples/two_windows.py +36 -0
- meltygui/files/__init__.py +0 -0
- meltygui/files/fast_file_explorer.py +439 -0
- meltygui/gnome_extension/lsd-window-geometry@latent-descent/extension.js +237 -0
- meltygui/gnome_extension/lsd-window-geometry@latent-descent/lsd-window-geometry@latent-descent.iml +9 -0
- meltygui/gnome_extension/lsd-window-geometry@latent-descent/metadata.json +7 -0
- meltygui/graphics/__init__.py +6 -0
- meltygui/graphics/base.py +85 -0
- meltygui/graphics/examples.py +507 -0
- meltygui/graphics/executor.py +520 -0
- meltygui/graphics/filter.py +667 -0
- meltygui/graphics/filter.pyi +856 -0
- meltygui/graphics/generate_stubs.py +22 -0
- meltygui/graphics/registry.py +203 -0
- meltygui/graphics/shader_compiler.py +155 -0
- meltygui/graphics/shaders.py +1302 -0
- meltygui/graphics/stub_generator.py +250 -0
- meltygui/graphics/texture_manager.py +170 -0
- meltygui/graphics/texture_min_max.py +295 -0
- meltygui/hdr_color.py +757 -0
- meltygui/image_load.py +308 -0
- meltygui/model/__init__.py +1 -0
- meltygui/model/account_model.py +142 -0
- meltygui/model/camera_model.py +159 -0
- meltygui/model/chat_model.py +86 -0
- meltygui/model/code_model.py +62 -0
- meltygui/model/code_proxy_model.py +876 -0
- meltygui/model/collection_model.py +41 -0
- meltygui/model/color_model.py +127 -0
- meltygui/model/cuda_tensor_model.py +36 -0
- meltygui/model/cuda_texture_model.py +149 -0
- meltygui/model/dropdown_model.py +137 -0
- meltygui/model/file_metadata_model.py +73 -0
- meltygui/model/file_model.py +289 -0
- meltygui/model/format_model.py +390 -0
- meltygui/model/graph_model.py +98 -0
- meltygui/model/icon_model.py +1024 -0
- meltygui/model/import_graph_model.py +468 -0
- meltygui/model/layout_model.py +15 -0
- meltygui/model/lut_model.py +266 -0
- meltygui/model/search_model.py +173 -0
- meltygui/model/tensor_model.py +402 -0
- meltygui/model/terminal_model.py +329 -0
- meltygui/model/texture_model.py +146 -0
- meltygui/model/tile_model.py +24 -0
- meltygui/model/trace_model.py +198 -0
- meltygui/model/trace_report_model.py +146 -0
- meltygui/models/__init__.py +0 -0
- meltygui/models/file_meta.py +613 -0
- meltygui/models/function_console.py +184 -0
- meltygui/models/orchestration.py +48 -0
- meltygui/pbr.py +1576 -0
- meltygui/png_unfilter.c +49 -0
- meltygui/resources/JetBrainsMono-Regular.ttf +0 -0
- meltygui/resources/THIRD_PARTY_NOTICES.md +21 -0
- meltygui/resources/dejavu/DejaVuSans-Bold.ttf +0 -0
- meltygui/resources/dejavu/DejaVuSans-ExtraLight.ttf +0 -0
- meltygui/resources/dejavu/DejaVuSans.ttf +0 -0
- meltygui/resources/dejavu/LICENSE.txt +78 -0
- meltygui/resources/fontawesome-LICENSE.txt +121 -0
- meltygui/resources/fontawesome-webfont.ttf +0 -0
- meltygui/resources/hdri/studio_small_09_1k.hdr +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-Bold.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-ExtraBold.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-ExtraLight.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-Light.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-Medium.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-SemiBold.ttf +0 -0
- meltygui/resources/jetbrains-weights/JetBrainsMono-Thin.ttf +0 -0
- meltygui/resources/jetbrains-weights/OFL.txt +93 -0
- meltygui/resources/jetbrains-weights/README.md +2 -0
- meltygui/state/__init__.py +0 -0
- meltygui/state/account_state.py +22 -0
- meltygui/state/animation_state.py +97 -0
- meltygui/state/annotation_state.py +22 -0
- meltygui/state/chat_state.py +36 -0
- meltygui/state/code_state.py +10 -0
- meltygui/state/core_enums.py +59 -0
- meltygui/state/core_markers.py +115 -0
- meltygui/state/core_undo.py +1075 -0
- meltygui/state/file_state.py +75 -0
- meltygui/state/graph_state.py +26 -0
- meltygui/state/inspection_state.py +47 -0
- meltygui/state/menu_state.py +10 -0
- meltygui/state/model_enums.py +11 -0
- meltygui/state/new_core_model.py +2394 -0
- meltygui/state/orchestration_state.py +14 -0
- meltygui/state/query_state.py +24 -0
- meltygui/state/tensor_state.py +10 -0
- meltygui/state/terminal_state.py +23 -0
- meltygui/state/trace_state.py +32 -0
- meltygui/state/voxel_state.py +12 -0
- meltygui/text_index.py +816 -0
- meltygui/utils/__init__.py +0 -0
- meltygui/utils/jump_to_code.py +344 -0
- meltygui/utils/pkl_inspect.py +90 -0
- meltygui/utils/render_utils.py +1419 -0
- meltygui/view/__init__.py +1 -0
- meltygui/view/account_view.py +524 -0
- meltygui/view/action_view.py +73 -0
- meltygui/view/chat_decoration_view.py +112 -0
- meltygui/view/chat_view.py +1703 -0
- meltygui/view/code_view.py +2677 -0
- meltygui/view/collection_view.py +1185 -0
- meltygui/view/color_view.py +824 -0
- meltygui/view/control_view.py +559 -0
- meltygui/view/decoration_view.py +439 -0
- meltygui/view/diagnostic_view.py +177 -0
- meltygui/view/dropdown_view.py +1082 -0
- meltygui/view/file_view.py +1599 -0
- meltygui/view/graph_cuda_view.py +105 -0
- meltygui/view/graph_view.py +882 -0
- meltygui/view/header_view.py +848 -0
- meltygui/view/input_view.py +238 -0
- meltygui/view/inspection_view.py +1783 -0
- meltygui/view/layout_view.py +596 -0
- meltygui/view/lut_view.py +45 -0
- meltygui/view/menu_view.py +212 -0
- meltygui/view/orchestration_view.py +658 -0
- meltygui/view/query_view.py +118 -0
- meltygui/view/search_view.py +342 -0
- meltygui/view/tab_view.py +258 -0
- meltygui/view/tensor_view.py +430 -0
- meltygui/view/terminal_view.py +355 -0
- meltygui/view/text_view.py +8031 -0
- meltygui/view/texture_view.py +480 -0
- meltygui/view/tile_view.py +38 -0
- meltygui/view/trace_view.py +923 -0
- meltygui/view/voxel_cuda_view.py +824 -0
- meltygui/view/voxel_view.py +1860 -0
- meltygui/view/window_view.py +111 -0
- meltygui-0.1.0.dist-info/METADATA +143 -0
- meltygui-0.1.0.dist-info/RECORD +372 -0
- meltygui-0.1.0.dist-info/WHEEL +4 -0
- meltygui-0.1.0.dist-info/licenses/LICENSE +202 -0
meltygui/png_unfilter.c
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Undo PNG scanline filters (RFC 2083 §6). Compiled on first use by image_load.py.
|
|
2
|
+
raw: h rows of (1 + stride) bytes, filter type byte first.
|
|
3
|
+
out: h rows of stride bytes. bpp = bytes per complete pixel. */
|
|
4
|
+
#include <stdint.h>
|
|
5
|
+
#include <stdlib.h>
|
|
6
|
+
|
|
7
|
+
static inline int paeth(int a, int b, int c) {
|
|
8
|
+
int p = a + b - c, pa = abs(p - a), pb = abs(p - b), pc = abs(p - c);
|
|
9
|
+
return (pa <= pb && pa <= pc) ? a : (pb <= pc ? b : c);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
int png_unfilter(const uint8_t *raw, uint8_t *out, int h, int stride, int bpp) {
|
|
13
|
+
const uint8_t *prior = NULL;
|
|
14
|
+
for (int y = 0; y < h; y++) {
|
|
15
|
+
const uint8_t *in = raw + (size_t)y * (stride + 1);
|
|
16
|
+
uint8_t *cur = out + (size_t)y * stride;
|
|
17
|
+
int kind = in[0];
|
|
18
|
+
in++;
|
|
19
|
+
switch (kind) {
|
|
20
|
+
case 0:
|
|
21
|
+
for (int i = 0; i < stride; i++) cur[i] = in[i];
|
|
22
|
+
break;
|
|
23
|
+
case 1:
|
|
24
|
+
for (int i = 0; i < stride; i++) cur[i] = in[i] + (i >= bpp ? cur[i - bpp] : 0);
|
|
25
|
+
break;
|
|
26
|
+
case 2:
|
|
27
|
+
for (int i = 0; i < stride; i++) cur[i] = in[i] + (prior ? prior[i] : 0);
|
|
28
|
+
break;
|
|
29
|
+
case 3:
|
|
30
|
+
for (int i = 0; i < stride; i++) {
|
|
31
|
+
int a = i >= bpp ? cur[i - bpp] : 0, b = prior ? prior[i] : 0;
|
|
32
|
+
cur[i] = in[i] + ((a + b) >> 1);
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 4:
|
|
36
|
+
for (int i = 0; i < stride; i++) {
|
|
37
|
+
int a = i >= bpp ? cur[i - bpp] : 0;
|
|
38
|
+
int b = prior ? prior[i] : 0;
|
|
39
|
+
int c = (prior && i >= bpp) ? prior[i - bpp] : 0;
|
|
40
|
+
cur[i] = in[i] + paeth(a, b, c);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
return -1;
|
|
45
|
+
}
|
|
46
|
+
prior = cur;
|
|
47
|
+
}
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Bundled resources
|
|
2
|
+
|
|
3
|
+
- JetBrains Mono: JetBrains s.r.o., SIL Open Font License 1.1.
|
|
4
|
+
License: `jetbrains-weights/OFL.txt`. Source: https://github.com/JetBrains/JetBrainsMono
|
|
5
|
+
- DejaVu Sans: Bitstream copyright and DejaVu public-domain changes.
|
|
6
|
+
License: `dejavu/LICENSE.txt`. Source: https://dejavu-fonts.github.io/
|
|
7
|
+
- Font Awesome 5.15.4 font (stored under the historical filename
|
|
8
|
+
`fontawesome-webfont.ttf`): Fonticons, Inc., SIL Open Font License 1.1.
|
|
9
|
+
License: `fontawesome-LICENSE.txt`.
|
|
10
|
+
Source: https://github.com/FortAwesome/Font-Awesome/tree/5.15.4
|
|
11
|
+
- Studio Small 09 HDR environment: Poly Haven, CC0.
|
|
12
|
+
Source: https://polyhaven.com/a/studio_small_09
|
|
13
|
+
License: https://polyhaven.com/license
|
|
14
|
+
|
|
15
|
+
The adapted pyimgui window integration retains its license in
|
|
16
|
+
`meltygui/windows/backends/PYIMGUI_LICENSE`.
|
|
17
|
+
|
|
18
|
+
Native support distributions carry their own licenses. In particular, the
|
|
19
|
+
GL-enabled PyCUDA wheel includes NVIDIA's cuRAND runtime and its CUDA 12.1 EULA;
|
|
20
|
+
that runtime is not covered by MeltyGUI's project license. The NVIDIA driver
|
|
21
|
+
and CUDA compiler/toolkit are not bundled in MeltyGUI wheels.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
2
|
+
Upstream-Name: DejaVu fonts
|
|
3
|
+
Upstream-Author: Stepan Roh <src@users.sourceforge.net> (original author),
|
|
4
|
+
see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list
|
|
5
|
+
Source: https://dejavu-fonts.github.io/
|
|
6
|
+
|
|
7
|
+
Files: *
|
|
8
|
+
Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
|
|
9
|
+
Bitstream Vera is a trademark of Bitstream, Inc.
|
|
10
|
+
DejaVu changes are in public domain.
|
|
11
|
+
License: bitstream-vera
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of the fonts accompanying this license ("Fonts") and associated
|
|
14
|
+
documentation files (the "Font Software"), to reproduce and distribute the
|
|
15
|
+
Font Software, including without limitation the rights to use, copy, merge,
|
|
16
|
+
publish, distribute, and/or sell copies of the Font Software, and to permit
|
|
17
|
+
persons to whom the Font Software is furnished to do so, subject to the
|
|
18
|
+
following conditions:
|
|
19
|
+
.
|
|
20
|
+
The above copyright and trademark notices and this permission notice shall
|
|
21
|
+
be included in all copies of one or more of the Font Software typefaces.
|
|
22
|
+
.
|
|
23
|
+
The Font Software may be modified, altered, or added to, and in particular
|
|
24
|
+
the designs of glyphs or characters in the Fonts may be modified and
|
|
25
|
+
additional glyphs or characters may be added to the Fonts, only if the fonts
|
|
26
|
+
are renamed to names not containing either the words "Bitstream" or the word
|
|
27
|
+
"Vera".
|
|
28
|
+
.
|
|
29
|
+
This License becomes null and void to the extent applicable to Fonts or Font
|
|
30
|
+
Software that has been modified and is distributed under the "Bitstream
|
|
31
|
+
Vera" names.
|
|
32
|
+
.
|
|
33
|
+
The Font Software may be sold as part of a larger software package but no
|
|
34
|
+
copy of one or more of the Font Software typefaces may be sold by itself.
|
|
35
|
+
.
|
|
36
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
37
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
|
38
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
|
39
|
+
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
|
|
40
|
+
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
|
|
41
|
+
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
|
|
42
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
43
|
+
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
|
|
44
|
+
FONT SOFTWARE.
|
|
45
|
+
.
|
|
46
|
+
Except as contained in this notice, the names of Gnome, the Gnome
|
|
47
|
+
Foundation, and Bitstream Inc., shall not be used in advertising or
|
|
48
|
+
otherwise to promote the sale, use or other dealings in this Font Software
|
|
49
|
+
without prior written authorization from the Gnome Foundation or Bitstream
|
|
50
|
+
Inc., respectively. For further information, contact: fonts at gnome dot
|
|
51
|
+
org.
|
|
52
|
+
|
|
53
|
+
Files: debian/*
|
|
54
|
+
Copyright: (C) 2005-2006 Peter Cernak <pce@users.sourceforge.net>
|
|
55
|
+
(C) 2006-2011 Davide Viti <zinosat@tiscali.it>
|
|
56
|
+
(C) 2011-2013 Christian Perrier <bubulle@debian.org>
|
|
57
|
+
(C) 2013 Fabian Greffrath <fabian+debian@greffrath.com>
|
|
58
|
+
License: GPL-2+
|
|
59
|
+
This program is free software; you can redistribute it
|
|
60
|
+
and/or modify it under the terms of the GNU General Public
|
|
61
|
+
License as published by the Free Software Foundation; either
|
|
62
|
+
version 2 of the License, or (at your option) any later
|
|
63
|
+
version.
|
|
64
|
+
.
|
|
65
|
+
This program is distributed in the hope that it will be
|
|
66
|
+
useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
67
|
+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
68
|
+
PURPOSE. See the GNU General Public License for more
|
|
69
|
+
details.
|
|
70
|
+
.
|
|
71
|
+
You should have received a copy of the GNU General Public
|
|
72
|
+
License along with this package; if not, write to the Free
|
|
73
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
74
|
+
Boston, MA 02110-1301 USA
|
|
75
|
+
.
|
|
76
|
+
On Debian systems, the full text of the GNU General Public
|
|
77
|
+
License version 2 can be found in the file
|
|
78
|
+
/usr/share/common-licenses/GPL-2'.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Font Awesome Free License
|
|
2
|
+
-------------------------
|
|
3
|
+
|
|
4
|
+
Font Awesome Free is free, open source, and GPL friendly. You can use it for
|
|
5
|
+
commercial projects, open source projects, or really almost whatever you want.
|
|
6
|
+
Full Font Awesome Free license: https://fontawesome.com/license/free.
|
|
7
|
+
|
|
8
|
+
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
|
|
9
|
+
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
|
|
10
|
+
packaged as SVG and JS file types.
|
|
11
|
+
|
|
12
|
+
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
|
|
13
|
+
In the Font Awesome Free download, the SIL OFL license applies to all icons
|
|
14
|
+
packaged as web and desktop font files.
|
|
15
|
+
|
|
16
|
+
# Code: MIT License (https://opensource.org/licenses/MIT)
|
|
17
|
+
In the Font Awesome Free download, the MIT license applies to all non-font and
|
|
18
|
+
non-icon files.
|
|
19
|
+
|
|
20
|
+
# Attribution
|
|
21
|
+
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
|
|
22
|
+
Awesome Free files already contain embedded comments with sufficient
|
|
23
|
+
attribution, so you shouldn't need to do anything additional when using these
|
|
24
|
+
files normally.
|
|
25
|
+
|
|
26
|
+
We've kept attribution comments terse, so we ask that you do not actively work
|
|
27
|
+
to remove them from files, especially code. They're a great way for folks to
|
|
28
|
+
learn about Font Awesome.
|
|
29
|
+
|
|
30
|
+
# Brand Icons
|
|
31
|
+
All brand icons are trademarks of their respective owners. The use of these
|
|
32
|
+
trademarks does not indicate endorsement of the trademark holder by Font
|
|
33
|
+
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
|
34
|
+
to represent the company, product, or service to which they refer.**
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
38
|
+
-----------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
PREAMBLE
|
|
41
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
42
|
+
development of collaborative font projects, to support the font creation
|
|
43
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
44
|
+
open framework in which fonts may be shared and improved in partnership
|
|
45
|
+
with others.
|
|
46
|
+
|
|
47
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
48
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
49
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
50
|
+
redistributed and/or sold with any software provided that any reserved
|
|
51
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
52
|
+
however, cannot be released under any other type of license. The
|
|
53
|
+
requirement for fonts to remain under this license does not apply
|
|
54
|
+
to any document created using the fonts or their derivatives.
|
|
55
|
+
|
|
56
|
+
DEFINITIONS
|
|
57
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
58
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
59
|
+
include source files, build scripts and documentation.
|
|
60
|
+
|
|
61
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
62
|
+
copyright statement(s).
|
|
63
|
+
|
|
64
|
+
"Original Version" refers to the collection of Font Software components as
|
|
65
|
+
distributed by the Copyright Holder(s).
|
|
66
|
+
|
|
67
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
68
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
69
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
70
|
+
new environment.
|
|
71
|
+
|
|
72
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
73
|
+
writer or other person who contributed to the Font Software.
|
|
74
|
+
|
|
75
|
+
PERMISSION & CONDITIONS
|
|
76
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
77
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
78
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
79
|
+
Software, subject to the following conditions:
|
|
80
|
+
|
|
81
|
+
1) Neither the Font Software nor any of its individual components,
|
|
82
|
+
in Original or Modified Versions, may be sold by itself.
|
|
83
|
+
|
|
84
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
85
|
+
redistributed and/or sold with any software, provided that each copy
|
|
86
|
+
contains the above copyright notice and this license. These can be
|
|
87
|
+
included either as stand-alone text files, human-readable headers or
|
|
88
|
+
in the appropriate machine-readable metadata fields within text or
|
|
89
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
90
|
+
|
|
91
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
92
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
93
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
94
|
+
presented to the users.
|
|
95
|
+
|
|
96
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
97
|
+
Software shall not be used to promote, endorse or advertise any
|
|
98
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
99
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
100
|
+
permission.
|
|
101
|
+
|
|
102
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
103
|
+
must be distributed entirely under this license, and must not be
|
|
104
|
+
distributed under any other license. The requirement for fonts to
|
|
105
|
+
remain under this license does not apply to any document created
|
|
106
|
+
using the Font Software.
|
|
107
|
+
|
|
108
|
+
TERMINATION
|
|
109
|
+
This license becomes null and void if any of the above conditions are
|
|
110
|
+
not met.
|
|
111
|
+
|
|
112
|
+
DISCLAIMER
|
|
113
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
114
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
115
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
116
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
117
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
118
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
119
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
120
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
121
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Injected state for account views."""
|
|
2
|
+
from meltygui.core.conversion.dict_conversion import DictConversion
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AccountsPanelState(DictConversion):
|
|
6
|
+
"""Which per-account panels are open — the usage limits (▾), Ollama's
|
|
7
|
+
model list, the Edit fields — persisted with the window's draw_state
|
|
8
|
+
(injected as `panel_state: AccountsPanelState = None`, the TabState
|
|
9
|
+
pattern) so the window reopens the way it was left. The kinds keep
|
|
10
|
+
toggling the account dicts' runtime keys (`_usage_open`, …); the window
|
|
11
|
+
restores those from here on a fresh store (boot / restart) and mirrors
|
|
12
|
+
them back after every frame. `open` maps "<account id><key>" → True.
|
|
13
|
+
`usage` maps account id → the Claude plan numbers last fetched
|
|
14
|
+
(`AnthropicKind.usage_cache_entry`: rows, summary, fetched_wall, email)
|
|
15
|
+
— restored into a fresh account dict by `restore_usage`, so the panel
|
|
16
|
+
shows last session's bars until the delayed fetch replaces them."""
|
|
17
|
+
PANEL_KEYS = ("_usage_open", "_models_open", "_edit")
|
|
18
|
+
|
|
19
|
+
def __init__(self):
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.open = {}
|
|
22
|
+
self.usage = {}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import meltygui.core.windowing.window_api as glfw
|
|
3
|
+
from typing import Callable, Union, Tuple
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
from meltygui.core.windowing.glfw_utils import request_render
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EaseType(Enum):
|
|
10
|
+
LINEAR = 'linear'
|
|
11
|
+
EASE_IN = 'ease_in'
|
|
12
|
+
EASE_OUT = 'ease_out'
|
|
13
|
+
EASE_IN_OUT = 'ease_in_out'
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
AnimValue = Union[float, Tuple[float, ...]]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Animator:
|
|
20
|
+
def __init__(self):
|
|
21
|
+
self.start_value: AnimValue = 0
|
|
22
|
+
self.end_value: AnimValue = 0
|
|
23
|
+
self.duration = 0
|
|
24
|
+
self.start_time = 0
|
|
25
|
+
self.is_animating = False
|
|
26
|
+
self.on_update: Callable[[AnimValue], None] = lambda x: None
|
|
27
|
+
self.ease_type = EaseType.LINEAR
|
|
28
|
+
|
|
29
|
+
def _ease(self, t: float) -> float:
|
|
30
|
+
if self.ease_type == EaseType.LINEAR:
|
|
31
|
+
return t
|
|
32
|
+
elif self.ease_type == EaseType.EASE_IN:
|
|
33
|
+
return t * t
|
|
34
|
+
elif self.ease_type == EaseType.EASE_OUT:
|
|
35
|
+
return 1 - (1 - t) * (1 - t)
|
|
36
|
+
elif self.ease_type == EaseType.EASE_IN_OUT:
|
|
37
|
+
if t < 0.5:
|
|
38
|
+
return 2 * t * t
|
|
39
|
+
return 1 - (-2 * t + 2) ** 2 / 2
|
|
40
|
+
return t
|
|
41
|
+
|
|
42
|
+
def _interpolate(self, start: AnimValue, end: AnimValue, progress: float) -> AnimValue:
|
|
43
|
+
"""Interpolate between start and end values, handling both floats and tuples."""
|
|
44
|
+
if isinstance(start, tuple) and isinstance(end, tuple):
|
|
45
|
+
# Interpolate each component of the tuple
|
|
46
|
+
return tuple(
|
|
47
|
+
start[i] + (end[i] - start[i]) * progress
|
|
48
|
+
for i in range(len(start))
|
|
49
|
+
)
|
|
50
|
+
else:
|
|
51
|
+
# Handle as float
|
|
52
|
+
return start + (end - start) * progress
|
|
53
|
+
|
|
54
|
+
def stop(self):
|
|
55
|
+
"""Stop the current animation."""
|
|
56
|
+
self.is_animating = False
|
|
57
|
+
|
|
58
|
+
def animate(self, start: AnimValue, end: AnimValue, duration: float,
|
|
59
|
+
on_update: Callable[[AnimValue], None], ease_type: EaseType = EaseType.EASE_IN_OUT):
|
|
60
|
+
"""
|
|
61
|
+
Start animation with support for both float and tuple values.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
start: Starting value (float or tuple of floats)
|
|
65
|
+
end: Ending value (float or tuple of floats)
|
|
66
|
+
duration: Animation duration in seconds
|
|
67
|
+
on_update: Callback function that accepts either float or tuple
|
|
68
|
+
ease_type: Type of easing function to use
|
|
69
|
+
"""
|
|
70
|
+
if isinstance(start, tuple) != isinstance(end, tuple):
|
|
71
|
+
raise ValueError("Start and end values must be the same type (both float or both tuple)")
|
|
72
|
+
if isinstance(start, tuple) and len(start) != len(end):
|
|
73
|
+
raise ValueError("Start and end tuples must have the same length")
|
|
74
|
+
|
|
75
|
+
self.start_value = start
|
|
76
|
+
self.end_value = end
|
|
77
|
+
self.duration = duration
|
|
78
|
+
self.start_time = time.time()
|
|
79
|
+
self.is_animating = True
|
|
80
|
+
self.on_update = on_update
|
|
81
|
+
self.ease_type = ease_type
|
|
82
|
+
|
|
83
|
+
def update(self):
|
|
84
|
+
if not self.is_animating:
|
|
85
|
+
return
|
|
86
|
+
|
|
87
|
+
elapsed = time.time() - self.start_time
|
|
88
|
+
if elapsed >= self.duration:
|
|
89
|
+
self.is_animating = False
|
|
90
|
+
self.on_update(self.end_value)
|
|
91
|
+
return
|
|
92
|
+
|
|
93
|
+
progress = self._ease(elapsed / self.duration)
|
|
94
|
+
current = self._interpolate(self.start_value, self.end_value, progress)
|
|
95
|
+
|
|
96
|
+
self.on_update(current)
|
|
97
|
+
request_render() # Request next frame
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from meltygui.core.rendering.core_decoration import Core
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AnnotationOverride:
|
|
8
|
+
"""Carrier produced when a ``@render_func`` view function is used as a field
|
|
9
|
+
annotation, e.g. ``alpha: draw_float(min_value=15.0)`` or ``tint: draw_tuple``.
|
|
10
|
+
|
|
11
|
+
It just holds the view function and any per-field kwarg overrides captured at
|
|
12
|
+
class-definition time. ``FieldMeta`` extracts these and registers them into
|
|
13
|
+
Melty's ``default_funcs_by_name_type`` / ``default_kwargs_by_attrib_type``
|
|
14
|
+
maps, keyed by (owning class, attribute) — the same place ``@defaults``
|
|
15
|
+
writes. Nothing reads the carrier after that."""
|
|
16
|
+
|
|
17
|
+
is_annotation_override = True
|
|
18
|
+
|
|
19
|
+
def __init__(self, view_function=None, kwargs=None):
|
|
20
|
+
self.view_function = view_function
|
|
21
|
+
self.kwargs = dict(kwargs or {})
|
|
22
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Injected state for chat views."""
|
|
2
|
+
from meltygui.core.rendering.core_decoration import no_save
|
|
3
|
+
from meltygui.core.conversion.dict_conversion import DictConversion
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@no_save("revision", "viewports", "text_layouts", "rename")
|
|
7
|
+
class ChatInterfaceState(DictConversion):
|
|
8
|
+
def __init__(self):
|
|
9
|
+
super().__init__()
|
|
10
|
+
self.provider = ""
|
|
11
|
+
self.account = ""
|
|
12
|
+
self.selected = {}
|
|
13
|
+
self.drafts = {}
|
|
14
|
+
self.draft_generations = {}
|
|
15
|
+
self.projects = {}
|
|
16
|
+
self.follow = True
|
|
17
|
+
self.answers = {}
|
|
18
|
+
self.revision = 0
|
|
19
|
+
self.viewports = {}
|
|
20
|
+
self.text_layouts = {}
|
|
21
|
+
self.rename = None
|
|
22
|
+
self.chat_menu = None
|
|
23
|
+
self.message_expanded = {}
|
|
24
|
+
self.concise = False
|
|
25
|
+
self.action_groups = {}
|
|
26
|
+
self.output_expanded = {}
|
|
27
|
+
self.image_sizes = {}
|
|
28
|
+
# The sidebar's age filter: conversations active within this many
|
|
29
|
+
# hours (0 = all). AGE_FILTERS lists the choices.
|
|
30
|
+
self.age_hours = 0
|
|
31
|
+
# The sources (account ids) whose conversations the sidebar shows -
|
|
32
|
+
# the tabs lit in the source bar: empty = just `account`.
|
|
33
|
+
self.sources = []
|
|
34
|
+
self.folder_expanded = {}
|
|
35
|
+
self.folders_default_expanded = True
|
|
36
|
+
self.sections_expanded = {"recent": True, "all": True, "accounts": True}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import itertools
|
|
2
|
+
import random
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
from meltygui.state.model_enums import RelaxedEnum
|
|
6
|
+
from meltygui.core.rendering.core_decoration import defaults
|
|
7
|
+
|
|
8
|
+
# Monotonic id source: a per-process RANDOM start + a counter. next() on an
|
|
9
|
+
# itertools.count is atomic under the GIL (thread-safe). The random start keeps
|
|
10
|
+
# ids from separate runs apart (a bare counter would restart at 0 each run and
|
|
11
|
+
# collide with loaded ids); the counter makes ids collision-free WITHIN a run
|
|
12
|
+
# (the old uuid4[0:6] = 24 random bits actually collides for long graphs).
|
|
13
|
+
_id_counter = itertools.count(random.getrandbits(24))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class OffscreenDebugMode(RelaxedEnum):
|
|
17
|
+
OFF = "Off"
|
|
18
|
+
SHOW_LAYERS = "Show Layers"
|
|
19
|
+
SHOW_MASK = "Show Mask"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class OffscreenDebugMode(RelaxedEnum):
|
|
23
|
+
OFF = "Off"
|
|
24
|
+
SHOW_LAYERS = "layer"
|
|
25
|
+
SHOW_MASK = "mask"
|
|
26
|
+
SHOW_UV = "uv"
|
|
27
|
+
SHOW_SRC_PX = "srcpx"
|
|
28
|
+
SHOW_CHECKER = "checker"
|
|
29
|
+
SHOW_SOLID = "solid"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ViewMode(RelaxedEnum):
|
|
33
|
+
NONE = "None"
|
|
34
|
+
IMGUI_WINDOW = "imgui-window"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ProfileMode(RelaxedEnum):
|
|
38
|
+
OFF = "Off"
|
|
39
|
+
LIGHT = "Light"
|
|
40
|
+
ON = "On"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class PendingAction(RelaxedEnum):
|
|
45
|
+
APPLY = "apply"
|
|
46
|
+
REVERT = "revert"
|
|
47
|
+
LOAD = "load"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def generate_id():
|
|
51
|
+
"""
|
|
52
|
+
Generates a unique identifier for use in ImGui elements.
|
|
53
|
+
This is useful to ensure that elements can be uniquely identified across frames.
|
|
54
|
+
:return: A unique identifier string (6+ hex chars; survives the [0:8] id trunc).
|
|
55
|
+
|
|
56
|
+
~11x faster than the old uuid4[0:6] (no /dev/urandom read per call), and
|
|
57
|
+
collision-free within a process.
|
|
58
|
+
"""
|
|
59
|
+
return format(next(_id_counter), "06x")
|