@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["config","compareLosslessNumber","isLosslessNumber","LosslessNumber","toLosslessNumber","parseLosslessNumber","parseNumberAndBigInt","parse","reviveDate","stringify","compareNumber","getUnsafeNumberReason","isInteger","isNumber","isSafeNumber","splitNumber","toSafeNumberOrThrow","UnsafeNumberReason"],"sources":["../../src/index.ts"],"sourcesContent":["export { config } from './config.js'\nexport {\n compareLosslessNumber,\n isLosslessNumber,\n LosslessNumber,\n toLosslessNumber\n} from './LosslessNumber.js'\nexport { parseLosslessNumber, parseNumberAndBigInt } from './numberParsers.js'\nexport { parse } from './parse.js'\nexport { reviveDate } from './reviveDate.js'\nexport { stringify } from './stringify.js'\nexport * from './types.js'\nexport {\n compareNumber,\n getUnsafeNumberReason,\n isInteger,\n isNumber,\n isSafeNumber,\n splitNumber,\n toSafeNumberOrThrow,\n UnsafeNumberReason\n} from './utils.js'\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,aAAa;AACpC,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,cAAc,EACdC,gBAAgB,QACX,qBAAqB;AAC5B,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,oBAAoB;AAC9E,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,cAAc,YAAY;AAC1B,SACEC,aAAa,EACbC,qBAAqB,EACrBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,WAAW,EACXC,mBAAmB,EACnBC,kBAAkB,QACb,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LosslessNumber } from './LosslessNumber.js';
|
|
2
|
+
import { isInteger } from './utils.js';
|
|
3
|
+
export function parseLosslessNumber(value) {
|
|
4
|
+
return new LosslessNumber(value);
|
|
5
|
+
}
|
|
6
|
+
export function parseNumberAndBigInt(value) {
|
|
7
|
+
return isInteger(value) ? BigInt(value) : Number.parseFloat(value);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=numberParsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberParsers.js","names":["LosslessNumber","isInteger","parseLosslessNumber","value","parseNumberAndBigInt","BigInt","Number","parseFloat"],"sources":["../../src/numberParsers.ts"],"sourcesContent":["import { LosslessNumber } from './LosslessNumber.js'\nimport { isInteger } from './utils.js'\n\nexport function parseLosslessNumber(value: string): LosslessNumber {\n return new LosslessNumber(value)\n}\n\nexport function parseNumberAndBigInt(value: string): number | bigint {\n return isInteger(value) ? BigInt(value) : Number.parseFloat(value)\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,SAAS,QAAQ,YAAY;AAEtC,OAAO,SAASC,mBAAmBA,CAACC,KAAa,EAAkB;EACjE,OAAO,IAAIH,cAAc,CAACG,KAAK,CAAC;AAClC;AAEA,OAAO,SAASC,oBAAoBA,CAACD,KAAa,EAAmB;EACnE,OAAOF,SAAS,CAACE,KAAK,CAAC,GAAGE,MAAM,CAACF,KAAK,CAAC,GAAGG,MAAM,CAACC,UAAU,CAACJ,KAAK,CAAC;AACpE","ignoreList":[]}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { parseLosslessNumber } from './numberParsers.js';
|
|
2
|
+
import { revive } from './revive.js';
|
|
3
|
+
/**
|
|
4
|
+
* The LosslessJSON.parse() method parses a string as JSON, optionally transforming
|
|
5
|
+
* the value produced by parsing.
|
|
6
|
+
*
|
|
7
|
+
* The parser is based on the parser of Tan Li Hou shared in
|
|
8
|
+
* https://lihautan.com/json-parser-with-javascript/
|
|
9
|
+
*
|
|
10
|
+
* @param text
|
|
11
|
+
* The string to parse as JSON. See the JSON object for a description of JSON syntax.
|
|
12
|
+
*
|
|
13
|
+
* @param [reviver]
|
|
14
|
+
* If a function, prescribes how the value originally produced by parsing is
|
|
15
|
+
* transformed, before being returned.
|
|
16
|
+
*
|
|
17
|
+
* @param [options=ParseOptions | NumberParserArgument]
|
|
18
|
+
* Pass a custom number parser. Input is a string, and the output can be unknown
|
|
19
|
+
* numeric value: number, bigint, LosslessNumber, or a custom BigNumber library.
|
|
20
|
+
*
|
|
21
|
+
* @returns Returns the Object corresponding to the given JSON text.
|
|
22
|
+
*
|
|
23
|
+
* @throws Throws a SyntaxError exception if the string to parse is not valid JSON.
|
|
24
|
+
*/
|
|
25
|
+
export function parse(text, reviver, options) {
|
|
26
|
+
const optionsObj = typeof options === 'function' ? {
|
|
27
|
+
parseNumber: options
|
|
28
|
+
} : options;
|
|
29
|
+
const parseNumber = optionsObj?.parseNumber ?? parseLosslessNumber;
|
|
30
|
+
const onDuplicateKey = optionsObj?.onDuplicateKey ?? throwDuplicateKey;
|
|
31
|
+
let i = 0;
|
|
32
|
+
const value = parseValue();
|
|
33
|
+
expectValue(value);
|
|
34
|
+
expectEndOfInput();
|
|
35
|
+
return reviver ? revive(value, reviver) : value;
|
|
36
|
+
function parseObject() {
|
|
37
|
+
if (text.charCodeAt(i) === codeOpeningBrace) {
|
|
38
|
+
i++;
|
|
39
|
+
skipWhitespace();
|
|
40
|
+
const object = {};
|
|
41
|
+
let initial = true;
|
|
42
|
+
while (i < text.length && text.charCodeAt(i) !== codeClosingBrace) {
|
|
43
|
+
if (!initial) {
|
|
44
|
+
eatComma();
|
|
45
|
+
skipWhitespace();
|
|
46
|
+
} else {
|
|
47
|
+
initial = false;
|
|
48
|
+
}
|
|
49
|
+
const start = i;
|
|
50
|
+
const key = parseString();
|
|
51
|
+
if (key === undefined) {
|
|
52
|
+
throwObjectKeyExpected();
|
|
53
|
+
return; // To make TS happy
|
|
54
|
+
}
|
|
55
|
+
skipWhitespace();
|
|
56
|
+
eatColon();
|
|
57
|
+
const value = parseValue();
|
|
58
|
+
if (value === undefined) {
|
|
59
|
+
throwObjectValueExpected();
|
|
60
|
+
return; // To make TS happy
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// handle duplicate keys
|
|
64
|
+
// biome-ignore lint/suspicious/noPrototypeBuiltins: TODO: replace with hasOwn one day, when browser support is high enough
|
|
65
|
+
if (Object.prototype.hasOwnProperty.call(object, key) && !isDeepEqual(value, object[key])) {
|
|
66
|
+
// Note that we could also test `if(key in object) {...}`
|
|
67
|
+
// or `if (object[key] !== 'undefined') {...}`, but that is slower.
|
|
68
|
+
const returnedValue = onDuplicateKey({
|
|
69
|
+
key,
|
|
70
|
+
position: start + 1,
|
|
71
|
+
oldValue: object[key],
|
|
72
|
+
newValue: value
|
|
73
|
+
});
|
|
74
|
+
if (returnedValue !== undefined) {
|
|
75
|
+
object[key] = returnedValue;
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
object[key] = value;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (text.charCodeAt(i) !== codeClosingBrace) {
|
|
82
|
+
throwObjectKeyOrEndExpected();
|
|
83
|
+
}
|
|
84
|
+
i++;
|
|
85
|
+
return object;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function parseArray() {
|
|
89
|
+
if (text.charCodeAt(i) === codeOpeningBracket) {
|
|
90
|
+
i++;
|
|
91
|
+
skipWhitespace();
|
|
92
|
+
const array = [];
|
|
93
|
+
let initial = true;
|
|
94
|
+
while (i < text.length && text.charCodeAt(i) !== codeClosingBracket) {
|
|
95
|
+
if (!initial) {
|
|
96
|
+
eatComma();
|
|
97
|
+
} else {
|
|
98
|
+
initial = false;
|
|
99
|
+
}
|
|
100
|
+
const value = parseValue();
|
|
101
|
+
expectArrayItem(value);
|
|
102
|
+
array.push(value);
|
|
103
|
+
}
|
|
104
|
+
if (text.charCodeAt(i) !== codeClosingBracket) {
|
|
105
|
+
throwArrayItemOrEndExpected();
|
|
106
|
+
}
|
|
107
|
+
i++;
|
|
108
|
+
return array;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function parseValue() {
|
|
112
|
+
skipWhitespace();
|
|
113
|
+
const value = parseString() ?? parseNumeric() ?? parseObject() ?? parseArray() ?? parseKeyword('true', true) ?? parseKeyword('false', false) ?? parseKeyword('null', null);
|
|
114
|
+
skipWhitespace();
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
function parseKeyword(name, value) {
|
|
118
|
+
if (text.slice(i, i + name.length) === name) {
|
|
119
|
+
i += name.length;
|
|
120
|
+
return value;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function skipWhitespace() {
|
|
124
|
+
while (isWhitespace(text.charCodeAt(i))) {
|
|
125
|
+
i++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function parseString() {
|
|
129
|
+
if (text.charCodeAt(i) === codeDoubleQuote) {
|
|
130
|
+
i++;
|
|
131
|
+
let result = '';
|
|
132
|
+
while (i < text.length && text.charCodeAt(i) !== codeDoubleQuote) {
|
|
133
|
+
if (text.charCodeAt(i) === codeBackslash) {
|
|
134
|
+
const char = text[i + 1];
|
|
135
|
+
const escapeChar = escapeCharacters[char];
|
|
136
|
+
if (escapeChar !== undefined) {
|
|
137
|
+
result += escapeChar;
|
|
138
|
+
i++;
|
|
139
|
+
} else if (char === 'u') {
|
|
140
|
+
if (isHex(text.charCodeAt(i + 2)) && isHex(text.charCodeAt(i + 3)) && isHex(text.charCodeAt(i + 4)) && isHex(text.charCodeAt(i + 5))) {
|
|
141
|
+
result += String.fromCharCode(Number.parseInt(text.slice(i + 2, i + 6), 16));
|
|
142
|
+
i += 5;
|
|
143
|
+
} else {
|
|
144
|
+
throwInvalidUnicodeCharacter(i);
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
throwInvalidEscapeCharacter(i);
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
if (isValidStringCharacter(text.charCodeAt(i))) {
|
|
151
|
+
result += text[i];
|
|
152
|
+
} else {
|
|
153
|
+
throwInvalidCharacter(text[i]);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
i++;
|
|
157
|
+
}
|
|
158
|
+
expectEndOfString();
|
|
159
|
+
i++;
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function parseNumeric() {
|
|
164
|
+
const start = i;
|
|
165
|
+
if (text.charCodeAt(i) === codeMinus) {
|
|
166
|
+
i++;
|
|
167
|
+
expectDigit(start);
|
|
168
|
+
}
|
|
169
|
+
if (text.charCodeAt(i) === codeZero) {
|
|
170
|
+
i++;
|
|
171
|
+
} else if (isNonZeroDigit(text.charCodeAt(i))) {
|
|
172
|
+
i++;
|
|
173
|
+
while (isDigit(text.charCodeAt(i))) {
|
|
174
|
+
i++;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (text.charCodeAt(i) === codeDot) {
|
|
178
|
+
i++;
|
|
179
|
+
expectDigit(start);
|
|
180
|
+
while (isDigit(text.charCodeAt(i))) {
|
|
181
|
+
i++;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (text.charCodeAt(i) === codeLowercaseE || text.charCodeAt(i) === codeUppercaseE) {
|
|
185
|
+
i++;
|
|
186
|
+
if (text.charCodeAt(i) === codeMinus || text.charCodeAt(i) === codePlus) {
|
|
187
|
+
i++;
|
|
188
|
+
}
|
|
189
|
+
expectDigit(start);
|
|
190
|
+
while (isDigit(text.charCodeAt(i))) {
|
|
191
|
+
i++;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (i > start) {
|
|
195
|
+
return parseNumber(text.slice(start, i));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function eatComma() {
|
|
199
|
+
if (text.charCodeAt(i) !== codeComma) {
|
|
200
|
+
throw new SyntaxError(`Comma ',' expected after value ${gotAt()}`);
|
|
201
|
+
}
|
|
202
|
+
i++;
|
|
203
|
+
}
|
|
204
|
+
function eatColon() {
|
|
205
|
+
if (text.charCodeAt(i) !== codeColon) {
|
|
206
|
+
throw new SyntaxError(`Colon ':' expected after property name ${gotAt()}`);
|
|
207
|
+
}
|
|
208
|
+
i++;
|
|
209
|
+
}
|
|
210
|
+
function expectValue(value) {
|
|
211
|
+
if (value === undefined) {
|
|
212
|
+
throw new SyntaxError(`JSON value expected ${gotAt()}`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function expectArrayItem(value) {
|
|
216
|
+
if (value === undefined) {
|
|
217
|
+
throw new SyntaxError(`Array item expected ${gotAt()}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function expectEndOfInput() {
|
|
221
|
+
if (i < text.length) {
|
|
222
|
+
throw new SyntaxError(`Expected end of input ${gotAt()}`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function expectDigit(start) {
|
|
226
|
+
if (!isDigit(text.charCodeAt(i))) {
|
|
227
|
+
const numSoFar = text.slice(start, i);
|
|
228
|
+
throw new SyntaxError(`Invalid number '${numSoFar}', expecting a digit ${gotAt()}`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function expectEndOfString() {
|
|
232
|
+
if (text.charCodeAt(i) !== codeDoubleQuote) {
|
|
233
|
+
throw new SyntaxError(`End of string '"' expected ${gotAt()}`);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function throwObjectKeyExpected() {
|
|
237
|
+
throw new SyntaxError(`Quoted object key expected ${gotAt()}`);
|
|
238
|
+
}
|
|
239
|
+
function throwDuplicateKey(_ref) {
|
|
240
|
+
let {
|
|
241
|
+
key,
|
|
242
|
+
position
|
|
243
|
+
} = _ref;
|
|
244
|
+
throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`);
|
|
245
|
+
}
|
|
246
|
+
function throwObjectKeyOrEndExpected() {
|
|
247
|
+
throw new SyntaxError(`Quoted object key or end of object '}' expected ${gotAt()}`);
|
|
248
|
+
}
|
|
249
|
+
function throwArrayItemOrEndExpected() {
|
|
250
|
+
throw new SyntaxError(`Array item or end of array ']' expected ${gotAt()}`);
|
|
251
|
+
}
|
|
252
|
+
function throwInvalidCharacter(char) {
|
|
253
|
+
throw new SyntaxError(`Invalid character '${char}' ${pos()}`);
|
|
254
|
+
}
|
|
255
|
+
function throwInvalidEscapeCharacter(start) {
|
|
256
|
+
const chars = text.slice(start, start + 2);
|
|
257
|
+
throw new SyntaxError(`Invalid escape character '${chars}' ${pos()}`);
|
|
258
|
+
}
|
|
259
|
+
function throwObjectValueExpected() {
|
|
260
|
+
throw new SyntaxError(`Object value expected after ':' ${pos()}`);
|
|
261
|
+
}
|
|
262
|
+
function throwInvalidUnicodeCharacter(start) {
|
|
263
|
+
const chars = text.slice(start, start + 6);
|
|
264
|
+
throw new SyntaxError(`Invalid unicode character '${chars}' ${pos()}`);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// zero based character position
|
|
268
|
+
function pos() {
|
|
269
|
+
return `at position ${i}`;
|
|
270
|
+
}
|
|
271
|
+
function got() {
|
|
272
|
+
return i < text.length ? `but got '${text[i]}'` : 'but reached end of input';
|
|
273
|
+
}
|
|
274
|
+
function gotAt() {
|
|
275
|
+
return `${got()} ${pos()}`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function isWhitespace(code) {
|
|
279
|
+
return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;
|
|
280
|
+
}
|
|
281
|
+
function isHex(code) {
|
|
282
|
+
return code >= codeZero && code <= codeNine || code >= codeUppercaseA && code <= codeUppercaseF || code >= codeLowercaseA && code <= codeLowercaseF;
|
|
283
|
+
}
|
|
284
|
+
function isDigit(code) {
|
|
285
|
+
return code >= codeZero && code <= codeNine;
|
|
286
|
+
}
|
|
287
|
+
function isNonZeroDigit(code) {
|
|
288
|
+
return code >= codeOne && code <= codeNine;
|
|
289
|
+
}
|
|
290
|
+
export function isValidStringCharacter(code) {
|
|
291
|
+
return code >= 0x20 && code <= 0x10ffff;
|
|
292
|
+
}
|
|
293
|
+
export function isDeepEqual(a, b) {
|
|
294
|
+
if (a === b) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
298
|
+
return a.length === b.length && a.every((item, index) => isDeepEqual(item, b[index]));
|
|
299
|
+
}
|
|
300
|
+
if (isObject(a) && isObject(b)) {
|
|
301
|
+
const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])];
|
|
302
|
+
return keys.every(key => isDeepEqual(a[key], b[key]));
|
|
303
|
+
}
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
function isObject(value) {
|
|
307
|
+
return typeof value === 'object' && value !== null;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// map with all escape characters
|
|
311
|
+
const escapeCharacters = {
|
|
312
|
+
'"': '"',
|
|
313
|
+
'\\': '\\',
|
|
314
|
+
'/': '/',
|
|
315
|
+
b: '\b',
|
|
316
|
+
f: '\f',
|
|
317
|
+
n: '\n',
|
|
318
|
+
r: '\r',
|
|
319
|
+
t: '\t'
|
|
320
|
+
// note that \u is handled separately in parseString()
|
|
321
|
+
};
|
|
322
|
+
const codeBackslash = 0x5c; // "\"
|
|
323
|
+
const codeOpeningBrace = 0x7b; // "{"
|
|
324
|
+
const codeClosingBrace = 0x7d; // "}"
|
|
325
|
+
const codeOpeningBracket = 0x5b; // "["
|
|
326
|
+
const codeClosingBracket = 0x5d; // "]"
|
|
327
|
+
const codeSpace = 0x20; // " "
|
|
328
|
+
const codeNewline = 0xa; // "\n"
|
|
329
|
+
const codeTab = 0x9; // "\t"
|
|
330
|
+
const codeReturn = 0xd; // "\r"
|
|
331
|
+
const codeDoubleQuote = 0x0022; // "
|
|
332
|
+
const codePlus = 0x2b; // "+"
|
|
333
|
+
const codeMinus = 0x2d; // "-"
|
|
334
|
+
const codeZero = 0x30;
|
|
335
|
+
const codeOne = 0x31;
|
|
336
|
+
const codeNine = 0x39;
|
|
337
|
+
const codeComma = 0x2c; // ","
|
|
338
|
+
const codeDot = 0x2e; // "." (dot, period)
|
|
339
|
+
const codeColon = 0x3a; // ":"
|
|
340
|
+
export const codeUppercaseA = 0x41; // "A"
|
|
341
|
+
export const codeLowercaseA = 0x61; // "a"
|
|
342
|
+
export const codeUppercaseE = 0x45; // "E"
|
|
343
|
+
export const codeLowercaseE = 0x65; // "e"
|
|
344
|
+
export const codeUppercaseF = 0x46; // "F"
|
|
345
|
+
export const codeLowercaseF = 0x66; // "f"
|
|
346
|
+
//# sourceMappingURL=parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.js","names":["parseLosslessNumber","revive","parse","text","reviver","options","optionsObj","parseNumber","onDuplicateKey","throwDuplicateKey","i","value","parseValue","expectValue","expectEndOfInput","parseObject","charCodeAt","codeOpeningBrace","skipWhitespace","object","initial","length","codeClosingBrace","eatComma","start","key","parseString","undefined","throwObjectKeyExpected","eatColon","throwObjectValueExpected","Object","prototype","hasOwnProperty","call","isDeepEqual","returnedValue","position","oldValue","newValue","throwObjectKeyOrEndExpected","parseArray","codeOpeningBracket","array","codeClosingBracket","expectArrayItem","push","throwArrayItemOrEndExpected","parseNumeric","parseKeyword","name","slice","isWhitespace","codeDoubleQuote","result","codeBackslash","char","escapeChar","escapeCharacters","isHex","String","fromCharCode","Number","parseInt","throwInvalidUnicodeCharacter","throwInvalidEscapeCharacter","isValidStringCharacter","throwInvalidCharacter","expectEndOfString","codeMinus","expectDigit","codeZero","isNonZeroDigit","isDigit","codeDot","codeLowercaseE","codeUppercaseE","codePlus","codeComma","SyntaxError","gotAt","codeColon","numSoFar","_ref","pos","chars","got","code","codeSpace","codeNewline","codeTab","codeReturn","codeNine","codeUppercaseA","codeUppercaseF","codeLowercaseA","codeLowercaseF","codeOne","a","b","Array","isArray","every","item","index","isObject","keys","Set","f","n","r","t"],"sources":["../../src/parse.ts"],"sourcesContent":["import { parseLosslessNumber } from './numberParsers.js'\nimport { revive } from './revive.js'\nimport type { DuplicateKeyInfo, GenericObject, NumberParser, ParseOptions, Reviver } from './types'\n\n/**\n * The LosslessJSON.parse() method parses a string as JSON, optionally transforming\n * the value produced by parsing.\n *\n * The parser is based on the parser of Tan Li Hou shared in\n * https://lihautan.com/json-parser-with-javascript/\n *\n * @param text\n * The string to parse as JSON. See the JSON object for a description of JSON syntax.\n *\n * @param [reviver]\n * If a function, prescribes how the value originally produced by parsing is\n * transformed, before being returned.\n *\n * @param [options=ParseOptions | NumberParserArgument]\n * Pass a custom number parser. Input is a string, and the output can be unknown\n * numeric value: number, bigint, LosslessNumber, or a custom BigNumber library.\n *\n * @returns Returns the Object corresponding to the given JSON text.\n *\n * @throws Throws a SyntaxError exception if the string to parse is not valid JSON.\n */\nexport function parse(\n text: string,\n reviver?: Reviver | null,\n options?: ParseOptions | NumberParser\n): unknown {\n const optionsObj = typeof options === 'function' ? { parseNumber: options } : options\n const parseNumber = optionsObj?.parseNumber ?? parseLosslessNumber\n const onDuplicateKey = optionsObj?.onDuplicateKey ?? throwDuplicateKey\n\n let i = 0\n const value = parseValue()\n expectValue(value)\n expectEndOfInput()\n\n return reviver ? revive(value, reviver) : value\n\n function parseObject(): GenericObject<unknown> | undefined {\n if (text.charCodeAt(i) === codeOpeningBrace) {\n i++\n skipWhitespace()\n\n const object: GenericObject<unknown> = {}\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBrace) {\n if (!initial) {\n eatComma()\n skipWhitespace()\n } else {\n initial = false\n }\n\n const start = i\n\n const key = parseString()\n if (key === undefined) {\n throwObjectKeyExpected()\n return // To make TS happy\n }\n\n skipWhitespace()\n eatColon()\n const value = parseValue()\n\n if (value === undefined) {\n throwObjectValueExpected()\n return // To make TS happy\n }\n\n // handle duplicate keys\n // biome-ignore lint/suspicious/noPrototypeBuiltins: TODO: replace with hasOwn one day, when browser support is high enough\n if (Object.prototype.hasOwnProperty.call(object, key) && !isDeepEqual(value, object[key])) {\n // Note that we could also test `if(key in object) {...}`\n // or `if (object[key] !== 'undefined') {...}`, but that is slower.\n const returnedValue = onDuplicateKey({\n key,\n position: start + 1,\n oldValue: object[key],\n newValue: value\n })\n\n if (returnedValue !== undefined) {\n object[key] = returnedValue\n }\n } else {\n object[key] = value\n }\n }\n\n if (text.charCodeAt(i) !== codeClosingBrace) {\n throwObjectKeyOrEndExpected()\n }\n i++\n\n return object\n }\n }\n\n function parseArray(): Array<unknown> | unknown {\n if (text.charCodeAt(i) === codeOpeningBracket) {\n i++\n skipWhitespace()\n\n const array = []\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBracket) {\n if (!initial) {\n eatComma()\n } else {\n initial = false\n }\n\n const value = parseValue()\n expectArrayItem(value)\n array.push(value)\n }\n\n if (text.charCodeAt(i) !== codeClosingBracket) {\n throwArrayItemOrEndExpected()\n }\n i++\n\n return array\n }\n }\n\n function parseValue(): unknown {\n skipWhitespace()\n\n const value =\n parseString() ??\n parseNumeric() ??\n parseObject() ??\n parseArray() ??\n parseKeyword('true', true) ??\n parseKeyword('false', false) ??\n parseKeyword('null', null)\n\n skipWhitespace()\n\n return value\n }\n\n function parseKeyword(name: string, value: unknown): unknown | undefined {\n if (text.slice(i, i + name.length) === name) {\n i += name.length\n return value\n }\n }\n\n function skipWhitespace() {\n while (isWhitespace(text.charCodeAt(i))) {\n i++\n }\n }\n\n function parseString() {\n if (text.charCodeAt(i) === codeDoubleQuote) {\n i++\n let result = ''\n while (i < text.length && text.charCodeAt(i) !== codeDoubleQuote) {\n if (text.charCodeAt(i) === codeBackslash) {\n const char = text[i + 1]\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n result += escapeChar\n i++\n } else if (char === 'u') {\n if (\n isHex(text.charCodeAt(i + 2)) &&\n isHex(text.charCodeAt(i + 3)) &&\n isHex(text.charCodeAt(i + 4)) &&\n isHex(text.charCodeAt(i + 5))\n ) {\n result += String.fromCharCode(Number.parseInt(text.slice(i + 2, i + 6), 16))\n i += 5\n } else {\n throwInvalidUnicodeCharacter(i)\n }\n } else {\n throwInvalidEscapeCharacter(i)\n }\n } else {\n if (isValidStringCharacter(text.charCodeAt(i))) {\n result += text[i]\n } else {\n throwInvalidCharacter(text[i])\n }\n }\n i++\n }\n expectEndOfString()\n i++\n return result\n }\n }\n\n function parseNumeric() {\n const start = i\n if (text.charCodeAt(i) === codeMinus) {\n i++\n expectDigit(start)\n }\n\n if (text.charCodeAt(i) === codeZero) {\n i++\n } else if (isNonZeroDigit(text.charCodeAt(i))) {\n i++\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeDot) {\n i++\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeLowercaseE || text.charCodeAt(i) === codeUppercaseE) {\n i++\n if (text.charCodeAt(i) === codeMinus || text.charCodeAt(i) === codePlus) {\n i++\n }\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (i > start) {\n return parseNumber(text.slice(start, i))\n }\n }\n\n function eatComma() {\n if (text.charCodeAt(i) !== codeComma) {\n throw new SyntaxError(`Comma ',' expected after value ${gotAt()}`)\n }\n i++\n }\n\n function eatColon() {\n if (text.charCodeAt(i) !== codeColon) {\n throw new SyntaxError(`Colon ':' expected after property name ${gotAt()}`)\n }\n i++\n }\n\n function expectValue(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`JSON value expected ${gotAt()}`)\n }\n }\n\n function expectArrayItem(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`Array item expected ${gotAt()}`)\n }\n }\n\n function expectEndOfInput() {\n if (i < text.length) {\n throw new SyntaxError(`Expected end of input ${gotAt()}`)\n }\n }\n\n function expectDigit(start: number) {\n if (!isDigit(text.charCodeAt(i))) {\n const numSoFar = text.slice(start, i)\n throw new SyntaxError(`Invalid number '${numSoFar}', expecting a digit ${gotAt()}`)\n }\n }\n\n function expectEndOfString() {\n if (text.charCodeAt(i) !== codeDoubleQuote) {\n throw new SyntaxError(`End of string '\"' expected ${gotAt()}`)\n }\n }\n\n function throwObjectKeyExpected() {\n throw new SyntaxError(`Quoted object key expected ${gotAt()}`)\n }\n\n function throwDuplicateKey({ key, position }: DuplicateKeyInfo) {\n throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`)\n }\n\n function throwObjectKeyOrEndExpected() {\n throw new SyntaxError(`Quoted object key or end of object '}' expected ${gotAt()}`)\n }\n\n function throwArrayItemOrEndExpected() {\n throw new SyntaxError(`Array item or end of array ']' expected ${gotAt()}`)\n }\n\n function throwInvalidCharacter(char: string) {\n throw new SyntaxError(`Invalid character '${char}' ${pos()}`)\n }\n\n function throwInvalidEscapeCharacter(start: number) {\n const chars = text.slice(start, start + 2)\n throw new SyntaxError(`Invalid escape character '${chars}' ${pos()}`)\n }\n\n function throwObjectValueExpected() {\n throw new SyntaxError(`Object value expected after ':' ${pos()}`)\n }\n\n function throwInvalidUnicodeCharacter(start: number) {\n const chars = text.slice(start, start + 6)\n throw new SyntaxError(`Invalid unicode character '${chars}' ${pos()}`)\n }\n\n // zero based character position\n function pos(): string {\n return `at position ${i}`\n }\n\n function got(): string {\n return i < text.length ? `but got '${text[i]}'` : 'but reached end of input'\n }\n\n function gotAt(): string {\n return `${got()} ${pos()}`\n }\n}\n\nfunction isWhitespace(code: number): boolean {\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn\n}\n\nfunction isHex(code: number): boolean {\n return (\n (code >= codeZero && code <= codeNine) ||\n (code >= codeUppercaseA && code <= codeUppercaseF) ||\n (code >= codeLowercaseA && code <= codeLowercaseF)\n )\n}\n\nfunction isDigit(code: number): boolean {\n return code >= codeZero && code <= codeNine\n}\n\nfunction isNonZeroDigit(code: number): boolean {\n return code >= codeOne && code <= codeNine\n}\n\nexport function isValidStringCharacter(code: number): boolean {\n return code >= 0x20 && code <= 0x10ffff\n}\n\nexport function isDeepEqual(a: unknown, b: unknown): boolean {\n if (a === b) {\n return true\n }\n\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => isDeepEqual(item, b[index]))\n }\n\n if (isObject(a) && isObject(b)) {\n const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])]\n return keys.every((key) => isDeepEqual(a[key], b[key]))\n }\n\n return false\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null\n}\n\n// map with all escape characters\nconst escapeCharacters: GenericObject<string> = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\nconst codeBackslash = 0x5c // \"\\\"\nconst codeOpeningBrace = 0x7b // \"{\"\nconst codeClosingBrace = 0x7d // \"}\"\nconst codeOpeningBracket = 0x5b // \"[\"\nconst codeClosingBracket = 0x5d // \"]\"\nconst codeSpace = 0x20 // \" \"\nconst codeNewline = 0xa // \"\\n\"\nconst codeTab = 0x9 // \"\\t\"\nconst codeReturn = 0xd // \"\\r\"\nconst codeDoubleQuote = 0x0022 // \"\nconst codePlus = 0x2b // \"+\"\nconst codeMinus = 0x2d // \"-\"\nconst codeZero = 0x30\nconst codeOne = 0x31\nconst codeNine = 0x39\nconst codeComma = 0x2c // \",\"\nconst codeDot = 0x2e // \".\" (dot, period)\nconst codeColon = 0x3a // \":\"\nexport const codeUppercaseA = 0x41 // \"A\"\nexport const codeLowercaseA = 0x61 // \"a\"\nexport const codeUppercaseE = 0x45 // \"E\"\nexport const codeLowercaseE = 0x65 // \"e\"\nexport const codeUppercaseF = 0x46 // \"F\"\nexport const codeLowercaseF = 0x66 // \"f\"\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,oBAAoB;AACxD,SA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
import { isLosslessNumber } from './LosslessNumber.js';
|
|
2
|
+
/**
|
|
3
|
+
* Revive a json object.
|
|
4
|
+
* Applies the reviver function recursively on all values in the JSON object.
|
|
5
|
+
* @param json A JSON Object, Array, or value
|
|
6
|
+
* @param reviver
|
|
7
|
+
* A reviver function invoked with arguments `key` and `value`,
|
|
8
|
+
* which must return a replacement value. The function context
|
|
9
|
+
* (`this`) is the Object or Array that contains the currently
|
|
10
|
+
* handled value.
|
|
11
|
+
*/
|
|
12
|
+
export function revive(json, reviver) {
|
|
13
|
+
return reviveValue({
|
|
14
|
+
'': json
|
|
15
|
+
}, '', json, reviver);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Revive a value
|
|
20
|
+
*/
|
|
21
|
+
function reviveValue(context, key, value, reviver) {
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
return reviver.call(context, key, reviveArray(value, reviver));
|
|
24
|
+
}
|
|
25
|
+
if (value && typeof value === 'object' && !isLosslessNumber(value)) {
|
|
26
|
+
// note the special case for LosslessNumber,
|
|
27
|
+
// we don't want to iterate over the internals of a LosslessNumber
|
|
28
|
+
return reviver.call(context, key, reviveObject(value, reviver));
|
|
29
|
+
}
|
|
30
|
+
return reviver.call(context, key, value);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Revive the properties of an object
|
|
35
|
+
*/
|
|
36
|
+
function reviveObject(object, reviver) {
|
|
37
|
+
for (const key of Object.keys(object)) {
|
|
38
|
+
const value = reviveValue(object, key, object[key], reviver);
|
|
39
|
+
if (value !== undefined) {
|
|
40
|
+
object[key] = value;
|
|
41
|
+
} else {
|
|
42
|
+
delete object[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return object;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Revive the properties of an Array
|
|
50
|
+
*/
|
|
51
|
+
function reviveArray(array, reviver) {
|
|
52
|
+
for (let i = 0; i < array.length; i++) {
|
|
53
|
+
array[i] = reviveValue(array, String(i), array[i], reviver);
|
|
54
|
+
}
|
|
55
|
+
return array;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=revive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revive.js","names":["isLosslessNumber","revive","json","reviver","reviveValue","context","key","value","Array","isArray","call","reviveArray","reviveObject","object","Object","keys","undefined","array","i","length","String"],"sources":["../../src/revive.ts"],"sourcesContent":["import { isLosslessNumber } from './LosslessNumber.js'\nimport type { GenericObject, Reviver } from './types'\n\n/**\n * Revive a json object.\n * Applies the reviver function recursively on all values in the JSON object.\n * @param json A JSON Object, Array, or value\n * @param reviver\n * A reviver function invoked with arguments `key` and `value`,\n * which must return a replacement value. The function context\n * (`this`) is the Object or Array that contains the currently\n * handled value.\n */\nexport function revive(json: unknown, reviver: Reviver): unknown {\n return reviveValue({ '': json }, '', json, reviver)\n}\n\n/**\n * Revive a value\n */\nfunction reviveValue(\n context: GenericObject<unknown> | Array<unknown>,\n key: string,\n value: unknown,\n reviver: Reviver\n): unknown {\n if (Array.isArray(value)) {\n return reviver.call(context, key, reviveArray(value, reviver))\n }\n\n if (value && typeof value === 'object' && !isLosslessNumber(value)) {\n // note the special case for LosslessNumber,\n // we don't want to iterate over the internals of a LosslessNumber\n return reviver.call(context, key, reviveObject(value as GenericObject<unknown>, reviver))\n }\n\n return reviver.call(context, key, value)\n}\n\n/**\n * Revive the properties of an object\n */\nfunction reviveObject(object: GenericObject<unknown>, reviver: Reviver) {\n for (const key of Object.keys(object)) {\n const value = reviveValue(object, key, object[key], reviver)\n if (value !== undefined) {\n object[key] = value\n } else {\n delete object[key]\n }\n }\n\n return object\n}\n\n/**\n * Revive the properties of an Array\n */\nfunction reviveArray(array: Array<unknown>, reviver: Reviver): Array<unknown> {\n for (let i = 0; i < array.length; i++) {\n array[i] = reviveValue(array, String(i), array[i], reviver)\n }\n\n return array\n}\n"],"mappings":"A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O,MAAM;AACf;;AAEA;AACA;AACA;AACA,SAASF,WAAWA,CAACM,KAAqB,EAAEd,OAAgB,EAAkB;EAC5E,KAAK,IAAIe,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,KAAK,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;IACrCD,KAAK,CAACC,CAAC,CAAC,GAAGd,WAAW,CAACa,KAAK,EAAEG,MAAM,CAACF,CAAC,CAAC,EAAED,KAAK,CAACC,CAAC,CAAC,EAAEf,OAAO,CAAC;EAC7D;EAEA,OAAOc,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revive a string containing an ISO 8601 date string into a JavaScript `Date` object
|
|
3
|
+
*/
|
|
4
|
+
export function reviveDate(_key, value) {
|
|
5
|
+
return typeof value === 'string' && isoDateRegex.test(value) ? new Date(value) : value;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Matches strings like "2022-08-25T09:39:19.288Z"
|
|
9
|
+
const isoDateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
10
|
+
//# sourceMappingURL=reviveDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviveDate.js","names":["reviveDate","_key","value","isoDateRegex","test","Date"],"sources":["../../src/reviveDate.ts"],"sourcesContent":["/**\n * Revive a string containing an ISO 8601 date string into a JavaScript `Date` object\n */\nexport function reviveDate(_key: string, value: unknown): Date | unknown {\n return typeof value === 'string' && isoDateRegex.test(value) ? new Date(value) : value\n}\n\n// Matches strings like \"2022-08-25T09:39:19.288Z\"\nconst isoDateRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,SAASA,UAAUA,CAACC,IAAY,EAAEC,KAAc,EAAkB;EACvE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIC,YAAY,CAACC,IAAI,CAACF,KAAK,CAAC,GAAG,IAAIG,IAAI,CAACH,KAAK,CAAC,GAAGA,KAAK;AACxF;;AAEA;AACA,MAAMC,YAAY,GAAG,+CAA+C","ignoreList":[]}
|