g-ui-core 0.0.4 → 0.0.6

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": "g-ui-core",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "G-UI Web Components built with Stencil",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
package/vue/index.d.ts CHANGED
@@ -1,29 +1,8 @@
1
1
  import type { AllowedComponentProps, ComponentCustomProps, VNodeProps } from 'vue'
2
+ import type { Components } from '../dist/types/components'
2
3
 
3
- // MyButton Vue 组件的 props 类型
4
- export interface GButtonProps {
5
- type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'secondary'
6
- size?: 'sm' | 'md' | 'lg'
7
- plain?: boolean
8
- text?: boolean
9
- bg?: boolean
10
- link?: boolean
11
- round?: boolean
12
- circle?: boolean
13
- dashed?: boolean
14
- loading?: boolean
15
- loadingIcon?: string
16
- disabled?: boolean
17
- icon?: string
18
- autofocus?: boolean
19
- nativeType?: 'button' | 'submit' | 'reset'
20
- autoInsertSpace?: boolean
21
- color?: string
22
- dark?: boolean
23
- tag?: string
24
- label?: string
25
- onClick?: (e: MouseEvent) => void
26
- }
4
+ // 直接复用 Stencil 生成的组件类型,无需手写
5
+ type GButtonProps = Partial<Components.GButton> & { onClick?: (e: MouseEvent) => void }
27
6
 
28
7
  export declare const MyButton: new () => {
29
8
  $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & GButtonProps
package/vue/main.d.ts CHANGED
@@ -1,2 +1,10 @@
1
- /// <reference path="./index.d.ts" />
1
+ import type { Components } from '../dist/types/components'
2
+
3
+ // g-button 在 Vue 模板中的 props 类型(Volar 智能提示)
4
+ declare module '@vue/runtime-core' {
5
+ export interface GlobalComponents {
6
+ GButton: Partial<Components.GButton>
7
+ }
8
+ }
9
+
2
10
  export * from '../dist/types/index'
package/vue/global.d.ts DELETED
File without changes