@aws/mynah-ui 4.16.0-beta.1 → 4.16.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.
package/.eslintrc.js CHANGED
@@ -1,50 +1,37 @@
1
1
  module.exports = {
2
- "env": {
3
- "browser": true,
4
- "es2021": true,
5
- "node": true
6
- },
7
- "extends": [
8
- "standard-with-typescript"
9
- ],
10
- "parser": "@typescript-eslint/parser",
11
- "parserOptions": {
12
- "ecmaVersion": "latest",
13
- "sourceType": "module",
14
- "project": "./tsconfig.json",
15
- },
16
- "plugins": [
17
- "@typescript-eslint",
18
- "prettier"
19
- ],
20
- "rules": {
21
- "no-case-declarations": "off",
22
- "@typescript-eslint/no-floating-promises": "off",
23
- "@typescript-eslint/semi": [
24
- 2,
25
- "always"
26
- ],
27
- "comma-dangle": [
28
- 2,
29
- "only-multiline"
30
- ],
31
- "array-bracket-spacing": [
32
- 2,
33
- "always"
34
- ],
35
- "no-useless-call": "off",
36
- "@typescript-eslint/member-delimiter-style": [
37
- "error",
38
- {
39
- "multiline": {
40
- "delimiter": "semi",
41
- "requireLast": true
42
- },
43
- "singleline": {
44
- "delimiter": "semi",
45
- "requireLast": false
46
- }
47
- }
48
- ]
49
- }
50
- }
2
+ env: {
3
+ browser: true,
4
+ es2021: true,
5
+ node: true,
6
+ },
7
+ extends: ['standard-with-typescript'],
8
+ parser: '@typescript-eslint/parser',
9
+ parserOptions: {
10
+ tsconfigRootDir: __dirname,
11
+ ecmaVersion: 'latest',
12
+ sourceType: 'module',
13
+ project: ['./tsconfig.json', './ui-tests/tsconfig.json'],
14
+ },
15
+ plugins: ['@typescript-eslint', 'prettier'],
16
+ rules: {
17
+ 'no-case-declarations': 'off',
18
+ '@typescript-eslint/no-floating-promises': 'off',
19
+ '@typescript-eslint/semi': [2, 'always'],
20
+ 'comma-dangle': [2, 'only-multiline'],
21
+ 'array-bracket-spacing': [2, 'always'],
22
+ 'no-useless-call': 'off',
23
+ '@typescript-eslint/member-delimiter-style': [
24
+ 'error',
25
+ {
26
+ multiline: {
27
+ delimiter: 'semi',
28
+ requireLast: true,
29
+ },
30
+ singleline: {
31
+ delimiter: 'semi',
32
+ requireLast: false,
33
+ },
34
+ },
35
+ ],
36
+ },
37
+ };
package/.husky/pre-push CHANGED
@@ -1 +1,3 @@
1
- npm run test:e2e
1
+ npm run lint
2
+ npm run format:check
3
+ npm run tests:e2e
@@ -0,0 +1,9 @@
1
+ *.*ts
2
+ *.md
3
+ package-lock.json
4
+ .github
5
+ .husky
6
+ api-docs
7
+ docs
8
+ dist
9
+ build
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "printWidth": 120,
3
+ "tabWidth": 4,
4
+ "singleQuote": true,
5
+ "semi": true,
6
+ "bracketSpacing": true,
7
+ "endOfLine": "lf"
8
+ }
package/README.md CHANGED
@@ -30,9 +30,10 @@ Mynah UI operates independently of any framework or UI library, enabling seamles
30
30
  > Local environment quick start
31
31
  ```console
32
32
  git clone git@github.com:aws/mynah-ui.git
33
- cd mynah-ui
34
- npm run dev
33
+ cd mynah-ui && npm install
34
+ cd example && npm install
35
35
  ```
36
+ Now run `npm watch` in both the `mynah-ui` and the `example` directories, and open `mynah-ui/example/dist/index.html` in a browser of choice.
36
37
 
37
38
  #### Guides and documentation
38
39
  Please refer to the following guides:
@@ -6,6 +6,7 @@ import { ExtendedHTMLElement } from '../../helper/dom';
6
6
  import { PromptAttachmentType } from '../../static';
7
7
  export declare const MAX_USER_INPUT_THRESHOLD = 96;
8
8
  export declare const MAX_USER_INPUT: () => number;
9
+ export declare const INPUT_LENGTH_WARNING_THRESHOLD: () => number;
9
10
  export interface ChatPromptInputProps {
10
11
  tabId: string;
11
12
  }
@@ -15,10 +16,11 @@ export declare class ChatPromptInput {
15
16
  private readonly attachmentWrapper;
16
17
  private readonly promptTextInput;
17
18
  private readonly promptTextInputCommand;
18
- private readonly remainingCharsIndicator;
19
19
  private readonly sendButton;
20
20
  private readonly progressIndicator;
21
21
  private readonly promptAttachment;
22
+ private readonly chatPrompt;
23
+ private remainingCharsOverlay;
22
24
  private quickPickTriggerIndex;
23
25
  private quickPickType;
24
26
  private textAfter;
@@ -7,6 +7,7 @@ export interface PromptTextInputProps {
7
7
  onKeydown: (e: KeyboardEvent) => void;
8
8
  onInput?: (e: KeyboardEvent) => void;
9
9
  onFocus?: () => void;
10
+ onBlur?: () => void;
10
11
  }
11
12
  export declare class PromptTextInput {
12
13
  render: ExtendedHTMLElement;
@@ -55,7 +55,14 @@ export declare enum MynahIcons {
55
55
  CURSOR_INSERT = "cursor-insert",
56
56
  TEXT_SELECT = "text-select",
57
57
  REVERT = "revert",
58
- ASTERISK = "asterisk"
58
+ ASTERISK = "asterisk",
59
+ BUG = "bug",
60
+ CHECK_LIST = "check-list",
61
+ DEPLOY = "deploy",
62
+ HELP = "help",
63
+ MESSAGE = "message",
64
+ TRASH = "trash",
65
+ TRANSFORM = "transform"
59
66
  }
60
67
  export interface IconProps {
61
68
  icon: MynahIcons;