@fbincon/claude-code-statusline 0.0.0-stage → 3.0.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/LICENSE +21 -0
- package/LICENSE-Unicode.txt +39 -0
- package/LICENSE-Wcwidth.txt +27 -0
- package/README.md +420 -2
- package/bin/claude-statusline.js +2 -0
- package/candidate.json +1244 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.d.ts +35 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js +228 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js +72 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js +140 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js +101 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js +96 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js +80 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.d.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js +99 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.d.ts +30 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js +134 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js +89 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.js +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/entry.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.js +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/errors.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js +67 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/help.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js +40 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js +63 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js +153 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.d.ts +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js +142 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js +91 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.d.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js +109 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.d.ts +60 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js +12 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.d.ts +10 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js +234 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.d.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js +41 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.d.ts +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.d.ts +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js +92 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.d.ts +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js +91 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js +94 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.d.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.d.ts +22 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js +197 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/main.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.d.ts +7 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js +134 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.d.ts +58 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js +144 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.d.ts +5 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js +125 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js +55 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js +95 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.d.ts +6 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js +48 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.d.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js +11 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.d.ts +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js +162 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.d.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js +19 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.d.ts +37 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js +75 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.d.ts +9 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js +241 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.d.ts +2 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js +14 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.d.ts +15 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js +69 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.d.ts +16 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js +90 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.d.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js +80 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.d.ts +4 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js +40 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.d.ts +5 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js +59 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.d.ts +17 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js +69 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.d.ts +17 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js +70 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.d.ts +13 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js +75 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.d.ts +33 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js +227 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +144 -0
- package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -0
- package/node_modules/@fbincon/statusline-cli/package.json +17 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-config/SKILL.md +80 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-configure/SKILL.md +19 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +37 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/hooks.json +6 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +820 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +503 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/forms.ts +3 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +198 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/messages.ts +101 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +218 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/appearance.ts +29 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +254 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts +167 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/guidance.ts +20 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/import-review.ts +55 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/instances.ts +30 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/navigation.ts +98 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/numeric.ts +42 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/search.ts +114 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +276 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-unicode.ts +92 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +6842 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/index.ts +40 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/messages.ts +33 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/presentation.ts +62 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/launch.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preferences.ts +61 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preview-preferences.ts +8 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/session.ts +124 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/unicode.ts +121 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +47 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/draw.ts +159 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/help.ts +84 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/surface.ts +89 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/catalog.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/preview.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/section.ts +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/shortcuts.ts +83 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/layout.ts +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/styled-text.ts +56 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/text.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/theme.ts +27 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +49 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/hooks.json +1 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/observe.ts +279 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/checklists.ts +45 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/costs.ts +23 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/generated-contracts.ts +18 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/identity.ts +14 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/launch.ts +25 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/queue.ts +68 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/streams.ts +28 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/timing.ts +11 -0
- package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.d.ts +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js +72 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.d.ts +86 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js +3462 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js +17 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js +232 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/display.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js +48 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js +104 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.d.ts +11 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js +99 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js +80 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.d.ts +29 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js +159 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js +34 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.d.ts +15 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js +55 -0
- package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.d.ts +33 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +663 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +401 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +251 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.d.ts +26 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js +146 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js +17 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.d.ts +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js +53 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.d.ts +37 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.d.ts +11 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.d.ts +22 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js +122 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js +30 -0
- package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +6841 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +6841 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.d.ts +16 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js +38 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.d.ts +222 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js +224 -0
- package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js +31 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.js +137 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-read.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.js +56 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json-text.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.js +165 -0
- package/node_modules/@fbincon/statusline-core/dist/src/json.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.js +47 -0
- package/node_modules/@fbincon/statusline-core/dist/src/numbers.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.d.ts +21 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js +105 -0
- package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.js +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/release.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js +73 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.d.ts +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js +50 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js +49 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js +58 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js +34 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.d.ts +49 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +399 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.d.ts +19 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js +176 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js +29 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js +93 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.d.ts +3 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js +46 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.d.ts +23 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js +76 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.d.ts +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +98 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.d.ts +67 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js +14 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js +116 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.d.ts +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +305 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js +33 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js +52 -0
- package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.d.ts +9 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js +115 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js +104 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.d.ts +27 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js +196 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js +45 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js +228 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.d.ts +24 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js +145 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js +70 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.d.ts +36 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js +110 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js +75 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.d.ts +10 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js +121 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.d.ts +43 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js +198 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js +192 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.d.ts +16 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js +245 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.d.ts +4 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js +28 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.d.ts +26 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js +183 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.d.ts +64 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js +263 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.d.ts +18 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js +103 -0
- package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.d.ts +7 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js +2 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.d.ts +6 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js +50 -0
- package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.d.ts +8 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js +13 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.d.ts +22 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js +75 -0
- package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.d.ts +12 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js +93 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.d.ts +5 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js +178 -0
- package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js.map +1 -0
- package/node_modules/@fbincon/statusline-core/package.json +8 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/languages.json +7 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +1367 -0
- package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-Hant.json +1367 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.d.ts +15 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js +22 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.d.ts +4 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js +102 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.d.ts +16 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.js +18 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/command.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.d.ts +12 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.js +160 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/commands.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.d.ts +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.js +19 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/errors.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.d.ts +8 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.js +164 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/files.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.js +5 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/hash.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.js +14 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/input.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.d.ts +12 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.js +21 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/launch.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js +31 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.d.ts +15 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.js +36 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/native.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.d.ts +17 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js +44 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.d.ts +4 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js +48 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.d.ts +2 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js +67 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/processes.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.d.ts +42 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js +180 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.d.ts +11 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js +81 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.d.ts +32 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js +157 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.d.ts +18 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js +150 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.d.ts +6 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js +39 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.d.ts +5 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js +82 -0
- package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js.map +1 -0
- package/node_modules/@fbincon/statusline-platform/package.json +8 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.d.ts +14 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +230 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.d.ts +30 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.js +34 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/layout.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.d.ts +28 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js +126 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +52 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js +352 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.d.ts +7 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.js +5 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/theme.js.map +1 -0
- package/node_modules/@fbincon/statusline-tui/package.json +16 -0
- package/node_modules/@koromix/koffi-darwin-arm64/README.md +6 -0
- package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-arm64/index.js +1 -0
- package/node_modules/@koromix/koffi-darwin-arm64/package.json +24 -0
- package/node_modules/@koromix/koffi-darwin-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-darwin-x64/index.js +1 -0
- package/node_modules/@koromix/koffi-darwin-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-linux-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-linux-x64/index.js +198 -0
- package/node_modules/@koromix/koffi-linux-x64/linux_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-linux-x64/musl_x64/koffi.node +0 -0
- package/node_modules/@koromix/koffi-linux-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
- package/node_modules/@koromix/koffi-win32-x64/index.js +1 -0
- package/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
- package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
- package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
- package/node_modules/koffi/LICENSE.txt +22 -0
- package/node_modules/koffi/README.md +46 -0
- package/node_modules/koffi/index.cjs +1 -0
- package/node_modules/koffi/index.d.ts +390 -0
- package/node_modules/koffi/index.js +2 -0
- package/node_modules/koffi/indirect.cjs +1 -0
- package/node_modules/koffi/indirect.js +2 -0
- package/node_modules/koffi/package.json +73 -0
- package/node_modules/koffi/src/koffi/index.cjs +327 -0
- package/node_modules/koffi/src/koffi/index.js +312 -0
- package/node_modules/koffi/src/koffi/indirect.cjs +326 -0
- package/node_modules/koffi/src/koffi/indirect.js +311 -0
- package/node_modules/koffi/src/koffi/src/static.cjs +170 -0
- package/node_modules/koffi/src/koffi/src/static.js +173 -0
- package/node_modules/lossless-json/LICENSE.md +9 -0
- package/node_modules/lossless-json/README.md +549 -0
- package/node_modules/lossless-json/lib/esm/LosslessNumber.js +92 -0
- package/node_modules/lossless-json/lib/esm/LosslessNumber.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/config.js +9 -0
- package/node_modules/lossless-json/lib/esm/config.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/index.js +9 -0
- package/node_modules/lossless-json/lib/esm/index.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/numberParsers.js +9 -0
- package/node_modules/lossless-json/lib/esm/numberParsers.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/package.json +3 -0
- package/node_modules/lossless-json/lib/esm/parse.js +346 -0
- package/node_modules/lossless-json/lib/esm/parse.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/revive.js +57 -0
- package/node_modules/lossless-json/lib/esm/revive.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/reviveDate.js +10 -0
- package/node_modules/lossless-json/lib/esm/reviveDate.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/stringify.js +166 -0
- package/node_modules/lossless-json/lib/esm/stringify.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/types.js +2 -0
- package/node_modules/lossless-json/lib/esm/types.js.map +1 -0
- package/node_modules/lossless-json/lib/esm/utils.js +236 -0
- package/node_modules/lossless-json/lib/esm/utils.js.map +1 -0
- package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts +40 -0
- package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/config.d.ts +13 -0
- package/node_modules/lossless-json/lib/types/config.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/index.d.ts +9 -0
- package/node_modules/lossless-json/lib/types/index.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/numberParsers.d.ts +4 -0
- package/node_modules/lossless-json/lib/types/numberParsers.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/parse.d.ts +33 -0
- package/node_modules/lossless-json/lib/types/parse.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/revive.d.ts +13 -0
- package/node_modules/lossless-json/lib/types/revive.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/reviveDate.d.ts +5 -0
- package/node_modules/lossless-json/lib/types/reviveDate.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/stringify.d.ts +37 -0
- package/node_modules/lossless-json/lib/types/stringify.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/types.d.ts +61 -0
- package/node_modules/lossless-json/lib/types/types.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/types/utils.d.ts +79 -0
- package/node_modules/lossless-json/lib/types/utils.d.ts.map +1 -0
- package/node_modules/lossless-json/lib/umd/lossless-json.js +1 -0
- package/node_modules/lossless-json/lib/umd/lossless-json.js.map +1 -0
- package/node_modules/lossless-json/lib/umd/package.json +3 -0
- package/node_modules/lossless-json/package.json +89 -0
- package/package.json +57 -4
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { ClientElements, RenderElement, TextProps } from 'claude-code';
|
|
2
|
+
import type { View } from '../../lib/session.ts';
|
|
3
|
+
import { preferenceChanged } from '../../lib/preferences.ts';
|
|
4
|
+
import { settingRows } from '../../lib/client/settings.ts';
|
|
5
|
+
import { formWindow, pageWindow } from '../../lib/editor/navigation.ts';
|
|
6
|
+
import { clip, column, displayWidth, contentColumns } from '../layout.ts';
|
|
7
|
+
import { editorLayout } from './help.ts';
|
|
8
|
+
import { chromeRow, rowStyle, styles } from '../theme.ts';
|
|
9
|
+
import { section } from '../components/section.ts';
|
|
10
|
+
import { previewLine, previewText, previewTitle } from '../components/preview.ts';
|
|
11
|
+
import { shortcuts, spanLine } from '../components/shortcuts.ts';
|
|
12
|
+
import type { TextSpan } from '../components/shortcuts.ts';
|
|
13
|
+
import { t, renderMessage } from '../../lib/i18n/index.ts';
|
|
14
|
+
import { viewMessage, preferenceResult } from '../../lib/i18n/messages.ts';
|
|
15
|
+
import { settingPresentation, preferenceLabel } from '../../lib/i18n/presentation.ts';
|
|
16
|
+
import { itemSpans } from '../components/catalog.ts';
|
|
17
|
+
import { guidanceLines } from '../../lib/editor/guidance.ts';
|
|
18
|
+
import { reviewRows } from '../../lib/editor/import-review.ts';
|
|
19
|
+
|
|
20
|
+
export function draw(ui: ClientElements, view: View, columns: number, rows: number): RenderElement {
|
|
21
|
+
const tr = (key: string, params: Record<string, unknown> = {}) => t(key, view.language ?? 'en', params);
|
|
22
|
+
const e = view.editor;
|
|
23
|
+
const layout = editorLayout(view, columns, rows);
|
|
24
|
+
const inner = contentColumns(columns, rows);
|
|
25
|
+
const line = (label: string, style: TextProps = {}) =>
|
|
26
|
+
ui.Text({ wrap: 'truncate', ...styles.text, ...style, children: [clip(label, inner)] });
|
|
27
|
+
if (!layout.available || !e)
|
|
28
|
+
return ui.Box({
|
|
29
|
+
backgroundColor: styles.text.backgroundColor,
|
|
30
|
+
width: columns, height: rows, flexDirection: 'column', overflow: 'hidden',
|
|
31
|
+
children: [
|
|
32
|
+
line(!layout.available ? tr("native.ui.client.draw.resize_pane_to_32x12_draft_kept") : tr("native.ui.client.draw.loading_configuration")),
|
|
33
|
+
shortcuts(ui, [{ key: 'Q', label: tr("native.ui.client.draw.close") }], columns, ''),
|
|
34
|
+
],
|
|
35
|
+
});
|
|
36
|
+
const pending = e.modified || view.preferences.some(preferenceChanged);
|
|
37
|
+
const selectedPreference = view.preferences.find((p) => 'host-' + p.row.key === e.setting);
|
|
38
|
+
const notice = e.review ? tr('review.intro') :
|
|
39
|
+
Object.entries(e.fieldErrors).map(([key, error]) => `${key}: ${renderMessage(e.fieldErrorMessages[key as keyof typeof e.fieldErrorMessages] ?? error ?? '', view.language ?? 'en')}`).join(' · ') ||
|
|
40
|
+
viewMessage(view, 'busy') || viewMessage(view, 'error') || viewMessage(view, 'message') ||
|
|
41
|
+
(e.advanced
|
|
42
|
+
? viewMessage(view, 'preferencesError') ||
|
|
43
|
+
(selectedPreference?.result ? preferenceLabel(selectedPreference, view.language) + ': ' + preferenceResult(selectedPreference, view.language) : '') ||
|
|
44
|
+
view.preferences.map((p) => p.result ? preferenceLabel(p, view.language) + ': ' + preferenceResult(p, view.language) : '').filter(Boolean).join(' · ')
|
|
45
|
+
: '');
|
|
46
|
+
const content: RenderElement[] = [];
|
|
47
|
+
let title = '';
|
|
48
|
+
if (e.review) {
|
|
49
|
+
title = tr('review.title');
|
|
50
|
+
const review = e.review, lines = reviewRows(review, view.language ?? 'en', inner), capacity = Math.max(1, layout.bodyRows - 1);
|
|
51
|
+
const start = Math.min(review.scroll, Math.max(0, lines.length - capacity));
|
|
52
|
+
content.push(...lines.slice(start, start + capacity).map(row => line(row.text, row.heading && row.section === review.selected ? rowStyle(true) : {})));
|
|
53
|
+
content.push(line(`${start + 1}–${Math.min(lines.length, start + capacity)}/${lines.length}`, styles.muted));
|
|
54
|
+
} else if (e.guidanceScroll !== null && e.detail) {
|
|
55
|
+
title = tr('guidance.title');
|
|
56
|
+
const item = e.definition(e.detail.scope,e.detail.id)!;
|
|
57
|
+
const lines = guidanceLines(item, view.language ?? 'en', inner), capacity = Math.max(1, layout.bodyRows - 1);
|
|
58
|
+
const start = Math.min(e.guidanceScroll, Math.max(0, lines.length - capacity));
|
|
59
|
+
content.push(...lines.slice(start, start + capacity).map(text => line(text)));
|
|
60
|
+
content.push(line(`${start + 1}–${Math.min(lines.length, start + capacity)}/${lines.length}`, styles.muted));
|
|
61
|
+
} else if (view.input?.kind === 'category') {
|
|
62
|
+
title = tr('catalog.search.categories');
|
|
63
|
+
const input = view.input, categories = e.categories(input.scope);
|
|
64
|
+
const window = pageWindow(categories, input.selected, Math.max(1, layout.bodyRows - 1));
|
|
65
|
+
for (const category of categories.slice(window.start, window.end))
|
|
66
|
+
content.push(line(`${input.selected === category ? '› ' : ' '}${tr('catalog.categories.' + category)}`, rowStyle(input.selected === category)));
|
|
67
|
+
content.push(line(`${categories.indexOf(input.selected) + 1}/${categories.length}`, styles.muted));
|
|
68
|
+
} else if (e.page === 'settings' || e.page === 'layout' || e.detail) {
|
|
69
|
+
title = e.detail ? tr("native.ui.client.draw.item_format") + e.instanceLabel(e.detail.scope,e.detail.id,view.language) : e.page === 'layout' ? tr("native.ui.client.draw.layout_fitting") : tr("native.ui.client.draw.tool_settings");
|
|
70
|
+
if (e.page === 'settings' && !e.detail) {
|
|
71
|
+
if (e.advanced) title = columns < 64 ? tr("native.ui.client.draw.claude_preferences") : tr("native.ui.client.draw.tool_settings_claude_preferences");
|
|
72
|
+
}
|
|
73
|
+
const settings = settingPresentation(view, settingRows(view));
|
|
74
|
+
const window = formWindow(settings, e.setting, layout.formHeight);
|
|
75
|
+
const labelWidth = Math.max(10, Math.min(44, inner - 15,
|
|
76
|
+
Math.max(10, ...settings.map((row) => displayWidth(row.label) + 1))));
|
|
77
|
+
if (layout.tableHeading)
|
|
78
|
+
content.push(line(' ' + column(tr("native.ui.client.draw.option"), labelWidth) + tr("native.ui.client.draw.value"), { ...styles.muted, bold: true }));
|
|
79
|
+
for (const entry of window.lines) {
|
|
80
|
+
if (entry.index === null) {
|
|
81
|
+
const group = clip('─ ' + entry.group + ' ', inner);
|
|
82
|
+
content.push(line(group + '─'.repeat(Math.max(0, inner - displayWidth(group))), { ...styles.accent, bold: true }));
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const row = settings[entry.index]!;
|
|
86
|
+
const editing = (view.input?.kind === 'numeric' && view.input.field === row.key) ||
|
|
87
|
+
(view.input?.kind === 'field' && view.input.key === row.key) ||
|
|
88
|
+
(view.input?.kind === 'path' && row.key === view.input.action + '-file');
|
|
89
|
+
const displayed = editing && (view.input?.kind === 'field' || view.input?.kind === 'path') ? view.input.buffer : row.value;
|
|
90
|
+
const preference = view.preferences.find((p) => 'host-' + p.row.key === row.key);
|
|
91
|
+
const label = `${e.setting === row.key ? '›' : ' '} ${column(row.label + ':', labelWidth)} `;
|
|
92
|
+
const spans: TextSpan[] = [
|
|
93
|
+
{ text: label },
|
|
94
|
+
{ text: displayed + (editing ? ' _' : '') + (preference && preferenceChanged(preference) ? ' *' : '') },
|
|
95
|
+
];
|
|
96
|
+
content.push(ui.Box({
|
|
97
|
+
key: 'setting-' + row.key, flexShrink: 0,
|
|
98
|
+
children: [spanLine(ui, spans, inner, rowStyle(e.setting === row.key, row.editable))],
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
while (content.length < layout.bodyRows - Number(layout.showSummary)) content.push(line(' '));
|
|
102
|
+
if (layout.showSummary) content.push(line(tr("native.ui.client.draw.fields", {value0: settings.length ? window.start + 1 : 0, end: window.end, length: settings.length, page: window.page, pages: window.pages}), styles.muted));
|
|
103
|
+
} else {
|
|
104
|
+
const scope = e.page === 'main' ? 'main' : 'subagent';
|
|
105
|
+
const matches = e.matches(scope), visible = matches.map(result => result.item);
|
|
106
|
+
const current = visible.find((item) => item.id === e.selected[scope]);
|
|
107
|
+
title = e.adding ? tr('composition.picker') : scope === 'main' ? tr("native.ui.client.draw.main_items") : tr("native.ui.client.draw.subagent_items_custom_rows") + tr('values.' + (e.draft.display.subagents.enabled ? 'on' : 'off'));
|
|
108
|
+
content.push(shortcuts(ui, [
|
|
109
|
+
{key: 'Ctrl+F', label: tr('catalog.categories.' + e.category[scope]), short: e.category[scope] === 'all' ? tr('values.all') : clip(tr('catalog.categories.' + e.category[scope]), 8)},
|
|
110
|
+
{key: '/', label: tr('native.ui.client.draw.search')},
|
|
111
|
+
], inner, tr('native.ui.client.draw.filter') + e.search[scope] + (view.input?.kind === 'search' ? ' _' : '') + ' '));
|
|
112
|
+
if (layout.tableHeading) content.push(line(tr("native.ui.client.draw.on_item"), { ...styles.muted, bold: true }));
|
|
113
|
+
const window = pageWindow(visible.map((item) => item.id), e.selected[scope], layout.itemCapacity);
|
|
114
|
+
for (const {item, match} of matches.slice(window.start, window.end))
|
|
115
|
+
content.push(ui.Box({
|
|
116
|
+
key: 'item-' + scope + ':' + item.id, flexShrink: 0,
|
|
117
|
+
children: [spanLine(ui, itemSpans(item, match, e.search[scope], view.language ?? 'en', inner, e.selected[scope] === item.id, e.items(scope).includes(item.id)), inner, rowStyle(e.selected[scope] === item.id))],
|
|
118
|
+
}));
|
|
119
|
+
if (!visible.length) content.push(line(tr("native.ui.client.draw.no_matching_items"), styles.muted));
|
|
120
|
+
while (content.length < layout.bodyRows - Number(layout.showDetails) - Number(layout.showSummary)) content.push(line(' '));
|
|
121
|
+
if (layout.showDetails) content.push(line(current ? tr('native.item_detail', {detail: tr('items.' + scope + '.' + (current.type_id ?? current.id) + '.description'), examples: current.examples.join(' · ')}) : tr('native.empty_detail'), styles.muted));
|
|
122
|
+
if (layout.showSummary) content.push(line(tr("native.ui.client.draw.enabled", {page: window.page, pages: window.pages, length: e.items(scope).length}), styles.muted));
|
|
123
|
+
}
|
|
124
|
+
const subagentPreview = e.review ? e.review.previewScope === 'subagent' : e.page === 'subagents';
|
|
125
|
+
const sample = view.preview ? subagentPreview ? view.preview.subagents : view.preview.main : [];
|
|
126
|
+
const overflow = layout.previewRows > 1 && sample.length > layout.previewRows;
|
|
127
|
+
const shown = sample.slice(0, overflow ? layout.previewRows - 1 : layout.previewRows);
|
|
128
|
+
const background = view.previewBackground ?? 'dark';
|
|
129
|
+
const preview: RenderElement[] = shown.map((row) => previewLine(ui, row, inner, background));
|
|
130
|
+
if (overflow) preview.push(previewText(ui, tr("native.ui.client.draw.more_preview_rows", {value0: sample.length - shown.length}), inner, background));
|
|
131
|
+
if (!sample.length) preview.push(previewText(ui, viewMessage(view, 'previewError') || (view.preview ? tr("native.ui.client.draw.empty_preview") : tr("native.ui.client.draw.loading_sample_preview")), inner, background));
|
|
132
|
+
while (preview.length < layout.previewRows) preview.push(previewText(ui, '', inner, background));
|
|
133
|
+
const pages = ['main', 'subagents', 'settings', 'layout'];
|
|
134
|
+
const labels = columns < 48 ? ['main','subagents','settings','layout'].map(key => tr('native.tabs.short.' + key))
|
|
135
|
+
: ['main','subagents','settings','layout'].map(key => tr('native.tabs.' + key));
|
|
136
|
+
const tabs: TextSpan[] = [];
|
|
137
|
+
labels.forEach((label, i) => {
|
|
138
|
+
if (i) tabs.push({ text: ' · ', style: styles.muted });
|
|
139
|
+
tabs.push({ text: String(i + 1), style: styles.key });
|
|
140
|
+
tabs.push({ text: ' ' + (pages[i] === e.page ? '[' + label + ']' : label), style: { ...(pages[i] === e.page ? styles.accent : styles.muted), bold: false } });
|
|
141
|
+
});
|
|
142
|
+
return ui.Box({
|
|
143
|
+
width: columns, height: rows, flexDirection: 'column', overflow: 'hidden',
|
|
144
|
+
children: [
|
|
145
|
+
chromeRow(ui, line(tr("native.ui.client.draw.configure_status_line") + (pending ? ' *' : ''), { ...styles.accent, bold: true }), columns),
|
|
146
|
+
chromeRow(ui, spanLine(ui, tabs, columns), columns),
|
|
147
|
+
chromeRow(ui, notice ? line(notice, view.error || Object.keys(e.fieldErrors).length ? styles.error : styles.text)
|
|
148
|
+
: line(tr("native.ui.client.draw.click_region_for_keys"), styles.muted), columns),
|
|
149
|
+
section(ui, 'content-region', title, content, columns, layout.bodyHeight, layout.framed),
|
|
150
|
+
section(ui, 'preview-region', e.review ? tr('review.preview', {scope:tr('review.sections.' + e.review.previewScope)}) : previewTitle(e.draft.display, columns, view.previewBusy, background, view.language), preview, columns, layout.previewHeight, layout.framed, true),
|
|
151
|
+
ui.Box({
|
|
152
|
+
key: 'shortcut-region', width: columns, height: layout.footerRows,
|
|
153
|
+
backgroundColor: styles.text.backgroundColor,
|
|
154
|
+
flexDirection: 'column', flexShrink: 0,
|
|
155
|
+
children: layout.footer.map((hints) => shortcuts(ui, hints, columns)),
|
|
156
|
+
}),
|
|
157
|
+
],
|
|
158
|
+
});
|
|
159
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { View } from '../../lib/session.ts';
|
|
2
|
+
import { preferenceChanged } from '../../lib/preferences.ts';
|
|
3
|
+
import { dimensions } from '../layout.ts';
|
|
4
|
+
import { shortcutRows } from '../components/shortcuts.ts';
|
|
5
|
+
import type { Shortcut } from '../components/shortcuts.ts';
|
|
6
|
+
import { translatedShortcuts } from '../../lib/i18n/presentation.ts';
|
|
7
|
+
|
|
8
|
+
const focus: Shortcut = { key: 'Esc', label: 'focus' };
|
|
9
|
+
|
|
10
|
+
/** Advertise only the controls available in the current editor state. */
|
|
11
|
+
export function editorShortcuts(view: View): Shortcut[][] {
|
|
12
|
+
const e = view.editor;
|
|
13
|
+
if (!e) return [[focus]];
|
|
14
|
+
if (view.busy) return [[focus]];
|
|
15
|
+
if (view.uncertain) return [[
|
|
16
|
+
{ key: 'K', label: 'check saved state', short: 'check' },
|
|
17
|
+
{ key: 'Q', label: 'close (blocked)', short: 'blocked' },
|
|
18
|
+
focus,
|
|
19
|
+
]];
|
|
20
|
+
if (e.review) return [
|
|
21
|
+
[{key:'A', label:'accept draft', short:'accept'}, {key:'Q', label:'cancel review', short:'cancel'}],
|
|
22
|
+
[{key:'Enter', label:'details'}, {key:'↑↓', label:'section'}],
|
|
23
|
+
[{key:'PgUp/PgDn', label:'scroll'}, {key:'Tab', label:'preview'}], [focus],
|
|
24
|
+
];
|
|
25
|
+
if (view.input?.kind === 'category') return [[{key: 'Enter', label: 'accept'}, {key: 'Ctrl+G', label: 'cancel'}, focus], [{key: '↑↓', label: 'select'}]];
|
|
26
|
+
if (e.guidanceScroll !== null) return [[{key:'Ctrl+G', label:'back'}, focus], [{key:'↑↓', label:'scroll'}, {key:'PgUp/PgDn', label:'page'}]];
|
|
27
|
+
if (view.input) return [[
|
|
28
|
+
{ key: 'Enter', label: 'accept' },
|
|
29
|
+
{ key: 'Ctrl+G', label: 'cancel editing', short: 'cancel' },
|
|
30
|
+
{ key: 'Ctrl+U', label: 'clear' },
|
|
31
|
+
{ key: 'Backspace', label: 'delete', short: 'del' },
|
|
32
|
+
focus,
|
|
33
|
+
]];
|
|
34
|
+
if(e.adding)return [[{key:'Enter',label:'add'},{key:'Ctrl+G',label:'back'},focus],[{key:'↑↓',label:'select'},{key:'/',label:'search'},{key:'Ctrl+F',label:'category'},{key:'Ctrl+E',label:'details'}]];
|
|
35
|
+
const pending = e.modified || view.preferences.some(preferenceChanged);
|
|
36
|
+
const actions: Shortcut[] = [
|
|
37
|
+
{ key: 'S', label: 'save' },
|
|
38
|
+
{ key: 'F', label: 'finish' },
|
|
39
|
+
{ key: 'Q', label: pending ? 'discard' : 'close' },
|
|
40
|
+
{ key: 'V', label: 'preview' },
|
|
41
|
+
focus,
|
|
42
|
+
];
|
|
43
|
+
const contextual: Shortcut[] = [{ key: 'Tab', label: 'page' }];
|
|
44
|
+
if (!e.detail && (e.page === 'main' || e.page === 'subagents')) {
|
|
45
|
+
contextual.push(
|
|
46
|
+
{ key: 'A/D/X', label: 'add/copy/remove', short:'add/copy/remove' },
|
|
47
|
+
{ key: 'Space', label: 'toggle' },
|
|
48
|
+
{ key: '↑↓', label: 'select' },
|
|
49
|
+
...(e.filtered(e.page === 'main' ? 'main' : 'subagent') ? [] : [{ key: '←→', label: 'order' }]),
|
|
50
|
+
{ key: 'Ctrl+E', label: 'format' },
|
|
51
|
+
{ key: '/', label: 'search' },
|
|
52
|
+
);
|
|
53
|
+
} else {
|
|
54
|
+
contextual.push(
|
|
55
|
+
{ key: '↑↓', label: 'select' },
|
|
56
|
+
{ key: '←→', label: 'adjust' },
|
|
57
|
+
{ key: 'Enter', label: 'edit' },
|
|
58
|
+
);
|
|
59
|
+
if (e.detail) contextual.push({ key: 'Ctrl+G', label: 'back' });
|
|
60
|
+
else if (e.page === 'settings') {
|
|
61
|
+
contextual.push({ key: 'H', label: (e.advanced ? 'hide' : 'show') + ' preferences', short: (e.advanced ? 'hide' : 'show') + ' prefs' });
|
|
62
|
+
if (e.advanced) contextual.push({ key: 'A', label: 'apply separately', short: 'apply' });
|
|
63
|
+
contextual.push({ key: 'R', label: 'reload' });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (view.error && e.page !== 'settings') actions.splice(actions.length - 1, 0, { key: 'R', label: 'reload' });
|
|
67
|
+
return [actions, contextual];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Share footer and viewport budgets between drawing and keyboard paging. */
|
|
71
|
+
export function editorLayout(view: View, columns: number, rows: number) {
|
|
72
|
+
let groups = translatedShortcuts(editorShortcuts(view), view.language);
|
|
73
|
+
const framed = columns >= 64 && rows >= 20;
|
|
74
|
+
// Keep the header, section edges, filter/selection and one preview row.
|
|
75
|
+
const limit = Math.max(1, rows - (framed ? 10 : 8));
|
|
76
|
+
let footer = shortcutRows(groups, columns);
|
|
77
|
+
if (footer.length > limit) footer = shortcutRows(groups, columns, true);
|
|
78
|
+
for (const key of ['V', 'R', 'Esc', '↑↓', '←→', '/']) {
|
|
79
|
+
if (footer.length <= limit) break;
|
|
80
|
+
groups = groups.map((group) => group.filter((hint) => hint.key !== key));
|
|
81
|
+
footer = shortcutRows(groups, columns, true);
|
|
82
|
+
}
|
|
83
|
+
return { ...dimensions(columns, rows, footer.length), footer };
|
|
84
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { t } from '../../lib/i18n/index.ts';
|
|
2
|
+
import type { ClientSurface, RenderElement } from 'claude-code';
|
|
3
|
+
import type { ClientProps } from '../../lib/session.ts';
|
|
4
|
+
import { clientView } from '../../lib/session.ts';
|
|
5
|
+
import {
|
|
6
|
+
keyEvents,
|
|
7
|
+
MAX_BATCH,
|
|
8
|
+
MAX_PENDING,
|
|
9
|
+
} from '../../lib/client/messages.ts';
|
|
10
|
+
import type { KeyMessage } from '../../lib/client/messages.ts';
|
|
11
|
+
import { draw } from './draw.ts';
|
|
12
|
+
import { styles } from '../theme.ts';
|
|
13
|
+
|
|
14
|
+
interface State {
|
|
15
|
+
epoch: number;
|
|
16
|
+
next: number;
|
|
17
|
+
pending: KeyMessage[];
|
|
18
|
+
latest: ClientProps;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Surface input and drawing only: no process, filesystem or host API access. */
|
|
22
|
+
export default function StatuslineClient(
|
|
23
|
+
props: ClientProps,
|
|
24
|
+
surface: ClientSurface<State>,
|
|
25
|
+
): RenderElement {
|
|
26
|
+
const tr = (key: string) => t(key, props.view.language ?? 'en');
|
|
27
|
+
let state = surface.state;
|
|
28
|
+
if (state && props.epoch < state.epoch) props = state.latest;
|
|
29
|
+
if (!state || state.epoch !== props.epoch) {
|
|
30
|
+
state = {
|
|
31
|
+
epoch: props.epoch,
|
|
32
|
+
next: props.ack + 1,
|
|
33
|
+
pending: [],
|
|
34
|
+
latest: props,
|
|
35
|
+
};
|
|
36
|
+
surface.setState(state);
|
|
37
|
+
}
|
|
38
|
+
const active = state;
|
|
39
|
+
if (props.generation >= active.latest.generation) active.latest = props;
|
|
40
|
+
active.next = Math.max(active.next, active.latest.ack + 1);
|
|
41
|
+
active.pending = active.pending.filter(
|
|
42
|
+
(item) => item.seq > active.latest.ack,
|
|
43
|
+
);
|
|
44
|
+
const post = () => {
|
|
45
|
+
if (!active.pending.length) return;
|
|
46
|
+
surface.post({
|
|
47
|
+
epoch: active.epoch,
|
|
48
|
+
columns: surface.columns || active.latest.columns,
|
|
49
|
+
rows: surface.rows || active.latest.rows,
|
|
50
|
+
events: active.pending.slice(0, MAX_BATCH).map(({ seq, event }) => ({
|
|
51
|
+
seq,
|
|
52
|
+
event: {
|
|
53
|
+
key: event.key,
|
|
54
|
+
...(event.ctrl ? { ctrl: true } : {}),
|
|
55
|
+
...(event.shift ? { shift: true } : {}),
|
|
56
|
+
...(event.meta ? { meta: true } : {}),
|
|
57
|
+
},
|
|
58
|
+
})),
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
surface.onKey((event) => {
|
|
62
|
+
if (active.latest.view.busy || active.pending.length >= MAX_PENDING) return;
|
|
63
|
+
for (const key of keyEvents(event)) {
|
|
64
|
+
if (active.pending.length >= MAX_PENDING) break;
|
|
65
|
+
active.pending.push({ seq: active.next++, event: key });
|
|
66
|
+
}
|
|
67
|
+
post();
|
|
68
|
+
});
|
|
69
|
+
// A post supersedes the previous one in the same frame. Each carries all
|
|
70
|
+
// unacknowledged events; a fresh acknowledgement sends the next bounded batch.
|
|
71
|
+
post();
|
|
72
|
+
try {
|
|
73
|
+
return draw(
|
|
74
|
+
surface.elements,
|
|
75
|
+
clientView(active.latest),
|
|
76
|
+
surface.columns || active.latest.columns,
|
|
77
|
+
surface.rows || active.latest.rows,
|
|
78
|
+
);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
surface.post({
|
|
81
|
+
epoch: active.epoch,
|
|
82
|
+
fault: String(error).slice(0, 200) || 'Client drawing failed',
|
|
83
|
+
});
|
|
84
|
+
return surface.elements.Text({
|
|
85
|
+
...styles.text,
|
|
86
|
+
children: [tr("native.ui.client.surface.client_failed_use_retry_or_close_received_draft")],
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/catalog.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CatalogItem } from '../../lib/generated-contracts.ts';
|
|
2
|
+
import type { Language } from '../../lib/i18n/index.ts';
|
|
3
|
+
import { t } from '../../lib/i18n/index.ts';
|
|
4
|
+
import { matchText, normalize, segments, snippet } from '../../lib/editor/search.ts';
|
|
5
|
+
import type { Match } from '../../lib/editor/search.ts';
|
|
6
|
+
import { clip } from '../layout.ts';
|
|
7
|
+
import type { TextSpan } from './shortcuts.ts';
|
|
8
|
+
|
|
9
|
+
export function itemSpans(item: CatalogItem & {type_id?:string;custom_label?:string|null;ordinal?:number}, match: Match, query: string, language: Language, width: number, selected: boolean, enabled: boolean): TextSpan[] {
|
|
10
|
+
const label = (item.custom_label || t(`items.${item.scope}.${item.type_id ?? item.id}.label`, language)) + (item.ordinal ? ` (${item.ordinal})` : "");
|
|
11
|
+
const labelMatch = matchText(label, query);
|
|
12
|
+
const hint = normalize(query).characters.length > 0 && (!labelMatch || labelMatch.rank > match.rank);
|
|
13
|
+
if (hint) match = snippet(match);
|
|
14
|
+
const shown = hint ? clip(label, Math.max(4, Math.floor((width - 6) / (width < 48 ? 3 : 2)))) : label;
|
|
15
|
+
const points = [...shown];
|
|
16
|
+
const positions = labelMatch?.positions.filter(i => points[i] === [...label][i]) ?? [];
|
|
17
|
+
const styled = (text: string, positions: number[]) => segments(text, positions).map(span => ({text: span.text, style: {bold: span.highlighted}}));
|
|
18
|
+
return [
|
|
19
|
+
{text: `${selected ? '›' : ' '} [${enabled ? 'x' : ' '}] `},
|
|
20
|
+
...styled(shown, positions),
|
|
21
|
+
...(hint ? [{text: ' · ' + (width < 48 ? '' : t('catalog.search.match', language))}, ...styled(match.text, match.positions)] : []),
|
|
22
|
+
];
|
|
23
|
+
}
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/preview.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ClientElements, RenderElement } from 'claude-code';
|
|
2
|
+
import type { Draft, Span } from '../../lib/generated-contracts.ts';
|
|
3
|
+
import { spanColor } from '../../lib/backend.ts';
|
|
4
|
+
import type { PreviewBackground } from '../../lib/preview-preferences.ts';
|
|
5
|
+
import { displayWidth } from '../layout.ts';
|
|
6
|
+
import { clipSpans } from '../styled-text.ts';
|
|
7
|
+
import { t } from '../../lib/i18n/index.ts';
|
|
8
|
+
import type { Language } from '../../lib/i18n/index.ts';
|
|
9
|
+
|
|
10
|
+
/** Production foregrounds on the chosen preview background, without host text roles. */
|
|
11
|
+
export function previewLine(ui: ClientElements, spans: readonly Span[], width: number, background: PreviewBackground = 'dark'): RenderElement {
|
|
12
|
+
let remaining = Math.max(0, width);
|
|
13
|
+
const children: RenderElement[] = [];
|
|
14
|
+
for (const span of clipSpans(spans, width)) {
|
|
15
|
+
if (remaining <= 0) break;
|
|
16
|
+
const text = span.text;
|
|
17
|
+
if (!text) continue;
|
|
18
|
+
const color = spanColor(span);
|
|
19
|
+
const spanBackground = spanColor(span, 'background');
|
|
20
|
+
children.push(ui.Text({
|
|
21
|
+
...(color === undefined ? {} : { color }),
|
|
22
|
+
...(spanBackground === undefined ? {} : { backgroundColor: spanBackground }),
|
|
23
|
+
bold: span.bold, dimColor: false, children: [text],
|
|
24
|
+
}));
|
|
25
|
+
remaining -= displayWidth(text);
|
|
26
|
+
}
|
|
27
|
+
// Explicit spaces erase old sample cells after a shorter or empty redraw.
|
|
28
|
+
if (remaining) children.push(ui.Text({ children: [' '.repeat(remaining)] }));
|
|
29
|
+
return ui.Box({
|
|
30
|
+
width, height: 1, flexShrink: 0, overflow: 'hidden',
|
|
31
|
+
backgroundColor: background === 'light' ? '#ffffff' : '#17191e',
|
|
32
|
+
children: [ui.Text({ wrap: 'truncate', bold: false, dimColor: false, children })],
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function previewText(ui: ClientElements, text: string, width: number, background: PreviewBackground = 'dark'): RenderElement {
|
|
37
|
+
return previewLine(ui, [{ text, bold: false, foreground: null, background: null }], width, background);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function previewTitle(display: Draft['display'], columns: number, busy: boolean, background: PreviewBackground = 'dark', language: Language = 'en'): string {
|
|
41
|
+
const choice = display.use_colors ? display.palette : 'off';
|
|
42
|
+
const title = columns < 64 ? t('native.preview.short', language, {choice: t('values.' + choice, language), background: t('values.' + background, language)})
|
|
43
|
+
: t('native.preview.full', language, {choice: display.use_colors ? t('native.preview.palette', language, {palette: choice}) : t('ui.drawing.colors_off', language), background: t('values.' + background, language)});
|
|
44
|
+
return title + (busy ? ' …' : '');
|
|
45
|
+
}
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/section.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ClientElements, RenderElement } from 'claude-code';
|
|
2
|
+
import { clip, displayWidth } from '../layout.ts';
|
|
3
|
+
import { styles } from '../theme.ts';
|
|
4
|
+
import { spanLine } from './shortcuts.ts';
|
|
5
|
+
import type { TextSpan } from './shortcuts.ts';
|
|
6
|
+
|
|
7
|
+
/** Draw a cell-sized frame: the title occupies the top edge, not a body row. */
|
|
8
|
+
export function section(
|
|
9
|
+
ui: ClientElements,
|
|
10
|
+
key: string,
|
|
11
|
+
title: string,
|
|
12
|
+
children: RenderElement[],
|
|
13
|
+
width: number,
|
|
14
|
+
height: number,
|
|
15
|
+
framed: boolean,
|
|
16
|
+
terminalBackground = false,
|
|
17
|
+
): RenderElement {
|
|
18
|
+
const edge = { ...styles.muted, backgroundColor: styles.text.backgroundColor };
|
|
19
|
+
const label = clip(title, Math.max(1, width - 5));
|
|
20
|
+
const titleSpans: TextSpan[] = [{ text: ' ' + label + ' ', style: { ...styles.accent, bold: true } }];
|
|
21
|
+
const used = titleSpans.reduce((n, s) => n + displayWidth(s.text), 0);
|
|
22
|
+
const top = spanLine(ui, [
|
|
23
|
+
{ text: framed ? '╭─' : '─', style: edge },
|
|
24
|
+
...titleSpans,
|
|
25
|
+
{ text: '─'.repeat(Math.max(0, width - used - (framed ? 3 : 1))) + (framed ? '╮' : ''), style: edge },
|
|
26
|
+
], width);
|
|
27
|
+
const body = children.slice(0, Math.max(0, height - (framed ? 2 : 1)));
|
|
28
|
+
return ui.Box({
|
|
29
|
+
key,
|
|
30
|
+
...(terminalBackground ? {} : { backgroundColor: styles.text.backgroundColor }),
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
flexShrink: 0,
|
|
35
|
+
overflow: 'hidden',
|
|
36
|
+
children: [
|
|
37
|
+
top,
|
|
38
|
+
...body.map((child) => framed ? ui.Box({
|
|
39
|
+
flexDirection: 'row', flexShrink: 0, height: 1, width,
|
|
40
|
+
children: [
|
|
41
|
+
ui.Text({ ...edge, children: ['│'] }),
|
|
42
|
+
ui.Box({ width: width - 2, height: 1, flexShrink: 0, overflow: 'hidden', children: [child] }),
|
|
43
|
+
ui.Text({ ...edge, children: ['│'] }),
|
|
44
|
+
],
|
|
45
|
+
}) : child),
|
|
46
|
+
...(framed ? [ui.Text({ ...edge, wrap: 'truncate', children: ['╰' + '─'.repeat(Math.max(0, width - 2)) + '╯'] })] : []),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
}
|
package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/shortcuts.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ClientElements, RenderElement, TextProps } from 'claude-code';
|
|
2
|
+
import { clip, displayWidth } from '../layout.ts';
|
|
3
|
+
import { clipSpans } from '../styled-text.ts';
|
|
4
|
+
import { styles } from '../theme.ts';
|
|
5
|
+
|
|
6
|
+
export interface Shortcut {
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
short?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TextSpan {
|
|
13
|
+
text: string;
|
|
14
|
+
style?: TextProps;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Wrap complete hints in order; distinct action groups start on new rows. */
|
|
18
|
+
export function shortcutRows(groups: readonly (readonly Shortcut[])[], width: number, compact = false): Shortcut[][] {
|
|
19
|
+
const rows: Shortcut[][] = [];
|
|
20
|
+
for (const group of groups) {
|
|
21
|
+
let row: Shortcut[] = [];
|
|
22
|
+
let used = 0;
|
|
23
|
+
for (const hint of group) {
|
|
24
|
+
let label = compact ? hint.short ?? hint.label : hint.label;
|
|
25
|
+
if (displayWidth(hint.key + ' ' + label) > width) label = hint.short ?? label;
|
|
26
|
+
const size = displayWidth(hint.key + ' ' + label);
|
|
27
|
+
if (size > width) continue;
|
|
28
|
+
if (row.length && used + 3 + size > width) {
|
|
29
|
+
rows.push(row);
|
|
30
|
+
row = [];
|
|
31
|
+
used = 0;
|
|
32
|
+
}
|
|
33
|
+
used += (row.length ? 3 : 0) + size;
|
|
34
|
+
row.push({ ...hint, label });
|
|
35
|
+
}
|
|
36
|
+
if (row.length) rows.push(row);
|
|
37
|
+
}
|
|
38
|
+
return rows;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Fit complete shortcut groups, with shorter descriptions in narrow panes. */
|
|
42
|
+
export function shortcutSpans(hints: readonly Shortcut[], width: number, prefix = ''): TextSpan[] {
|
|
43
|
+
const spans: TextSpan[] = [];
|
|
44
|
+
let used = 0;
|
|
45
|
+
if (prefix) {
|
|
46
|
+
const text = clip(prefix, width);
|
|
47
|
+
spans.push({ text, style: styles.muted });
|
|
48
|
+
used = displayWidth(text);
|
|
49
|
+
}
|
|
50
|
+
const full = hints.map((h) => h.key + ' ' + h.label).join(' · ');
|
|
51
|
+
const compact = used + displayWidth(full) > width;
|
|
52
|
+
let count = 0;
|
|
53
|
+
for (const hint of hints) {
|
|
54
|
+
const label = compact ? hint.short ?? hint.label : hint.label;
|
|
55
|
+
const separator = count ? ' · ' : '';
|
|
56
|
+
const size = displayWidth(separator + hint.key + ' ' + label);
|
|
57
|
+
if (used + size > width) break;
|
|
58
|
+
if (separator) spans.push({ text: separator, style: styles.muted });
|
|
59
|
+
spans.push({ text: hint.key, style: styles.key });
|
|
60
|
+
spans.push({ text: ' ' + label, style: { ...styles.muted, bold: false } });
|
|
61
|
+
used += size;
|
|
62
|
+
count++;
|
|
63
|
+
}
|
|
64
|
+
return spans;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function spanLine(ui: ClientElements, spans: readonly TextSpan[], width: number, style: TextProps = {}): RenderElement {
|
|
68
|
+
let remaining = Math.max(0, width);
|
|
69
|
+
const children: RenderElement[] = [];
|
|
70
|
+
for (const span of clipSpans(spans, width)) {
|
|
71
|
+
if (remaining <= 0) break;
|
|
72
|
+
if (!span.text) continue;
|
|
73
|
+
const text = span.text;
|
|
74
|
+
if (!text) continue;
|
|
75
|
+
children.push(ui.Text({ ...span.style, children: [text] }));
|
|
76
|
+
remaining -= displayWidth(text);
|
|
77
|
+
}
|
|
78
|
+
return ui.Text({ wrap: 'truncate', bold: false, ...styles.text, ...style, children });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function shortcuts(ui: ClientElements, hints: readonly Shortcut[], width: number, prefix = ''): RenderElement {
|
|
82
|
+
return spanLine(ui, shortcutSpans(hints, width, prefix), width);
|
|
83
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const MIN_COLUMNS = 32;
|
|
2
|
+
export const MIN_ROWS = 12;
|
|
3
|
+
|
|
4
|
+
/** Columns available inside the same frame used by editor drawing. */
|
|
5
|
+
export function contentColumns(columns: number, rows: number): number {
|
|
6
|
+
return Math.max(1, columns - (columns >= 64 && rows >= 20 ? 2 : 0));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Budget a paged body between the header, preview and action rows. */
|
|
10
|
+
export function dimensions(columns: number, rows: number, footerRows = 2) {
|
|
11
|
+
const framed = columns >= 64 && rows >= 20;
|
|
12
|
+
const previewRows = Math.min(3, Math.max(1, Math.floor((rows - 8 - footerRows) / 4)));
|
|
13
|
+
const previewHeight = previewRows + (framed ? 2 : 1);
|
|
14
|
+
const bodyHeight = Math.max(1, rows - 3 - footerRows - previewHeight);
|
|
15
|
+
const bodyRows = Math.max(1, bodyHeight - (framed ? 2 : 1));
|
|
16
|
+
const tableHeading = columns >= 64 && bodyRows >= 4;
|
|
17
|
+
const showSummary = bodyRows >= (tableHeading ? 4 : 3);
|
|
18
|
+
const showDetails = bodyRows >= (tableHeading ? 5 : 4);
|
|
19
|
+
return {
|
|
20
|
+
columns,
|
|
21
|
+
rows,
|
|
22
|
+
framed,
|
|
23
|
+
previewRows,
|
|
24
|
+
previewHeight,
|
|
25
|
+
bodyHeight,
|
|
26
|
+
bodyRows,
|
|
27
|
+
tableHeading,
|
|
28
|
+
showSummary,
|
|
29
|
+
showDetails,
|
|
30
|
+
footerRows,
|
|
31
|
+
itemCapacity: Math.max(1, bodyRows - 1 - Number(tableHeading) - Number(showSummary) - Number(showDetails)),
|
|
32
|
+
formHeight: Math.max(1, bodyRows - Number(tableHeading) - Number(showSummary)),
|
|
33
|
+
available: columns >= MIN_COLUMNS && rows >= MIN_ROWS,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { cellWidth, displayWidth } from '../lib/unicode.ts';
|
|
38
|
+
import { displayWidth, clip as clipGraphemes } from '../lib/unicode.ts';
|
|
39
|
+
|
|
40
|
+
/** Clip at complete graphemes after replacing single-line control input. */
|
|
41
|
+
export function clip(text: string, width: number): string {
|
|
42
|
+
return clipGraphemes(text.replace(/[\x00-\x1f\x7f]/g, ' '), width);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Pad clipped labels by terminal cells, including wide and combining text. */
|
|
46
|
+
export function column(text: string, width: number): string {
|
|
47
|
+
const label = clip(text, width);
|
|
48
|
+
return label + ' '.repeat(Math.max(0, width - displayWidth(label)));
|
|
49
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Generated by tools/generation/resources.ts; do not edit.
|
|
2
|
+
/** Partition complete rows before styling or clipping, including span boundaries. */
|
|
3
|
+
import { graphemes, clusterWidth, cellWidth } from '../lib/unicode.ts';
|
|
4
|
+
export function clusterSpans<T extends {
|
|
5
|
+
text: string;
|
|
6
|
+
}>(spans: readonly T[]): T[] {
|
|
7
|
+
spans = spans.map(span => ({ ...span, text: span.text.replace(/[\p{Cc}\p{Cs}]/gu, ' ') }));
|
|
8
|
+
const states: T[] = [];
|
|
9
|
+
for (const span of spans)
|
|
10
|
+
for (const _ of span.text)
|
|
11
|
+
states.push(span);
|
|
12
|
+
const result: T[] = [];
|
|
13
|
+
let offset = 0;
|
|
14
|
+
for (const cluster of graphemes(spans.map(s => s.text).join(''))) {
|
|
15
|
+
const chars = [...cluster], base = Math.max(0, chars.findIndex(c => cellWidth(c) > 0));
|
|
16
|
+
result.push({ ...states[offset + base]!, text: cluster });
|
|
17
|
+
offset += chars.length;
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
function merge<T extends {
|
|
22
|
+
text: string;
|
|
23
|
+
}>(spans: T[]): T[] {
|
|
24
|
+
const result: T[] = [];
|
|
25
|
+
for (const span of spans) {
|
|
26
|
+
const previous = result.at(-1);
|
|
27
|
+
const keys = Object.keys(span).filter(key => key !== 'text') as (keyof T)[];
|
|
28
|
+
if (previous && Object.keys(previous).length === Object.keys(span).length && keys.every(key => previous[key] === span[key]))
|
|
29
|
+
previous.text += span.text;
|
|
30
|
+
else
|
|
31
|
+
result.push({ ...span });
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
export function clipSpans<T extends {
|
|
36
|
+
text: string;
|
|
37
|
+
}>(spans: readonly T[], width: number): T[] {
|
|
38
|
+
width = Math.max(0, width);
|
|
39
|
+
if (!width)
|
|
40
|
+
return [];
|
|
41
|
+
const clusters = clusterSpans(spans);
|
|
42
|
+
if (clusters.reduce((n, c) => n + clusterWidth(c.text), 0) <= width)
|
|
43
|
+
return merge(clusters);
|
|
44
|
+
const result: T[] = [];
|
|
45
|
+
let used = 0;
|
|
46
|
+
for (const cluster of clusters) {
|
|
47
|
+
const size = clusterWidth(cluster.text);
|
|
48
|
+
if (used + size > width - 1)
|
|
49
|
+
break;
|
|
50
|
+
result.push(cluster);
|
|
51
|
+
used += size;
|
|
52
|
+
}
|
|
53
|
+
if (clusters.length)
|
|
54
|
+
result.push({ ...((result.length ? result[result.length - 1] : clusters[0])!), text: '…' });
|
|
55
|
+
return merge(result);
|
|
56
|
+
}
|