@thanhnguyxn/pixelcraft 0.1.0 β 0.2.0
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.
- package/.agents/plugins/marketplace.json +1 -1
- package/.antigravity-plugin/plugin.json +32 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +15 -4
- package/.codex-plugin/plugin.json +45 -0
- package/.cursor-plugin/marketplace.json +17 -0
- package/.cursor-plugin/plugin.json +27 -0
- package/.devin-plugin/plugin.json +21 -0
- package/.github/plugin/marketplace.json +34 -0
- package/CHANGELOG.md +159 -0
- package/GEMINI.md +1 -0
- package/README.md +185 -328
- package/SECURITY.md +28 -0
- package/assets/pixelcraft-logo-128.png +0 -0
- package/assets/pixelcraft-logo-256.png +0 -0
- package/bin/pixelcraft.mjs +431 -23
- package/docs/ARCHITECTURE.md +40 -37
- package/docs/DESIGN-RATIONALE.md +51 -3
- package/docs/INSTALL.md +221 -0
- package/evals/README.md +16 -6
- package/evals/fixtures/3d-web-engineering.json +69 -0
- package/evals/fixtures/acceptance-checklist-rule03-gate.json +43 -0
- package/evals/fixtures/ai-ui-libraries.json +53 -0
- package/evals/fixtures/audio-visual-accessibility.json +69 -0
- package/evals/fixtures/auth-and-checkout-ui.json +53 -0
- package/evals/fixtures/brandkit-identity-governance.json +48 -0
- package/evals/fixtures/build-and-architecture.json +53 -0
- package/evals/fixtures/canvas-and-node-editors.json +53 -0
- package/evals/fixtures/chat-ai-exfiltration-ime-hitl-gate.json +43 -0
- package/evals/fixtures/completion-gate-scan-until-clean.json +44 -0
- package/evals/fixtures/component-systems.json +53 -0
- package/evals/fixtures/component-testing.json +53 -0
- package/evals/fixtures/constrained-voice-and-tv.json +43 -0
- package/evals/fixtures/creative-code-rendering.json +69 -0
- package/evals/fixtures/creative-reference-evidence.json +67 -0
- package/evals/fixtures/data-app-python-marimo.json +49 -0
- package/evals/fixtures/desktop-cpp-juce-audio.json +49 -0
- package/evals/fixtures/desktop-csharp-avalonia.json +49 -0
- package/evals/fixtures/desktop-native-workspace.json +48 -0
- package/evals/fixtures/desktop-python-anti-tkinter.json +49 -0
- package/evals/fixtures/document-prepress-pdfx4-tounicode.json +43 -0
- package/evals/fixtures/document-rust-typst-invoice.json +49 -0
- package/evals/fixtures/document-typst-and-print-css.json +43 -0
- package/evals/fixtures/email-mjml-dark-mode.json +49 -0
- package/evals/fixtures/email-outlook-and-plaintext.json +43 -0
- package/evals/fixtures/enterprise-data-ui.json +53 -0
- package/evals/fixtures/extended-tui-toolkits.json +53 -0
- package/evals/fixtures/extensions-mv3-and-vscode.json +43 -0
- package/evals/fixtures/file-upload-media-ui.json +53 -0
- package/evals/fixtures/forms-validation.json +53 -0
- package/evals/fixtures/game-go-ebitengine.json +49 -0
- package/evals/fixtures/game-godot-gdscript.json +49 -0
- package/evals/fixtures/game-ui-hud-and-engines.json +43 -0
- package/evals/fixtures/i18n-engineering.json +53 -0
- package/evals/fixtures/local-first-sync.json +53 -0
- package/evals/fixtures/lynxjs.json +53 -0
- package/evals/fixtures/maizzle-email.json +53 -0
- package/evals/fixtures/maps-geospatial.json +53 -0
- package/evals/fixtures/media-og-and-video-export.json +43 -0
- package/evals/fixtures/media-players.json +53 -0
- package/evals/fixtures/mobile-compose-16kb-foldable-store-gate.json +44 -0
- package/evals/fixtures/mobile-elixir-liveview-native.json +49 -0
- package/evals/fixtures/mobile-flutter-dynamic-type.json +49 -0
- package/evals/fixtures/mobile-harmonyos-arkui.json +49 -0
- package/evals/fixtures/mobile-jetpack-compose.json +49 -0
- package/evals/fixtures/mobile-swiftui-ios.json +49 -0
- package/evals/fixtures/motion-engineering.json +69 -0
- package/evals/fixtures/pdfjs-and-pptx.json +53 -0
- package/evals/fixtures/plan-discovery-interview.json +31 -0
- package/evals/fixtures/plan-grill-me-brainstorm-gate.json +49 -0
- package/evals/fixtures/reactive-data-apps.json +53 -0
- package/evals/fixtures/review-evidence-audit.json +43 -0
- package/evals/fixtures/rich-text-and-code-editors.json +53 -0
- package/evals/fixtures/scrollytelling-resilience.json +70 -0
- package/evals/fixtures/spatial-xr-comfort-and-platforms.json +43 -0
- package/evals/fixtures/state-architecture.json +53 -0
- package/evals/fixtures/styling-ecosystem.json +53 -0
- package/evals/fixtures/token-tooling.json +53 -0
- package/evals/fixtures/tui-go-bubbletea.json +49 -0
- package/evals/fixtures/tui-rust-ratatui-grapheme-paste-teardown.json +44 -0
- package/evals/fixtures/tui-rust-ratatui.json +49 -0
- package/evals/fixtures/ux-state-matrix-and-i18n.json +43 -0
- package/evals/fixtures/web-3d-engines.json +53 -0
- package/evals/fixtures/web-php-laravel-filament.json +49 -0
- package/evals/fixtures/web-ruby-viewcomponent-phlex.json +49 -0
- package/evals/pixelcraft-accessibility.md +17 -0
- package/evals/pixelcraft-craft.md +16 -0
- package/evals/pixelcraft-dataviz.md +3 -3
- package/evals/pixelcraft-direction.md +17 -0
- package/evals/pixelcraft-game-ui.md +3 -3
- package/evals/pixelcraft-mobile.md +3 -3
- package/evals/pixelcraft-patterns.md +16 -0
- package/evals/pixelcraft-plan.md +65 -3
- package/evals/pixelcraft-review.md +3 -3
- package/evals/pixelcraft-visual-qa.md +11 -5
- package/evals/pixelcraft-web.md +21 -3
- package/evals/pixelcraft.md +4 -4
- package/gemini-extension.json +3 -2
- package/install.ps1 +57 -11
- package/install.sh +82 -7
- package/package.json +32 -4
- package/plugin.json +6 -1
- package/scripts/build-adapters.mjs +11 -13
- package/scripts/run-evals.mjs +397 -0
- package/scripts/sync-docs.mjs +381 -0
- package/scripts/test-build-adapters.mjs +14 -1
- package/scripts/test-cross-platform-qa.mjs +359 -0
- package/scripts/test-distribution.mjs +86 -7
- package/scripts/test-export-tokens.mjs +259 -3
- package/scripts/test-finish-gate.mjs +133 -10
- package/scripts/test-installers.mjs +155 -6
- package/scripts/test-shoot.mjs +23 -1
- package/scripts/test-slop-scan.mjs +390 -3
- package/scripts/test-style-inventory.mjs +23 -0
- package/scripts/test-sync-docs.mjs +140 -0
- package/scripts/test-validate-skills.mjs +82 -4
- package/scripts/validate-skills.mjs +149 -3
- package/skills/pixelcraft/SKILL.md +67 -47
- package/skills/pixelcraft/references/design-brief.md +2 -2
- package/skills/pixelcraft/references/floor.md +36 -19
- package/skills/pixelcraft/references/report-template.md +25 -11
- package/skills/pixelcraft/references/stack-detection.md +138 -67
- package/skills/pixelcraft/references/surface-acceptance.md +33 -21
- package/skills/pixelcraft/references/workflow-checkpoints.md +49 -7
- package/skills/pixelcraft-accessibility/SKILL.md +34 -13
- package/skills/pixelcraft-accessibility/references/apg-patterns.md +13 -0
- package/skills/pixelcraft-accessibility/references/motion-canvas.md +57 -0
- package/skills/pixelcraft-accessibility/references/platforms.md +34 -6
- package/skills/pixelcraft-accessibility/references/verification.md +15 -10
- package/skills/pixelcraft-accessibility/references/wcag22-checks.md +38 -5
- package/skills/pixelcraft-brandkit/SKILL.md +42 -30
- package/skills/pixelcraft-brandkit/references/asset-pipeline.md +90 -50
- package/skills/pixelcraft-brandkit/references/brand-governance.md +29 -27
- package/skills/pixelcraft-brandkit/references/logo-methods.md +33 -34
- package/skills/pixelcraft-brandkit/references/prompt-template.md +53 -51
- package/skills/pixelcraft-brandkit/references/qa-checklist.md +7 -2
- package/skills/pixelcraft-brandkit/references/visual-modes.md +16 -16
- package/skills/pixelcraft-chat-ui/SKILL.md +31 -27
- package/skills/pixelcraft-chat-ui/references/agentic-workspace.md +66 -0
- package/skills/pixelcraft-chat-ui/references/ai-ui-libraries.md +259 -0
- package/skills/pixelcraft-chat-ui/references/conversation-design.md +12 -6
- package/skills/pixelcraft-chat-ui/references/mobile-business-platforms.md +58 -68
- package/skills/pixelcraft-chat-ui/references/slack-discord.md +60 -76
- package/skills/pixelcraft-constrained/SKILL.md +21 -20
- package/skills/pixelcraft-constrained/references/specialized-hardware.md +69 -45
- package/skills/pixelcraft-constrained/references/tv-wearables.md +123 -73
- package/skills/pixelcraft-constrained/references/voice-ui.md +86 -45
- package/skills/pixelcraft-craft/SKILL.md +29 -15
- package/skills/pixelcraft-craft/references/color.md +62 -6
- package/skills/pixelcraft-craft/references/layout.md +32 -0
- package/skills/pixelcraft-craft/references/motion.md +99 -12
- package/skills/pixelcraft-craft/references/typography.md +48 -9
- package/skills/pixelcraft-data-apps/SKILL.md +50 -31
- package/skills/pixelcraft-data-apps/references/ai-and-internal-data-apps.md +147 -0
- package/skills/pixelcraft-data-apps/references/dash.md +87 -31
- package/skills/pixelcraft-data-apps/references/evidence.md +41 -26
- package/skills/pixelcraft-data-apps/references/gradio.md +65 -27
- package/skills/pixelcraft-data-apps/references/julia-genie.md +64 -29
- package/skills/pixelcraft-data-apps/references/jupyter-widgets.md +65 -27
- package/skills/pixelcraft-data-apps/references/nicegui.md +73 -34
- package/skills/pixelcraft-data-apps/references/observable-framework.md +65 -27
- package/skills/pixelcraft-data-apps/references/panel.md +69 -23
- package/skills/pixelcraft-data-apps/references/r-shiny.md +104 -34
- package/skills/pixelcraft-data-apps/references/reactive-data-apps.md +186 -0
- package/skills/pixelcraft-data-apps/references/reflex.md +85 -31
- package/skills/pixelcraft-data-apps/references/shiny.md +84 -27
- package/skills/pixelcraft-data-apps/references/streamlit.md +73 -25
- package/skills/pixelcraft-dataviz/SKILL.md +21 -24
- package/skills/pixelcraft-dataviz/references/color-accessibility.md +2 -2
- package/skills/pixelcraft-dataviz/references/encoding-tables-dashboards.md +35 -25
- package/skills/pixelcraft-dataviz/references/libraries.md +165 -46
- package/skills/pixelcraft-dataviz/references/maps-geospatial.md +159 -0
- package/skills/pixelcraft-dataviz/references/realtime-graphs-maps-scale.md +58 -65
- package/skills/pixelcraft-desktop/SKILL.md +61 -39
- package/skills/pixelcraft-desktop/references/appkit.md +60 -26
- package/skills/pixelcraft-desktop/references/avalonia.md +65 -29
- package/skills/pixelcraft-desktop/references/cpp-gui.md +104 -27
- package/skills/pixelcraft-desktop/references/electron.md +68 -26
- package/skills/pixelcraft-desktop/references/go-gui.md +59 -30
- package/skills/pixelcraft-desktop/references/gtk.md +74 -31
- package/skills/pixelcraft-desktop/references/javafx-swing.md +54 -25
- package/skills/pixelcraft-desktop/references/qt-pyside-qml.md +57 -30
- package/skills/pixelcraft-desktop/references/rust-gui.md +59 -41
- package/skills/pixelcraft-desktop/references/tauri.md +80 -24
- package/skills/pixelcraft-desktop/references/uno-platform.md +42 -23
- package/skills/pixelcraft-desktop/references/winui-wpf.md +66 -26
- package/skills/pixelcraft-desktop/references/working-context.md +82 -3
- package/skills/pixelcraft-direction/SKILL.md +48 -82
- package/skills/pixelcraft-direction/references/creative-brainstorming.md +72 -0
- package/skills/pixelcraft-direction/references/direction-card.md +11 -1
- package/skills/pixelcraft-direction/references/direction-scoring.md +5 -1
- package/skills/pixelcraft-direction/references/motion-identity.md +67 -0
- package/skills/pixelcraft-direction/references/movements.md +3 -0
- package/skills/pixelcraft-direction/references/reference-analysis.md +37 -0
- package/skills/pixelcraft-direction/references/slop-fingerprints.md +32 -7
- package/skills/pixelcraft-document/SKILL.md +27 -23
- package/skills/pixelcraft-document/references/archetypes.md +27 -4
- package/skills/pixelcraft-document/references/pdf-tools.md +241 -81
- package/skills/pixelcraft-document/references/pdfjs-and-pptx.md +114 -0
- package/skills/pixelcraft-document/references/print-css.md +96 -43
- package/skills/pixelcraft-document/references/slides.md +123 -27
- package/skills/pixelcraft-email/SKILL.md +42 -20
- package/skills/pixelcraft-email/references/client-quirks.md +101 -33
- package/skills/pixelcraft-email/references/html-tables.md +83 -22
- package/skills/pixelcraft-email/references/maizzle.md +54 -0
- package/skills/pixelcraft-email/references/mjml.md +13 -11
- package/skills/pixelcraft-email/references/react-email.md +76 -34
- package/skills/pixelcraft-extensions/SKILL.md +32 -27
- package/skills/pixelcraft-extensions/references/browser-extensions.md +91 -17
- package/skills/pixelcraft-extensions/references/figma-office.md +97 -14
- package/skills/pixelcraft-extensions/references/ide-and-saas-plugins.md +125 -0
- package/skills/pixelcraft-extensions/references/raycast.md +90 -11
- package/skills/pixelcraft-extensions/references/vscode-webviews.md +91 -17
- package/skills/pixelcraft-game-ui/SKILL.md +45 -26
- package/skills/pixelcraft-game-ui/references/bevy.md +69 -31
- package/skills/pixelcraft-game-ui/references/godot.md +100 -27
- package/skills/pixelcraft-game-ui/references/hud-principles.md +50 -21
- package/skills/pixelcraft-game-ui/references/love2d.md +53 -27
- package/skills/pixelcraft-game-ui/references/monogame.md +45 -29
- package/skills/pixelcraft-game-ui/references/unity-ugui.md +109 -0
- package/skills/pixelcraft-game-ui/references/unity-ui-toolkit.md +69 -27
- package/skills/pixelcraft-game-ui/references/unreal-umg.md +53 -26
- package/skills/pixelcraft-game-ui/references/web-and-middleware-game-ui.md +122 -0
- package/skills/pixelcraft-handoff/SKILL.md +14 -13
- package/skills/pixelcraft-handoff/references/design-translation.md +40 -10
- package/skills/pixelcraft-handoff/references/motion-handoff.md +54 -0
- package/skills/pixelcraft-media/SKILL.md +20 -23
- package/skills/pixelcraft-media/references/banners-video.md +83 -65
- package/skills/pixelcraft-media/references/og-generation.md +110 -63
- package/skills/pixelcraft-media/references/social-cards.md +57 -58
- package/skills/pixelcraft-mobile/SKILL.md +53 -36
- package/skills/pixelcraft-mobile/references/dotnet-maui.md +62 -34
- package/skills/pixelcraft-mobile/references/flet.md +53 -26
- package/skills/pixelcraft-mobile/references/flutter.md +76 -32
- package/skills/pixelcraft-mobile/references/harmonyos-and-emerging-mobile.md +121 -0
- package/skills/pixelcraft-mobile/references/ionic-capacitor.md +48 -26
- package/skills/pixelcraft-mobile/references/jetpack-compose.md +92 -24
- package/skills/pixelcraft-mobile/references/kivy.md +54 -31
- package/skills/pixelcraft-mobile/references/kotlin-multiplatform.md +53 -27
- package/skills/pixelcraft-mobile/references/lynxjs.md +110 -0
- package/skills/pixelcraft-mobile/references/nativescript-and-skip.md +91 -0
- package/skills/pixelcraft-mobile/references/react-native-expo.md +66 -31
- package/skills/pixelcraft-mobile/references/swiftui.md +158 -28
- package/skills/pixelcraft-mobile/references/tactile-interactions.md +55 -0
- package/skills/pixelcraft-mobile/references/task-state-composition.md +82 -2
- package/skills/pixelcraft-mobile/references/uikit.md +57 -23
- package/skills/pixelcraft-patterns/SKILL.md +30 -13
- package/skills/pixelcraft-patterns/references/accessibility-resilience.md +29 -0
- package/skills/pixelcraft-patterns/references/ai-and-offline-patterns.md +54 -0
- package/skills/pixelcraft-patterns/references/auth-onboarding.md +32 -13
- package/skills/pixelcraft-patterns/references/billing-paywalls.md +40 -0
- package/skills/pixelcraft-patterns/references/command-workspace.md +56 -0
- package/skills/pixelcraft-patterns/references/commerce.md +35 -16
- package/skills/pixelcraft-patterns/references/communication.md +34 -15
- package/skills/pixelcraft-patterns/references/creative-tools.md +30 -17
- package/skills/pixelcraft-patterns/references/creative-web-composition.md +38 -0
- package/skills/pixelcraft-patterns/references/dashboard-admin.md +22 -18
- package/skills/pixelcraft-patterns/references/history-diff-undo.md +50 -0
- package/skills/pixelcraft-patterns/references/marketing.md +31 -19
- package/skills/pixelcraft-patterns/references/multi-tenant-rbac.md +47 -0
- package/skills/pixelcraft-patterns/references/narrative-systems.md +42 -0
- package/skills/pixelcraft-patterns/references/notifications-activity.md +57 -0
- package/skills/pixelcraft-patterns/references/pattern-selection.md +8 -2
- package/skills/pixelcraft-patterns/references/scheduling-kanban.md +47 -0
- package/skills/pixelcraft-patterns/references/scroll-implementation.md +37 -0
- package/skills/pixelcraft-patterns/references/settings.md +40 -12
- package/skills/pixelcraft-plan/SKILL.md +54 -18
- package/skills/pixelcraft-plan/references/discovery-interview.md +110 -0
- package/skills/pixelcraft-plan/references/grill-me-protocol.md +63 -0
- package/skills/pixelcraft-plan/references/plan-template.md +44 -9
- package/skills/pixelcraft-plan/references/repo-discovery.md +16 -9
- package/skills/pixelcraft-plan/references/stack-freshness.md +22 -5
- package/skills/pixelcraft-plan/references/stack-selection.md +65 -9
- package/skills/pixelcraft-review/SKILL.md +41 -19
- package/skills/pixelcraft-review/references/audit-report.md +20 -1
- package/skills/pixelcraft-review/references/heuristics.md +63 -18
- package/skills/pixelcraft-review/references/personas.md +41 -14
- package/skills/pixelcraft-review/references/polish.md +66 -26
- package/skills/pixelcraft-review/scripts/check-acceptance.mjs +619 -0
- package/skills/pixelcraft-review/scripts/fixtures/focus-longhand-removal.css +34 -0
- package/skills/pixelcraft-review/scripts/slop-scan.mjs +679 -32
- package/skills/pixelcraft-spatial/SKILL.md +16 -17
- package/skills/pixelcraft-spatial/references/comfort-accessibility.md +25 -84
- package/skills/pixelcraft-spatial/references/platforms.md +123 -53
- package/skills/pixelcraft-tokens/SKILL.md +18 -14
- package/skills/pixelcraft-tokens/assets/tokens.example.json +1 -1
- package/skills/pixelcraft-tokens/assets/tokens.modes.example.json +1 -1
- package/skills/pixelcraft-tokens/references/format.md +39 -9
- package/skills/pixelcraft-tokens/references/governance.md +1 -1
- package/skills/pixelcraft-tokens/references/theme-presets.md +36 -8
- package/skills/pixelcraft-tokens/references/token-tooling.md +119 -0
- package/skills/pixelcraft-tokens/scripts/export-tokens.mjs +637 -75
- package/skills/pixelcraft-tui/SKILL.md +41 -25
- package/skills/pixelcraft-tui/references/bubbletea-lipgloss.md +49 -30
- package/skills/pixelcraft-tui/references/extended-tui-toolkits.md +127 -0
- package/skills/pixelcraft-tui/references/ink.md +77 -28
- package/skills/pixelcraft-tui/references/ratatui.md +70 -30
- package/skills/pixelcraft-tui/references/rich.md +53 -33
- package/skills/pixelcraft-tui/references/terminal-protocols.md +80 -0
- package/skills/pixelcraft-tui/references/textual.md +75 -34
- package/skills/pixelcraft-ux/SKILL.md +22 -12
- package/skills/pixelcraft-ux/references/feedback-performance.md +39 -19
- package/skills/pixelcraft-ux/references/forms.md +57 -3
- package/skills/pixelcraft-ux/references/i18n.md +50 -12
- package/skills/pixelcraft-ux/references/laws.md +35 -14
- package/skills/pixelcraft-ux/references/state-matrix.md +15 -1
- package/skills/pixelcraft-ux/references/ux-writing.md +1 -0
- package/skills/pixelcraft-visual-qa/SKILL.md +21 -7
- package/skills/pixelcraft-visual-qa/references/capture-desktop-game.md +28 -7
- package/skills/pixelcraft-visual-qa/references/capture-document.md +70 -0
- package/skills/pixelcraft-visual-qa/references/capture-email.md +13 -9
- package/skills/pixelcraft-visual-qa/references/capture-mobile.md +20 -5
- package/skills/pixelcraft-visual-qa/references/capture-terminal.md +6 -2
- package/skills/pixelcraft-visual-qa/references/motion-capture.md +63 -0
- package/skills/pixelcraft-visual-qa/references/performance-budgets.md +25 -12
- package/skills/pixelcraft-visual-qa/references/realtime-graphics.md +55 -0
- package/skills/pixelcraft-visual-qa/scripts/check-contrast.mjs +442 -0
- package/skills/pixelcraft-visual-qa/scripts/check-email.mjs +397 -0
- package/skills/pixelcraft-visual-qa/scripts/check-pdf.mjs +189 -0
- package/skills/pixelcraft-visual-qa/scripts/check-tui.mjs +321 -0
- package/skills/pixelcraft-visual-qa/scripts/finish-gate.mjs +50 -11
- package/skills/pixelcraft-visual-qa/scripts/shoot.mjs +214 -59
- package/skills/pixelcraft-visual-qa/scripts/style-inventory.mjs +121 -49
- package/skills/pixelcraft-web/SKILL.md +105 -49
- package/skills/pixelcraft-web/references/accessibility-performance.md +42 -0
- package/skills/pixelcraft-web/references/adaptive-layout.md +52 -8
- package/skills/pixelcraft-web/references/angular.md +63 -16
- package/skills/pixelcraft-web/references/assets-pipeline.md +67 -0
- package/skills/pixelcraft-web/references/astro.md +64 -13
- package/skills/pixelcraft-web/references/audio-reactive.md +61 -0
- package/skills/pixelcraft-web/references/auth-and-checkout-ui.md +115 -0
- package/skills/pixelcraft-web/references/build-and-architecture.md +215 -0
- package/skills/pixelcraft-web/references/canvas-and-node-editors.md +157 -0
- package/skills/pixelcraft-web/references/clojurescript.md +52 -17
- package/skills/pixelcraft-web/references/component-systems.md +102 -0
- package/skills/pixelcraft-web/references/component-testing.md +170 -0
- package/skills/pixelcraft-web/references/creative-effects.md +59 -0
- package/skills/pixelcraft-web/references/creative-runtime.md +34 -0
- package/skills/pixelcraft-web/references/enterprise-data-ui.md +138 -0
- package/skills/pixelcraft-web/references/file-upload-media-ui.md +82 -0
- package/skills/pixelcraft-web/references/forms-validation.md +123 -0
- package/skills/pixelcraft-web/references/fsharp-fable.md +3 -2
- package/skills/pixelcraft-web/references/gsap.md +102 -0
- package/skills/pixelcraft-web/references/html-css.md +144 -12
- package/skills/pixelcraft-web/references/htmx-alpine.md +68 -18
- package/skills/pixelcraft-web/references/i18n-engineering.md +106 -0
- package/skills/pixelcraft-web/references/interaction-and-search-primitives.md +196 -0
- package/skills/pixelcraft-web/references/java-web.md +27 -18
- package/skills/pixelcraft-web/references/kotlin-web.md +6 -2
- package/skills/pixelcraft-web/references/leptos-yew.md +62 -19
- package/skills/pixelcraft-web/references/lit-web-components.md +4 -2
- package/skills/pixelcraft-web/references/local-first-sync.md +105 -0
- package/skills/pixelcraft-web/references/media-players.md +104 -0
- package/skills/pixelcraft-web/references/motion-react.md +96 -0
- package/skills/pixelcraft-web/references/motion-recipes.md +82 -0
- package/skills/pixelcraft-web/references/preact-fresh-hono.md +111 -0
- package/skills/pixelcraft-web/references/pwa.md +6 -1
- package/skills/pixelcraft-web/references/qwik.md +51 -11
- package/skills/pixelcraft-web/references/r3f-integration.md +69 -0
- package/skills/pixelcraft-web/references/react-next.md +112 -13
- package/skills/pixelcraft-web/references/rendering-choice.md +63 -0
- package/skills/pixelcraft-web/references/rendering-performance.md +80 -0
- package/skills/pixelcraft-web/references/rich-text-and-code-editors.md +220 -0
- package/skills/pixelcraft-web/references/rive-lottie.md +73 -0
- package/skills/pixelcraft-web/references/scene-architecture.md +132 -0
- package/skills/pixelcraft-web/references/server-rendered.md +106 -63
- package/skills/pixelcraft-web/references/shader-workflow.md +77 -0
- package/skills/pixelcraft-web/references/smooth-scroll.md +58 -0
- package/skills/pixelcraft-web/references/solid.md +67 -16
- package/skills/pixelcraft-web/references/state-architecture.md +107 -0
- package/skills/pixelcraft-web/references/styling-ecosystem.md +273 -0
- package/skills/pixelcraft-web/references/svelte.md +61 -11
- package/skills/pixelcraft-web/references/tailwind.md +40 -14
- package/skills/pixelcraft-web/references/video-media.md +69 -0
- package/skills/pixelcraft-web/references/vue-nuxt.md +37 -13
- package/skills/pixelcraft-web/references/web-3d-engines.md +97 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pixelcraft-tui
|
|
3
|
-
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into terminal user interfaces across Textual, Rich, Ink, Bubble Tea/Lip Gloss, and
|
|
3
|
+
description: Translates Pixelcraft direction, tokens, UX, and floor requirements into terminal user interfaces across Textual, Rich, Ink, Bubble Tea v2/Lip Gloss, Ratatui, Terminal.Gui, Spectre.Console, prompt_toolkit, OpenTUI, FTXUI, and Clack/CLI prompts. Use for keyboard-first CLI apps, dashboards, installers, logs, forms, character-grid layout, Kitty/Sixel/OSC 8/DEC 2026 terminal protocols, NO_COLOR fallback, resizing, snapshots, accessibility, and state feedback.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
version: 0.1.0
|
|
@@ -16,45 +16,61 @@ Give repeated keyboard work stable regions: list or prompt, result, status and a
|
|
|
16
16
|
|
|
17
17
|
## Detection signals
|
|
18
18
|
|
|
19
|
-
Python `textual`/`rich`, Node `ink`, Go `bubbletea`/`lipgloss`/`tcell`/`tview`, Rust `ratatui`/`crossterm`, alternate-screen/raw-mode setup, keybinding tables, snapshot tests, terminal capability handling.
|
|
19
|
+
Python `textual`/`rich`/`prompt_toolkit`/`questionary`, Node/Bun `ink`/`@inkjs/ui`/`@opentui/*`/`@clack/prompts`/`@inquirer/prompts`, Go `bubbletea`/`lipgloss`/`huh`/`tcell`/`tview`, Rust `ratatui`/`crossterm`/`cliclack`/`inquire`/`dialoguer`, .NET `Terminal.Gui`/`Spectre.Console`, C++ `ftxui`/`notcurses`, alternate-screen/raw-mode setup, keybinding tables, snapshot tests, and terminal capability handling.
|
|
20
20
|
|
|
21
21
|
## Translate direction to terminal idioms
|
|
22
22
|
|
|
23
23
|
1. Treat cells/rows/columns as the layout system. Establish alignment, scanlines, density, focus, and rhythm explicitly.
|
|
24
24
|
2. Map tokens to semantic styles supported by the framework; do not assume truecolor, Unicode width, mouse support, or persistent screen size.
|
|
25
25
|
3. Keyboard-first means every task has discoverable keys, focus/order, escape/cancel behavior, help, and no hidden mouse-only path.
|
|
26
|
-
4. Use color as enhancement; meaning must survive 16-color, monochrome, low contrast, and `NO_COLOR` environments.
|
|
27
|
-
5. Unicode box glyphs/braille/sparklines need fallback glyphs or
|
|
28
|
-
6. Design resize behavior: minimum dimensions, truncation/wrapping, pane priority, scrollback vs alternate screen, and terminal reflow.
|
|
26
|
+
4. Use color as enhancement; meaning must survive 16-color, monochrome, low contrast, `TERM=dumb`, and `NO_COLOR` environments.
|
|
27
|
+
5. Unicode box glyphs/braille/sparklines/graphics protocols need fallback glyphs or plain-text degradation because terminal and `tmux` support varies.
|
|
28
|
+
6. Design resize behavior: minimum dimensions (`80Γ24`), truncation/wrapping, pane priority, scrollback vs alternate screen, and terminal reflow.
|
|
29
29
|
|
|
30
30
|
## Platform-wide rules
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
32
|
+
- **Startup latency & flicker-free live resize**: hit **`< 200 ms` cold startup latency** (measured with `hyperfine` or `time`) for compact CLIs/TUIs, and verify **flicker-free live resize** across **`80Γ24`** (minimum floor) and **`120Γ36`** (standard workspace) using DEC Mode `2026` synchronized output where supported.
|
|
33
|
+
- **Grapheme-cluster width (`UAX #29`) & `--ascii` fallback**: **never** measure column width with `.length`, `.len()`, or UTF-16 code units! Compute **`UAX #29` grapheme-cluster + East Asian Width** (`unicode-width` + `unicode-segmentation` in Rust, `uniseg`/`go-runewidth` in Go, `Intl.Segmenter` + `string-width` in Node, `wcwidth`/`rich.cells` in Python) so **CJK (`2` cols), ZWJ Emoji (`π¨βπ©βπ§βπ¦` = `2` cols), `VS16` (`β οΈ` = `2` cols), and Vietnamese combining diacritics (`0` extra cols)** never corrupt box borders; degrade to `--ascii` / `+--+` glyphs when `TERM=dumb` or locale is non-UTF-8.
|
|
34
|
+
- **`DECSET 2004` Bracketed Paste & `OSC 52` clipboard**: enable Bracketed Paste (`\x1b[?2004h` β¦ `\x1b[?2004l`) on interactive inputs so multi-line pastes never fire each newline as an accidental `Enter` confirmation; support **`OSC 52`** escape sequences for copying over remote SSH/`tmux` sessions alongside local OS clipboards.
|
|
35
|
+
- **Stream hygiene, `SIGPIPE`, color tiers & `--plain` screen-reader mode**: send interactive TUI chrome, spinners, and progress bars to `stderr` (or alternate screen only when `isatty(stdout)`); write machine-parseable output (`--json`, `--plain`) strictly to `stdout`; handle **`SIGPIPE` / `EPIPE` / `BrokenPipeError`** (`| head -n 5` / `| jq`) silently without stack traces; and verify **`16-color` (dark + light ANSI)**, **`256-color`**, **`NO_COLOR=1`**, `TERM=dumb`, `CI=true`, and a **`--plain` screen-reader non-animated mode** (linear line-by-line output with zero cursor-rewriting spinners).
|
|
36
|
+
- **6-step panic & signal terminal restoration**: on normal exit, `SIGINT`, `SIGTERM`, `SIGHUP`, and uncaught panics/exceptions, execute all 6 teardown steps in order: **(1)** leave alternate screen `?1049l`, **(2)** disable mouse tracking `?1000l/?1002l/?1003l/?1006l`, **(3)** disable bracketed paste `?2004l`, **(4)** disable synchronized output `?2026l` (and clear `OSC 9;4` progress), **(5)** pop Kitty keyboard flags `\x1b[<u`, **(6)** show cursor `?25h` & exit raw mode.
|
|
37
|
+
- **CLI distribution, `SHA-256` signatures & uninstall contract**: ship `--help`, `--version`, semantic exit codes (**`0`** ok, **`1`** runtime error, **`2`** usage error, **`130`** `SIGINT`), **shell completions (`bash`, `zsh`, `fish`, `pwsh`)**, a `man` page, Homebrew/Winget/Scoop/Cargo/npm binary packaging, **release `SHA-256` checksums/signatures**, and **explicit uninstall instructions** (cleaning binaries, completions, and config paths).
|
|
38
|
+
|
|
39
|
+
## Anti-lazy-default & anti-slop guard
|
|
40
|
+
|
|
41
|
+
- **Reject raw `print()` / `console.log()` / manual ANSI escape spaghetti** (`\x1b[31m...`) when structured TUI/CLI libraries fit the language: **Rich** / **Textual** (Python), **Bubble Tea v2 + Lip Gloss v2 + Huh** (Go), **Ratatui** (Rust), **Ink** / **`@clack/prompts`** (Node/Bun), or **Spectre.Console** / **Terminal.Gui v2** (.NET).
|
|
42
|
+
- **Match buffer mode to task scope**: use inline CLI prompts/output for one-shot commands and reserve full-screen alternate-buffer TUIs for persistent interactive workspaces; reject decorative ASCII banners that crowd out real data at `80Γ24`.
|
|
38
43
|
|
|
39
44
|
## Common TUI failures
|
|
40
45
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
- full-screen alternate buffer used for simple one-shot output.
|
|
46
|
+
- measuring columns with `.length`/`.len()` so CJK, ZWJ emoji (`π¨βπ©βπ§βπ¦`), `β οΈ`, or Vietnamese diacritics break borders;
|
|
47
|
+
- `> 500 ms` sluggish startup, missing `--plain` non-animated screen-reader mode, or tearing on `80Γ24` β `120Γ36` live resize;
|
|
48
|
+
- missing `?2004h` Bracketed Paste causing pasted multi-line configs to execute every line on `Enter`;
|
|
49
|
+
- crashing with `BrokenPipeError` / `EPIPE` / Rust `.unwrap()` panic when piped into `head -n 5`, or leaking spinner ANSI to `stdout`;
|
|
50
|
+
- hardcoded `#ffffff` text unreadable on light 16-color terminals, or color-only diffs invisible under `NO_COLOR=1`;
|
|
51
|
+
- incomplete panic/signal teardown leaving `?1049h`, mouse tracking `?1003h`, `?2026h`, or Kitty `CSI u` stuck in the user's shell;
|
|
52
|
+
- missing `--version`, completions, `man` page, `SHA-256` release checksums, uninstall instructions, or exiting `0` on failure.
|
|
49
53
|
|
|
50
54
|
## Verification options
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
Passing a unit test without a rendered frame/buffer/recording is `static`, never `rendered` (**Rule #0.3**). Deliver `hyperfine`/`time` startup benchmarks (`< 200 ms`), **`asciinema` or Charm `VHS` terminal recordings**, framework snapshot tests (`Pilot`, `TestBackend`+`insta`, `Teatest`, `ink-testing-library`), and rendered checks across **`iTerm2` / `Terminal.app`, `Windows Terminal`, `GNOME Terminal`, `tmux`, and `SSH`** (`rendered`, labeling unavailable OS emulators `not-checked`).
|
|
57
|
+
|
|
58
|
+
## Pre-submit checklist
|
|
59
|
+
|
|
60
|
+
- [ ] zero `TODO`s, placeholder stubs, dead keybindings, or raw hardcoded ANSI escape spaghetti;
|
|
61
|
+
- [ ] **`< 200 ms` startup latency** (`hyperfine`/`time`), **`UAX #29` grapheme width** (CJK `2`, ZWJ emoji `2`, `VS16` `2`, Vietnamese diacritics `0`), `--ascii` fallback, and **flicker-free `80Γ24` + `120Γ36` live resize** verified;
|
|
62
|
+
- [ ] `DECSET 2004` Bracketed Paste (`?2004h`β¦`?2004l`) and `OSC 52` SSH/`tmux` + local clipboard wired;
|
|
63
|
+
- [ ] `stderr`/`stdout` separation, silent `SIGPIPE`/`EPIPE`/`BrokenPipeError` exit (`| head -n 5`), **`16-color` (dark+light)**, **`256-color`**, **`NO_COLOR=1`**, `TERM=dumb`, `CI=true`, and **`--plain` screen-reader non-animated mode** verified;
|
|
64
|
+
- [ ] full 6-step terminal restoration (`?1049l`, mouse `?1000β1006l`, `?2004l`, `?2026l`, `\x1b[<u`, `?25h` + raw mode) verified on exit, `SIGINT`/`SIGTERM`/`SIGHUP`, and panic;
|
|
65
|
+
- [ ] `--help`, `--version`, `0/1/2/130` exit codes, `bash`/`zsh`/`fish`/`pwsh` completions, `man` page, **`SHA-256` release checksums/signatures + uninstall instructions**, and **`asciinema`/`VHS` + multi-terminal (`iTerm2`/`Terminal.app`, `Windows Terminal`, `GNOME Terminal`, `tmux`, `SSH`)** deliverables verified or labeled `not-checked`;
|
|
66
|
+
- [ ] **Checklist-Until-Passing Stop-Gate (`<HARD-GATE>`):** walk every checklist item above + run `slop-scan.mjs --fail-on p2`, `check-tui.mjs` (`--cols 80`, `--cols 120`, `NO_COLOR=1`), compiler/tests, and `check-acceptance.mjs .pixelcraft/acceptance.json` (`pixelcraft-review`) in a `Fix β Re-verify` loop until passing (`0` `fail`/`pending` rows, `rendered` evidence on visual/perf/a11y per `Rule #0.3`).
|
|
53
67
|
|
|
54
68
|
## Framework routing
|
|
55
69
|
|
|
56
|
-
- Read [references/
|
|
57
|
-
- Read [references/
|
|
58
|
-
- Read [references/
|
|
59
|
-
- Read [references/
|
|
60
|
-
- Read [references/
|
|
70
|
+
- Read [references/terminal-protocols.md](references/terminal-protocols.md) when implementing DEC Mode 2026 synchronized output, Kitty/Sixel/iTerm2 graphics fallbacks, OSC 8 hyperlinks, Kitty keyboard protocol (`CSI u`), OSC 52 clipboard, OSC 9;4 progress, or `NO_COLOR`/`TERM`/`isatty` capability handling.
|
|
71
|
+
- Read [references/textual.md](references/textual.md) when building Python Textual apps with `Theme`, TCSS cell units, `CommandPalette`, `@work(exclusive=True)`, and `Pilot`/SVG snapshots.
|
|
72
|
+
- Read [references/rich.md](references/rich.md) when building Python Rich CLI output, `Theme` consoles, `stderr` progress/live displays, or markup-safe logging.
|
|
73
|
+
- Read [references/ink.md](references/ink.md) when building Node/Bun Ink 5/6 (React 19) terminal UIs with `<Static>`, `useInput`, `useFocus`, `@inkjs/ui`, and `ink-testing-library`.
|
|
74
|
+
- Read [references/bubbletea-lipgloss.md](references/bubbletea-lipgloss.md) when building Go Bubble Tea v2 / Lip Gloss v2 TUIs or using the Charm ecosystem (Huh, Bubbles, Glamour, Gum, Fang, Teatest).
|
|
75
|
+
- Read [references/ratatui.md](references/ratatui.md) when building Rust Ratatui (`0.28β0.30+`) TUIs with `ratatui::run`/`init`+`restore`, `Constraint::Fill`/`Flex`, `ratatui-image`, and `TestBackend`+`insta`.
|
|
76
|
+
- Read [references/extended-tui-toolkits.md](references/extended-tui-toolkits.md) when building .NET `Terminal.Gui v2` or `Spectre.Console`, Python `prompt_toolkit`, `OpenTUI`, C++ `FTXUI`, `Notcurses`, Go `tcell`/`tview`, migrating off Blessed, or choosing inline CLI prompts (`@clack/prompts`, `@inquirer/prompts`, `questionary`, `cliclack`/`inquire`/`dialoguer`).
|
|
@@ -1,60 +1,79 @@
|
|
|
1
|
-
# Bubble Tea
|
|
1
|
+
# Bubble Tea & Lip Gloss (Go / Charm ecosystem)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Bubble Tea v2 & Lip Gloss v2 idioms
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Bubble Tea **v2** (alongside v1 in existing reposβcheck `go.mod` module path before editing) introduces major craft and performance upgrades:
|
|
6
|
+
|
|
7
|
+
- **Declarative `tea.View` struct (v2)**: `View()` returns a `tea.View` value (e.g., `tea.NewView(content)`) where `AltScreen`, `MouseMode`, `WindowTitle`, `ProgressBar` (OSC 9;4), and cursor position are declared directly from model state instead of imperative startup options or command toggles.
|
|
8
|
+
- **Cursed Renderer**: cell-level diffing renderer minimizing terminal writes and flicker on high-frequency updates.
|
|
9
|
+
- **Built-in Kitty Keyboard Protocol & `tea.KeyPressMsg`**: accurate disambiguation of `shift+enter`, `ctrl+i` vs `tab`, and release events while degrading gracefully on legacy terminals.
|
|
10
|
+
- **Lip Gloss v2**: built-in **`table`**, **`tree`**, and **`list`** subpackages, compositing **`Layer` / `Canvas`** for clean modal overlays over panes without corrupting background cells, and automatic color **downsampling** (TrueColor β ANSI 256 β ANSI 16 β ASCII/`NO_COLOR`) via color profile detection.
|
|
6
11
|
|
|
7
12
|
```go
|
|
8
|
-
|
|
13
|
+
// Bubble Tea v2 declarative View() + semantic Lip Gloss styles:
|
|
14
|
+
type PcStyles struct {
|
|
15
|
+
Action lipgloss.Style
|
|
16
|
+
Error lipgloss.Style
|
|
17
|
+
Focus lipgloss.Style
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
func (m model) View() tea.View {
|
|
21
|
+
content := m.styles.Focus.Render("> "+m.selectedTitle()) + "\n" + m.helpView()
|
|
22
|
+
v := tea.NewView(content)
|
|
23
|
+
v.AltScreen = true
|
|
24
|
+
v.WindowTitle = "Invoices"
|
|
25
|
+
return v
|
|
26
|
+
}
|
|
9
27
|
```
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Layout and responsive idioms
|
|
14
|
-
|
|
15
|
-
Use width/height messages to recompute layout, Lip Gloss join/place/align helpers deliberately, truncation/wrapping libraries/helpers carefully, and define minimum terminal dimensions. Keep scanlines/alignment stable across updates. Alternate screen vs inline output is an intentional choice.
|
|
16
|
-
|
|
17
|
-
## Typography/custom fonts
|
|
18
|
-
|
|
19
|
-
Terminals control fonts. Use bold/faint/italic/underline/reverse/color and spacing. Unicode width and emoji/CJK behavior need width-aware libraries/fallbacks. Do not center everything by naive string length because printable width differs.
|
|
29
|
+
*(In Bubble Tea v1 repos, `View() string` returns the string directly and `tea.WithAltScreen()` is passed to `tea.NewProgram`.)*
|
|
20
30
|
|
|
21
|
-
##
|
|
31
|
+
## Broader Charm ecosystem decision table
|
|
22
32
|
|
|
23
|
-
|
|
33
|
+
Reuse first-party Charm libraries instead of reimplementing terminal primitives from scratch:
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
| Library | Role | When to use |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **Bubbles** | Core widgets (`textinput`, `textarea`, `viewport`, `table`, `list`, `progress`, `spinner`, `help`, `key`) | Standard interactive controls inside Bubble Tea apps with built-in keymaps |
|
|
38
|
+
| **Huh** | Interactive CLI forms & multi-step wizards (`huh.NewForm`) | Setup wizards, config prompts, validated inputs; supports **`huh.WithAccessible(true)`** screen-reader-friendly linear mode |
|
|
39
|
+
| **Glamour** | Styled terminal Markdown renderer | Release notes, docs, AI responses, help pages with width-aware wrapping |
|
|
40
|
+
| **Gum** | Composable shell-scriptable TUI primitives | Bash/CI scripts needing quick filter/choose/confirm/spin UX without a Go binary |
|
|
41
|
+
| **Fang** | Modern Cobra CLI wrapper | Styled help text, manpages, version output, and shell completions out of the box |
|
|
42
|
+
| **Teatest** | Headless Bubble Tea test harness (`x/exp/teatest`) | Automated keystroke simulation, resize tests, and golden output assertions |
|
|
26
43
|
|
|
27
|
-
|
|
44
|
+
## Token mapping, `UAX #29` width, & `--ascii` fallback
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
Centralize semantic `lipgloss.Style` definitions in one styles struct derived from detected terminal color profile / light-dark background (`lipgloss.HasDarkBackground` / v2 background-color query) so colors never clash on light terminals or disappear under `NO_COLOR=1` (never hardcode `#ffffff` or `#000000` without adapting to background luminance).
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
Always recompute pane widths/heights on `tea.WindowSizeMsg` using **`lipgloss.Width(...)`**, **`github.com/rivo/uniseg`** (`uniseg.StringWidth` / `uniseg.NewGraphemes`), or `go-runewidth`β**never** Go `len(str)` or `utf8.RuneCountInString(str)`, which corrupt borders on CJK (`2` cols), ZWJ emoji (`π¨βπ©βπ§βπ¦` = `2` cols), `VS16` (`β οΈ` = `2` cols), and Vietnamese combining diacritics (`0` extra cols). Switch `lipgloss.RoundedBorder()` to `lipgloss.ASCIIBorder()` when `--ascii`, `TERM=dumb`, or non-UTF-8 locale is detected, and define a clean `80Γ24` minimum layout.
|
|
32
49
|
|
|
33
|
-
##
|
|
50
|
+
## Bracketed Paste, `OSC 52`, `SIGPIPE`, 6-step teardown & CLI packaging
|
|
34
51
|
|
|
35
|
-
|
|
52
|
+
- **Bracketed Paste (`DECSET 2004`) & `OSC 52` clipboard**: handle `tea.PasteMsg` (Bubble Tea enables `?2004h` automatically) so pasted multi-line configs enter `textarea`/`textinput` cleanly without firing `enter` per newline; copy via **`OSC 52`** (`github.com/aymanbagabas/go-osc52/v2` / Bubble Tea v2 `tea.SetClipboard`) alongside local OS clipboard so remote SSH/`tmux` copies work out of the box.
|
|
53
|
+
- **Stream hygiene, `EPIPE`, & 6-step panic/signal restoration**: run interactive Bubble Tea on `tea.WithOutput(os.Stderr)` when `stdout` must emit pipeable selections, write `--json`/`--plain` strictly to `os.Stdout` while ignoring `errors.Is(err, syscall.EPIPE)` (exiting `0` silently on `| head -n 5`), and ensure `recover()` + `SIGINT`/`SIGTERM`/`SIGHUP` handlers complete the full 6-step terminal reset (`?1049l`, mouse `?1000l/?1002l/?1003l/?1006l`, `?2004l`, `?2026l`, `\x1b[<u`, `?25h` + raw mode restoreβsee [terminal-protocols.md](terminal-protocols.md)).
|
|
54
|
+
- **Accessibility, exit codes & distribution**: keep `tea.Tick` bounded, cancel async work via `context.Context` + request generation IDs, honor `ACCESSIBLE=1` (`huh.WithAccessible(true)`), use semantic exit codes (`0`, `1`, `2`, `130`), and wire **Fang** / Cobra to emit `--help`, `--version`, **`bash`/`zsh`/`fish`/`pwsh` completions**, **`man` pages**, and **GoReleaser** Homebrew/Winget/Scoop binaries.
|
|
36
55
|
|
|
37
56
|
## Do/don't pairs
|
|
38
57
|
|
|
39
58
|
| Do | Don't |
|
|
40
59
|
|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
60
|
+
| Measure/truncate graphemes with `lipgloss.Width` / `rivo/uniseg` + `lipgloss.ASCIIBorder()` fallback | Align columns with `len(s)` or `utf8.RuneCountInString(s)` (corrupts CJK, `π¨βπ©βπ§βπ¦`, and Vietnamese) |
|
|
61
|
+
| Handle `tea.PasteMsg` (`?2004h`), `OSC 52` SSH copy, and full 6-step reset on panic/signal | Treat pasted newlines as `Enter` submits or leave `?1049h`/`CSI u` active on panic |
|
|
62
|
+
| Route TUI chrome to `stderr` when piping, ignore `syscall.EPIPE` on `stdout`, and ship Fang/Cobra completions + `man` | Pollute `stdout` JSON with spinner ANSI codes or print errors on `mycli --plain \| head -n 5` |
|
|
63
|
+
| Recompute layout on every `tea.WindowSizeMsg` (tested at `80Γ24`) + light/dark-adaptive styles | Hard-code `120` columns or `#ffffff` text unreadable on light terminals |
|
|
64
|
+
| Use Bubble Tea v2 `tea.View` + Lip Gloss v2 `Layer` + **Huh** (`WithAccessible`) + **Teatest** | Mix v1 `tea.EnterAltScreen` commands with v2 `tea.View` or skip automated TUI tests |
|
|
46
65
|
|
|
47
66
|
## Known traps
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
Measuring printable width with `len()` or `RuneCountInString()` instead of `lipgloss.Width()` / `uniseg`, forgetting `recover()` cleanup when spawning custom goroutines, leaving alt-screen/raw mode active on non-TTY piped output, unhandled `EPIPE` errors when piped to `head`, ignoring light-background terminal contrast.
|
|
50
69
|
|
|
51
70
|
## Verification commands
|
|
52
71
|
|
|
53
72
|
```sh
|
|
54
73
|
go test ./...
|
|
55
74
|
go vet ./...
|
|
56
|
-
go run ./cmd/app --help
|
|
57
|
-
|
|
75
|
+
NO_COLOR=1 COLUMNS=80 go run ./cmd/app --help
|
|
76
|
+
go run ./cmd/app --plain | head -n 5
|
|
58
77
|
```
|
|
59
78
|
|
|
60
|
-
|
|
79
|
+
`go test` (including **Teatest** golden-file simulations) and `go vet` provide `static`/virtual-buffer evidence. Run the binary in real dark and light terminals at `80Γ24`, `NO_COLOR=1`, `TERM=dumb`, `--ascii`, multi-line paste, and piped `head -n 5` for `rendered` evidence; label untested emulators `not-checked`.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Extended TUI toolkits & CLI prompt libraries
|
|
2
|
+
|
|
3
|
+
For Python Textual/Rich, Node Ink, Go Bubble Tea/Lip Gloss, and Rust Ratatui, read their dedicated references in `pixelcraft-tui`. Use this reference for **.NET (`Terminal.Gui v2`, `Spectre.Console`), Python `prompt_toolkit`, OpenTUI, C++ `FTXUI`, `Notcurses`, Go `tcell`/`tview`, legacy Blessed migration, and inline CLI prompt libraries**.
|
|
4
|
+
|
|
5
|
+
## CLI prompts vs full-screen TUI (choose the right surface first)
|
|
6
|
+
|
|
7
|
+
Do **not** launch an alternate-screen full-screen TUI for a linear setup wizard, scaffolder, or one-shot confirmationβpreserving terminal scrollback makes copy-paste, error inspection, and CI debugging far cleaner:
|
|
8
|
+
|
|
9
|
+
| Mode | When to choose | Modern libraries |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| **Inline CLI prompts** (scrollback-preserving) | Linear wizards, `init` scaffolders, auth/confirm flows, 1β5 step inputs | **TS/JS**: `@clack/prompts` (clean linear rail aesthetic), `@inquirer/prompts` (modular modern rewrite) Β· **Python**: `questionary` (`prompt_toolkit`-backed) Β· **Rust**: `cliclack`, `inquire`, `dialoguer` Β· **Go**: Charm `huh` / `gum` Β· **.NET**: `Spectre.Console` |
|
|
12
|
+
| **Full-screen TUI** (alternate buffer) | Live monitoring, multi-pane browsing, log/DB/git exploration, persistent keyboard workspaces | Textual, Bubble Tea v2, Ratatui, Ink, **Terminal.Gui v2**, **OpenTUI**, **FTXUI**, **tview** |
|
|
13
|
+
|
|
14
|
+
Always pair inline prompts with non-interactive flags (`--yes`, `--json`, env vars) and check `isatty` so CI pipelines never hang waiting on stdin.
|
|
15
|
+
|
|
16
|
+
## Extended full-screen & REPL toolkit matrix
|
|
17
|
+
|
|
18
|
+
| Toolkit | Ecosystem | UI model | Best fit & key caveats |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| **Terminal.Gui (v2)** | .NET / C# | Retained widget toolkit (`Window`, `MenuBar`, `TableView`, `Pos`/`Dim`, `Scheme`) | .NET admin consoles, DB/file browsers; always wrap `Application.Init()` / `Shutdown()` in `try`/`finally` |
|
|
21
|
+
| **Spectre.Console** | .NET / C# | Inline rich CLI (`Table`, `Tree`, `Progress`, `Live`, `SelectionPrompt`) | Modern .NET CLIs & installers; escape user input with `Markup.Escape()` |
|
|
22
|
+
| **prompt_toolkit (v3)** | Python | Readline-plus REPL (`PromptSession`, `WordCompleter`, `patch_stdout`) & full-screen `Application` | Interactive SQL/AI/dev REPLs & multiline code prompts; for CSS dashboards prefer **Textual** |
|
|
23
|
+
| **OpenTUI** | TS/JS + Zig | Zig-powered high-FPS native cell renderer with `@opentui/core`, `@opentui/react`, `@opentui/solid` | Performance-sensitive TS/React/Solid TUIs needing native cell diffing beyond Ink/Yoga |
|
|
24
|
+
| **FTXUI** | C++ (17+) | Functional declarative C++ TUI (`ScreenInteractive`, `vbox`/`hbox`/`flex`, `CatchEvent`) | Zero-dependency native C++ CLIs, profilers, and embedded Linux diagnostics |
|
|
25
|
+
| **tcell / tview** | Go | `tcell` (low-level terminal cell/event engine) + `tview` (imperative widget library: `Table`, `TreeView`, `Flex`) | Existing Go repos using `tview`/`k9s`-style widgets; for new Go TUIs compare **Bubble Tea v2** (Elm architecture, richer ecosystem) |
|
|
26
|
+
| **Notcurses** | C / C++ / Rust | High-throughput multimedia/blitter TUI engine | Specialized visual/media terminal apps; heavy capability assumptions require plain fallback when unsupported |
|
|
27
|
+
|
|
28
|
+
**Blessed / Neo-Blessed migration note**: `blessed` and `neo-blessed` are legacy, largely unmaintained Node.js libraries with brittle terminfo/escape parsing. Migrate active or new Node/Bun TUIs to **Ink** (`references/ink.md`), **OpenTUI**, or **`@clack/prompts` / `@inquirer/prompts`** rather than building new features on Blessed internals.
|
|
29
|
+
|
|
30
|
+
## Verified implementation idioms
|
|
31
|
+
|
|
32
|
+
### .NET `Terminal.Gui` v2 (`Pos`/`Dim`, `Scheme`/`Attribute`, safe teardown)
|
|
33
|
+
|
|
34
|
+
Use relative **`Pos`** and **`Dim`** layout expressions (never fixed pixel-style coordinates) and semantic **`Scheme` / `Attribute`** pairs; always guarantee `Application.Shutdown()` runs even on exceptions:
|
|
35
|
+
|
|
36
|
+
```csharp
|
|
37
|
+
using Terminal.Gui;
|
|
38
|
+
|
|
39
|
+
Application.Init();
|
|
40
|
+
try
|
|
41
|
+
{
|
|
42
|
+
var actionScheme = new Scheme(new Attribute(Color.White, Color.Blue));
|
|
43
|
+
var win = new Window { Title = "Invoices (Ctrl+Q Quit)", Width = Dim.Fill(), Height = Dim.Fill() };
|
|
44
|
+
var status = new Label { Text = "Ready", X = 1, Y = 1, Width = Dim.Fill(1) };
|
|
45
|
+
var saveBtn = new Button { Text = "_Save", X = Pos.Center(), Y = Pos.Bottom(status) + 1, ColorScheme = actionScheme };
|
|
46
|
+
win.Add(status, saveBtn);
|
|
47
|
+
Application.Run(win);
|
|
48
|
+
}
|
|
49
|
+
finally
|
|
50
|
+
{
|
|
51
|
+
Application.Shutdown();
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### .NET `Spectre.Console` (markup injection guard & CI check)
|
|
56
|
+
|
|
57
|
+
Escape dynamic text with **`Markup.Escape(userInput)`** or **`AnsiConsole.MarkupLineInterpolated`** so brackets like `items[0]` never crash, and check `AnsiConsole.Profile.Capabilities.Interactive` before prompting:
|
|
58
|
+
|
|
59
|
+
```csharp
|
|
60
|
+
using Spectre.Console;
|
|
61
|
+
|
|
62
|
+
string userInput = "settings[debug]";
|
|
63
|
+
AnsiConsole.MarkupLineInterpolated($"[green]Key:[/] {userInput}");
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Python `prompt_toolkit` (history & async-safe logging)
|
|
67
|
+
|
|
68
|
+
Wrap background logging inside **`with patch_stdout():`** so asynchronous messages print cleanly above the active prompt without shredding the user's input line:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from prompt_toolkit import PromptSession
|
|
72
|
+
from prompt_toolkit.completion import WordCompleter
|
|
73
|
+
from prompt_toolkit.history import FileHistory
|
|
74
|
+
from prompt_toolkit.patch_stdout import patch_stdout
|
|
75
|
+
|
|
76
|
+
session = PromptSession(
|
|
77
|
+
history=FileHistory(".app_history"),
|
|
78
|
+
completer=WordCompleter(["status", "deploy", "rollback", "exit"]),
|
|
79
|
+
)
|
|
80
|
+
with patch_stdout():
|
|
81
|
+
cmd = session.prompt("ops> ")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### C++ `FTXUI` (functional flexbox + keyboard handler)
|
|
85
|
+
|
|
86
|
+
```cpp
|
|
87
|
+
#include <ftxui/component/component.hpp>
|
|
88
|
+
#include <ftxui/component/screen_interactive.hpp>
|
|
89
|
+
#include <ftxui/dom/elements.hpp>
|
|
90
|
+
|
|
91
|
+
using namespace ftxui;
|
|
92
|
+
|
|
93
|
+
int main() {
|
|
94
|
+
auto screen = ScreenInteractive::Fullscreen();
|
|
95
|
+
auto body = Renderer([] {
|
|
96
|
+
return vbox({ text("Invoices") | bold, separator(), text("[q] Quit") | dim }) | border;
|
|
97
|
+
});
|
|
98
|
+
auto app = CatchEvent(body, [&](Event e) {
|
|
99
|
+
if (e == Event::Character('q') || e == Event::Escape) { screen.Exit(); return true; }
|
|
100
|
+
return false;
|
|
101
|
+
});
|
|
102
|
+
screen.Loop(app);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Do/don't pairs
|
|
107
|
+
|
|
108
|
+
| Do | Don't |
|
|
109
|
+
|---|---|
|
|
110
|
+
| Choose inline prompts (`@clack/prompts`, `questionary`, `cliclack`, `Spectre.Console`) for linear wizards | Launch a full-screen alt-buffer TUI just to ask 3 setup questions |
|
|
111
|
+
| Wrap `Terminal.Gui` `Application.Init()` / `Shutdown()` in `try`/`finally` with `Pos`/`Dim` | Hard-code coordinates or skip `Shutdown()` on exceptions |
|
|
112
|
+
| Escape dynamic strings via `Markup.Escape()` / `MarkupLineInterpolated()` in Spectre.Console | Interpolate unescaped paths/errors into `AnsiConsole.MarkupLine($"...")` |
|
|
113
|
+
| Wrap concurrent output in `with patch_stdout():` in `prompt_toolkit` | Call `print()` from background threads and corrupt the active REPL line |
|
|
114
|
+
| Migrate legacy Blessed/Neo-Blessed apps to Ink, OpenTUI, or `@clack/prompts` | Build new production Node TUIs on abandoned Blessed internals |
|
|
115
|
+
|
|
116
|
+
## Verification commands
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
# Run the build/test suite matching your ecosystem:
|
|
120
|
+
dotnet test # Terminal.Gui / Spectre.Console
|
|
121
|
+
python -m pytest # prompt_toolkit / questionary
|
|
122
|
+
cmake --build build && ctest --test-dir build # FTXUI / Notcurses
|
|
123
|
+
go test ./... # tcell / tview
|
|
124
|
+
npm test # OpenTUI / @clack/prompts / @inquirer/prompts
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Test suites provide `static` / logic evidence. Inspect live `80Γ24` interactive sessions, `NO_COLOR=1`, `TERM=dumb`, `Ctrl+C` cleanup, and piped non-TTY CI runs for `rendered` evidence; label untested emulators `not-checked`.
|
|
@@ -1,60 +1,109 @@
|
|
|
1
|
-
# Ink (React for CLI)
|
|
1
|
+
# Ink (React for CLI, v5 / v6)
|
|
2
|
+
|
|
3
|
+
Ink 5/6 runs **React 19** + **Yoga 3** Flexbox in terminal cells. Treat Ink as a keyboard-driven terminal surfaceβnot a browser DOM running inside Node/Bun.
|
|
2
4
|
|
|
3
5
|
## Token mapping
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Centralize semantic colors, borders, and spacing in a typed theme module or `@inkjs/ui` `ThemeProvider` / `extendTheme` so components reference semantic roles (`action`, `danger`, `muted`) rather than scattering raw hex/chalk strings:
|
|
6
8
|
|
|
7
9
|
```tsx
|
|
8
|
-
export const
|
|
10
|
+
export const pcTheme = {
|
|
11
|
+
action: 'cyan',
|
|
12
|
+
success: 'green',
|
|
13
|
+
error: 'red',
|
|
14
|
+
muted: 'gray',
|
|
15
|
+
focusBorder: 'blue',
|
|
16
|
+
} as const;
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Layout and responsive idioms
|
|
14
|
-
|
|
15
|
-
Ink uses Yoga-like flexbox in terminal cells. Use flex direction/width/margin/padding deliberately, measure terminal columns/rows, define truncation/wrapping/minimum size behavior, and avoid browser layout assumptions. Static vs interactive output should be separated intentionally.
|
|
16
|
-
|
|
17
|
-
## Typography/custom fonts
|
|
19
|
+
Prefer ANSI semantic palette names (`cyan`, `red`, `green`, `yellow`) or test graceful degradation under `NO_COLOR=1` and 16-color terminalsβnever assume truecolor support.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
## Core Ink 5/6 primitives: `<Static>`, `useInput`, `useFocus`, & `@inkjs/ui`
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
- **`<Static items={completedLogs}>`**: render completed log lines, build steps, or historical entries once above the dynamic interactive footer so Ink appends cleanly to terminal scrollback without flickering or redrawing thousands of past lines.
|
|
24
|
+
- **`useInput((input, key) => ..., { isActive })`**: gate keyboard listeners with `isActive` whenever a modal, confirmation prompt, or nested pane opens so background views never steal `Enter`, `Escape`, or arrow keys.
|
|
25
|
+
- **`useFocus` & `useFocusManager`**: wire `Tab` / `Shift+Tab` focus traversal across panes and show an unmistakable focus indicator (border + text marker `>`, never color alone).
|
|
26
|
+
- **`@inkjs/ui`**: prefer official accessible-baseline Ink widgets (`Select`, `MultiSelect`, `ConfirmInput`, `TextInput`, `Spinner`, `ProgressBar`, `StatusMessage`, `Badge`, `ThemeProvider`) before hand-rolling raw keystroke handlers.
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
```tsx
|
|
29
|
+
import React, { useState } from 'react';
|
|
30
|
+
import { Box, Static, Text, useFocus, useInput } from 'ink';
|
|
31
|
+
import { StatusMessage } from '@inkjs/ui';
|
|
32
|
+
|
|
33
|
+
type LogEntry = { id: string; text: string };
|
|
34
|
+
|
|
35
|
+
export function DeployView({ logs, onCancel }: { logs: LogEntry[]; onCancel: () => void }) {
|
|
36
|
+
const { isFocused } = useFocus({ autoFocus: true });
|
|
37
|
+
const [confirming, setConfirming] = useState(false);
|
|
38
|
+
|
|
39
|
+
useInput(
|
|
40
|
+
(input, key) => {
|
|
41
|
+
if (key.escape || input === 'q') setConfirming(true);
|
|
42
|
+
if (confirming && input === 'y') onCancel();
|
|
43
|
+
if (confirming && input === 'n') setConfirming(false);
|
|
44
|
+
},
|
|
45
|
+
{ isActive: isFocused },
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<Box flexDirection="column">
|
|
50
|
+
<Static items={logs}>{(entry) => <Text key={entry.id}>{entry.text}</Text>}</Static>
|
|
51
|
+
<Box borderStyle="round" borderColor={isFocused ? 'cyan' : 'gray'} paddingX={1}>
|
|
52
|
+
<Text>{isFocused ? '> ' : ' '}</Text>
|
|
53
|
+
{confirming ? (
|
|
54
|
+
<StatusMessage variant="warning">Abort deploy? [y/n]</StatusMessage>
|
|
55
|
+
) : (
|
|
56
|
+
<Text>Press q or Esc to abort</Text>
|
|
57
|
+
)}
|
|
58
|
+
</Box>
|
|
59
|
+
</Box>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
24
63
|
|
|
25
|
-
##
|
|
64
|
+
## Layout, `UAX #29` width, Bracketed Paste, `EPIPE`, & teardown idioms
|
|
26
65
|
|
|
27
|
-
|
|
66
|
+
- **Grapheme width (`Intl.Segmenter` + `string-width`) & `--ascii`**: never pad or truncate terminal strings with JS `str.length` (UTF-16 code units corrupt CJK `2`-col glyphs, `π¨βπ©βπ§βπ¦` ZWJ emoji, `β οΈ` `VS16`, and Vietnamese NFD combining marks). Segment cursor steps with `new Intl.Segmenter(undefined, { granularity: 'grapheme' })` and measure columns with **`string-width`**; switch `borderStyle` / glyphs to ASCII (`borderStyle="classic"` or `+--+`) under `--ascii`, `TERM=dumb`, or non-UTF-8 locales.
|
|
67
|
+
- **Query `useStdout()` (`stdout.columns`, `stdout.rows`)** and subscribe to `resize` events to adapt layouts at `80Γ24` minimum; set `wrap="truncate-end"` intentionally on narrow labels.
|
|
68
|
+
- **Bracketed Paste (`DECSET 2004`) & `OSC 52` clipboard**: enable `\x1b[?2004h` on interactive text inputs so multi-line pastes arrive intact instead of triggering `key.return` on every newline; emit `OSC 52` (`\x1b]52;c;<base64>\x07`) alongside local clipboard helpers for SSH/`tmux` copy support.
|
|
69
|
+
- **Stream hygiene & silent `EPIPE` exit**: render Ink diagnostic/progress UI on `stderr` (`render(<App />, { stdout: process.stderr })`) whenever `stdout` is reserved for pipeable results, emit `--json`/`--plain` strictly to `process.stdout`, and install `process.stdout.on('error', (err) => { if (err.code === 'EPIPE') process.exit(0); })` so `mycli --plain | head -n 5` never crashes with an unhandled `Error: write EPIPE` stack trace!
|
|
70
|
+
- **6-step signal/crash restoration & CLI distribution**: register cleanup handlers on `SIGINT`, `SIGTERM`, `SIGHUP`, and `uncaughtException` to run the 6-step terminal reset (`?1049l`, mouse `?1000l/?1002l/?1003l/?1006l`, `?2004l`, `?2026l`, `\x1b[<u`, `?25h` + `stdin.setRawMode(false)`) before exiting (`0` ok, `1` runtime error, `2` flag error, `130` `SIGINT`). Ship `--help`, `--version`, `bash`/`zsh`/`fish`/`pwsh` completions, a `man` page, and npm/Homebrew/Winget/Scoop distribution ([terminal-protocols.md](terminal-protocols.md)).
|
|
28
71
|
|
|
29
|
-
##
|
|
72
|
+
## Automated frame & input testing (`ink-testing-library`)
|
|
30
73
|
|
|
31
|
-
|
|
74
|
+
Drive deterministic component rendering and keystroke sequences with **`ink-testing-library`**:
|
|
32
75
|
|
|
33
|
-
|
|
76
|
+
```tsx
|
|
77
|
+
import { render } from 'ink-testing-library';
|
|
78
|
+
import { DeployView } from './DeployView.js';
|
|
34
79
|
|
|
35
|
-
|
|
80
|
+
const { lastFrame, stdin } = render(<DeployView logs={[]} onCancel={() => {}} />);
|
|
81
|
+
stdin.write('q');
|
|
82
|
+
// Assert frame contains "[y/n]" prompt text and focus marker ">"
|
|
83
|
+
```
|
|
36
84
|
|
|
37
85
|
## Do/don't pairs
|
|
38
86
|
|
|
39
87
|
| Do | Don't |
|
|
40
88
|
|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
89
|
+
| Render completed log history inside `<Static>` above live status | Re-render a growing 500-line array inside the dynamic `<Box>` every tick |
|
|
90
|
+
| Measure/slice text with `Intl.Segmenter` + `string-width` and provide `--ascii` fallback | Pad columns with `str.length` / `.padEnd()`, breaking CJK, `π¨βπ©βπ§βπ¦`, and Vietnamese diacritics |
|
|
91
|
+
| Enable Bracketed Paste (`?2004h`), handle `stdout` `EPIPE` silently, and run 6-step reset on `SIGINT`/crash | Fire `key.return` on pasted newlines, crash with `EPIPE` on `\| head -n 5`, or leave raw mode stuck |
|
|
92
|
+
| Gate `useInput(..., { isActive })` by focus/modal state + ANSI 16 dark/light-safe colors | Let hidden views intercept `Enter`/`Escape` or hardcode `#ffffff` on light terminals |
|
|
93
|
+
| Detect `!process.stdout.isTTY` / `CI=1`, emit plain/JSON to `stdout`, and ship completions + `man` page | Hang CI pipelines waiting on interactive `<Select>` or leak spinner ANSI to `stdout` |
|
|
46
94
|
|
|
47
95
|
## Known traps
|
|
48
96
|
|
|
49
|
-
|
|
97
|
+
Rendering unbounded lists outside `<Static>`, `str.length` UTF-16 width misalignment on emoji/CJK/Vietnamese, unhandled `stdout` `EPIPE` stack traces when piped to `head`/`jq`, multi-line paste firing accidental `Enter` submits without `?2004h`, React effect leaks after `Ctrl+C` keeping the Node event loop alive.
|
|
50
98
|
|
|
51
99
|
## Verification commands
|
|
52
100
|
|
|
53
101
|
```sh
|
|
54
102
|
npm run lint
|
|
55
103
|
npm run test -- --run
|
|
56
|
-
|
|
57
|
-
|
|
104
|
+
npm run build
|
|
105
|
+
NO_COLOR=1 COLUMNS=80 node dist/cli.js --help
|
|
106
|
+
node dist/cli.js --plain | head -n 5
|
|
58
107
|
```
|
|
59
108
|
|
|
60
|
-
|
|
109
|
+
Lint, build, and `ink-testing-library` assertions provide `static` / virtual-frame evidence. Run the built CLI in real dark and light terminals at `80Γ24`, `NO_COLOR=1`, `--ascii`, multi-line paste, piped `head -n 5`, and `Ctrl+C` interrupt paths for `rendered` evidence; label untested terminal emulators `not-checked`.
|