@fbincon/claude-code-statusline 0.0.0-stage → 3.0.0-beta.1
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 +90 -2
- package/bin/claude-statusline.js +2 -0
- package/candidate.json +1238 -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 +16 -0
- package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +213 -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/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,14 @@
|
|
|
1
|
+
/** Application identity. Internal workspaces are private implementation packages. */
|
|
2
|
+
export const VERSION = '3.0.0-beta.1';
|
|
3
|
+
export const PACKAGE_NAME = '@fbincon/claude-code-statusline';
|
|
4
|
+
export const REPOSITORY_URL = 'https://github.com/fbincon/claude-code-statusline';
|
|
5
|
+
export function isPrerelease(version) {
|
|
6
|
+
return /^\d+\.\d+\.\d+-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*$/u.test(version)
|
|
7
|
+
|| /(?:a|b|rc|dev)\d/u.test(version);
|
|
8
|
+
}
|
|
9
|
+
/** TS previews retain the stable editor experience approved for TS-06. */
|
|
10
|
+
export function editorsEnabledByDefault(version) {
|
|
11
|
+
return /^([3-9]|[1-9]\d+)\.\d+\.\d+(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$/u.test(version)
|
|
12
|
+
|| !isPrerelease(version);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/release.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,iCAAiC,CAAC;AAC9D,MAAM,CAAC,MAAM,cAAc,GAAG,mDAAmD,CAAC;AAElF,MAAM,UAAU,YAAY,CAAC,OAAe;IACxC,OAAO,oDAAoD,CAAC,IAAI,CAAC,OAAO,CAAC;WAClE,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACnD,OAAO,sEAAsE,CAAC,IAAI,CAAC,OAAO,CAAC;WACpF,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DisplayDraft, ItemOptionsDraft, Scope } from '../contracts/ui.js';
|
|
2
|
+
import * as styles from './styles.js';
|
|
3
|
+
export declare function color(value: string | null): styles.Color | null;
|
|
4
|
+
export declare function outputColor(value: styles.Color | null, config: DisplayDraft): styles.Color | null;
|
|
5
|
+
export declare function themeStyles(theme: string, ansi: boolean): Record<string, string>;
|
|
6
|
+
export declare function themedPalette<T extends Record<string, string>>(palette: T, config: DisplayDraft, subagent?: boolean): T;
|
|
7
|
+
export declare function itemRole(item: string, scope: Scope): string;
|
|
8
|
+
export declare function baseStyle(config: DisplayDraft, item: string, scope: Scope): styles.Style;
|
|
9
|
+
export declare function riskColor(used: number | null, config: DisplayDraft): styles.Color | null;
|
|
10
|
+
export declare function apply(text: string, config: DisplayDraft, item: string, options: ItemOptionsDraft, scope?: Scope, used?: number | null): string;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { BY_SCOPE } from '../config/catalog.js';
|
|
2
|
+
import * as styles from './styles.js';
|
|
3
|
+
import { terminalColor } from './colors.js';
|
|
4
|
+
import * as layout from './layout.js';
|
|
5
|
+
const ROLES = ['model', 'directory', 'branch', 'percentage', 'tokens', 'timer'];
|
|
6
|
+
const DARK = ['#f6e2b7', '#abdfa7', '#c8a9ee', '#f2b590', '#e990a9', '#8ed3d3'], LIGHT = ['#664515', '#205727', '#633487', '#864511', '#93284a', '#126168'];
|
|
7
|
+
const BLOCK_DARK = ['#3c3548', '#234337', '#3d3155', '#543720', '#542b3c', '#1f4148'], BLOCK_LIGHT = ['#eee1c4', '#d6ecd4', '#e7dcf2', '#f5dfce', '#f4d8e1', '#d1ecec'];
|
|
8
|
+
const ANSI = [3, 2, 5, 3, 5, 6], BLOCK_ANSI = [4, 2, 5, 3, 1, 6];
|
|
9
|
+
export function color(value) { return value === null || value === 'default' ? null : value.startsWith('ansi:') ? ['ansi', Number(value.slice(5))] : ['rgb', value]; }
|
|
10
|
+
export function outputColor(value, config) { return value !== null && config.palette === 'ansi' ? ['ansi', terminalColor(value, 16)] : value; }
|
|
11
|
+
const themes = styles.memo(16, key => {
|
|
12
|
+
const [theme, ansi] = JSON.parse(key), values = theme === 'light' ? LIGHT : DARK;
|
|
13
|
+
const result = Object.fromEntries(ROLES.map((role, i) => [role, styles.serialize({ bold: true, foreground: ansi || theme === 'terminal' ? ['ansi', ANSI[i]] : ['rgb', values[i]], background: null })]));
|
|
14
|
+
result.size = result.percentage;
|
|
15
|
+
result.git_error = styles.serialize({ bold: true, foreground: ansi || theme === 'terminal' ? ['ansi', 1] : ['rgb', theme === 'light' ? '#a02020' : '#f28686'], background: null });
|
|
16
|
+
result.separator = styles.serialize({ bold: false, foreground: ansi || theme === 'terminal' ? ['ansi', 8] : ['rgb', theme === 'light' ? '#58616b' : '#aab2bd'], background: null });
|
|
17
|
+
return result;
|
|
18
|
+
});
|
|
19
|
+
export function themeStyles(theme, ansi) { return themes(JSON.stringify([theme, ansi])); }
|
|
20
|
+
export function themedPalette(palette, config, subagent = false) {
|
|
21
|
+
if (!config.use_colors || config.theme === 'classic')
|
|
22
|
+
return palette;
|
|
23
|
+
const roles = themeStyles(config.theme, config.palette === 'ansi');
|
|
24
|
+
if (!subagent)
|
|
25
|
+
return { ...palette, ...roles };
|
|
26
|
+
const mapping = { status: 'timer', name: 'model', model: 'model', context: 'percentage', elapsed: 'timer', task: 'directory', tokens: 'tokens', directory: 'directory', separator: 'separator' };
|
|
27
|
+
return { ...palette, ...Object.fromEntries(Object.entries(mapping).map(([key, role]) => [key, roles[role]])) };
|
|
28
|
+
}
|
|
29
|
+
export function itemRole(item, scope) {
|
|
30
|
+
const group = BY_SCOPE[scope].get(item)?.group ?? 'task';
|
|
31
|
+
const roles = { model: 'model', location: 'directory', repo: 'branch', context: 'percentage', limits: 'percentage', usage: 'tokens', cache: 'tokens', requests: 'tokens' };
|
|
32
|
+
return roles[group] ?? 'timer';
|
|
33
|
+
}
|
|
34
|
+
export function baseStyle(config, item, scope) {
|
|
35
|
+
const role = itemRole(item, scope), index = ROLES.indexOf(role);
|
|
36
|
+
if (config.separator_style === 'powerline') {
|
|
37
|
+
let foreground, background;
|
|
38
|
+
if (config.palette === 'ansi' || config.theme === 'terminal') {
|
|
39
|
+
background = ['ansi', BLOCK_ANSI[index]];
|
|
40
|
+
foreground = ['ansi', [3, 6].includes(BLOCK_ANSI[index]) ? 0 : 15];
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const light = config.theme === 'light';
|
|
44
|
+
background = ['rgb', (light ? BLOCK_LIGHT : BLOCK_DARK)[index]];
|
|
45
|
+
foreground = ['rgb', light ? '#202630' : '#f4f5f7'];
|
|
46
|
+
}
|
|
47
|
+
return { bold: true, foreground, background };
|
|
48
|
+
}
|
|
49
|
+
return styles.parse(themeStyles(config.theme, config.palette === 'ansi')[role]);
|
|
50
|
+
}
|
|
51
|
+
export function riskColor(used, config) {
|
|
52
|
+
const limits = config.formatting.thresholds;
|
|
53
|
+
if (!limits.enabled || used === null || used < limits.warning)
|
|
54
|
+
return null;
|
|
55
|
+
const critical = used >= limits.critical;
|
|
56
|
+
if (config.palette === 'ansi' || config.theme === 'terminal')
|
|
57
|
+
return ['ansi', critical ? 1 : 3];
|
|
58
|
+
return ['rgb', config.theme === 'light' ? critical ? '#a02020' : '#805000' : critical ? '#f28686' : '#f2b550'];
|
|
59
|
+
}
|
|
60
|
+
export function apply(text, config, item, options, scope = 'main', used = null) {
|
|
61
|
+
if (!config.use_colors)
|
|
62
|
+
return layout.strip(text);
|
|
63
|
+
const block = config.separator_style === 'powerline', risk = riskColor(used, config);
|
|
64
|
+
if (config.theme === 'classic' && !block && options.foreground === null && options.background === null && risk === null)
|
|
65
|
+
return text;
|
|
66
|
+
const base = baseStyle(config, item, scope), foreground = outputColor(color(options.foreground), config), background = outputColor(color(options.background), config);
|
|
67
|
+
return layout.renderStyledUnits(layout.styledUnits(text).map(unit => {
|
|
68
|
+
const state = styles.parse(unit.style), fg = options.foreground !== null ? foreground : block ? base.foreground : state.foreground ?? base.foreground;
|
|
69
|
+
const bg = options.background !== null ? background : block ? base.background : state.background;
|
|
70
|
+
return { ...unit, style: styles.serialize({ bold: state.bold || block || risk !== null, foreground: risk ?? fg, background: bg }) };
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=appearance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearance.js","sourceRoot":"","sources":["../../../src/rendering/appearance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChF,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC5J,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SA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,EAAE,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC;IACtK,OAAO,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAChE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC;QACtJ,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QACjG,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IACxI,CAAC,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { int, numeric } from '../runtime/values.js';
|
|
2
|
+
// Python numeric constructors accept Unicode decimal digits and surrounding
|
|
3
|
+
// Unicode whitespace, but not JavaScript hexadecimal/empty-string coercion.
|
|
4
|
+
function normalized(value) {
|
|
5
|
+
return value.replace(/^[\p{White_Space}]+|[\p{White_Space}]+$/gu, '').replace(/\p{Decimal_Number}/gu, char => {
|
|
6
|
+
const code = char.codePointAt(0);
|
|
7
|
+
if (code < 128 || code >= 0x11de0 && code <= 0x11de9)
|
|
8
|
+
return char;
|
|
9
|
+
let start = code;
|
|
10
|
+
while (/\p{Decimal_Number}/u.test(String.fromCodePoint(start - 1)))
|
|
11
|
+
start--;
|
|
12
|
+
return String((code - start) % 10);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function coercedFloat(value) {
|
|
16
|
+
if (typeof value === 'boolean')
|
|
17
|
+
return Number(value);
|
|
18
|
+
if (typeof value !== 'string') {
|
|
19
|
+
const n = numeric(value);
|
|
20
|
+
return n !== null && !Number.isFinite(n) && int(value) !== null ? null : n;
|
|
21
|
+
}
|
|
22
|
+
const text = normalized(value), digits = '[0-9](?:_?[0-9])*';
|
|
23
|
+
if (new RegExp('^[+-]?(?:' + digits + '(?:\\.(?:' + digits + ')?)?|\\.' + digits + ')(?:[eE][+-]?' + digits + ')?$', 'u').test(text))
|
|
24
|
+
return Number(text.replaceAll('_', ''));
|
|
25
|
+
if (/^[+-]?(?:inf(?:inity)?|nan)$/iu.test(text))
|
|
26
|
+
return /nan/iu.test(text) ? NaN : text.startsWith('-') ? -Infinity : Infinity;
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
export function coercedInteger(value) {
|
|
30
|
+
const whole = int(value, false);
|
|
31
|
+
if (whole !== null)
|
|
32
|
+
return whole;
|
|
33
|
+
if (typeof value === 'string') {
|
|
34
|
+
const text = normalized(value);
|
|
35
|
+
if (!/^[+-]?[0-9](?:_?[0-9])*$/u.test(text))
|
|
36
|
+
return null;
|
|
37
|
+
const digits = text.replaceAll('_', '');
|
|
38
|
+
if (digits.replace(/^[+-]/u, '').length > 4300)
|
|
39
|
+
return null;
|
|
40
|
+
try {
|
|
41
|
+
return BigInt(digits);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const n = numeric(value);
|
|
48
|
+
return n !== null && Number.isFinite(n) ? BigInt(Math.trunc(n)) : null;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=coercion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercion.js","sourceRoot":"","sources":["../../../src/rendering/coercion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,4EAA4E;AAC5E,4EAA4E;AAC5E,SAAS,UAAU,CAAC,KAAa;IAC7B,OAAO,KAAK,CAAC,OAAO,CAAC,2CAA2C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE;QACzG,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;QAClC,IAAI,IAAI,GAAG,GAAG,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO;YAChD,OAAO,IAAI,CAAC;QAChB,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC9D,KAAK,EAAE,CAAC;QACZ,OAAO,MAAM,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,SAAS;QAC1B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,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OAAO,IAAI,CAAC;QAChB,IAAI,CAAC;YACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,CAAC;YACH,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { memo } from './styles.js';
|
|
2
|
+
const BASE = [[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128], [128, 0, 128], [0, 128, 128], [192, 192, 192], [128, 128, 128], [255, 0, 0], [0, 255, 0], [255, 255, 0], [0, 0, 255], [255, 0, 255], [0, 255, 255], [255, 255, 255]];
|
|
3
|
+
const LEVELS = [0, 95, 135, 175, 215, 255];
|
|
4
|
+
const RGB = [...BASE, ...LEVELS.flatMap(r => LEVELS.flatMap(g => LEVELS.map(b => [r, g, b]))), ...Array.from({ length: 24 }, (_, i) => Array(3).fill(8 + 10 * i))];
|
|
5
|
+
const nearest = memo(2048, key => {
|
|
6
|
+
const [red, green, blue, colors] = JSON.parse(key);
|
|
7
|
+
if (colors < 8)
|
|
8
|
+
return null;
|
|
9
|
+
const limit = colors >= 256 ? 256 : colors >= 16 ? 16 : 8;
|
|
10
|
+
let best = 0, distance = Infinity;
|
|
11
|
+
for (let i = 0; i < limit; i++) {
|
|
12
|
+
const [r, g, b] = RGB[i], d = (r - red) ** 2 + (g - green) ** 2 + (b - blue) ** 2;
|
|
13
|
+
if (d < distance) {
|
|
14
|
+
best = i;
|
|
15
|
+
distance = d;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return best;
|
|
19
|
+
});
|
|
20
|
+
export function nearestTerminalColor(red, green, blue, colors) { return nearest(JSON.stringify([red, green, blue, colors])); }
|
|
21
|
+
export function terminalColor(color, colors) {
|
|
22
|
+
if (color === null || colors < 8)
|
|
23
|
+
return null;
|
|
24
|
+
let rgb;
|
|
25
|
+
if (color[0] === 'ansi') {
|
|
26
|
+
if (color[1] < Math.min(colors, 256))
|
|
27
|
+
return color[1];
|
|
28
|
+
if (color[1] < 16 && colors === 8)
|
|
29
|
+
return color[1] % 8;
|
|
30
|
+
rgb = RGB[color[1]];
|
|
31
|
+
}
|
|
32
|
+
else
|
|
33
|
+
rgb = [1, 3, 5].map(i => parseInt(color[1].slice(i, i + 2), 16));
|
|
34
|
+
return nearestTerminalColor(rgb[0], rgb[1], rgb[2], colors);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/rendering/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAC/C,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,C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C,GAAG,CAAC,CAAC;QACxB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC;IACzB,CAAC;;QAEG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACrE,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAE,EAAE,GAAG,CAAC,CAAC,CAAE,EAAE,GAAG,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DisplayDraft, InstanceDraft, Scope } from '../contracts/ui.js';
|
|
2
|
+
export interface Cell<T = unknown> {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
priority: number;
|
|
6
|
+
spacer?: boolean;
|
|
7
|
+
payload?: T;
|
|
8
|
+
}
|
|
9
|
+
export declare function literal(node: InstanceDraft, config: DisplayDraft, scope?: Scope): string;
|
|
10
|
+
export declare function fitRow<T>(cells: readonly Cell<T>[], columns: number, config: DisplayDraft, join: (side: Cell<T>[]) => string, measure?: (text: string) => number): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as layout from './layout.js';
|
|
2
|
+
import * as appearance from './appearance.js';
|
|
3
|
+
import * as styles from './styles.js';
|
|
4
|
+
import * as powerline from './powerline.js';
|
|
5
|
+
export function literal(node, config, scope = 'main') {
|
|
6
|
+
let text = node.text || '';
|
|
7
|
+
if (!text)
|
|
8
|
+
return '';
|
|
9
|
+
const options = node.options;
|
|
10
|
+
if (options.icon)
|
|
11
|
+
text = options.icon + ' ' + text;
|
|
12
|
+
if (options.label)
|
|
13
|
+
text = options.label + ' ' + text;
|
|
14
|
+
if (config.use_colors)
|
|
15
|
+
text = appearance.apply(text, config, 'text', options, scope);
|
|
16
|
+
if (options.max_width !== null)
|
|
17
|
+
text = layout.truncateStyled(text, options.max_width);
|
|
18
|
+
return text;
|
|
19
|
+
}
|
|
20
|
+
export function fitRow(cells, columns, config, join, measure = layout.displayWidth) {
|
|
21
|
+
if (columns < 1)
|
|
22
|
+
return '';
|
|
23
|
+
const divider = cells.findIndex(cell => cell.spacer), left = (divider < 0 ? cells : cells.slice(0, divider)).filter(cell => cell.text), right = divider < 0 ? [] : cells.slice(divider + 1).filter(cell => cell.text);
|
|
24
|
+
if (!left.length && !right.length)
|
|
25
|
+
return '';
|
|
26
|
+
const isPowerline = config.separator_style === 'powerline';
|
|
27
|
+
let padding = 1, cap = true;
|
|
28
|
+
const text = (side) => isPowerline ? powerline.row(side, config, padding, cap) : join(side), occupied = () => measure(text(left)) + measure(text(right));
|
|
29
|
+
if (isPowerline && occupied() > columns)
|
|
30
|
+
padding = 0;
|
|
31
|
+
if (isPowerline && occupied() > columns)
|
|
32
|
+
cap = false;
|
|
33
|
+
while (left.length + right.length > 1 && occupied() > columns) {
|
|
34
|
+
const ordered = [...left.map((cell, index) => ({ side: left, index, cell })), ...right.map((cell, index) => ({ side: right, index, cell }))];
|
|
35
|
+
let victim = 0;
|
|
36
|
+
for (let i = 1; i < ordered.length; i++)
|
|
37
|
+
if (ordered[i].cell.priority <= ordered[victim].cell.priority)
|
|
38
|
+
victim = i;
|
|
39
|
+
const row = ordered[victim];
|
|
40
|
+
row.side.splice(row.index, 1);
|
|
41
|
+
}
|
|
42
|
+
if (occupied() > columns) {
|
|
43
|
+
const side = left.length ? left : right;
|
|
44
|
+
side[0] = { ...side[0], text: layout.truncateStyled(side[0].text, columns) };
|
|
45
|
+
}
|
|
46
|
+
const a = text(left), b = text(right), gap = divider < 0 ? 0 : Math.max(0, columns - measure(a) - measure(b)), reset = config.use_colors ? styles.RESET : '';
|
|
47
|
+
return layout.ensureReset(a + (gap ? reset + ' '.repeat(gap) : '') + b, reset);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/rendering/components.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAQ5C,MAAM,UAAU,OAAO,CAAC,IAAmB,EAAE,MAAoB,EAAE,QAAe,MAAM;IACpF,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,IAAI;QACL,OAAO,EAAE,CAAC;IACd,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,IAAI,OAAO,CAAC,IAAI;QACZ,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;IACrC,IAAI,OAAO,CAAC,KAAK;QACb,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC;IACtC,IAAI,MAAM,CAAC,UAAU;QACjB,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAClE,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI;QAC1B,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AAChB,CAAC;AACD,MAAM,UAAU,MAAM,CAAI,KAAyB,EAAE,OAAe,EAAE,MAAoB,EAAE,IAAiC,EAAE,UAAoC,MAAM,CAAC,YAAY;IAClL,IAAI,OAAO,GAAG,CAAC;QACX,OAAO,EAAE,CAAC;IACd,MAAM,O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I,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7J,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Data } from '../runtime/values.js';
|
|
2
|
+
import type { Sample } from '../timing/sample.js';
|
|
3
|
+
import type { SessionTokenCounts } from '../runtime/usage.js';
|
|
4
|
+
import type { DirectoryStyle } from '../contracts/ui.js';
|
|
5
|
+
import type { Presentation } from './language.js';
|
|
6
|
+
import type { DateFormatter } from './preferences.js';
|
|
7
|
+
export interface UsageObservation {
|
|
8
|
+
hit: string;
|
|
9
|
+
miss: string;
|
|
10
|
+
out: string;
|
|
11
|
+
last_prompt: unknown;
|
|
12
|
+
entry: Data;
|
|
13
|
+
counts: SessionTokenCounts | null;
|
|
14
|
+
}
|
|
15
|
+
export interface TaskObservation {
|
|
16
|
+
state: Data | null;
|
|
17
|
+
sample: Sample;
|
|
18
|
+
}
|
|
19
|
+
/** The renderer calls only selected sources; providers own all platform effects. */
|
|
20
|
+
export interface RenderEnvironment {
|
|
21
|
+
language: Presentation;
|
|
22
|
+
compactStaged: boolean;
|
|
23
|
+
now(): number;
|
|
24
|
+
directory(value: string, style: DirectoryStyle, project?: string | null): string;
|
|
25
|
+
basename(value: string): string;
|
|
26
|
+
formatDate: DateFormatter;
|
|
27
|
+
hostname(): string | null;
|
|
28
|
+
git(cwd: string, session: unknown): Data;
|
|
29
|
+
branchDiff(cwd: string | null, base: string | null): Data;
|
|
30
|
+
usage(data: unknown): UsageObservation | null;
|
|
31
|
+
task(data: unknown, usage: UsageObservation): TaskObservation;
|
|
32
|
+
activePoint(data: unknown): Data;
|
|
33
|
+
hadSubagents(data: unknown): boolean;
|
|
34
|
+
live(data: unknown, nowMs: number): Data;
|
|
35
|
+
agentEndings(session: string): Data;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/rendering/context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { displayWidth } from './layout.js';
|
|
2
|
+
import { coercedInteger } from './coercion.js';
|
|
3
|
+
export { coercedInteger };
|
|
4
|
+
export { formatDuration } from './timer.js';
|
|
5
|
+
export { displayWidth };
|
|
6
|
+
export declare function deepGet(value: unknown, path: readonly string[]): unknown;
|
|
7
|
+
export declare function sanitizePayloadText(value: unknown): string | null;
|
|
8
|
+
export declare function humanizeTokens(value: unknown): string | null;
|
|
9
|
+
export declare function humanizeApiTokens(value: unknown): string;
|
|
10
|
+
export declare function truncateText(text: string, width: number, ellipsis?: string): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { own, object } from '../runtime/values.js';
|
|
2
|
+
import { divideIntegers, fixed } from '../numbers.js';
|
|
3
|
+
import { clip } from '../unicode/index.js';
|
|
4
|
+
import { truncateStyled, displayWidth } from './layout.js';
|
|
5
|
+
import { coercedInteger } from './coercion.js';
|
|
6
|
+
export { coercedInteger };
|
|
7
|
+
export { formatDuration } from './timer.js';
|
|
8
|
+
export { displayWidth };
|
|
9
|
+
export function deepGet(value, path) {
|
|
10
|
+
for (const key of path) {
|
|
11
|
+
if (!object(value))
|
|
12
|
+
return null;
|
|
13
|
+
value = own(value, key);
|
|
14
|
+
}
|
|
15
|
+
return value ?? null;
|
|
16
|
+
}
|
|
17
|
+
export function sanitizePayloadText(value) {
|
|
18
|
+
if (typeof value !== 'string')
|
|
19
|
+
return null;
|
|
20
|
+
let text = '';
|
|
21
|
+
for (const char of value) {
|
|
22
|
+
const code = char.codePointAt(0);
|
|
23
|
+
text += /[\p{Cc}\p{Cs}]/u.test(char) || /\p{Cf}/u.test(char) && code !== 0x200d && !(code >= 0xe0020 && code <= 0xe007f) ? ' ' : char;
|
|
24
|
+
}
|
|
25
|
+
return text.split(/[\p{White_Space}\x1c-\x1f]+/u).filter(Boolean).join(' ') || null;
|
|
26
|
+
}
|
|
27
|
+
export function humanizeTokens(value) {
|
|
28
|
+
const parsed = coercedInteger(value);
|
|
29
|
+
if (typeof value === 'boolean' || parsed === null || parsed < 0n)
|
|
30
|
+
return null;
|
|
31
|
+
try {
|
|
32
|
+
if (parsed >= 1000000n)
|
|
33
|
+
return fixed(divideIntegers(parsed, 1000000n), 2).replace(/0+$/u, '').replace(/\.$/u, '') + 'M';
|
|
34
|
+
if (parsed >= 1000n)
|
|
35
|
+
return fixed(divideIntegers(parsed, 1000n), 1).replace(/0+$/u, '').replace(/\.$/u, '') + 'K';
|
|
36
|
+
return String(parsed);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function humanizeApiTokens(value) {
|
|
43
|
+
const parsed = coercedInteger(value);
|
|
44
|
+
if (parsed === null)
|
|
45
|
+
return '0';
|
|
46
|
+
try {
|
|
47
|
+
if (parsed >= 1000000n)
|
|
48
|
+
return fixed(divideIntegers(parsed, 1000000n), 2).replace(/0+$/u, '').replace(/\.$/u, '') + 'M';
|
|
49
|
+
if (parsed >= 1000n)
|
|
50
|
+
return fixed(divideIntegers(parsed, 1000n), 1) + 'K';
|
|
51
|
+
return String(parsed < 0n ? 0n : parsed);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return '0';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export function truncateText(text, width, ellipsis = '…') { return text.includes('\x1b[') ? truncateStyled(text, width, ellipsis) : clip(text, Math.trunc(width), ellipsis); }
|
|
58
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/rendering/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAA2B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,IAAuB;IAAa,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACjG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACd,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,IAAI,IAAI,CAAC;AAAC,CAAC;AACzB,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,IAAI,CAAC;IAChB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;QAClC,IAAI,IA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rC,IAAI,MAAM,KAAK,IAAI;QACf,OAAO,GAAG,CAAC;IACf,IAAI,CAAC;QACD,IAAI,MAAM,IAAI,QAAQ;YAClB,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;QACpG,IAAI,MAAM,IAAI,KAAK;YACf,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;QACzD,OAAO,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,CAAC;QACH,OAAO,GAAG,CAAC;IACf,CAAC;AACL,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,KAAa,EAAE,QAAQ,GAAG,GAAG,IAAY,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Data } from '../runtime/values.js';
|
|
2
|
+
import type { Presentation } from './language.js';
|
|
3
|
+
import type { Palette } from './palette.js';
|
|
4
|
+
export declare function changeMarkers(result: Data, compactStaged?: boolean): string[];
|
|
5
|
+
export declare function divergenceMarkers(result: Data, language: Presentation, showZero?: boolean): string[];
|
|
6
|
+
export declare function component(result: unknown, item: string, language: Presentation, compactStaged?: boolean): string | null;
|
|
7
|
+
export declare function segment(result: Data, palette: Palette, language: Presentation, compactStaged?: boolean): string | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { object, truth, string } from '../runtime/values.js';
|
|
2
|
+
import { sanitizePayloadText } from './formatters.js';
|
|
3
|
+
export function changeMarkers(result, compactStaged = false) {
|
|
4
|
+
return [['staged', compactStaged ? '●' : '● '], ['unstaged', '~'], ['conflicts', '!'], ['untracked', '?']].filter(([key]) => truth(result[key])).map(([key, symbol]) => symbol + string(result[key]));
|
|
5
|
+
}
|
|
6
|
+
export function divergenceMarkers(result, language, showZero = false) {
|
|
7
|
+
return truth(result.upstream_gone) ? [language.text('git.gone')] : [['ahead', '↑'], ['behind', '↓']].filter(([key]) => truth(result[key]) || showZero).map(([key, symbol]) => symbol + string(result[key]));
|
|
8
|
+
}
|
|
9
|
+
export function component(result, item, language, compactStaged = false) {
|
|
10
|
+
if (!object(result) || result.kind === 'not_repo')
|
|
11
|
+
return null;
|
|
12
|
+
if (result.kind === 'error')
|
|
13
|
+
return 'Git!';
|
|
14
|
+
if (result.kind !== 'ok')
|
|
15
|
+
return null;
|
|
16
|
+
if (item === 'git-branch') {
|
|
17
|
+
const branch = sanitizePayloadText(result.branch);
|
|
18
|
+
return branch ? 'Git ' + branch : null;
|
|
19
|
+
}
|
|
20
|
+
if (item === 'git-changes') {
|
|
21
|
+
const markers = changeMarkers(result, compactStaged);
|
|
22
|
+
return 'Git ' + (markers.length ? markers.join(' ') : language.text('git.clean'));
|
|
23
|
+
}
|
|
24
|
+
return truth(result.upstream) ? 'Git ' + divergenceMarkers(result, language, true).join(' ') : null;
|
|
25
|
+
}
|
|
26
|
+
export function segment(result, palette, language, compactStaged = false) {
|
|
27
|
+
if (result.kind === 'error')
|
|
28
|
+
return palette.git_error + 'Git!' + palette.reset;
|
|
29
|
+
if (result.kind !== 'ok')
|
|
30
|
+
return null;
|
|
31
|
+
const statuses = [...divergenceMarkers(result, language), ...changeMarkers(result, compactStaged)];
|
|
32
|
+
return palette.branch + 'Git ' + string(result.branch) + (statuses.length ? ' ' + statuses.join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B,EAAE,aAAa,GAAG,KAAK;IACjG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;QACvB,OAAO,OAAO,CAAC,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IACtD,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QACpB,OAAO,IAAI,CAAC;IAChB,MAAM,QAAQ,GAAG,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACnG,OAAO,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;AAC9H,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DisplayDraft, FormattingDraft, InstanceDraft } from '../contracts/ui.js';
|
|
2
|
+
import { type Data } from '../runtime/values.js';
|
|
3
|
+
import type { RenderEnvironment, UsageObservation } from './context.js';
|
|
4
|
+
import type { Palette } from './palette.js';
|
|
5
|
+
import * as layout from './layout.js';
|
|
6
|
+
export interface RenderedItem {
|
|
7
|
+
text: string;
|
|
8
|
+
group?: string | null;
|
|
9
|
+
prefer_slash_breaks?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function liveDirectory(data: unknown): string | null;
|
|
12
|
+
export declare function enabledIds(config: DisplayDraft): string[];
|
|
13
|
+
export declare class RenderState {
|
|
14
|
+
readonly config: DisplayDraft;
|
|
15
|
+
readonly palette: Palette;
|
|
16
|
+
readonly inner: string;
|
|
17
|
+
readonly env: RenderEnvironment;
|
|
18
|
+
readonly data: Data;
|
|
19
|
+
readonly liveDir: string | null;
|
|
20
|
+
readonly instances: Map<string, InstanceDraft>;
|
|
21
|
+
fmt: FormattingDraft;
|
|
22
|
+
private gitValue;
|
|
23
|
+
private usageValue;
|
|
24
|
+
private liveValue;
|
|
25
|
+
private timeValue;
|
|
26
|
+
private branchValue;
|
|
27
|
+
private activeValue;
|
|
28
|
+
private taskValue;
|
|
29
|
+
constructor(data: unknown, config: DisplayDraft, palette: Palette, inner: string, env: RenderEnvironment);
|
|
30
|
+
text(key: string, params?: Data): string;
|
|
31
|
+
now(): number;
|
|
32
|
+
styled(text: string | null | undefined, style: string, group?: string | null): RenderedItem | null;
|
|
33
|
+
liveData(): Data;
|
|
34
|
+
branchData(): Data;
|
|
35
|
+
totals(): UsageObservation | null;
|
|
36
|
+
rawTotals(): import("../runtime/usage.ts").SessionTokenCounts | null;
|
|
37
|
+
hadSubagents(): boolean;
|
|
38
|
+
gitData(): Data | null;
|
|
39
|
+
git(): RenderedItem | null;
|
|
40
|
+
hostname(): RenderedItem | null;
|
|
41
|
+
promptTimer(): RenderedItem | null;
|
|
42
|
+
activeTimer(): RenderedItem | null;
|
|
43
|
+
private rateLimit;
|
|
44
|
+
private renderType;
|
|
45
|
+
render(id: string): RenderedItem | null;
|
|
46
|
+
}
|
|
47
|
+
export type StateFactory = (data: unknown, config: DisplayDraft, palette: Palette, inner: string, env: RenderEnvironment) => RenderState;
|
|
48
|
+
export declare function coalesce(items: readonly RenderedItem[], inner: string): layout.LayoutSegment[];
|
|
49
|
+
export declare function configuredRows(data: unknown, config: DisplayDraft, width: number, env: RenderEnvironment, factory?: StateFactory): string[];
|