@pantograph/vue 0.34.4 → 0.34.5

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.
@@ -1,10 +1,10 @@
1
- import { InputProps, InputSlots } from '../Input';
1
+ import { InputProps } from '../Input';
2
2
  export interface ComboboxInputProps extends InputProps {
3
3
  }
4
4
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ComboboxInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ComboboxInputProps> & Readonly<{}>, {
5
5
  disabled: boolean;
6
6
  bordered: boolean;
7
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, Readonly<InputSlots> & InputSlots>;
7
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, Readonly<import('../Input').InputExtendsSlots> & import('../Input').InputExtendsSlots>;
8
8
  export default _default;
9
9
  type __VLS_WithTemplateSlots<T, S> = T & {
10
10
  new (): {
@@ -1,10 +1,19 @@
1
1
  import { HasRootInputEmits } from '@pantograph/utils-vue';
2
2
  import { BaseInputEmits, BaseInputProps, BaseInputSlots } from '../Base/BaseInput/BaseInput';
3
3
  /**
4
- * Props for the Input component
5
- * Extends BaseInputProps but omits hasValue since it's computed internally
4
+ * Props inherited from `BaseInput` (the "extended" part).
5
+ *
6
+ * Important:
7
+ * - When a component wants to *reuse and extend* another component's types in Vue
8
+ * macros (`defineProps<T>()`, `defineEmits<T>()`, `defineSlots<T>()`), exporting
9
+ * a split "extended" + "not-extended" pair (as `type`) is required so consumer
10
+ * components can safely compose them.
11
+ */
12
+ export type InputExtendsProps = Omit<BaseInputProps, 'hasValue'>;
13
+ /**
14
+ * Props defined by `Input` itself (the "not-extended" part).
6
15
  */
7
- export interface InputProps extends Omit<BaseInputProps, 'hasValue'> {
16
+ export type InputNotExtendsProps = {
8
17
  /**
9
18
  * The ID for the input element
10
19
  */
@@ -41,18 +50,35 @@ export interface InputProps extends Omit<BaseInputProps, 'hasValue'> {
41
50
  * The default value for the input
42
51
  */
43
52
  defaultValue?: string | null;
44
- }
53
+ };
54
+ /**
55
+ * Props for the Input component
56
+ * Extends BaseInputProps but omits hasValue since it's computed internally.
57
+ */
58
+ export type InputProps = InputExtendsProps & InputNotExtendsProps;
59
+ /**
60
+ * Slots inherited from `BaseInput` (the "extended" part).
61
+ */
62
+ export type InputExtendsSlots = Omit<BaseInputSlots, 'default' | 'extra' | 'value'>;
63
+ /**
64
+ * Slots defined by `Input` itself (the "not-extended" part).
65
+ *
66
+ * Kept as `{}` for consistency with the split-type pattern.
67
+ */
68
+ export type InputNotExtendsSlots = {};
45
69
  /**
46
70
  * Slots for the Input component
47
71
  * Extends BaseInputSlots but omits default, extra, and value slots
48
72
  */
49
- export interface InputSlots extends Omit<BaseInputSlots, 'default' | 'extra' | 'value'> {
50
- }
73
+ export type InputSlots = InputExtendsSlots & InputNotExtendsSlots;
51
74
  /**
52
- * Emits for the Input component
53
- * Extends HasRootInputEmits and BaseInputEmits
75
+ * Emits inherited from `HasRootInputEmits` and `BaseInputEmits` (the "extended" part).
54
76
  */
55
- export interface InputEmits extends HasRootInputEmits, BaseInputEmits {
77
+ export type InputExtendsEmits = HasRootInputEmits & BaseInputEmits;
78
+ /**
79
+ * Emits defined by `Input` itself (the "not-extended" part).
80
+ */
81
+ export type InputNotExtendsEmits = {
56
82
  /**
57
83
  * Emitted when the model value is updated
58
84
  */
@@ -61,7 +87,12 @@ export interface InputEmits extends HasRootInputEmits, BaseInputEmits {
61
87
  * Emitted when the input value changes
62
88
  */
63
89
  change: [value?: string | null];
64
- }
90
+ };
91
+ /**
92
+ * Emits for the Input component
93
+ * Extends HasRootInputEmits and BaseInputEmits.
94
+ */
95
+ export type InputEmits = InputExtendsEmits & InputNotExtendsEmits;
65
96
  /**
66
97
  * Default props for the Input component
67
98
  */
@@ -76,7 +107,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<In
76
107
  focus: (option?: FocusOptions | undefined) => void;
77
108
  blur: () => void | undefined;
78
109
  select: () => void | undefined;
79
- setSelectionRange: (start: number, end: number, direction?: "none" | "forward" | "backward" | undefined) => void | undefined;
110
+ setSelectionRange: (start: number, end: number, direction?: "none" | "forward" | "backward" | undefined) => void | undefined; /**
111
+ * InputGroup context
112
+ */
80
113
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
81
114
  blur: (event: InputEvent) => any;
82
115
  change: (value?: string | null | undefined) => any;
@@ -98,7 +131,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<In
98
131
  bordered: boolean;
99
132
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
100
133
  inputRef: HTMLInputElement;
101
- }, HTMLDivElement>, Readonly<InputSlots> & InputSlots>;
134
+ }, HTMLDivElement>, Readonly<InputExtendsSlots> & InputExtendsSlots>;
102
135
  export default _default;
103
136
  type __VLS_WithTemplateSlots<T, S> = T & {
104
137
  new (): {
@@ -1,6 +1,7 @@
1
- import { default as Input, InputProps, InputEmits, InputSlots, INPUT_DEFAULT_PROPS } from './Input';
1
+ import { default as Input, InputProps, InputEmits, InputSlots } from './Input';
2
2
  import { DefineComponent } from '@pantograph/utils-vue';
3
- export { Input, type InputProps, type InputEmits, type InputSlots, INPUT_DEFAULT_PROPS };
3
+ export { Input };
4
+ export * from './Input';
4
5
  declare module 'vue' {
5
6
  interface GlobalComponents {
6
7
  Input: DefineComponent<InputProps, InputSlots, InputEmits>;