Move inlinecode to shared ui package

This commit is contained in:
Gregory Schier
2026-03-12 19:32:04 -07:00
parent d253d1605c
commit 4d792c7f9f
36 changed files with 35 additions and 56 deletions

View File

@@ -1,9 +1,9 @@
import { createWorkspaceModel, type Folder, modelTypeLabel } from '@yaakapp-internal/models';
import { applySync, calculateSync } from '@yaakapp-internal/sync';
import { Button } from '../components/core/Button';
import { InlineCode } from '../components/core/InlineCode';
import {
Banner,
InlineCode,
Table,
TableBody,
TableCell,

View File

@@ -1,9 +1,8 @@
import type { HttpRequest } from '@yaakapp-internal/models';
import mime from 'mime';
import { useKeyValue } from '../hooks/useKeyValue';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { InlineCode } from './core/InlineCode';
import { HStack, VStack } from './core/Stacks';
import { SelectFile } from './SelectFile';

View File

@@ -3,9 +3,8 @@ import { patchModel } from '@yaakapp-internal/models';
import type { ReactNode } from 'react';
import { useToggle } from '../hooks/useToggle';
import { showConfirm } from '../lib/confirm';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
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';

View File

@@ -6,9 +6,8 @@ import { isProbablyTextContentType } from '../lib/contentType';
import { getContentTypeFromHeaders } from '../lib/model_util';
import { getResponseBodyText } from '../lib/responseBody';
import { CopyButton } from './CopyButton';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { InlineCode } from './core/InlineCode';
import { SizeTag } from './core/SizeTag';
import { HStack } from './core/Stacks';

View File

@@ -5,9 +5,8 @@ import { useToggle } from '../hooks/useToggle';
import { isProbablyTextContentType } from '../lib/contentType';
import { getContentTypeFromHeaders } from '../lib/model_util';
import { CopyButton } from './CopyButton';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { InlineCode } from './core/InlineCode';
import { SizeTag } from './core/SizeTag';
import { HStack } from './core/Stacks';

View File

@@ -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 '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { IconButton } from './core/IconButton';
import { InlineCode } from './core/InlineCode';
interface Props {
cookieJarId: string | null;

View File

@@ -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 '@yaakapp-internal/ui';
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();

View File

@@ -1,7 +1,7 @@
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, SplitLayout, Tree } from '@yaakapp-internal/ui';
import { Banner, Icon, InlineCode, SplitLayout, Tree } from '@yaakapp-internal/ui';
import { atom, useAtomValue } from 'jotai';
import { atomFamily } from 'jotai/utils';
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
@@ -22,7 +22,6 @@ import type { ContextMenuProps, DropdownItem } from './core/Dropdown';
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 { EnvironmentColorIndicator } from './EnvironmentColorIndicator';
import { EnvironmentEditor } from './EnvironmentEditor';

View File

@@ -1,9 +1,8 @@
import type { ErrorInfo, ReactNode } from 'react';
import { Component, useEffect } from 'react';
import { showDialog } from '../lib/dialog';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { InlineCode } from './core/InlineCode';
import RouteError from './RouteError';
interface ErrorBoundaryProps {

View File

@@ -15,8 +15,7 @@ import { hideDialog } from '../lib/dialog';
import { CopyIconButton } from './CopyIconButton';
import { Button } from './core/Button';
import { CountBadge } from './core/CountBadge';
import { Icon } from '@yaakapp-internal/ui';
import { InlineCode } from './core/InlineCode';
import { Icon, InlineCode } from '@yaakapp-internal/ui';
import { Input } from './core/Input';
import { Link } from './core/Link';
import { HStack, VStack } from './core/Stacks';

View File

@@ -19,7 +19,7 @@ import { Button } from './core/Button';
import type { EditorProps } from './core/Editor/Editor';
import { Editor } from './core/Editor/LazyEditor';
import { FormattedError } from './core/FormattedError';
import { InlineCode } from './core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { VStack } from './core/Stacks';
import { GrpcProtoSelectionDialog } from './GrpcProtoSelectionDialog';

View File

@@ -5,9 +5,8 @@ import { useGrpc } from '../hooks/useGrpc';
import { useGrpcProtoFiles } from '../hooks/useGrpcProtoFiles';
import { pluralizeCount } from '../lib/pluralize';
import { Button } from './core/Button';
import { Banner, Icon } from '@yaakapp-internal/ui';
import { Banner, Icon, InlineCode } from '@yaakapp-internal/ui';
import { IconButton } from './core/IconButton';
import { InlineCode } from './core/InlineCode';
import { Link } from './core/Link';
import { HStack, VStack } from './core/Stacks';

View File

@@ -14,9 +14,8 @@ import { useInheritedAuthentication } from '../hooks/useInheritedAuthentication'
import { useRenderTemplate } from '../hooks/useRenderTemplate';
import { resolvedModelName } from '../lib/resolvedModelName';
import { Dropdown, type DropdownItem } from './core/Dropdown';
import { Icon } from '@yaakapp-internal/ui';
import { Icon, InlineCode } from '@yaakapp-internal/ui';
import { IconButton } from './core/IconButton';
import { InlineCode } from './core/InlineCode';
import { Input, type InputProps } from './core/Input';
import { Link } from './core/Link';
import { SegmentedControl } from './core/SegmentedControl';

View File

@@ -38,7 +38,7 @@ import { ConfirmLargeRequestBody } from './ConfirmLargeRequestBody';
import { CountBadge } from './core/CountBadge';
import type { GenericCompletionConfig } from './core/Editor/genericCompletion';
import { Editor } from './core/Editor/LazyEditor';
import { InlineCode } from './core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import type { Pair } from './core/PairEditor';
import { PlainInput } from './core/PlainInput';
import type { TabItem, TabsRef } from './core/Tabs/Tabs';

View File

@@ -6,8 +6,8 @@ import { pluralizeCount } from '../lib/pluralize';
import { resolvedModelName } from '../lib/resolvedModelName';
import { router } from '../lib/router';
import { showToast } from '../lib/toast';
import { InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { InlineCode } from './core/InlineCode';
import { Select } from './core/Select';
import { VStack } from './core/Stacks';

View File

@@ -8,7 +8,7 @@ import { Checkbox } from '../core/Checkbox';
import { DetailsBanner } from '../core/DetailsBanner';
import { Heading } from '../core/Heading';
import { IconButton } from '../core/IconButton';
import { InlineCode } from '../core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { PlainInput } from '../core/PlainInput';
import { Separator } from '../core/Separator';
import { HStack, VStack } from '../core/Stacks';

View File

@@ -12,7 +12,7 @@ import {
import classNames from 'classnames';
import { useAtomValue } from 'jotai';
import { useState } from 'react';
import { Icon, LoadingIcon, useDebouncedValue } from '@yaakapp-internal/ui';
import { Icon, InlineCode, LoadingIcon, useDebouncedValue } from '@yaakapp-internal/ui';
import { useInstallPlugin } from '../../hooks/useInstallPlugin';
import { usePluginInfo } from '../../hooks/usePluginInfo';
import { usePluginsKey, useRefreshPlugins } from '../../hooks/usePlugins';
@@ -22,7 +22,6 @@ import { Button } from '../core/Button';
import { Checkbox } from '../core/Checkbox';
import { CountBadge } from '../core/CountBadge';
import { IconButton } from '../core/IconButton';
import { InlineCode } from '../core/InlineCode';
import { Link } from '../core/Link';
import { PlainInput } from '../core/PlainInput';
import { HStack } from '../core/Stacks';

View File

@@ -3,7 +3,7 @@ import { useAtomValue } from 'jotai';
import { Checkbox } from '../core/Checkbox';
import { Heading } from '../core/Heading';
import { InlineCode } from '../core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { PlainInput } from '../core/PlainInput';
import { Select } from '../core/Select';
import { Separator } from '../core/Separator';

View File

@@ -60,10 +60,10 @@ import {
Tree,
isSelectedFamily,
selectedIdsFamily,
InlineCode,
} from '@yaakapp-internal/ui';
import type { TreeNode, TreeHandle, TreeProps, TreeItemProps } from '@yaakapp-internal/ui';
import { IconButton } from './core/IconButton';
import { InlineCode } from './core/InlineCode';
import type { InputHandle } from './core/Input';
import { Input } from './core/Input';
import { atomWithKVStorage } from '../lib/atoms/atomWithKVStorage';

View File

@@ -5,8 +5,7 @@ import { useState } from 'react';
import { switchWorkspace } from '../commands/switchWorkspace';
import { Button } from './core/Button';
import { Checkbox } from './core/Checkbox';
import { Icon } from '@yaakapp-internal/ui';
import { InlineCode } from './core/InlineCode';
import { Icon, InlineCode } from '@yaakapp-internal/ui';
import { HStack, VStack } from './core/Stacks';
interface Props {

View File

@@ -12,7 +12,7 @@ import { parseTemplate } from '@yaakapp-internal/templates';
import classNames from 'classnames';
import { useEffect, useMemo, useState } from 'react';
import { activeWorkspaceAtom } from '../hooks/useActiveWorkspace';
import { useDebouncedValue } from '@yaakapp-internal/ui';
import { InlineCode, LoadingIcon, useDebouncedValue } from '@yaakapp-internal/ui';
import { useRenderTemplate } from '../hooks/useRenderTemplate';
import { useTemplateFunctionConfig } from '../hooks/useTemplateFunctionConfig';
import {
@@ -27,8 +27,6 @@ import { setupOrConfigureEncryption } from '../lib/setupOrConfigureEncryption';
import { Button } from './core/Button';
import { collectArgumentValues } from './core/Editor/twig/util';
import { IconButton } from './core/IconButton';
import { InlineCode } from './core/InlineCode';
import { LoadingIcon } from '@yaakapp-internal/ui';
import { PlainInput } from './core/PlainInput';
import { HStack } from './core/Stacks';
import { DYNAMIC_FORM_NULL_ARG, DynamicForm } from './DynamicForm';

View File

@@ -6,10 +6,9 @@ import { useInheritedHeaders } from '../hooks/useInheritedHeaders';
import { deleteModelWithConfirm } from '../lib/deleteModelWithConfirm';
import { router } from '../lib/router';
import { CopyIconButton } from './CopyIconButton';
import { Banner } from '@yaakapp-internal/ui';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
import { Button } from './core/Button';
import { CountBadge } from './core/CountBadge';
import { InlineCode } from './core/InlineCode';
import { PlainInput } from './core/PlainInput';
import { HStack, VStack } from './core/Stacks';
import { TabContent, Tabs } from './core/Tabs/Tabs';

View File

@@ -18,8 +18,7 @@ import { Button } from '../core/Button';
import type { CheckboxProps } from '../core/Checkbox';
import { Checkbox } from '../core/Checkbox';
import { DiffViewer } from '../core/Editor/DiffViewer';
import { Banner, Icon, SplitLayout } from '@yaakapp-internal/ui';
import { InlineCode } from '../core/InlineCode';
import { Banner, Icon, InlineCode, SplitLayout } from '@yaakapp-internal/ui';
import { Input } from '../core/Input';
import { Separator } from '../core/Separator';
import { HStack } from '../core/Stacks';

View File

@@ -15,8 +15,7 @@ import { showPrompt } from '../../lib/prompt';
import { showErrorToast, showToast } from '../../lib/toast';
import type { DropdownItem } from '../core/Dropdown';
import { Dropdown } from '../core/Dropdown';
import { Banner, Icon } from '@yaakapp-internal/ui';
import { InlineCode } from '../core/InlineCode';
import { Banner, Icon, InlineCode } from '@yaakapp-internal/ui';
import { gitCallbacks } from './callbacks';
import { GitCommitDialog } from './GitCommitDialog';
import { GitRemotesDialog } from './GitRemotesDialog';

View File

@@ -1,6 +1,5 @@
import { showPromptForm } from '../../lib/prompt-form';
import { Banner } from '@yaakapp-internal/ui';
import { InlineCode } from '../core/InlineCode';
import { Banner, InlineCode } from '@yaakapp-internal/ui';
export interface GitCredentials {
username: string;

View File

@@ -1,8 +1,8 @@
import type { DivergedStrategy } from '@yaakapp-internal/git';
import { useState } from 'react';
import { showDialog } from '../../lib/dialog';
import { InlineCode } from '@yaakapp-internal/ui';
import { Button } from '../core/Button';
import { InlineCode } from '../core/InlineCode';
import { RadioCards } from '../core/RadioCards';
import { HStack } from '../core/Stacks';

View File

@@ -2,8 +2,7 @@ import type { HttpResponse } from '@yaakapp-internal/models';
import { useSaveResponse } from '../../hooks/useSaveResponse';
import { getContentTypeFromHeaders } from '../../lib/model_util';
import { Button } from '../core/Button';
import { InlineCode } from '../core/InlineCode';
import { Banner, LoadingIcon } from '@yaakapp-internal/ui';
import { Banner, InlineCode, LoadingIcon } from '@yaakapp-internal/ui';
import { EmptyStateText } from '../EmptyStateText';
interface Props {

View File

@@ -10,8 +10,7 @@ import type { EditorProps } from '../core/Editor/Editor';
import { Editor } from '../core/Editor/LazyEditor';
import { EventDetailHeader, EventViewer } from '../core/EventViewer';
import { EventViewerRow } from '../core/EventViewerRow';
import { Icon } from '@yaakapp-internal/ui';
import { InlineCode } from '../core/InlineCode';
import { Icon, InlineCode } from '@yaakapp-internal/ui';
import { HStack, VStack } from '../core/Stacks';
interface Props {

View File

@@ -1,6 +1,6 @@
import { useAtomValue } from 'jotai';
import { useEffect, useState } from 'react';
import { InlineCode } from '../components/core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { showToast } from '../lib/toast';
import { activeWorkspaceAtom } from './useActiveWorkspace';

View File

@@ -3,9 +3,8 @@ import { modelTypeLabel, patchModel } from '@yaakapp-internal/models';
import { useMemo } from 'react';
import { openFolderSettings } from '../commands/openFolderSettings';
import { openWorkspaceSettings } from '../commands/openWorkspaceSettings';
import { Icon } from '@yaakapp-internal/ui';
import { Icon, InlineCode } from '@yaakapp-internal/ui';
import { IconTooltip } from '../components/core/IconTooltip';
import { InlineCode } from '../components/core/InlineCode';
import { HStack } from '../components/core/Stacks';
import type { TabItem } from '../components/core/Tabs/Tabs';
import { capitalize } from '../lib/capitalize';

View File

@@ -1,5 +1,5 @@
import { useMutation } from '@tanstack/react-query';
import { InlineCode } from '../components/core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { showAlert } from '../lib/alert';
import { appInfo } from '../lib/appInfo';
import { minPromiseMillis } from '../lib/minPromiseMillis';

View File

@@ -3,7 +3,7 @@ import type { HttpResponse } from '@yaakapp-internal/models';
import { getModel } from '@yaakapp-internal/models';
import mime from 'mime';
import slugify from 'slugify';
import { InlineCode } from '../components/core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { getContentTypeFromHeaders } from '../lib/model_util';
import { invokeCmd } from '../lib/tauri';
import { showToast } from '../lib/toast';

View File

@@ -1,6 +1,6 @@
import type { AnyModel } from '@yaakapp-internal/models';
import { deleteModel, modelTypeLabel } from '@yaakapp-internal/models';
import { InlineCode } from '../components/core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { Prose } from '../components/Prose';
import { showConfirmDelete } from './confirm';
import { pluralizeCount } from './pluralize';

View File

@@ -1,6 +1,6 @@
import type { AnyModel } from '@yaakapp-internal/models';
import { patchModel } from '@yaakapp-internal/models';
import { InlineCode } from '../components/core/InlineCode';
import { InlineCode } from '@yaakapp-internal/ui';
import { showPrompt } from './prompt';
export async function renameModelWithPrompt(model: Extract<AnyModel, { name: string }> | null) {

View File

@@ -33,3 +33,4 @@ export { Portal } from "./components/Portal";
export { usePortal } from "./hooks/usePortal";
export { Banner } from "./components/Banner";
export type { BannerProps } from "./components/Banner";
export { InlineCode } from "./components/InlineCode";