From 10559c8f4f0b3178bed6084c4da0f4c6f6c0e8dd Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 7 May 2026 15:50:10 -0700 Subject: [PATCH] Split codebase (#455) --- .claude-context.md | 14 +- .gitattributes | 4 +- .github/workflows/release-app.yml | 11 +- .github/workflows/release-cli-npm.yml | 6 +- .gitignore | 3 +- .oxfmtignore | 3 + .oxfmtrc.json | 6 +- Cargo.lock | 153 +- Cargo.toml | 19 +- README.md | 2 +- {src-web => apps/yaak-client}/.gitignore | 0 .../yaak-client}/commands/commands.tsx | 6 +- .../commands/createEnvironment.tsx | 0 .../commands/deleteWebsocketConnections.ts | 0 .../yaak-client}/commands/moveToWorkspace.tsx | 0 .../commands/openFolderSettings.tsx | 0 .../yaak-client}/commands/openSettings.tsx | 0 .../commands/openWorkspaceFromSyncDir.tsx | 0 .../commands/openWorkspaceSettings.tsx | 0 .../yaak-client}/commands/switchWorkspace.tsx | 0 .../components/BinaryFileEditor.tsx | 4 +- .../yaak-client}/components/CargoFeature.tsx | 0 .../components/CloneGitRepositoryDialog.tsx | 3 +- .../components/ColorIndicator.tsx | 0 .../components/CommandPaletteDialog.tsx | 4 +- .../components/ConfirmLargeRequestBody.tsx | 4 +- .../components/ConfirmLargeResponse.tsx | 4 +- .../ConfirmLargeResponseRequest.tsx | 4 +- .../yaak-client}/components/CookieDialog.tsx | 3 +- .../components/CookieDropdown.tsx | 3 +- .../yaak-client}/components/CopyButton.tsx | 2 +- .../components/CopyIconButton.tsx | 4 +- .../components/CreateDropdown.tsx | 0 .../components/CreateEnvironmentDialog.tsx | 0 .../components/CreateWorkspaceDialog.tsx | 2 +- .../yaak-client}/components/Dialogs.tsx | 0 .../components/DnsOverridesEditor.tsx | 14 +- .../yaak-client}/components/DropMarker.tsx | 0 .../yaak-client}/components/DynamicForm.tsx | 3 +- .../components/EmptyStateText.tsx | 0 .../components/EncryptionHelp.tsx | 2 +- .../components/EnvironmentActionsDropdown.tsx | 2 +- .../components/EnvironmentColorIndicator.tsx | 0 .../components/EnvironmentColorPicker.tsx | 2 +- .../components/EnvironmentEditDialog.tsx | 137 +- .../components/EnvironmentEditor.tsx | 2 +- .../components/EnvironmentSharableTooltip.tsx | 0 .../yaak-client}/components/ErrorBoundary.tsx | 4 +- .../components/ExportDataDialog.tsx | 2 +- .../yaak-client}/components/FolderLayout.tsx | 8 +- .../components/FolderSettingsDialog.tsx | 4 +- .../components/FormMultipartEditor.tsx | 0 .../components/FormUrlencodedEditor.tsx | 0 .../yaak-client}/components/GlobalHooks.tsx | 0 .../components/GrpcConnectionLayout.tsx | 8 +- .../yaak-client}/components/GrpcEditor.tsx | 6 +- .../components/GrpcProtoSelectionDialog.tsx | 9 +- .../components/GrpcRequestPane.tsx | 4 +- .../components/GrpcResponsePane.tsx | 6 +- .../yaak-client}/components/HeadersEditor.tsx | 2 +- .../components/HttpAuthenticationEditor.tsx | 4 +- .../components/HttpRequestLayout.tsx | 11 +- .../components/HttpRequestPane.tsx | 2 +- .../components/HttpResponsePane.tsx | 5 +- .../components/HttpResponseTimeline.tsx | 4 +- .../components/ImportCurlButton.tsx | 8 +- .../components/ImportDataDialog.tsx | 2 +- .../yaak-client}/components/IsDev.tsx | 0 .../components/JsonBodyEditor.tsx | 5 +- .../components/KeyboardShortcutsDialog.tsx | 0 .../yaak-client}/components/LicenseBadge.tsx | 2 +- .../yaak-client}/components/LocalImage.tsx | 0 .../yaak-client}/components/Markdown.tsx | 0 .../components/MarkdownEditor.tsx | 0 .../components/MoveToWorkspaceDialog.tsx | 3 +- .../yaak-client}/components/Prose.css | 0 .../yaak-client}/components/Prose.tsx | 0 .../RecentGrpcConnectionsDropdown.tsx | 3 +- .../RecentHttpResponsesDropdown.tsx | 3 +- .../components/RecentRequestsDropdown.tsx | 0 .../RecentWebsocketConnectionsDropdown.tsx | 3 +- .../components/RedirectToLatestWorkspace.tsx | 0 .../components/RequestBodyViewer.tsx | 2 +- .../components/RequestMethodDropdown.tsx | 2 +- .../components/ResponseCookies.tsx | 0 .../components/ResponseHeaders.tsx | 0 .../yaak-client}/components/ResponseInfo.tsx | 0 .../yaak-client}/components/RouteError.tsx | 7 +- .../yaak-client}/components/SelectFile.tsx | 2 +- .../components/Settings/Settings.tsx | 8 +- .../Settings/SettingsCertificates.tsx | 4 +- .../components/Settings/SettingsGeneral.tsx | 3 +- .../components/Settings/SettingsHotkeys.tsx | 16 +- .../components/Settings/SettingsInterface.tsx | 6 +- .../components/Settings/SettingsLicense.tsx | 4 +- .../components/Settings/SettingsPlugins.tsx | 19 +- .../components/Settings/SettingsProxy.tsx | 5 +- .../components/Settings/SettingsTheme.tsx | 5 +- .../components/SettingsDropdown.tsx | 2 +- .../yaak-client}/components/Sidebar.tsx | 283 +- .../components/SidebarActions.tsx | 20 +- .../components/SwitchWorkspaceDialog.tsx | 4 +- .../components/SyncToFilesystemSetting.tsx | 3 +- .../components/TemplateFunctionDialog.tsx | 5 +- .../yaak-client}/components/Toasts.tsx | 2 +- .../yaak-client}/components/UrlBar.tsx | 4 +- .../components/UrlParameterEditor.tsx | 2 +- .../components/WebsocketRequestLayout.tsx | 7 +- .../components/WebsocketRequestPane.tsx | 0 .../components/WebsocketResponsePane.tsx | 6 +- .../yaak-client}/components/Workspace.tsx | 196 +- .../components/WorkspaceActionsDropdown.tsx | 2 +- .../components/WorkspaceEncryptionSetting.tsx | 9 +- .../components/WorkspaceHeader.tsx | 11 +- .../components/WorkspaceSettingsDialog.tsx | 4 +- .../yaak-client}/components/core/Alert.tsx | 2 +- .../components/core/AutoScroller.tsx | 0 .../components/core/BulkPairEditor.tsx | 0 apps/yaak-client/components/core/Button.tsx | 34 + .../components/core/ButtonInfiniteLoading.tsx | 0 .../yaak-client}/components/core/Checkbox.tsx | 3 +- .../components/core/ColorPicker.tsx | 2 +- .../yaak-client}/components/core/Confirm.tsx | 2 +- .../components/core/CountBadge.tsx | 0 .../components/core/DetailsBanner.tsx | 4 +- .../yaak-client}/components/core/Dialog.tsx | 5 +- .../components/core/DismissibleBanner.tsx | 5 +- .../yaak-client}/components/core/Dropdown.tsx | 15 +- .../core/Editor/BetterMatchDecorator.ts | 0 .../components/core/Editor/DiffViewer.css | 0 .../components/core/Editor/DiffViewer.tsx | 0 .../components/core/Editor/Editor.css | 0 .../components/core/Editor/Editor.tsx | 2 +- .../components/core/Editor/LazyEditor.tsx | 0 .../components/core/Editor/extensions.ts | 0 .../core/Editor/filter/extension.ts | 0 .../core/Editor/filter/filter.grammar | 0 .../components/core/Editor/filter/filter.ts | 0 .../core/Editor/filter/highlight.ts | 0 .../components/core/Editor/filter/query.ts | 0 .../core/Editor/genericCompletion.ts | 0 .../core/Editor/hyperlink/extension.ts | 0 .../components/core/Editor/json-lint.ts | 0 .../components/core/Editor/pairs/extension.ts | 0 .../components/core/Editor/pairs/highlight.ts | 0 .../core/Editor/pairs/pairs.grammar | 0 .../core/Editor/pairs/pairs.terms.ts | 0 .../components/core/Editor/pairs/pairs.ts | 0 .../core/Editor/searchMatchCount.ts | 0 .../components/core/Editor/singleLine.ts | 0 .../components/core/Editor/text/extension.ts | 0 .../components/core/Editor/text/text.grammar | 0 .../components/core/Editor/text/text.terms.ts | 0 .../components/core/Editor/text/text.ts | 0 .../core/Editor/timeline/extension.ts | 0 .../core/Editor/timeline/highlight.ts | 0 .../core/Editor/timeline/timeline.grammar | 0 .../core/Editor/timeline/timeline.terms.ts | 0 .../core/Editor/timeline/timeline.ts | 0 .../components/core/Editor/twig/completion.ts | 0 .../components/core/Editor/twig/extension.ts | 0 .../components/core/Editor/twig/highlight.ts | 0 .../core/Editor/twig/pathParameters.ts | 0 .../core/Editor/twig/templateTags.ts | 0 .../components/core/Editor/twig/twig.grammar | 0 .../components/core/Editor/twig/twig.terms.ts | 0 .../components/core/Editor/twig/twig.test.ts | 0 .../components/core/Editor/twig/twig.ts | 0 .../components/core/Editor/twig/util.ts | 0 .../components/core/Editor/url/completion.ts | 0 .../components/core/Editor/url/extension.ts | 0 .../components/core/Editor/url/highlight.ts | 0 .../components/core/Editor/url/url.grammar | 0 .../components/core/Editor/url/url.terms.ts | 0 .../components/core/Editor/url/url.ts | 0 .../components/core/EventViewer.tsx | 16 +- .../components/core/EventViewerRow.tsx | 0 .../yaak-client}/components/core/Hotkey.tsx | 2 +- .../components/core/HotkeyLabel.tsx | 0 .../components/core/HotkeyList.tsx | 0 .../components/core/HttpMethodTag.tsx | 0 .../core/HttpResponseDurationTag.tsx | 0 .../components/core/HttpStatusTag.tsx | 0 .../components/core/IconButton.tsx | 37 + .../components/core/IconTooltip.tsx | 3 +- .../yaak-client}/components/core/Input.tsx | 4 +- .../components/core/JsonAttributeTree.tsx | 8 +- .../components/core/KeyValueRow.tsx | 0 .../yaak-client}/components/core/Label.tsx | 0 .../yaak-client}/components/core/Link.tsx | 2 +- .../components/core/PairEditor.tsx | 5 +- .../components/core/PairEditor.util.tsx | 0 .../components/core/PairOrBulkEditor.tsx | 0 .../components/core/PillButton.tsx | 0 .../components/core/PlainInput.tsx | 2 +- .../yaak-client}/components/core/Prompt.tsx | 2 +- .../components/core/RadioCards.tsx | 0 .../components/core/RadioDropdown.tsx | 2 +- .../components/core/SegmentedControl.tsx | 12 +- .../yaak-client}/components/core/Select.tsx | 2 +- .../components/core/Separator.tsx | 0 .../yaak-client}/components/core/SizeTag.tsx | 0 .../components/core/Tabs/Tabs.tsx | 5 +- .../yaak-client}/components/core/Toast.tsx | 5 +- .../yaak-client}/components/core/Tooltip.tsx | 2 +- .../components/core/WebsocketStatusTag.tsx | 0 .../components/git/BranchSelectionDialog.tsx | 2 +- .../components/git/GitCommitDialog.tsx | 10 +- .../components/git/GitDropdown.tsx | 6 +- .../components/git/GitRemotesDialog.tsx | 9 +- .../components/git/HistoryDialog.tsx | 6 +- .../yaak-client}/components/git/callbacks.tsx | 0 .../components/git/credentials.tsx | 3 +- .../yaak-client}/components/git/diverged.tsx | 3 +- .../yaak-client}/components/git/git-util.ts | 0 .../components/git/showAddRemoteDialog.tsx | 0 .../components/git/uncommitted.tsx | 0 .../graphql/GraphQLDocsExplorer.tsx | 24 +- .../components/graphql/GraphQLEditor.tsx | 4 +- .../components/graphql/graphqlAtoms.ts | 0 .../responseViewers/AudioViewer.tsx | 0 .../responseViewers/BinaryViewer.tsx | 4 +- .../components/responseViewers/CsvViewer.tsx | 9 +- .../responseViewers/EventStreamViewer.tsx | 6 +- .../responseViewers/HTMLOrTextViewer.tsx | 0 .../responseViewers/ImageViewer.tsx | 0 .../components/responseViewers/JsonViewer.tsx | 0 .../responseViewers/MultipartViewer.tsx | 4 +- .../components/responseViewers/PdfViewer.css | 0 .../components/responseViewers/PdfViewer.tsx | 2 +- .../components/responseViewers/SvgViewer.tsx | 0 .../components/responseViewers/TextViewer.tsx | 2 +- .../responseViewers/VideoViewer.tsx | 0 .../responseViewers/WebPageViewer.tsx | 0 {src-web => apps/yaak-client}/font-size.ts | 0 {src-web => apps/yaak-client}/font.ts | 0 .../yaak-client}/hooks/useActiveCookieJar.ts | 0 .../hooks/useActiveEnvironment.ts | 0 .../hooks/useActiveEnvironmentVariables.ts | 0 .../yaak-client}/hooks/useActiveFolder.ts | 0 .../yaak-client}/hooks/useActiveFolderId.ts | 0 .../yaak-client}/hooks/useActiveRequest.ts | 0 .../yaak-client}/hooks/useActiveRequestId.ts | 0 .../yaak-client}/hooks/useActiveWorkspace.ts | 0 .../hooks/useActiveWorkspaceChangedToast.tsx | 2 +- .../yaak-client}/hooks/useAllRequests.ts | 0 .../yaak-client}/hooks/useAuthTab.tsx | 4 +- .../hooks/useCancelHttpResponse.ts | 0 .../yaak-client}/hooks/useCheckForUpdates.tsx | 2 +- .../yaak-client}/hooks/useClickOutside.ts | 0 .../yaak-client}/hooks/useCopyHttpResponse.ts | 0 .../yaak-client}/hooks/useCreateCookieJar.ts | 0 .../hooks/useCreateDropdownItems.tsx | 2 +- .../yaak-client}/hooks/useCreateWorkspace.tsx | 0 .../hooks/useDeleteGrpcConnections.ts | 0 .../hooks/useDeleteHttpResponses.ts | 0 .../hooks/useDeleteSendHistory.tsx | 0 .../hooks/useEnvironmentValueVisibility.ts | 0 .../hooks/useEnvironmentVariables.ts | 0 .../hooks/useEnvironmentsBreakdown.ts | 0 .../hooks/useEventViewerKeyboard.ts | 0 .../yaak-client}/hooks/useExportData.tsx | 0 .../yaak-client}/hooks/useFastMutation.ts | 0 .../hooks/useFloatingSidebarHidden.ts | 0 .../yaak-client}/hooks/useFolderActions.ts | 0 .../yaak-client}/hooks/useFormatText.ts | 0 .../yaak-client}/hooks/useGrpc.ts | 2 +- .../yaak-client}/hooks/useGrpcProtoFiles.ts | 0 .../hooks/useGrpcRequestActions.ts | 0 .../yaak-client}/hooks/useHeadersTab.tsx | 0 .../yaak-client}/hooks/useHotKey.ts | 0 .../hooks/useHttpAuthentication.ts | 0 .../hooks/useHttpAuthenticationConfig.ts | 0 .../hooks/useHttpRequestActions.ts | 0 .../yaak-client}/hooks/useHttpRequestBody.ts | 0 .../hooks/useHttpResponseEvents.ts | 0 .../yaak-client}/hooks/useImportCurl.ts | 0 .../hooks/useInheritedAuthentication.ts | 0 .../yaak-client}/hooks/useInheritedHeaders.ts | 0 .../yaak-client}/hooks/useInstallPlugin.ts | 0 .../hooks/useIntrospectGraphQL.ts | 2 +- .../hooks/useIsEncryptionEnabled.ts | 0 .../yaak-client}/hooks/useKeyValue.ts | 0 .../yaak-client}/hooks/useKeyboardEvent.ts | 0 .../hooks/useLatestGrpcConnection.ts | 0 .../hooks/useLatestHttpResponse.ts | 0 .../hooks/useListenToTauriEvent.ts | 0 .../yaak-client}/hooks/useModelAncestors.ts | 0 .../yaak-client}/hooks/useParentFolders.ts | 0 .../hooks/usePinnedGrpcConnection.ts | 0 .../hooks/usePinnedHttpResponse.ts | 0 .../hooks/usePinnedWebsocketConnection.ts | 0 .../yaak-client}/hooks/usePluginInfo.ts | 0 .../yaak-client}/hooks/usePlugins.ts | 2 +- .../hooks/usePreferredAppearance.ts | 0 .../yaak-client}/hooks/useRandomKey.ts | 0 .../yaak-client}/hooks/useRecentCookieJars.ts | 0 .../hooks/useRecentEnvironments.ts | 0 .../yaak-client}/hooks/useRecentRequests.ts | 0 .../yaak-client}/hooks/useRecentWorkspaces.ts | 0 .../yaak-client}/hooks/useRenderTemplate.ts | 0 .../yaak-client}/hooks/useRequestEditor.tsx | 0 .../yaak-client}/hooks/useRequestUpdateKey.ts | 0 .../hooks/useResolvedAppearance.ts | 0 .../yaak-client}/hooks/useResolvedTheme.ts | 0 .../hooks/useResponseBodyEventSource.ts | 0 .../yaak-client}/hooks/useResponseBodyText.ts | 0 .../yaak-client}/hooks/useResponseViewMode.ts | 0 .../yaak-client}/hooks/useSaveResponse.tsx | 2 +- .../yaak-client}/hooks/useScrollIntoView.ts | 0 .../hooks/useSendAnyHttpRequest.ts | 0 .../yaak-client}/hooks/useSendManyRequests.ts | 0 .../yaak-client}/hooks/useSidebarHidden.ts | 0 .../hooks/useSidebarItemCollapsed.ts | 0 .../yaak-client}/hooks/useSidebarWidth.ts | 0 .../yaak-client}/hooks/useStateWithDeps.ts | 0 .../hooks/useStoplightsVisible.ts | 2 +- .../hooks/useSyncFontSizeSetting.ts | 0 .../hooks/useSyncWorkspaceChildModels.ts | 0 .../hooks/useSyncWorkspaceRequestTitle.ts | 0 .../yaak-client}/hooks/useSyncZoomSetting.ts | 0 .../hooks/useTemplateFunctionConfig.ts | 0 .../hooks/useTemplateFunctions.tsx | 0 .../hooks/useTemplateTokensToString.ts | 0 .../yaak-client}/hooks/useTimelineViewMode.ts | 0 .../yaak-client}/hooks/useToggle.ts | 0 .../hooks/useToggleCommandPalette.tsx | 0 .../hooks/useWebsocketRequestActions.ts | 0 .../yaak-client}/hooks/useWindowFocus.ts | 0 .../yaak-client}/hooks/useWorkspaceActions.ts | 0 .../yaak-client}/hooks/useZoom.ts | 0 {src-web => apps/yaak-client}/index.html | 0 {src-web => apps/yaak-client}/init/sync.ts | 0 {src-web => apps/yaak-client}/lib/alert.ts | 0 {src-web => apps/yaak-client}/lib/appInfo.ts | 0 {src-web => apps/yaak-client}/lib/atoms.ts | 4 +- .../lib/atoms/atomWithKVStorage.ts | 0 .../yaak-client}/lib/capitalize.ts | 0 {src-web => apps/yaak-client}/lib/color.ts | 0 {src-web => apps/yaak-client}/lib/confirm.ts | 0 .../yaak-client}/lib/contentType.ts | 0 {src-web => apps/yaak-client}/lib/copy.ts | 0 .../lib/createRequestAndNavigate.tsx | 0 .../yaak-client}/lib/data/charsets.ts | 0 .../yaak-client}/lib/data/connections.ts | 0 .../yaak-client}/lib/data/encodings.ts | 0 .../yaak-client}/lib/data/headerNames.ts | 0 .../yaak-client}/lib/data/mimetypes.ts | 0 .../yaak-client}/lib/defaultHeaders.ts | 0 .../lib/deleteModelWithConfirm.tsx | 2 +- {src-web => apps/yaak-client}/lib/dialog.ts | 0 {src-web => apps/yaak-client}/lib/diffYaml.ts | 0 {src-web => apps/yaak-client}/lib/dnd.ts | 0 .../duplicateRequestOrFolderAndNavigate.tsx | 0 .../yaak-client}/lib/editEnvironment.tsx | 0 .../yaak-client}/lib/encryption.ts | 0 .../yaak-client}/lib/fireAndForget.ts | 0 .../yaak-client}/lib/formatters.ts | 0 .../yaak-client}/lib/generateId.ts | 0 .../yaak-client}/lib/getNodeText.ts | 0 .../yaak-client}/lib/importData.tsx | 3 +- .../yaak-client}/lib/initGlobalListeners.tsx | 63 +- {src-web => apps/yaak-client}/lib/jotai.ts | 0 .../yaak-client}/lib/jsonComments.ts | 0 .../yaak-client}/lib/keyValueStore.ts | 0 {src-web => apps/yaak-client}/lib/markdown.ts | 0 .../yaak-client}/lib/minPromiseMillis.ts | 0 .../yaak-client}/lib/model_util.test.ts | 0 .../yaak-client}/lib/model_util.ts | 0 .../yaak-client}/lib/pluralize.ts | 0 .../lib/prepareImportQuerystring.ts | 0 .../yaak-client}/lib/prompt-form.tsx | 0 {src-web => apps/yaak-client}/lib/prompt.ts | 0 .../yaak-client}/lib/queryClient.ts | 0 .../lib/renameModelWithPrompt.tsx | 2 +- .../yaak-client}/lib/resolvedModelName.ts | 0 .../yaak-client}/lib/responseBody.ts | 0 {src-web => apps/yaak-client}/lib/reveal.ts | 0 {src-web => apps/yaak-client}/lib/router.ts | 0 {src-web => apps/yaak-client}/lib/scopes.ts | 0 .../yaak-client}/lib/sendEphemeralRequest.ts | 0 .../lib/setWorkspaceSearchParams.ts | 0 {src-web => apps/yaak-client}/lib/settings.ts | 0 .../lib/setupOrConfigureEncryption.tsx | 2 +- .../yaak-client}/lib/showColorPicker.tsx | 0 {src-web => apps/yaak-client}/lib/sleep.ts | 0 {src-web => apps/yaak-client}/lib/tauri.ts | 0 apps/yaak-client/lib/theme/appearance.ts | 8 + apps/yaak-client/lib/theme/themes.ts | 35 + apps/yaak-client/lib/theme/window.ts | 9 + apps/yaak-client/lib/theme/yaakColor.ts | 1 + {src-web => apps/yaak-client}/lib/toast.tsx | 0 {src-web => apps/yaak-client}/lib/truncate.ts | 0 {src-web => apps/yaak-client}/main.css | 0 {src-web => apps/yaak-client}/main.tsx | 3 +- {src-web => apps/yaak-client}/modules.d.ts | 0 {src-web => apps/yaak-client}/package.json | 19 +- .../yaak-client}/postcss.config.cjs | 0 .../yaak-client}/routeTree.gen.ts | 0 .../yaak-client}/routes/__root.tsx | 0 .../yaak-client}/routes/index.tsx | 0 .../routes/workspaces/$workspaceId/index.tsx | 0 .../$workspaceId/requests/$requestId.tsx | 0 .../workspaces/$workspaceId/settings.tsx | 0 .../yaak-client}/routes/workspaces/index.tsx | 0 apps/yaak-client/tailwind.config.cjs | 16 + {src-web => apps/yaak-client}/theme.ts | 5 +- {src-web => apps/yaak-client}/tsconfig.json | 10 +- .../yaak-client}/tsconfig.node.json | 0 {src-web => apps/yaak-client}/tsr.config.json | 0 {src-web => apps/yaak-client}/vite-env.d.ts | 0 apps/yaak-client/vite.config.ts | 61 + apps/yaak-proxy/components/ActionButton.tsx | 31 + .../components/ActionIconButton.tsx | 29 + apps/yaak-proxy/components/ExchangesTable.tsx | 77 + apps/yaak-proxy/components/ProxyLayout.tsx | 146 + apps/yaak-proxy/components/Sidebar.tsx | 219 ++ apps/yaak-proxy/font-size.ts | 2 + apps/yaak-proxy/hooks/useActionMetadata.ts | 32 + apps/yaak-proxy/hooks/useRpcEvent.ts | 15 + apps/yaak-proxy/hooks/useRpcMutation.ts | 18 + apps/yaak-proxy/hooks/useRpcQuery.ts | 20 + apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts | 23 + apps/yaak-proxy/index.html | 28 + apps/yaak-proxy/lib/fireAndForget.ts | 5 + apps/yaak-proxy/lib/hotkeys.ts | 63 + apps/yaak-proxy/lib/rpc.ts | 17 + apps/yaak-proxy/lib/store.ts | 11 + apps/yaak-proxy/lib/tauri.ts | 30 + apps/yaak-proxy/lib/theme.ts | 35 + apps/yaak-proxy/main.css | 92 + apps/yaak-proxy/main.tsx | 44 + apps/yaak-proxy/package.json | 36 + apps/yaak-proxy/postcss.config.cjs | 7 + apps/yaak-proxy/tailwind.config.cjs | 7 + apps/yaak-proxy/tsconfig.json | 28 + apps/yaak-proxy/tsconfig.node.json | 11 + apps/yaak-proxy/vite-env.d.ts | 1 + apps/yaak-proxy/vite.config.ts | 16 + crates-cli/yaak-cli/src/context.rs | 8 +- .../yaak-cli/tests/common/http_server.rs | 25 +- crates-proxy/yaak-proxy-lib/Cargo.toml | 21 + .../bindings/ModelChangeEvent.ts | 3 + .../yaak-proxy-lib/bindings/gen_models.ts | 8 + .../yaak-proxy-lib/bindings/gen_rpc.ts | 28 + crates-proxy/yaak-proxy-lib/bindings/index.ts | 2 + .../migrations/00000001_init.sql | 14 + .../yaak-proxy-lib}/package.json | 2 +- crates-proxy/yaak-proxy-lib/src/actions.rs | 53 + crates-proxy/yaak-proxy-lib/src/db.rs | 33 + crates-proxy/yaak-proxy-lib/src/lib.rs | 272 ++ crates-proxy/yaak-proxy-lib/src/models.rs | 116 + .../{yaak-app => yaak-app-client}/.gitignore | 0 .../{yaak-app => yaak-app-client}/Cargo.toml | 5 +- .../bindings/gen_watch.ts | 0 .../bindings/index.ts | 0 .../bindings/plugins_ext.ts | 0 .../{yaak-app => yaak-app-client}/build.rs | 0 .../capabilities/default.json | 0 .../icons/dev/128x128.png | Bin .../icons/dev/128x128@2x.png | Bin .../icons/dev/32x32.png | Bin .../icons/dev/64x64.png | Bin .../icons/dev/Square107x107Logo.png | Bin .../icons/dev/Square142x142Logo.png | Bin .../icons/dev/Square150x150Logo.png | Bin .../icons/dev/Square284x284Logo.png | Bin .../icons/dev/Square30x30Logo.png | Bin .../icons/dev/Square310x310Logo.png | Bin .../icons/dev/Square44x44Logo.png | Bin .../icons/dev/Square71x71Logo.png | Bin .../icons/dev/Square89x89Logo.png | Bin .../icons/dev/StoreLogo.png | Bin .../dev/android/mipmap-hdpi/ic_launcher.png | Bin .../mipmap-hdpi/ic_launcher_foreground.png | Bin .../android/mipmap-hdpi/ic_launcher_round.png | Bin .../dev/android/mipmap-mdpi/ic_launcher.png | Bin .../mipmap-mdpi/ic_launcher_foreground.png | Bin .../android/mipmap-mdpi/ic_launcher_round.png | Bin .../dev/android/mipmap-xhdpi/ic_launcher.png | Bin .../mipmap-xhdpi/ic_launcher_foreground.png | Bin .../mipmap-xhdpi/ic_launcher_round.png | Bin .../dev/android/mipmap-xxhdpi/ic_launcher.png | Bin .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxhdpi/ic_launcher_round.png | Bin .../android/mipmap-xxxhdpi/ic_launcher.png | Bin .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxxhdpi/ic_launcher_round.png | Bin .../icons/dev/icon.icns | Bin .../icons/dev/icon.ico | Bin .../icons/dev/icon.png | Bin .../icons/dev/ios/AppIcon-20x20@1x.png | Bin .../icons/dev/ios/AppIcon-20x20@2x-1.png | Bin .../icons/dev/ios/AppIcon-20x20@2x.png | Bin .../icons/dev/ios/AppIcon-20x20@3x.png | Bin .../icons/dev/ios/AppIcon-29x29@1x.png | Bin .../icons/dev/ios/AppIcon-29x29@2x-1.png | Bin .../icons/dev/ios/AppIcon-29x29@2x.png | Bin .../icons/dev/ios/AppIcon-29x29@3x.png | Bin .../icons/dev/ios/AppIcon-40x40@1x.png | Bin .../icons/dev/ios/AppIcon-40x40@2x-1.png | Bin .../icons/dev/ios/AppIcon-40x40@2x.png | Bin .../icons/dev/ios/AppIcon-40x40@3x.png | Bin .../icons/dev/ios/AppIcon-512@2x.png | Bin .../icons/dev/ios/AppIcon-60x60@2x.png | Bin .../icons/dev/ios/AppIcon-60x60@3x.png | Bin .../icons/dev/ios/AppIcon-76x76@1x.png | Bin .../icons/dev/ios/AppIcon-76x76@2x.png | Bin .../icons/dev/ios/AppIcon-83.5x83.5@2x.png | Bin .../icons/icon-dev.png | Bin .../icons/icon.png | Bin .../icons/release/128x128.png | Bin .../icons/release/128x128@2x.png | Bin .../icons/release/32x32.png | Bin .../icons/release/64x64.png | Bin .../icons/release/Square107x107Logo.png | Bin .../icons/release/Square142x142Logo.png | Bin .../icons/release/Square150x150Logo.png | Bin .../icons/release/Square284x284Logo.png | Bin .../icons/release/Square30x30Logo.png | Bin .../icons/release/Square310x310Logo.png | Bin .../icons/release/Square44x44Logo.png | Bin .../icons/release/Square71x71Logo.png | Bin .../icons/release/Square89x89Logo.png | Bin .../icons/release/StoreLogo.png | Bin .../android/mipmap-hdpi/ic_launcher.png | Bin .../mipmap-hdpi/ic_launcher_foreground.png | Bin .../android/mipmap-hdpi/ic_launcher_round.png | Bin .../android/mipmap-mdpi/ic_launcher.png | Bin .../mipmap-mdpi/ic_launcher_foreground.png | Bin .../android/mipmap-mdpi/ic_launcher_round.png | Bin .../android/mipmap-xhdpi/ic_launcher.png | Bin .../mipmap-xhdpi/ic_launcher_foreground.png | Bin .../mipmap-xhdpi/ic_launcher_round.png | Bin .../android/mipmap-xxhdpi/ic_launcher.png | Bin .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxhdpi/ic_launcher_round.png | Bin .../android/mipmap-xxxhdpi/ic_launcher.png | Bin .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxxhdpi/ic_launcher_round.png | Bin .../icons/release/icon.icns | Bin .../icons/release/icon.ico | Bin .../icons/release/icon.png | Bin .../icons/release/ios/AppIcon-20x20@1x.png | Bin .../icons/release/ios/AppIcon-20x20@2x-1.png | Bin .../icons/release/ios/AppIcon-20x20@2x.png | Bin .../icons/release/ios/AppIcon-20x20@3x.png | Bin .../icons/release/ios/AppIcon-29x29@1x.png | Bin .../icons/release/ios/AppIcon-29x29@2x-1.png | Bin .../icons/release/ios/AppIcon-29x29@2x.png | Bin .../icons/release/ios/AppIcon-29x29@3x.png | Bin .../icons/release/ios/AppIcon-40x40@1x.png | Bin .../icons/release/ios/AppIcon-40x40@2x-1.png | Bin .../icons/release/ios/AppIcon-40x40@2x.png | Bin .../icons/release/ios/AppIcon-40x40@3x.png | Bin .../icons/release/ios/AppIcon-512@2x.png | Bin .../icons/release/ios/AppIcon-60x60@2x.png | Bin .../icons/release/ios/AppIcon-60x60@3x.png | Bin .../icons/release/ios/AppIcon-76x76@1x.png | Bin .../icons/release/ios/AppIcon-76x76@2x.png | Bin .../release/ios/AppIcon-83.5x83.5@2x.png | Bin .../macos/entitlements.plist | 0 .../macos/entitlements.yaaknode.plist | 0 .../macos/entitlements.yaakprotoc.plist | 0 crates-tauri/yaak-app-client/package.json | 6 + .../src/commands.rs | 0 .../src/encoding.rs | 0 .../src/error.rs | 0 .../src/git_ext.rs | 0 .../{yaak-app => yaak-app-client}/src/grpc.rs | 0 .../src/history.rs | 0 .../src/http_request.rs | 0 .../src/import.rs | 0 .../{yaak-app => yaak-app-client}/src/lib.rs | 85 +- crates-tauri/yaak-app-client/src/main.rs | 5 + .../src/models_ext.rs | 10 +- .../src/notifications.rs | 0 .../src/plugin_events.rs | 4 +- .../src/plugins_ext.rs | 0 .../src/render.rs | 0 .../src/sync_ext.rs | 0 .../src/updates.rs | 0 .../src/uri_scheme.rs | 0 .../src/window_menu.rs | 0 .../src/ws_ext.rs | 0 .../static/greg.jpeg | Bin .../tauri.conf.json | 6 +- .../tauri.development.conf.json | 0 .../tauri.linux.conf.json | 0 .../tauri.release.conf.json | 0 .../template.desktop | 0 crates-tauri/yaak-app-proxy/.gitignore | 8 + crates-tauri/yaak-app-proxy/Cargo.toml | 23 + crates-tauri/yaak-app-proxy/bindings/index.ts | 1 + crates-tauri/yaak-app-proxy/build.rs | 3 + .../yaak-app-proxy/capabilities/default.json | 18 + crates-tauri/yaak-app-proxy/package.json | 6 + crates-tauri/yaak-app-proxy/src/lib.rs | 105 + .../{yaak-app => yaak-app-proxy}/src/main.rs | 2 +- .../yaak-app-proxy/src/window_menu.rs | 138 + crates-tauri/yaak-app-proxy/tauri.conf.json | 24 + .../tauri.development.conf.json | 13 + .../yaak-app-proxy/tauri.release.conf.json | 5 + crates-tauri/yaak-app-proxy/template.desktop | 9 + crates-tauri/yaak-license/index.ts | 2 +- crates-tauri/yaak-license/src/license.rs | 6 +- crates-tauri/yaak-mac-window/src/lib.rs | 2 +- crates-tauri/yaak-window/Cargo.toml | 12 + crates-tauri/yaak-window/src/lib.rs | 1 + .../{yaak-app => yaak-window}/src/window.rs | 104 +- crates/common/yaak-database/Cargo.toml | 20 + .../yaak-database/src/connection_or_tx.rs | 25 + .../yaak-database}/src/db_context.rs | 132 +- crates/common/yaak-database/src/error.rs | 37 + crates/common/yaak-database/src/lib.rs | 23 + crates/common/yaak-database/src/migrate.rs | 81 + crates/common/yaak-database/src/traits.rs | 36 + .../common/yaak-database/src/update_source.rs | 25 + crates/common/yaak-database/src/util.rs | 20 + crates/common/yaak-rpc/Cargo.toml | 12 + crates/common/yaak-rpc/src/lib.rs | 228 ++ crates/yaak-git/bindings/gen_models.ts | 32 +- crates/yaak-git/index.ts | 15 +- crates/yaak-http/Cargo.toml | 2 + crates/yaak-http/src/client.rs | 64 +- crates/yaak-http/src/error.rs | 6 + crates/yaak-models/Cargo.toml | 1 + .../yaak-models/bindings/ModelChangeEvent.ts | 3 + crates/yaak-models/bindings/gen_models.ts | 39 +- crates/yaak-models/guest-js/store.ts | 4 +- crates/yaak-models/src/client_db.rs | 127 + crates/yaak-models/src/connection_or_tx.rs | 26 +- crates/yaak-models/src/error.rs | 14 + crates/yaak-models/src/lib.rs | 2 +- crates/yaak-models/src/models.rs | 75 +- crates/yaak-models/src/queries/any_request.rs | 4 +- crates/yaak-models/src/queries/batch.rs | 4 +- crates/yaak-models/src/queries/cookie_jars.rs | 4 +- .../yaak-models/src/queries/environments.rs | 4 +- crates/yaak-models/src/queries/folders.rs | 6 +- .../src/queries/graphql_introspections.rs | 6 +- .../src/queries/grpc_connections.rs | 6 +- crates/yaak-models/src/queries/grpc_events.rs | 4 +- .../yaak-models/src/queries/grpc_requests.rs | 4 +- .../yaak-models/src/queries/http_requests.rs | 4 +- .../src/queries/http_response_events.rs | 4 +- .../yaak-models/src/queries/http_responses.rs | 6 +- crates/yaak-models/src/queries/key_values.rs | 8 +- .../yaak-models/src/queries/model_changes.rs | 20 +- .../src/queries/plugin_key_values.rs | 10 +- crates/yaak-models/src/queries/plugins.rs | 4 +- crates/yaak-models/src/queries/settings.rs | 4 +- crates/yaak-models/src/queries/sync_states.rs | 6 +- .../src/queries/websocket_connections.rs | 6 +- .../src/queries/websocket_events.rs | 4 +- .../src/queries/websocket_requests.rs | 4 +- .../src/queries/workspace_metas.rs | 4 +- crates/yaak-models/src/queries/workspaces.rs | 4 +- crates/yaak-models/src/query_manager.rs | 29 +- crates/yaak-models/src/util.rs | 56 +- crates/yaak-plugins/bindings/gen_events.ts | 160 +- crates/yaak-plugins/src/manager.rs | 2 +- crates/yaak-proxy/Cargo.toml | 25 + crates/yaak-proxy/src/body.rs | 114 + crates/yaak-proxy/src/cert.rs | 82 + crates/yaak-proxy/src/connection.rs | 32 + crates/yaak-proxy/src/lib.rs | 175 ++ crates/yaak-proxy/src/request.rs | 390 +++ crates/yaak-sync/bindings/gen_models.ts | 32 +- crates/yaak-sync/index.ts | 2 +- crates/yaak-sync/src/sync.rs | 12 +- crates/yaak-templates/pkg/yaak_templates.d.ts | 2 +- .../yaak-templates/pkg/yaak_templates_bg.js | 28 +- .../yaak-templates/pkg/yaak_templates_bg.wasm | Bin 65788 -> 65388 bytes package-lock.json | 2693 +++++++++-------- package.json | 48 +- packages/model-store/package.json | 11 + packages/model-store/src/index.ts | 94 + packages/plugin-runtime/package.json | 2 +- .../tailwind-config/index.cjs | 17 +- packages/tailwind-config/index.d.ts | 5 + packages/tailwind-config/package.json | 11 + packages/theme/package.json | 13 + .../theme/src}/appearance.ts | 29 +- .../theme/src/defaultThemes.ts | 40 +- packages/theme/src/index.ts | 21 + .../theme => packages/theme/src}/window.ts | 157 +- .../theme => packages/theme/src}/yaakColor.ts | 69 +- packages/theme/tsconfig.json | 12 + packages/ui/package.json | 8 + .../ui/src/components}/Banner.tsx | 0 packages/ui/src/components/Button.tsx | 124 + packages/ui/src/components/DropMarker.tsx | 34 + .../ui/src/components}/FormattedError.tsx | 0 .../ui/src}/components/HeaderSize.tsx | 40 +- .../ui/src/components}/Heading.tsx | 0 .../ui/src/components}/Icon.tsx | 6 + .../ui/src/components}/IconButton.tsx | 4 +- .../ui/src/components}/InlineCode.tsx | 0 .../ui/src/components}/LoadingIcon.tsx | 0 .../ui/src}/components/Overlay.tsx | 0 .../ui/src}/components/Portal.tsx | 0 .../ui/src}/components/ResizeHandle.tsx | 3 - packages/ui/src/components/SidebarLayout.tsx | 146 + .../ui/src/components}/SplitLayout.tsx | 28 +- .../ui/src/components}/Stacks.tsx | 0 .../ui/src/components}/Table.tsx | 4 +- .../ui/src}/components/WindowControls.tsx | 32 +- .../ui/src/components}/tree/Tree.tsx | 218 +- .../src/components}/tree/TreeDragOverlay.tsx | 0 .../src/components}/tree/TreeDropMarker.tsx | 8 +- .../src/components}/tree/TreeIndentGuide.tsx | 0 .../ui/src/components}/tree/TreeItem.tsx | 69 +- .../ui/src/components}/tree/TreeItemList.tsx | 8 +- .../ui/src/components}/tree/atoms.ts | 27 - .../ui/src/components}/tree/common.ts | 32 +- packages/ui/src/components/tree/context.ts | 60 + .../components}/tree/useSelectableItems.ts | 0 .../ui/src/hooks/useContainerSize.ts | 0 .../ui/src}/hooks/useDebouncedState.ts | 0 .../ui/src}/hooks/useDebouncedValue.ts | 0 .../ui/src}/hooks/useIsFullscreen.ts | 0 .../ui/src}/hooks/usePortal.ts | 10 +- .../ui/src}/hooks/useTimedBoolean.ts | 2 +- packages/ui/src/index.ts | 48 + {src-web => packages/ui/src}/lib/clamp.ts | 0 {src-web => packages/ui/src}/lib/constants.ts | 0 packages/ui/src/lib/dnd.ts | 39 + packages/ui/src/lib/minPromiseMillis.ts | 16 + packages/ui/tsconfig.json | 14 + plugins/template-function-cookie/src/index.ts | 3 +- scripts/git-hooks/post-checkout.mjs | 90 +- scripts/replace-version.cjs | 2 +- scripts/run-build.mjs | 62 + scripts/run-dev.mjs | 64 +- scripts/run-workspaces-dev.mjs | 12 +- scripts/vendor-node.cjs | 2 +- scripts/vendor-plugins.cjs | 14 +- scripts/vendor-protoc.cjs | 2 +- src-web/components/core/Button.tsx | 147 - src-web/hooks/useShouldFloatSidebar.ts | 8 - src-web/vite.config.ts | 59 - 742 files changed, 7686 insertions(+), 3249 deletions(-) create mode 100644 .oxfmtignore rename {src-web => apps/yaak-client}/.gitignore (100%) rename {src-web => apps/yaak-client}/commands/commands.tsx (97%) rename {src-web => apps/yaak-client}/commands/createEnvironment.tsx (100%) rename {src-web => apps/yaak-client}/commands/deleteWebsocketConnections.ts (100%) rename {src-web => apps/yaak-client}/commands/moveToWorkspace.tsx (100%) rename {src-web => apps/yaak-client}/commands/openFolderSettings.tsx (100%) rename {src-web => apps/yaak-client}/commands/openSettings.tsx (100%) rename {src-web => apps/yaak-client}/commands/openWorkspaceFromSyncDir.tsx (100%) rename {src-web => apps/yaak-client}/commands/openWorkspaceSettings.tsx (100%) rename {src-web => apps/yaak-client}/commands/switchWorkspace.tsx (100%) rename {src-web => apps/yaak-client}/components/BinaryFileEditor.tsx (93%) rename {src-web => apps/yaak-client}/components/CargoFeature.tsx (100%) rename {src-web => apps/yaak-client}/components/CloneGitRepositoryDialog.tsx (98%) rename {src-web => apps/yaak-client}/components/ColorIndicator.tsx (100%) rename {src-web => apps/yaak-client}/components/CommandPaletteDialog.tsx (99%) rename {src-web => apps/yaak-client}/components/ConfirmLargeRequestBody.tsx (94%) rename {src-web => apps/yaak-client}/components/ConfirmLargeResponse.tsx (94%) rename {src-web => apps/yaak-client}/components/ConfirmLargeResponseRequest.tsx (93%) rename {src-web => apps/yaak-client}/components/CookieDialog.tsx (96%) rename {src-web => apps/yaak-client}/components/CookieDropdown.tsx (97%) rename {src-web => apps/yaak-client}/components/CopyButton.tsx (93%) rename {src-web => apps/yaak-client}/components/CopyIconButton.tsx (83%) rename {src-web => apps/yaak-client}/components/CreateDropdown.tsx (100%) rename {src-web => apps/yaak-client}/components/CreateEnvironmentDialog.tsx (100%) rename {src-web => apps/yaak-client}/components/CreateWorkspaceDialog.tsx (98%) rename {src-web => apps/yaak-client}/components/Dialogs.tsx (100%) rename {src-web => apps/yaak-client}/components/DnsOverridesEditor.tsx (97%) rename {src-web => apps/yaak-client}/components/DropMarker.tsx (100%) rename {src-web => apps/yaak-client}/components/DynamicForm.tsx (99%) rename {src-web => apps/yaak-client}/components/EmptyStateText.tsx (100%) rename {src-web => apps/yaak-client}/components/EncryptionHelp.tsx (87%) rename {src-web => apps/yaak-client}/components/EnvironmentActionsDropdown.tsx (98%) rename {src-web => apps/yaak-client}/components/EnvironmentColorIndicator.tsx (100%) rename {src-web => apps/yaak-client}/components/EnvironmentColorPicker.tsx (95%) rename {src-web => apps/yaak-client}/components/EnvironmentEditDialog.tsx (79%) rename {src-web => apps/yaak-client}/components/EnvironmentEditor.tsx (99%) rename {src-web => apps/yaak-client}/components/EnvironmentSharableTooltip.tsx (100%) rename {src-web => apps/yaak-client}/components/ErrorBoundary.tsx (92%) rename {src-web => apps/yaak-client}/components/ExportDataDialog.tsx (99%) rename {src-web => apps/yaak-client}/components/FolderLayout.tsx (96%) rename {src-web => apps/yaak-client}/components/FolderSettingsDialog.tsx (98%) rename {src-web => apps/yaak-client}/components/FormMultipartEditor.tsx (100%) rename {src-web => apps/yaak-client}/components/FormUrlencodedEditor.tsx (100%) rename {src-web => apps/yaak-client}/components/GlobalHooks.tsx (100%) rename {src-web => apps/yaak-client}/components/GrpcConnectionLayout.tsx (94%) rename {src-web => apps/yaak-client}/components/GrpcEditor.tsx (97%) rename {src-web => apps/yaak-client}/components/GrpcProtoSelectionDialog.tsx (95%) rename {src-web => apps/yaak-client}/components/GrpcRequestPane.tsx (98%) rename {src-web => apps/yaak-client}/components/GrpcResponsePane.tsx (97%) rename {src-web => apps/yaak-client}/components/HeadersEditor.tsx (99%) rename {src-web => apps/yaak-client}/components/HttpAuthenticationEditor.tsx (98%) rename {src-web => apps/yaak-client}/components/HttpRequestLayout.tsx (84%) rename {src-web => apps/yaak-client}/components/HttpRequestPane.tsx (99%) rename {src-web => apps/yaak-client}/components/HttpResponsePane.tsx (98%) rename {src-web => apps/yaak-client}/components/HttpResponseTimeline.tsx (99%) rename {src-web => apps/yaak-client}/components/ImportCurlButton.tsx (90%) rename {src-web => apps/yaak-client}/components/ImportDataDialog.tsx (97%) rename {src-web => apps/yaak-client}/components/IsDev.tsx (100%) rename {src-web => apps/yaak-client}/components/JsonBodyEditor.tsx (98%) rename {src-web => apps/yaak-client}/components/KeyboardShortcutsDialog.tsx (100%) rename {src-web => apps/yaak-client}/components/LicenseBadge.tsx (99%) rename {src-web => apps/yaak-client}/components/LocalImage.tsx (100%) rename {src-web => apps/yaak-client}/components/Markdown.tsx (100%) rename {src-web => apps/yaak-client}/components/MarkdownEditor.tsx (100%) rename {src-web => apps/yaak-client}/components/MoveToWorkspaceDialog.tsx (97%) rename {src-web => apps/yaak-client}/components/Prose.css (100%) rename {src-web => apps/yaak-client}/components/Prose.tsx (100%) rename {src-web => apps/yaak-client}/components/RecentGrpcConnectionsDropdown.tsx (96%) rename {src-web => apps/yaak-client}/components/RecentHttpResponsesDropdown.tsx (97%) rename {src-web => apps/yaak-client}/components/RecentRequestsDropdown.tsx (100%) rename {src-web => apps/yaak-client}/components/RecentWebsocketConnectionsDropdown.tsx (96%) rename {src-web => apps/yaak-client}/components/RedirectToLatestWorkspace.tsx (100%) rename {src-web => apps/yaak-client}/components/RequestBodyViewer.tsx (98%) rename {src-web => apps/yaak-client}/components/RequestMethodDropdown.tsx (97%) rename {src-web => apps/yaak-client}/components/ResponseCookies.tsx (100%) rename {src-web => apps/yaak-client}/components/ResponseHeaders.tsx (100%) rename {src-web => apps/yaak-client}/components/ResponseInfo.tsx (100%) rename {src-web => apps/yaak-client}/components/RouteError.tsx (85%) rename {src-web => apps/yaak-client}/components/SelectFile.tsx (98%) rename {src-web => apps/yaak-client}/components/Settings/Settings.tsx (96%) rename {src-web => apps/yaak-client}/components/Settings/SettingsCertificates.tsx (98%) rename {src-web => apps/yaak-client}/components/Settings/SettingsGeneral.tsx (98%) rename {src-web => apps/yaak-client}/components/Settings/SettingsHotkeys.tsx (97%) rename {src-web => apps/yaak-client}/components/Settings/SettingsInterface.tsx (97%) rename {src-web => apps/yaak-client}/components/Settings/SettingsLicense.tsx (97%) rename {src-web => apps/yaak-client}/components/Settings/SettingsPlugins.tsx (97%) rename {src-web => apps/yaak-client}/components/Settings/SettingsProxy.tsx (98%) rename {src-web => apps/yaak-client}/components/Settings/SettingsTheme.tsx (96%) rename {src-web => apps/yaak-client}/components/SettingsDropdown.tsx (98%) rename {src-web => apps/yaak-client}/components/Sidebar.tsx (80%) rename {src-web => apps/yaak-client}/components/SidebarActions.tsx (61%) rename {src-web => apps/yaak-client}/components/SwitchWorkspaceDialog.tsx (93%) rename {src-web => apps/yaak-client}/components/SyncToFilesystemSetting.tsx (96%) rename {src-web => apps/yaak-client}/components/TemplateFunctionDialog.tsx (98%) rename {src-web => apps/yaak-client}/components/Toasts.tsx (96%) rename {src-web => apps/yaak-client}/components/UrlBar.tsx (96%) rename {src-web => apps/yaak-client}/components/UrlParameterEditor.tsx (97%) rename {src-web => apps/yaak-client}/components/WebsocketRequestLayout.tsx (83%) rename {src-web => apps/yaak-client}/components/WebsocketRequestPane.tsx (100%) rename {src-web => apps/yaak-client}/components/WebsocketResponsePane.tsx (97%) rename {src-web => apps/yaak-client}/components/Workspace.tsx (54%) rename {src-web => apps/yaak-client}/components/WorkspaceActionsDropdown.tsx (99%) rename {src-web => apps/yaak-client}/components/WorkspaceEncryptionSetting.tsx (96%) rename {src-web => apps/yaak-client}/components/WorkspaceHeader.tsx (93%) rename {src-web => apps/yaak-client}/components/WorkspaceSettingsDialog.tsx (97%) rename {src-web => apps/yaak-client}/components/core/Alert.tsx (89%) rename {src-web => apps/yaak-client}/components/core/AutoScroller.tsx (100%) rename {src-web => apps/yaak-client}/components/core/BulkPairEditor.tsx (100%) create mode 100644 apps/yaak-client/components/core/Button.tsx rename {src-web => apps/yaak-client}/components/core/ButtonInfiniteLoading.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Checkbox.tsx (96%) rename {src-web => apps/yaak-client}/components/core/ColorPicker.tsx (98%) rename {src-web => apps/yaak-client}/components/core/Confirm.tsx (97%) rename {src-web => apps/yaak-client}/components/core/CountBadge.tsx (100%) rename {src-web => apps/yaak-client}/components/core/DetailsBanner.tsx (94%) rename {src-web => apps/yaak-client}/components/core/Dialog.tsx (98%) rename {src-web => apps/yaak-client}/components/core/DismissibleBanner.tsx (91%) rename {src-web => apps/yaak-client}/components/core/Dropdown.tsx (97%) rename {src-web => apps/yaak-client}/components/core/Editor/BetterMatchDecorator.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/DiffViewer.css (100%) rename {src-web => apps/yaak-client}/components/core/Editor/DiffViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Editor/Editor.css (100%) rename {src-web => apps/yaak-client}/components/core/Editor/Editor.tsx (99%) rename {src-web => apps/yaak-client}/components/core/Editor/LazyEditor.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Editor/extensions.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/filter/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/filter/filter.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/filter/filter.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/filter/highlight.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/filter/query.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/genericCompletion.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/hyperlink/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/json-lint.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/pairs/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/pairs/highlight.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/pairs/pairs.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/pairs/pairs.terms.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/pairs/pairs.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/searchMatchCount.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/singleLine.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/text/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/text/text.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/text/text.terms.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/text/text.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/timeline/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/timeline/highlight.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/timeline/timeline.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/timeline/timeline.terms.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/timeline/timeline.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/completion.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/highlight.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/pathParameters.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/templateTags.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/twig.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/twig.terms.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/twig.test.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/twig.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/twig/util.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/completion.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/extension.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/highlight.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/url.grammar (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/url.terms.ts (100%) rename {src-web => apps/yaak-client}/components/core/Editor/url/url.ts (100%) rename {src-web => apps/yaak-client}/components/core/EventViewer.tsx (97%) rename {src-web => apps/yaak-client}/components/core/EventViewerRow.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Hotkey.tsx (96%) rename {src-web => apps/yaak-client}/components/core/HotkeyLabel.tsx (100%) rename {src-web => apps/yaak-client}/components/core/HotkeyList.tsx (100%) rename {src-web => apps/yaak-client}/components/core/HttpMethodTag.tsx (100%) rename {src-web => apps/yaak-client}/components/core/HttpResponseDurationTag.tsx (100%) rename {src-web => apps/yaak-client}/components/core/HttpStatusTag.tsx (100%) create mode 100644 apps/yaak-client/components/core/IconButton.tsx rename {src-web => apps/yaak-client}/components/core/IconTooltip.tsx (89%) rename {src-web => apps/yaak-client}/components/core/Input.tsx (99%) rename {src-web => apps/yaak-client}/components/core/JsonAttributeTree.tsx (94%) rename {src-web => apps/yaak-client}/components/core/KeyValueRow.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Label.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Link.tsx (97%) rename {src-web => apps/yaak-client}/components/core/PairEditor.tsx (99%) rename {src-web => apps/yaak-client}/components/core/PairEditor.util.tsx (100%) rename {src-web => apps/yaak-client}/components/core/PairOrBulkEditor.tsx (100%) rename {src-web => apps/yaak-client}/components/core/PillButton.tsx (100%) rename {src-web => apps/yaak-client}/components/core/PlainInput.tsx (99%) rename {src-web => apps/yaak-client}/components/core/Prompt.tsx (97%) rename {src-web => apps/yaak-client}/components/core/RadioCards.tsx (100%) rename {src-web => apps/yaak-client}/components/core/RadioDropdown.tsx (97%) rename {src-web => apps/yaak-client}/components/core/SegmentedControl.tsx (92%) rename {src-web => apps/yaak-client}/components/core/Select.tsx (98%) rename {src-web => apps/yaak-client}/components/core/Separator.tsx (100%) rename {src-web => apps/yaak-client}/components/core/SizeTag.tsx (100%) rename {src-web => apps/yaak-client}/components/core/Tabs/Tabs.tsx (99%) rename {src-web => apps/yaak-client}/components/core/Toast.tsx (96%) rename {src-web => apps/yaak-client}/components/core/Tooltip.tsx (99%) rename {src-web => apps/yaak-client}/components/core/WebsocketStatusTag.tsx (100%) rename {src-web => apps/yaak-client}/components/git/BranchSelectionDialog.tsx (95%) rename {src-web => apps/yaak-client}/components/git/GitCommitDialog.tsx (98%) rename {src-web => apps/yaak-client}/components/git/GitDropdown.tsx (99%) rename {src-web => apps/yaak-client}/components/git/GitRemotesDialog.tsx (93%) rename {src-web => apps/yaak-client}/components/git/HistoryDialog.tsx (88%) rename {src-web => apps/yaak-client}/components/git/callbacks.tsx (100%) rename {src-web => apps/yaak-client}/components/git/credentials.tsx (94%) rename {src-web => apps/yaak-client}/components/git/diverged.tsx (96%) rename {src-web => apps/yaak-client}/components/git/git-util.ts (100%) rename {src-web => apps/yaak-client}/components/git/showAddRemoteDialog.tsx (100%) rename {src-web => apps/yaak-client}/components/git/uncommitted.tsx (100%) rename {src-web => apps/yaak-client}/components/graphql/GraphQLDocsExplorer.tsx (97%) rename {src-web => apps/yaak-client}/components/graphql/GraphQLEditor.tsx (98%) rename {src-web => apps/yaak-client}/components/graphql/graphqlAtoms.ts (100%) rename {src-web => apps/yaak-client}/components/responseViewers/AudioViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/BinaryViewer.tsx (88%) rename {src-web => apps/yaak-client}/components/responseViewers/CsvViewer.tsx (92%) rename {src-web => apps/yaak-client}/components/responseViewers/EventStreamViewer.tsx (96%) rename {src-web => apps/yaak-client}/components/responseViewers/HTMLOrTextViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/ImageViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/JsonViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/MultipartViewer.tsx (96%) rename {src-web => apps/yaak-client}/components/responseViewers/PdfViewer.css (100%) rename {src-web => apps/yaak-client}/components/responseViewers/PdfViewer.tsx (97%) rename {src-web => apps/yaak-client}/components/responseViewers/SvgViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/TextViewer.tsx (98%) rename {src-web => apps/yaak-client}/components/responseViewers/VideoViewer.tsx (100%) rename {src-web => apps/yaak-client}/components/responseViewers/WebPageViewer.tsx (100%) rename {src-web => apps/yaak-client}/font-size.ts (100%) rename {src-web => apps/yaak-client}/font.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveCookieJar.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveEnvironment.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveEnvironmentVariables.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveFolder.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveFolderId.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveRequest.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveRequestId.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveWorkspace.ts (100%) rename {src-web => apps/yaak-client}/hooks/useActiveWorkspaceChangedToast.tsx (93%) rename {src-web => apps/yaak-client}/hooks/useAllRequests.ts (100%) rename {src-web => apps/yaak-client}/hooks/useAuthTab.tsx (97%) rename {src-web => apps/yaak-client}/hooks/useCancelHttpResponse.ts (100%) rename {src-web => apps/yaak-client}/hooks/useCheckForUpdates.tsx (92%) rename {src-web => apps/yaak-client}/hooks/useClickOutside.ts (100%) rename {src-web => apps/yaak-client}/hooks/useCopyHttpResponse.ts (100%) rename {src-web => apps/yaak-client}/hooks/useCreateCookieJar.ts (100%) rename {src-web => apps/yaak-client}/hooks/useCreateDropdownItems.tsx (98%) rename {src-web => apps/yaak-client}/hooks/useCreateWorkspace.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useDeleteGrpcConnections.ts (100%) rename {src-web => apps/yaak-client}/hooks/useDeleteHttpResponses.ts (100%) rename {src-web => apps/yaak-client}/hooks/useDeleteSendHistory.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useEnvironmentValueVisibility.ts (100%) rename {src-web => apps/yaak-client}/hooks/useEnvironmentVariables.ts (100%) rename {src-web => apps/yaak-client}/hooks/useEnvironmentsBreakdown.ts (100%) rename {src-web => apps/yaak-client}/hooks/useEventViewerKeyboard.ts (100%) rename {src-web => apps/yaak-client}/hooks/useExportData.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useFastMutation.ts (100%) rename {src-web => apps/yaak-client}/hooks/useFloatingSidebarHidden.ts (100%) rename {src-web => apps/yaak-client}/hooks/useFolderActions.ts (100%) rename {src-web => apps/yaak-client}/hooks/useFormatText.ts (100%) rename {src-web => apps/yaak-client}/hooks/useGrpc.ts (97%) rename {src-web => apps/yaak-client}/hooks/useGrpcProtoFiles.ts (100%) rename {src-web => apps/yaak-client}/hooks/useGrpcRequestActions.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHeadersTab.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useHotKey.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHttpAuthentication.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHttpAuthenticationConfig.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHttpRequestActions.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHttpRequestBody.ts (100%) rename {src-web => apps/yaak-client}/hooks/useHttpResponseEvents.ts (100%) rename {src-web => apps/yaak-client}/hooks/useImportCurl.ts (100%) rename {src-web => apps/yaak-client}/hooks/useInheritedAuthentication.ts (100%) rename {src-web => apps/yaak-client}/hooks/useInheritedHeaders.ts (100%) rename {src-web => apps/yaak-client}/hooks/useInstallPlugin.ts (100%) rename {src-web => apps/yaak-client}/hooks/useIntrospectGraphQL.ts (98%) rename {src-web => apps/yaak-client}/hooks/useIsEncryptionEnabled.ts (100%) rename {src-web => apps/yaak-client}/hooks/useKeyValue.ts (100%) rename {src-web => apps/yaak-client}/hooks/useKeyboardEvent.ts (100%) rename {src-web => apps/yaak-client}/hooks/useLatestGrpcConnection.ts (100%) rename {src-web => apps/yaak-client}/hooks/useLatestHttpResponse.ts (100%) rename {src-web => apps/yaak-client}/hooks/useListenToTauriEvent.ts (100%) rename {src-web => apps/yaak-client}/hooks/useModelAncestors.ts (100%) rename {src-web => apps/yaak-client}/hooks/useParentFolders.ts (100%) rename {src-web => apps/yaak-client}/hooks/usePinnedGrpcConnection.ts (100%) rename {src-web => apps/yaak-client}/hooks/usePinnedHttpResponse.ts (100%) rename {src-web => apps/yaak-client}/hooks/usePinnedWebsocketConnection.ts (100%) rename {src-web => apps/yaak-client}/hooks/usePluginInfo.ts (100%) rename {src-web => apps/yaak-client}/hooks/usePlugins.ts (95%) rename {src-web => apps/yaak-client}/hooks/usePreferredAppearance.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRandomKey.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRecentCookieJars.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRecentEnvironments.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRecentRequests.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRecentWorkspaces.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRenderTemplate.ts (100%) rename {src-web => apps/yaak-client}/hooks/useRequestEditor.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useRequestUpdateKey.ts (100%) rename {src-web => apps/yaak-client}/hooks/useResolvedAppearance.ts (100%) rename {src-web => apps/yaak-client}/hooks/useResolvedTheme.ts (100%) rename {src-web => apps/yaak-client}/hooks/useResponseBodyEventSource.ts (100%) rename {src-web => apps/yaak-client}/hooks/useResponseBodyText.ts (100%) rename {src-web => apps/yaak-client}/hooks/useResponseViewMode.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSaveResponse.tsx (95%) rename {src-web => apps/yaak-client}/hooks/useScrollIntoView.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSendAnyHttpRequest.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSendManyRequests.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSidebarHidden.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSidebarItemCollapsed.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSidebarWidth.ts (100%) rename {src-web => apps/yaak-client}/hooks/useStateWithDeps.ts (100%) rename {src-web => apps/yaak-client}/hooks/useStoplightsVisible.ts (79%) rename {src-web => apps/yaak-client}/hooks/useSyncFontSizeSetting.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSyncWorkspaceChildModels.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSyncWorkspaceRequestTitle.ts (100%) rename {src-web => apps/yaak-client}/hooks/useSyncZoomSetting.ts (100%) rename {src-web => apps/yaak-client}/hooks/useTemplateFunctionConfig.ts (100%) rename {src-web => apps/yaak-client}/hooks/useTemplateFunctions.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useTemplateTokensToString.ts (100%) rename {src-web => apps/yaak-client}/hooks/useTimelineViewMode.ts (100%) rename {src-web => apps/yaak-client}/hooks/useToggle.ts (100%) rename {src-web => apps/yaak-client}/hooks/useToggleCommandPalette.tsx (100%) rename {src-web => apps/yaak-client}/hooks/useWebsocketRequestActions.ts (100%) rename {src-web => apps/yaak-client}/hooks/useWindowFocus.ts (100%) rename {src-web => apps/yaak-client}/hooks/useWorkspaceActions.ts (100%) rename {src-web => apps/yaak-client}/hooks/useZoom.ts (100%) rename {src-web => apps/yaak-client}/index.html (100%) rename {src-web => apps/yaak-client}/init/sync.ts (100%) rename {src-web => apps/yaak-client}/lib/alert.ts (100%) rename {src-web => apps/yaak-client}/lib/appInfo.ts (100%) rename {src-web => apps/yaak-client}/lib/atoms.ts (80%) rename {src-web => apps/yaak-client}/lib/atoms/atomWithKVStorage.ts (100%) rename {src-web => apps/yaak-client}/lib/capitalize.ts (100%) rename {src-web => apps/yaak-client}/lib/color.ts (100%) rename {src-web => apps/yaak-client}/lib/confirm.ts (100%) rename {src-web => apps/yaak-client}/lib/contentType.ts (100%) rename {src-web => apps/yaak-client}/lib/copy.ts (100%) rename {src-web => apps/yaak-client}/lib/createRequestAndNavigate.tsx (100%) rename {src-web => apps/yaak-client}/lib/data/charsets.ts (100%) rename {src-web => apps/yaak-client}/lib/data/connections.ts (100%) rename {src-web => apps/yaak-client}/lib/data/encodings.ts (100%) rename {src-web => apps/yaak-client}/lib/data/headerNames.ts (100%) rename {src-web => apps/yaak-client}/lib/data/mimetypes.ts (100%) rename {src-web => apps/yaak-client}/lib/defaultHeaders.ts (100%) rename {src-web => apps/yaak-client}/lib/deleteModelWithConfirm.tsx (96%) rename {src-web => apps/yaak-client}/lib/dialog.ts (100%) rename {src-web => apps/yaak-client}/lib/diffYaml.ts (100%) rename {src-web => apps/yaak-client}/lib/dnd.ts (100%) rename {src-web => apps/yaak-client}/lib/duplicateRequestOrFolderAndNavigate.tsx (100%) rename {src-web => apps/yaak-client}/lib/editEnvironment.tsx (100%) rename {src-web => apps/yaak-client}/lib/encryption.ts (100%) rename {src-web => apps/yaak-client}/lib/fireAndForget.ts (100%) rename {src-web => apps/yaak-client}/lib/formatters.ts (100%) rename {src-web => apps/yaak-client}/lib/generateId.ts (100%) rename {src-web => apps/yaak-client}/lib/getNodeText.ts (100%) rename {src-web => apps/yaak-client}/lib/importData.tsx (96%) rename {src-web => apps/yaak-client}/lib/initGlobalListeners.tsx (86%) rename {src-web => apps/yaak-client}/lib/jotai.ts (100%) rename {src-web => apps/yaak-client}/lib/jsonComments.ts (100%) rename {src-web => apps/yaak-client}/lib/keyValueStore.ts (100%) rename {src-web => apps/yaak-client}/lib/markdown.ts (100%) rename {src-web => apps/yaak-client}/lib/minPromiseMillis.ts (100%) rename {src-web => apps/yaak-client}/lib/model_util.test.ts (100%) rename {src-web => apps/yaak-client}/lib/model_util.ts (100%) rename {src-web => apps/yaak-client}/lib/pluralize.ts (100%) rename {src-web => apps/yaak-client}/lib/prepareImportQuerystring.ts (100%) rename {src-web => apps/yaak-client}/lib/prompt-form.tsx (100%) rename {src-web => apps/yaak-client}/lib/prompt.ts (100%) rename {src-web => apps/yaak-client}/lib/queryClient.ts (100%) rename {src-web => apps/yaak-client}/lib/renameModelWithPrompt.tsx (93%) rename {src-web => apps/yaak-client}/lib/resolvedModelName.ts (100%) rename {src-web => apps/yaak-client}/lib/responseBody.ts (100%) rename {src-web => apps/yaak-client}/lib/reveal.ts (100%) rename {src-web => apps/yaak-client}/lib/router.ts (100%) rename {src-web => apps/yaak-client}/lib/scopes.ts (100%) rename {src-web => apps/yaak-client}/lib/sendEphemeralRequest.ts (100%) rename {src-web => apps/yaak-client}/lib/setWorkspaceSearchParams.ts (100%) rename {src-web => apps/yaak-client}/lib/settings.ts (100%) rename {src-web => apps/yaak-client}/lib/setupOrConfigureEncryption.tsx (94%) rename {src-web => apps/yaak-client}/lib/showColorPicker.tsx (100%) rename {src-web => apps/yaak-client}/lib/sleep.ts (100%) rename {src-web => apps/yaak-client}/lib/tauri.ts (100%) create mode 100644 apps/yaak-client/lib/theme/appearance.ts create mode 100644 apps/yaak-client/lib/theme/themes.ts create mode 100644 apps/yaak-client/lib/theme/window.ts create mode 100644 apps/yaak-client/lib/theme/yaakColor.ts rename {src-web => apps/yaak-client}/lib/toast.tsx (100%) rename {src-web => apps/yaak-client}/lib/truncate.ts (100%) rename {src-web => apps/yaak-client}/main.css (100%) rename {src-web => apps/yaak-client}/main.tsx (92%) rename {src-web => apps/yaak-client}/modules.d.ts (100%) rename {src-web => apps/yaak-client}/package.json (88%) rename {src-web => apps/yaak-client}/postcss.config.cjs (100%) rename {src-web => apps/yaak-client}/routeTree.gen.ts (100%) rename {src-web => apps/yaak-client}/routes/__root.tsx (100%) rename {src-web => apps/yaak-client}/routes/index.tsx (100%) rename {src-web => apps/yaak-client}/routes/workspaces/$workspaceId/index.tsx (100%) rename {src-web => apps/yaak-client}/routes/workspaces/$workspaceId/requests/$requestId.tsx (100%) rename {src-web => apps/yaak-client}/routes/workspaces/$workspaceId/settings.tsx (100%) rename {src-web => apps/yaak-client}/routes/workspaces/index.tsx (100%) create mode 100644 apps/yaak-client/tailwind.config.cjs rename {src-web => apps/yaak-client}/theme.ts (91%) rename {src-web => apps/yaak-client}/tsconfig.json (61%) rename {src-web => apps/yaak-client}/tsconfig.node.json (100%) rename {src-web => apps/yaak-client}/tsr.config.json (100%) rename {src-web => apps/yaak-client}/vite-env.d.ts (100%) create mode 100644 apps/yaak-client/vite.config.ts create mode 100644 apps/yaak-proxy/components/ActionButton.tsx create mode 100644 apps/yaak-proxy/components/ActionIconButton.tsx create mode 100644 apps/yaak-proxy/components/ExchangesTable.tsx create mode 100644 apps/yaak-proxy/components/ProxyLayout.tsx create mode 100644 apps/yaak-proxy/components/Sidebar.tsx create mode 100644 apps/yaak-proxy/font-size.ts create mode 100644 apps/yaak-proxy/hooks/useActionMetadata.ts create mode 100644 apps/yaak-proxy/hooks/useRpcEvent.ts create mode 100644 apps/yaak-proxy/hooks/useRpcMutation.ts create mode 100644 apps/yaak-proxy/hooks/useRpcQuery.ts create mode 100644 apps/yaak-proxy/hooks/useRpcQueryWithEvent.ts create mode 100644 apps/yaak-proxy/index.html create mode 100644 apps/yaak-proxy/lib/fireAndForget.ts create mode 100644 apps/yaak-proxy/lib/hotkeys.ts create mode 100644 apps/yaak-proxy/lib/rpc.ts create mode 100644 apps/yaak-proxy/lib/store.ts create mode 100644 apps/yaak-proxy/lib/tauri.ts create mode 100644 apps/yaak-proxy/lib/theme.ts create mode 100644 apps/yaak-proxy/main.css create mode 100644 apps/yaak-proxy/main.tsx create mode 100644 apps/yaak-proxy/package.json create mode 100644 apps/yaak-proxy/postcss.config.cjs create mode 100644 apps/yaak-proxy/tailwind.config.cjs create mode 100644 apps/yaak-proxy/tsconfig.json create mode 100644 apps/yaak-proxy/tsconfig.node.json create mode 100644 apps/yaak-proxy/vite-env.d.ts create mode 100644 apps/yaak-proxy/vite.config.ts create mode 100644 crates-proxy/yaak-proxy-lib/Cargo.toml create mode 100644 crates-proxy/yaak-proxy-lib/bindings/ModelChangeEvent.ts create mode 100644 crates-proxy/yaak-proxy-lib/bindings/gen_models.ts create mode 100644 crates-proxy/yaak-proxy-lib/bindings/gen_rpc.ts create mode 100644 crates-proxy/yaak-proxy-lib/bindings/index.ts create mode 100644 crates-proxy/yaak-proxy-lib/migrations/00000001_init.sql rename {crates-tauri/yaak-app => crates-proxy/yaak-proxy-lib}/package.json (64%) create mode 100644 crates-proxy/yaak-proxy-lib/src/actions.rs create mode 100644 crates-proxy/yaak-proxy-lib/src/db.rs create mode 100644 crates-proxy/yaak-proxy-lib/src/lib.rs create mode 100644 crates-proxy/yaak-proxy-lib/src/models.rs rename crates-tauri/{yaak-app => yaak-app-client}/.gitignore (100%) rename crates-tauri/{yaak-app => yaak-app-client}/Cargo.toml (96%) rename crates-tauri/{yaak-app => yaak-app-client}/bindings/gen_watch.ts (100%) rename crates-tauri/{yaak-app => yaak-app-client}/bindings/index.ts (100%) rename crates-tauri/{yaak-app => yaak-app-client}/bindings/plugins_ext.ts (100%) rename crates-tauri/{yaak-app => yaak-app-client}/build.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/capabilities/default.json (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/128x128.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/128x128@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/32x32.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/64x64.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square107x107Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square142x142Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square150x150Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square284x284Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square30x30Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square310x310Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square44x44Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square71x71Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/Square89x89Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/StoreLogo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-hdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-hdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-hdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-mdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-mdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-mdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxxhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxxhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/android/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/icon.icns (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/icon.ico (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/icon.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-20x20@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-20x20@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-20x20@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-20x20@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-29x29@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-29x29@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-29x29@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-29x29@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-40x40@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-40x40@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-40x40@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-40x40@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-512@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-60x60@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-60x60@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-76x76@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-76x76@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/dev/ios/AppIcon-83.5x83.5@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/icon-dev.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/icon.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/128x128.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/128x128@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/32x32.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/64x64.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square107x107Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square142x142Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square150x150Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square284x284Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square30x30Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square310x310Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square44x44Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square71x71Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/Square89x89Logo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/StoreLogo.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-hdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-hdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-hdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-mdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-mdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-mdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxxhdpi/ic_launcher.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxxhdpi/ic_launcher_foreground.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/android/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/icon.icns (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/icon.ico (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/icon.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-20x20@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-20x20@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-20x20@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-20x20@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-29x29@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-29x29@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-29x29@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-29x29@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-40x40@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-40x40@2x-1.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-40x40@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-40x40@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-512@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-60x60@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-60x60@3x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-76x76@1x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-76x76@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/icons/release/ios/AppIcon-83.5x83.5@2x.png (100%) rename crates-tauri/{yaak-app => yaak-app-client}/macos/entitlements.plist (100%) rename crates-tauri/{yaak-app => yaak-app-client}/macos/entitlements.yaaknode.plist (100%) rename crates-tauri/{yaak-app => yaak-app-client}/macos/entitlements.yaakprotoc.plist (100%) create mode 100644 crates-tauri/yaak-app-client/package.json rename crates-tauri/{yaak-app => yaak-app-client}/src/commands.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/encoding.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/error.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/git_ext.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/grpc.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/history.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/http_request.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/import.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/lib.rs (95%) create mode 100644 crates-tauri/yaak-app-client/src/main.rs rename crates-tauri/{yaak-app => yaak-app-client}/src/models_ext.rs (98%) rename crates-tauri/{yaak-app => yaak-app-client}/src/notifications.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/plugin_events.rs (99%) rename crates-tauri/{yaak-app => yaak-app-client}/src/plugins_ext.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/render.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/sync_ext.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/updates.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/uri_scheme.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/window_menu.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/src/ws_ext.rs (100%) rename crates-tauri/{yaak-app => yaak-app-client}/static/greg.jpeg (100%) rename crates-tauri/{yaak-app => yaak-app-client}/tauri.conf.json (81%) rename crates-tauri/{yaak-app => yaak-app-client}/tauri.development.conf.json (100%) rename crates-tauri/{yaak-app => yaak-app-client}/tauri.linux.conf.json (100%) rename crates-tauri/{yaak-app => yaak-app-client}/tauri.release.conf.json (100%) rename crates-tauri/{yaak-app => yaak-app-client}/template.desktop (100%) create mode 100644 crates-tauri/yaak-app-proxy/.gitignore create mode 100644 crates-tauri/yaak-app-proxy/Cargo.toml create mode 100644 crates-tauri/yaak-app-proxy/bindings/index.ts create mode 100644 crates-tauri/yaak-app-proxy/build.rs create mode 100644 crates-tauri/yaak-app-proxy/capabilities/default.json create mode 100644 crates-tauri/yaak-app-proxy/package.json create mode 100644 crates-tauri/yaak-app-proxy/src/lib.rs rename crates-tauri/{yaak-app => yaak-app-proxy}/src/main.rs (71%) create mode 100644 crates-tauri/yaak-app-proxy/src/window_menu.rs create mode 100644 crates-tauri/yaak-app-proxy/tauri.conf.json create mode 100644 crates-tauri/yaak-app-proxy/tauri.development.conf.json create mode 100644 crates-tauri/yaak-app-proxy/tauri.release.conf.json create mode 100644 crates-tauri/yaak-app-proxy/template.desktop create mode 100644 crates-tauri/yaak-window/Cargo.toml create mode 100644 crates-tauri/yaak-window/src/lib.rs rename crates-tauri/{yaak-app => yaak-window}/src/window.rs (65%) create mode 100644 crates/common/yaak-database/Cargo.toml create mode 100644 crates/common/yaak-database/src/connection_or_tx.rs rename crates/{yaak-models => common/yaak-database}/src/db_context.rs (56%) create mode 100644 crates/common/yaak-database/src/error.rs create mode 100644 crates/common/yaak-database/src/lib.rs create mode 100644 crates/common/yaak-database/src/migrate.rs create mode 100644 crates/common/yaak-database/src/traits.rs create mode 100644 crates/common/yaak-database/src/update_source.rs create mode 100644 crates/common/yaak-database/src/util.rs create mode 100644 crates/common/yaak-rpc/Cargo.toml create mode 100644 crates/common/yaak-rpc/src/lib.rs create mode 100644 crates/yaak-models/bindings/ModelChangeEvent.ts create mode 100644 crates/yaak-models/src/client_db.rs create mode 100644 crates/yaak-proxy/Cargo.toml create mode 100644 crates/yaak-proxy/src/body.rs create mode 100644 crates/yaak-proxy/src/cert.rs create mode 100644 crates/yaak-proxy/src/connection.rs create mode 100644 crates/yaak-proxy/src/lib.rs create mode 100644 crates/yaak-proxy/src/request.rs create mode 100644 packages/model-store/package.json create mode 100644 packages/model-store/src/index.ts rename src-web/tailwind.config.cjs => packages/tailwind-config/index.cjs (91%) create mode 100644 packages/tailwind-config/index.d.ts create mode 100644 packages/tailwind-config/package.json create mode 100644 packages/theme/package.json rename {src-web/lib/theme => packages/theme/src}/appearance.ts (57%) rename src-web/lib/theme/themes.ts => packages/theme/src/defaultThemes.ts (56%) create mode 100644 packages/theme/src/index.ts rename {src-web/lib/theme => packages/theme/src}/window.ts (66%) rename {src-web/lib/theme => packages/theme/src}/yaakColor.ts (69%) create mode 100644 packages/theme/tsconfig.json create mode 100644 packages/ui/package.json rename {src-web/components/core => packages/ui/src/components}/Banner.tsx (100%) create mode 100644 packages/ui/src/components/Button.tsx create mode 100644 packages/ui/src/components/DropMarker.tsx rename {src-web/components/core => packages/ui/src/components}/FormattedError.tsx (100%) rename {src-web => packages/ui/src}/components/HeaderSize.tsx (71%) rename {src-web/components/core => packages/ui/src/components}/Heading.tsx (100%) rename {src-web/components/core => packages/ui/src/components}/Icon.tsx (98%) rename {src-web/components/core => packages/ui/src/components}/IconButton.tsx (93%) rename {src-web/components/core => packages/ui/src/components}/InlineCode.tsx (100%) rename {src-web/components/core => packages/ui/src/components}/LoadingIcon.tsx (100%) rename {src-web => packages/ui/src}/components/Overlay.tsx (100%) rename {src-web => packages/ui/src}/components/Portal.tsx (100%) rename {src-web => packages/ui/src}/components/ResizeHandle.tsx (94%) create mode 100644 packages/ui/src/components/SidebarLayout.tsx rename {src-web/components/core => packages/ui/src/components}/SplitLayout.tsx (83%) rename {src-web/components/core => packages/ui/src/components}/Stacks.tsx (100%) rename {src-web/components/core => packages/ui/src/components}/Table.tsx (93%) rename {src-web => packages/ui/src}/components/WindowControls.tsx (83%) rename {src-web/components/core => packages/ui/src/components}/tree/Tree.tsx (78%) rename {src-web/components/core => packages/ui/src/components}/tree/TreeDragOverlay.tsx (100%) rename {src-web/components/core => packages/ui/src/components}/tree/TreeDropMarker.tsx (79%) rename {src-web/components/core => packages/ui/src/components}/tree/TreeIndentGuide.tsx (100%) rename {src-web/components/core => packages/ui/src/components}/tree/TreeItem.tsx (87%) rename {src-web/components/core => packages/ui/src/components}/tree/TreeItemList.tsx (91%) rename {src-web/components/core => packages/ui/src/components}/tree/atoms.ts (73%) rename {src-web/components/core => packages/ui/src/components}/tree/common.ts (69%) create mode 100644 packages/ui/src/components/tree/context.ts rename {src-web/components/core => packages/ui/src/components}/tree/useSelectableItems.ts (100%) rename src-web/hooks/useContainerQuery.ts => packages/ui/src/hooks/useContainerSize.ts (100%) rename {src-web => packages/ui/src}/hooks/useDebouncedState.ts (100%) rename {src-web => packages/ui/src}/hooks/useDebouncedValue.ts (100%) rename {src-web => packages/ui/src}/hooks/useIsFullscreen.ts (100%) rename {src-web => packages/ui/src}/hooks/usePortal.ts (61%) rename {src-web => packages/ui/src}/hooks/useTimedBoolean.ts (88%) create mode 100644 packages/ui/src/index.ts rename {src-web => packages/ui/src}/lib/clamp.ts (100%) rename {src-web => packages/ui/src}/lib/constants.ts (100%) create mode 100644 packages/ui/src/lib/dnd.ts create mode 100644 packages/ui/src/lib/minPromiseMillis.ts create mode 100644 packages/ui/tsconfig.json create mode 100644 scripts/run-build.mjs delete mode 100644 src-web/components/core/Button.tsx delete mode 100644 src-web/hooks/useShouldFloatSidebar.ts delete mode 100644 src-web/vite.config.ts diff --git a/.claude-context.md b/.claude-context.md index 94a20862..97e20f6b 100644 --- a/.claude-context.md +++ b/.claude-context.md @@ -8,7 +8,7 @@ Make Yaak runnable as a standalone CLI without Tauri as a dependency. The core R ``` crates/ # Core crates - should NOT depend on Tauri -crates-tauri/ # Tauri-specific crates (yaak-app, yaak-tauri-utils, etc.) +crates-tauri/ # Tauri-specific crates (yaak-app-client, yaak-tauri-utils, etc.) crates-cli/ # CLI crate (yaak-cli) ``` @@ -16,7 +16,7 @@ crates-cli/ # CLI crate (yaak-cli) ### 1. Folder Restructure -- Moved Tauri-dependent app code to `crates-tauri/yaak-app/` +- Moved Tauri-dependent app code to `crates-tauri/yaak-app-client/` - Created `crates-tauri/yaak-tauri-utils/` for shared Tauri utilities (window traits, api_client, error handling) - Created `crates-cli/yaak-cli/` for the standalone CLI @@ -50,14 +50,14 @@ crates-cli/ # CLI crate (yaak-cli) 3. Move extension traits (e.g., `SomethingManagerExt`) to yaak-app or yaak-tauri-utils 4. Initialize managers in yaak-app's `.setup()` block 5. Remove `tauri` from Cargo.toml dependencies -6. Update `crates-tauri/yaak-app/capabilities/default.json` to remove the plugin permission +6. Update `crates-tauri/yaak-app-client/capabilities/default.json` to remove the plugin permission 7. Replace `tauri::async_runtime::block_on` with `tokio::runtime::Handle::current().block_on()` ## Key Files -- `crates-tauri/yaak-app/src/lib.rs` - Main Tauri app, setup block initializes managers -- `crates-tauri/yaak-app/src/commands.rs` - Migrated Tauri commands -- `crates-tauri/yaak-app/src/models_ext.rs` - Database plugin and extension traits +- `crates-tauri/yaak-app-client/src/lib.rs` - Main Tauri app, setup block initializes managers +- `crates-tauri/yaak-app-client/src/commands.rs` - Migrated Tauri commands +- `crates-tauri/yaak-app-client/src/models_ext.rs` - Database plugin and extension traits - `crates-tauri/yaak-tauri-utils/src/window.rs` - WorkspaceWindowTrait for window state - `crates/yaak-models/src/lib.rs` - Contains `init_standalone()` for CLI usage @@ -79,5 +79,5 @@ e718a5f1 Refactor models_ext to use init_standalone from yaak-models ## Testing - Run `cargo check -p ` to verify a crate builds without Tauri -- Run `npm run app-dev` to test the Tauri app still works +- Run `npm run client:dev` to test the Tauri app still works - Run `cargo run -p yaak-cli -- --help` to test the CLI diff --git a/.gitattributes b/.gitattributes index 4565c740..67ab542c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ -crates-tauri/yaak-app/vendored/**/* linguist-generated=true -crates-tauri/yaak-app/gen/schemas/**/* linguist-generated=true +crates-tauri/yaak-app-client/vendored/**/* linguist-generated=true +crates-tauri/yaak-app-client/gen/schemas/**/* linguist-generated=true **/bindings/* linguist-generated=true crates/yaak-templates/pkg/* linguist-generated=true diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml index 3a6f695f..5e128331 100644 --- a/.github/workflows/release-app.yml +++ b/.github/workflows/release-app.yml @@ -125,8 +125,8 @@ jobs: security list-keychain -d user -s $KEYCHAIN_PATH # Sign vendored binaries with hardened runtime and their specific entitlements - codesign --force --options runtime --entitlements crates-tauri/yaak-app/macos/entitlements.yaakprotoc.plist --sign "$APPLE_SIGNING_IDENTITY" crates-tauri/yaak-app/vendored/protoc/yaakprotoc || true - codesign --force --options runtime --entitlements crates-tauri/yaak-app/macos/entitlements.yaaknode.plist --sign "$APPLE_SIGNING_IDENTITY" crates-tauri/yaak-app/vendored/node/yaaknode || true + codesign --force --options runtime --entitlements crates-tauri/yaak-app-client/macos/entitlements.yaakprotoc.plist --sign "$APPLE_SIGNING_IDENTITY" crates-tauri/yaak-app-client/vendored/protoc/yaakprotoc || true + codesign --force --options runtime --entitlements crates-tauri/yaak-app-client/macos/entitlements.yaaknode.plist --sign "$APPLE_SIGNING_IDENTITY" crates-tauri/yaak-app-client/vendored/node/yaaknode || true - uses: tauri-apps/tauri-action@v0 env: @@ -155,7 +155,8 @@ jobs: releaseBody: "[Changelog __VERSION__](https://yaak.app/blog/__VERSION__)" releaseDraft: true prerelease: true - args: "${{ matrix.args }} --config ./crates-tauri/yaak-app/tauri.release.conf.json" + projectPath: ./crates-tauri/yaak-app-client + args: "${{ matrix.args }} --config ./tauri.release.conf.json" # Build a per-machine NSIS installer for enterprise deployment (PDQ, SCCM, Intune) - name: Build and upload machine-wide installer (Windows only) @@ -171,7 +172,9 @@ jobs: TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} run: | Get-ChildItem -Recurse -Path target -File -Filter "*.exe.sig" | Remove-Item -Force - npx tauri bundle ${{ matrix.args }} --bundles nsis --config ./crates-tauri/yaak-app/tauri.release.conf.json --config '{"bundle":{"createUpdaterArtifacts":true,"windows":{"nsis":{"installMode":"perMachine"}}}}' + Push-Location crates-tauri/yaak-app-client + npx tauri bundle ${{ matrix.args }} --bundles nsis --config ./tauri.release.conf.json --config '{"bundle":{"createUpdaterArtifacts":true,"windows":{"nsis":{"installMode":"perMachine"}}}}' + Pop-Location $setup = Get-ChildItem -Recurse -Path target -Filter "*setup*.exe" | Select-Object -First 1 $setupSig = "$($setup.FullName).sig" $dest = $setup.FullName -replace '-setup\.exe$', '-setup-machine.exe' diff --git a/.github/workflows/release-cli-npm.yml b/.github/workflows/release-cli-npm.yml index e0413584..c08e687a 100644 --- a/.github/workflows/release-cli-npm.yml +++ b/.github/workflows/release-cli-npm.yml @@ -45,8 +45,8 @@ jobs: with: name: vendored-assets path: | - crates-tauri/yaak-app/vendored/plugin-runtime/index.cjs - crates-tauri/yaak-app/vendored/plugins + crates-tauri/yaak-app-client/vendored/plugin-runtime/index.cjs + crates-tauri/yaak-app-client/vendored/plugins if-no-files-found: error build-binaries: @@ -107,7 +107,7 @@ jobs: uses: actions/download-artifact@v4 with: name: vendored-assets - path: crates-tauri/yaak-app/vendored + path: crates-tauri/yaak-app-client/vendored - name: Set CLI build version shell: bash diff --git a/.gitignore b/.gitignore index c91877d6..5beed3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,8 @@ codebook.toml target # Per-worktree Tauri config (generated by post-checkout hook) -crates-tauri/yaak-app/tauri.worktree.conf.json +crates-tauri/yaak-app-client/tauri.worktree.conf.json +crates-tauri/yaak-app-proxy/tauri.worktree.conf.json # Tauri auto-generated permission files **/permissions/autogenerated diff --git a/.oxfmtignore b/.oxfmtignore new file mode 100644 index 00000000..0dca30df --- /dev/null +++ b/.oxfmtignore @@ -0,0 +1,3 @@ +**/bindings/** +**/routeTree.gen.ts +crates/yaak-templates/pkg/** diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 389ff9b4..682f3b97 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,4 +1,8 @@ { "printWidth": 100, - "ignorePatterns": ["**/bindings/**", "crates/yaak-templates/pkg/**", "src-web/routeTree.gen.ts"] + "ignorePatterns": [ + "**/bindings/**", + "crates/yaak-templates/pkg/**", + "apps/yaak-client/routeTree.gen.ts" + ] } diff --git a/Cargo.lock b/Cargo.lock index 9e0c5e2e..477efc5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -488,6 +488,28 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-lc-rs" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94bffc006df10ac2a68c83692d734a465f8ee6c5b384d8545a636f81d858f4bf" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4321e568ed89bb5a7d291a7f37997c2c0df89809d7b6d12062c81ddb54aa782e" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "axum" version = "0.7.9" @@ -2209,6 +2231,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -5132,6 +5160,16 @@ dependencies = [ "hmac", ] +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -5984,6 +6022,19 @@ dependencies = [ "cipher", ] +[[package]] +name = "rcgen" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" +dependencies = [ + "pem", + "ring", + "rustls-pki-types", + "time", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.5.12" @@ -6735,6 +6786,8 @@ version = "0.23.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" dependencies = [ + "aws-lc-rs", + "log 0.4.29", "once_cell", "ring", "rustls-pki-types", @@ -6807,6 +6860,7 @@ version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -10245,7 +10299,7 @@ dependencies = [ ] [[package]] -name = "yaak-app" +name = "yaak-app-client" version = "0.0.0" dependencies = [ "charset", @@ -10303,9 +10357,25 @@ dependencies = [ "yaak-tauri-utils", "yaak-templates", "yaak-tls", + "yaak-window", "yaak-ws", ] +[[package]] +name = "yaak-app-proxy" +version = "0.0.0" +dependencies = [ + "log 0.4.29", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-os", + "yaak-mac-window", + "yaak-proxy-lib", + "yaak-rpc", + "yaak-window", +] + [[package]] name = "yaak-cli" version = "0.1.0" @@ -10375,6 +10445,25 @@ dependencies = [ "yaak-models", ] +[[package]] +name = "yaak-database" +version = "0.1.0" +dependencies = [ + "chrono", + "include_dir", + "log 0.4.29", + "nanoid", + "r2d2", + "r2d2_sqlite", + "rusqlite", + "sea-query", + "sea-query-rusqlite", + "serde", + "serde_json", + "thiserror 2.0.17", + "ts-rs", +] + [[package]] name = "yaak-fonts" version = "0.1.0" @@ -10447,6 +10536,7 @@ dependencies = [ "hyper-util", "log 0.4.29", "mime_guess", + "native-tls", "regex 1.11.1", "reqwest", "serde", @@ -10516,6 +10606,7 @@ dependencies = [ "thiserror 2.0.17", "ts-rs", "yaak-core", + "yaak-database", ] [[package]] @@ -10547,6 +10638,52 @@ dependencies = [ "zip-extract", ] +[[package]] +name = "yaak-proxy" +version = "0.1.0" +dependencies = [ + "bytes", + "http", + "http-body-util", + "hyper", + "hyper-util", + "pem", + "rcgen", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "yaak-proxy-lib" +version = "0.0.0" +dependencies = [ + "chrono", + "include_dir", + "log 0.4.29", + "r2d2", + "r2d2_sqlite", + "rusqlite", + "sea-query", + "serde", + "serde_json", + "ts-rs", + "yaak-database", + "yaak-proxy", + "yaak-rpc", +] + +[[package]] +name = "yaak-rpc" +version = "0.0.0" +dependencies = [ + "log 0.4.29", + "serde", + "serde_json", + "ts-rs", +] + [[package]] name = "yaak-sse" version = "0.1.0" @@ -10612,6 +10749,17 @@ dependencies = [ "yaak-models", ] +[[package]] +name = "yaak-window" +version = "0.1.0" +dependencies = [ + "log 0.4.29", + "md5 0.8.0", + "rand 0.9.1", + "tauri", + "tokio", +] + [[package]] name = "yaak-ws" version = "0.1.0" @@ -10643,6 +10791,9 @@ name = "yasna" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] [[package]] name = "yoke" diff --git a/Cargo.toml b/Cargo.toml index acd11e16..48090c3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,9 @@ resolver = "2" members = [ "crates/yaak", + # Common/foundation crates + "crates/common/yaak-database", + "crates/common/yaak-rpc", # Shared crates (no Tauri dependency) "crates/yaak-core", "crates/yaak-common", @@ -17,14 +20,19 @@ members = [ "crates/yaak-tls", "crates/yaak-ws", "crates/yaak-api", + "crates/yaak-proxy", + # Proxy-specific crates + "crates-proxy/yaak-proxy-lib", # CLI crates "crates-cli/yaak-cli", # Tauri-specific crates - "crates-tauri/yaak-app", + "crates-tauri/yaak-app-client", + "crates-tauri/yaak-app-proxy", "crates-tauri/yaak-fonts", "crates-tauri/yaak-license", "crates-tauri/yaak-mac-window", "crates-tauri/yaak-tauri-utils", + "crates-tauri/yaak-window", ] [workspace.dependencies] @@ -47,6 +55,10 @@ thiserror = "2.0.17" tokio = "1.48.0" ts-rs = "11.1.0" +# Internal crates - common/foundation +yaak-database = { path = "crates/common/yaak-database" } +yaak-rpc = { path = "crates/common/yaak-rpc" } + # Internal crates - shared yaak-core = { path = "crates/yaak-core" } yaak = { path = "crates/yaak" } @@ -63,12 +75,17 @@ yaak-templates = { path = "crates/yaak-templates" } yaak-tls = { path = "crates/yaak-tls" } yaak-ws = { path = "crates/yaak-ws" } yaak-api = { path = "crates/yaak-api" } +yaak-proxy = { path = "crates/yaak-proxy" } + +# Internal crates - proxy +yaak-proxy-lib = { path = "crates-proxy/yaak-proxy-lib" } # Internal crates - Tauri-specific yaak-fonts = { path = "crates-tauri/yaak-fonts" } yaak-license = { path = "crates-tauri/yaak-license" } yaak-mac-window = { path = "crates-tauri/yaak-mac-window" } yaak-tauri-utils = { path = "crates-tauri/yaak-tauri-utils" } +yaak-window = { path = "crates-tauri/yaak-window" } [profile.release] strip = false diff --git a/README.md b/README.md index b60f8769..980d6048 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- +

diff --git a/src-web/.gitignore b/apps/yaak-client/.gitignore similarity index 100% rename from src-web/.gitignore rename to apps/yaak-client/.gitignore diff --git a/src-web/commands/commands.tsx b/apps/yaak-client/commands/commands.tsx similarity index 97% rename from src-web/commands/commands.tsx rename to apps/yaak-client/commands/commands.tsx index 5a44d67d..40618a77 100644 --- a/src-web/commands/commands.tsx +++ b/apps/yaak-client/commands/commands.tsx @@ -1,9 +1,9 @@ import { createWorkspaceModel, type Folder, modelTypeLabel } from "@yaakapp-internal/models"; import { applySync, calculateSync } from "@yaakapp-internal/sync"; -import { Banner } from "../components/core/Banner"; import { Button } from "../components/core/Button"; -import { InlineCode } from "../components/core/InlineCode"; import { + Banner, + InlineCode, Table, TableBody, TableCell, @@ -11,7 +11,7 @@ import { TableHeaderCell, TableRow, TruncatedWideTableCell, -} from "../components/core/Table"; +} from "@yaakapp-internal/ui"; import { activeWorkspaceIdAtom } from "../hooks/useActiveWorkspace"; import { createFastMutation } from "../hooks/useFastMutation"; import { showDialog } from "../lib/dialog"; diff --git a/src-web/commands/createEnvironment.tsx b/apps/yaak-client/commands/createEnvironment.tsx similarity index 100% rename from src-web/commands/createEnvironment.tsx rename to apps/yaak-client/commands/createEnvironment.tsx diff --git a/src-web/commands/deleteWebsocketConnections.ts b/apps/yaak-client/commands/deleteWebsocketConnections.ts similarity index 100% rename from src-web/commands/deleteWebsocketConnections.ts rename to apps/yaak-client/commands/deleteWebsocketConnections.ts diff --git a/src-web/commands/moveToWorkspace.tsx b/apps/yaak-client/commands/moveToWorkspace.tsx similarity index 100% rename from src-web/commands/moveToWorkspace.tsx rename to apps/yaak-client/commands/moveToWorkspace.tsx diff --git a/src-web/commands/openFolderSettings.tsx b/apps/yaak-client/commands/openFolderSettings.tsx similarity index 100% rename from src-web/commands/openFolderSettings.tsx rename to apps/yaak-client/commands/openFolderSettings.tsx diff --git a/src-web/commands/openSettings.tsx b/apps/yaak-client/commands/openSettings.tsx similarity index 100% rename from src-web/commands/openSettings.tsx rename to apps/yaak-client/commands/openSettings.tsx diff --git a/src-web/commands/openWorkspaceFromSyncDir.tsx b/apps/yaak-client/commands/openWorkspaceFromSyncDir.tsx similarity index 100% rename from src-web/commands/openWorkspaceFromSyncDir.tsx rename to apps/yaak-client/commands/openWorkspaceFromSyncDir.tsx diff --git a/src-web/commands/openWorkspaceSettings.tsx b/apps/yaak-client/commands/openWorkspaceSettings.tsx similarity index 100% rename from src-web/commands/openWorkspaceSettings.tsx rename to apps/yaak-client/commands/openWorkspaceSettings.tsx diff --git a/src-web/commands/switchWorkspace.tsx b/apps/yaak-client/commands/switchWorkspace.tsx similarity index 100% rename from src-web/commands/switchWorkspace.tsx rename to apps/yaak-client/commands/switchWorkspace.tsx diff --git a/src-web/components/BinaryFileEditor.tsx b/apps/yaak-client/components/BinaryFileEditor.tsx similarity index 93% rename from src-web/components/BinaryFileEditor.tsx rename to apps/yaak-client/components/BinaryFileEditor.tsx index a4a80d3d..7fc3d458 100644 --- a/src-web/components/BinaryFileEditor.tsx +++ b/apps/yaak-client/components/BinaryFileEditor.tsx @@ -1,10 +1,8 @@ import type { HttpRequest } from "@yaakapp-internal/models"; +import { Banner, HStack, InlineCode, VStack } from "@yaakapp-internal/ui"; import mime from "mime"; import { useKeyValue } from "../hooks/useKeyValue"; -import { Banner } from "./core/Banner"; import { Button } from "./core/Button"; -import { InlineCode } from "./core/InlineCode"; -import { HStack, VStack } from "./core/Stacks"; import { SelectFile } from "./SelectFile"; type Props = { diff --git a/src-web/components/CargoFeature.tsx b/apps/yaak-client/components/CargoFeature.tsx similarity index 100% rename from src-web/components/CargoFeature.tsx rename to apps/yaak-client/components/CargoFeature.tsx diff --git a/src-web/components/CloneGitRepositoryDialog.tsx b/apps/yaak-client/components/CloneGitRepositoryDialog.tsx similarity index 98% rename from src-web/components/CloneGitRepositoryDialog.tsx rename to apps/yaak-client/components/CloneGitRepositoryDialog.tsx index b0e27373..3b3e2af2 100644 --- a/src-web/components/CloneGitRepositoryDialog.tsx +++ b/apps/yaak-client/components/CloneGitRepositoryDialog.tsx @@ -1,15 +1,14 @@ import { open } from "@tauri-apps/plugin-dialog"; import { gitClone } from "@yaakapp-internal/git"; +import { Banner, VStack } from "@yaakapp-internal/ui"; import { useState } from "react"; import { openWorkspaceFromSyncDir } from "../commands/openWorkspaceFromSyncDir"; import { appInfo } from "../lib/appInfo"; import { showErrorToast } from "../lib/toast"; -import { Banner } from "./core/Banner"; import { Button } from "./core/Button"; import { Checkbox } from "./core/Checkbox"; import { IconButton } from "./core/IconButton"; import { PlainInput } from "./core/PlainInput"; -import { VStack } from "./core/Stacks"; import { promptCredentials } from "./git/credentials"; interface Props { diff --git a/src-web/components/ColorIndicator.tsx b/apps/yaak-client/components/ColorIndicator.tsx similarity index 100% rename from src-web/components/ColorIndicator.tsx rename to apps/yaak-client/components/ColorIndicator.tsx diff --git a/src-web/components/CommandPaletteDialog.tsx b/apps/yaak-client/components/CommandPaletteDialog.tsx similarity index 99% rename from src-web/components/CommandPaletteDialog.tsx rename to apps/yaak-client/components/CommandPaletteDialog.tsx index e0505f0c..eec1d3b9 100644 --- a/src-web/components/CommandPaletteDialog.tsx +++ b/apps/yaak-client/components/CommandPaletteDialog.tsx @@ -1,4 +1,5 @@ import { workspacesAtom } from "@yaakapp-internal/models"; +import { Heading, Icon, useDebouncedState } from "@yaakapp-internal/ui"; import classNames from "classnames"; import { fuzzyFilter } from "fuzzbunny"; import { useAtomValue } from "jotai"; @@ -21,7 +22,6 @@ import { useActiveRequest } from "../hooks/useActiveRequest"; import { activeWorkspaceIdAtom } from "../hooks/useActiveWorkspace"; import { useAllRequests } from "../hooks/useAllRequests"; import { useCreateWorkspace } from "../hooks/useCreateWorkspace"; -import { useDebouncedState } from "../hooks/useDebouncedState"; import { useEnvironmentsBreakdown } from "../hooks/useEnvironmentsBreakdown"; import { useGrpcRequestActions } from "../hooks/useGrpcRequestActions"; import type { HotkeyAction } from "../hooks/useHotKey"; @@ -47,10 +47,8 @@ import { router } from "../lib/router"; import { setWorkspaceSearchParams } from "../lib/setWorkspaceSearchParams"; import { CookieDialog } from "./CookieDialog"; import { Button } from "./core/Button"; -import { Heading } from "./core/Heading"; import { Hotkey } from "./core/Hotkey"; import { HttpMethodTag } from "./core/HttpMethodTag"; -import { Icon } from "./core/Icon"; import { PlainInput } from "./core/PlainInput"; interface CommandPaletteGroup { diff --git a/src-web/components/ConfirmLargeRequestBody.tsx b/apps/yaak-client/components/ConfirmLargeRequestBody.tsx similarity index 94% rename from src-web/components/ConfirmLargeRequestBody.tsx rename to apps/yaak-client/components/ConfirmLargeRequestBody.tsx index 574c5336..f8acf535 100644 --- a/src-web/components/ConfirmLargeRequestBody.tsx +++ b/apps/yaak-client/components/ConfirmLargeRequestBody.tsx @@ -1,14 +1,12 @@ import type { HttpRequest } from "@yaakapp-internal/models"; import { patchModel } from "@yaakapp-internal/models"; +import { Banner, HStack, InlineCode } from "@yaakapp-internal/ui"; import type { ReactNode } from "react"; import { useToggle } from "../hooks/useToggle"; import { showConfirm } from "../lib/confirm"; -import { Banner } from "./core/Banner"; import { Button } from "./core/Button"; -import { InlineCode } from "./core/InlineCode"; import { Link } from "./core/Link"; import { SizeTag } from "./core/SizeTag"; -import { HStack } from "./core/Stacks"; interface Props { children: ReactNode; diff --git a/src-web/components/ConfirmLargeResponse.tsx b/apps/yaak-client/components/ConfirmLargeResponse.tsx similarity index 94% rename from src-web/components/ConfirmLargeResponse.tsx rename to apps/yaak-client/components/ConfirmLargeResponse.tsx index a2b58cf9..90bb2c85 100644 --- a/src-web/components/ConfirmLargeResponse.tsx +++ b/apps/yaak-client/components/ConfirmLargeResponse.tsx @@ -1,4 +1,5 @@ import type { HttpResponse } from "@yaakapp-internal/models"; +import { Banner, HStack, InlineCode } from "@yaakapp-internal/ui"; import { type ReactNode, useMemo } from "react"; import { useSaveResponse } from "../hooks/useSaveResponse"; import { useToggle } from "../hooks/useToggle"; @@ -6,11 +7,8 @@ import { isProbablyTextContentType } from "../lib/contentType"; import { getContentTypeFromHeaders } from "../lib/model_util"; import { getResponseBodyText } from "../lib/responseBody"; import { CopyButton } from "./CopyButton"; -import { Banner } from "./core/Banner"; import { Button } from "./core/Button"; -import { InlineCode } from "./core/InlineCode"; import { SizeTag } from "./core/SizeTag"; -import { HStack } from "./core/Stacks"; interface Props { children: ReactNode; diff --git a/src-web/components/ConfirmLargeResponseRequest.tsx b/apps/yaak-client/components/ConfirmLargeResponseRequest.tsx similarity index 93% rename from src-web/components/ConfirmLargeResponseRequest.tsx rename to apps/yaak-client/components/ConfirmLargeResponseRequest.tsx index ea7f48a0..92525f70 100644 --- a/src-web/components/ConfirmLargeResponseRequest.tsx +++ b/apps/yaak-client/components/ConfirmLargeResponseRequest.tsx @@ -1,15 +1,13 @@ import type { HttpResponse } from "@yaakapp-internal/models"; +import { Banner, HStack, InlineCode } from "@yaakapp-internal/ui"; import { type ReactNode, useMemo } from "react"; import { getRequestBodyText as getHttpResponseRequestBodyText } from "../hooks/useHttpRequestBody"; import { useToggle } from "../hooks/useToggle"; import { isProbablyTextContentType } from "../lib/contentType"; import { getContentTypeFromHeaders } from "../lib/model_util"; import { CopyButton } from "./CopyButton"; -import { Banner } from "./core/Banner"; import { Button } from "./core/Button"; -import { InlineCode } from "./core/InlineCode"; import { SizeTag } from "./core/SizeTag"; -import { HStack } from "./core/Stacks"; interface Props { children: ReactNode; diff --git a/src-web/components/CookieDialog.tsx b/apps/yaak-client/components/CookieDialog.tsx similarity index 96% rename from src-web/components/CookieDialog.tsx rename to apps/yaak-client/components/CookieDialog.tsx index 34329188..6c8062c5 100644 --- a/src-web/components/CookieDialog.tsx +++ b/apps/yaak-client/components/CookieDialog.tsx @@ -2,9 +2,8 @@ import type { Cookie } from "@yaakapp-internal/models"; import { cookieJarsAtom, patchModel } from "@yaakapp-internal/models"; import { useAtomValue } from "jotai"; import { cookieDomain } from "../lib/model_util"; -import { Banner } from "./core/Banner"; +import { Banner, InlineCode } from "@yaakapp-internal/ui"; import { IconButton } from "./core/IconButton"; -import { InlineCode } from "./core/InlineCode"; interface Props { cookieJarId: string | null; diff --git a/src-web/components/CookieDropdown.tsx b/apps/yaak-client/components/CookieDropdown.tsx similarity index 97% rename from src-web/components/CookieDropdown.tsx rename to apps/yaak-client/components/CookieDropdown.tsx index 4e590497..7c64d6c8 100644 --- a/src-web/components/CookieDropdown.tsx +++ b/apps/yaak-client/components/CookieDropdown.tsx @@ -9,9 +9,8 @@ import { showPrompt } from "../lib/prompt"; import { setWorkspaceSearchParams } from "../lib/setWorkspaceSearchParams"; import { CookieDialog } from "./CookieDialog"; import { Dropdown, type DropdownItem } from "./core/Dropdown"; -import { Icon } from "./core/Icon"; +import { Icon, InlineCode } from "@yaakapp-internal/ui"; import { IconButton } from "./core/IconButton"; -import { InlineCode } from "./core/InlineCode"; export const CookieDropdown = memo(function CookieDropdown() { const activeCookieJar = useActiveCookieJar(); diff --git a/src-web/components/CopyButton.tsx b/apps/yaak-client/components/CopyButton.tsx similarity index 93% rename from src-web/components/CopyButton.tsx rename to apps/yaak-client/components/CopyButton.tsx index 93f0c1f7..2a0da485 100644 --- a/src-web/components/CopyButton.tsx +++ b/apps/yaak-client/components/CopyButton.tsx @@ -1,4 +1,4 @@ -import { useTimedBoolean } from "../hooks/useTimedBoolean"; +import { useTimedBoolean } from "@yaakapp-internal/ui"; import { copyToClipboard } from "../lib/copy"; import { showToast } from "../lib/toast"; import type { ButtonProps } from "./core/Button"; diff --git a/src-web/components/CopyIconButton.tsx b/apps/yaak-client/components/CopyIconButton.tsx similarity index 83% rename from src-web/components/CopyIconButton.tsx rename to apps/yaak-client/components/CopyIconButton.tsx index a828103a..a97a032c 100644 --- a/src-web/components/CopyIconButton.tsx +++ b/apps/yaak-client/components/CopyIconButton.tsx @@ -1,8 +1,6 @@ -import { useTimedBoolean } from "../hooks/useTimedBoolean"; +import { IconButton, type IconButtonProps, useTimedBoolean } from "@yaakapp-internal/ui"; import { copyToClipboard } from "../lib/copy"; import { showToast } from "../lib/toast"; -import type { IconButtonProps } from "./core/IconButton"; -import { IconButton } from "./core/IconButton"; interface Props extends Omit { text: string | (() => Promise); diff --git a/src-web/components/CreateDropdown.tsx b/apps/yaak-client/components/CreateDropdown.tsx similarity index 100% rename from src-web/components/CreateDropdown.tsx rename to apps/yaak-client/components/CreateDropdown.tsx diff --git a/src-web/components/CreateEnvironmentDialog.tsx b/apps/yaak-client/components/CreateEnvironmentDialog.tsx similarity index 100% rename from src-web/components/CreateEnvironmentDialog.tsx rename to apps/yaak-client/components/CreateEnvironmentDialog.tsx diff --git a/src-web/components/CreateWorkspaceDialog.tsx b/apps/yaak-client/components/CreateWorkspaceDialog.tsx similarity index 98% rename from src-web/components/CreateWorkspaceDialog.tsx rename to apps/yaak-client/components/CreateWorkspaceDialog.tsx index 86eb8503..339206d5 100644 --- a/src-web/components/CreateWorkspaceDialog.tsx +++ b/apps/yaak-client/components/CreateWorkspaceDialog.tsx @@ -1,6 +1,7 @@ import { gitMutations } from "@yaakapp-internal/git"; import type { WorkspaceMeta } from "@yaakapp-internal/models"; import { createGlobalModel, updateModel } from "@yaakapp-internal/models"; +import { VStack } from "@yaakapp-internal/ui"; import { useState } from "react"; import { router } from "../lib/router"; import { setupOrConfigureEncryption } from "../lib/setupOrConfigureEncryption"; @@ -10,7 +11,6 @@ import { Button } from "./core/Button"; import { Checkbox } from "./core/Checkbox"; import { Label } from "./core/Label"; import { PlainInput } from "./core/PlainInput"; -import { VStack } from "./core/Stacks"; import { EncryptionHelp } from "./EncryptionHelp"; import { gitCallbacks } from "./git/callbacks"; import { SyncToFilesystemSetting } from "./SyncToFilesystemSetting"; diff --git a/src-web/components/Dialogs.tsx b/apps/yaak-client/components/Dialogs.tsx similarity index 100% rename from src-web/components/Dialogs.tsx rename to apps/yaak-client/components/Dialogs.tsx diff --git a/src-web/components/DnsOverridesEditor.tsx b/apps/yaak-client/components/DnsOverridesEditor.tsx similarity index 97% rename from src-web/components/DnsOverridesEditor.tsx rename to apps/yaak-client/components/DnsOverridesEditor.tsx index 60948de3..bcdb5483 100644 --- a/src-web/components/DnsOverridesEditor.tsx +++ b/apps/yaak-client/components/DnsOverridesEditor.tsx @@ -1,13 +1,21 @@ import type { DnsOverride, Workspace } from "@yaakapp-internal/models"; import { patchModel } from "@yaakapp-internal/models"; -import { useCallback, useId, useMemo } from "react"; import { fireAndForget } from "../lib/fireAndForget"; +import { + HStack, + Table, + TableBody, + TableCell, + TableHead, + TableHeaderCell, + TableRow, + VStack, +} from "@yaakapp-internal/ui"; +import { useCallback, useId, useMemo } from "react"; import { Button } from "./core/Button"; import { Checkbox } from "./core/Checkbox"; import { IconButton } from "./core/IconButton"; import { PlainInput } from "./core/PlainInput"; -import { HStack, VStack } from "./core/Stacks"; -import { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from "./core/Table"; interface Props { workspace: Workspace; diff --git a/src-web/components/DropMarker.tsx b/apps/yaak-client/components/DropMarker.tsx similarity index 100% rename from src-web/components/DropMarker.tsx rename to apps/yaak-client/components/DropMarker.tsx diff --git a/src-web/components/DynamicForm.tsx b/apps/yaak-client/components/DynamicForm.tsx similarity index 99% rename from src-web/components/DynamicForm.tsx rename to apps/yaak-client/components/DynamicForm.tsx index 91d49890..167f4fdb 100644 --- a/src-web/components/DynamicForm.tsx +++ b/apps/yaak-client/components/DynamicForm.tsx @@ -11,6 +11,7 @@ import type { FormInputText, JsonPrimitive, } from "@yaakapp-internal/plugins"; +import { Banner, VStack } from "@yaakapp-internal/ui"; import classNames from "classnames"; import { useAtomValue } from "jotai"; import { useCallback, useEffect, useMemo } from "react"; @@ -19,7 +20,6 @@ import { useRandomKey } from "../hooks/useRandomKey"; import { capitalize } from "../lib/capitalize"; import { showDialog } from "../lib/dialog"; import { resolvedModelName } from "../lib/resolvedModelName"; -import { Banner } from "./core/Banner"; import { Checkbox } from "./core/Checkbox"; import { DetailsBanner } from "./core/DetailsBanner"; import { Editor } from "./core/Editor/LazyEditor"; @@ -31,7 +31,6 @@ import type { Pair } from "./core/PairEditor"; import { PairEditor } from "./core/PairEditor"; import { PlainInput } from "./core/PlainInput"; import { Select } from "./core/Select"; -import { VStack } from "./core/Stacks"; import { Markdown } from "./Markdown"; import { SelectFile } from "./SelectFile"; diff --git a/src-web/components/EmptyStateText.tsx b/apps/yaak-client/components/EmptyStateText.tsx similarity index 100% rename from src-web/components/EmptyStateText.tsx rename to apps/yaak-client/components/EmptyStateText.tsx diff --git a/src-web/components/EncryptionHelp.tsx b/apps/yaak-client/components/EncryptionHelp.tsx similarity index 87% rename from src-web/components/EncryptionHelp.tsx rename to apps/yaak-client/components/EncryptionHelp.tsx index 920cdf75..96985ab0 100644 --- a/src-web/components/EncryptionHelp.tsx +++ b/apps/yaak-client/components/EncryptionHelp.tsx @@ -1,4 +1,4 @@ -import { VStack } from "./core/Stacks"; +import { VStack } from "@yaakapp-internal/ui"; export function EncryptionHelp() { return ( diff --git a/src-web/components/EnvironmentActionsDropdown.tsx b/apps/yaak-client/components/EnvironmentActionsDropdown.tsx similarity index 98% rename from src-web/components/EnvironmentActionsDropdown.tsx rename to apps/yaak-client/components/EnvironmentActionsDropdown.tsx index f93c6872..429f8e9b 100644 --- a/src-web/components/EnvironmentActionsDropdown.tsx +++ b/apps/yaak-client/components/EnvironmentActionsDropdown.tsx @@ -8,7 +8,7 @@ import type { ButtonProps } from "./core/Button"; import { Button } from "./core/Button"; import type { DropdownItem } from "./core/Dropdown"; import { Dropdown } from "./core/Dropdown"; -import { Icon } from "./core/Icon"; +import { Icon } from "@yaakapp-internal/ui"; import { EnvironmentColorIndicator } from "./EnvironmentColorIndicator"; type Props = { diff --git a/src-web/components/EnvironmentColorIndicator.tsx b/apps/yaak-client/components/EnvironmentColorIndicator.tsx similarity index 100% rename from src-web/components/EnvironmentColorIndicator.tsx rename to apps/yaak-client/components/EnvironmentColorIndicator.tsx diff --git a/src-web/components/EnvironmentColorPicker.tsx b/apps/yaak-client/components/EnvironmentColorPicker.tsx similarity index 95% rename from src-web/components/EnvironmentColorPicker.tsx rename to apps/yaak-client/components/EnvironmentColorPicker.tsx index 7c561ec7..2b5310c6 100644 --- a/src-web/components/EnvironmentColorPicker.tsx +++ b/apps/yaak-client/components/EnvironmentColorPicker.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { ColorIndicator } from "./ColorIndicator"; -import { Banner } from "./core/Banner"; +import { Banner } from "@yaakapp-internal/ui"; import { Button } from "./core/Button"; import { ColorPickerWithThemeColors } from "./core/ColorPicker"; diff --git a/src-web/components/EnvironmentEditDialog.tsx b/apps/yaak-client/components/EnvironmentEditDialog.tsx similarity index 79% rename from src-web/components/EnvironmentEditDialog.tsx rename to apps/yaak-client/components/EnvironmentEditDialog.tsx index c7a6a6a9..effc819d 100644 --- a/src-web/components/EnvironmentEditDialog.tsx +++ b/apps/yaak-client/components/EnvironmentEditDialog.tsx @@ -1,34 +1,38 @@ import type { Environment, Workspace } from "@yaakapp-internal/models"; import { duplicateModel, patchModel } from "@yaakapp-internal/models"; +import type { TreeHandle, TreeNode, TreeProps } from "@yaakapp-internal/ui"; +import { Banner, Icon, InlineCode, SplitLayout, Tree } from "@yaakapp-internal/ui"; import { atom, useAtomValue } from "jotai"; -import { useCallback, useLayoutEffect, useMemo, useRef, useState } from "react"; +import { atomFamily } from "jotai/utils"; +import { useCallback, useLayoutEffect, useRef, useState } from "react"; import { createSubEnvironmentAndActivate } from "../commands/createEnvironment"; import { activeWorkspaceAtom, activeWorkspaceIdAtom } from "../hooks/useActiveWorkspace"; import { environmentsBreakdownAtom, useEnvironmentsBreakdown, } from "../hooks/useEnvironmentsBreakdown"; +import { useHotKey } from "../hooks/useHotKey"; +import { atomWithKVStorage } from "../lib/atoms/atomWithKVStorage"; import { deleteModelWithConfirm } from "../lib/deleteModelWithConfirm"; import { fireAndForget } from "../lib/fireAndForget"; import { jotaiStore } from "../lib/jotai"; import { isBaseEnvironment, isSubEnvironment } from "../lib/model_util"; import { resolvedModelName } from "../lib/resolvedModelName"; import { showColorPicker } from "../lib/showColorPicker"; -import { Banner } from "./core/Banner"; import type { ContextMenuProps, DropdownItem } from "./core/Dropdown"; -import { Icon } from "./core/Icon"; +import { ContextMenu } from "./core/Dropdown"; import { IconButton } from "./core/IconButton"; import { IconTooltip } from "./core/IconTooltip"; -import { InlineCode } from "./core/InlineCode"; import type { PairEditorHandle } from "./core/PairEditor"; -import { SplitLayout } from "./core/SplitLayout"; -import type { TreeNode } from "./core/tree/common"; -import type { TreeHandle, TreeProps } from "./core/tree/Tree"; -import { Tree } from "./core/tree/Tree"; import { EnvironmentColorIndicator } from "./EnvironmentColorIndicator"; import { EnvironmentEditor } from "./EnvironmentEditor"; import { EnvironmentSharableTooltip } from "./EnvironmentSharableTooltip"; +const collapsedFamily = atomFamily((treeId: string) => { + const key = ["env_collapsed", treeId ?? "n/a"]; + return atomWithKVStorage>(key, {}); +}); + interface Props { initialEnvironmentId: string | null; setRef?: (ref: PairEditorHandle | null) => void; @@ -49,7 +53,7 @@ export function EnvironmentEditDialog({ initialEnvironmentId, setRef }: Props) { return ( (null); const { baseEnvironment, baseEnvironments } = useEnvironmentsBreakdown(); - // oxlint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line react-hooks/exhaustive-deps -- none useLayoutEffect(() => { if (selectedEnvironmentId == null) return; treeRef.current?.selectItem(selectedEnvironmentId); @@ -130,44 +134,60 @@ function EnvironmentEditDialogSidebar({ [baseEnvironment?.id, selectedEnvironmentId, setSelectedEnvironmentId], ); - const actions = useMemo(() => { - const enable = () => treeRef.current?.hasFocus() ?? false; + const treeHasFocus = useCallback(() => treeRef.current?.hasFocus() ?? false, []); - const actions = { - "sidebar.selected.rename": { - enable, - allowDefault: true, - priority: 100, - cb: async (items: TreeModel[]) => { - const item = items[0]; - if (items.length === 1 && item != null) { - treeRef.current?.renameItem(item.id); - } - }, - }, - "sidebar.selected.delete": { - priority: 100, - enable, - cb: (items: TreeModel[]) => deleteModelWithConfirm(items), - }, - "sidebar.selected.duplicate": { - priority: 100, - enable, - cb: async (items: TreeModel[]) => { - if (items.length === 1 && items[0]) { - const item = items[0]; - const newId = await duplicateModel(item); - setSelectedEnvironmentId(newId); - } else { - await Promise.all(items.map(duplicateModel)); - } - }, - }, - } as const; - return actions; - }, [setSelectedEnvironmentId]); + const getSelectedTreeModels = useCallback( + () => treeRef.current?.getSelectedItems() as TreeModel[] | undefined, + [], + ); - const hotkeys = useMemo["hotkeys"]>(() => ({ actions }), [actions]); + const handleRenameSelected = useCallback(() => { + const items = getSelectedTreeModels(); + if (items?.length === 1 && items[0] != null) { + treeRef.current?.renameItem(items[0].id); + } + }, [getSelectedTreeModels]); + + const handleDeleteSelected = useCallback( + (items: TreeModel[]) => deleteModelWithConfirm(items), + [], + ); + + const handleDuplicateSelected = useCallback( + async (items: TreeModel[]) => { + if (items.length === 1 && items[0]) { + const newId = await duplicateModel(items[0]); + setSelectedEnvironmentId(newId); + } else { + await Promise.all(items.map(duplicateModel)); + } + }, + [setSelectedEnvironmentId], + ); + + useHotKey("sidebar.selected.rename", handleRenameSelected, { + enable: treeHasFocus, + allowDefault: true, + priority: 100, + }); + useHotKey( + "sidebar.selected.delete", + useCallback(() => { + const items = getSelectedTreeModels(); + if (items) { + fireAndForget(handleDeleteSelected(items)); + } + }, [getSelectedTreeModels, handleDeleteSelected]), + { enable: treeHasFocus, priority: 100 }, + ); + useHotKey( + "sidebar.selected.duplicate", + useCallback(async () => { + const items = getSelectedTreeModels(); + if (items) await handleDuplicateSelected(items); + }, [getSelectedTreeModels, handleDuplicateSelected]), + { enable: treeHasFocus, priority: 100 }, + ); const getContextMenu = useCallback( (items: TreeModel[]): ContextMenuProps["items"] => { @@ -196,12 +216,10 @@ function EnvironmentEditDialogSidebar({ hidden: isBaseEnvironment(environment) || !singleEnvironment, hotKeyAction: "sidebar.selected.rename", hotKeyLabelOnly: true, - onSelect: async () => { + onSelect: () => { // Not sure why this is needed, but without it the // edit input blurs immediately after opening. - requestAnimationFrame(() => { - fireAndForget(actions["sidebar.selected.rename"].cb(items)); - }); + requestAnimationFrame(() => handleRenameSelected()); }, }, { @@ -210,7 +228,7 @@ function EnvironmentEditDialogSidebar({ hidden: isBaseEnvironment(environment), hotKeyAction: "sidebar.selected.duplicate", hotKeyLabelOnly: true, - onSelect: () => actions["sidebar.selected.duplicate"].cb(items), + onSelect: () => handleDuplicateSelected(items), }, { label: environment.color ? "Change Color" : "Assign Color", @@ -246,7 +264,12 @@ function EnvironmentEditDialogSidebar({ return menuItems; }, - [actions, baseEnvironments.length, handleDeleteEnvironment], + [ + baseEnvironments.length, + handleDeleteEnvironment, + handleDuplicateSelected, + handleRenameSelected, + ], ); const handleDragEnd = useCallback(async function handleDragEnd({ @@ -293,6 +316,13 @@ function EnvironmentEditDialogSidebar({ [setSelectedEnvironmentId], ); + const renderContextMenuFn = useCallback["renderContextMenu"]>>( + ({ items, position, onClose }) => ( + + ), + [], + ); + const tree = useAtomValue(treeAtom); return (