@forge-kit/plugin-qr-code 0.0.1 → 0.0.3

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
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "author": "yu.pan <panyupy@vip.qq.com>",
12
12
  "license": "MIT",
13
- "version": "0.0.1",
13
+ "version": "0.0.3",
14
14
  "type": "module",
15
15
  "scripts": {
16
16
  "dev": "vite",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@forge-kit/component": "workspace:*",
23
23
  "@forge-kit/icons": "workspace:*",
24
- "@forge-kit/types": "workspace:*",
24
+ "@forge-kit/helper": "workspace:*",
25
25
  "classnames": "^2.5.1",
26
26
  "jsqr": "^1.4.0",
27
27
  "lodash-es": "^4.17.23",
@@ -36,14 +36,12 @@
36
36
  border: 1px dashed var(--gray-7);
37
37
  border-radius: var(--radius-3);
38
38
  padding: var(--space-2);
39
- background-color: var(--gray-2);
40
39
  }
41
40
 
42
41
  &-result {
43
42
  border: 1px solid var(--gray-6);
44
43
  border-radius: var(--radius-3);
45
44
  padding: var(--space-3);
46
- background-color: var(--gray-2);
47
45
  overflow: auto;
48
46
  white-space: pre-wrap;
49
47
  word-break: break-all;
@@ -51,10 +51,7 @@ export const QrGeneratorPanel: React.FC = () => {
51
51
  const runGenerateByConfig = useToRef(async (nextConfig: GeneratorConfigState) => {
52
52
  const normalizedText = nextConfig.text.trim()
53
53
 
54
- if (!normalizedText) {
55
- updateResultState({generateError: '请输入二维码内容', qrDataUrl: '', isGenerating: false})
56
- return
57
- }
54
+ if (!normalizedText) return updateResultState({generateError: '', qrDataUrl: '', isGenerating: false})
58
55
 
59
56
  updateResultState({isGenerating: true, generateError: ''})
60
57
  try {
@@ -7,7 +7,6 @@
7
7
  min-height: 180px;
8
8
  border: 1px dashed var(--gray-7);
9
9
  border-radius: var(--radius-3);
10
- background-color: var(--gray-2);
11
10
  padding: var(--space-3);
12
11
  display: flex;
13
12
  align-items: center;
package/src/main.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import {StrictMode} from 'react'
2
2
  import ReactDOM from "react-dom/client";
3
- import {definePlugin} from '@forge-kit/types'
3
+ import {definePlugin} from '@forge-kit/helper'
4
4
  import {App} from '@/App.tsx'
5
5
 
6
6
  let rootInstance: ReturnType<typeof ReactDOM.createRoot> | null = null;