@contractspec/lib.overlay-engine 3.7.10 → 3.7.12

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
@@ -1,3 +1,4 @@
1
+ import type { DocBlock } from '@contractspec/lib.contracts-spec/docs';
1
2
  export * from './merger';
2
3
  export * from './registry';
3
4
  export * from './runtime';
@@ -5,3 +6,4 @@ export * from './signer';
5
6
  export * from './spec';
6
7
  export * from './types';
7
8
  export * from './validator';
9
+ export declare const tech_contracts_overlays_DocBlocks: DocBlock[];
package/dist/index.js CHANGED
@@ -520,9 +520,90 @@ var OVERLAY_SCOPE_ORDER = [
520
520
  function defineOverlay(spec) {
521
521
  return spec;
522
522
  }
523
+ // src/index.ts
524
+ var tech_contracts_overlays_DocBlocks = [
525
+ {
526
+ id: "docs.tech.contracts.overlays",
527
+ title: "OverlaySpec Implementation",
528
+ summary: "OverlaySpecs allow tenants/users to adapt presentation without duplicating code. Implementation lives in `@contractspec/lib.overlay-engine`.",
529
+ kind: "reference",
530
+ visibility: "public",
531
+ route: "/docs/tech/contracts/overlays",
532
+ tags: ["tech", "contracts", "overlays"],
533
+ body: `# OverlaySpec Implementation
534
+
535
+ OverlaySpecs allow tenants/users to adapt presentation without duplicating code. Implementation lives in \`@contractspec/lib.overlay-engine\`.
536
+
537
+ ## Structure
538
+
539
+ \`\`\`ts
540
+ interface OverlaySpec {
541
+ overlayId: string;
542
+ version: string;
543
+ appliesTo: {
544
+ capability?: string;
545
+ workflow?: string;
546
+ dataView?: string;
547
+ presentation?: string;
548
+ tenantId?: string;
549
+ userId?: string;
550
+ role?: string;
551
+ device?: string;
552
+ };
553
+ modifications: OverlayModification[];
554
+ }
555
+ \`\`\`
556
+
557
+ Supported modifications:
558
+
559
+ - \`hideField\`
560
+ - \`renameLabel\`
561
+ - \`reorderFields\`
562
+ - \`setDefault\`
563
+ - \`addHelpText\`
564
+ - \`makeRequired\`
565
+
566
+ ## Signing
567
+
568
+ Overlays must be signed. Use the signer helper:
569
+
570
+ \`\`\`ts
571
+ import { signOverlay } from '@contractspec/lib.overlay-engine/signer';
572
+
573
+ const signed = await signOverlay(overlay, privateKeyPem);
574
+ registry.register(signed);
575
+ \`\`\`
576
+
577
+ Keys are stored in \`OverlaySigningKey\` (Prisma) and referenced by the \`Overlay\` model for auditing.
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+ `
601
+ }
602
+ ];
523
603
  export {
524
604
  verifyOverlaySignature,
525
605
  validateOverlaySpec,
606
+ tech_contracts_overlays_DocBlocks,
526
607
  stripSignature,
527
608
  signOverlay,
528
609
  defineOverlay,
@@ -519,9 +519,90 @@ var OVERLAY_SCOPE_ORDER = [
519
519
  function defineOverlay(spec) {
520
520
  return spec;
521
521
  }
522
+ // src/index.ts
523
+ var tech_contracts_overlays_DocBlocks = [
524
+ {
525
+ id: "docs.tech.contracts.overlays",
526
+ title: "OverlaySpec Implementation",
527
+ summary: "OverlaySpecs allow tenants/users to adapt presentation without duplicating code. Implementation lives in `@contractspec/lib.overlay-engine`.",
528
+ kind: "reference",
529
+ visibility: "public",
530
+ route: "/docs/tech/contracts/overlays",
531
+ tags: ["tech", "contracts", "overlays"],
532
+ body: `# OverlaySpec Implementation
533
+
534
+ OverlaySpecs allow tenants/users to adapt presentation without duplicating code. Implementation lives in \`@contractspec/lib.overlay-engine\`.
535
+
536
+ ## Structure
537
+
538
+ \`\`\`ts
539
+ interface OverlaySpec {
540
+ overlayId: string;
541
+ version: string;
542
+ appliesTo: {
543
+ capability?: string;
544
+ workflow?: string;
545
+ dataView?: string;
546
+ presentation?: string;
547
+ tenantId?: string;
548
+ userId?: string;
549
+ role?: string;
550
+ device?: string;
551
+ };
552
+ modifications: OverlayModification[];
553
+ }
554
+ \`\`\`
555
+
556
+ Supported modifications:
557
+
558
+ - \`hideField\`
559
+ - \`renameLabel\`
560
+ - \`reorderFields\`
561
+ - \`setDefault\`
562
+ - \`addHelpText\`
563
+ - \`makeRequired\`
564
+
565
+ ## Signing
566
+
567
+ Overlays must be signed. Use the signer helper:
568
+
569
+ \`\`\`ts
570
+ import { signOverlay } from '@contractspec/lib.overlay-engine/signer';
571
+
572
+ const signed = await signOverlay(overlay, privateKeyPem);
573
+ registry.register(signed);
574
+ \`\`\`
575
+
576
+ Keys are stored in \`OverlaySigningKey\` (Prisma) and referenced by the \`Overlay\` model for auditing.
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+ `
600
+ }
601
+ ];
522
602
  export {
523
603
  verifyOverlaySignature,
524
604
  validateOverlaySpec,
605
+ tech_contracts_overlays_DocBlocks,
525
606
  stripSignature,
526
607
  signOverlay,
527
608
  defineOverlay,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.overlay-engine",
3
- "version": "3.7.10",
3
+ "version": "3.7.12",
4
4
  "description": "Runtime overlay engine for ContractSpec personalization and adaptive UI rendering.",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@contractspec/lib.contracts-spec": "4.1.2",
35
+ "@contractspec/lib.contracts-spec": "5.0.0",
36
36
  "fast-json-stable-stringify": "^2.1.0"
37
37
  },
38
38
  "peerDependencies": {
@@ -44,9 +44,9 @@
44
44
  }
45
45
  },
46
46
  "devDependencies": {
47
- "@contractspec/tool.typescript": "3.7.8",
47
+ "@contractspec/tool.typescript": "3.7.9",
48
48
  "typescript": "^5.9.3",
49
- "@contractspec/tool.bun": "3.7.8"
49
+ "@contractspec/tool.bun": "3.7.9"
50
50
  },
51
51
  "exports": {
52
52
  ".": {