@component-compass/plugin-core 0.0.0-pr-3-8916f3c-20260507150423 → 0.0.1

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.ts CHANGED
@@ -4,6 +4,6 @@ export { validateManifest } from "./validate.js";
4
4
  export type { ValidationResult } from "./validate.js";
5
5
  export { manifestJsonSchema } from "./schema.js";
6
6
  export { ManifestBuilder } from "./builder.js";
7
- export type { TagName, WrapperId, ImportRole, ImportEntry, IndexedComponent, ComponentIndex, Loc, WarningCode, Warning, ScanConfig, PropUsage, OccurrenceVia, Occurrence, WrapperDef, FileImport, ParseResult, ParseContext, ParserPlugin, ScanEnvelope, ScanOutput, ManifestRef, ScanStats, DetectorId, LocalDefinition, LocalDefinitionIndex, } from "./scan-types.js";
7
+ export type { TagName, WrapperId, ImportRole, ImportEntry, IndexedComponent, ComponentIndex, Loc, WarningCode, Warning, ScanConfig, PropUsage, OccurrenceVia, Occurrence, WrapperDef, FileImport, ParseResult, ParseContext, ParserPlugin, ScanEnvelope, ScanOutput, DetectorId, LocalDefinition, LocalDefinitionIndex, } from "./scan-types.js";
8
8
  export { asTagName, asWrapperId, emptyLocalIndex } from "./scan-types.js";
9
9
  export * from "./output-types.js";
@@ -3,7 +3,6 @@
3
3
  * occurrences). Lives in plugin-core so consumers (cli, future analytics,
4
4
  * agents) share one source of truth without depending on cli internals.
5
5
  */
6
- import type { OccurrenceVia } from "./via-types.js";
7
6
  export type ComponentScope = "ds" | "external" | "local";
8
7
  export type ComponentKindOutput = "custom-element" | "react-component" | "vue-component";
9
8
  export type ViaKindOutput = "html-tag" | "lit-template" | "react-wrapper" | "direct-import" | "vue-template";
@@ -53,6 +52,12 @@ export type PropDistribution = {
53
52
  omitted: number;
54
53
  defaultApplied: number;
55
54
  };
55
+ export type OutputEdges = {
56
+ /** componentIds this component renders. Empty in v1, schema slot. */
57
+ renders: string[];
58
+ /** componentIds that render this component. Empty in v1, schema slot. */
59
+ renderedBy: string[];
60
+ };
56
61
  export type OutputComponent = {
57
62
  id: string;
58
63
  identity: OutputIdentity;
@@ -63,12 +68,12 @@ export type OutputComponent = {
63
68
  fileCount: number;
64
69
  };
65
70
  props: Record<string, PropDistribution>;
71
+ edges: OutputEdges;
66
72
  };
67
73
  export type OutputOccurrence = {
68
74
  componentId: string;
69
75
  filePath: string;
70
76
  line: number;
71
77
  column: number;
72
- via: OccurrenceVia;
73
78
  props: Record<string, PropValueState>;
74
79
  };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * Types describing the CLI's emitted JSON artifact (two-grain: components +
3
+ * occurrences). Lives in plugin-core so consumers (cli, future analytics,
4
+ * agents) share one source of truth without depending on cli internals.
5
+ */
1
6
  export {};
2
7
  //# sourceMappingURL=output-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-types.js","sourceRoot":"","sources":["../src/output-types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"output-types.js","sourceRoot":"","sources":["../src/output-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -6,8 +6,7 @@
6
6
  * parser ↔ CLI boundary lives here in `plugin-core`.
7
7
  */
8
8
  import type { OutputComponent, OutputOccurrence } from "./output-types.js";
9
- import type { ComponentId, ManifestComponent, ManifestSource } from "./types.js";
10
- import type { OccurrenceVia } from "./via-types.js";
9
+ import type { ComponentId, ManifestComponent } from "./types.js";
11
10
  declare const __brand: unique symbol;
12
11
  type Brand<K, T> = K & {
13
12
  readonly [__brand]: T;
@@ -116,7 +115,24 @@ export type PropUsage = {
116
115
  */
117
116
  dynamicKind?: "spread" | "expr" | "identifier";
118
117
  };
119
- export type { OccurrenceVia } from "./via-types.js";
118
+ export type OccurrenceVia = {
119
+ kind: "html-tag";
120
+ } | {
121
+ kind: "lit-template";
122
+ specifier?: string;
123
+ } | {
124
+ kind: "react-wrapper";
125
+ specifier: string;
126
+ import: string;
127
+ } | {
128
+ kind: "direct-import";
129
+ specifier: string;
130
+ import: string;
131
+ } | {
132
+ kind: "vue-template";
133
+ specifier: string;
134
+ import: string;
135
+ };
120
136
  export type Occurrence = {
121
137
  componentId: ComponentId;
122
138
  loc: Loc;
@@ -164,23 +180,9 @@ export type ScanEnvelope = {
164
180
  toolVersion: string;
165
181
  cwd: string;
166
182
  };
167
- export type ManifestRef = {
168
- source: ManifestSource;
169
- package: string;
170
- path: string;
171
- version: string | null;
172
- };
173
- export type ScanStats = {
174
- filesScanned: number;
175
- filesWithUsage: number;
176
- scanDurationMs: number;
177
- componentsDetected: number;
178
- totalOccurrences: number;
179
- };
180
183
  export type ScanOutput = {
181
184
  envelope: ScanEnvelope;
182
- manifests: ManifestRef[];
183
- stats: ScanStats;
184
185
  components: OutputComponent[];
185
186
  occurrences: OutputOccurrence[];
186
187
  };
188
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"scan-types.js","sourceRoot":"","sources":["../src/scan-types.ts"],"names":[],"mappings":"AAqBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,CAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAa,EAAE,CAAC,CAAc,CAAC;AAsEpE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,KAAK,EAAE,IAAI,GAAG,EAAE;CACjB,CAAC"}
1
+ {"version":3,"file":"scan-types.js","sourceRoot":"","sources":["../src/scan-types.ts"],"names":[],"mappings":"AAoBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,CAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAa,EAAE,CAAC,CAAc,CAAC;AAsEpE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,KAAK,EAAE,IAAI,GAAG,EAAE;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-compass/plugin-core",
3
- "version": "0.0.0-pr-3-8916f3c-20260507150423",
3
+ "version": "0.0.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,24 +0,0 @@
1
- /**
2
- * Discriminated union describing how a component instance was used.
3
- * Shared between parser-emitted Occurrence (scan-types.ts) and the artifact-shape
4
- * OutputOccurrence (output-types.ts). Lives in its own module to keep the two
5
- * type files acyclic.
6
- */
7
- export type OccurrenceVia = {
8
- kind: "html-tag";
9
- } | {
10
- kind: "lit-template";
11
- specifier?: string;
12
- } | {
13
- kind: "react-wrapper";
14
- specifier: string;
15
- import: string;
16
- } | {
17
- kind: "direct-import";
18
- specifier: string;
19
- import: string;
20
- } | {
21
- kind: "vue-template";
22
- specifier: string;
23
- import: string;
24
- };
package/dist/via-types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=via-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"via-types.js","sourceRoot":"","sources":["../src/via-types.ts"],"names":[],"mappings":""}