@component-compass/plugin-core 0.0.2 → 0.0.3

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/builder.d.ts CHANGED
@@ -3,19 +3,13 @@ type BuilderOpts = {
3
3
  source: ManifestSource;
4
4
  package: string;
5
5
  };
6
- type AddInput = (Omit<Extract<ManifestComponent, {
6
+ type AddInput = Extract<ManifestComponent, {
7
7
  kind: "custom-element";
8
- }>, "deprecated"> & {
9
- deprecated?: boolean | string;
10
- }) | (Omit<Extract<ManifestComponent, {
8
+ }> | Extract<ManifestComponent, {
11
9
  kind: "react-component";
12
- }>, "deprecated"> & {
13
- deprecated?: boolean | string;
14
- }) | (Omit<Extract<ManifestComponent, {
10
+ }> | Extract<ManifestComponent, {
15
11
  kind: "vue-component";
16
- }>, "deprecated"> & {
17
- deprecated?: boolean | string;
18
- });
12
+ }>;
19
13
  export declare class ManifestBuilder {
20
14
  private readonly source;
21
15
  private readonly packageName;
package/dist/builder.js CHANGED
@@ -19,7 +19,7 @@ export class ManifestBuilder {
19
19
  if (c.kind !== expected) {
20
20
  throw new Error(`Component kind "${c.kind}" does not match builder source "${this.source}" (expected kind "${expected}")`);
21
21
  }
22
- this.components.push({ deprecated: false, ...c });
22
+ this.components.push(c);
23
23
  return this;
24
24
  }
25
25
  build() {
@@ -1 +1 @@
1
- {"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,MAAM,eAAe,GAAsD;IACzE,GAAG,EAAE,gBAAgB;IACrB,KAAK,EAAE,iBAAiB;IACxB,GAAG,EAAE,eAAe;CACrB,CAAC;AASF,MAAM,OAAO,eAAe;IACT,MAAM,CAAiB;IACvB,WAAW,CAAS;IACpB,U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,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAiB;YACxB,aAAa,EAAE,cAAc;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,WAAW;YACzB,UAAU,EAAE,MAAM;SACnB,CAAC;QACF,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,qCAAqC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,CAAoB,EAAE,CAAoB;IACnE,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,IAAI,CAAC,CAAoB;IAChC,IAAI,CAAC,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QAChC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1E,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Unified diagnostic surface for parsers, resolver, and local-index.
3
+ * Discriminated union by `code`; severity drives `--strict` exit code.
4
+ *
5
+ * Lives in plugin-core so resolver, parsers, local-index, and CLI all
6
+ * share one source of truth.
7
+ */
8
+ export type DiagnosticSeverity = "info" | "warning";
9
+ export type Diagnostic = {
10
+ code: "jsx-shape-unsupported";
11
+ severity: "warning";
12
+ filePath: string;
13
+ line?: number;
14
+ column?: number;
15
+ nameType: string;
16
+ detail: string;
17
+ } | {
18
+ code: "vue-tag-low-confidence";
19
+ severity: "info";
20
+ filePath: string;
21
+ line?: number;
22
+ column?: number;
23
+ tagName: string;
24
+ emittedAs: "vue-component" | "custom-element";
25
+ } | {
26
+ code: "local-index-duplicate-tag";
27
+ severity: "warning";
28
+ filePath: string;
29
+ tagName: string;
30
+ conflictsWith: string;
31
+ } | {
32
+ code: "barrel-unsupported-form";
33
+ severity: "info";
34
+ filePath: string;
35
+ form: string;
36
+ line?: number;
37
+ packageName?: string;
38
+ } | {
39
+ code: "untraceable-barrel";
40
+ severity: "info";
41
+ packageName: string;
42
+ resolvedFile: string;
43
+ } | {
44
+ code: "cycle-detected";
45
+ severity: "warning";
46
+ filePath: string;
47
+ exportName: string;
48
+ packageName?: string;
49
+ } | {
50
+ code: "chain-too-deep";
51
+ severity: "warning";
52
+ filePath: string;
53
+ exportName: string;
54
+ depth: number;
55
+ packageName?: string;
56
+ } | {
57
+ code: "no-deps-match-scopes";
58
+ severity: "info";
59
+ packageScopes: readonly string[];
60
+ packageManager: "yarn" | "npm" | "pnpm" | "unknown";
61
+ workspacePackageCount: number;
62
+ };
63
+ export interface DiagnosticCollector {
64
+ emit(d: Diagnostic): void;
65
+ drain(): Diagnostic[];
66
+ }
67
+ export type DiagnosticCode = Diagnostic["code"];
68
+ export declare function createDiagnosticCollector(): DiagnosticCollector;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Unified diagnostic surface for parsers, resolver, and local-index.
3
+ * Discriminated union by `code`; severity drives `--strict` exit code.
4
+ *
5
+ * Lives in plugin-core so resolver, parsers, local-index, and CLI all
6
+ * share one source of truth.
7
+ */
8
+ function assertUnreachable(x) {
9
+ throw new Error(`Unhandled diagnostic code: ${x.code}`);
10
+ }
11
+ /**
12
+ * Compute a stable dedup key for a diagnostic. Two diagnostics with
13
+ * identical keys are treated as the same observation and only emitted once.
14
+ *
15
+ * Keys are constructed per-code from the fields that identify the OBSERVATION
16
+ * (e.g. file + line, or package + resolvedFile) — not the severity or
17
+ * descriptive `detail`/`form` fields.
18
+ *
19
+ * Note on `packageName` omission: for `barrel-unsupported-form`,
20
+ * `cycle-detected`, and `chain-too-deep`, the diagnostic describes a property
21
+ * of the barrel/re-export (file, line, exportName), not the consumer package
22
+ * that triggered resolution. Including `packageName` (which is the consumer's
23
+ * package) would un-dedup based on consumer attribution and re-introduce the
24
+ * noise pattern this collector exists to suppress (GH issue #12). For
25
+ * `untraceable-barrel`, `packageName` IS included — it's the barrel's own
26
+ * package name there, part of the observation identity.
27
+ */
28
+ function dedupKey(d) {
29
+ switch (d.code) {
30
+ case "jsx-shape-unsupported":
31
+ return `${d.code}::${d.filePath}::${d.line ?? ""}::${d.column ?? ""}::${d.nameType}`;
32
+ case "vue-tag-low-confidence":
33
+ return `${d.code}::${d.filePath}::${d.line ?? ""}::${d.column ?? ""}::${d.tagName}`;
34
+ case "local-index-duplicate-tag":
35
+ return `${d.code}::${d.filePath}::${d.tagName}`;
36
+ case "barrel-unsupported-form":
37
+ return `${d.code}::${d.filePath}::${d.line ?? ""}::${d.form}`;
38
+ case "untraceable-barrel":
39
+ return `${d.code}::${d.packageName}::${d.resolvedFile}`;
40
+ case "cycle-detected":
41
+ return `${d.code}::${d.filePath}::${d.exportName}`;
42
+ case "chain-too-deep":
43
+ return `${d.code}::${d.filePath}::${d.exportName}`;
44
+ case "no-deps-match-scopes":
45
+ return `${d.code}::${d.packageScopes.join(",")}::${d.packageManager}`;
46
+ default:
47
+ return assertUnreachable(d);
48
+ }
49
+ }
50
+ export function createDiagnosticCollector() {
51
+ const seen = new Set();
52
+ const ordered = [];
53
+ return {
54
+ emit(d) {
55
+ const key = dedupKey(d);
56
+ if (seen.has(key))
57
+ return;
58
+ seen.add(key);
59
+ ordered.push(d);
60
+ },
61
+ drain() {
62
+ const out = ordered.slice();
63
+ ordered.length = 0;
64
+ seen.clear();
65
+ return out;
66
+ },
67
+ };
68
+ }
69
+ //# sourceMappingURL=diagnostic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic.js","sourceRoot":"","sources":["../src/diagnostic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2EH,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,8BAA+B,CAAsB,CAAC,IAAI,EAAE,CAAC,CAAC;AAChF,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,QAAQ,CAAC,CAAa;IAC7B,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,uBAAuB;YAC1B,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;QACvF,KAAK,wBAAwB;YAC3B,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtF,KAAK,2BAA2B;YAC9B,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QAClD,KAAK,yBAAyB;YAC5B,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,KAAK,oBAAoB;YACvB,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,YAAY,EAAE,CAAC;QAC1D,KAAK,gBAAgB;YACnB,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;QACrD,KAAK,gBAAgB;YACnB,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;QACrD,KAAK,sBAAsB;YACzB,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,CAAC;QACxE;YACE,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;AACH,CAAC;AAID,MAAM,UAAU,yBAAyB;IACvC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,OAAO,GAAiB,EAAE,CAAC;IACjC,OAAO;QACL,IAAI,CAAC,CAAC;YACJ,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACxB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAO;YAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,KAAK;YACH,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;YAC5B,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -14,12 +14,17 @@ import type { IndexedComponent } from "./scan-types.js";
14
14
  */
15
15
  export type Enrichment = {
16
16
  source: "authored";
17
- data: AuthoredManifestData;
17
+ data: AuthoredLeafPayload;
18
18
  } | {
19
19
  source: "derived";
20
- data: DerivedManifestData;
20
+ data: DerivedLeafPayload;
21
21
  } | null;
22
- export type AuthoredManifestData = {
22
+ /**
23
+ * Payload shape held by the lazy resolver for a successfully-loaded leaf
24
+ * manifest. Per-leaf, not per-component — carries every component the leaf
25
+ * declares plus the manifest source metadata.
26
+ */
27
+ export type AuthoredLeafPayload = {
23
28
  /** Every component declared in the leaf's authored manifest. */
24
29
  components: IndexedComponent[];
25
30
  /** Absolute filesystem path of the loaded manifest file. */
@@ -29,7 +34,12 @@ export type AuthoredManifestData = {
29
34
  /** Leaf package's `version` field, when readable. */
30
35
  packageVersion?: string;
31
36
  };
32
- export type DerivedManifestData = {
37
+ /**
38
+ * Phase 4 hook: per-leaf payload populated by the source-extraction fallback
39
+ * (manifest-react / manifest-vue extractors). Same per-leaf shape as
40
+ * `AuthoredLeafPayload`; field set narrows to whatever the extractors recover.
41
+ */
42
+ export type DerivedLeafPayload = {
33
43
  /** Components extracted from leaf source by Phase 4 extractors. */
34
44
  components: IndexedComponent[];
35
45
  };
package/dist/id.d.ts CHANGED
@@ -2,3 +2,8 @@ import type { ComponentId, ComponentSource } from "./types.js";
2
2
  export declare function externalPackageOf(source: ComponentSource): string;
3
3
  export declare function serialiseComponentId(id: ComponentId): string;
4
4
  export declare function compareComponentId(a: ComponentId, b: ComponentId): number;
5
+ export declare function parseCompoundExport(exportName: string): {
6
+ root: string;
7
+ path: string[];
8
+ isCompound: boolean;
9
+ };
package/dist/id.js CHANGED
@@ -28,4 +28,12 @@ export function serialiseComponentId(id) {
28
28
  export function compareComponentId(a, b) {
29
29
  return serialiseComponentId(a).localeCompare(serialiseComponentId(b));
30
30
  }
31
+ export function parseCompoundExport(exportName) {
32
+ const [root, ...path] = exportName.split(".");
33
+ return {
34
+ root: root ?? "",
35
+ path,
36
+ isCompound: path.length > 0,
37
+ };
38
+ }
31
39
  //# sourceMappingURL=id.js.map
package/dist/id.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"id.js","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,MAAuB;IACvD,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IACtD,MAAM,IAAI,KAAK,CACb,2DAA2D,MAAM,CAAC,IAAI,qEAAqE,CAC5I,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,MAAuB;IAC5C,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,UAAU;YACb,OAAO,YAAY,MAAM,CAAC,OAAO,EAAE,CAAC;QACtC,KAAK,OAAO;YACV,OAAO,SAAS,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAe;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QAChB,KAAK,gBAAgB;YACnB,OAAO,EAAE,CAAC,OAAO,CAAC;QACpB,KAAK,iBAAiB,CAAC;QACvB,KAAK,eAAe;YAClB,OAAO,EAAE,CAAC,MAAM,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EAAe;IAClD,OAAO,GAAG,EAAE,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,eAAe,CAAC,EAAE,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,CAAc,EAAE,CAAc;IAC/D,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC"}
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,MAAuB;IACvD,IAAI,MAAM,CAAC,IAAI,KAAK,UAA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/dist/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  export type { ComponentId, ComponentKind, ComponentSource, Lifecycle, ManifestComponent, ManifestEvent, ManifestFile, ManifestProp, ManifestSlot, ManifestSource, } from "./types.js";
2
- export { serialiseComponentId, compareComponentId, externalPackageOf } from "./id.js";
2
+ export { serialiseComponentId, compareComponentId, externalPackageOf, parseCompoundExport } from "./id.js";
3
3
  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
7
  export type { TagName, WrapperId, ImportRole, ImportEntry, IndexedComponent, Loc, WarningCode, Warning, ScanConfig, PropUsage, OccurrenceVia, Occurrence, WrapperDef, FileImport, ParseResult, ParseContext, ParserPlugin, ScanEnvelope, ScanOutput, ManifestRef, ScanStats, DetectorId, LocalDefinition, LocalDefinitionIndex, ResolveLazyManifest, LookupByTag, LazyResolverHit, } from "./scan-types.js";
8
8
  export { asTagName, asWrapperId, emptyLocalIndex } from "./scan-types.js";
9
- export type { Enrichment, AuthoredManifestData, DerivedManifestData } from "./enrichment.js";
9
+ export type { Enrichment, AuthoredLeafPayload, DerivedLeafPayload } from "./enrichment.js";
10
10
  export { computeOccurrenceId } from "./occurrence-id.js";
11
11
  export type { CompositionRollup } from "./output-types.js";
12
12
  export * from "./output-types.js";
13
+ export type { Diagnostic, DiagnosticSeverity, DiagnosticCollector, DiagnosticCode } from "./diagnostic.js";
14
+ export { createDiagnosticCollector } from "./diagnostic.js";
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- export { serialiseComponentId, compareComponentId, externalPackageOf } from "./id.js";
1
+ export { serialiseComponentId, compareComponentId, externalPackageOf, parseCompoundExport } from "./id.js";
2
2
  export { validateManifest } from "./validate.js";
3
3
  export { manifestJsonSchema } from "./schema.js";
4
4
  export { ManifestBuilder } from "./builder.js";
5
5
  export { asTagName, asWrapperId, emptyLocalIndex } from "./scan-types.js";
6
6
  export { computeOccurrenceId } from "./occurrence-id.js";
7
7
  export * from "./output-types.js";
8
+ export { createDiagnosticCollector } from "./diagnostic.js";
8
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -4,38 +4,77 @@
4
4
  * agents) share one source of truth without depending on cli internals.
5
5
  */
6
6
  import type { OccurrenceVia } from "./via-types.js";
7
+ import type { Lifecycle } from "./types.js";
7
8
  export type ComponentScope = "ds" | "external" | "local";
8
9
  export type ComponentKindOutput = "custom-element" | "react-component" | "vue-component";
9
- export type ViaKindOutput = "html-tag" | "lit-template" | "react-wrapper" | "direct-import" | "vue-template";
10
10
  export type OutputIdentity = {
11
11
  scope: ComponentScope;
12
12
  kind: ComponentKindOutput;
13
- /** Present for ds + external; absent for local. */
13
+ /**
14
+ * For ds + external lanes: the npm package name as resolved by the manifest layer.
15
+ * For local lane: the owning workspace package's name when the file resides inside
16
+ * one. Absent for root-level local files (non-workspace single-package repos).
17
+ */
14
18
  packageName?: string;
15
19
  /** For react-component / vue-component. */
16
20
  exportName?: string;
17
21
  /** For custom-element. */
18
22
  tagName?: string;
19
- via: {
20
- kind: ViaKindOutput;
21
- };
22
23
  /** Present for local; absent for ds/external. */
23
24
  repoId?: string;
24
25
  /** Present for local; absent for ds/external. Repo-relative path of the defining file. */
25
26
  filePath?: string;
26
- };
27
- export type OutputManifest = {
28
- source: "authored" | "derived";
29
- lifecycle?: {
30
- status: "stable" | "deprecated";
31
- supersededBy?: {
32
- packageName: string;
33
- exportName: string;
34
- };
27
+ /**
28
+ * Source position of the local-component declaration (the function/class
29
+ * keyword for declarations; the variable identifier for `const Foo = ...`).
30
+ * Only set when `scope === "local"`. Absent for ds / external / wc.
31
+ */
32
+ definition?: {
33
+ line: number;
34
+ column: number;
35
35
  };
36
- props?: Record<string, {
37
- default?: string | number | boolean | null;
38
- }>;
36
+ };
37
+ export type PropDecl = {
38
+ type?: string;
39
+ default?: string | number | boolean | null;
40
+ values?: string[];
41
+ required?: boolean;
42
+ description?: string;
43
+ lifecycle?: Lifecycle;
44
+ };
45
+ export type SlotDecl = {
46
+ description?: string;
47
+ lifecycle?: Lifecycle;
48
+ };
49
+ export type InvocableDecl = {
50
+ kind: "dom-event" | "callback-prop";
51
+ payloadType?: string;
52
+ description?: string;
53
+ lifecycle?: Lifecycle;
54
+ };
55
+ /**
56
+ * Per-component manifest payload as it appears in `component-compass.json`.
57
+ * Field set is the closed-form Phase 3 schema (trimmed): description, lifecycle,
58
+ * and the three per-feature record maps. Methods, CSS surfaces, inheritance,
59
+ * and `since` are deferred to later sub-plans / phases.
60
+ */
61
+ export type AuthoredManifestData = {
62
+ description?: string;
63
+ lifecycle?: Lifecycle;
64
+ props?: Record<string, PropDecl>;
65
+ slots?: Record<string, SlotDecl>;
66
+ invocable?: Record<string, InvocableDecl>;
67
+ };
68
+ /**
69
+ * Phase 4 hook: per-component payload populated by source-extraction fallback.
70
+ * Structurally a subset of `AuthoredManifestData`; ships empty in Phase 3.
71
+ */
72
+ export type DerivedManifestData = {
73
+ description?: string;
74
+ lifecycle?: Lifecycle;
75
+ props?: Record<string, PropDecl>;
76
+ slots?: Record<string, SlotDecl>;
77
+ invocable?: Record<string, InvocableDecl>;
39
78
  };
40
79
  export type DynamicKind = "spread" | "expr" | "identifier";
41
80
  /**
@@ -55,34 +94,32 @@ export type PropDistribution = {
55
94
  defaultApplied: number;
56
95
  };
57
96
  export type CompositionRollup = {
58
- /** child componentId → count of direct-child relationships */
97
+ /** child componentId → count of occurrences owned by this component (owner-edge children). */
59
98
  rendersByCount: Record<string, number>;
60
- /** parent componentId → count of being-direct-child relationships */
99
+ /** parent componentId → count of occurrences in which this component is owned by that parent. */
61
100
  renderedByCount: Record<string, number>;
62
- /** # of this component's occurrences with no tracked parent */
101
+ /** # of this component's occurrences with no ownerComponentId. */
63
102
  isRootCount: number;
64
- /** # of this component's occurrences with no tracked direct children */
103
+ /** # of this component's occurrences whose component has empty rendersByCount. */
65
104
  isLeafCount: number;
66
- /** mean of all occurrences' depth */
67
- avgDepth: number;
68
- /** deepest observed depth */
69
- maxDepth: number;
70
- /** mean direct children per occurrence */
71
- avgChildCount: number;
72
- /** most direct children on any occurrence */
73
- maxChildCount: number;
74
105
  };
75
106
  export type OutputComponent = {
76
107
  id: string;
77
108
  identity: OutputIdentity;
78
109
  derivedTags: string[];
79
- manifest: OutputManifest | null;
110
+ manifest: {
111
+ source: "authored";
112
+ data: AuthoredManifestData;
113
+ } | {
114
+ source: "derived";
115
+ data: DerivedManifestData;
116
+ } | null;
80
117
  stats: {
81
118
  occurrenceCount: number;
82
119
  fileCount: number;
83
120
  };
84
121
  props: Record<string, PropDistribution>;
85
- /** Phase 2: per-component composition rollup. Omitted when occurrenceCount is 0. */
122
+ /** Per-component composition rollup (owner-edge driven). Always emitted. */
86
123
  composition?: CompositionRollup;
87
124
  };
88
125
  export type OutputOccurrence = {
@@ -96,8 +133,13 @@ export type OutputOccurrence = {
96
133
  occurrenceId: string;
97
134
  /** Phase 2: occurrenceId of nearest tracked ancestor. Absent if root in this scope. */
98
135
  parentOccurrenceId?: string;
99
- /** Phase 2: denormalisation of parent's componentId; convenience for downstream queries. */
100
- parentComponentId?: string;
101
136
  /** Phase 2: distance from highest tracked-rootless ancestor in same lexical scope. */
102
137
  depth?: number;
138
+ /**
139
+ * Stable id of the component-definition that lexically contains this call
140
+ * site (the enclosing function/class). Drives the owner-edge composition
141
+ * graph. Absent when the occurrence is module-scope JSX, in a `.html`
142
+ * file, or the parser couldn't resolve an enclosing tracked component.
143
+ */
144
+ ownerComponentId?: string;
103
145
  };
@@ -6,6 +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 { Diagnostic, DiagnosticCollector } from "./diagnostic.js";
9
10
  import type { ComponentId, ManifestComponent, ManifestSource } from "./types.js";
10
11
  import type { OccurrenceVia } from "./via-types.js";
11
12
  declare const __brand: unique symbol;
@@ -58,6 +59,8 @@ export type LocalDefinition = {
58
59
  /** True when emitted via `export default`. */
59
60
  isDefault: boolean;
60
61
  detector: DetectorId;
62
+ /** Source position of the declaration site. Populated by detectors. */
63
+ loc?: Loc;
61
64
  };
62
65
  export type LocalDefinitionIndex = {
63
66
  /** POSIX repo-relative filePath → definitions in that file. */
@@ -122,9 +125,10 @@ export type Occurrence = {
122
125
  * Phase 2: parser-side parent reference. Index into the same
123
126
  * ParseResult.occurrences array. `undefined` = no tracked parent in this
124
127
  * lexical scope. The CLI's projection layer (`parseResultsToOccurrences`)
125
- * resolves this index into `parentOccurrenceId` / `parentComponentId`
126
- * strings. Cross-file composition is out of scope (per spec non-goal),
127
- * so the index is local to one ParseResult.
128
+ * resolves this index into a `parentOccurrenceId` string; downstream
129
+ * queries needing the parent's componentId look it up via the flat
130
+ * occurrence stream. Cross-file composition is out of scope (per spec
131
+ * non-goal), so the index is local to one ParseResult.
128
132
  */
129
133
  parentRef?: number;
130
134
  /**
@@ -133,6 +137,13 @@ export type Occurrence = {
133
137
  * time the occurrence was emitted.
134
138
  */
135
139
  depth?: number;
140
+ /**
141
+ * ComponentId of the enclosing component-definition. Resolved by parsers
142
+ * via ancestor walk. The CLI projection layer hashes this into
143
+ * `OutputOccurrence.ownerComponentId`. Undefined when no enclosing tracked
144
+ * component was found.
145
+ */
146
+ ownerComponentId?: ComponentId;
136
147
  };
137
148
  export type WrapperDef = {
138
149
  id: WrapperId;
@@ -162,6 +173,8 @@ export type ParseContext = {
162
173
  resolveLazyManifest: ResolveLazyManifest;
163
174
  lookupByTag: LookupByTag;
164
175
  repoRoot: string;
176
+ /** Shared diagnostic collector for the scan run. */
177
+ collector?: DiagnosticCollector;
165
178
  };
166
179
  export interface ParserPlugin {
167
180
  name: string;
@@ -196,4 +209,5 @@ export type ScanOutput = {
196
209
  stats: ScanStats;
197
210
  components: OutputComponent[];
198
211
  occurrences: OutputOccurrence[];
212
+ diagnostics: Diagnostic[];
199
213
  };
@@ -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;AAoFpE,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":"AAsBA,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;AAsFpE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,KAAK,EAAE,IAAI,GAAG,EAAE;CACjB,CAAC"}
package/dist/schema.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare const manifestJsonSchema: {
18
18
  readonly type: "array";
19
19
  readonly items: {
20
20
  readonly type: "object";
21
- readonly required: readonly ["kind", "source", "deprecated", "props"];
21
+ readonly required: readonly ["kind", "source", "props"];
22
22
  readonly properties: {
23
23
  readonly kind: {
24
24
  readonly enum: readonly ["custom-element", "react-component", "vue-component"];
@@ -69,12 +69,11 @@ export declare const manifestJsonSchema: {
69
69
  readonly tagName: {
70
70
  readonly type: "string";
71
71
  };
72
- readonly deprecated: {
73
- readonly oneOf: readonly [{
74
- readonly type: "boolean";
75
- }, {
76
- readonly type: "string";
77
- }];
72
+ readonly description: {
73
+ readonly type: "string";
74
+ };
75
+ readonly lifecycle: {
76
+ readonly type: "object";
78
77
  };
79
78
  readonly props: {
80
79
  readonly type: "array";
package/dist/schema.js CHANGED
@@ -12,7 +12,7 @@ export const manifestJsonSchema = {
12
12
  type: "array",
13
13
  items: {
14
14
  type: "object",
15
- required: ["kind", "source", "deprecated", "props"],
15
+ required: ["kind", "source", "props"],
16
16
  properties: {
17
17
  kind: { enum: ["custom-element", "react-component", "vue-component"] },
18
18
  source: {
@@ -32,7 +32,8 @@ export const manifestJsonSchema = {
32
32
  },
33
33
  export: { type: "string" },
34
34
  tagName: { type: "string" },
35
- deprecated: { oneOf: [{ type: "boolean" }, { type: "string" }] },
35
+ description: { type: "string" },
36
+ lifecycle: { type: "object" },
36
37
  props: { type: "array", items: { type: "object", required: ["name"], properties: { name: { type: "string" } } } },
37
38
  events: { type: "array" },
38
39
  slots: { type: "array" },
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,mDAAmD;IACxD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC;IAC9D,oBAAoB,EAAE,IAAI;IAC1B,UAAU,EAAE;QACV,aAAa,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;QACjC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE;QACzC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;QACzC,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC;gBACnD,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAC,EAAE;oBACtE,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE,CAAC,MAAM,CAAC;wBAClB,UAAU,EAAE;4BACV,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE;4BACrC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,S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AAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;KAC7J;CACO,CAAC"}
package/dist/types.d.ts CHANGED
@@ -21,31 +21,39 @@ export type ComponentId = {
21
21
  export: string;
22
22
  source: ComponentSource;
23
23
  };
24
+ export type Lifecycle = {
25
+ status: "stable";
26
+ } | {
27
+ status: "deprecated";
28
+ supersededBy?: {
29
+ packageName: string;
30
+ exportName: string;
31
+ };
32
+ deprecationReason?: string;
33
+ };
24
34
  export type ManifestProp = {
25
35
  name: string;
26
36
  type?: string;
27
- deprecated?: boolean | string;
28
37
  default?: string | number | boolean | null;
38
+ values?: string[];
39
+ required?: boolean;
40
+ description?: string;
41
+ lifecycle?: Lifecycle;
29
42
  };
30
43
  export type ManifestEvent = {
31
44
  name: string;
32
- deprecated?: boolean | string;
45
+ payloadType?: string;
46
+ description?: string;
47
+ lifecycle?: Lifecycle;
33
48
  };
34
49
  export type ManifestSlot = {
35
50
  name: string;
36
- };
37
- export type Lifecycle = {
38
- status: "stable";
39
- } | {
40
- status: "deprecated";
41
- supersededBy?: {
42
- packageName: string;
43
- exportName: string;
44
- };
51
+ description?: string;
52
+ lifecycle?: Lifecycle;
45
53
  };
46
54
  type ComponentBase = {
47
55
  source: ComponentSource;
48
- deprecated: boolean | string;
56
+ description?: string;
49
57
  props: ManifestProp[];
50
58
  lifecycle?: Lifecycle;
51
59
  };
@@ -21,4 +21,8 @@ export type OccurrenceVia = {
21
21
  kind: "vue-template";
22
22
  specifier: string;
23
23
  import: string;
24
+ } | {
25
+ kind: "context-provider";
26
+ } | {
27
+ kind: "local-component";
24
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-compass/plugin-core",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",