// @bun
var{defineProperty:q,getOwnPropertyNames:x,getOwnPropertyDescriptor:z}=Object,A=Object.prototype.hasOwnProperty;function B(g){return this[g]}var E=(g)=>{var j=(v??=new WeakMap).get(g),k;if(j)return j;if(j=q({},"__esModule",{value:!0}),g&&typeof g==="object"||typeof g==="function"){for(var l of x(g))if(!A.call(j,l))q(j,l,{get:B.bind(g,l),enumerable:!(k=z(g,l))||k.enumerable})}return v.set(g,j),j},v;var C=(g)=>g;function D(g,j){this[g]=C.bind(null,j)}var F=(g,j)=>{for(var k in j)q(g,k,{get:j[k],enumerable:!0,configurable:!0,set:D.bind(j,k)})};var G=(g,j)=>()=>(g&&(j=g(g=0)),j);var I=(g)=>{return g},J=[{id:"docs.tech.contracts.presentations-conventions",title:"Presentations Conventions (A11y & i18n)",summary:"- Always provide `meta.description` (\u2265 3 chars) \u2014 used by a11y/docs/agents.",kind:"reference",visibility:"public",route:"/docs/tech/contracts/presentations-conventions",tags:["tech","contracts","presentations-conventions"],body:`## Presentations Conventions (A11y & i18n)

- Always provide \`meta.description\` (\u2265 3 chars) \u2014 used by a11y/docs/agents.
- Prefer source = BlockNote for rich guides; use component key for interactive flows.
- i18n strings belong in host apps; descriptors carry keys/defaults only.
- Target selection: include only what you intend to support to avoid drift.
- PII: declare JSON-like paths under \`policy.pii\`; engine redacts in outputs.
`}],K=[{id:"docs.tech.contracts.presentations",title:"Presentations \u2014 Unified Descriptor & Transform Engine",summary:"How PresentationSpec and TransformEngine keep docs/renderers consistent.",visibility:"public",route:"/docs/tech/contracts/presentations",kind:"reference",tags:["presentations","docs","mcp"],body:`## Presentations V2 \u2014 Unified Descriptor & Transform Engine

### Purpose

Unify presentations into one descriptor (\`PresentationSpec\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \`TransformEngine\` renders any target and applies PII redaction.

### Types

\`\`\`ts
type PresentationTarget =
  | 'react'
  | 'markdown'
  | 'application/json'
  | 'application/xml';

type PresentationSource =
  | {
      type: 'component';
      framework: 'react';
      componentKey: string;
      props?: AnySchemaModel;
    }
  | { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };

interface PresentationSpec {
  meta: PresentationMeta; // includes partial OwnerShipMeta + description
  policy?: { flags?: string[]; pii?: string[] };
  source: PresentationSource;
  targets: PresentationTarget[];
}

// Shared ownership schema (source of truth in @contractspec/lib.contracts-spec/src/ownership.ts)
interface OwnerShipMeta {
  title: string;
  description: string;
  domain: string;
  owners: Owner[];
  tags: Tag[];
  stability: Stability;
}

type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
type Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')
type Tag = string; // curated list available in code (e.g., 'auth', 'spots')

// For presentations, meta is a Partial<OwnerShipMeta> plus description, name, version
interface PresentationMeta extends Partial<OwnerShipMeta> {
  name: string;
  version: string;
  description?: string;
}
\`\`\`

### Engine

Use \`createDefaultTransformEngine()\` from \`@contractspec/lib.presentation-runtime-core/transform-engine\` and register custom renderers as needed. React hosts add \`registerDefaultReactRenderer()\` from \`@contractspec/lib.contracts-runtime-client-react/transform-engine\`. The core engine supports markdown/json/xml; the React renderer returns a serializable descriptor the host app renders via a \`componentMap\` or a BlockNote renderer. The canonical source type string is \`blocknotejs\` (not \`blocknote\`).

PII paths (JSON-like) are redacted from rendered outputs.

### MCP Integration

\`createMcpServer\` accepts \`presentationsV2\`. Each descriptor is exposed under \`presentation://<name>/v<version>\` and negotiated variants (\`.md/.json/.xml\`) are rendered by the engine.

### Migration

- V1 \`PresentationSpec\` remains supported; a back-compat helper converts V1 \u2192 V2 when convenient.
- Prefer V2 for new work.

### Examples (Sigil)

- \`sigil.auth.webauth_tabs_v2\`: component source (\`componentKey: 'sigil.webauth.tabs'\`), targets \`react/json/xml\`.
- \`sigil.signup.guide_v2\`: BlockNote doc source, targets \`react/markdown/json/xml\`.

### React Rendering

Host apps use a \`componentMap\` (e.g., \`'sigil.webauth.tabs' \u2192 WebAuthTabs\`) and a BlockNote renderer to turn the React render descriptor into elements.`}];export{J as tech_contracts_presentations_conventions_DocBlocks,K as techContractsDocs,I as definePresentation};
