painapple-code 1.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.
- painapple_code/__init__.py +30 -0
- painapple_code/__main__.py +18 -0
- painapple_code/_version.py +24 -0
- painapple_code/auth_middleware.py +930 -0
- painapple_code/cli/__init__.py +204 -0
- painapple_code/cli/deploy/__init__.py +15 -0
- painapple_code/cli/deploy/claude_seed.py +41 -0
- painapple_code/cli/deploy/config.py +260 -0
- painapple_code/cli/deploy/container.py +715 -0
- painapple_code/cli/deploy/launch.py +163 -0
- painapple_code/cli/deploy/runtime.py +223 -0
- painapple_code/cli/lifecycle_cmd.py +443 -0
- painapple_code/cli/list_cmd.py +572 -0
- painapple_code/cli/manage_cmd.py +670 -0
- painapple_code/cli/netinfo.py +125 -0
- painapple_code/cli/profiles.py +390 -0
- painapple_code/cli/serve_args.py +163 -0
- painapple_code/cli/serve_config.py +256 -0
- painapple_code/cli/setup_cmd.py +664 -0
- painapple_code/cli/ui.py +438 -0
- painapple_code/cost_analytics.py +879 -0
- painapple_code/data/models.defaults.yaml +18 -0
- painapple_code/data/models.yaml +18 -0
- painapple_code/data/presets.defaults.json +32 -0
- painapple_code/data/strings.yaml +2269 -0
- painapple_code/helpers.py +406 -0
- painapple_code/paths.py +1514 -0
- painapple_code/prompt_explorer.py +984 -0
- painapple_code/providers/__init__.py +224 -0
- painapple_code/providers/base.py +710 -0
- painapple_code/providers/claude/__init__.py +74 -0
- painapple_code/providers/claude/capabilities.py +218 -0
- painapple_code/providers/claude/errors.py +79 -0
- painapple_code/providers/claude/launch.py +50 -0
- painapple_code/providers/claude/summary.py +89 -0
- painapple_code/providers/claude/translate.py +74 -0
- painapple_code/providers/claude_sdk/__init__.py +139 -0
- painapple_code/providers/claude_sdk/driver.py +412 -0
- painapple_code/providers/codex/__init__.py +87 -0
- painapple_code/providers/codex/capabilities.py +321 -0
- painapple_code/providers/codex/errors.py +70 -0
- painapple_code/providers/codex/launch.py +142 -0
- painapple_code/providers/codex/summary.py +196 -0
- painapple_code/providers/codex/translate.py +204 -0
- painapple_code/providers/codex_app_server/__init__.py +100 -0
- painapple_code/providers/codex_app_server/capabilities.py +41 -0
- painapple_code/providers/codex_app_server/launch.py +202 -0
- painapple_code/providers/codex_app_server/summary.py +291 -0
- painapple_code/providers/codex_app_server/translate.py +263 -0
- painapple_code/providers/codex_app_server/transport.py +238 -0
- painapple_code/routes/__init__.py +0 -0
- painapple_code/routes/api_agents.py +441 -0
- painapple_code/routes/api_app.py +368 -0
- painapple_code/routes/api_app_commit_sections.py +127 -0
- painapple_code/routes/api_app_config.py +997 -0
- painapple_code/routes/api_app_session_prefs.py +217 -0
- painapple_code/routes/api_browser.py +690 -0
- painapple_code/routes/api_commands.py +374 -0
- painapple_code/routes/api_costs.py +128 -0
- painapple_code/routes/api_drafts.py +139 -0
- painapple_code/routes/api_exec.py +149 -0
- painapple_code/routes/api_files.py +542 -0
- painapple_code/routes/api_git.py +657 -0
- painapple_code/routes/api_logs.py +649 -0
- painapple_code/routes/api_plugins.py +275 -0
- painapple_code/routes/api_project_config.py +418 -0
- painapple_code/routes/api_prompts.py +231 -0
- painapple_code/routes/api_providers.py +53 -0
- painapple_code/routes/api_search.py +411 -0
- painapple_code/routes/api_session_stash.py +234 -0
- painapple_code/routes/api_session_welcome.py +151 -0
- painapple_code/routes/api_sessions.py +742 -0
- painapple_code/routes/api_shadow.py +323 -0
- painapple_code/routes/api_shadow_db.py +512 -0
- painapple_code/routes/api_shadow_files.py +332 -0
- painapple_code/routes/api_shadow_search.py +476 -0
- painapple_code/routes/api_skills.py +610 -0
- painapple_code/routes/api_tasks.py +147 -0
- painapple_code/routes/api_terminal.py +540 -0
- painapple_code/routes/api_upload.py +293 -0
- painapple_code/routes/api_viewer.py +229 -0
- painapple_code/routes/dependencies.py +109 -0
- painapple_code/routes/ws_chat.py +837 -0
- painapple_code/server.py +2208 -0
- painapple_code/server_logging.py +263 -0
- painapple_code/services/__init__.py +0 -0
- painapple_code/services/agent_session.py +2738 -0
- painapple_code/session_store.py +253 -0
- painapple_code/session_store_core.py +879 -0
- painapple_code/shadow_db.py +830 -0
- painapple_code/shadow_db_plans.py +369 -0
- painapple_code/shadow_db_queries.py +595 -0
- painapple_code/shadow_db_schema.py +676 -0
- painapple_code/shadow_git.py +1296 -0
- painapple_code/shadow_git_frontmatter.py +314 -0
- painapple_code/shadow_git_sections.py +520 -0
- painapple_code/shadow_git_summary.py +462 -0
- painapple_code/shadow_parser.py +560 -0
- painapple_code/static/css/00-variables.css +276 -0
- painapple_code/static/css/01-base.css +245 -0
- painapple_code/static/css/02-tooltips.css +36 -0
- painapple_code/static/css/09-left-rail.css +448 -0
- painapple_code/static/css/10-header.css +777 -0
- painapple_code/static/css/11-connection-bar.css +120 -0
- painapple_code/static/css/20-messages.css +750 -0
- painapple_code/static/css/21-tool-blocks.css +2340 -0
- painapple_code/static/css/22-edit-diff.css +619 -0
- painapple_code/static/css/23-thinking.css +1584 -0
- painapple_code/static/css/24-background-tasks.css +359 -0
- painapple_code/static/css/25-context-block.css +252 -0
- painapple_code/static/css/26-session-setup.css +144 -0
- painapple_code/static/css/30-markdown.css +854 -0
- painapple_code/static/css/40-input.css +2418 -0
- painapple_code/static/css/41-autocomplete.css +127 -0
- painapple_code/static/css/42-activity-strip.css +97 -0
- painapple_code/static/css/43-file-autocomplete.css +121 -0
- painapple_code/static/css/44-snippets-autocomplete.css +224 -0
- painapple_code/static/css/45-selection-bar.css +433 -0
- painapple_code/static/css/46-keyboard-bar.css +119 -0
- painapple_code/static/css/47-keyboard-longpress.css +116 -0
- painapple_code/static/css/47-token-profile.css +106 -0
- painapple_code/static/css/50-welcome.css +3095 -0
- painapple_code/static/css/51-modals.css +301 -0
- painapple_code/static/css/52-utilities.css +77 -0
- painapple_code/static/css/53-image-upload.css +456 -0
- painapple_code/static/css/54-todo-list.css +102 -0
- painapple_code/static/css/55-file-upload.css +113 -0
- painapple_code/static/css/56-chat-navigator.css +218 -0
- painapple_code/static/css/56-permission-card.css +332 -0
- painapple_code/static/css/56-plan-approval.css +204 -0
- painapple_code/static/css/56-question-form.css +602 -0
- painapple_code/static/css/57-swipe-indicator.css +95 -0
- painapple_code/static/css/58-session-families.css +627 -0
- painapple_code/static/css/59-about.css +196 -0
- painapple_code/static/css/61-log-explorer.css +723 -0
- painapple_code/static/css/62-json-tree.css +489 -0
- painapple_code/static/css/62-skills-widget.css +650 -0
- painapple_code/static/css/63-commands-widget.css +30 -0
- painapple_code/static/css/63-plugins-widget.css +174 -0
- painapple_code/static/css/63-terminal.css +516 -0
- painapple_code/static/css/64-search-files-widget.css +448 -0
- painapple_code/static/css/65-snippets-widget.css +426 -0
- painapple_code/static/css/66-active-sessions.css +979 -0
- painapple_code/static/css/66-agents-widget.css +265 -0
- painapple_code/static/css/66-file-explorer-widget.css +855 -0
- painapple_code/static/css/66-git-panel.css +791 -0
- painapple_code/static/css/66-history-explorer.css +1496 -0
- painapple_code/static/css/67-diff-viewer.css +602 -0
- painapple_code/static/css/67-editor-view.css +748 -0
- painapple_code/static/css/67-file-preview-widget.css +1873 -0
- painapple_code/static/css/68-browser-widget.css +337 -0
- painapple_code/static/css/68-compare-wizard.css +355 -0
- painapple_code/static/css/68-csv-preview.css +106 -0
- painapple_code/static/css/68-diff-preview.css +103 -0
- painapple_code/static/css/68-helpers-install-widget.css +491 -0
- painapple_code/static/css/68-image-annotate.css +346 -0
- painapple_code/static/css/68-terminal-view.css +98 -0
- painapple_code/static/css/68-uploads-widget.css +229 -0
- painapple_code/static/css/69-cost-analytics.css +537 -0
- painapple_code/static/css/70-config-panel.css +3736 -0
- painapple_code/static/css/70-excalidraw.css +136 -0
- painapple_code/static/css/70-prompt-explorer.css +890 -0
- painapple_code/static/css/71-chart.css +111 -0
- painapple_code/static/css/72-discussion-sidebar.css +678 -0
- painapple_code/static/css/74-debug-logs.css +656 -0
- painapple_code/static/css/80-open-dialog.css +146 -0
- painapple_code/static/css/80-quick-switcher.css +383 -0
- painapple_code/static/css/80-widget-system.css +1763 -0
- painapple_code/static/css/81-quick-actions.css +1020 -0
- painapple_code/static/css/82-context-popover.css +1233 -0
- painapple_code/static/css/83-context-menu.css +339 -0
- painapple_code/static/css/85-lazy-loading.css +102 -0
- painapple_code/static/css/86-zen-mode.css +708 -0
- painapple_code/static/css/87-grid-switcher.css +346 -0
- painapple_code/static/css/login.css +198 -0
- painapple_code/static/dist/app.bundle.js +7177 -0
- painapple_code/static/feature-triage.html +446 -0
- painapple_code/static/icons/apple-touch-icon.png +0 -0
- painapple_code/static/icons/favicon-32.png +0 -0
- painapple_code/static/icons/favicon.ico +0 -0
- painapple_code/static/icons/icon-128.png +0 -0
- painapple_code/static/icons/icon-144.png +0 -0
- painapple_code/static/icons/icon-152.png +0 -0
- painapple_code/static/icons/icon-180.png +0 -0
- painapple_code/static/icons/icon-192.png +0 -0
- painapple_code/static/icons/icon-384.png +0 -0
- painapple_code/static/icons/icon-512.png +0 -0
- painapple_code/static/icons/icon-72.png +0 -0
- painapple_code/static/icons/icon-96.png +0 -0
- painapple_code/static/js/action-delegate.js +187 -0
- painapple_code/static/js/activity-strip.js +193 -0
- painapple_code/static/js/app/context-menus.js +619 -0
- painapple_code/static/js/app/file-preview.js +163 -0
- painapple_code/static/js/app/init-ui.js +574 -0
- painapple_code/static/js/app/input-events.js +561 -0
- painapple_code/static/js/app/input-resize.js +313 -0
- painapple_code/static/js/app/message-actions.js +419 -0
- painapple_code/static/js/app/panels.js +210 -0
- painapple_code/static/js/app/rendering-delegators.js +246 -0
- painapple_code/static/js/app/server-loading.js +365 -0
- painapple_code/static/js/app/session-ops.js +287 -0
- painapple_code/static/js/app/session-switch.js +443 -0
- painapple_code/static/js/app/settings-helpers.js +280 -0
- painapple_code/static/js/app/startup-welcome.js +290 -0
- painapple_code/static/js/app-context.js +157 -0
- painapple_code/static/js/app.js +2134 -0
- painapple_code/static/js/auth-fetch.js +46 -0
- painapple_code/static/js/background-tasks.js +274 -0
- painapple_code/static/js/boot.js +73 -0
- painapple_code/static/js/caret-position.js +171 -0
- painapple_code/static/js/chat-navigator.js +710 -0
- painapple_code/static/js/chat-search.js +323 -0
- painapple_code/static/js/command-executor.js +176 -0
- painapple_code/static/js/command-store.js +497 -0
- painapple_code/static/js/components.js +1414 -0
- painapple_code/static/js/config.js +218 -0
- painapple_code/static/js/context-menu.js +740 -0
- painapple_code/static/js/controllers/chat-controller.js +4252 -0
- painapple_code/static/js/controllers/dialog-controller.js +217 -0
- painapple_code/static/js/controllers/tab-controller.js +1828 -0
- painapple_code/static/js/controllers/thinking-controller.js +915 -0
- painapple_code/static/js/diff-utils.js +486 -0
- painapple_code/static/js/drafts-pill.js +95 -0
- painapple_code/static/js/editor-view.js +815 -0
- painapple_code/static/js/effort-settings.js +430 -0
- painapple_code/static/js/feature-triage.js +811 -0
- painapple_code/static/js/file-autocomplete.js +516 -0
- painapple_code/static/js/file-tabs.js +123 -0
- painapple_code/static/js/gestures.js +448 -0
- painapple_code/static/js/grid-switcher.js +334 -0
- painapple_code/static/js/input-handler.js +1472 -0
- painapple_code/static/js/keyboard-bar.js +495 -0
- painapple_code/static/js/layout-switcher.js +109 -0
- painapple_code/static/js/linkify-utils.js +200 -0
- painapple_code/static/js/login.js +141 -0
- painapple_code/static/js/open-dialog.js +879 -0
- painapple_code/static/js/orphan-terminals.js +373 -0
- painapple_code/static/js/path-utils.js +179 -0
- painapple_code/static/js/perf-marks.js +102 -0
- painapple_code/static/js/permission-settings.js +475 -0
- painapple_code/static/js/pointer-input.js +59 -0
- painapple_code/static/js/preview/json-tree-menu.js +226 -0
- painapple_code/static/js/preview/json-tree-toolbar.js +291 -0
- painapple_code/static/js/preview/json-tree.js +457 -0
- painapple_code/static/js/preview/preview-breadcrumb.js +387 -0
- painapple_code/static/js/preview/preview-edit.js +367 -0
- painapple_code/static/js/preview/preview-events.js +361 -0
- painapple_code/static/js/preview/preview-history.js +567 -0
- painapple_code/static/js/preview/preview-inline-edit.js +869 -0
- painapple_code/static/js/preview/preview-poll.js +108 -0
- painapple_code/static/js/preview/preview-render.js +572 -0
- painapple_code/static/js/preview/preview-search.js +421 -0
- painapple_code/static/js/preview/preview-state.js +256 -0
- painapple_code/static/js/preview/preview-utils.js +251 -0
- painapple_code/static/js/preview-plugins/chart-plugin.js +22 -0
- painapple_code/static/js/preview-plugins/csv-plugin.js +188 -0
- painapple_code/static/js/preview-plugins/diff-plugin.js +258 -0
- painapple_code/static/js/preview-plugins/excalidraw-plugin.js +25 -0
- painapple_code/static/js/preview-plugins/html-plugin.js +104 -0
- painapple_code/static/js/preview-plugins/image-plugin.js +20 -0
- painapple_code/static/js/preview-plugins/index.js +34 -0
- painapple_code/static/js/preview-plugins/json-plugin.js +99 -0
- painapple_code/static/js/preview-plugins/jsonl-plugin.js +152 -0
- painapple_code/static/js/preview-plugins/markdown-plugin.js +266 -0
- painapple_code/static/js/preview-plugins/panzoom-plugin.js +63 -0
- painapple_code/static/js/preview-plugins/plugin-helpers.js +282 -0
- painapple_code/static/js/project-color-picker.js +110 -0
- painapple_code/static/js/project-colors.js +163 -0
- painapple_code/static/js/prompt-favorites.js +187 -0
- painapple_code/static/js/quick-actions-menu.js +1736 -0
- painapple_code/static/js/quick-actions-registry.js +1239 -0
- painapple_code/static/js/quick-switcher/controller.js +294 -0
- painapple_code/static/js/quick-switcher/fuzzy-scorer.js +123 -0
- painapple_code/static/js/quick-switcher/index.js +30 -0
- painapple_code/static/js/quick-switcher/providers/base-provider.js +51 -0
- painapple_code/static/js/quick-switcher/providers/command-provider.js +56 -0
- painapple_code/static/js/quick-switcher/providers/file-provider.js +291 -0
- painapple_code/static/js/quick-switcher/providers/panel-provider.js +132 -0
- painapple_code/static/js/quick-switcher/providers/project-provider.js +361 -0
- painapple_code/static/js/quick-switcher/providers/read-files-provider.js +104 -0
- painapple_code/static/js/quick-switcher/providers/skills-provider.js +129 -0
- painapple_code/static/js/quick-switcher/registry.js +69 -0
- painapple_code/static/js/quick-switcher/ui/item.js +54 -0
- painapple_code/static/js/quick-switcher/ui/picker.js +464 -0
- painapple_code/static/js/recent-opens.js +40 -0
- painapple_code/static/js/scroll-manager.js +530 -0
- painapple_code/static/js/scroll-state-machine.js +359 -0
- painapple_code/static/js/selection/action-bar.js +793 -0
- painapple_code/static/js/selection/index.js +15 -0
- painapple_code/static/js/selection/selection-handler.js +877 -0
- painapple_code/static/js/selection/state.js +181 -0
- painapple_code/static/js/session/agent-progress.js +202 -0
- painapple_code/static/js/session/handle-agent-message.js +481 -0
- painapple_code/static/js/session/handle-message.js +550 -0
- painapple_code/static/js/session/interactive.js +587 -0
- painapple_code/static/js/session/message-store.js +271 -0
- painapple_code/static/js/session/messages.js +253 -0
- painapple_code/static/js/session/persistence.js +179 -0
- painapple_code/static/js/session/restore.js +136 -0
- painapple_code/static/js/session/sync.js +333 -0
- painapple_code/static/js/session-container-pool.js +371 -0
- painapple_code/static/js/session-setup-panel.js +274 -0
- painapple_code/static/js/session.js +1047 -0
- painapple_code/static/js/shortcut-hints.js +272 -0
- painapple_code/static/js/shortcuts.js +1146 -0
- painapple_code/static/js/skills-autocomplete.js +262 -0
- painapple_code/static/js/snippets-autocomplete.js +738 -0
- painapple_code/static/js/stash-refs-view.js +83 -0
- painapple_code/static/js/stash-ui.js +768 -0
- painapple_code/static/js/stash.js +785 -0
- painapple_code/static/js/status-bar.js +1184 -0
- painapple_code/static/js/token-profile.js +274 -0
- painapple_code/static/js/tool-renderer-blocks.js +1626 -0
- painapple_code/static/js/tool-renderer-thinking.js +813 -0
- painapple_code/static/js/tool-renderer.js +1500 -0
- painapple_code/static/js/tooltips.js +197 -0
- painapple_code/static/js/upload-manager.js +1019 -0
- painapple_code/static/js/utils.js +521 -0
- painapple_code/static/js/welcome/api.js +363 -0
- painapple_code/static/js/welcome/cards.js +626 -0
- painapple_code/static/js/welcome/context-menu.js +585 -0
- painapple_code/static/js/welcome/families.js +801 -0
- painapple_code/static/js/welcome/preview.js +234 -0
- painapple_code/static/js/welcome/state.js +129 -0
- painapple_code/static/js/welcome.js +1874 -0
- painapple_code/static/js/widget-system/base-widget.js +717 -0
- painapple_code/static/js/widget-system/device-manager.js +178 -0
- painapple_code/static/js/widget-system/event-bus.js +152 -0
- painapple_code/static/js/widget-system/icons.js +120 -0
- painapple_code/static/js/widget-system/index.js +49 -0
- painapple_code/static/js/widget-system/init.js +54 -0
- painapple_code/static/js/widget-system/types/bottom-sheet.js +307 -0
- painapple_code/static/js/widget-system/types/floating.js +915 -0
- painapple_code/static/js/widget-system/types/index.js +40 -0
- painapple_code/static/js/widget-system/types/modal.js +147 -0
- painapple_code/static/js/widget-system/types/sidebar.js +158 -0
- painapple_code/static/js/widget-system/types/tab.js +146 -0
- painapple_code/static/js/widget-system/types/top-sheet.js +203 -0
- painapple_code/static/js/widget-system/widget-manager.js +1187 -0
- painapple_code/static/js/widgets/about-widget.js +260 -0
- painapple_code/static/js/widgets/active-sessions-widget.js +760 -0
- painapple_code/static/js/widgets/agents-widget.js +897 -0
- painapple_code/static/js/widgets/browser-widget.js +579 -0
- painapple_code/static/js/widgets/commands-widget.js +694 -0
- painapple_code/static/js/widgets/config/commit-sections.js +449 -0
- painapple_code/static/js/widgets/config/dir-autocomplete.js +224 -0
- painapple_code/static/js/widgets/config/gestures.js +161 -0
- painapple_code/static/js/widgets/config/models-tab.js +988 -0
- painapple_code/static/js/widgets/config/quick-actions-tab.js +882 -0
- painapple_code/static/js/widgets/config/shortcut-editor.js +587 -0
- painapple_code/static/js/widgets/config/state.js +517 -0
- painapple_code/static/js/widgets/config/system-controls.js +90 -0
- painapple_code/static/js/widgets/config-widget.js +1535 -0
- painapple_code/static/js/widgets/cost-analytics-widget.js +621 -0
- painapple_code/static/js/widgets/debug-widget.js +693 -0
- painapple_code/static/js/widgets/diff-viewer-widget.js +1420 -0
- painapple_code/static/js/widgets/discussion-widget.js +1107 -0
- painapple_code/static/js/widgets/file-explorer-widget.js +2166 -0
- painapple_code/static/js/widgets/file-preview-widget.js +861 -0
- painapple_code/static/js/widgets/git-widget.js +794 -0
- painapple_code/static/js/widgets/helpers-install-widget.js +720 -0
- painapple_code/static/js/widgets/history-explorer-widget.js +1804 -0
- painapple_code/static/js/widgets/image-annotate-widget.js +951 -0
- painapple_code/static/js/widgets/image-preview-widget.js +692 -0
- painapple_code/static/js/widgets/index.js +176 -0
- painapple_code/static/js/widgets/log-explorer-widget.js +1057 -0
- painapple_code/static/js/widgets/plugins-widget.js +305 -0
- painapple_code/static/js/widgets/prompt-explorer-widget.js +1119 -0
- painapple_code/static/js/widgets/search-files-widget.js +529 -0
- painapple_code/static/js/widgets/skills-widget.js +843 -0
- painapple_code/static/js/widgets/snippets-widget.js +479 -0
- painapple_code/static/js/widgets/sub-agents-widget.js +333 -0
- painapple_code/static/js/widgets/tasks-widget.js +379 -0
- painapple_code/static/js/widgets/terminal/connection.js +283 -0
- painapple_code/static/js/widgets/terminal/gestures.js +357 -0
- painapple_code/static/js/widgets/terminal/init.js +642 -0
- painapple_code/static/js/widgets/terminal/link-providers.js +532 -0
- painapple_code/static/js/widgets/terminal/osc52.js +213 -0
- painapple_code/static/js/widgets/terminal/render.js +159 -0
- painapple_code/static/js/widgets/terminal/size.js +54 -0
- painapple_code/static/js/widgets/terminal/state.js +211 -0
- painapple_code/static/js/widgets/terminal/wrap-utils.js +101 -0
- painapple_code/static/js/widgets/terminal-widget.js +793 -0
- painapple_code/static/js/widgets/uploads-widget.js +461 -0
- painapple_code/static/js/widgets/zen-widget.js +1001 -0
- painapple_code/static/login.html +51 -0
- painapple_code/static/manifest.json +73 -0
- painapple_code/static/sw.js +293 -0
- painapple_code/static/vendor/LICENSES.txt +769 -0
- painapple_code/static/vendor/README.md +103 -0
- painapple_code/static/vendor/codemirror.js +35 -0
- painapple_code/static/vendor/codemirror.js.LEGAL.txt +304 -0
- painapple_code/static/vendor/github-markdown-dark.min.css +1124 -0
- painapple_code/static/vendor/highlight-github-dark.min.css +10 -0
- painapple_code/static/vendor/highlight-lang-dockerfile.min.js +8 -0
- painapple_code/static/vendor/highlight-lang-nginx.min.js +21 -0
- painapple_code/static/vendor/highlight-lang-properties.min.js +10 -0
- painapple_code/static/vendor/highlight-lang-scala.min.js +28 -0
- painapple_code/static/vendor/highlight.min.js +1213 -0
- painapple_code/static/vendor/marked.min.js +6 -0
- painapple_code/static/vendor/purify.min.js +3 -0
- painapple_code/static/vendor/xterm-addon-fit.js +2 -0
- painapple_code/static/vendor/xterm.css +209 -0
- painapple_code/static/vendor/xterm.js +2 -0
- painapple_code/static/web-client.html +635 -0
- painapple_code/subprocess_registry.py +535 -0
- painapple_code/tls_cert.py +79 -0
- painapple_code/tools/agents/shadow-git-helper.md +400 -0
- painapple_code/tools/excalidraw-to-svg.js +143 -0
- painapple_code/tools/install-helpers.sh +148 -0
- painapple_code/tools/shadow-git +320 -0
- painapple_code/tools/shadow-query +120 -0
- painapple_code/tools/vegalite-to-svg.js +79 -0
- painapple_code/turn_query.py +766 -0
- painapple_code/turn_tracker.py +221 -0
- painapple_code/utils/__init__.py +0 -0
- painapple_code/utils/agent_cli.py +306 -0
- painapple_code/utils/chart.py +103 -0
- painapple_code/utils/excalidraw.py +107 -0
- painapple_code/utils/file_lock.py +162 -0
- painapple_code/utils/file_paths.py +648 -0
- painapple_code/utils/generate_icons.py +251 -0
- painapple_code/utils/proc.py +205 -0
- painapple_code/utils/pty_backend.py +59 -0
- painapple_code/utils/pty_posix.py +160 -0
- painapple_code/utils/pty_windows.py +245 -0
- painapple_code/utils/token_profiles.py +91 -0
- painapple_code/viewer_templates.py +657 -0
- painapple_code/welcome_search.py +879 -0
- painapple_code-1.0.0.dist-info/METADATA +292 -0
- painapple_code-1.0.0.dist-info/RECORD +436 -0
- painapple_code-1.0.0.dist-info/WHEEL +5 -0
- painapple_code-1.0.0.dist-info/entry_points.txt +2 -0
- painapple_code-1.0.0.dist-info/licenses/LICENSE +661 -0
- painapple_code-1.0.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +261 -0
- painapple_code-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════════════════════
|
|
2
|
+
EDITOR VIEW (File tabs / Code editor)
|
|
3
|
+
═══════════════════════════════════════════════════════════════════ */
|
|
4
|
+
|
|
5
|
+
/* View switching - both session and editor views */
|
|
6
|
+
.view {
|
|
7
|
+
display: none;
|
|
8
|
+
flex: 1;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
min-height: 0; /* Important for flex children to scroll properly */
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.view.active {
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Session view - keep existing messages container behavior */
|
|
19
|
+
#session-view {
|
|
20
|
+
/* Inherits from .view */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#session-view #messages-container {
|
|
24
|
+
flex: 1;
|
|
25
|
+
/* Scroll ownership moved to per-session containers (.session-messages) */
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Editor view */
|
|
31
|
+
#editor-view {
|
|
32
|
+
background: var(--bg-primary);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Editor toolbar */
|
|
36
|
+
#editor-toolbar {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
align-items: center;
|
|
40
|
+
padding: var(--sp-8) var(--sp-12);
|
|
41
|
+
border-bottom: 1px solid var(--border-primary);
|
|
42
|
+
background: var(--bg-secondary);
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.editor-breadcrumb {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--sp-6);
|
|
50
|
+
font-size: var(--font-size-base);
|
|
51
|
+
color: var(--text-secondary);
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.editor-path {
|
|
56
|
+
color: var(--text-primary);
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.editor-copy-path-btn {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
width: 22px;
|
|
67
|
+
height: 22px;
|
|
68
|
+
padding: 0;
|
|
69
|
+
background: transparent;
|
|
70
|
+
border: none;
|
|
71
|
+
border-radius: var(--radius-sm);
|
|
72
|
+
color: var(--text-muted);
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
opacity: 0.6;
|
|
75
|
+
transition: all 0.15s ease;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.editor-copy-path-btn:hover {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
background: var(--bg-tertiary);
|
|
82
|
+
color: var(--text-primary);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.editor-copy-path-btn.copied {
|
|
86
|
+
color: var(--success);
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.editor-copy-path-btn svg {
|
|
91
|
+
width: 14px;
|
|
92
|
+
height: 14px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.editor-actions {
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: var(--sp-4);
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.editor-btn {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: var(--sp-4);
|
|
105
|
+
padding: var(--sp-4) var(--sp-8);
|
|
106
|
+
background: transparent;
|
|
107
|
+
border: 1px solid var(--border-primary);
|
|
108
|
+
border-radius: var(--radius-md);
|
|
109
|
+
color: var(--text-secondary);
|
|
110
|
+
font-size: var(--font-size-sm);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
transition: all 0.15s ease;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.editor-btn:hover {
|
|
116
|
+
background: var(--bg-tertiary);
|
|
117
|
+
color: var(--text-primary);
|
|
118
|
+
border-color: var(--text-muted);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.editor-btn svg {
|
|
122
|
+
width: 14px;
|
|
123
|
+
height: 14px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Language selector (scratch tabs) */
|
|
127
|
+
.editor-language-select {
|
|
128
|
+
appearance: none;
|
|
129
|
+
background: var(--bg-tertiary);
|
|
130
|
+
border: 1px solid var(--border-primary);
|
|
131
|
+
border-radius: var(--radius-sm);
|
|
132
|
+
padding: var(--sp-4) var(--sp-24) var(--sp-4) var(--sp-8);
|
|
133
|
+
font-size: var(--font-size-xs);
|
|
134
|
+
color: var(--text-secondary);
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
|
137
|
+
background-repeat: no-repeat;
|
|
138
|
+
background-position: right 6px center;
|
|
139
|
+
transition: all 0.15s ease;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.editor-language-select:hover {
|
|
143
|
+
border-color: var(--text-muted);
|
|
144
|
+
color: var(--text-primary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.editor-language-select:focus {
|
|
148
|
+
outline: none;
|
|
149
|
+
border-color: var(--accent);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Scratch/file-only controls - hidden by default */
|
|
153
|
+
.scratch-only,
|
|
154
|
+
.file-only {
|
|
155
|
+
display: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Show scratch controls when in scratch mode */
|
|
159
|
+
#editor-view.scratch-mode .scratch-only {
|
|
160
|
+
display: flex;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Show file controls when in file mode (not scratch) */
|
|
164
|
+
#editor-view:not(.scratch-mode) .file-only {
|
|
165
|
+
display: flex;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Save As dialog (inline) */
|
|
169
|
+
.save-as-dialog {
|
|
170
|
+
display: none;
|
|
171
|
+
align-items: center;
|
|
172
|
+
gap: var(--sp-8);
|
|
173
|
+
padding: var(--sp-8) var(--sp-12);
|
|
174
|
+
background: var(--bg-tertiary);
|
|
175
|
+
border-bottom: 1px solid var(--border-primary);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.save-as-dialog.visible {
|
|
179
|
+
display: flex;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.save-as-dialog label {
|
|
183
|
+
font-size: var(--font-size-sm);
|
|
184
|
+
color: var(--text-secondary);
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.save-as-dialog input {
|
|
189
|
+
flex: 1;
|
|
190
|
+
min-width: 200px;
|
|
191
|
+
padding: var(--sp-6) var(--sp-10);
|
|
192
|
+
background: var(--bg-primary);
|
|
193
|
+
border: 1px solid var(--border-primary);
|
|
194
|
+
border-radius: var(--radius-sm);
|
|
195
|
+
color: var(--text-primary);
|
|
196
|
+
font-size: var(--font-size-base);
|
|
197
|
+
font-family: var(--font-mono);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.save-as-dialog input:focus {
|
|
201
|
+
outline: none;
|
|
202
|
+
border-color: var(--accent);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.save-as-btn {
|
|
206
|
+
padding: var(--sp-6) var(--sp-12);
|
|
207
|
+
background: var(--bg-secondary);
|
|
208
|
+
border: 1px solid var(--border-primary);
|
|
209
|
+
border-radius: var(--radius-sm);
|
|
210
|
+
color: var(--text-secondary);
|
|
211
|
+
font-size: var(--font-size-sm);
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
transition: all 0.15s ease;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.save-as-btn:hover {
|
|
217
|
+
background: var(--bg-tertiary);
|
|
218
|
+
color: var(--text-primary);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.save-as-btn.primary {
|
|
222
|
+
background: var(--accent);
|
|
223
|
+
border-color: var(--accent);
|
|
224
|
+
color: white;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.save-as-btn.primary:hover {
|
|
228
|
+
background: var(--accent-hover);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* Editor container */
|
|
232
|
+
#editor-container {
|
|
233
|
+
flex: 1;
|
|
234
|
+
min-height: 0; /* Allow flex item to shrink below content size */
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
overflow: hidden; /* CodeMirror handles its own scrolling */
|
|
238
|
+
-webkit-overflow-scrolling: touch;
|
|
239
|
+
background: var(--bg-primary);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* CodeMirror wrapper - Phase 2 */
|
|
243
|
+
#cm-editor-wrapper {
|
|
244
|
+
flex: 1;
|
|
245
|
+
min-height: 0; /* Allow flex item to shrink for CodeMirror scrolling */
|
|
246
|
+
width: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* CodeMirror fills its container */
|
|
250
|
+
#cm-editor-wrapper .cm-editor {
|
|
251
|
+
height: 100%;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Override One Dark theme background to match app */
|
|
255
|
+
#cm-editor-wrapper .cm-editor,
|
|
256
|
+
#cm-editor-wrapper .cm-gutters {
|
|
257
|
+
background-color: var(--bg-primary);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* Active line background - slightly lighter than bg-primary */
|
|
261
|
+
#cm-editor-wrapper .cm-activeLine,
|
|
262
|
+
#cm-editor-wrapper .cm-activeLineGutter {
|
|
263
|
+
background-color: rgba(255, 255, 255, 0.03);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* CodeMirror scroller area */
|
|
267
|
+
#cm-editor-wrapper .cm-scroller {
|
|
268
|
+
font-family: var(--font-mono);
|
|
269
|
+
font-size: var(--font-size-base);
|
|
270
|
+
line-height: 1.6;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Base text matches app foreground instead of One Dark's #abb2bf grey;
|
|
274
|
+
syntax token colors still apply on top. */
|
|
275
|
+
#cm-editor-wrapper .cm-content {
|
|
276
|
+
color: var(--text-primary);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* CodeMirror loading state */
|
|
280
|
+
.cm-loading {
|
|
281
|
+
display: flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
justify-content: center;
|
|
284
|
+
height: 100%;
|
|
285
|
+
color: var(--text-muted);
|
|
286
|
+
font-size: var(--font-size-md);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.cm-loading::before {
|
|
290
|
+
content: '';
|
|
291
|
+
width: 20px;
|
|
292
|
+
height: 20px;
|
|
293
|
+
border: 2px solid var(--border-primary);
|
|
294
|
+
border-top-color: var(--accent);
|
|
295
|
+
border-radius: 50%;
|
|
296
|
+
margin-right: 10px;
|
|
297
|
+
animation: cm-spin 1s linear infinite;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@keyframes cm-spin {
|
|
301
|
+
to { transform: rotate(360deg); }
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* CodeMirror error state */
|
|
305
|
+
.cm-error {
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
height: 100%;
|
|
310
|
+
color: var(--error);
|
|
311
|
+
font-size: var(--font-size-md);
|
|
312
|
+
padding: var(--sp-20);
|
|
313
|
+
text-align: center;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* Fallback pre/code display (when CodeMirror fails to load) */
|
|
317
|
+
#editor-content {
|
|
318
|
+
margin: 0;
|
|
319
|
+
padding: var(--sp-16);
|
|
320
|
+
font-family: var(--font-mono);
|
|
321
|
+
font-size: var(--font-size-base);
|
|
322
|
+
line-height: 1.6;
|
|
323
|
+
color: var(--text-primary);
|
|
324
|
+
background: transparent;
|
|
325
|
+
white-space: pre;
|
|
326
|
+
overflow-x: auto;
|
|
327
|
+
tab-size: 4;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
#editor-content code {
|
|
331
|
+
display: block;
|
|
332
|
+
font-family: inherit;
|
|
333
|
+
font-size: inherit;
|
|
334
|
+
line-height: inherit;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Markdown preview in editor (read-only mode) */
|
|
338
|
+
#editor-container .markdown-preview {
|
|
339
|
+
flex: 1;
|
|
340
|
+
min-height: 0; /* Allow flex item to shrink and enable scrolling */
|
|
341
|
+
overflow-y: auto;
|
|
342
|
+
overflow-x: hidden; /* Prevent horizontal scroll - tables have their own scroll */
|
|
343
|
+
-webkit-overflow-scrolling: touch;
|
|
344
|
+
overscroll-behavior: contain;
|
|
345
|
+
padding: var(--sp-16) var(--sp-20);
|
|
346
|
+
font-size: var(--font-size-md);
|
|
347
|
+
line-height: 1.7;
|
|
348
|
+
color: var(--text-primary);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
#editor-container .markdown-preview h1,
|
|
352
|
+
#editor-container .markdown-preview h2,
|
|
353
|
+
#editor-container .markdown-preview h3,
|
|
354
|
+
#editor-container .markdown-preview h4 {
|
|
355
|
+
margin-top: 1.5em;
|
|
356
|
+
margin-bottom: 0.5em;
|
|
357
|
+
font-weight: 600;
|
|
358
|
+
color: var(--text-primary);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
#editor-container .markdown-preview h1 { font-size: 1.8em; }
|
|
362
|
+
#editor-container .markdown-preview h2 { font-size: 1.5em; border-bottom: 1px solid var(--border-primary); padding-bottom: 0.3em; }
|
|
363
|
+
#editor-container .markdown-preview h3 { font-size: 1.25em; }
|
|
364
|
+
|
|
365
|
+
#editor-container .markdown-preview p {
|
|
366
|
+
margin: 1em 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
#editor-container .markdown-preview code {
|
|
370
|
+
background: var(--bg-tertiary);
|
|
371
|
+
padding: var(--sp-2) var(--sp-6);
|
|
372
|
+
border-radius: var(--radius-sm);
|
|
373
|
+
font-family: var(--font-mono);
|
|
374
|
+
font-size: 0.9em;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
#editor-container .markdown-preview pre {
|
|
378
|
+
background: var(--bg-secondary);
|
|
379
|
+
border: 1px solid var(--border-primary);
|
|
380
|
+
border-radius: var(--radius-md);
|
|
381
|
+
padding: var(--sp-12);
|
|
382
|
+
overflow-x: auto;
|
|
383
|
+
overflow-y: clip;
|
|
384
|
+
margin: 1em 0;
|
|
385
|
+
touch-action: pan-x pan-y;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
#editor-container .markdown-preview pre code {
|
|
389
|
+
background: transparent;
|
|
390
|
+
padding: 0;
|
|
391
|
+
overflow-y: clip;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
#editor-container .markdown-preview ul,
|
|
395
|
+
#editor-container .markdown-preview ol {
|
|
396
|
+
margin: 1em 0;
|
|
397
|
+
padding-left: 2em;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
#editor-container .markdown-preview li {
|
|
401
|
+
margin: 0.3em 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
#editor-container .markdown-preview blockquote {
|
|
405
|
+
border-left: 3px solid var(--accent);
|
|
406
|
+
margin: 1em 0;
|
|
407
|
+
padding-left: 1em;
|
|
408
|
+
color: var(--text-secondary);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/* Table wrapper for horizontal scrolling */
|
|
412
|
+
#editor-container .markdown-preview .table-wrapper {
|
|
413
|
+
overflow-x: auto;
|
|
414
|
+
-webkit-overflow-scrolling: touch;
|
|
415
|
+
margin: 1em 0;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
#editor-container .markdown-preview table {
|
|
419
|
+
border-collapse: collapse;
|
|
420
|
+
min-width: 100%;
|
|
421
|
+
margin: 0;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
#editor-container .markdown-preview th,
|
|
425
|
+
#editor-container .markdown-preview td {
|
|
426
|
+
border: 1px solid var(--border-primary);
|
|
427
|
+
padding: var(--sp-8) var(--sp-12);
|
|
428
|
+
text-align: left;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
#editor-container .markdown-preview th {
|
|
432
|
+
background: var(--bg-secondary);
|
|
433
|
+
font-weight: 600;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
#editor-container .markdown-preview a {
|
|
437
|
+
color: var(--accent);
|
|
438
|
+
text-decoration: none;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
#editor-container .markdown-preview a:hover {
|
|
442
|
+
text-decoration: underline;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* Truncated code blocks in markdown preview */
|
|
446
|
+
.markdown-preview .code-block-wrapper {
|
|
447
|
+
position: relative;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.markdown-preview .code-block-wrapper.truncated pre {
|
|
451
|
+
max-height: 250px; /* ~10-12 lines */
|
|
452
|
+
overflow: hidden;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.markdown-preview .code-block-wrapper.truncated::after {
|
|
456
|
+
content: '';
|
|
457
|
+
position: absolute;
|
|
458
|
+
bottom: 0;
|
|
459
|
+
left: 0;
|
|
460
|
+
right: 0;
|
|
461
|
+
height: 60px;
|
|
462
|
+
background: linear-gradient(transparent, var(--bg-secondary));
|
|
463
|
+
pointer-events: none;
|
|
464
|
+
border-radius: 0 0 var(--radius-md) var(--radius-md);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.markdown-preview .code-expand-btn {
|
|
468
|
+
position: absolute;
|
|
469
|
+
bottom: 8px;
|
|
470
|
+
left: 50%;
|
|
471
|
+
transform: translateX(-50%);
|
|
472
|
+
padding: var(--sp-4) var(--sp-12);
|
|
473
|
+
background: var(--bg-tertiary);
|
|
474
|
+
border: 1px solid var(--border-primary);
|
|
475
|
+
border-radius: var(--radius-sm);
|
|
476
|
+
color: var(--text-secondary);
|
|
477
|
+
font-size: var(--font-size-xs);
|
|
478
|
+
cursor: pointer;
|
|
479
|
+
z-index: 1;
|
|
480
|
+
transition: all 0.15s ease;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.markdown-preview .code-expand-btn:hover {
|
|
484
|
+
background: var(--bg-secondary);
|
|
485
|
+
color: var(--text-primary);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.markdown-preview .code-block-wrapper.expanded pre {
|
|
489
|
+
max-height: none;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.markdown-preview .code-block-wrapper.expanded::after {
|
|
493
|
+
display: none;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.markdown-preview .code-block-wrapper.expanded .code-expand-btn {
|
|
497
|
+
position: static;
|
|
498
|
+
transform: none;
|
|
499
|
+
display: block;
|
|
500
|
+
margin: var(--sp-8) auto 0;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/* ═══════════════════════════════════════════════════════════════════
|
|
504
|
+
CodeMirror Search Panel (Cmd+F / Ctrl+F)
|
|
505
|
+
Unscoped: shared by BOTH CM hosts — the file-tab editor
|
|
506
|
+
(#cm-editor-wrapper) and the preview widget's Edit mode
|
|
507
|
+
(.preview-cm-container). Panel DOM built in editor-view.js
|
|
508
|
+
createSearchPanel(): two .cm-search-row rows; the replace row shows
|
|
509
|
+
only when the panel has .replace-visible (chevron or the toolbar's
|
|
510
|
+
search-&-replace button).
|
|
511
|
+
═══════════════════════════════════════════════════════════════════ */
|
|
512
|
+
|
|
513
|
+
.cm-editor .cm-panels {
|
|
514
|
+
background: var(--bg-secondary);
|
|
515
|
+
border: none;
|
|
516
|
+
z-index: var(--z-internal);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.cm-editor .cm-panels-top {
|
|
520
|
+
border-bottom: 1px solid var(--border-primary);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.cm-panel.cm-search {
|
|
524
|
+
display: flex;
|
|
525
|
+
flex-direction: column;
|
|
526
|
+
gap: var(--sp-6);
|
|
527
|
+
padding: var(--sp-6) var(--sp-10);
|
|
528
|
+
background: var(--bg-secondary);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.cm-search-row {
|
|
532
|
+
display: flex;
|
|
533
|
+
align-items: center;
|
|
534
|
+
gap: var(--sp-6);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Replace row hidden until expanded */
|
|
538
|
+
.cm-search-replace-row {
|
|
539
|
+
display: none;
|
|
540
|
+
/* Indent under the search field (chevron column = 22px + gap) */
|
|
541
|
+
padding-left: calc(22px + var(--sp-6));
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.cm-search.replace-visible .cm-search-replace-row {
|
|
545
|
+
display: flex;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.cm-search.replace-visible .cm-search-expand svg {
|
|
549
|
+
transform: rotate(90deg);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* Input fields */
|
|
553
|
+
.cm-panel.cm-search .cm-textfield {
|
|
554
|
+
flex: 1;
|
|
555
|
+
max-width: 260px;
|
|
556
|
+
min-width: 100px;
|
|
557
|
+
padding: var(--sp-5) var(--sp-10);
|
|
558
|
+
background: var(--bg-primary);
|
|
559
|
+
border: 1px solid var(--border-primary);
|
|
560
|
+
border-radius: var(--radius-sm);
|
|
561
|
+
color: var(--text-primary);
|
|
562
|
+
font-size: var(--font-size-sm);
|
|
563
|
+
font-family: var(--font-mono);
|
|
564
|
+
outline: none;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.cm-panel.cm-search .cm-textfield:focus {
|
|
568
|
+
border-color: var(--accent);
|
|
569
|
+
box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* Icon buttons (chevron, prev/next, close) */
|
|
573
|
+
.cm-search-icon-btn {
|
|
574
|
+
display: flex;
|
|
575
|
+
align-items: center;
|
|
576
|
+
justify-content: center;
|
|
577
|
+
width: 22px;
|
|
578
|
+
height: 22px;
|
|
579
|
+
padding: 0;
|
|
580
|
+
background: transparent;
|
|
581
|
+
border: none;
|
|
582
|
+
border-radius: var(--radius-sm);
|
|
583
|
+
color: var(--text-muted);
|
|
584
|
+
cursor: pointer;
|
|
585
|
+
transition: all 0.15s ease;
|
|
586
|
+
flex-shrink: 0;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.cm-search-icon-btn:hover {
|
|
590
|
+
background: var(--bg-tertiary);
|
|
591
|
+
color: var(--text-primary);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.cm-search-icon-btn svg {
|
|
595
|
+
width: 14px;
|
|
596
|
+
height: 14px;
|
|
597
|
+
transition: transform 0.15s ease;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/* Pill toggles (Aa / .*) — styled buttons, not native checkboxes */
|
|
601
|
+
.cm-search-toggle {
|
|
602
|
+
padding: var(--sp-2) var(--sp-6);
|
|
603
|
+
background: transparent;
|
|
604
|
+
border: 1px solid var(--border-primary);
|
|
605
|
+
border-radius: var(--radius-sm);
|
|
606
|
+
color: var(--text-muted);
|
|
607
|
+
font-size: var(--font-size-xs);
|
|
608
|
+
font-family: var(--font-mono);
|
|
609
|
+
line-height: 1.4;
|
|
610
|
+
cursor: pointer;
|
|
611
|
+
transition: all 0.15s ease;
|
|
612
|
+
flex-shrink: 0;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.cm-search-toggle:hover {
|
|
616
|
+
color: var(--text-primary);
|
|
617
|
+
border-color: var(--text-muted);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.cm-search-toggle.active {
|
|
621
|
+
background: rgba(var(--accent-rgb), 0.18);
|
|
622
|
+
border-color: var(--accent);
|
|
623
|
+
color: var(--text-primary);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* Replace / All text buttons */
|
|
627
|
+
.cm-panel.cm-search .cm-button {
|
|
628
|
+
padding: var(--sp-4) var(--sp-10);
|
|
629
|
+
background: var(--bg-tertiary);
|
|
630
|
+
border: 1px solid var(--border-primary);
|
|
631
|
+
border-radius: var(--radius-sm);
|
|
632
|
+
color: var(--text-secondary);
|
|
633
|
+
font-size: var(--font-size-sm);
|
|
634
|
+
cursor: pointer;
|
|
635
|
+
transition: all 0.15s ease;
|
|
636
|
+
flex-shrink: 0;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.cm-panel.cm-search .cm-button:hover {
|
|
640
|
+
background: var(--bg-primary);
|
|
641
|
+
color: var(--text-primary);
|
|
642
|
+
border-color: var(--text-muted);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/* Match count display */
|
|
646
|
+
.cm-search-count {
|
|
647
|
+
font-size: var(--font-size-xs);
|
|
648
|
+
color: var(--text-muted);
|
|
649
|
+
font-family: var(--font-mono);
|
|
650
|
+
white-space: nowrap;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.cm-search-count:empty {
|
|
654
|
+
display: none;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.cm-search-count.no-results {
|
|
658
|
+
color: var(--error);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/* Search match highlighting */
|
|
662
|
+
.cm-editor .cm-searchMatch {
|
|
663
|
+
background-color: rgba(255, 200, 50, 0.3);
|
|
664
|
+
border-radius: var(--radius-xs);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.cm-editor .cm-searchMatch-selected {
|
|
668
|
+
background-color: rgba(255, 200, 50, 0.5);
|
|
669
|
+
outline: 1px solid rgba(255, 200, 50, 0.8);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/* Selection matches (non-search) */
|
|
673
|
+
.cm-editor .cm-selectionMatch {
|
|
674
|
+
background-color: rgba(100, 180, 255, 0.2);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* Mobile adjustments */
|
|
678
|
+
@media (max-width: 768px) {
|
|
679
|
+
#editor-toolbar {
|
|
680
|
+
padding: var(--sp-6) var(--sp-10);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.editor-breadcrumb {
|
|
684
|
+
font-size: var(--font-size-sm);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.editor-btn {
|
|
688
|
+
padding: var(--sp-4) var(--sp-6);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.editor-btn span {
|
|
692
|
+
display: none; /* Hide button text on mobile, show only icon */
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
#editor-content {
|
|
696
|
+
padding: var(--sp-12);
|
|
697
|
+
font-size: var(--font-size-sm);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/* CodeMirror mobile adjustments */
|
|
701
|
+
#cm-editor-wrapper .cm-scroller {
|
|
702
|
+
font-size: var(--font-size-sm);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
#editor-container .markdown-preview {
|
|
706
|
+
padding: var(--sp-12) var(--sp-16);
|
|
707
|
+
font-size: var(--font-size-base);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* Search panel mobile adjustments */
|
|
711
|
+
.cm-panel.cm-search {
|
|
712
|
+
padding: var(--sp-4) var(--sp-8);
|
|
713
|
+
gap: var(--sp-4);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.cm-panel.cm-search .cm-textfield {
|
|
717
|
+
min-width: 80px;
|
|
718
|
+
font-size: var(--font-size-sm);
|
|
719
|
+
padding: var(--sp-4) var(--sp-8);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.cm-panel.cm-search .cm-button {
|
|
723
|
+
padding: var(--sp-4) var(--sp-8);
|
|
724
|
+
font-size: var(--font-size-xs);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/* ═══════════════════════════════════════════════════════════════════════════
|
|
729
|
+
SHARED TOKEN PALETTE
|
|
730
|
+
Single source of truth for syntax colors. Both the CodeMirror editor and
|
|
731
|
+
the preview widget's Code view emit these classes via the shared
|
|
732
|
+
tagHighlighter (buildAppHighlighter in editor-view.js) — same parser, same
|
|
733
|
+
classes, same colors, so Code ⇄ Edit render identically.
|
|
734
|
+
Values mirror the original One-Dark-inspired hljs palette.
|
|
735
|
+
═══════════════════════════════════════════════════════════════════════════ */
|
|
736
|
+
|
|
737
|
+
.tok-keyword { color: #c678dd; } /* keywords, meta/decorators */
|
|
738
|
+
.tok-string { color: #98c379; } /* strings, regexps, attributes */
|
|
739
|
+
.tok-number { color: #d19a66; } /* numbers, bools, atoms */
|
|
740
|
+
.tok-comment { color: #5c6370; font-style: italic; }
|
|
741
|
+
.tok-function { color: #61afef; } /* function names, headings */
|
|
742
|
+
.tok-property { color: #e06c75; } /* object keys (JSON/JS property names) */
|
|
743
|
+
.tok-type { color: #e5c07b; } /* types, classes, namespaces */
|
|
744
|
+
.tok-tag { color: #e06c75; } /* markup tag names */
|
|
745
|
+
.tok-link { color: #61afef; }
|
|
746
|
+
.tok-emphasis { font-style: italic; }
|
|
747
|
+
.tok-strong { font-weight: 600; }
|
|
748
|
+
.tok-invalid { color: #e06c75; }
|