@component-compass/plugin-core 0.1.9 → 0.1.11

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.
@@ -181,6 +181,26 @@ export type CompositionRollup = {
181
181
  export type EventDistribution = {
182
182
  boundCount: number;
183
183
  };
184
+ /**
185
+ * Entry/wrapper package through which this repo reached the component
186
+ * (#331). Scan-observational provenance — how the repo imported it — not
187
+ * identity. `version` is the entry package's installed version, null when
188
+ * its package.json is unreadable or unversioned.
189
+ */
190
+ export type EntryPackageRef = {
191
+ package: string;
192
+ version: string | null;
193
+ };
194
+ /**
195
+ * Why this component is in the inventory (#340 spec, 2026-07-16).
196
+ * Total classification; precedence: direct > via-wrapper > root > none.
197
+ * - direct: ≥1 parsed occurrence (JSX / template / HTML tag).
198
+ * - via-wrapper: zero occurrences; wrap-aggregation join anchor of a used wrapper.
199
+ * - root: local, zero occurrences, framework entry-point file's default export.
200
+ * - none: anything else, including external zero-occurrence rows. Catch-all.
201
+ * Manifest-derived components are never emitted, so no catalogue value exists.
202
+ */
203
+ export type UsageKind = "direct" | "via-wrapper" | "root" | "none";
184
204
  export type OutputComponent = {
185
205
  id: string;
186
206
  identity: OutputIdentity;
@@ -192,6 +212,8 @@ export type OutputComponent = {
192
212
  occurrenceCount: number;
193
213
  fileCount: number;
194
214
  };
215
+ /** Why this component is in the inventory. See UsageKind. */
216
+ usage: UsageKind;
195
217
  props: Record<string, PropDistribution>;
196
218
  /** Consumer-bound events rolled up across occurrences (Vue/html/lit native + React on* props). */
197
219
  events?: Record<string, EventDistribution>;
@@ -200,6 +222,9 @@ export type OutputComponent = {
200
222
  /** Source-derived declared prop API. Local components only; absent when the
201
223
  * declaration site is unreadable. Orthogonal to `manifest`. */
202
224
  declared?: DeclaredPropApi;
225
+ /** Entry/wrapper packages this repo reached the component through (#331).
226
+ * Deduped by {package, version}, sorted. Present only when non-empty. */
227
+ entryPackages?: EntryPackageRef[];
203
228
  /** Package version from package.json or CEM. Null for external packages not versioned at scan time. */
204
229
  version: string | null;
205
230
  /** Git-mtime: first commit of the declaring file. ISO 8601 string, or null for external packages. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-compass/plugin-core",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",