@google/gemini-cli 0.1.1 → 0.1.3-rc.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/README.md +7 -6
- package/dist/.last_build +0 -0
- package/dist/google-gemini-cli-0.1.3.tgz +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +74 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +38 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +14 -0
- package/dist/src/config/config.js +225 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +19 -0
- package/dist/src/config/extension.js +81 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +75 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +69 -0
- package/dist/src/config/settings.js +165 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +212 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +122 -0
- package/dist/src/gemini.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +6 -0
- package/dist/src/generated/git-commit.js +9 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +112 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/ui/App.d.ts +14 -0
- package/dist/src/ui/App.js +398 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/App.test.d.ts +6 -0
- package/dist/src/ui/App.test.js +280 -0
- package/dist/src/ui/App.test.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +48 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +14 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +7 -0
- package/dist/src/ui/components/AsciiArt.js +26 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.d.ts +15 -0
- package/dist/src/ui/components/AuthDialog.js +67 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/components/AuthDialog.test.js +69 -0
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/components/AuthInProgress.js +27 -0
- package/dist/src/ui/components/AuthInProgress.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/ConsolePatcher.d.ts +12 -0
- package/dist/src/ui/components/ConsolePatcher.js +40 -0
- package/dist/src/ui/components/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +15 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +41 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +22 -0
- package/dist/src/ui/components/Footer.js +13 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +12 -0
- package/dist/src/ui/components/Header.js +20 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +7 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +15 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +85 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +24 -0
- package/dist/src/ui/components/InputPrompt.js +313 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/InputPrompt.test.js +154 -0
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +19 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +141 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +13 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +20 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +41 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/Stats.d.ts +39 -0
- package/dist/src/ui/components/Stats.js +23 -0
- package/dist/src/ui/components/Stats.js.map +1 -0
- package/dist/src/ui/components/Stats.test.d.ts +6 -0
- package/dist/src/ui/components/Stats.test.js +57 -0
- package/dist/src/ui/components/Stats.test.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +14 -0
- package/dist/src/ui/components/StatsDisplay.js +28 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/StatsDisplay.test.js +51 -0
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
- package/dist/src/ui/components/ThemeDialog.js +126 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +8 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +15 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +239 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +9 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +111 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +37 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +53 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolMessage.js +61 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +116 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +9 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +383 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +134 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +41 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +52 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +121 -0
- package/dist/src/ui/components/shared/text-buffer.js +1147 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/constants.d.ts +8 -0
- package/dist/src/ui/constants.js +12 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +43 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +35 -0
- package/dist/src/ui/contexts/SessionContext.js +132 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/SessionContext.test.js +151 -0
- package/dist/src/ui/contexts/SessionContext.test.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +50 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +312 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +261 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +922 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useAuthCommand.js +65 -0
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +21 -0
- package/dist/src/ui/hooks/useCompletion.js +321 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +59 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
- package/dist/src/ui/hooks/useGeminiStream.js +552 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js +823 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +10 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +189 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
- package/dist/src/ui/hooks/useShellHistory.js +89 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +78 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +139 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +149 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +136 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +128 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +102 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +113 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +136 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +138 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +135 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +84 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +33 -0
- package/dist/src/ui/themes/theme-manager.js +107 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +67 -0
- package/dist/src/ui/themes/theme.js +304 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +143 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +149 -0
- package/dist/src/ui/types.js +41 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +14 -0
- package/dist/src/ui/utils/CodeColorizer.js +97 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +221 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +22 -0
- package/dist/src/ui/utils/commandUtils.js +25 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/errorParsing.d.ts +15 -0
- package/dist/src/ui/utils/errorParsing.js +80 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +22 -0
- package/dist/src/ui/utils/textUtils.js +58 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.js +34 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +6 -0
- package/dist/src/utils/cleanup.js +19 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +34 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +680 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +60 -71
- package/LICENSE +0 -202
- package/bundle/gemini.js +0 -257368
- package/bundle/shell.json +0 -18
- package/bundle/shell.md +0 -16
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-closed.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-open.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-permissive-proxied.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-closed.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-open.sb +0 -0
- /package/{bundle → dist/src/utils}/sandbox-macos-restrictive-proxied.sb +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Theme, ThemeType } from './theme.js';
|
|
7
|
+
export interface ThemeDisplay {
|
|
8
|
+
name: string;
|
|
9
|
+
type: ThemeType;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_THEME: Theme;
|
|
12
|
+
declare class ThemeManager {
|
|
13
|
+
private readonly availableThemes;
|
|
14
|
+
private activeTheme;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Returns a list of available theme names.
|
|
18
|
+
*/
|
|
19
|
+
getAvailableThemes(): ThemeDisplay[];
|
|
20
|
+
/**
|
|
21
|
+
* Sets the active theme.
|
|
22
|
+
* @param themeName The name of the theme to activate.
|
|
23
|
+
* @returns True if the theme was successfully set, false otherwise.
|
|
24
|
+
*/
|
|
25
|
+
setActiveTheme(themeName: string | undefined): boolean;
|
|
26
|
+
findThemeByName(themeName: string | undefined): Theme | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the currently active theme object.
|
|
29
|
+
*/
|
|
30
|
+
getActiveTheme(): Theme;
|
|
31
|
+
}
|
|
32
|
+
export declare const themeManager: ThemeManager;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { AyuDark } from './ayu.js';
|
|
7
|
+
import { AyuLight } from './ayu-light.js';
|
|
8
|
+
import { AtomOneDark } from './atom-one-dark.js';
|
|
9
|
+
import { Dracula } from './dracula.js';
|
|
10
|
+
import { GitHubDark } from './github-dark.js';
|
|
11
|
+
import { GitHubLight } from './github-light.js';
|
|
12
|
+
import { GoogleCode } from './googlecode.js';
|
|
13
|
+
import { DefaultLight } from './default-light.js';
|
|
14
|
+
import { DefaultDark } from './default.js';
|
|
15
|
+
import { XCode } from './xcode.js';
|
|
16
|
+
import { ANSI } from './ansi.js';
|
|
17
|
+
import { ANSILight } from './ansi-light.js';
|
|
18
|
+
import { NoColorTheme } from './no-color.js';
|
|
19
|
+
import process from 'node:process';
|
|
20
|
+
export const DEFAULT_THEME = DefaultDark;
|
|
21
|
+
class ThemeManager {
|
|
22
|
+
availableThemes;
|
|
23
|
+
activeTheme;
|
|
24
|
+
constructor() {
|
|
25
|
+
this.availableThemes = [
|
|
26
|
+
AyuDark,
|
|
27
|
+
AyuLight,
|
|
28
|
+
AtomOneDark,
|
|
29
|
+
Dracula,
|
|
30
|
+
DefaultLight,
|
|
31
|
+
DefaultDark,
|
|
32
|
+
GitHubDark,
|
|
33
|
+
GitHubLight,
|
|
34
|
+
GoogleCode,
|
|
35
|
+
XCode,
|
|
36
|
+
ANSI,
|
|
37
|
+
ANSILight,
|
|
38
|
+
];
|
|
39
|
+
this.activeTheme = DEFAULT_THEME;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns a list of available theme names.
|
|
43
|
+
*/
|
|
44
|
+
getAvailableThemes() {
|
|
45
|
+
const sortedThemes = [...this.availableThemes].sort((a, b) => {
|
|
46
|
+
const typeOrder = (type) => {
|
|
47
|
+
switch (type) {
|
|
48
|
+
case 'dark':
|
|
49
|
+
return 1;
|
|
50
|
+
case 'light':
|
|
51
|
+
return 2;
|
|
52
|
+
default:
|
|
53
|
+
return 3;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const typeComparison = typeOrder(a.type) - typeOrder(b.type);
|
|
57
|
+
if (typeComparison !== 0) {
|
|
58
|
+
return typeComparison;
|
|
59
|
+
}
|
|
60
|
+
return a.name.localeCompare(b.name);
|
|
61
|
+
});
|
|
62
|
+
return sortedThemes.map((theme) => ({
|
|
63
|
+
name: theme.name,
|
|
64
|
+
type: theme.type,
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Sets the active theme.
|
|
69
|
+
* @param themeName The name of the theme to activate.
|
|
70
|
+
* @returns True if the theme was successfully set, false otherwise.
|
|
71
|
+
*/
|
|
72
|
+
setActiveTheme(themeName) {
|
|
73
|
+
const foundTheme = this.findThemeByName(themeName);
|
|
74
|
+
if (foundTheme) {
|
|
75
|
+
this.activeTheme = foundTheme;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// If themeName is undefined, it means we want to set the default theme.
|
|
80
|
+
// If findThemeByName returns undefined (e.g. default theme is also not found for some reason)
|
|
81
|
+
// then this will return false.
|
|
82
|
+
if (themeName === undefined) {
|
|
83
|
+
this.activeTheme = DEFAULT_THEME;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
findThemeByName(themeName) {
|
|
90
|
+
if (!themeName) {
|
|
91
|
+
return DEFAULT_THEME;
|
|
92
|
+
}
|
|
93
|
+
return this.availableThemes.find((theme) => theme.name === themeName);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Returns the currently active theme object.
|
|
97
|
+
*/
|
|
98
|
+
getActiveTheme() {
|
|
99
|
+
if (process.env.NO_COLOR) {
|
|
100
|
+
return NoColorTheme;
|
|
101
|
+
}
|
|
102
|
+
return this.activeTheme;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Export an instance of the ThemeManager
|
|
106
|
+
export const themeManager = new ThemeManager();
|
|
107
|
+
//# sourceMappingURL=theme-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-manager.js","sourceRoot":"","sources":["../../../../src/ui/themes/theme-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,cAAc,CAAC;AAOnC,MAAM,CAAC,MAAM,aAAa,GAAU,WAAW,CAAC;AAEhD,MAAM,YAAY;IACC,eAAe,CAAU;IAClC,WAAW,CAAQ;IAE3B;QACE,IAAI,CAAC,eAAe,GAAG;YACrB,OAAO;YACP,QAAQ;YACR,WAAW;YACX,OAAO;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,8FAA8F;YAC9F,+BAA+B;YAC/B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC5B,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;gBACjC,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,eAAe,CAAC,SAA6B;QAC3C,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,aAAa,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YACzB,OAAO,YAAY,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF;AAED,yCAAyC;AACzC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { CSSProperties } from 'react';
|
|
7
|
+
export type ThemeType = 'light' | 'dark' | 'ansi';
|
|
8
|
+
export interface ColorsTheme {
|
|
9
|
+
type: ThemeType;
|
|
10
|
+
Background: string;
|
|
11
|
+
Foreground: string;
|
|
12
|
+
LightBlue: string;
|
|
13
|
+
AccentBlue: string;
|
|
14
|
+
AccentPurple: string;
|
|
15
|
+
AccentCyan: string;
|
|
16
|
+
AccentGreen: string;
|
|
17
|
+
AccentYellow: string;
|
|
18
|
+
AccentRed: string;
|
|
19
|
+
Comment: string;
|
|
20
|
+
Gray: string;
|
|
21
|
+
GradientColors?: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare const lightTheme: ColorsTheme;
|
|
24
|
+
export declare const darkTheme: ColorsTheme;
|
|
25
|
+
export declare const ansiTheme: ColorsTheme;
|
|
26
|
+
export declare class Theme {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly type: ThemeType;
|
|
29
|
+
readonly colors: ColorsTheme;
|
|
30
|
+
/**
|
|
31
|
+
* The default foreground color for text when no specific highlight rule applies.
|
|
32
|
+
* This is an Ink-compatible color string (hex or name).
|
|
33
|
+
*/
|
|
34
|
+
readonly defaultColor: string;
|
|
35
|
+
/**
|
|
36
|
+
* Stores the mapping from highlight.js class names (e.g., 'hljs-keyword')
|
|
37
|
+
* to Ink-compatible color strings (hex or name).
|
|
38
|
+
*/
|
|
39
|
+
protected readonly _colorMap: Readonly<Record<string, string>>;
|
|
40
|
+
private static readonly cssNameToHexMap;
|
|
41
|
+
private static readonly inkSupportedNames;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new Theme instance.
|
|
44
|
+
* @param name The name of the theme.
|
|
45
|
+
* @param rawMappings The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
46
|
+
*/
|
|
47
|
+
constructor(name: string, type: ThemeType, rawMappings: Record<string, CSSProperties>, colors: ColorsTheme);
|
|
48
|
+
/**
|
|
49
|
+
* Gets the Ink-compatible color string for a given highlight.js class name.
|
|
50
|
+
* @param hljsClass The highlight.js class name (e.g., 'hljs-keyword', 'hljs-string').
|
|
51
|
+
* @returns The corresponding Ink color string (hex or name) if it exists.
|
|
52
|
+
*/
|
|
53
|
+
getInkColor(hljsClass: string): string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Resolves a CSS color value (name or hex) into an Ink-compatible color string.
|
|
56
|
+
* @param colorValue The raw color string (e.g., 'blue', '#ff0000', 'darkkhaki').
|
|
57
|
+
* @returns An Ink-compatible color string (hex or name), or undefined if not resolvable.
|
|
58
|
+
*/
|
|
59
|
+
private static _resolveColor;
|
|
60
|
+
/**
|
|
61
|
+
* Builds the internal map from highlight.js class names to Ink-compatible color strings.
|
|
62
|
+
* This method is protected and primarily intended for use by the constructor.
|
|
63
|
+
* @param hljsTheme The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
64
|
+
* @returns An Ink-compatible theme map (Record<string, string>).
|
|
65
|
+
*/
|
|
66
|
+
protected _buildColorMap(hljsTheme: Record<string, CSSProperties>): Record<string, string>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export const lightTheme = {
|
|
7
|
+
type: 'light',
|
|
8
|
+
Background: '#FAFAFA',
|
|
9
|
+
Foreground: '#3C3C43',
|
|
10
|
+
LightBlue: '#89BDCD',
|
|
11
|
+
AccentBlue: '#3B82F6',
|
|
12
|
+
AccentPurple: '#8B5CF6',
|
|
13
|
+
AccentCyan: '#06B6D4',
|
|
14
|
+
AccentGreen: '#3CA84B',
|
|
15
|
+
AccentYellow: '#D5A40A',
|
|
16
|
+
AccentRed: '#DD4C4C',
|
|
17
|
+
Comment: '#008000',
|
|
18
|
+
Gray: '#B7BECC',
|
|
19
|
+
GradientColors: ['#4796E4', '#847ACE', '#C3677F'],
|
|
20
|
+
};
|
|
21
|
+
export const darkTheme = {
|
|
22
|
+
type: 'dark',
|
|
23
|
+
Background: '#1E1E2E',
|
|
24
|
+
Foreground: '#CDD6F4',
|
|
25
|
+
LightBlue: '#ADD8E6',
|
|
26
|
+
AccentBlue: '#89B4FA',
|
|
27
|
+
AccentPurple: '#CBA6F7',
|
|
28
|
+
AccentCyan: '#89DCEB',
|
|
29
|
+
AccentGreen: '#A6E3A1',
|
|
30
|
+
AccentYellow: '#F9E2AF',
|
|
31
|
+
AccentRed: '#F38BA8',
|
|
32
|
+
Comment: '#6C7086',
|
|
33
|
+
Gray: '#6C7086',
|
|
34
|
+
GradientColors: ['#4796E4', '#847ACE', '#C3677F'],
|
|
35
|
+
};
|
|
36
|
+
export const ansiTheme = {
|
|
37
|
+
type: 'ansi',
|
|
38
|
+
Background: 'black',
|
|
39
|
+
Foreground: 'white',
|
|
40
|
+
LightBlue: 'blue',
|
|
41
|
+
AccentBlue: 'blue',
|
|
42
|
+
AccentPurple: 'magenta',
|
|
43
|
+
AccentCyan: 'cyan',
|
|
44
|
+
AccentGreen: 'green',
|
|
45
|
+
AccentYellow: 'yellow',
|
|
46
|
+
AccentRed: 'red',
|
|
47
|
+
Comment: 'gray',
|
|
48
|
+
Gray: 'gray',
|
|
49
|
+
};
|
|
50
|
+
export class Theme {
|
|
51
|
+
name;
|
|
52
|
+
type;
|
|
53
|
+
colors;
|
|
54
|
+
/**
|
|
55
|
+
* The default foreground color for text when no specific highlight rule applies.
|
|
56
|
+
* This is an Ink-compatible color string (hex or name).
|
|
57
|
+
*/
|
|
58
|
+
defaultColor;
|
|
59
|
+
/**
|
|
60
|
+
* Stores the mapping from highlight.js class names (e.g., 'hljs-keyword')
|
|
61
|
+
* to Ink-compatible color strings (hex or name).
|
|
62
|
+
*/
|
|
63
|
+
_colorMap;
|
|
64
|
+
// --- Static Helper Data ---
|
|
65
|
+
// Mapping from common CSS color names (lowercase) to hex codes (lowercase)
|
|
66
|
+
// Excludes names directly supported by Ink
|
|
67
|
+
static cssNameToHexMap = {
|
|
68
|
+
aliceblue: '#f0f8ff',
|
|
69
|
+
antiquewhite: '#faebd7',
|
|
70
|
+
aqua: '#00ffff',
|
|
71
|
+
aquamarine: '#7fffd4',
|
|
72
|
+
azure: '#f0ffff',
|
|
73
|
+
beige: '#f5f5dc',
|
|
74
|
+
bisque: '#ffe4c4',
|
|
75
|
+
blanchedalmond: '#ffebcd',
|
|
76
|
+
blueviolet: '#8a2be2',
|
|
77
|
+
brown: '#a52a2a',
|
|
78
|
+
burlywood: '#deb887',
|
|
79
|
+
cadetblue: '#5f9ea0',
|
|
80
|
+
chartreuse: '#7fff00',
|
|
81
|
+
chocolate: '#d2691e',
|
|
82
|
+
coral: '#ff7f50',
|
|
83
|
+
cornflowerblue: '#6495ed',
|
|
84
|
+
cornsilk: '#fff8dc',
|
|
85
|
+
crimson: '#dc143c',
|
|
86
|
+
darkblue: '#00008b',
|
|
87
|
+
darkcyan: '#008b8b',
|
|
88
|
+
darkgoldenrod: '#b8860b',
|
|
89
|
+
darkgray: '#a9a9a9',
|
|
90
|
+
darkgrey: '#a9a9a9',
|
|
91
|
+
darkgreen: '#006400',
|
|
92
|
+
darkkhaki: '#bdb76b',
|
|
93
|
+
darkmagenta: '#8b008b',
|
|
94
|
+
darkolivegreen: '#556b2f',
|
|
95
|
+
darkorange: '#ff8c00',
|
|
96
|
+
darkorchid: '#9932cc',
|
|
97
|
+
darkred: '#8b0000',
|
|
98
|
+
darksalmon: '#e9967a',
|
|
99
|
+
darkseagreen: '#8fbc8f',
|
|
100
|
+
darkslateblue: '#483d8b',
|
|
101
|
+
darkslategray: '#2f4f4f',
|
|
102
|
+
darkslategrey: '#2f4f4f',
|
|
103
|
+
darkturquoise: '#00ced1',
|
|
104
|
+
darkviolet: '#9400d3',
|
|
105
|
+
deeppink: '#ff1493',
|
|
106
|
+
deepskyblue: '#00bfff',
|
|
107
|
+
dimgray: '#696969',
|
|
108
|
+
dimgrey: '#696969',
|
|
109
|
+
dodgerblue: '#1e90ff',
|
|
110
|
+
firebrick: '#b22222',
|
|
111
|
+
floralwhite: '#fffaf0',
|
|
112
|
+
forestgreen: '#228b22',
|
|
113
|
+
fuchsia: '#ff00ff',
|
|
114
|
+
gainsboro: '#dcdcdc',
|
|
115
|
+
ghostwhite: '#f8f8ff',
|
|
116
|
+
gold: '#ffd700',
|
|
117
|
+
goldenrod: '#daa520',
|
|
118
|
+
greenyellow: '#adff2f',
|
|
119
|
+
honeydew: '#f0fff0',
|
|
120
|
+
hotpink: '#ff69b4',
|
|
121
|
+
indianred: '#cd5c5c',
|
|
122
|
+
indigo: '#4b0082',
|
|
123
|
+
ivory: '#fffff0',
|
|
124
|
+
khaki: '#f0e68c',
|
|
125
|
+
lavender: '#e6e6fa',
|
|
126
|
+
lavenderblush: '#fff0f5',
|
|
127
|
+
lawngreen: '#7cfc00',
|
|
128
|
+
lemonchiffon: '#fffacd',
|
|
129
|
+
lightblue: '#add8e6',
|
|
130
|
+
lightcoral: '#f08080',
|
|
131
|
+
lightcyan: '#e0ffff',
|
|
132
|
+
lightgoldenrodyellow: '#fafad2',
|
|
133
|
+
lightgray: '#d3d3d3',
|
|
134
|
+
lightgrey: '#d3d3d3',
|
|
135
|
+
lightgreen: '#90ee90',
|
|
136
|
+
lightpink: '#ffb6c1',
|
|
137
|
+
lightsalmon: '#ffa07a',
|
|
138
|
+
lightseagreen: '#20b2aa',
|
|
139
|
+
lightskyblue: '#87cefa',
|
|
140
|
+
lightslategray: '#778899',
|
|
141
|
+
lightslategrey: '#778899',
|
|
142
|
+
lightsteelblue: '#b0c4de',
|
|
143
|
+
lightyellow: '#ffffe0',
|
|
144
|
+
lime: '#00ff00',
|
|
145
|
+
limegreen: '#32cd32',
|
|
146
|
+
linen: '#faf0e6',
|
|
147
|
+
maroon: '#800000',
|
|
148
|
+
mediumaquamarine: '#66cdaa',
|
|
149
|
+
mediumblue: '#0000cd',
|
|
150
|
+
mediumorchid: '#ba55d3',
|
|
151
|
+
mediumpurple: '#9370db',
|
|
152
|
+
mediumseagreen: '#3cb371',
|
|
153
|
+
mediumslateblue: '#7b68ee',
|
|
154
|
+
mediumspringgreen: '#00fa9a',
|
|
155
|
+
mediumturquoise: '#48d1cc',
|
|
156
|
+
mediumvioletred: '#c71585',
|
|
157
|
+
midnightblue: '#191970',
|
|
158
|
+
mintcream: '#f5fffa',
|
|
159
|
+
mistyrose: '#ffe4e1',
|
|
160
|
+
moccasin: '#ffe4b5',
|
|
161
|
+
navajowhite: '#ffdead',
|
|
162
|
+
navy: '#000080',
|
|
163
|
+
oldlace: '#fdf5e6',
|
|
164
|
+
olive: '#808000',
|
|
165
|
+
olivedrab: '#6b8e23',
|
|
166
|
+
orange: '#ffa500',
|
|
167
|
+
orangered: '#ff4500',
|
|
168
|
+
orchid: '#da70d6',
|
|
169
|
+
palegoldenrod: '#eee8aa',
|
|
170
|
+
palegreen: '#98fb98',
|
|
171
|
+
paleturquoise: '#afeeee',
|
|
172
|
+
palevioletred: '#db7093',
|
|
173
|
+
papayawhip: '#ffefd5',
|
|
174
|
+
peachpuff: '#ffdab9',
|
|
175
|
+
peru: '#cd853f',
|
|
176
|
+
pink: '#ffc0cb',
|
|
177
|
+
plum: '#dda0dd',
|
|
178
|
+
powderblue: '#b0e0e6',
|
|
179
|
+
purple: '#800080',
|
|
180
|
+
rebeccapurple: '#663399',
|
|
181
|
+
rosybrown: '#bc8f8f',
|
|
182
|
+
royalblue: '#4169e1',
|
|
183
|
+
saddlebrown: '#8b4513',
|
|
184
|
+
salmon: '#fa8072',
|
|
185
|
+
sandybrown: '#f4a460',
|
|
186
|
+
seagreen: '#2e8b57',
|
|
187
|
+
seashell: '#fff5ee',
|
|
188
|
+
sienna: '#a0522d',
|
|
189
|
+
silver: '#c0c0c0',
|
|
190
|
+
skyblue: '#87ceeb',
|
|
191
|
+
slateblue: '#6a5acd',
|
|
192
|
+
slategray: '#708090',
|
|
193
|
+
slategrey: '#708090',
|
|
194
|
+
snow: '#fffafa',
|
|
195
|
+
springgreen: '#00ff7f',
|
|
196
|
+
steelblue: '#4682b4',
|
|
197
|
+
tan: '#d2b48c',
|
|
198
|
+
teal: '#008080',
|
|
199
|
+
thistle: '#d8bfd8',
|
|
200
|
+
tomato: '#ff6347',
|
|
201
|
+
turquoise: '#40e0d0',
|
|
202
|
+
violet: '#ee82ee',
|
|
203
|
+
wheat: '#f5deb3',
|
|
204
|
+
whitesmoke: '#f5f5f5',
|
|
205
|
+
yellowgreen: '#9acd32',
|
|
206
|
+
};
|
|
207
|
+
// Define the set of Ink's named colors for quick lookup
|
|
208
|
+
static inkSupportedNames = new Set([
|
|
209
|
+
'black',
|
|
210
|
+
'red',
|
|
211
|
+
'green',
|
|
212
|
+
'yellow',
|
|
213
|
+
'blue',
|
|
214
|
+
'cyan',
|
|
215
|
+
'magenta',
|
|
216
|
+
'white',
|
|
217
|
+
'gray',
|
|
218
|
+
'grey',
|
|
219
|
+
'blackbright',
|
|
220
|
+
'redbright',
|
|
221
|
+
'greenbright',
|
|
222
|
+
'yellowbright',
|
|
223
|
+
'bluebright',
|
|
224
|
+
'cyanbright',
|
|
225
|
+
'magentabright',
|
|
226
|
+
'whitebright',
|
|
227
|
+
]);
|
|
228
|
+
/**
|
|
229
|
+
* Creates a new Theme instance.
|
|
230
|
+
* @param name The name of the theme.
|
|
231
|
+
* @param rawMappings The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
232
|
+
*/
|
|
233
|
+
constructor(name, type, rawMappings, colors) {
|
|
234
|
+
this.name = name;
|
|
235
|
+
this.type = type;
|
|
236
|
+
this.colors = colors;
|
|
237
|
+
this._colorMap = Object.freeze(this._buildColorMap(rawMappings)); // Build and freeze the map
|
|
238
|
+
// Determine the default foreground color
|
|
239
|
+
const rawDefaultColor = rawMappings['hljs']?.color;
|
|
240
|
+
this.defaultColor =
|
|
241
|
+
(rawDefaultColor ? Theme._resolveColor(rawDefaultColor) : undefined) ??
|
|
242
|
+
''; // Default to empty string if not found or resolvable
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets the Ink-compatible color string for a given highlight.js class name.
|
|
246
|
+
* @param hljsClass The highlight.js class name (e.g., 'hljs-keyword', 'hljs-string').
|
|
247
|
+
* @returns The corresponding Ink color string (hex or name) if it exists.
|
|
248
|
+
*/
|
|
249
|
+
getInkColor(hljsClass) {
|
|
250
|
+
return this._colorMap[hljsClass];
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Resolves a CSS color value (name or hex) into an Ink-compatible color string.
|
|
254
|
+
* @param colorValue The raw color string (e.g., 'blue', '#ff0000', 'darkkhaki').
|
|
255
|
+
* @returns An Ink-compatible color string (hex or name), or undefined if not resolvable.
|
|
256
|
+
*/
|
|
257
|
+
static _resolveColor(colorValue) {
|
|
258
|
+
const lowerColor = colorValue.toLowerCase();
|
|
259
|
+
// 1. Check if it's already a hex code
|
|
260
|
+
if (lowerColor.startsWith('#')) {
|
|
261
|
+
return lowerColor; // Use hex directly
|
|
262
|
+
}
|
|
263
|
+
// 2. Check if it's an Ink supported name (lowercase)
|
|
264
|
+
else if (Theme.inkSupportedNames.has(lowerColor)) {
|
|
265
|
+
return lowerColor; // Use Ink name directly
|
|
266
|
+
}
|
|
267
|
+
// 3. Check if it's a known CSS name we can map to hex
|
|
268
|
+
else if (Theme.cssNameToHexMap[lowerColor]) {
|
|
269
|
+
return Theme.cssNameToHexMap[lowerColor]; // Use mapped hex
|
|
270
|
+
}
|
|
271
|
+
// 4. Could not resolve
|
|
272
|
+
console.warn(`[Theme] Could not resolve color "${colorValue}" to an Ink-compatible format.`);
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Builds the internal map from highlight.js class names to Ink-compatible color strings.
|
|
277
|
+
* This method is protected and primarily intended for use by the constructor.
|
|
278
|
+
* @param hljsTheme The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
279
|
+
* @returns An Ink-compatible theme map (Record<string, string>).
|
|
280
|
+
*/
|
|
281
|
+
_buildColorMap(hljsTheme) {
|
|
282
|
+
const inkTheme = {};
|
|
283
|
+
for (const key in hljsTheme) {
|
|
284
|
+
// Ensure the key starts with 'hljs-' or is 'hljs' for the base style
|
|
285
|
+
if (!key.startsWith('hljs-') && key !== 'hljs') {
|
|
286
|
+
continue; // Skip keys not related to highlighting classes
|
|
287
|
+
}
|
|
288
|
+
const style = hljsTheme[key];
|
|
289
|
+
if (style?.color) {
|
|
290
|
+
const resolvedColor = Theme._resolveColor(style.color);
|
|
291
|
+
if (resolvedColor !== undefined) {
|
|
292
|
+
// Use the original key from the hljsTheme (e.g., 'hljs-keyword')
|
|
293
|
+
inkTheme[key] = resolvedColor;
|
|
294
|
+
}
|
|
295
|
+
// If color is not resolvable, it's omitted from the map,
|
|
296
|
+
// allowing fallback to the default foreground color.
|
|
297
|
+
}
|
|
298
|
+
// We currently only care about the 'color' property for Ink rendering.
|
|
299
|
+
// Other properties like background, fontStyle, etc., are ignored.
|
|
300
|
+
}
|
|
301
|
+
return inkTheme;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/ui/themes/theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAgB;IACpC,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,SA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+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Theme } from './theme.js';
|
|
7
|
+
const xcodeColors = {
|
|
8
|
+
type: 'light',
|
|
9
|
+
Background: '#fff',
|
|
10
|
+
Foreground: 'black',
|
|
11
|
+
LightBlue: '#0E0EFF',
|
|
12
|
+
AccentBlue: '#1c00cf',
|
|
13
|
+
AccentPurple: '#aa0d91',
|
|
14
|
+
AccentCyan: '#3F6E74',
|
|
15
|
+
AccentGreen: '#007400',
|
|
16
|
+
AccentYellow: '#836C28',
|
|
17
|
+
AccentRed: '#c41a16',
|
|
18
|
+
Comment: '#007400',
|
|
19
|
+
Gray: '#c0c0c0',
|
|
20
|
+
GradientColors: ['#1c00cf', '#007400'],
|
|
21
|
+
};
|
|
22
|
+
export const XCode = new Theme('Xcode', 'light', {
|
|
23
|
+
hljs: {
|
|
24
|
+
display: 'block',
|
|
25
|
+
overflowX: 'auto',
|
|
26
|
+
padding: '0.5em',
|
|
27
|
+
background: xcodeColors.Background,
|
|
28
|
+
color: xcodeColors.Foreground,
|
|
29
|
+
},
|
|
30
|
+
'xml .hljs-meta': {
|
|
31
|
+
color: xcodeColors.Gray,
|
|
32
|
+
},
|
|
33
|
+
'hljs-comment': {
|
|
34
|
+
color: xcodeColors.Comment,
|
|
35
|
+
},
|
|
36
|
+
'hljs-quote': {
|
|
37
|
+
color: xcodeColors.Comment,
|
|
38
|
+
},
|
|
39
|
+
'hljs-tag': {
|
|
40
|
+
color: xcodeColors.AccentPurple,
|
|
41
|
+
},
|
|
42
|
+
'hljs-attribute': {
|
|
43
|
+
color: xcodeColors.AccentPurple,
|
|
44
|
+
},
|
|
45
|
+
'hljs-keyword': {
|
|
46
|
+
color: xcodeColors.AccentPurple,
|
|
47
|
+
},
|
|
48
|
+
'hljs-selector-tag': {
|
|
49
|
+
color: xcodeColors.AccentPurple,
|
|
50
|
+
},
|
|
51
|
+
'hljs-literal': {
|
|
52
|
+
color: xcodeColors.AccentPurple,
|
|
53
|
+
},
|
|
54
|
+
'hljs-name': {
|
|
55
|
+
color: xcodeColors.AccentPurple,
|
|
56
|
+
},
|
|
57
|
+
'hljs-variable': {
|
|
58
|
+
color: xcodeColors.AccentCyan,
|
|
59
|
+
},
|
|
60
|
+
'hljs-template-variable': {
|
|
61
|
+
color: xcodeColors.AccentCyan,
|
|
62
|
+
},
|
|
63
|
+
'hljs-code': {
|
|
64
|
+
color: xcodeColors.AccentRed,
|
|
65
|
+
},
|
|
66
|
+
'hljs-string': {
|
|
67
|
+
color: xcodeColors.AccentRed,
|
|
68
|
+
},
|
|
69
|
+
'hljs-meta-string': {
|
|
70
|
+
color: xcodeColors.AccentRed,
|
|
71
|
+
},
|
|
72
|
+
'hljs-regexp': {
|
|
73
|
+
color: xcodeColors.LightBlue,
|
|
74
|
+
},
|
|
75
|
+
'hljs-link': {
|
|
76
|
+
color: xcodeColors.LightBlue,
|
|
77
|
+
},
|
|
78
|
+
'hljs-title': {
|
|
79
|
+
color: xcodeColors.AccentBlue,
|
|
80
|
+
},
|
|
81
|
+
'hljs-symbol': {
|
|
82
|
+
color: xcodeColors.AccentBlue,
|
|
83
|
+
},
|
|
84
|
+
'hljs-bullet': {
|
|
85
|
+
color: xcodeColors.AccentBlue,
|
|
86
|
+
},
|
|
87
|
+
'hljs-number': {
|
|
88
|
+
color: xcodeColors.AccentBlue,
|
|
89
|
+
},
|
|
90
|
+
'hljs-section': {
|
|
91
|
+
color: xcodeColors.AccentYellow,
|
|
92
|
+
},
|
|
93
|
+
'hljs-meta': {
|
|
94
|
+
color: xcodeColors.AccentYellow,
|
|
95
|
+
},
|
|
96
|
+
'hljs-class .hljs-title': {
|
|
97
|
+
color: xcodeColors.AccentPurple,
|
|
98
|
+
},
|
|
99
|
+
'hljs-type': {
|
|
100
|
+
color: xcodeColors.AccentPurple,
|
|
101
|
+
},
|
|
102
|
+
'hljs-built_in': {
|
|
103
|
+
color: xcodeColors.AccentPurple,
|
|
104
|
+
},
|
|
105
|
+
'hljs-builtin-name': {
|
|
106
|
+
color: xcodeColors.AccentPurple,
|
|
107
|
+
},
|
|
108
|
+
'hljs-params': {
|
|
109
|
+
color: xcodeColors.AccentPurple,
|
|
110
|
+
},
|
|
111
|
+
'hljs-attr': {
|
|
112
|
+
color: xcodeColors.AccentYellow,
|
|
113
|
+
},
|
|
114
|
+
'hljs-subst': {
|
|
115
|
+
color: xcodeColors.Foreground,
|
|
116
|
+
},
|
|
117
|
+
'hljs-formula': {
|
|
118
|
+
backgroundColor: '#eee',
|
|
119
|
+
fontStyle: 'italic',
|
|
120
|
+
},
|
|
121
|
+
'hljs-addition': {
|
|
122
|
+
backgroundColor: '#baeeba',
|
|
123
|
+
},
|
|
124
|
+
'hljs-deletion': {
|
|
125
|
+
backgroundColor: '#ffc8bd',
|
|
126
|
+
},
|
|
127
|
+
'hljs-selector-id': {
|
|
128
|
+
color: xcodeColors.AccentYellow,
|
|
129
|
+
},
|
|
130
|
+
'hljs-selector-class': {
|
|
131
|
+
color: xcodeColors.AccentYellow,
|
|
132
|
+
},
|
|
133
|
+
'hljs-doctag': {
|
|
134
|
+
fontWeight: 'bold',
|
|
135
|
+
},
|
|
136
|
+
'hljs-strong': {
|
|
137
|
+
fontWeight: 'bold',
|
|
138
|
+
},
|
|
139
|
+
'hljs-emphasis': {
|
|
140
|
+
fontStyle: 'italic',
|
|
141
|
+
},
|
|
142
|
+
}, xcodeColors);
|
|
143
|
+
//# sourceMappingURL=xcode.js.map
|