@e-llm-studio/repo-data-cart 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +50 -0
  2. package/dist/app/api/repo.api.service.d.ts +4 -0
  3. package/dist/app/components/badges/Badge.d.ts +46 -0
  4. package/dist/app/components/buttons/PrimaryButtonNative.d.ts +22 -0
  5. package/dist/app/components/cards/ActionCard.d.ts +26 -0
  6. package/dist/app/components/cards/CustomRadioCard.d.ts +9 -0
  7. package/dist/app/components/cards/GithubRepoRadioCard.d.ts +51 -0
  8. package/dist/app/components/cards/RepoCard.d.ts +32 -0
  9. package/dist/app/components/checkboxes/Checkbox.d.ts +29 -0
  10. package/dist/app/components/chips/CustomChip.d.ts +7 -0
  11. package/dist/app/components/containers/HighlightedIndex.d.ts +5 -0
  12. package/dist/app/components/containers/StandardContainer.d.ts +23 -0
  13. package/dist/app/components/form-components/SearchInput.d.ts +13 -0
  14. package/dist/app/components/icon-components/circularRingIcon.d.ts +10 -0
  15. package/dist/app/components/loaders/Spinner.d.ts +31 -0
  16. package/dist/app/components/seperators/Divider.d.ts +28 -0
  17. package/dist/app/components/skeletons/RepoSkeleton.d.ts +3 -0
  18. package/dist/app/components/ui/CodebaseCart.d.ts +50 -0
  19. package/dist/app/components/ui/EmptyCart.d.ts +18 -0
  20. package/dist/app/components/ui/MultiRepoAction.d.ts +22 -0
  21. package/dist/app/components/ui/NoCodebaseFound.d.ts +12 -0
  22. package/dist/app/components/ui/RepoLoading.d.ts +1 -0
  23. package/dist/app/components/ui/RepoSelectorHeader.d.ts +32 -0
  24. package/dist/app/pages/RepoSelectorDetailPage.d.ts +22 -0
  25. package/dist/app/services/converter.service.d.ts +4 -0
  26. package/dist/app/store/repo-data.store.d.ts +28 -0
  27. package/dist/app/types/types.d.ts +86 -0
  28. package/dist/app/utils/helper.d.ts +8 -0
  29. package/dist/index.d.ts +5 -0
  30. package/dist/repo-data-cart.js +7822 -0
  31. package/dist/repo-data-cart.umd.cjs +114 -0
  32. package/dist/vite.svg +1 -0
  33. package/package.json +58 -0
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default tseslint.config({
18
+ languageOptions: {
19
+ // other options...
20
+ parserOptions: {
21
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
+ tsconfigRootDir: import.meta.dirname,
23
+ },
24
+ },
25
+ });
26
+ ```
27
+
28
+ - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
+ - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
+
32
+ ```js
33
+ // eslint.config.js
34
+ import react from 'eslint-plugin-react';
35
+
36
+ export default tseslint.config({
37
+ // Set the react version
38
+ settings: { react: { version: '18.3' } },
39
+ plugins: {
40
+ // Add the react plugin
41
+ react,
42
+ },
43
+ rules: {
44
+ // other rules...
45
+ // Enable its recommended rules
46
+ ...react.configs.recommended.rules,
47
+ ...react.configs['jsx-runtime'].rules,
48
+ },
49
+ });
50
+ ```
@@ -0,0 +1,4 @@
1
+ import { IExistingRepoData } from '../types/types';
2
+ export default class RepoApiService {
3
+ static getRepos(url: string): Promise<IExistingRepoData[]>;
4
+ }
@@ -0,0 +1,46 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type BadgeColor = 'default' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
4
+ export type BadgeVariant = 'standard' | 'dot';
5
+ export type BadgeOverlap = 'rectangular' | 'circular';
6
+ export interface BadgeAnchorOrigin {
7
+ vertical: 'top' | 'bottom';
8
+ horizontal: 'left' | 'right';
9
+ }
10
+ export type BadgeSlotProps = {
11
+ root?: SlotProps<'span'>;
12
+ badge?: SlotProps<'span'>;
13
+ };
14
+ export type BadgeProps = BadgeSlotProps & {
15
+ children: React.ReactNode;
16
+ badgeContent?: React.ReactNode;
17
+ color?: BadgeColor;
18
+ variant?: BadgeVariant;
19
+ anchorOrigin?: BadgeAnchorOrigin;
20
+ overlap?: BadgeOverlap;
21
+ max?: number;
22
+ showZero?: boolean;
23
+ invisible?: boolean;
24
+ className?: string;
25
+ slotProps?: BadgeSlotProps;
26
+ };
27
+ /**
28
+ * Badge — a Material UI-style notification badge.
29
+ *
30
+ * <Badge badgeContent={4} color="primary">
31
+ * <MailIcon />
32
+ * </Badge>
33
+ *
34
+ * Every Tailwind class this component applies internally can be
35
+ * overridden by the consumer:
36
+ * - `className` -> merged onto the outer wrapper span
37
+ * - `badgeClassName` -> merged onto the badge bubble itself
38
+ *
39
+ * Because both props are appended *after* the component's own
40
+ * classes, a conflicting utility supplied by the consumer (e.g.
41
+ * `bg-black` to override the default `bg-blue-600`) will win as
42
+ * long as your Tailwind build places user-authored classes after
43
+ * component classes in the generated stylesheet (true for a
44
+ * standard single Tailwind build, which is the common case).
45
+ */
46
+ export declare function Badge({ children, badgeContent, color, variant, anchorOrigin, overlap, max, showZero, invisible, className, slotProps, }: BadgeProps): React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type PrimaryButtonSlotProps = {
4
+ root?: SlotProps<'button'> & {
5
+ disabledClassName?: string;
6
+ };
7
+ content?: SlotProps<'div'>;
8
+ icon?: SlotProps<'span'>;
9
+ label?: SlotProps<'span'>;
10
+ };
11
+ export type PrimaryButtonNativeProps = {
12
+ children: React.ReactNode;
13
+ disabled?: boolean;
14
+ iconProps?: {
15
+ icon?: React.ReactNode;
16
+ iconPos?: 'left' | 'right';
17
+ loadingIcon?: React.ReactNode;
18
+ };
19
+ slotProps?: PrimaryButtonSlotProps;
20
+ loading?: boolean;
21
+ };
22
+ export default function PrimaryButtonNative({ children, disabled, loading, iconProps, slotProps, }: PrimaryButtonNativeProps): React.JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type ActionCardSlotProps = {
4
+ root?: SlotProps<'button'>;
5
+ icon?: SlotProps<'span'>;
6
+ content?: SlotProps<'span'>;
7
+ title?: SlotProps<'span'>;
8
+ description?: SlotProps<'span'>;
9
+ arrow?: SlotProps<'div'>;
10
+ };
11
+ export interface ActionCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
12
+ icon: React.ReactNode;
13
+ title: string;
14
+ description: string;
15
+ arrowIcon?: React.ReactNode;
16
+ slotProps?: ActionCardSlotProps;
17
+ }
18
+ /**
19
+ * ActionCard
20
+ *
21
+ * A clickable row card with an icon tile on the left,
22
+ * title and description in the middle, and an optional
23
+ * arrow on the right.
24
+ */
25
+ export declare function ActionCard({ icon, title, description, arrowIcon, slotProps, className, type, ...rest }: ActionCardProps): React.JSX.Element;
26
+ export default ActionCard;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface CustomRadioCardProps {
3
+ children?: React.ReactNode;
4
+ selected?: boolean;
5
+ disabled?: boolean;
6
+ onSelect?: () => void;
7
+ }
8
+ declare const CustomRadioCard: React.FC<CustomRadioCardProps>;
9
+ export default CustomRadioCard;
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ import { ChipProps } from '../chips/CustomChip';
4
+ interface GithubRepoRadioCardProps {
5
+ title: string;
6
+ description: string;
7
+ organization: string;
8
+ repoUrl: string;
9
+ branch: string;
10
+ lastAnalyzedDate: string;
11
+ itemNumber: number;
12
+ selected?: boolean;
13
+ disabled?: boolean;
14
+ status: string;
15
+ onSelect?: () => void;
16
+ showNavigateToAppModeOption?: boolean;
17
+ onDescriptionClick?: () => void;
18
+ disableShowNavigation?: boolean;
19
+ slot?: {
20
+ root?: SlotProps<'div'>;
21
+ headerContainer?: SlotProps<'div'>;
22
+ titleText?: SlotProps<'p'>;
23
+ chipsContainer?: SlotProps<'div'>;
24
+ githubChip?: {
25
+ root?: ChipProps;
26
+ icon?: React.ReactNode;
27
+ textContainer?: SlotProps<'span'>;
28
+ };
29
+ branchChip?: {
30
+ root?: SlotProps<'p'>;
31
+ icon?: React.ReactNode;
32
+ textContainer?: SlotProps<'span'>;
33
+ };
34
+ descriptionText?: SlotProps<'span'>;
35
+ lastAnalyzedContainer?: SlotProps<'div'>;
36
+ viewButton?: {
37
+ root?: SlotProps<'button'>;
38
+ icon?: React.ReactNode;
39
+ label?: string;
40
+ };
41
+ };
42
+ customComponents?: {
43
+ headerComponent?: React.ReactNode;
44
+ chipsComponent?: React.ReactNode;
45
+ descriptionComponent?: React.ReactNode;
46
+ lastAnalyzedComponent?: React.ReactNode;
47
+ viewButtonComponent?: React.ReactNode;
48
+ };
49
+ }
50
+ declare const GithubRepoRadioCard: React.FC<GithubRepoRadioCardProps>;
51
+ export default GithubRepoRadioCard;
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export interface RepoCardStatus {
4
+ icon: React.ReactNode;
5
+ text: string;
6
+ }
7
+ export type RepoCardSlotProps = {
8
+ root?: SlotProps<'div'>;
9
+ header?: SlotProps<'div'>;
10
+ main?: SlotProps<'div'>;
11
+ checkbox?: SlotProps<'button'>;
12
+ icon?: SlotProps<'span'>;
13
+ title?: SlotProps<'span'>;
14
+ status?: SlotProps<'span'>;
15
+ actions?: SlotProps<'div'>;
16
+ openAction?: SlotProps<'button'>;
17
+ removeAction?: SlotProps<'button'>;
18
+ description?: SlotProps<'p'>;
19
+ };
20
+ export interface RepoCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
21
+ icon: React.ReactNode;
22
+ title: string;
23
+ status?: RepoCardStatus;
24
+ description: string;
25
+ checked?: boolean;
26
+ onCheckedChange?: (checked: boolean) => void;
27
+ onOpen?: () => void;
28
+ onRemove?: () => void;
29
+ slotProps?: RepoCardSlotProps;
30
+ }
31
+ export declare function RepoCard({ icon, title, status, description, checked, onCheckedChange, onOpen, onRemove, className, slotProps, ...rest }: RepoCardProps): React.JSX.Element;
32
+ export default RepoCard;
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type CheckboxColor = 'default' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
4
+ export type CheckboxSize = 'small' | 'medium';
5
+ type CheckboxInputSlotProps = Omit<SlotProps<'input'>, 'type' | 'checked' | 'disabled' | 'id'>;
6
+ export type CheckboxSlotProps = {
7
+ root?: SlotProps<'label'>;
8
+ control?: SlotProps<'span'>;
9
+ input?: CheckboxInputSlotProps;
10
+ box?: SlotProps<'span'>;
11
+ indeterminate?: SlotProps<'span'>;
12
+ icon?: SlotProps<'svg'>;
13
+ label?: SlotProps<'span'>;
14
+ };
15
+ export type CheckboxProps = {
16
+ color?: CheckboxColor;
17
+ size?: CheckboxSize;
18
+ /** Shows a dash instead of a check, without affecting `checked`. */
19
+ indeterminate?: boolean;
20
+ /** Optional label rendered next to the box. */
21
+ label?: React.ReactNode;
22
+ /** Customization for individual component slots. */
23
+ slotProps?: CheckboxSlotProps;
24
+ disabled?: boolean;
25
+ checked?: boolean;
26
+ id?: string;
27
+ };
28
+ export declare function Checkbox({ color, size, indeterminate, label, disabled, checked, id, slotProps, }: CheckboxProps): React.JSX.Element;
29
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React, HTMLAttributes } from 'react';
2
+ export type ChipProps = HTMLAttributes<HTMLParagraphElement> & {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ };
6
+ declare const Chip: ({ children, className, ...rest }: ChipProps) => React.JSX.Element;
7
+ export default Chip;
@@ -0,0 +1,5 @@
1
+ declare const HighlightedIndex: ({ index, className }: {
2
+ index: string | number;
3
+ className?: string;
4
+ }) => import("react").JSX.Element;
5
+ export default HighlightedIndex;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type StandardContainerSlotProps = {
4
+ root?: SlotProps<'div'>;
5
+ header?: SlotProps<'div'>;
6
+ title?: SlotProps<'h2'>;
7
+ actions?: SlotProps<'div'>;
8
+ content?: SlotProps<'div'>;
9
+ };
10
+ export interface StandardContainerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'title'> {
11
+ title: React.ReactNode;
12
+ actions?: React.ReactNode;
13
+ children: React.ReactNode;
14
+ slotProps?: StandardContainerSlotProps;
15
+ }
16
+ /**
17
+ * StandardContainer
18
+ *
19
+ * A generic container with a header row containing a title and
20
+ * optional actions, followed by a content area.
21
+ */
22
+ export declare function StandardContainer({ title, actions, children, className, slotProps, ...rest }: StandardContainerProps): React.JSX.Element;
23
+ export default StandardContainer;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ interface SearchInputProps {
3
+ searchTerm: string;
4
+ placeholder?: string;
5
+ slotProps?: {
6
+ container?: string;
7
+ icon?: string;
8
+ input?: string;
9
+ };
10
+ handleOnChange?: (value: string) => void;
11
+ }
12
+ declare const SearchInput: React.FC<SearchInputProps>;
13
+ export default SearchInput;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export type CircularRingIconContainerProps = {
3
+ icon: React.ReactNode;
4
+ size?: number;
5
+ slotStyles?: {
6
+ outerCircle?: string;
7
+ innerCircle?: string;
8
+ };
9
+ };
10
+ export default function CircularRingIconContainer({ icon, size, slotStyles, }: CircularRingIconContainerProps): React.JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ export type SpinnerColor = 'default' | 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success' | 'white';
3
+ export type SpinnerSize = 'small' | 'medium' | 'large' | number;
4
+ export interface SpinnerProps extends React.SVGAttributes<SVGSVGElement> {
5
+ color?: SpinnerColor;
6
+ /** "small" | "medium" | "large", or an exact pixel number. */
7
+ size?: SpinnerSize;
8
+ /** Stroke thickness, in the SVG's own coordinate units (default 4). */
9
+ thickness?: number;
10
+ /** Determinate mode: 0–100. Omit for indeterminate (spinning) mode. */
11
+ value?: number;
12
+ /** Accessible label read by screen readers. */
13
+ label?: string;
14
+ /** Merged onto the root <svg>. */
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Spinner — a Material UI-style circular progress indicator.
19
+ *
20
+ * <Spinner />
21
+ * <Spinner color="secondary" size="large" />
22
+ * <Spinner size={28} thickness={5} />
23
+ * <Spinner value={72} /> // determinate
24
+ * <Spinner className="text-pink-500" /> // Tailwind override
25
+ *
26
+ * Color and size are driven by CSS (currentColor + width/height), so
27
+ * a Tailwind class passed via `className` — e.g. `text-pink-500` or
28
+ * `h-10 w-10` — overrides the built-in `color`/`size` props, since
29
+ * it's merged in last.
30
+ */
31
+ export declare function Spinner({ color, size, thickness, value, label, className, ...rest }: SpinnerProps): React.JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ export type DividerOrientation = 'horizontal' | 'vertical';
4
+ export type DividerTextAlign = 'left' | 'center' | 'right';
5
+ export type DividerSlotProps = {
6
+ root?: SlotProps<'div'>;
7
+ line?: SlotProps<'span'>;
8
+ text?: SlotProps<'span'>;
9
+ };
10
+ export interface DividerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
11
+ /** Optional label placed inline on the divider line. */
12
+ children?: React.ReactNode;
13
+ orientation?: DividerOrientation;
14
+ /** Where the text sits along the line — only applies with `children`. */
15
+ textAlign?: DividerTextAlign;
16
+ /** Inset the line from both edges, like MUI's `inset` variant. */
17
+ inset?: boolean;
18
+ /** Customization for individual component slots. */
19
+ slotProps?: DividerSlotProps;
20
+ }
21
+ /**
22
+ * Divider
23
+ *
24
+ * A horizontal or vertical divider, optionally carrying inline text
25
+ * at the start, center, or end.
26
+ */
27
+ export declare function Divider({ children, orientation, textAlign, inset, className, slotProps, ...rest }: DividerProps): React.JSX.Element;
28
+ export default Divider;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const GithubRepoRadioCardSkeleton: React.FC;
3
+ export default GithubRepoRadioCardSkeleton;
@@ -0,0 +1,50 @@
1
+ import { SlotProps, TCodebaseInCart } from '../../types/types';
2
+ import { DividerProps } from '../seperators/Divider';
3
+ import { ActionCardProps } from '../cards/ActionCard';
4
+ import { RepoCardProps } from '../cards/RepoCard';
5
+ import { StandardContainerProps } from '../containers/StandardContainer';
6
+ import { EmptyCartProps } from './EmptyCart';
7
+ export type CodebaseCartProps = {
8
+ onCodebaseAdd?: () => void;
9
+ reposInCart: TCodebaseInCart[];
10
+ onOpenCodebaseFromCart?: (repo: TCodebaseInCart) => void;
11
+ onRemoveCodebaseFromCart?: (repo: TCodebaseInCart) => void;
12
+ onSelectionChange?: (repo: TCodebaseInCart) => void;
13
+ onSearchAll?: () => void;
14
+ isSearchAllEnabled?: boolean;
15
+ slot?: {
16
+ root?: SlotProps<'div'>;
17
+ standardContainer?: {
18
+ root?: StandardContainerProps;
19
+ actionButton?: SlotProps<'button'>;
20
+ icon?: React.ReactNode;
21
+ };
22
+ emptyCartContainer?: {
23
+ root?: SlotProps<'div'>;
24
+ emptyCartIcon?: EmptyCartProps;
25
+ actionCardContainer?: {
26
+ root?: SlotProps<'div'>;
27
+ actionCard?: ActionCardProps;
28
+ };
29
+ };
30
+ allRepoContainer?: {
31
+ root?: SlotProps<'div'>;
32
+ singleRepoContainer?: {
33
+ root?: SlotProps<'div'>;
34
+ getRepoCardProps?: (repo: TCodebaseInCart) => RepoCardProps;
35
+ };
36
+ };
37
+ divider?: {
38
+ root?: DividerProps;
39
+ textElement?: SlotProps<'span'>;
40
+ text?: string;
41
+ };
42
+ searchAllActionCard?: ActionCardProps;
43
+ };
44
+ customComponents?: {
45
+ emptyCartComponent?: React.ReactNode;
46
+ searchAllActionCardComponent?: React.ReactNode;
47
+ renderRepoCard?: (repo: TCodebaseInCart, index: number) => React.ReactNode;
48
+ };
49
+ };
50
+ export declare function CodebaseCart({ onCodebaseAdd, reposInCart, onOpenCodebaseFromCart, onRemoveCodebaseFromCart, onSelectionChange, onSearchAll, isSearchAllEnabled, slot, customComponents, }: CodebaseCartProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { LucideIcon } from 'lucide-react';
3
+ import { SlotProps } from '../../types/types';
4
+ export type EmptyCartSlotProps = {
5
+ root?: SlotProps<'div'>;
6
+ iconContainer?: SlotProps<'div'>;
7
+ icon?: SlotProps<'svg'>;
8
+ title?: SlotProps<'h2'>;
9
+ description?: SlotProps<'p'>;
10
+ };
11
+ export interface EmptyCartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
12
+ icon: LucideIcon;
13
+ title: string;
14
+ description: string;
15
+ slotProps?: EmptyCartSlotProps;
16
+ }
17
+ declare const EmptyCart: ({ icon: Icon, title, description, className, slotProps, ...rest }: EmptyCartProps) => React.JSX.Element;
18
+ export default EmptyCart;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { SlotProps } from '../../types/types';
3
+ import { CodebaseCartProps } from './CodebaseCart';
4
+ import { BadgeProps } from '../badges/Badge';
5
+ interface MultiRepoActionProps {
6
+ slots?: {
7
+ root?: SlotProps<'div'>;
8
+ cartContainer?: {
9
+ root?: SlotProps<'div'>;
10
+ cart?: CodebaseCartProps;
11
+ };
12
+ badge?: {
13
+ root?: BadgeProps;
14
+ badgeButton?: {
15
+ root?: SlotProps<'button'>;
16
+ icon?: React.ReactNode;
17
+ };
18
+ };
19
+ };
20
+ }
21
+ export default function MultiRepoAction({ slots }: MultiRepoActionProps): React.JSX.Element;
22
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CircularRingIconContainerProps } from '../icon-components/circularRingIcon';
2
+ import { SlotProps } from '../../types/types';
3
+ export type NoCodebaseFoundProps = {
4
+ slot?: {
5
+ root?: SlotProps<'div'>;
6
+ textContainer?: SlotProps<'div'>;
7
+ headingText?: SlotProps<'h3'>;
8
+ descriptionText?: SlotProps<'p'>;
9
+ iconContainerProps?: CircularRingIconContainerProps;
10
+ };
11
+ };
12
+ export default function NoCodebaseFound({ slot }: NoCodebaseFoundProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function RepoLoading(): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { PrimaryButtonSlotProps } from '../buttons/PrimaryButtonNative';
2
+ import { SlotProps } from '../../types/types';
3
+ export type RepoSelectorHeaderProps = {
4
+ showProceedButton: boolean;
5
+ showSearchBar?: boolean;
6
+ showFilter?: boolean;
7
+ proceedButtonText?: string;
8
+ fallbackButtonText?: string;
9
+ onProceed: () => void;
10
+ onExitRepoSelection: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
11
+ slots?: {
12
+ root?: SlotProps<'div'>;
13
+ headingText?: SlotProps<'h1'>;
14
+ actionsContainerSlots?: {
15
+ root?: SlotProps<'div'>;
16
+ searchInputContainerSlots?: {
17
+ root?: SlotProps<'div'>;
18
+ searchIcon?: React.ReactNode;
19
+ input?: SlotProps<'input'>;
20
+ };
21
+ filterButtonSlots?: {
22
+ root?: SlotProps<'button'>;
23
+ filterIcon?: React.ReactNode;
24
+ text?: SlotProps<'span'>;
25
+ chevronIcon?: React.ReactNode;
26
+ };
27
+ proceedButtonSlots?: PrimaryButtonSlotProps;
28
+ exitButtonSlots?: PrimaryButtonSlotProps;
29
+ };
30
+ };
31
+ };
32
+ export default function RepoSelectorHeader({ showProceedButton, showSearchBar, showFilter, proceedButtonText, fallbackButtonText, onProceed, onExitRepoSelection, slots, }: RepoSelectorHeaderProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { SlotProps, TCodebase } from '../types/types';
2
+ import { RepoSelectorHeaderProps } from '../components/ui/RepoSelectorHeader';
3
+ import { DividerProps } from '../components/seperators/Divider';
4
+ import { NoCodebaseFoundProps } from '../components/ui/NoCodebaseFound';
5
+ type RepoSelectorDetailPageProps = {
6
+ fetchRepoUrl: string;
7
+ fetchRepos?: () => TCodebase[];
8
+ showToast?: (message: string) => void;
9
+ slots?: {
10
+ repoSelectionHeaderProps: RepoSelectorHeaderProps;
11
+ dividerProps?: DividerProps;
12
+ repoDataContainer: SlotProps<'div'>;
13
+ noCodebaseFoundProps?: NoCodebaseFoundProps;
14
+ };
15
+ customComponents?: {
16
+ repoLoadingComponent?: React.ReactNode;
17
+ renderRepoComponent?: (repo: TCodebase) => React.ReactNode;
18
+ noCodebaseFoundComponent?: React.ReactNode;
19
+ };
20
+ };
21
+ export default function RepoSelectorDetailPage({ fetchRepoUrl, fetchRepos, slots, customComponents, }: RepoSelectorDetailPageProps): import("react").JSX.Element;
22
+ export {};
@@ -0,0 +1,4 @@
1
+ import { IExistingRepoData, TCodebase } from '../types/types';
2
+ export default class ConverterService {
3
+ static convertRepoApiDataToStateData(repositories: IExistingRepoData[]): TCodebase[];
4
+ }
@@ -0,0 +1,28 @@
1
+ import { TCodebase } from '../types/types';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ export type IRepoAddedToCart = {
4
+ id: string;
5
+ selected: boolean;
6
+ };
7
+ type RepoDataProviderProps = {
8
+ children?: React.ReactNode;
9
+ repoData: TCodebase[];
10
+ setRepoData: Dispatch<SetStateAction<TCodebase[]>>;
11
+ isSearchingAcrossAllRepo: boolean;
12
+ setIsSearchingAcrossAllRepo: Dispatch<SetStateAction<boolean>>;
13
+ isRepositorySelectorPageOpen: boolean;
14
+ setIsRepositorySelectorPageOpen: Dispatch<SetStateAction<boolean>>;
15
+ refreshRepoData: boolean;
16
+ showToast?: (type: 'success' | 'error' | 'warning', message: string, subMessage?: string) => void;
17
+ };
18
+ type TRepoContextInternalData = {
19
+ reposAddedToCart: IRepoAddedToCart[];
20
+ setRepoAddedToCart: Dispatch<SetStateAction<IRepoAddedToCart[]>>;
21
+ isRepoDataLoaded: boolean;
22
+ setIsRepoDataLoaded: Dispatch<SetStateAction<boolean>>;
23
+ updateCartRepoById: (id: string, updater: (item: IRepoAddedToCart) => IRepoAddedToCart) => void;
24
+ };
25
+ export declare const RepoDataContext: import('react').Context<(RepoDataProviderProps & TRepoContextInternalData) | undefined>;
26
+ export declare const RepoDataProvider: ({ children, repoData, setRepoData, isSearchingAcrossAllRepo, setIsSearchingAcrossAllRepo, isRepositorySelectorPageOpen, setIsRepositorySelectorPageOpen, refreshRepoData, showToast, }: RepoDataProviderProps) => import("react").JSX.Element;
27
+ export declare function useRepoData(): RepoDataProviderProps & TRepoContextInternalData;
28
+ export {};