@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,82 @@
|
|
|
1
|
+
/** Fatal UTF-8 decoding with Python-compatible public error descriptions. */
|
|
2
|
+
export function decodeUtf8(raw) {
|
|
3
|
+
function invalid(start, end, reason) {
|
|
4
|
+
const bytes = end - start === 1 ? `byte 0x${raw[start].toString(16).padStart(2, '0')} in position ${start}` : `bytes in position ${start}-${end - 1}`;
|
|
5
|
+
throw new Error(`'utf-8' codec can't decode ${bytes}: ${reason}`);
|
|
6
|
+
}
|
|
7
|
+
for (let i = 0; i < raw.length;) {
|
|
8
|
+
const first = raw[i];
|
|
9
|
+
if (first < 0x80) {
|
|
10
|
+
i++;
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const length = first >= 0xc2 && first <= 0xdf ? 2 : first >= 0xe0 && first <= 0xef ? 3 : first >= 0xf0 && first <= 0xf4 ? 4 : 0;
|
|
14
|
+
if (!length)
|
|
15
|
+
invalid(i, i + 1, 'invalid start byte');
|
|
16
|
+
for (let n = 1; n < length; n++) {
|
|
17
|
+
const byte = raw[i + n];
|
|
18
|
+
if (byte === undefined)
|
|
19
|
+
invalid(i, raw.length, 'unexpected end of data');
|
|
20
|
+
const minimum = n === 1 && first === 0xe0 ? 0xa0 : n === 1 && first === 0xf0 ? 0x90 : 0x80;
|
|
21
|
+
const maximum = n === 1 && first === 0xed ? 0x9f : n === 1 && first === 0xf4 ? 0x8f : 0xbf;
|
|
22
|
+
if (byte < minimum || byte > maximum)
|
|
23
|
+
invalid(i, i + n, 'invalid continuation byte');
|
|
24
|
+
}
|
|
25
|
+
i += length;
|
|
26
|
+
}
|
|
27
|
+
return new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(raw);
|
|
28
|
+
}
|
|
29
|
+
export function decodeUtf8Sig(raw) {
|
|
30
|
+
return decodeUtf8(raw[0] === 0xef && raw[1] === 0xbb && raw[2] === 0xbf ? raw.subarray(3) : raw);
|
|
31
|
+
}
|
|
32
|
+
/** json.loads(bytes) detects UTF-8/16/32; text-mode legacy readers stay UTF-8. */
|
|
33
|
+
export function decodeJsonBytes(raw) {
|
|
34
|
+
let unit = 1, little = false, start = 0;
|
|
35
|
+
if (raw.length >= 4 && raw[0] === 0 && raw[1] === 0 && raw[2] === 0xfe && raw[3] === 0xff) {
|
|
36
|
+
unit = 4;
|
|
37
|
+
start = 4;
|
|
38
|
+
}
|
|
39
|
+
else if (raw.length >= 4 && raw[0] === 0xff && raw[1] === 0xfe && raw[2] === 0 && raw[3] === 0) {
|
|
40
|
+
unit = 4;
|
|
41
|
+
little = true;
|
|
42
|
+
start = 4;
|
|
43
|
+
}
|
|
44
|
+
else if (raw[0] === 0xfe && raw[1] === 0xff) {
|
|
45
|
+
unit = 2;
|
|
46
|
+
start = 2;
|
|
47
|
+
}
|
|
48
|
+
else if (raw[0] === 0xff && raw[1] === 0xfe) {
|
|
49
|
+
unit = 2;
|
|
50
|
+
little = true;
|
|
51
|
+
start = 2;
|
|
52
|
+
}
|
|
53
|
+
else if (raw.length >= 4) {
|
|
54
|
+
if (raw[0] === 0)
|
|
55
|
+
unit = raw[1] === 0 ? 4 : 2;
|
|
56
|
+
else if (raw[1] === 0) {
|
|
57
|
+
unit = raw[2] !== 0 || raw[3] !== 0 ? 2 : 4;
|
|
58
|
+
little = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else if (raw.length === 2) {
|
|
62
|
+
if (raw[0] === 0)
|
|
63
|
+
unit = 2;
|
|
64
|
+
else if (raw[1] === 0) {
|
|
65
|
+
unit = 2;
|
|
66
|
+
little = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (unit === 1)
|
|
70
|
+
return decodeUtf8Sig(raw);
|
|
71
|
+
if ((raw.length - start) % unit)
|
|
72
|
+
throw new Error('Truncated JSON Unicode code unit');
|
|
73
|
+
const view = new DataView(raw.buffer, raw.byteOffset, raw.byteLength), parts = [];
|
|
74
|
+
for (let i = start; i < raw.length; i += unit) {
|
|
75
|
+
const value = unit === 2 ? view.getUint16(i, little) : view.getUint32(i, little);
|
|
76
|
+
if (value > 0x10ffff)
|
|
77
|
+
throw new Error('Invalid JSON Unicode code point');
|
|
78
|
+
parts.push(unit === 2 ? String.fromCharCode(value) : String.fromCodePoint(value));
|
|
79
|
+
}
|
|
80
|
+
return parts.join('');
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=utf8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../src/utf8.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,UAAU,UAAU,CAAC,GAAe;IACtC,SAAS,OAAO,CAAC,KAAa,EAAE,GAAW,EAAE,MAAc;QACvD,MAAM,KAAK,GAAG,GAAG,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,KAAK,CAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,gBAAgB,KAAK,EAAE,CAAC,CAAC,CAAC,qBAAqB,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACvJ,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAA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AC;QAAC,CAAC;IACnF,CAAC;IACD,IAAI,IAAI,KAAK,CAAC;QAAE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACrF,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,GAAa,EAAE,CAAC;IAC5F,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACjF,IAAI,KAAK,GAAG,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACzE,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fbincon/statusline-platform",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": { "./*": { "types": "./dist/src/*.d.ts", "import": "./dist/src/*.js" } },
|
|
7
|
+
"dependencies": { "@fbincon/statusline-core": "0.0.0", "koffi": "3.3.3" }
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { State } from './state.js';
|
|
2
|
+
import { type Paint } from './theme.js';
|
|
3
|
+
export type { Paint } from './theme.js';
|
|
4
|
+
export interface Frame {
|
|
5
|
+
columns: number;
|
|
6
|
+
rows: Paint[][];
|
|
7
|
+
}
|
|
8
|
+
/** Fit whole bindings; a key and its action never get split between rows. */
|
|
9
|
+
export declare function shortcuts(hints: readonly [
|
|
10
|
+
string,
|
|
11
|
+
string
|
|
12
|
+
][], width: number): Paint[];
|
|
13
|
+
export declare function frame(state: State, columns: number, rows: number): Frame;
|
|
14
|
+
export declare function ansiFrame(value: Frame, colors?: number): string;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { clip, displayWidth, clusterWidth } from '@fbincon/statusline-core/unicode/index';
|
|
2
|
+
import { clipSpans, clusterSpans } from '@fbincon/statusline-core/terminal/spans';
|
|
3
|
+
import { terminalColor } from '@fbincon/statusline-core/rendering/colors';
|
|
4
|
+
import { fieldMessage } from '@fbincon/statusline-core/editor/forms';
|
|
5
|
+
import { guidanceLines } from '@fbincon/statusline-core/editor/guidance';
|
|
6
|
+
import { reviewRows } from '@fbincon/statusline-core/editor/import-review';
|
|
7
|
+
import { matchText, segments, snippet } from '@fbincon/statusline-core/editor/search';
|
|
8
|
+
import { t, renderMessage, LANGUAGE_NAMES } from '@fbincon/statusline-core/i18n/messages';
|
|
9
|
+
import { dimensions, formWindow } from './layout.js';
|
|
10
|
+
import { paint, heading } from './theme.js';
|
|
11
|
+
const safe = (text) => text.replace(/[\p{Cc}\p{Cs}]/gu, ' ');
|
|
12
|
+
const groupKey = (group) => 'groups.' + group.toLowerCase().replaceAll(' / ', '.').replaceAll(' ', '-');
|
|
13
|
+
const col = (text, width) => {
|
|
14
|
+
text = safe(text);
|
|
15
|
+
if (displayWidth(text) > width)
|
|
16
|
+
text = width > 0 ? clip(text, width - 1) + '…' : '';
|
|
17
|
+
return text + ' '.repeat(Math.max(0, width - displayWidth(text)));
|
|
18
|
+
};
|
|
19
|
+
/** Fit whole bindings; a key and its action never get split between rows. */
|
|
20
|
+
export function shortcuts(hints, width) {
|
|
21
|
+
const spans = [];
|
|
22
|
+
let used = 0;
|
|
23
|
+
for (const [key, label] of hints) {
|
|
24
|
+
const sep = spans.length ? ' · ' : '', size = displayWidth(sep + key + ' ' + label);
|
|
25
|
+
if (used + size > width)
|
|
26
|
+
break;
|
|
27
|
+
if (sep)
|
|
28
|
+
spans.push(paint(sep));
|
|
29
|
+
spans.push(paint(key, true), paint(' ' + label));
|
|
30
|
+
used += size;
|
|
31
|
+
}
|
|
32
|
+
return spans;
|
|
33
|
+
}
|
|
34
|
+
export function frame(state, columns, rows) {
|
|
35
|
+
columns = Math.max(1, Math.min(500, Math.trunc(columns)));
|
|
36
|
+
rows = Math.max(1, Math.min(200, Math.trunc(rows)));
|
|
37
|
+
const cells = Array.from({ length: rows }, () => Array.from({ length: columns }, () => paint(' '))), e = state.editor;
|
|
38
|
+
const result = () => ({ columns, rows: cells.map(row => {
|
|
39
|
+
const spans = [];
|
|
40
|
+
for (const cell of row)
|
|
41
|
+
if (cell) {
|
|
42
|
+
const last = spans.at(-1);
|
|
43
|
+
if (last && last.bold === cell.bold && last.reverse === cell.reverse && last.foreground === cell.foreground && last.background === cell.background)
|
|
44
|
+
last.text += cell.text;
|
|
45
|
+
else
|
|
46
|
+
spans.push({ ...cell });
|
|
47
|
+
}
|
|
48
|
+
return spans;
|
|
49
|
+
}) });
|
|
50
|
+
const tr = (key, params = {}, fallback) => t(key, state.language, params, fallback);
|
|
51
|
+
const put = (y, x, spans, width = columns - x) => {
|
|
52
|
+
if (y < 0 || y >= rows || x < 0 || x >= columns)
|
|
53
|
+
return;
|
|
54
|
+
for (const span of clusterSpans(clipSpans(spans, Math.min(width, columns - x)))) {
|
|
55
|
+
const size = clusterWidth(span.text);
|
|
56
|
+
if (!size)
|
|
57
|
+
continue;
|
|
58
|
+
cells[y][x] = span;
|
|
59
|
+
for (let offset = 1; offset < size; offset++)
|
|
60
|
+
cells[y][x + offset] = null;
|
|
61
|
+
x += size;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const line = (y, text, bold = false, reverse = false, x = 0, width = columns - x) => put(y, x, [paint(text, bold, reverse)], width);
|
|
65
|
+
const size = dimensions(columns, rows);
|
|
66
|
+
if (!size.available) {
|
|
67
|
+
line(0, tr('ui.drawing.terminal_too_small_need_x_current_x', { MIN_TERMINAL_WIDTH: 64, MIN_TERMINAL_HEIGHT: 18, width: columns, height: rows }));
|
|
68
|
+
put(Math.min(rows - 1, 2), 0, shortcuts([['Esc', tr('ui.hints.cancel')], ['Ctrl+C', tr('ui.hints.interrupt')]], columns));
|
|
69
|
+
return result();
|
|
70
|
+
}
|
|
71
|
+
state.ensureVisible(size.listHeight);
|
|
72
|
+
put(0, 0, [heading(tr('ui.drawing.configure_status_line') + (e.modified ? ' *' : ''))]);
|
|
73
|
+
line(1, e.detail ? tr('ui.drawing.edit_item_format') + e.instanceLabel(e.detail.scope, e.detail.id, state.language) : tr(e.page === 'layout' ? 'ui.drawing.set_explicit_rows_priorities_and_widths' : e.page === 'main' ? 'ui.drawing.choose_main_status_line_items_and_their' : e.page === 'subagents' ? 'ui.drawing.choose_subagent_row_items_and_their_order' : 'ui.drawing.adjust_display_and_tool_refresh_settings'));
|
|
74
|
+
let tabX = 0;
|
|
75
|
+
for (const page of ['main', 'subagents', 'settings', 'layout']) {
|
|
76
|
+
const label = tr('ui.drawing.' + page);
|
|
77
|
+
put(2, tabX, [paint(label, page === e.page, page === e.page)]);
|
|
78
|
+
tabX += displayWidth(label) + 2;
|
|
79
|
+
}
|
|
80
|
+
const notice = renderMessage(state.localized.message ?? state.message, state.language) || (e.review ? tr('review.intro') : state.form ? tr(e.detail ? 'ui.drawing.item_format_ctrl_g_back' : e.page === 'layout' ? 'ui.drawing.explicit_rows_priority_width' : 'ui.drawing.use_arrows_to_change_values_enter_edits') : `Ctrl+F ${tr('catalog.categories.' + e.category[state.scope])} · / ${tr('ui.drawing.type_to_search')}${e.search[state.scope]}${state.input?.kind === 'search' ? ' _' : ''}`);
|
|
81
|
+
line(3, notice);
|
|
82
|
+
const panel = (p, title) => {
|
|
83
|
+
line(p.y, p.framed ? '┌' + '─'.repeat(p.width - 2) + '┐' : '─'.repeat(p.width));
|
|
84
|
+
put(p.y, p.framed ? 2 : 1, [heading(' ' + col(title, Math.max(0, p.width - (p.framed ? 6 : 4))).trimEnd() + ' ')], p.width - (p.framed ? 4 : 2));
|
|
85
|
+
if (p.framed) {
|
|
86
|
+
for (let y = p.y + 1; y < p.y + p.height - 1; y++) {
|
|
87
|
+
line(y, '│');
|
|
88
|
+
line(y, '│', false, false, columns - 1);
|
|
89
|
+
}
|
|
90
|
+
line(p.y + p.height - 1, '└' + '─'.repeat(p.width - 2) + '┘');
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const p = size.content;
|
|
94
|
+
const title = e.review ? tr('review.title') : e.guidanceScroll !== null ? tr('guidance.title') : state.input?.kind === 'category' ? tr('catalog.search.categories') : e.adding ? tr('composition.picker') : e.detail ? tr('ui.drawing.item_format_2') + e.instanceLabel(e.detail.scope, e.detail.id, state.language) : tr(e.page === 'layout' ? 'ui.drawing.layout_rows_and_fitting' : e.page === 'settings' ? 'ui.drawing.settings_global_options' : e.page === 'subagents' ? 'ui.drawing.subagent_items' : 'ui.drawing.main_items');
|
|
95
|
+
panel(p, title);
|
|
96
|
+
const contentSpans = (offset, spans, selected = false) => {
|
|
97
|
+
if (selected)
|
|
98
|
+
line(p.innerY + offset, ' '.repeat(p.innerWidth), false, true, p.innerX, p.innerWidth);
|
|
99
|
+
put(p.innerY + offset, p.innerX, spans, p.innerWidth);
|
|
100
|
+
};
|
|
101
|
+
const content = (offset, text, bold = false, selected = false) => contentSpans(offset, [paint(text, bold, selected)], selected);
|
|
102
|
+
let summary = '';
|
|
103
|
+
if (e.review || e.guidanceScroll !== null) {
|
|
104
|
+
const review = e.review, capacity = Math.max(1, p.innerHeight - 1);
|
|
105
|
+
const values = review ? reviewRows(review, state.language, p.innerWidth) : guidanceLines(e.definition(e.detail.scope, e.detail.id), state.language, p.innerWidth).map(text => ({ text, heading: false, section: '' }));
|
|
106
|
+
const start = Math.min(review?.scroll ?? e.guidanceScroll ?? 0, Math.max(0, values.length - capacity));
|
|
107
|
+
if (review)
|
|
108
|
+
review.scroll = start;
|
|
109
|
+
else
|
|
110
|
+
e.guidanceScroll = start;
|
|
111
|
+
values.slice(start, start + capacity).forEach((row, i) => {
|
|
112
|
+
const selected = row.heading && row.section === review?.selected;
|
|
113
|
+
contentSpans(i, [row.heading ? heading(row.text, selected) : paint(row.text)], selected);
|
|
114
|
+
});
|
|
115
|
+
summary = `${start + 1}–${Math.min(values.length, start + capacity)}/${values.length}`;
|
|
116
|
+
}
|
|
117
|
+
else if (state.input?.kind === 'category') {
|
|
118
|
+
const input = state.input, values = e.categories(state.scope), capacity = p.innerHeight - 1, index = values.indexOf(input.selected), start = Math.max(0, index - capacity + 1);
|
|
119
|
+
values.slice(start, start + capacity).forEach((value, i) => content(i, (value === input.selected ? '› ' : ' ') + tr('catalog.categories.' + value), false, value === input.selected));
|
|
120
|
+
summary = `${index + 1}/${values.length}`;
|
|
121
|
+
}
|
|
122
|
+
else if (state.form) {
|
|
123
|
+
const values = state.rows(), window = formWindow(values, values.findIndex(r => r.key === e.setting), state.scroll[e.detail ? 'detail' : e.page] ?? 0, size.listHeight);
|
|
124
|
+
const label = (row) => {
|
|
125
|
+
const key = row.key === 'custom-subagent-rows' ? 'settings-subagent-statusline' : row.key === 'layout-mode' ? 'layout.mode' : row.key;
|
|
126
|
+
const message = fieldMessage({ ...row, key }, state);
|
|
127
|
+
return t(message.key, state.language, message.params, row.label);
|
|
128
|
+
};
|
|
129
|
+
const labelWidth = Math.min(44, Math.max(24, Math.floor(p.innerWidth / 2)), Math.max(...values.map(row => displayWidth(label(row)) + 1)));
|
|
130
|
+
content(0, ' ' + col(tr('ui.drawing.option').trim(), labelWidth) + ' ' + tr('ui.drawing.value').trim(), true);
|
|
131
|
+
window.lines.forEach((entry, i) => {
|
|
132
|
+
if (entry.index === undefined) {
|
|
133
|
+
const label = '─ ' + col(tr(groupKey(entry.group), {}, entry.group), p.innerWidth - 3).trimEnd() + ' ';
|
|
134
|
+
contentSpans(i + 1, [heading(label), paint('─'.repeat(Math.max(0, p.innerWidth - displayWidth(label))))]);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const row = values[entry.index];
|
|
138
|
+
let value = row.value;
|
|
139
|
+
if (row.key === 'field:statusline_language')
|
|
140
|
+
value = LANGUAGE_NAMES[e.draft.display.statusline_language];
|
|
141
|
+
else if (row.key === 'preset-select')
|
|
142
|
+
value = tr('presets.' + value);
|
|
143
|
+
else if (row.kind === 'action')
|
|
144
|
+
value = tr('native.actions.' + row.key, {}, value);
|
|
145
|
+
else if (!row.key.endsWith(':text') && !row.key.endsWith(':label') && !row.key.endsWith(':icon') && !row.key.endsWith('base_ref'))
|
|
146
|
+
value = tr('values.' + value, {}, value);
|
|
147
|
+
const input = state.input;
|
|
148
|
+
if (input && (input.kind === 'field' || input.kind === 'path') && input.key === row.key)
|
|
149
|
+
value = input.buffer + ' _';
|
|
150
|
+
if (input?.kind === 'numeric' && input.field === row.key)
|
|
151
|
+
value = input.buffer + ' _';
|
|
152
|
+
const prefix = (row.key === e.setting ? '› ' : ' ') + col(label(row) + ':', labelWidth) + ' ';
|
|
153
|
+
if (row.kind === 'action')
|
|
154
|
+
contentSpans(i + 1, [paint(prefix, false, row.key === e.setting), paint('Enter', true, row.key === e.setting), paint(' ' + value, false, row.key === e.setting)], row.key === e.setting);
|
|
155
|
+
else
|
|
156
|
+
content(i + 1, prefix + value, false, row.key === e.setting);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
summary = tr('ui.drawing.fields', { value0: window.start + 1, end: window.end, value2: values.length });
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
const scope = state.scope, values = e.matches(scope), start = state.scroll[scope] ?? 0;
|
|
163
|
+
const itemWidth = Math.min(30, Math.max(18, Math.floor(p.innerWidth / 3)));
|
|
164
|
+
content(0, ' ' + col(tr('ui.drawing.on').trim(), 5) + col(tr('ui.drawing.item').trim(), itemWidth) + ' ' + tr('ui.drawing.description').trim(), true);
|
|
165
|
+
values.slice(start, start + size.listHeight).forEach(({ item, match }, i) => {
|
|
166
|
+
const selected = item.id === e.selected[scope], enabled = e.items(scope).includes(item.id);
|
|
167
|
+
const label = e.adding ? tr(`items.${scope}.${item.id}.label`, {}, item.label) : e.instanceLabel(scope, item.id, state.language);
|
|
168
|
+
const description = tr(`items.${scope}.${item.type_id ?? item.id}.description`, {}, item.description);
|
|
169
|
+
const query = e.search[scope], labelMatch = query ? matchText(label, query) : null;
|
|
170
|
+
const hint = !!query && (!labelMatch || labelMatch.rank > match.rank), shown = col(label, itemWidth);
|
|
171
|
+
const points = [...shown], positions = labelMatch?.positions.filter(index => points[index] === [...label][index]) ?? [];
|
|
172
|
+
const styled = (value, marked) => segments(value, marked).map(span => paint(span.text, span.highlighted, selected));
|
|
173
|
+
const matchHint = snippet(match);
|
|
174
|
+
contentSpans(i + 1, [paint((selected ? '› ' : ' ') + (enabled ? '[x] ' : '[ ] '), false, selected), ...styled(shown, positions), paint(' ', false, selected), ...(hint ? styled(matchHint.text, matchHint.positions) : [paint(description, false, selected)])], selected);
|
|
175
|
+
});
|
|
176
|
+
if (!values.length)
|
|
177
|
+
content(1, tr('ui.drawing.no_matching_items'));
|
|
178
|
+
summary = tr('ui.drawing.items_enabled', { value0: values.length ? start + 1 : 0, value1: Math.min(values.length, start + size.listHeight), value2: values.length, value3: e.items(scope).length });
|
|
179
|
+
}
|
|
180
|
+
content(p.innerHeight - 1, summary);
|
|
181
|
+
const draft = e.review?.result.draft ?? e.draft;
|
|
182
|
+
panel(size.preview, e.review ? tr('review.preview', { scope: tr('review.sections.' + e.review.previewScope) }) : tr('ui.drawing.preview_sample_data') + (draft.display.use_colors ? tr('ui.drawing.palette') + draft.display.palette : tr('ui.drawing.colors_off')));
|
|
183
|
+
const sample = state.preview ? (e.review ? e.review.previewScope === 'subagent' : e.page === 'subagents') ? state.preview.subagents : state.preview.main : [];
|
|
184
|
+
const capacity = size.preview.innerHeight, overflow = sample.length > capacity, count = overflow && capacity > 1 ? capacity - 1 : capacity;
|
|
185
|
+
for (let i = 0; i < count; i++)
|
|
186
|
+
put(size.preview.innerY + i, size.preview.innerX, sample[i] ?? [paint(i === 0 && !sample.length ? tr('ui.drawing.no_enabled_items') : '')], size.preview.innerWidth);
|
|
187
|
+
if (overflow && capacity > 1)
|
|
188
|
+
line(size.preview.innerY + count, tr('ui.drawing.more_line', { remaining: sample.length - count }), false, false, size.preview.innerX, size.preview.innerWidth);
|
|
189
|
+
let actions = [['Ctrl+S', 'save'], ['Esc', 'cancel'], ['Ctrl+C', 'interrupt']];
|
|
190
|
+
let help = [['Tab', 'page'], ['↑↓', 'select'], ['←→', state.form ? 'adjust' : 'order'], ['Enter', state.form ? 'edit_save' : 'save']];
|
|
191
|
+
if (!state.form)
|
|
192
|
+
help = [['Tab', 'page'], ['Space', 'toggle'], ['Ctrl+E', 'format'], ['↑↓', 'select'], ['←→', 'order'], ['Ctrl+A/D/X', 'add_copy_remove']];
|
|
193
|
+
if (e.review) {
|
|
194
|
+
actions = [['A', 'accept_draft'], ['Esc/Ctrl+G', 'cancel_review']];
|
|
195
|
+
help = [['Enter', 'details'], ['↑↓', 'section'], ['PgUp/PgDn', 'scroll'], ['Tab', 'preview']];
|
|
196
|
+
}
|
|
197
|
+
else if (e.guidanceScroll !== null) {
|
|
198
|
+
actions = [['Ctrl+G/Esc', 'back']];
|
|
199
|
+
help = [['↑↓', 'scroll'], ['PgUp/PgDn', 'page'], ['Home/End', 'scroll']];
|
|
200
|
+
}
|
|
201
|
+
else if (state.input) {
|
|
202
|
+
actions = [['Enter', 'accept'], ['Ctrl+G/Esc', 'restore']];
|
|
203
|
+
help = [['Ctrl+U', 'clear'], ['Backspace', 'delete']];
|
|
204
|
+
}
|
|
205
|
+
else if (e.adding) {
|
|
206
|
+
actions = [['Enter', 'accept'], ['Ctrl+G/Esc', 'back']];
|
|
207
|
+
help = [['↑↓', 'select'], ['/', 'search'], ['Ctrl+F', 'category']];
|
|
208
|
+
}
|
|
209
|
+
put(size.actionsY, 0, shortcuts(actions.map(([key, hint]) => [key, tr('ui.hints.' + hint)]), columns));
|
|
210
|
+
put(size.helpY, 0, shortcuts(help.map(([key, hint]) => [key, tr('ui.hints.' + hint)]), columns));
|
|
211
|
+
return result();
|
|
212
|
+
}
|
|
213
|
+
export function ansiFrame(value, colors = 256) {
|
|
214
|
+
const color = (value, background) => {
|
|
215
|
+
if (!value || colors < 8)
|
|
216
|
+
return '';
|
|
217
|
+
const index = terminalColor(value.kind === 'rgb' && typeof value.value === 'string' ? ['rgb', value.value] : value.kind === 'ansi' && typeof value.value === 'number' ? ['ansi', value.value] : null, colors);
|
|
218
|
+
if (index === null)
|
|
219
|
+
return '';
|
|
220
|
+
return colors >= 256 ? `\x1b[${background ? 48 : 38};5;${index}m` : `\x1b[${(background ? 40 : 30) + index % 8 + (index >= 8 ? 60 : 0)}m`;
|
|
221
|
+
};
|
|
222
|
+
let output = '\x1b[H';
|
|
223
|
+
for (let y = 0; y < value.rows.length; y++) {
|
|
224
|
+
output += `\x1b[${y + 1};1H\x1b[0m\x1b[2K`;
|
|
225
|
+
for (const span of value.rows[y])
|
|
226
|
+
output += '\x1b[0m' + (span.bold ? '\x1b[1m' : '') + (span.reverse ? '\x1b[7m' : '') + color(span.foreground, false) + color(span.background, true) + safe(span.text);
|
|
227
|
+
}
|
|
228
|
+
return output + '\x1b[0m';
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=drawing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing.js","sourceRoot":"","sources":["../../src/drawing.ts"],"names":[],"mapp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AC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9K,CAAC;IACD,OAAO,MAAM,GAAG,SAAS,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const MIN_COLUMNS = 64, MIN_ROWS = 18;
|
|
2
|
+
export interface Panel {
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
framed: boolean;
|
|
7
|
+
innerY: number;
|
|
8
|
+
innerX: number;
|
|
9
|
+
innerWidth: number;
|
|
10
|
+
innerHeight: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function dimensions(width: number, height: number): {
|
|
13
|
+
content: Panel;
|
|
14
|
+
preview: Panel;
|
|
15
|
+
actionsY: number;
|
|
16
|
+
helpY: number;
|
|
17
|
+
listHeight: number;
|
|
18
|
+
available: boolean;
|
|
19
|
+
};
|
|
20
|
+
export interface FormLine {
|
|
21
|
+
group: string;
|
|
22
|
+
index?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function formWindow(rows: readonly {
|
|
25
|
+
group: string;
|
|
26
|
+
}[], selected: number, scroll: number, height: number): {
|
|
27
|
+
start: number;
|
|
28
|
+
end: number;
|
|
29
|
+
lines: FormLine[];
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const MIN_COLUMNS = 64, MIN_ROWS = 18;
|
|
2
|
+
export function dimensions(width, height) {
|
|
3
|
+
const framed = width >= 64 && height >= 20;
|
|
4
|
+
const previewRows = Math.min(5, Math.max(2, Math.floor((height - 10) / 4)));
|
|
5
|
+
const previewHeight = previewRows + (framed ? 2 : 1), contentHeight = Math.max(3, height - 6 - previewHeight);
|
|
6
|
+
const panel = (y, h) => ({ y, width, height: h, framed, innerY: y + 1, innerX: framed ? 2 : 1, innerWidth: Math.max(1, width - (framed ? 4 : 2)), innerHeight: Math.max(1, h - (framed ? 2 : 1)) });
|
|
7
|
+
const content = panel(4, contentHeight), preview = panel(4 + contentHeight, previewHeight);
|
|
8
|
+
return { content, preview, actionsY: height - 2, helpY: height - 1, listHeight: Math.max(1, content.innerHeight - 2), available: width >= MIN_COLUMNS && height >= MIN_ROWS };
|
|
9
|
+
}
|
|
10
|
+
export function formWindow(rows, selected, scroll, height) {
|
|
11
|
+
if (!rows.length)
|
|
12
|
+
return { start: 0, end: 0, lines: [] };
|
|
13
|
+
height = Math.max(1, height);
|
|
14
|
+
selected = Math.max(0, Math.min(selected, rows.length - 1));
|
|
15
|
+
let start = Math.min(Math.max(0, scroll), selected, Math.max(0, rows.length - (height - 1)));
|
|
16
|
+
for (;;) {
|
|
17
|
+
const lines = [];
|
|
18
|
+
let group, end = start;
|
|
19
|
+
for (let i = start; i < rows.length; i++) {
|
|
20
|
+
const row = rows[i], heading = height > 1 && row.group !== group;
|
|
21
|
+
if (lines.length + 1 + Number(heading) > height)
|
|
22
|
+
break;
|
|
23
|
+
if (heading)
|
|
24
|
+
lines.push({ group: row.group });
|
|
25
|
+
lines.push({ group: row.group, index: i });
|
|
26
|
+
group = row.group;
|
|
27
|
+
end = i + 1;
|
|
28
|
+
}
|
|
29
|
+
if (end > selected)
|
|
30
|
+
return { start, end, lines };
|
|
31
|
+
start++;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/layout.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,CAAC;AAW7C,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,MAAc;IACpD,MAAM,MAAM,GAAG,KA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AAM;YACV,IAAI,OAAO;gBACP,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;YACrC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;YAC3C,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAClB,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;QACD,IAAI,GAAG,GAAG,QAAQ;YACd,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;QACjC,KAAK,EAAE,CAAC;IACZ,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Operation, ResultFor } from '@fbincon/statusline-core/contracts/ui';
|
|
2
|
+
import { type Language } from '@fbincon/statusline-core/i18n/messages';
|
|
3
|
+
import type { Key } from '@fbincon/statusline-core/terminal/key';
|
|
4
|
+
import { type TerminalOptions } from '@fbincon/statusline-platform/terminal/session';
|
|
5
|
+
import { State } from './state.js';
|
|
6
|
+
export interface Backend {
|
|
7
|
+
request<O extends Operation>(operation: O, payload?: unknown): ResultFor<O> | Promise<ResultFor<O>>;
|
|
8
|
+
}
|
|
9
|
+
export interface Outcome {
|
|
10
|
+
outcome: 'updated' | 'already-current' | 'cancelled' | 'interrupted' | 'timed-out' | 'error';
|
|
11
|
+
exit_code: number;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const outcome: (kind: Outcome["outcome"], language: Language, exit_code?: number, detail?: string) => Outcome;
|
|
15
|
+
export declare function colorCapacity(env?: NodeJS.ProcessEnv): number;
|
|
16
|
+
export declare class Session {
|
|
17
|
+
readonly state: State;
|
|
18
|
+
readonly backend: Backend;
|
|
19
|
+
readonly guard: () => void;
|
|
20
|
+
private previewKey;
|
|
21
|
+
constructor(state: State, backend: Backend, guard?: () => void);
|
|
22
|
+
static open(backend: Backend, language?: Language, guard?: () => void): Promise<Session>;
|
|
23
|
+
preview(columns: number, rows: number): Promise<void>;
|
|
24
|
+
key(key: Key, columns?: number, rows?: number): Promise<'save' | Outcome | null>;
|
|
25
|
+
failure(error: unknown): void;
|
|
26
|
+
save(): Promise<Outcome>;
|
|
27
|
+
run(options?: TerminalOptions, colors?: number): Promise<Outcome>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createReview } from '@fbincon/statusline-core/editor/import-review';
|
|
2
|
+
import { text, t } from '@fbincon/statusline-core/i18n/messages';
|
|
3
|
+
import { terminal } from '@fbincon/statusline-platform/terminal/session';
|
|
4
|
+
import { BackendError } from '@fbincon/statusline-core/editor/backend';
|
|
5
|
+
import { EditorRevoked } from '@fbincon/statusline-platform/terminal/bridge';
|
|
6
|
+
import { State } from './state.js';
|
|
7
|
+
import { frame, ansiFrame } from './drawing.js';
|
|
8
|
+
import { dimensions } from './layout.js';
|
|
9
|
+
export const outcome = (kind, language, exit_code = 0, detail) => ({
|
|
10
|
+
outcome: kind, exit_code, message: detail ?? t({ updated: 'ui.session.status_line_configuration_updated', 'already-current': 'ui.session.status_line_configuration_already_current', cancelled: 'ui.session.status_line_configuration_unchanged', interrupted: 'ui.session.interactive_status_line_configuration_interrupted_no_changes', 'timed-out': 'ui.session.interactive_status_line_configuration_timed_out_no', error: 'ui.session.cannot_initialize_terminal_for_configure' }[kind], language),
|
|
11
|
+
});
|
|
12
|
+
export function colorCapacity(env = process.env) {
|
|
13
|
+
if (env.NO_COLOR !== undefined || env.TERM === 'dumb')
|
|
14
|
+
return 0;
|
|
15
|
+
if (/256color|direct/u.test(env.TERM ?? '') || /truecolor|24bit/u.test(env.COLORTERM ?? ''))
|
|
16
|
+
return 256;
|
|
17
|
+
return /^(?:vt100|vt220|linux)$/u.test(env.TERM ?? '') ? 8 : 16;
|
|
18
|
+
}
|
|
19
|
+
export class Session {
|
|
20
|
+
state;
|
|
21
|
+
backend;
|
|
22
|
+
guard;
|
|
23
|
+
previewKey = '';
|
|
24
|
+
constructor(state, backend, guard = () => { }) {
|
|
25
|
+
this.state = state;
|
|
26
|
+
this.backend = backend;
|
|
27
|
+
this.guard = guard;
|
|
28
|
+
}
|
|
29
|
+
static async open(backend, language, guard) {
|
|
30
|
+
const description = await backend.request('describe'), current = await backend.request('read'), preference = await backend.request('read_ui_preferences');
|
|
31
|
+
if (description.backend_version !== current.backend_version)
|
|
32
|
+
throw new BackendError('backend_version_mismatch', text('native.hooks.register.the_backend_changed_while_opening_reopen_the_editor'));
|
|
33
|
+
if (!current.installed)
|
|
34
|
+
throw new BackendError('not_installed', text('ui.session.status_line_is_not_installed_for_this'));
|
|
35
|
+
const state = new State(description, current, language ?? preference.ui_language);
|
|
36
|
+
if (preference.warning)
|
|
37
|
+
state.notice(preference.warning);
|
|
38
|
+
return new Session(state, backend, guard);
|
|
39
|
+
}
|
|
40
|
+
async preview(columns, rows) {
|
|
41
|
+
const e = this.state.editor, width = Math.max(2, dimensions(columns, rows).preview.innerWidth), draft = e.review?.result.draft ?? e.draft;
|
|
42
|
+
const key = JSON.stringify([draft, width]);
|
|
43
|
+
if (key === this.previewKey)
|
|
44
|
+
return;
|
|
45
|
+
this.state.preview = await this.backend.request('preview', { draft, width });
|
|
46
|
+
this.previewKey = key;
|
|
47
|
+
}
|
|
48
|
+
async key(key, columns = 80, rows = 24) {
|
|
49
|
+
const state = this.state, e = state.editor;
|
|
50
|
+
const effect = state.key(key, columns, rows);
|
|
51
|
+
if (effect === 'save')
|
|
52
|
+
return 'save';
|
|
53
|
+
if (effect === 'cancel' || effect === 'interrupt')
|
|
54
|
+
return outcome(effect === 'cancel' ? 'cancelled' : 'interrupted', state.language, effect === 'interrupt' ? 130 : 0);
|
|
55
|
+
try {
|
|
56
|
+
this.guard();
|
|
57
|
+
if (effect === 'language') {
|
|
58
|
+
const result = await this.backend.request('set_ui_language', { ui_language: state.pendingLanguage });
|
|
59
|
+
state.language = result.ui_language;
|
|
60
|
+
state.pendingLanguage = null;
|
|
61
|
+
state.notice('');
|
|
62
|
+
}
|
|
63
|
+
else if (effect === 'transfer') {
|
|
64
|
+
if (e.pendingTransfer === 'preset') {
|
|
65
|
+
e.replaceDraft((await this.backend.request('preset', { draft: e.draft, preset: e.preset })).draft);
|
|
66
|
+
state.notice(text('ui.session.preset_expanded_ctrl_s_saves_esc_discards'));
|
|
67
|
+
}
|
|
68
|
+
else if (e.pendingTransfer === 'import') {
|
|
69
|
+
e.review = createReview(await this.backend.request('review_import', { draft: e.draft, path: e.path }));
|
|
70
|
+
state.notice('');
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const result = await this.backend.request('export', { draft: e.draft, path: e.path, overwrite: false });
|
|
74
|
+
state.notice(text('ui.session.exported_current_draft_may_be_unsaved', { value0: result.path }));
|
|
75
|
+
}
|
|
76
|
+
e.pendingTransfer = null;
|
|
77
|
+
}
|
|
78
|
+
await this.preview(columns, rows);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
state.pendingLanguage = null;
|
|
82
|
+
e.pendingTransfer = null;
|
|
83
|
+
this.failure(error);
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
failure(error) { this.state.notice(error instanceof BackendError && error.localization ? error.localization : error instanceof Error ? error.message : String(error)); }
|
|
88
|
+
async save() {
|
|
89
|
+
const e = this.state.editor;
|
|
90
|
+
this.guard();
|
|
91
|
+
if (!e.acceptNumeric())
|
|
92
|
+
throw new BackendError('invalid_draft', Object.values(e.fieldErrors).join('; '));
|
|
93
|
+
const result = await this.backend.request('apply', { draft: e.draft, expected_revision: e.baseline.revision });
|
|
94
|
+
e.committed(result);
|
|
95
|
+
const value = outcome(result.changed ? 'updated' : 'already-current', this.state.language);
|
|
96
|
+
if (result.backup_dir)
|
|
97
|
+
value.message += t('ui.session.backup', this.state.language, { backup_dir: result.backup_dir });
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
async run(options = {}, colors = colorCapacity()) {
|
|
101
|
+
const output = options.output ?? process.stdout;
|
|
102
|
+
await this.preview(output.columns || 80, output.rows || 24);
|
|
103
|
+
let result;
|
|
104
|
+
try {
|
|
105
|
+
result = await terminal({
|
|
106
|
+
draw: (columns, rows) => ansiFrame(frame(this.state, columns, rows), colors),
|
|
107
|
+
key: (key, columns, rows) => this.key(key, columns, rows),
|
|
108
|
+
guard: this.guard,
|
|
109
|
+
interrupted: signal => outcome('interrupted', this.state.language, { SIGINT: 130, SIGTERM: 143, SIGHUP: 129, SIGBREAK: 131 }[signal] ?? 130),
|
|
110
|
+
timeout: () => outcome('timed-out', this.state.language),
|
|
111
|
+
}, options);
|
|
112
|
+
if (result !== 'save')
|
|
113
|
+
return result;
|
|
114
|
+
if (options.deadline !== undefined && (options.now ?? (() => performance.now()))() >= options.deadline)
|
|
115
|
+
return outcome('timed-out', this.state.language);
|
|
116
|
+
return await this.save();
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error instanceof EditorRevoked)
|
|
120
|
+
return outcome('interrupted', this.state.language, 130);
|
|
121
|
+
this.failure(error);
|
|
122
|
+
return outcome('error', this.state.language, 2, this.state.message);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=session.js.map
|