@contractspec/module.examples 1.57.0 → 1.58.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.
@@ -1,23 +1,20 @@
1
- import { ExampleRegistry as ExampleRegistry$1, ExampleSpec } from "@contractspec/lib.contracts";
2
-
3
- //#region src/registry.d.ts
1
+ import type { ExampleSpec } from '@contractspec/lib.contracts';
2
+ export { ExampleRegistry } from '@contractspec/lib.contracts';
4
3
  /**
5
4
  * Global registry containing all builtin ContractSpec examples.
6
5
  * @deprecated Prefer using ExampleRegistry directly for custom registrations.
7
6
  */
8
- declare const EXAMPLE_REGISTRY: readonly ExampleSpec[];
7
+ export declare const EXAMPLE_REGISTRY: readonly ExampleSpec[];
9
8
  /**
10
9
  * List all registered examples.
11
10
  */
12
- declare function listExamples(): readonly ExampleSpec[];
11
+ export declare function listExamples(): readonly ExampleSpec[];
13
12
  /**
14
13
  * Get an example by its key.
15
14
  */
16
- declare function getExample(key: string): ExampleSpec | undefined;
15
+ export declare function getExample(key: string): ExampleSpec | undefined;
17
16
  /**
18
17
  * Search examples by query (matches key, title, description, tags).
19
18
  */
20
- declare function searchExamples(query: string): ExampleSpec[];
21
- //#endregion
22
- export { EXAMPLE_REGISTRY, ExampleRegistry$1 as ExampleRegistry, getExample, listExamples, searchExamples };
19
+ export declare function searchExamples(query: string): ExampleSpec[];
23
20
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","names":[],"sources":["../src/registry.ts"],"mappings":";;;;AAmBA;;;cAAa,gBAAA,WAA2B,WAAA;;AAKxC;;iBAAgB,YAAA,CAAA,YAAyB,WAAA;;;AAOzC;iBAAgB,UAAA,CAAW,GAAA,WAAc,WAAA;;;;iBAOzB,cAAA,CAAe,KAAA,WAAgB,WAAA"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAU9D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAA0B,CAAC;AAE9E;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,WAAW,EAAE,CAErD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,EAAE,CAE3D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=registry.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../src/registry.test.ts"],"names":[],"mappings":""}
@@ -1,45 +1,35 @@
1
- import { TransformEngine } from "@contractspec/lib.contracts/presentations";
2
- import { AgentHandlers } from "@contractspec/example.agent-console";
3
- import { SaasHandlers } from "@contractspec/example.saas-boilerplate";
4
- import { CrmHandlers } from "@contractspec/example.crm-pipeline";
5
- import { WorkflowHandlers } from "@contractspec/example.workflow-system";
6
- import { MarketplaceHandlers } from "@contractspec/example.marketplace";
7
- import { IntegrationHandlers } from "@contractspec/example.integration-hub";
8
- import { AnalyticsHandlers } from "@contractspec/example.analytics-dashboard";
9
- import { PropsWithChildren } from "react";
10
- import * as react_jsx_runtime0 from "react/jsx-runtime";
11
- import { PolicySafeKnowledgeAssistantHandlers } from "@contractspec/example.policy-safe-knowledge-assistant";
12
- import { TemplateRuntimeProviderProps } from "@contractspec/lib.example-shared-ui";
13
-
14
- //#region src/runtime/context.d.ts
1
+ import { type PropsWithChildren } from 'react';
2
+ import { type TransformEngine } from '@contractspec/lib.contracts/presentations';
3
+ import { type CrmHandlers } from '@contractspec/example.crm-pipeline';
4
+ import { type SaasHandlers } from '@contractspec/example.saas-boilerplate';
5
+ import { type AgentHandlers } from '@contractspec/example.agent-console';
6
+ import { type WorkflowHandlers } from '@contractspec/example.workflow-system';
7
+ import { type MarketplaceHandlers } from '@contractspec/example.marketplace';
8
+ import { type IntegrationHandlers } from '@contractspec/example.integration-hub';
9
+ import { type AnalyticsHandlers } from '@contractspec/example.analytics-dashboard';
10
+ import { type PolicySafeKnowledgeAssistantHandlers } from '@contractspec/example.policy-safe-knowledge-assistant';
11
+ import { type TemplateRuntimeProviderProps } from '@contractspec/lib.example-shared-ui';
15
12
  /**
16
13
  * Template-specific handlers created from the runtime database
17
14
  */
18
- declare class TemplateHandlers {
19
- crm: CrmHandlers;
20
- saas: SaasHandlers;
21
- agent: AgentHandlers;
22
- workflow: WorkflowHandlers;
23
- marketplace: MarketplaceHandlers;
24
- integration: IntegrationHandlers;
25
- analytics: AnalyticsHandlers;
26
- policySafeKnowledgeAssistant: PolicySafeKnowledgeAssistantHandlers;
15
+ export declare class TemplateHandlers {
16
+ crm: CrmHandlers;
17
+ saas: SaasHandlers;
18
+ agent: AgentHandlers;
19
+ workflow: WorkflowHandlers;
20
+ marketplace: MarketplaceHandlers;
21
+ integration: IntegrationHandlers;
22
+ analytics: AnalyticsHandlers;
23
+ policySafeKnowledgeAssistant: PolicySafeKnowledgeAssistantHandlers;
27
24
  }
28
- declare function TemplateRuntimeProvider({
29
- templateId,
30
- projectId,
31
- lazy,
32
- children
33
- }: PropsWithChildren<TemplateRuntimeProviderProps>): react_jsx_runtime0.JSX.Element;
34
- declare function useTemplateEngine(): TransformEngine;
35
- declare function useTemplateHandlers(): TemplateHandlers;
36
- declare function useCrmHandlers(): CrmHandlers;
37
- declare function useSaasHandlers(): SaasHandlers;
38
- declare function useAgentHandlers(): AgentHandlers;
39
- declare function useWorkflowHandlers(): WorkflowHandlers;
40
- declare function useMarketplaceHandlers(): MarketplaceHandlers;
41
- declare function useIntegrationHandlers(): IntegrationHandlers;
42
- declare function useAnalyticsHandlers(): AnalyticsHandlers;
43
- //#endregion
44
- export { TemplateHandlers, TemplateRuntimeProvider, useAgentHandlers, useAnalyticsHandlers, useCrmHandlers, useIntegrationHandlers, useMarketplaceHandlers, useSaasHandlers, useTemplateEngine, useTemplateHandlers, useWorkflowHandlers };
25
+ export declare function TemplateRuntimeProvider({ templateId, projectId, lazy, children, }: PropsWithChildren<TemplateRuntimeProviderProps>): import("react/jsx-runtime").JSX.Element;
26
+ export declare function useTemplateEngine(): TransformEngine;
27
+ export declare function useTemplateHandlers(): TemplateHandlers;
28
+ export declare function useCrmHandlers(): CrmHandlers;
29
+ export declare function useSaasHandlers(): SaasHandlers;
30
+ export declare function useAgentHandlers(): AgentHandlers;
31
+ export declare function useWorkflowHandlers(): WorkflowHandlers;
32
+ export declare function useMarketplaceHandlers(): MarketplaceHandlers;
33
+ export declare function useIntegrationHandlers(): IntegrationHandlers;
34
+ export declare function useAnalyticsHandlers(): AnalyticsHandlers;
45
35
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","names":[],"sources":["../../src/runtime/context.tsx"],"mappings":";;;;;;;;;;;;;;;;;cA4Ea,gBAAA;EACX,GAAA,EAAM,WAAA;EACN,IAAA,EAAO,YAAA;EACP,KAAA,EAAQ,aAAA;EACR,QAAA,EAAW,gBAAA;EACX,WAAA,EAAc,mBAAA;EACd,WAAA,EAAc,mBAAA;EACd,SAAA,EAAY,iBAAA;EACZ,4BAAA,EAA+B,oCAAA;AAAA;AAAA,iBAGjB,uBAAA,CAAA;EACd,UAAA;EACA,SAAA;EACA,IAAA;EACA;AAAA,GACC,iBAAA,CAAkB,4BAAA,IAA6B,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAySlC,iBAAA,CAAA,GAAqB,eAAA;AAAA,iBAKrB,mBAAA,CAAA,GAAuB,gBAAA;AAAA,iBAKvB,cAAA,CAAA,GAAkB,WAAA;AAAA,iBAKlB,eAAA,CAAA,GAAmB,YAAA;AAAA,iBAKnB,gBAAA,CAAA,GAAoB,aAAA;AAAA,iBAKpB,mBAAA,CAAA,GAAuB,gBAAA;AAAA,iBAKvB,sBAAA,CAAA,GAA0B,mBAAA;AAAA,iBAK1B,sBAAA,CAAA,GAA0B,mBAAA;AAAA,iBAK1B,oBAAA,CAAA,GAAwB,iBAAA"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAM7E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAGjF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,uDAAuD,CAAC;AAM/D,OAAO,EAGL,KAAK,4BAA4B,EAGlC,MAAM,qCAAqC,CAAC;AAmB7C;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,GAAG,EAAG,WAAW,CAAC;IAClB,IAAI,EAAG,YAAY,CAAC;IACpB,KAAK,EAAG,aAAa,CAAC;IACtB,QAAQ,EAAG,gBAAgB,CAAC;IAC5B,WAAW,EAAG,mBAAmB,CAAC;IAClC,WAAW,EAAG,mBAAmB,CAAC;IAClC,SAAS,EAAG,iBAAiB,CAAC;IAC9B,4BAA4B,EAAG,oCAAoC,CAAC;CACrE;AAED,wBAAgB,uBAAuB,CAAC,EACtC,UAAU,EACV,SAA6B,EAC7B,IAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,CAAC,4BAA4B,CAAC,2CAsSjD;AAGD,wBAAgB,iBAAiB,IAAI,eAAe,CAEnD;AAGD,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD;AAGD,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAGD,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAGD,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAGD,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD;AAGD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAGD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAGD,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD"}
@@ -1,18 +1,20 @@
1
- import { TransformEngine } from "@contractspec/lib.contracts/presentations";
2
-
3
- //#region src/runtime/engine.d.ts
1
+ /**
2
+ * Template TransformEngine Setup
3
+ *
4
+ * Creates and configures a TransformEngine instance with all template-specific
5
+ * renderers for React and Markdown targets.
6
+ */
7
+ import { type TransformEngine } from '@contractspec/lib.contracts/presentations';
4
8
  /**
5
9
  * Create a TransformEngine configured for template rendering
6
10
  */
7
- declare function createTemplateTransformEngine(): TransformEngine;
11
+ export declare function createTemplateTransformEngine(): TransformEngine;
8
12
  /**
9
13
  * Get or create the shared template engine instance
10
14
  */
11
- declare function getTemplateEngine(): TransformEngine;
15
+ export declare function getTemplateEngine(): TransformEngine;
12
16
  /**
13
17
  * Reset the shared engine (useful for testing)
14
18
  */
15
- declare function resetTemplateEngine(): void;
16
- //#endregion
17
- export { createTemplateTransformEngine, getTemplateEngine, resetTemplateEngine };
19
+ export declare function resetTemplateEngine(): void;
18
20
  //# sourceMappingURL=engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","names":[],"sources":["../../src/runtime/engine.ts"],"mappings":";;;;AAmIA;;iBArEgB,6BAAA,CAAA,GAAiC,eAAA;;;AA+EjD;iBAVgB,iBAAA,CAAA,GAAqB,eAAA;;;;iBAUrB,mBAAA,CAAA"}
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/runtime/engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,2CAA2C,CAAC;AAgDnD;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,eAAe,CAW/D;AAuDD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,CAKnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -1,40 +1,37 @@
1
- import { RegistryTemplateSummary } from "./registry-client.js";
2
- import { web } from "@contractspec/lib.runtime-sandbox";
3
- import { InstallTemplateOptions, SaveTemplateOptions, SaveTemplateResult, TemplateDefinition, TemplateFilter, TemplateId } from "@contractspec/lib.example-shared-ui";
4
-
5
- //#region src/runtime/installer.d.ts
1
+ import type { TemplateDefinition, TemplateFilter, TemplateId, InstallTemplateOptions, SaveTemplateOptions, SaveTemplateResult } from '@contractspec/lib.example-shared-ui';
2
+ import { type RegistryTemplateSummary } from './registry-client';
3
+ import { web } from '@contractspec/lib.runtime-sandbox';
6
4
  declare const LocalRuntimeServices: typeof web.LocalRuntimeServices;
7
5
  type LocalRuntimeServices = InstanceType<typeof LocalRuntimeServices>;
8
- interface TemplateInstallerOptions {
9
- runtime?: LocalRuntimeServices;
10
- endpoint?: string;
11
- /** Optional registry server base URL (enables listing remote/community templates) */
12
- registryUrl?: string;
13
- fetchImpl?: typeof fetch;
6
+ export interface TemplateInstallerOptions {
7
+ runtime?: LocalRuntimeServices;
8
+ endpoint?: string;
9
+ /** Optional registry server base URL (enables listing remote/community templates) */
10
+ registryUrl?: string;
11
+ fetchImpl?: typeof fetch;
14
12
  }
15
- declare class TemplateInstaller {
16
- private readonly runtime;
17
- private readonly endpoint;
18
- private readonly registryUrl;
19
- private readonly fetchImpl;
20
- constructor(options?: TemplateInstallerOptions);
21
- init(): Promise<void>;
22
- list(filter?: TemplateFilter): TemplateDefinition[];
23
- /**
24
- * List templates published to the ContractSpec Registry.
25
- *
26
- * Note: this returns *metadata* only. Installing still requires a local template
27
- * implementation unless/until we support seeding templates from registry payloads.
28
- */
29
- listRemoteTemplates(): Promise<RegistryTemplateSummary[]>;
30
- /**
31
- * Resolve a registry template id to a local TemplateId if available.
32
- */
33
- resolveLocalTemplateId(id: string): TemplateId | null;
34
- get(templateId: TemplateId): TemplateDefinition | undefined;
35
- install(templateId: TemplateId, options?: InstallTemplateOptions): Promise<void>;
36
- saveToStudio(options: SaveTemplateOptions): Promise<SaveTemplateResult>;
13
+ export declare class TemplateInstaller {
14
+ private readonly runtime;
15
+ private readonly endpoint;
16
+ private readonly registryUrl;
17
+ private readonly fetchImpl;
18
+ constructor(options?: TemplateInstallerOptions);
19
+ init(): Promise<void>;
20
+ list(filter?: TemplateFilter): TemplateDefinition[];
21
+ /**
22
+ * List templates published to the ContractSpec Registry.
23
+ *
24
+ * Note: this returns *metadata* only. Installing still requires a local template
25
+ * implementation unless/until we support seeding templates from registry payloads.
26
+ */
27
+ listRemoteTemplates(): Promise<RegistryTemplateSummary[]>;
28
+ /**
29
+ * Resolve a registry template id to a local TemplateId if available.
30
+ */
31
+ resolveLocalTemplateId(id: string): TemplateId | null;
32
+ get(templateId: TemplateId): TemplateDefinition | undefined;
33
+ install(templateId: TemplateId, options?: InstallTemplateOptions): Promise<void>;
34
+ saveToStudio(options: SaveTemplateOptions): Promise<SaveTemplateResult>;
37
35
  }
38
- //#endregion
39
- export { TemplateInstaller, TemplateInstallerOptions };
36
+ export {};
40
37
  //# sourceMappingURL=installer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","names":[],"sources":["../../src/runtime/installer.ts"],"mappings":";;;;;cAiBQ,oBAAA,SAAoB,GAAA,CAAA,oBAAA;AAAA,KACvB,oBAAA,GAAuB,YAAA,QAAoB,oBAAA;AAAA,UAW/B,wBAAA;EACf,OAAA,GAAU,oBAAA;EACV,QAAA;EAd0B;EAgB1B,WAAA;EACA,SAAA,UAAmB,KAAA;AAAA;AAAA,cAGR,iBAAA;EAAA,iBACM,OAAA;EAAA,iBACA,QAAA;EAAA,iBACA,WAAA;EAAA,iBACA,SAAA;cAEL,OAAA,GAAS,wBAAA;EASf,IAAA,CAAA,GAAQ,OAAA;EAId,IAAA,CAAK,MAAA,GAAS,cAAA,GAAiB,kBAAA;EA1BrB;;;;;;EAiDJ,mBAAA,CAAA,GAAuB,OAAA,CAAQ,uBAAA;EA1C1B;;;EAsDX,sBAAA,CAAuB,EAAA,WAAa,UAAA;EAKpC,GAAA,CAAI,UAAA,EAAY,UAAA,GAAa,kBAAA;EAIvB,OAAA,CACJ,UAAA,EAAY,UAAA,EACZ,OAAA,GAAS,sBAAA,GACR,OAAA;EAOG,YAAA,CACJ,OAAA,EAAS,mBAAA,GACR,OAAA,CAAQ,kBAAA;AAAA"}
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/runtime/installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAExD,QAAA,MAAQ,oBAAoB,iCAAQ,CAAC;AACrC,KAAK,oBAAoB,GAAG,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAWtE,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,OAAO,GAAE,wBAA6B;IAS5C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,kBAAkB,EAAE;IAiBnD;;;;;OAKG;IACG,mBAAmB,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAS/D;;OAEG;IACH,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAKrD,GAAG,CAAC,UAAU,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS;IAIrD,OAAO,CACX,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,IAAI,CAAC;IAOV,YAAY,CAChB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC;CA6C/B"}
@@ -1,14 +1,23 @@
1
- import "@contractspec/lib.contracts";
2
-
3
- //#region src/runtime/registry-client.d.ts
4
- interface RegistryTemplateSummary {
5
- id: string;
6
- title: string;
7
- description: string;
8
- version: string;
9
- tags: string[];
10
- source: 'registry';
1
+ import type { ContractRegistryItem, ContractRegistryItemType, ContractRegistryManifest } from '@contractspec/lib.contracts';
2
+ export interface RegistryTemplateSummary {
3
+ id: string;
4
+ title: string;
5
+ description: string;
6
+ version: string;
7
+ tags: string[];
8
+ source: 'registry';
9
+ }
10
+ export interface RegistryClientOptions {
11
+ registryUrl: string;
12
+ fetchImpl?: typeof fetch;
13
+ }
14
+ export declare class ContractSpecRegistryClient {
15
+ private readonly baseUrl;
16
+ private readonly fetchImpl;
17
+ constructor(options: RegistryClientOptions);
18
+ getManifest(): Promise<ContractRegistryManifest>;
19
+ listByType(type: ContractRegistryItemType): Promise<ContractRegistryItem[]>;
20
+ listTemplateSummaries(): Promise<RegistryTemplateSummary[]>;
21
+ getItem(typeSegment: string, name: string): Promise<ContractRegistryItem>;
11
22
  }
12
- //#endregion
13
- export { RegistryTemplateSummary };
14
23
  //# sourceMappingURL=registry-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry-client.d.ts","names":[],"sources":["../../src/runtime/registry-client.ts"],"mappings":";;;UAMiB,uBAAA;EACf,EAAA;EACA,KAAA;EACA,WAAA;EACA,OAAA;EACA,IAAA;EACA,MAAA;AAAA"}
1
+ {"version":3,"file":"registry-client.d.ts","sourceRoot":"","sources":["../../src/runtime/registry-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,OAAO,EAAE,qBAAqB;IAKpC,WAAW,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAahD,UAAU,CACd,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAK5B,qBAAqB,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAY3D,OAAO,CACX,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,oBAAoB,CAAC;CAejC"}
@@ -1,17 +1,13 @@
1
- import { TemplateDefinition, TemplateFilter, TemplateId } from "@contractspec/lib.example-shared-ui";
2
-
3
- //#region src/runtime/registry.d.ts
4
- declare const TEMPLATE_REGISTRY: TemplateDefinition[];
5
- declare function listTemplates(filter?: TemplateFilter): TemplateDefinition[];
6
- declare function getTemplate(id: TemplateId): TemplateDefinition | undefined;
1
+ import type { TemplateDefinition, TemplateId, TemplateFilter } from '@contractspec/lib.example-shared-ui';
2
+ export declare const TEMPLATE_REGISTRY: TemplateDefinition[];
3
+ export declare function listTemplates(filter?: TemplateFilter): TemplateDefinition[];
4
+ export declare function getTemplate(id: TemplateId): TemplateDefinition | undefined;
7
5
  /**
8
6
  * Get templates that use a specific cross-cutting module
9
7
  */
10
- declare function getTemplatesByModule(modulePackage: string): TemplateDefinition[];
8
+ export declare function getTemplatesByModule(modulePackage: string): TemplateDefinition[];
11
9
  /**
12
10
  * Get all templates with external packages (clonable via Git)
13
11
  */
14
- declare function getClonableTemplates(): TemplateDefinition[];
15
- //#endregion
16
- export { TEMPLATE_REGISTRY, getClonableTemplates, getTemplate, getTemplatesByModule, listTemplates };
12
+ export declare function getClonableTemplates(): TemplateDefinition[];
17
13
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","names":[],"sources":["../../src/runtime/registry.ts"],"mappings":";;;cA2Ea,iBAAA,EAAmB,kBAAA;AAAA,iBA4HhB,aAAA,CAAc,MAAA,GAAS,cAAA,GAAiB,kBAAA;AAAA,iBAqBxC,WAAA,CAAY,EAAA,EAAI,UAAA,GAAa,kBAAA;;;;iBAO7B,oBAAA,CACd,aAAA,WACC,kBAAA;AA9BH;;;AAAA,iBAuCgB,oBAAA,CAAA,GAAwB,kBAAA"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/runtime/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,kBAAkB,EAClB,UAAU,EACV,cAAc,EACf,MAAM,qCAAqC,CAAC;AAoE7C,eAAO,MAAM,iBAAiB,EAAE,kBAAkB,EA0HjD,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,kBAAkB,EAAE,CAmB3E;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,UAAU,GAAG,kBAAkB,GAAG,SAAS,CAE1E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,GACpB,kBAAkB,EAAE,CAItB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,kBAAkB,EAAE,CAE3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/module.examples",
3
- "version": "1.57.0",
3
+ "version": "1.58.0",
4
4
  "description": "Example contract specifications collection",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -18,76 +18,78 @@
18
18
  "scripts": {
19
19
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
20
20
  "publish:pkg:canary": "bun publish:pkg --tag canary",
21
- "build": "bun build:types && bun build:bundle",
22
- "build:bundle": "tsdown",
23
- "build:types": "tsc --noEmit",
24
- "dev": "bun build:bundle --watch",
21
+ "build": "bun run prebuild && bun run build:bundle && bun run build:types",
22
+ "build:bundle": "contractspec-bun-build transpile",
23
+ "build:types": "contractspec-bun-build types",
24
+ "dev": "contractspec-bun-build dev",
25
25
  "clean": "rimraf dist .turbo",
26
26
  "lint": "bun lint:fix",
27
27
  "lint:fix": "eslint src --fix",
28
28
  "lint:check": "eslint src",
29
- "test": "bun test"
29
+ "test": "bun test",
30
+ "prebuild": "contractspec-bun-build prebuild",
31
+ "typecheck": "tsc --noEmit"
30
32
  },
31
33
  "dependencies": {
32
34
  "@apollo/client": "^4.1.4",
33
- "@contractspec/example.agent-console": "1.57.0",
34
- "@contractspec/example.ai-support-bot": "1.57.0",
35
- "@contractspec/example.analytics-dashboard": "1.57.0",
36
- "@contractspec/example.content-generation": "1.57.0",
37
- "@contractspec/example.crm-pipeline": "1.57.0",
38
- "@contractspec/example.integration-hub": "1.57.0",
39
- "@contractspec/example.integration-stripe": "1.57.0",
40
- "@contractspec/example.voice-providers": "1.57.0",
41
- "@contractspec/example.kb-update-pipeline": "1.57.0",
42
- "@contractspec/example.knowledge-canon": "1.57.0",
43
- "@contractspec/example.learning-journey-ambient-coach": "1.57.0",
44
- "@contractspec/example.learning-journey-crm-onboarding": "1.57.0",
45
- "@contractspec/example.learning-journey-duo-drills": "1.57.0",
46
- "@contractspec/example.learning-journey-platform-tour": "1.57.0",
47
- "@contractspec/example.learning-journey-quest-challenges": "1.57.0",
48
- "@contractspec/example.learning-journey-registry": "1.57.0",
49
- "@contractspec/example.learning-journey-studio-onboarding": "1.57.0",
50
- "@contractspec/example.learning-journey-ui-coaching": "1.57.0",
51
- "@contractspec/example.learning-journey-ui-gamified": "1.57.0",
52
- "@contractspec/example.learning-journey-ui-onboarding": "1.57.0",
53
- "@contractspec/example.learning-journey-ui-shared": "1.57.0",
54
- "@contractspec/example.learning-patterns": "1.57.0",
55
- "@contractspec/example.lifecycle-cli": "1.57.0",
56
- "@contractspec/example.lifecycle-dashboard": "1.57.0",
57
- "@contractspec/example.locale-jurisdiction-gate": "1.57.0",
58
- "@contractspec/example.marketplace": "1.57.0",
59
- "@contractspec/example.openbanking-powens": "1.57.0",
60
- "@contractspec/example.personalization": "1.57.0",
61
- "@contractspec/example.policy-safe-knowledge-assistant": "1.57.0",
62
- "@contractspec/example.saas-boilerplate": "1.57.0",
63
- "@contractspec/example.service-business-os": "1.57.0",
64
- "@contractspec/example.team-hub": "1.57.0",
65
- "@contractspec/example.versioned-knowledge-base": "1.57.0",
66
- "@contractspec/example.wealth-snapshot": "1.57.0",
67
- "@contractspec/example.workflow-system": "1.57.0",
68
- "@contractspec/lib.contracts": "1.57.0",
69
- "@contractspec/lib.example-shared-ui": "1.11.0",
70
- "@contractspec/lib.runtime-sandbox": "0.12.0",
35
+ "@contractspec/example.agent-console": "1.58.0",
36
+ "@contractspec/example.ai-support-bot": "1.58.0",
37
+ "@contractspec/example.analytics-dashboard": "1.58.0",
38
+ "@contractspec/example.content-generation": "1.58.0",
39
+ "@contractspec/example.crm-pipeline": "1.58.0",
40
+ "@contractspec/example.integration-hub": "1.58.0",
41
+ "@contractspec/example.integration-stripe": "1.58.0",
42
+ "@contractspec/example.voice-providers": "1.58.0",
43
+ "@contractspec/example.kb-update-pipeline": "1.58.0",
44
+ "@contractspec/example.knowledge-canon": "1.58.0",
45
+ "@contractspec/example.learning-journey-ambient-coach": "1.58.0",
46
+ "@contractspec/example.learning-journey-crm-onboarding": "1.58.0",
47
+ "@contractspec/example.learning-journey-duo-drills": "1.58.0",
48
+ "@contractspec/example.learning-journey-platform-tour": "1.58.0",
49
+ "@contractspec/example.learning-journey-quest-challenges": "1.58.0",
50
+ "@contractspec/example.learning-journey-registry": "1.58.0",
51
+ "@contractspec/example.learning-journey-studio-onboarding": "1.58.0",
52
+ "@contractspec/example.learning-journey-ui-coaching": "1.58.0",
53
+ "@contractspec/example.learning-journey-ui-gamified": "1.58.0",
54
+ "@contractspec/example.learning-journey-ui-onboarding": "1.58.0",
55
+ "@contractspec/example.learning-journey-ui-shared": "1.58.0",
56
+ "@contractspec/example.learning-patterns": "1.58.0",
57
+ "@contractspec/example.lifecycle-cli": "1.58.0",
58
+ "@contractspec/example.lifecycle-dashboard": "1.58.0",
59
+ "@contractspec/example.locale-jurisdiction-gate": "1.58.0",
60
+ "@contractspec/example.marketplace": "1.58.0",
61
+ "@contractspec/example.openbanking-powens": "1.58.0",
62
+ "@contractspec/example.personalization": "1.58.0",
63
+ "@contractspec/example.policy-safe-knowledge-assistant": "1.58.0",
64
+ "@contractspec/example.saas-boilerplate": "1.58.0",
65
+ "@contractspec/example.service-business-os": "1.58.0",
66
+ "@contractspec/example.team-hub": "1.58.0",
67
+ "@contractspec/example.versioned-knowledge-base": "1.58.0",
68
+ "@contractspec/example.wealth-snapshot": "1.58.0",
69
+ "@contractspec/example.workflow-system": "1.58.0",
70
+ "@contractspec/lib.contracts": "1.58.0",
71
+ "@contractspec/lib.example-shared-ui": "1.12.0",
72
+ "@contractspec/lib.runtime-sandbox": "0.13.0",
71
73
  "zod": "^4.3.5"
72
74
  },
73
75
  "devDependencies": {
74
- "@contractspec/tool.tsdown": "1.57.0",
75
- "@contractspec/tool.typescript": "1.57.0",
76
- "tsdown": "^0.20.3",
77
- "typescript": "^5.9.3"
76
+ "@contractspec/tool.typescript": "1.58.0",
77
+ "typescript": "^5.9.3",
78
+ "@contractspec/tool.bun": "1.57.0"
78
79
  },
79
80
  "exports": {
80
- ".": "./dist/index.js",
81
- "./*": "./*"
81
+ ".": "./src/index.ts"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public",
85
85
  "exports": {
86
- ".": "./dist/index.js",
87
- "./registry": "./dist/registry.js",
88
- "./runtime/registry": "./dist/runtime/registry.js",
89
- "./runtime/*": "./dist/runtime/*",
90
- "./*": "./dist/*"
86
+ ".": {
87
+ "types": "./dist/index.d.ts",
88
+ "bun": "./dist/index.js",
89
+ "node": "./dist/node/index.mjs",
90
+ "browser": "./dist/browser/index.js",
91
+ "default": "./dist/index.js"
92
+ }
91
93
  },
92
94
  "registry": "https://registry.npmjs.org/"
93
95
  },
package/dist/builtins.js DELETED
@@ -1,78 +0,0 @@
1
- import AgentConsole from "@contractspec/example.agent-console/example";
2
- import AiSupportBot from "@contractspec/example.ai-support-bot/example";
3
- import AnalyticsDashboard from "@contractspec/example.analytics-dashboard/example";
4
- import ContentGeneration from "@contractspec/example.content-generation/example";
5
- import CrmPipeline from "@contractspec/example.crm-pipeline/example";
6
- import IntegrationHub from "@contractspec/example.integration-hub/example";
7
- import IntegrationStripe from "@contractspec/example.integration-stripe/example";
8
- import VoiceProviders from "@contractspec/example.voice-providers/example";
9
- import KbUpdatePipeline from "@contractspec/example.kb-update-pipeline/example";
10
- import KnowledgeCanon from "@contractspec/example.knowledge-canon/example";
11
- import LearningPatterns from "@contractspec/example.learning-patterns/example";
12
- import LearningJourneyAmbientCoach from "@contractspec/example.learning-journey-ambient-coach/example";
13
- import LearningJourneyCrmOnboarding from "@contractspec/example.learning-journey-crm-onboarding/example";
14
- import LearningJourneyDuoDrills from "@contractspec/example.learning-journey-duo-drills/example";
15
- import LearningJourneyPlatformTour from "@contractspec/example.learning-journey-platform-tour/example";
16
- import LearningJourneyQuestChallenges from "@contractspec/example.learning-journey-quest-challenges/example";
17
- import LearningJourneyRegistry from "@contractspec/example.learning-journey-registry/example";
18
- import LearningJourneyStudioOnboarding from "@contractspec/example.learning-journey-studio-onboarding/example";
19
- import LearningJourneyUiCoaching from "@contractspec/example.learning-journey-ui-coaching/example";
20
- import LearningJourneyUiGamified from "@contractspec/example.learning-journey-ui-gamified/example";
21
- import LearningJourneyUiOnboarding from "@contractspec/example.learning-journey-ui-onboarding/example";
22
- import LearningJourneyUiShared from "@contractspec/example.learning-journey-ui-shared/example";
23
- import LifecycleCli from "@contractspec/example.lifecycle-cli/example";
24
- import LifecycleDashboard from "@contractspec/example.lifecycle-dashboard/example";
25
- import LocaleJurisdictionGate from "@contractspec/example.locale-jurisdiction-gate/example";
26
- import Marketplace from "@contractspec/example.marketplace/example";
27
- import OpenbankingPowens from "@contractspec/example.openbanking-powens/example";
28
- import Personalization from "@contractspec/example.personalization/example";
29
- import PolicySafeKnowledgeAssistant from "@contractspec/example.policy-safe-knowledge-assistant/example";
30
- import SaasBoilerplate from "@contractspec/example.saas-boilerplate/example";
31
- import ServiceBusinessOs from "@contractspec/example.service-business-os/example";
32
- import TeamHub from "@contractspec/example.team-hub/example";
33
- import VersionedKnowledgeBase from "@contractspec/example.versioned-knowledge-base/example";
34
- import WealthSnapshot from "@contractspec/example.wealth-snapshot/example";
35
- import WorkflowSystem from "@contractspec/example.workflow-system/example";
36
-
37
- //#region src/builtins.ts
38
- const EXAMPLE_REGISTRY = [
39
- AgentConsole,
40
- AiSupportBot,
41
- AnalyticsDashboard,
42
- ContentGeneration,
43
- CrmPipeline,
44
- IntegrationHub,
45
- IntegrationStripe,
46
- VoiceProviders,
47
- KbUpdatePipeline,
48
- KnowledgeCanon,
49
- LearningPatterns,
50
- LearningJourneyAmbientCoach,
51
- LearningJourneyCrmOnboarding,
52
- LearningJourneyDuoDrills,
53
- LearningJourneyPlatformTour,
54
- LearningJourneyQuestChallenges,
55
- LearningJourneyRegistry,
56
- LearningJourneyStudioOnboarding,
57
- LearningJourneyUiCoaching,
58
- LearningJourneyUiGamified,
59
- LearningJourneyUiOnboarding,
60
- LearningJourneyUiShared,
61
- LifecycleCli,
62
- LifecycleDashboard,
63
- LocaleJurisdictionGate,
64
- Marketplace,
65
- OpenbankingPowens,
66
- Personalization,
67
- PolicySafeKnowledgeAssistant,
68
- SaasBoilerplate,
69
- ServiceBusinessOs,
70
- TeamHub,
71
- VersionedKnowledgeBase,
72
- WealthSnapshot,
73
- WorkflowSystem
74
- ];
75
-
76
- //#endregion
77
- export { EXAMPLE_REGISTRY };
78
- //# sourceMappingURL=builtins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtins.js","names":[],"sources":["../src/builtins.ts"],"sourcesContent":["import type { ExampleSpec } from '@contractspec/lib.contracts';\n\n// Import manifests ONLY via the side-effect-free `/example` entrypoints.\nimport AgentConsole from '@contractspec/example.agent-console/example';\nimport AiSupportBot from '@contractspec/example.ai-support-bot/example';\nimport AnalyticsDashboard from '@contractspec/example.analytics-dashboard/example';\nimport ContentGeneration from '@contractspec/example.content-generation/example';\nimport CrmPipeline from '@contractspec/example.crm-pipeline/example';\nimport IntegrationHub from '@contractspec/example.integration-hub/example';\nimport IntegrationStripe from '@contractspec/example.integration-stripe/example';\nimport VoiceProviders from '@contractspec/example.voice-providers/example';\nimport KbUpdatePipeline from '@contractspec/example.kb-update-pipeline/example';\nimport KnowledgeCanon from '@contractspec/example.knowledge-canon/example';\nimport LearningPatterns from '@contractspec/example.learning-patterns/example';\nimport LearningJourneyAmbientCoach from '@contractspec/example.learning-journey-ambient-coach/example';\nimport LearningJourneyCrmOnboarding from '@contractspec/example.learning-journey-crm-onboarding/example';\nimport LearningJourneyDuoDrills from '@contractspec/example.learning-journey-duo-drills/example';\nimport LearningJourneyPlatformTour from '@contractspec/example.learning-journey-platform-tour/example';\nimport LearningJourneyQuestChallenges from '@contractspec/example.learning-journey-quest-challenges/example';\nimport LearningJourneyRegistry from '@contractspec/example.learning-journey-registry/example';\nimport LearningJourneyStudioOnboarding from '@contractspec/example.learning-journey-studio-onboarding/example';\nimport LearningJourneyUiCoaching from '@contractspec/example.learning-journey-ui-coaching/example';\nimport LearningJourneyUiGamified from '@contractspec/example.learning-journey-ui-gamified/example';\nimport LearningJourneyUiOnboarding from '@contractspec/example.learning-journey-ui-onboarding/example';\nimport LearningJourneyUiShared from '@contractspec/example.learning-journey-ui-shared/example';\nimport LifecycleCli from '@contractspec/example.lifecycle-cli/example';\nimport LifecycleDashboard from '@contractspec/example.lifecycle-dashboard/example';\nimport LocaleJurisdictionGate from '@contractspec/example.locale-jurisdiction-gate/example';\nimport Marketplace from '@contractspec/example.marketplace/example';\nimport OpenbankingPowens from '@contractspec/example.openbanking-powens/example';\nimport Personalization from '@contractspec/example.personalization/example';\nimport PolicySafeKnowledgeAssistant from '@contractspec/example.policy-safe-knowledge-assistant/example';\nimport SaasBoilerplate from '@contractspec/example.saas-boilerplate/example';\nimport ServiceBusinessOs from '@contractspec/example.service-business-os/example';\nimport TeamHub from '@contractspec/example.team-hub/example';\nimport VersionedKnowledgeBase from '@contractspec/example.versioned-knowledge-base/example';\nimport WealthSnapshot from '@contractspec/example.wealth-snapshot/example';\nimport WorkflowSystem from '@contractspec/example.workflow-system/example';\n\nexport const EXAMPLE_REGISTRY: readonly ExampleSpec[] = [\n AgentConsole,\n AiSupportBot,\n AnalyticsDashboard,\n ContentGeneration,\n CrmPipeline,\n IntegrationHub,\n IntegrationStripe,\n VoiceProviders,\n KbUpdatePipeline,\n KnowledgeCanon,\n LearningPatterns,\n LearningJourneyAmbientCoach,\n LearningJourneyCrmOnboarding,\n LearningJourneyDuoDrills,\n LearningJourneyPlatformTour,\n LearningJourneyQuestChallenges,\n LearningJourneyRegistry,\n LearningJourneyStudioOnboarding,\n LearningJourneyUiCoaching,\n LearningJourneyUiGamified,\n LearningJourneyUiOnboarding,\n LearningJourneyUiShared,\n LifecycleCli,\n LifecycleDashboard,\n LocaleJurisdictionGate,\n Marketplace,\n OpenbankingPowens,\n Personalization,\n PolicySafeKnowledgeAssistant,\n SaasBoilerplate,\n ServiceBusinessOs,\n TeamHub,\n VersionedKnowledgeBase,\n WealthSnapshot,\n WorkflowSystem,\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,mBAA2C;CACtD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
package/dist/registry.js DELETED
@@ -1,33 +0,0 @@
1
- import { EXAMPLE_REGISTRY as EXAMPLE_REGISTRY$1 } from "./builtins.js";
2
- import { ExampleRegistry, ExampleRegistry as ExampleRegistry$1 } from "@contractspec/lib.contracts";
3
-
4
- //#region src/registry.ts
5
- const globalRegistry = new ExampleRegistry();
6
- for (const example of EXAMPLE_REGISTRY$1) globalRegistry.register(example);
7
- /**
8
- * Global registry containing all builtin ContractSpec examples.
9
- * @deprecated Prefer using ExampleRegistry directly for custom registrations.
10
- */
11
- const EXAMPLE_REGISTRY = globalRegistry.list();
12
- /**
13
- * List all registered examples.
14
- */
15
- function listExamples() {
16
- return globalRegistry.list();
17
- }
18
- /**
19
- * Get an example by its key.
20
- */
21
- function getExample(key) {
22
- return globalRegistry.get(key);
23
- }
24
- /**
25
- * Search examples by query (matches key, title, description, tags).
26
- */
27
- function searchExamples(query) {
28
- return globalRegistry.search(query);
29
- }
30
-
31
- //#endregion
32
- export { EXAMPLE_REGISTRY, ExampleRegistry$1 as ExampleRegistry, getExample, listExamples, searchExamples };
33
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","names":["BUILTIN_EXAMPLES"],"sources":["../src/registry.ts"],"sourcesContent":["import { ExampleRegistry } from '@contractspec/lib.contracts';\nimport type { ExampleSpec } from '@contractspec/lib.contracts';\nimport { EXAMPLE_REGISTRY as BUILTIN_EXAMPLES } from './builtins';\n\n// Export the ExampleRegistry class from contracts\nexport { ExampleRegistry } from '@contractspec/lib.contracts';\n\n// Create a global registry instance populated with builtins\nconst globalRegistry = new ExampleRegistry();\n\n// Register all builtin examples\nfor (const example of BUILTIN_EXAMPLES) {\n globalRegistry.register(example);\n}\n\n/**\n * Global registry containing all builtin ContractSpec examples.\n * @deprecated Prefer using ExampleRegistry directly for custom registrations.\n */\nexport const EXAMPLE_REGISTRY: readonly ExampleSpec[] = globalRegistry.list();\n\n/**\n * List all registered examples.\n */\nexport function listExamples(): readonly ExampleSpec[] {\n return globalRegistry.list();\n}\n\n/**\n * Get an example by its key.\n */\nexport function getExample(key: string): ExampleSpec | undefined {\n return globalRegistry.get(key);\n}\n\n/**\n * Search examples by query (matches key, title, description, tags).\n */\nexport function searchExamples(query: string): ExampleSpec[] {\n return globalRegistry.search(query);\n}\n"],"mappings":";;;;AAQA,MAAM,iBAAiB,IAAI,iBAAiB;AAG5C,KAAK,MAAM,WAAWA,mBACpB,gBAAe,SAAS,QAAQ;;;;;AAOlC,MAAa,mBAA2C,eAAe,MAAM;;;;AAK7E,SAAgB,eAAuC;AACrD,QAAO,eAAe,MAAM;;;;;AAM9B,SAAgB,WAAW,KAAsC;AAC/D,QAAO,eAAe,IAAI,IAAI;;;;;AAMhC,SAAgB,eAAe,OAA8B;AAC3D,QAAO,eAAe,OAAO,MAAM"}