@piedata/pieui 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piedata/pieui",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A React component library featuring PieCard component",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,9 +51,9 @@
51
51
  "prepublishOnly": "bun run build",
52
52
  "release": "npm version patch && git push && git push --tags",
53
53
  "release:retry": "git tag v$(node -p \"require('./package.json').version\") && git push --tags",
54
- "release:patch": "npm version patch && git push && git push --tags",
55
- "release:minor": "npm version minor && git push && git push --tags",
56
- "release:major": "npm version major && git push && git push --tags",
54
+ "release:patch": "npm version patch && git push --tags",
55
+ "release:minor": "npm version minor && git push --tags",
56
+ "release:major": "npm version major && git push --tags",
57
57
  "release:prerelease": "npm version prerelease --preid=beta && git push && git push --tags",
58
58
  "release:dry-run": "npm publish --dry-run",
59
59
  "publish:npm": "npm publish",
@@ -77,9 +77,12 @@
77
77
  "devDependencies": {
78
78
  "@types/bun": "latest",
79
79
  "@types/glob": "^9.0.0",
80
+ "autoprefixer": "10",
81
+ "eslint-plugin-no-browser-globals": "^1.0.1",
80
82
  "glob": "^13.0.0",
83
+ "postcss": "8",
84
+ "tailwindcss": "3",
81
85
  "typescript": ">=5",
82
- "eslint-plugin-no-browser-globals": "^1.0.1",
83
86
  "typescript-json-schema": "^0.67.1"
84
87
  },
85
88
  "dependencies": {
@@ -17,6 +17,7 @@ const AttachFileButton = ({
17
17
  icons: ChatIconsType
18
18
  }) => {
19
19
  return (
20
+ <>
20
21
  <button
21
22
  className='rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent'
22
23
  type='button'
@@ -26,22 +27,22 @@ const AttachFileButton = ({
26
27
  }
27
28
  }}
28
29
  >
29
- <input
30
- id={name + "__pie__" + 'file'}
31
- name={name + "__pie__" + 'file'}
32
- className='hidden'
33
- type='file'
34
- accept={accept}
35
- ref={fileInputRef}
36
- onChange={(e) => {
37
- if (e.target.files) {
38
- onSelectFile(e.target.files[0])
39
- }
40
- }}
41
- />
42
- <label htmlFor={name + "__pie__" + 'file'} />
43
30
  {icons.attachFileIcon ? <img src={icons.attachFileIcon} alt=''/> : <AttachFileIcon/>}
44
31
  </button>
32
+ <input
33
+ id={name + "__pie__" + 'file'}
34
+ name={name + "__pie__" + 'file'}
35
+ className='hidden'
36
+ type='file'
37
+ accept={accept}
38
+ ref={fileInputRef}
39
+ onChange={(e) => {
40
+ if (e.target.files) {
41
+ onSelectFile(e.target.files[0])
42
+ }
43
+ }}
44
+ />
45
+ </>
45
46
  )
46
47
  }
47
48
 
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties, forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react'
2
2
  import ResizableTextarea from './ResizableTextarea'
3
- import annyang from 'annyang'
4
- import '../../types/annyang.d.ts'
3
+ // import annyang from 'annyang'
4
+ // import '../../types/annyang.d.ts'
5
5
  import SendButton from './SendButton'
6
6
  import { Option } from '../../types'
7
7
  import AttachFileButton from './AttachFileButton'
@@ -70,28 +70,28 @@ const ChatCardInput = forwardRef<
70
70
  }, [defaultValue])
71
71
 
72
72
  useEffect(() => {
73
- if (annyang) {
74
- annyang.addCallback('result', (phrases: string[]) => {
75
- setValue(phrases[0])
76
- })
77
- return () => {
78
- annyang.abort()
79
- annyang.removeCallback()
80
- }
81
- }
73
+ // if (annyang) {
74
+ // annyang.addCallback('result', (phrases: string[]) => {
75
+ // setValue(phrases[0])
76
+ // })
77
+ // return () => {
78
+ // annyang.abort()
79
+ // annyang.removeCallback()
80
+ // }
81
+ // }
82
82
  }, [])
83
83
 
84
84
  const toggleListening = () => {
85
- if (!annyang) return
86
- if (isListening) {
87
- annyang.abort()
88
- setIsListening(false)
89
- handleSendMessage()
90
- } else {
91
- annyang.start({ autoRestart: true, continuous: true })
92
- setValue('')
93
- setIsListening(true)
94
- }
85
+ // if (!annyang) return
86
+ // if (isListening) {
87
+ // annyang.abort()
88
+ // setIsListening(false)
89
+ // handleSendMessage()
90
+ // } else {
91
+ // annyang.start({ autoRestart: true, continuous: true })
92
+ // setValue('')
93
+ // setIsListening(true)
94
+ // }
95
95
  }
96
96
 
97
97
  return (