@app-studio/web 0.5.0 → 0.6.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.
@@ -5,8 +5,13 @@ export declare class DocuCode {
5
5
  private readonly cacheKey;
6
6
  constructor(cacheKey: string);
7
7
  commentCodeFile(filePath: string, assistantId: string): Promise<void>;
8
- processComments(filePath: string, commentsJson: any): Promise<void>;
9
- insertCommentIntoFile(filePath: string, line: number, comment: string): Promise<void>;
8
+ processComments(filePath: string, code: string, commentsJson: any): Promise<void>;
10
9
  removeCommentsAndCleanFile(filePath: string): Promise<void>;
11
10
  processDirectory(dirPath: string, assistantId: string): Promise<any>;
11
+ splitArrayToJSON(code: string): {
12
+ line: number;
13
+ code: string;
14
+ }[];
15
+ insertComments(code: string, comments: any[]): string;
16
+ compareStrings(line: string, codeSnippet: string): boolean;
12
17
  }
@@ -1 +1 @@
1
- export declare const CommentPrompt: (codeContent: string) => string;
1
+ export declare const CommentPrompt: (componentName: string, fileName: string, codeContent: string) => string;
@@ -3,85 +3,25 @@ import { Shadow } from 'app-studio';
3
3
  import { Elevation } from '../../../utils/elevation';
4
4
  import { IconPosition, Shape, Size, Variant, LoaderPosition, Effects } from './Button.type';
5
5
  import { LoaderProps } from '../../Loader/Loader/Loader.props';
6
- /**
7
- * Represents the properties for the Button component.
8
- */
9
6
  export interface ButtonProps {
10
- /**
11
- * The content to be rendered inside the button.
12
- */
13
7
  children?: React.ReactNode;
14
- /**
15
- * Sets the background color of the button.
16
- */
17
8
  colorScheme?: string;
18
- /**
19
- * Specifies the external URL used when the variant is set to "link".
20
- */
21
9
  externalHref?: string;
22
- /**
23
- * Indicates whether the button is in a loading state.
24
- */
25
10
  isLoading?: boolean;
26
- /**
27
- * Indicates whether the button is in a loading state.
28
- */
29
11
  loaderProps?: LoaderProps;
30
- /**
31
- * Specifies the position of the icon within the button.
32
- */
33
12
  loaderPosition?: LoaderPosition;
34
- /**
35
- * The icon component rendered within the button.
36
- */
37
13
  icon?: React.ReactNode;
38
- /**
39
- * Specifies the position of the icon within the button.
40
- */
41
14
  iconPosition?: IconPosition;
42
- /**
43
- * Disables the button if set to true.
44
- */
45
15
  isDisabled?: boolean;
46
- /**
47
- * Adjusts the width of the button to take available space.
48
- */
49
16
  isFilled?: boolean;
50
- /**
51
- * Adjusts the width of the button based on content size.
52
- */
53
17
  isAuto?: boolean;
54
- /**
55
- * Makes the icon container shape rounded if set to true.
56
- */
57
18
  isIconRounded?: boolean;
58
- /**
59
- * The event handler called when the button is clicked or pressed.
60
- */
61
19
  onClick?: Function;
62
- /**
63
- * Specifies the size of the button's text and padding.
64
- */
65
20
  size?: Size;
66
- /**
67
- * Sets a shadow effect applied to the button.
68
- */
69
21
  shadow?: Shadow | Elevation | CSSProperties;
70
- /**
71
- * Specifies the shape of the button's corners.
72
- */
73
22
  shape?: Shape;
74
- /**
75
- * Descriptive label for accessibility (ARIA) purposes.
76
- */
77
23
  ariaLabel?: string;
78
- /**
79
- * Specifies the style variant of the button.
80
- */
81
24
  variant?: Variant;
82
25
  effect?: Effects;
83
- /**
84
- * Additional properties for the button component.
85
- */
86
26
  [x: string]: any;
87
27
  }
@@ -1,6 +1,3 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from './Button/Button.props';
3
- /**
4
- * Buttons allow us to trigger an event or an action with a single click.
5
- */
6
3
  export declare const Button: React.FC<ButtonProps>;
@@ -3,96 +3,29 @@ import { Elevation } from 'src/utils/elevation';
3
3
  import { Shadow } from 'app-studio';
4
4
  import { CheckboxStyles, Size } from './Checkbox.type';
5
5
  export interface CheckboxProps {
6
- /**
7
- * The identifier for the checkbox.
8
- */
9
6
  id?: string;
10
- /**
11
- * Custom icon to be displayed when the checkbox is checked.
12
- */
13
7
  icon?: React.ReactNode;
14
- /**
15
- * Indicates whether the checkbox has an error.
16
- */
17
8
  error?: boolean;
18
- /**
19
- * The name of the checkbox element.
20
- */
21
9
  name?: string;
22
- /**
23
- * The label of the checkbox.
24
- */
25
10
  label?: string;
26
- /**
27
- * Changes the background color of the checkbox.
28
- */
29
11
  colorScheme?: string;
30
- /**
31
- * Give control on the selected state of the checkbox component.
32
- */
33
12
  isChecked?: boolean;
34
- /**
35
- * Allows you to set the initial state of the checkbox without controlling its value
36
- */
37
13
  defaultIsSelected?: boolean;
38
- /**
39
- * If true, the checkbox cannot be interacted with.
40
- */
41
14
  isReadOnly?: boolean;
42
- /**
43
- * If true, the checkbox is disabled and cannot be selected.
44
- */
45
15
  isDisabled?: boolean;
46
- /**
47
- * Indicates that the checkbox is neither checked nor unchecked.
48
- */
49
16
  isIndeterminate?: boolean;
50
- /**
51
- * Label position
52
- */
53
17
  labelPosition?: 'left' | 'right';
54
- /**
55
- * Handler function called when the controlled checkbox value changes.
56
- */
57
18
  onChange?: Function;
58
- /**
59
- * Handler function called when the checkbox value changes on iOS and Android devices.
60
- */
61
19
  onValueChange?: Function;
62
- /**
63
- * CSS styles
64
- */
65
20
  styles?: CheckboxStyles;
66
- /**
67
- * Sets the height and width of the checkbox.
68
- */
69
21
  size?: Size;
70
- /**
71
- * Sets a shadow effect for the checkbox.
72
- */
73
22
  shadow?: Shadow | Elevation | CSSProperties;
74
- /**
75
- * Other additional properties.
76
- */
23
+ infoText?: string;
77
24
  [x: string]: any;
78
25
  }
79
26
  export interface CheckboxViewProps extends CheckboxProps {
80
- /**
81
- * Indicates whether the checkbox is currently being hovered.
82
- */
83
27
  isHovered?: boolean;
84
- /**
85
- * A function to set the hovered state of the checkbox.
86
- * @param hovered - The hovered state to set.
87
- */
88
28
  setIsHovered?: (hovered: boolean) => void;
89
- /**
90
- * Indicates whether the checkbox is selected/checked.
91
- */
92
29
  isChecked?: boolean;
93
- /**
94
- * A function to set the selected state of the checkbox.
95
- * @param selected - The selected state to set.
96
- */
97
30
  setIsChecked?: (selected: boolean) => void;
98
31
  }
@@ -9,3 +9,4 @@ export * from './ReadOnlyInput';
9
9
  export * from './Shadow';
10
10
  export * from './SizeInput';
11
11
  export * from './StylesInput';
12
+ export * from './infoText';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const InfoTextDemo: () => React.JSX.Element;
@@ -1,36 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { Headings, Sizes, TextWeights } from './Label.type';
3
3
  export interface LabelProps {
4
- /**
5
- * The text content
6
- */
7
4
  children: React.ReactNode;
8
- /**
9
- * Specify a heading html tag.
10
- */
11
5
  heading?: Headings;
12
- /**
13
- * If true, the text is styled in italic
14
- */
15
6
  isItalic?: boolean;
16
- /**
17
- * Marks up a text to indicate that it is no longer valid
18
- */
19
7
  isStriked?: boolean;
20
- /**
21
- * If true, it underline the text
22
- */
23
8
  isUnderlined?: boolean;
24
- /**
25
- * Changes the text-size
26
- */
27
9
  size?: Sizes | number;
28
- /**
29
- * Changes the font weight of the text
30
- */
31
10
  weight?: TextWeights;
32
- /**
33
- * Other properties
34
- */
35
11
  [x: string]: any;
36
12
  }
@@ -71,6 +71,7 @@ export interface SelectProps {
71
71
  * Applies a shadow effect to the select field.
72
72
  */
73
73
  shadow?: Shadow | Elevation | CSSProperties;
74
+ isScrollable?: boolean;
74
75
  /**
75
76
  * Additional properties and attributes for the select field.
76
77
  */
@@ -9,6 +9,8 @@ export declare const useSelectState: ({ placeholder, isMulti, options, }: Select
9
9
  setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
10
10
  isFocused: boolean;
11
11
  setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
12
+ highlightedIndex: number;
13
+ setHighlightedIndex: React.Dispatch<React.SetStateAction<number>>;
12
14
  };
13
15
  export declare const useItemState: () => {
14
16
  isHovered: boolean;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ColorDemo: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- export * from './Color';
1
+ export * from './color';
2
2
  export * from './Default';
3
3
  export * from './Disabled';
4
4
  export * from './Error';
@@ -9,3 +9,4 @@ export * from './ReadOnlyInput';
9
9
  export * from './Shadow';
10
10
  export * from './SizeInput';
11
11
  export * from './StylesInput';
12
+ export * from './isScrollable';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const IsScrollableDemo: () => React.JSX.Element;