@ripast/vue 0.2.1 → 0.3.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/dist/index.d.mts CHANGED
@@ -1,3 +1,63 @@
1
1
  import { FrameworkAdapter } from "@ripast/core/adapter";
2
+ type ComponentKind = 'sfc' | 'define-component';
3
+ type PropsResolution = 'literal' | 'unresolved';
4
+ interface VueComponent {
5
+ id: string;
6
+ /** Canonical name: Nuxt's registered identifier when manifest-sourced, basename otherwise. */
7
+ name: string;
8
+ /** Always the Nuxt-registered name when manifest-sourced; null in filesystem-only mode. */
9
+ registeredName: string | null;
10
+ aliases: string[];
11
+ file: string;
12
+ rel: string;
13
+ kind: ComponentKind;
14
+ layer?: string;
15
+ scope: 'auto-import' | 'global' | 'explicit';
16
+ shadowed: boolean;
17
+ shadowedBy?: string;
18
+ source: 'manifest' | 'filesystem';
19
+ }
20
+ interface ListComponentsOptions {
21
+ glob?: string[];
22
+ /** Force one of the resolution strategies. Default: 'auto' (manifest if present, else filesystem). */
23
+ source?: 'auto' | 'manifest' | 'filesystem';
24
+ /** Emit warnings to this sink (default: process.stderr). Pass () => {} to silence. */
25
+ warn?: (msg: string) => void;
26
+ }
27
+ declare function listComponents(cwd: string, opts?: ListComponentsOptions): VueComponent[];
28
+ interface PropSig {
29
+ name: string;
30
+ type?: string;
31
+ required?: boolean;
32
+ hasDefault?: boolean;
33
+ }
34
+ interface ParsedComponentShape {
35
+ props: PropSig[];
36
+ emits: string[];
37
+ slots: string[];
38
+ exposes: string[];
39
+ scriptLang: 'ts' | 'js' | null;
40
+ setup: boolean;
41
+ propsResolution: PropsResolution;
42
+ }
43
+ declare function parseComponent(absPath: string): ParsedComponentShape;
44
+ declare function parseComponentSource(absPath: string, source: string): ParsedComponentShape;
45
+ type UsageForm = 'tag-pascal' | 'tag-kebab' | 'resolveComponent' | 'dynamic-is-literal' | 'dynamic-is-binding';
46
+ interface ComponentUsage {
47
+ name: string;
48
+ file: string;
49
+ rel: string;
50
+ line: number;
51
+ col: number;
52
+ form: UsageForm;
53
+ /** Dynamic binding only: the bound identifier or expression text. */
54
+ binding?: string;
55
+ }
56
+ interface FindUsagesOptions {
57
+ cwd?: string;
58
+ glob?: string | string[];
59
+ }
60
+ declare function findComponentUsages(names: string[], opts?: FindUsagesOptions): ComponentUsage[];
61
+ declare function findComponentUsage(name: string, opts?: FindUsagesOptions): ComponentUsage[];
2
62
  declare const adapter: FrameworkAdapter;
3
- export { adapter as default };
63
+ export { type ComponentKind, type ComponentUsage, type ListComponentsOptions, type ParsedComponentShape, type PropSig, type UsageForm, type VueComponent, adapter as default, findComponentUsage, findComponentUsages, listComponents, parseComponent, parseComponentSource };