@knpkv/rly 0.12.1 → 0.14.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 +0,0 @@
1
- {"version":3,"file":"patterns-DPd5YlSW.js","names":["root","mark","glyph","agent","context","count","style","styles","AgentMark","body","slot","identity","mark","glyph","eyebrow","style","styles","Slot","root","header","agentGlyph","eyebrow","slot","footer","outcome","style","styles","requireSlot","Predicate.isBoolean","Predicate.isString","statePresentation","root","header","eyebrow","heading","proposalReference","context","boundary","evidence","outcome","state","facts","style","styles","Avatar","root","header","actor","actions","context","conceptLabel","empty","content","evidence","style","styles","Predicate.isBoolean","Predicate.isString","initialsFor","Avatar","root","compact","defaultSize","identity","name","style","styles","Avatar","root","compact","defaultSize","style","styles","root","compact","defaultSize","heading","empty","style","styles","root","actions","reason","style","styles","_Fragment","root","time","compact","defaultSize","style","styles","root","glyph","name","compact","defaultSize","style","styles","root","verdict","reason","style","styles","root","header","identity","title","hero","body","freshness","content","style","styles","root","compact","heading","table","head","cell","row","body","style","styles","_Fragment","Select","root","conceptLabel","reference","style","styles","root","header","eyebrow","heading","facts","evidence","actions","style","styles","root","fact","heading","word","style","styles","_Fragment","root","title","actions","body","style","styles","_Fragment","root","heading","empty","list","item","endpoint","endpointLink","identity","title","missingLabel","kind","reference","direction","evidence","fieldLabel","missingEndpoint","relationship","arrow","actor","style","styles","Endpoint","root","heading","empty","identity","actor","title","reference","body","style","styles","root","title","body","style","styles","Predicate.isObjectOrArray","Predicate.isNumber","Select","RadixPortal","root","identity","compact","style","styles","personGroup","fact","version","people","eyebrow","unassigned","facts","style","styles","Dialog","root","identity","reason","style","styles","root","heading","list","item","marker","connector","content","empty","style","styles","root","link","style","styles","styles","Icon","usePortalTarget","PortalBoundary","RlyLink","isBoolean","isObjectOrArray","requireText","isString","cssClass","defineVariants","isNumber","classNames","Sheet","useModalContentRegistration","useModalIsolation","useModalScrollLock","invalidateModalFocusRestore","isHTMLElement","restoreModalFocusAfterCleanup","useParentModalPresent","Button","Skeleton","IconButton","Select$1","Field","ModalNestingBoundary","StatePanel","Dialog$1","StateLabel","Avatar$1","useParentModalReady","Fragment$1","AgentContextButton_module_default","style$26","name","AgentMark$1","AgentContextButton","props","visibleAction","actionLabel","visibleAgent","agentName","visibleContext","context","visibleContextLabel","contextLabel","visibleJob","job","className","type","AgentDrawer_module_default","style$25","AgentMark","Slot$1","label","AgentDrawer","contextSummary","visibleTitle","title","contextRef","useRef","evidence","capabilities","thread","composer","AgentJob_module_default","style$24","requireSlot$1","value","statePresentation$1","validateProgress","progress","AgentJob","visibleHeading","heading","visibleProvider","provider","visibleCapability","capability","visibleCancelLabel","cancelLabel","state","outcome","sandbox","revision","presentation","cancellable","progressId","useId","onCancel","AgentProposal_module_default","style$23","validateAgent","agent","validateAgentProposal","proposal","evidenceIds","evidenceId","AgentProposal","suppliedProposal","headingId","referenceId","AgentThread_module_default","style$22","requireSlot","initialsFor$1","words","first","last","validateActor","actor","actorIdentity","role","fallback","src","AgentThread","visibleEmpty","emptyLabel","announcement","ids","message","messages","id","Person_module_default","style$21","RLY_PERSON_VARIANTS","RLY_PERSON_DEFAULT_VARIANTS","initialsFor","parts","firstPart","lastPart","firstCharacters","second","validatedPerson","person","Person","suppliedPerson","size","PeopleStrip_module_default","style$20","RLY_PEOPLE_STRIP_VARIANTS","RLY_PEOPLE_STRIP_DEFAULT_VARIANTS","validateLimit","limit","validatePeople","people","PeopleStrip","ariaLabel","accessibleLabel","visibleLimit","overflowCount","visiblePeople","expanded","onExpandedChange","CollaboratorGroup_module_default","style$19","RLY_COLLABORATOR_GROUP_VARIANTS","RLY_COLLABORATOR_GROUP_DEFAULT_VARIANTS","CollaboratorGroup","visibleEmptyLabel","expandedCategories","visibleLanes","authors","owners","reviewers","operators","approvers","lane","onCategoryExpandedChange","nextExpanded","DecisionBar_module_default","style$18","RLY_DECISION_BAR_VARIANTS","RLY_DECISION_BAR_DEFAULT_VARIANTS","DecisionBar","visibleTarget","target","reasonId","statusId","inert","reason","statusText","approveLabel","rejectLabel","status","describedBy","guarded","action","placement","clock","onApprove","onReject","note","FreshnessStamp_module_default","style$17","RLY_FRESHNESS_STAMP_VARIANTS","RLY_FRESHNESS_STAMP_DEFAULT_VARIANTS","freshnessWords","freshnessIcons","FreshnessStamp","visibleTime","time","machineTime","dateTime","ServiceMark_module_default","style$16","RLY_SERVICE_MARK_VARIANTS","RLY_SERVICE_MARK_DEFAULT_VARIANTS","serviceNames","serviceGlyphs","ServiceMark","nameVariant","Glyph","service","Verdict_module_default","style$15","RLY_VERDICT_VARIANTS","toneIcons","Verdict","visibleReason","visibleVerdict","verdict","tone","EntityShell_module_default","style$14","EntityShell","freshnessDateTime","freshnessTime","titleId","navigation","freshness","actions","agentEntry","content","facts","collaborators","relationships","activity","EntityTable_module_default","style$13","RLY_ENTITY_TABLE_VARIANTS","RLY_ENTITY_TABLE_DEFAULT_VARIANTS","validateColumns","column","columns","validateRows","rowIds","row","rows","rowId","cellIds","cell","columnId","columnIds","rowsFor","data","SortGlyph","direction","EntityTable","skeletonRows","sortable","current","columnById","cachedNotice","density","headingSize","index","onSortChange","cells","EvidenceStamp_module_default","style$12","EvidenceStamp","visibleReference","reference","freshnessStamp","GovernedActionReview_module_default","style$11","statePresentation","GovernedActionReview","visibleAuthorizeLabel","authorizeLabel","visibleConfirmationLabel","confirmationLabel","visibleRejectLabel","reviewer","confirmationId","presentedState","authorize","isConfirmed","onAuthorize","event","onConfirmationChange","Hero_module_default","style$10","RLY_HERO_VARIANTS","RLY_HERO_DEFAULT_VARIANTS","RLY_HERO_WORD_VARIANTS","Hero","classes","fact","caption","HeroWord","Region_module_default","\"default\"","style$9","RLY_REGION_VARIANTS","RLY_REGION_DEFAULT_VARIANTS","Region","generatedId","Heading","headingLevel","count","RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION","RLY_RELATIONSHIP_DIRECTION_PRESENTATION","validatePerson","validateService","validateEndpoint","endpoint","validateRelationships","relationship","RelationshipChain_module_default","style$8","Endpoint$1","identity","RelationshipChain","lifecycle","RelationshipTable_module_default","style$7","Endpoint","RelationshipTable","RelayDock_module_default","style$6","compactViewportQuery","focusableSelector","fieldsetDisabledSelector","hasActiveElement","node","hasShadowRootHost","deepActiveElement","active","root","activeElementFor","panel","shadowHostFor","hasAssignedSlot","isElementNode","composedParentFor","composedParents","parent","isWithinComposedElement","descendant","ancestor","seen","isWithinPanel","deepActiveHTMLElement","focusRestoreTarget","ownerDocument","isRenderedFocusable","element","view","visibility","firstSummary","firstLegend","computed","hasContentEditableAncestor","nativeRoot","isRadioInput","hasTabIndexProperty","svgNamespace","tabIndexFor","attribute","parsed","isSlotElement","isShadowSlotElement","compareSequentialTabOrder","leftTabIndex","left","rightTabIndex","right","leftPositive","rightPositive","hasExplicitNegativeTabIndex","tabIndex","ownsNegativeFocusScope","isSequentiallyFocusableRadio","checked","elements","candidate","candidateRoot","composedElementsInScope","visitScopeElements","entries","nested","visitElement","assignedNodes","assignedElements","fallbackElements","visitScope","child","composedParent","scope","focusScope","flattenScope","ordered","flattened","entry","nestedEntry","focusableElementsInScope","composed","isIframeElement","isElementTarget","focusableElementsInFrame","frameDocument","installIframeFocusContainment","bindings","focusOuterBoundary","focusable","frameIndex","frame","backwards","attachDocumentListener","existing","onKeyDown","frameFocusables","bindFrame","onLoad","syncFrames","onFocusIn","mutationObserver","observer","binding","subscribeToCompactViewport","query","onStoreChange","compactViewportSnapshot","serverCompactViewportSnapshot","useCompactViewport","subscribe","useCallback","snapshot","useSyncExternalStore","RelayMark","ContextChips","labelId","chip","SelectionControls","profileId","modelId","controlProps","selection","DockState","DockContents","contextLabelId","selectionLabelId","footer","DockInitialFocus","hasCapturedRestoreTarget","useLayoutEffect","focusTarget","restoreDocument","restoreTarget","DockLayerSurface","layerRef","modal","modalLayer","DockLayer","descriptionId","panelRef","handleKeyDown","onClose","delegatingShadowHostFor","focusableElements","activeIsUnlistedFocusTarget","composedIndexForActive","activeDelegatingHost","activeComposedIndex","adjacent","step","adjacentIsInActiveDelegatingHost","unlistedFocusBoundary","leavingStart","leavingEnd","Portal","parentModalPresent","compactViewport","description","closeRef","restoreTargetRef","RelayDock","componentProps","defaultState","setDefaultState","useState","defaultOpen","parentModalReady","portalTarget","resolvedOpen","open","desktopPresentation","triggerRef","railCloseRef","previousStateRef","visibleDescription","visibleTriggerLabel","triggerLabel","requestOpenChange","nextOpen","onOpenChange","previousState","cssCustomIdentifier","reservedViewTransitionNames","validateReleaseTransitionNames","names","part","suppliedName","releaseStates","validateReleasePresentation","release","factIds","ReleaseRelay_module_default","style$5","RLY_RELEASE_RELAY_SYMBOLS","RLY_RELEASE_RELAY_VARIANTS","RLY_RELEASE_RELAY_DEFAULT_VARIANTS","symbolPaths","validateSymbols","symbolIndices","symbol","ReleaseRelay","suppliedSymbolIndices","visibleAlgorithm","algorithm","visibleCodename","codename","accessibleName","position","ReleasePreview_module_default","style$4","ReleasePreview","suppliedRelease","validatedTransitionNames","transitionNames","visibleOpenFullViewLabel","openFullViewLabel","summaryRef","dossier","primaryAction","stages","workset","fullViewAction","onOpenFullView","ReleaseRow_module_default","style$3","ReleaseRow","visiblePreviewLabel","previewLabel","verdictId","onPreview","StageRail_module_default","style$2","RLY_STAGE_RAIL_VARIANTS","RLY_STAGE_RAIL_DEFAULT_VARIANTS","validateStages","stage","wordTone","StageRail","suppliedStages","TimelineRow_module_default","style$1","actorLabels","provenanceMarkClass","validateEvent","TimelineRow","suppliedEvent","continued","keyLabels","TimelineProvenanceKey","kinds","kind","labels","WorksetCard_module_default","style","validateHref","href","validateUniqueId","visibleId","validateJiraItems","item","items","validatePullRequestGroups","group","groups","key","validateGaps","gap","gaps","validatePipelines","pipeline","pipelines","LinkedIdentity","WorksetCard","visibleJiraEmpty","jiraEmptyLabel","visiblePullRequestEmpty","pullRequestEmptyLabel","visibleGapEmpty","gapEmptyLabel","visiblePipelineEmpty","pipelineEmptyLabel","jiraItems","pullRequestGroups"],"sources":["../src/patterns/AgentContextButton.module.css","../src/patterns/AgentContextButton.tsx","../src/patterns/AgentDrawer.module.css","../src/patterns/AgentDrawer.tsx","../src/patterns/AgentJob.module.css","../src/patterns/AgentJob.tsx","../src/patterns/AgentProposal.module.css","../src/patterns/AgentProposal.tsx","../src/patterns/AgentThread.module.css","../src/patterns/AgentThread.tsx","../src/patterns/Person.module.css","../src/patterns/Person.tsx","../src/patterns/PeopleStrip.module.css","../src/patterns/PeopleStrip.tsx","../src/patterns/CollaboratorGroup.module.css","../src/patterns/CollaboratorGroup.tsx","../src/patterns/DecisionBar.module.css","../src/patterns/DecisionBar.tsx","../src/patterns/FreshnessStamp.module.css","../src/patterns/FreshnessStamp.tsx","../src/patterns/ServiceMark.module.css","../src/patterns/ServiceMark.tsx","../src/patterns/Verdict.module.css","../src/patterns/Verdict.tsx","../src/patterns/EntityShell.module.css","../src/patterns/EntityShell.tsx","../src/patterns/EntityTable.module.css","../src/patterns/EntityTable.tsx","../src/patterns/EvidenceStamp.module.css","../src/patterns/EvidenceStamp.tsx","../src/patterns/GovernedActionReview.module.css","../src/patterns/GovernedActionReview.tsx","../src/patterns/Hero.module.css","../src/patterns/Hero.tsx","../src/patterns/Region.module.css","../src/patterns/Region.tsx","../src/patterns/Relationship.ts","../src/patterns/RelationshipChain.module.css","../src/patterns/RelationshipChain.tsx","../src/patterns/RelationshipTable.module.css","../src/patterns/RelationshipTable.tsx","../src/patterns/RelayDock.module.css","../src/patterns/RelayDock.tsx","../src/patterns/ReleasePresentation.ts","../src/patterns/ReleaseRelay.module.css","../src/patterns/ReleaseRelay.tsx","../src/patterns/ReleasePreview.module.css","../src/patterns/ReleasePreview.tsx","../src/patterns/ReleaseRow.module.css","../src/patterns/ReleaseRow.tsx","../src/patterns/StageRail.module.css","../src/patterns/StageRail.tsx","../src/patterns/TimelineRow.module.css","../src/patterns/TimelineRow.tsx","../src/patterns/WorksetCard.module.css","../src/patterns/WorksetCard.tsx"],"sourcesContent":["@layer rly.components {\n .root {\n align-items: center;\n appearance: none;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-group);\n color: var(--rly-color-text-1);\n cursor: pointer;\n /*\n * Intrinsic, not viewport-keyed: the jobs sit beside the copy while there is room and wrap below\n * it in a narrow slot, so the button fits a 320px column on any page.\n */\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-12) var(--rly-space-16);\n inline-size: 100%;\n min-block-size: var(--rly-space-96);\n padding: var(--rly-space-20);\n text-align: start;\n }\n\n .root:hover {\n background: var(--rly-color-surface-2);\n }\n\n .root:active {\n background: var(--rly-color-surface-3);\n }\n\n .root:disabled {\n cursor: not-allowed;\n opacity: 0.58;\n }\n\n .mark {\n align-items: center;\n background: var(--rly-color-agent);\n block-size: var(--rly-space-48);\n border-radius: var(--rly-radius-control);\n color: var(--rly-color-surface-1);\n display: inline-flex;\n flex: none;\n inline-size: var(--rly-space-48);\n justify-content: center;\n }\n\n .glyph {\n block-size: var(--rly-space-24);\n inline-size: var(--rly-space-24);\n }\n\n .copy,\n .contextRow {\n display: grid;\n min-inline-size: var(--rly-space-0);\n }\n\n .copy {\n flex: 1 1 12rem;\n gap: var(--rly-space-4);\n }\n\n .action {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n }\n\n .agent,\n .contextLabel {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .contextRow {\n gap: var(--rly-space-2);\n margin-block-start: var(--rly-space-8);\n }\n\n .contextLabel {\n text-transform: uppercase;\n }\n\n .context {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n /* A job count is plain text (\"Review ready 1\"), not a chip, and wraps between words in a narrow row. */\n .job {\n align-items: center;\n color: var(--rly-color-text-2);\n display: inline-flex;\n flex-wrap: wrap;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n gap: var(--rly-space-4) var(--rly-space-8);\n margin-inline-start: auto;\n min-inline-size: var(--rly-space-0);\n }\n\n .count {\n color: var(--rly-color-text-1);\n font-weight: var(--rly-type-label-weight);\n }\n\n @media (max-width: 25rem) {\n .root {\n align-items: start;\n padding: var(--rly-space-16);\n }\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./AgentContextButton.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Optional application-owned work status shown without deriving agent activity. */\nexport interface RlyAgentJobSummary {\n readonly count?: number\n readonly status: string\n}\n\n/** Props for an explicit, context-named agent launcher. */\nexport type AgentContextButtonProps = Omit<ComponentPropsWithRef<\"button\">, \"children\"> & {\n readonly actionLabel?: string\n readonly agentName: string\n readonly context: string\n readonly contextLabel?: string\n readonly job?: RlyAgentJobSummary\n}\n\nconst AgentMark = (): ReactElement => (\n <span aria-hidden=\"true\" className={style(\"mark\")}>\n <svg className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z\" fill=\"currentColor\" />\n </svg>\n </span>\n)\n\n/**\n * Launch an application-owned agent surface while keeping its complete context\n * visible before activation.\n */\nexport const AgentContextButton = ({\n actionLabel = \"Ask agent\",\n agentName,\n className,\n context,\n contextLabel = \"Context\",\n job,\n type,\n ...props\n}: AgentContextButtonProps): ReactElement => {\n const visibleAction = requireText(actionLabel, \"AgentContextButton actionLabel\")\n const visibleAgent = requireText(agentName, \"AgentContextButton agentName\")\n const visibleContext = requireText(context, \"AgentContextButton context\")\n const visibleContextLabel = requireText(contextLabel, \"AgentContextButton contextLabel\")\n const visibleJob = job === undefined ? undefined : requireText(job.status, \"AgentContextButton job status\")\n if (job?.count !== undefined && (!Number.isInteger(job.count) || job.count < 0)) {\n throw new Error(\"AgentContextButton job count must be a non-negative integer\")\n }\n\n return (\n <button\n {...props}\n className={classNames(style(\"root\"), className)}\n data-rly-agent-context-button=\"\"\n type={type ?? \"button\"}\n >\n <AgentMark />\n <span className={style(\"copy\")}>\n <span className={style(\"action\")}>{visibleAction}</span>\n <span className={style(\"agent\")}>{visibleAgent}</span>\n <span className={style(\"contextRow\")}>\n <span className={style(\"contextLabel\")}>{visibleContextLabel}</span>\n <span className={style(\"context\")}>{visibleContext}</span>\n </span>\n </span>\n {visibleJob === undefined ? null : (\n <span className={style(\"job\")} data-rly-agent-job=\"\">\n {visibleJob}\n {job?.count === undefined ? null : <span className={style(\"count\")}>{job.count}</span>}\n </span>\n )}\n </button>\n )\n}\n","@layer rly.components {\n .drawer {\n inline-size: min(92vw, 42rem);\n max-inline-size: 42rem;\n }\n\n .body,\n .slot,\n .slotContent,\n .identityCopy {\n min-inline-size: var(--rly-space-0);\n }\n\n .body,\n .slot,\n .identityCopy {\n display: grid;\n }\n\n .body {\n gap: var(--rly-space-32);\n }\n\n .slot {\n border-block-start: 1px solid var(--rly-color-border-1);\n gap: var(--rly-space-12);\n padding-block-start: var(--rly-space-24);\n }\n\n .contextSlot {\n border-block-start: 0;\n gap: var(--rly-space-20);\n padding-block-start: var(--rly-space-0);\n }\n\n .identity {\n align-items: center;\n display: grid;\n gap: var(--rly-space-16);\n grid-template-columns: auto minmax(var(--rly-space-0), 1fr);\n }\n\n .mark {\n align-items: center;\n background: var(--rly-color-agent);\n block-size: var(--rly-space-48);\n border-radius: var(--rly-radius-control);\n color: var(--rly-color-surface-1);\n display: inline-flex;\n inline-size: var(--rly-space-48);\n justify-content: center;\n }\n\n .glyph {\n block-size: var(--rly-space-24);\n inline-size: var(--rly-space-24);\n }\n\n .identityCopy {\n gap: var(--rly-space-4);\n }\n\n .eyebrow,\n .slotTitle {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n letter-spacing: var(--rly-type-meta-tracking);\n text-transform: uppercase;\n }\n\n .contextSummary {\n font: var(--rly-type-section-title-weight) var(--rly-type-section-title-size) /\n var(--rly-type-section-title-line-height) var(--rly-type-section-title-font);\n letter-spacing: var(--rly-type-section-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .slotTitle {\n margin: var(--rly-space-0);\n }\n\n .slotContent {\n overflow-wrap: break-word;\n }\n\n @media (max-width: 30rem) {\n .drawer {\n inline-size: 100vw;\n max-inline-size: none;\n }\n\n .body {\n gap: var(--rly-space-24);\n }\n\n .contextSummary {\n font-size: var(--rly-type-card-title-size);\n line-height: var(--rly-type-card-title-line-height);\n }\n\n .slot {\n padding-block-start: var(--rly-space-20);\n }\n\n .contextSlot {\n padding-block-start: var(--rly-space-0);\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useRef } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { Sheet } from \"../primitives/Sheet.js\"\nimport styles from \"./AgentDrawer.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Controlled, application-owned content for a context-aware agent session. */\nexport type AgentDrawerProps = Omit<ComponentPropsWithRef<\"div\">, \"children\" | \"context\" | \"title\"> & {\n readonly agentName: string\n readonly capabilities: ReactNode\n readonly composer: ReactNode\n readonly context: ReactNode\n readonly contextSummary: string\n readonly evidence: ReactNode\n readonly onOpenChange: (open: boolean) => void\n readonly open: boolean\n readonly thread: ReactNode\n readonly title: string\n}\n\nconst AgentMark = (): ReactElement => (\n <span aria-hidden=\"true\" className={style(\"mark\")}>\n <svg className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z\" fill=\"currentColor\" />\n </svg>\n </span>\n)\n\nconst Slot = ({\n children,\n label,\n name\n}: {\n readonly children: ReactNode\n readonly label: string\n readonly name: string\n}) => (\n <section className={style(\"slot\")} data-rly-agent-drawer-slot={name}>\n <h2 className={style(\"slotTitle\")}>{label}</h2>\n <div className={style(\"slotContent\")}>{children}</div>\n </section>\n)\n\n/**\n * Present a controlled agent session. The context summary receives initial\n * focus; subsequent caller-owned updates never move focus to the composer.\n */\nexport const AgentDrawer = ({\n agentName,\n capabilities,\n className,\n composer,\n context,\n contextSummary,\n evidence,\n onOpenChange,\n open,\n thread,\n title,\n ...props\n}: AgentDrawerProps): ReactElement => {\n const visibleAgent = requireText(agentName, \"AgentDrawer agentName\")\n const visibleContext = requireText(contextSummary, \"AgentDrawer contextSummary\")\n const visibleTitle = requireText(title, \"AgentDrawer title\")\n const contextRef = useRef<HTMLElement>(null)\n\n return (\n <Sheet.Root onOpenChange={onOpenChange} open={open}>\n <Sheet.Content\n className={classNames(style(\"drawer\"), className)}\n description={`Context-aware session with ${visibleAgent}`}\n initialFocusRef={contextRef}\n title={visibleTitle}\n >\n <Sheet.Body {...props} className={style(\"body\")}>\n <section\n className={classNames(style(\"slot\"), style(\"contextSlot\"))}\n data-rly-agent-drawer-slot=\"context\"\n ref={contextRef}\n tabIndex={-1}\n >\n <div className={style(\"identity\")}>\n <AgentMark />\n <div className={style(\"identityCopy\")}>\n <span className={style(\"eyebrow\")}>{visibleAgent}</span>\n <h2 className={style(\"contextSummary\")}>{visibleContext}</h2>\n </div>\n </div>\n <div className={style(\"slotContent\")}>{context}</div>\n </section>\n <Slot label=\"Evidence\" name=\"evidence\">\n {evidence}\n </Slot>\n <Slot label=\"Capabilities\" name=\"capabilities\">\n {capabilities}\n </Slot>\n <section\n aria-live=\"polite\"\n aria-relevant=\"additions text\"\n className={style(\"slot\")}\n data-rly-agent-drawer-slot=\"thread\"\n >\n <h2 className={style(\"slotTitle\")}>Thread</h2>\n <div className={style(\"slotContent\")}>{thread}</div>\n </section>\n <Slot label=\"Message\" name=\"composer\">\n {composer}\n </Slot>\n </Sheet.Body>\n </Sheet.Content>\n </Sheet.Root>\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n container-type: inline-size;\n display: grid;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header {\n align-items: center;\n display: grid;\n gap: var(--rly-space-12);\n grid-template-columns: auto minmax(var(--rly-space-0), 1fr) auto;\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .agentGlyph {\n align-items: center;\n background: var(--rly-color-surface-2);\n border: 1px solid var(--rly-color-agent);\n border-radius: var(--rly-radius-field);\n color: var(--rly-color-agent);\n display: inline-flex;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / 1 var(--rly-type-meta-font);\n justify-content: center;\n min-block-size: var(--rly-space-32);\n min-inline-size: var(--rly-space-32);\n }\n\n .titleBlock {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .titleBlock h2 {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .eyebrow,\n .progressLabel,\n .metadata dt,\n .metadata dd {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .eyebrow {\n color: var(--rly-color-agent);\n }\n\n .progressBlock,\n .slot,\n .footer {\n border-block-start: 1px solid var(--rly-color-border-1);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .progressBlock {\n display: grid;\n gap: var(--rly-space-8);\n }\n\n .progressLabel {\n display: flex;\n justify-content: space-between;\n }\n\n .progressLabel strong {\n color: var(--rly-color-text-1);\n }\n\n .progressBlock progress {\n accent-color: var(--rly-color-agent);\n block-size: var(--rly-space-6);\n inline-size: 100%;\n }\n\n .metadata {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n margin: var(--rly-space-0);\n padding: var(--rly-space-8) var(--rly-space-20);\n }\n\n .metadata div {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-8);\n }\n\n .metadata dt {\n text-transform: uppercase;\n }\n\n .metadata dd {\n color: var(--rly-color-text-1);\n margin: var(--rly-space-0);\n }\n\n .metadata code {\n overflow-wrap: break-word;\n }\n\n .slot {\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .slot h3 {\n color: var(--rly-color-agent);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n margin: var(--rly-space-0);\n }\n\n .outcome {\n border: 1px solid color-mix(in oklab, var(--rly-color-agent) 40%, transparent);\n border-radius: var(--rly-radius-field);\n }\n\n .footer {\n display: flex;\n justify-content: flex-end;\n }\n\n @container (max-width: 22rem) {\n .header {\n align-items: start;\n grid-template-columns: auto minmax(var(--rly-space-0), 1fr);\n }\n\n .header > :last-child {\n grid-column: 1 / -1;\n }\n\n .metadata {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .header,\n .progressBlock,\n .metadata,\n .slot,\n .footer {\n padding-inline: calc(var(--rly-space-12) + var(--rly-space-2));\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { Button } from \"../primitives/Button.js\"\nimport { StateLabel, type RlyStateTone } from \"../primitives/StateLabel.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./AgentJob.module.css\"\nimport * as Predicate from \"../internal/predicates.js\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nconst requireSlot = (value: ReactNode, label: string): void => {\n if (value === undefined || value === null || Predicate.isBoolean(value)) {\n throw new Error(`${label} must contain renderable content`)\n }\n if (Predicate.isString(value)) requireText(value, label)\n}\n\nexport type RlyAgentJobState = \"queued\" | \"running\" | \"cancel-requested\" | \"succeeded\" | \"failed\" | \"cancelled\"\n\ntype AgentJobRevision =\n { readonly sandbox: string; readonly revision?: string } | { readonly sandbox?: string; readonly revision: string }\n\ntype AgentJobActiveState =\n | {\n readonly state: \"queued\"\n readonly progress?: number\n readonly onCancel?: () => void\n readonly outcome?: never\n }\n | {\n readonly state: \"running\"\n readonly progress: number\n readonly onCancel?: () => void\n readonly outcome?: never\n }\n | {\n readonly state: \"cancel-requested\"\n readonly progress?: number\n readonly onCancel?: never\n readonly outcome?: never\n }\n\ntype AgentJobTerminalState = {\n readonly state: \"succeeded\" | \"failed\" | \"cancelled\"\n readonly progress?: number\n readonly onCancel?: never\n /** Presenter-owned truthful terminal result; required for every terminal state. */\n readonly outcome: ReactNode\n}\n\n/** Controlled display props. The component never invokes a provider or mutates job state. */\nexport type AgentJobProps = Omit<ComponentPropsWithRef<\"article\">, \"aria-label\" | \"children\" | \"onCancel\"> &\n AgentJobRevision &\n (AgentJobActiveState | AgentJobTerminalState) & {\n readonly heading: string\n readonly provider: string\n readonly capability: string\n readonly context: ReactNode\n readonly evidence: ReactNode\n readonly cancelLabel?: string\n }\n\nconst statePresentation = {\n queued: { label: \"Queued\", tone: \"neutral\" },\n running: { label: \"Running\", tone: \"progress\" },\n \"cancel-requested\": { label: \"Cancel requested\", tone: \"caution\" },\n succeeded: { label: \"Succeeded\", tone: \"positive\" },\n failed: { label: \"Failed\", tone: \"critical\" },\n cancelled: { label: \"Cancelled\", tone: \"neutral\" }\n} satisfies Readonly<Record<RlyAgentJobState, { label: string; tone: RlyStateTone }>>\n\nconst validateProgress = (progress: number | undefined): void => {\n if (progress !== undefined && (!Number.isFinite(progress) || progress < 0 || progress > 100)) {\n throw new Error(\"AgentJob progress must be between 0 and 100\")\n }\n}\n\n/** Render provider-owned job state, immutable context, evidence, and a controlled cancel request. */\nexport const AgentJob = ({\n cancelLabel = \"Request cancellation\",\n capability,\n className,\n context,\n evidence,\n heading,\n onCancel,\n outcome,\n progress,\n provider,\n revision,\n sandbox,\n state,\n ...props\n}: AgentJobProps): ReactElement => {\n const visibleHeading = requireText(heading, \"AgentJob heading\")\n const visibleProvider = requireText(provider, \"AgentJob provider\")\n const visibleCapability = requireText(capability, \"AgentJob capability\")\n const visibleCancelLabel = requireText(cancelLabel, \"AgentJob cancelLabel\")\n requireSlot(context, \"AgentJob context\")\n requireSlot(evidence, \"AgentJob evidence\")\n if (state === \"succeeded\" || state === \"failed\" || state === \"cancelled\") {\n requireSlot(outcome, \"AgentJob terminal outcome\")\n }\n if (sandbox !== undefined) requireText(sandbox, \"AgentJob sandbox\")\n if (revision !== undefined) requireText(revision, \"AgentJob revision\")\n validateProgress(progress)\n const presentation = statePresentation[state]\n const cancellable = state === \"queued\" || state === \"running\"\n const progressId = `rly-agent-job-progress-${useId()}`\n\n return (\n <article\n {...props}\n aria-busy={state === \"queued\" || state === \"running\" || state === \"cancel-requested\"}\n className={classNames(style(\"root\"), className)}\n data-rly-agent-job-state={state}\n >\n <header className={style(\"header\")}>\n <span aria-hidden=\"true\" className={style(\"agentGlyph\")}>\n AI\n </span>\n <span className={style(\"titleBlock\")}>\n <span className={style(\"eyebrow\")}>\n {visibleProvider}, {visibleCapability}\n </span>\n <h2>{visibleHeading}</h2>\n </span>\n <StateLabel label={presentation.label} size=\"compact\" tone={presentation.tone} />\n </header>\n\n {progress === undefined ? null : (\n <div className={style(\"progressBlock\")}>\n <span className={style(\"progressLabel\")} id={progressId}>\n Progress <strong>{Math.round(progress)}%</strong>\n </span>\n <progress aria-labelledby={progressId} max={100} value={progress} />\n </div>\n )}\n\n <dl className={style(\"metadata\")}>\n <div>\n <dt>Provider</dt>\n <dd>{visibleProvider}</dd>\n </div>\n <div>\n <dt>Capability</dt>\n <dd>{visibleCapability}</dd>\n </div>\n {sandbox === undefined ? null : (\n <div>\n <dt>Sandbox</dt>\n <dd>\n <code>{sandbox}</code>\n </dd>\n </div>\n )}\n {revision === undefined ? null : (\n <div>\n <dt>Revision</dt>\n <dd>\n <code>{revision}</code>\n </dd>\n </div>\n )}\n </dl>\n\n <section className={style(\"slot\")} data-rly-agent-job-context=\"\">\n <h3>Exact context</h3>\n {context}\n </section>\n <section className={style(\"slot\")} data-rly-agent-job-evidence=\"\">\n <h3>Evidence</h3>\n {evidence}\n </section>\n {outcome === undefined ? null : (\n <section className={classNames(style(\"slot\"), style(\"outcome\"))} data-rly-agent-job-outcome={state}>\n <h3>Terminal outcome</h3>\n {outcome}\n </section>\n )}\n {cancellable && onCancel !== undefined ? (\n <footer className={style(\"footer\")}>\n <Button onClick={onCancel} variant=\"quiet\">\n {visibleCancelLabel}\n </Button>\n </footer>\n ) : null}\n </article>\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n color: var(--rly-color-text-1);\n container-type: inline-size;\n display: grid;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header {\n align-items: start;\n display: flex;\n gap: var(--rly-space-20);\n justify-content: space-between;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .agentIdentity {\n align-items: center;\n display: flex;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n }\n\n .agentIdentity > :first-child {\n border: 1px solid var(--rly-color-agent);\n color: var(--rly-color-agent);\n }\n\n .agentText {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .eyebrow {\n color: var(--rly-color-agent);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n margin: var(--rly-space-0);\n text-transform: uppercase;\n }\n\n .heading {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .agentRole,\n .proposalReference,\n .context,\n .boundary,\n .evidence,\n .outcome {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n }\n\n .agentRole,\n .boundary,\n .context {\n margin: var(--rly-space-0);\n }\n\n .proposalReference {\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n overflow-wrap: break-word;\n }\n\n .state {\n flex: none;\n min-inline-size: var(--rly-space-0);\n }\n\n .boundary {\n border-block: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-1);\n font-weight: 650;\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .context {\n display: grid;\n gap: var(--rly-space-6);\n padding: var(--rly-space-20);\n }\n\n .context span,\n .facts dt,\n .evidence h3,\n .outcome h3 {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n text-transform: uppercase;\n }\n\n .facts {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n }\n\n .facts > div {\n display: grid;\n gap: var(--rly-space-8);\n /* One bounded track, so a revision hash wraps inside the cell instead of widening it. */\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .facts > div:nth-child(2n) {\n border-inline-start: 1px solid var(--rly-color-border-1);\n }\n\n .facts > div:nth-child(n + 3) {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .facts dt,\n .facts dd,\n .evidence h3,\n .outcome h3 {\n margin: var(--rly-space-0);\n }\n\n .facts dd {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .evidence,\n .outcome {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .evidence ul {\n display: grid;\n list-style: none;\n margin: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .evidence li {\n align-items: baseline;\n display: grid;\n gap: var(--rly-space-8);\n grid-template-columns: minmax(var(--rly-space-0), 1fr) minmax(var(--rly-space-0), 1.4fr);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-8);\n }\n\n .evidence li + li {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .evidence code {\n color: var(--rly-color-text-1);\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n overflow-wrap: break-word;\n }\n\n @container (max-width: 28rem) {\n .header {\n align-items: stretch;\n flex-direction: column;\n }\n\n .facts {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .facts > div:nth-child(2n) {\n border-inline-start: 0;\n }\n\n .facts > div + div {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .evidence li {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { Avatar } from \"../primitives/Avatar.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./AgentProposal.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Presentation-only identity for the agent that authored a proposal. */\nexport interface RlyAgentIdentity {\n readonly id: string\n readonly name: string\n readonly role: string\n readonly avatarFallback: string\n readonly avatarSrc?: string\n}\n\n/** One immutable, presenter-supplied evidence reference. */\nexport interface RlyAgentProposalEvidence {\n readonly id: string\n readonly label: string\n readonly reference: string\n}\n\n/** Exact proposal projection shared by proposal and human-review surfaces. */\nexport interface RlyAgentProposal {\n readonly id: string\n readonly agent: RlyAgentIdentity\n readonly capability: string\n readonly context: string\n readonly evidence: ReadonlyArray<RlyAgentProposalEvidence>\n readonly expectedRevision: string\n readonly impact: string\n readonly target: string\n}\n\n/** Props for an explicitly non-authorizing agent proposal. */\nexport type AgentProposalProps = Omit<ComponentPropsWithRef<\"section\">, \"children\"> & {\n readonly outcome: ReactNode\n readonly proposal: RlyAgentProposal\n readonly state: ReactNode\n}\n\nconst validateAgent = (agent: RlyAgentIdentity): void => {\n requireText(agent.id, \"AgentProposal agent id\")\n requireText(agent.name, \"AgentProposal agent name\")\n requireText(agent.role, \"AgentProposal agent role\")\n requireText(agent.avatarFallback, \"AgentProposal agent avatarFallback\")\n if (agent.avatarSrc !== undefined) requireText(agent.avatarSrc, \"AgentProposal agent avatarSrc\")\n}\n\n/** Validate and return an exact proposal projection without deriving authority or domain state. */\nexport const validateAgentProposal = (proposal: RlyAgentProposal): RlyAgentProposal => {\n requireText(proposal.id, \"AgentProposal id\")\n validateAgent(proposal.agent)\n requireText(proposal.capability, \"AgentProposal capability\")\n requireText(proposal.context, \"AgentProposal context\")\n requireText(proposal.expectedRevision, \"AgentProposal expectedRevision\")\n requireText(proposal.impact, \"AgentProposal impact\")\n requireText(proposal.target, \"AgentProposal target\")\n if (proposal.evidence.length === 0) throw new Error(\"AgentProposal evidence must contain at least one reference\")\n const evidenceIds = new Set<string>()\n for (const evidence of proposal.evidence) {\n const evidenceId = requireText(evidence.id, \"AgentProposal evidence id\")\n if (evidenceIds.has(evidenceId)) throw new Error(`AgentProposal evidence ids must be unique: ${evidenceId}`)\n evidenceIds.add(evidenceId)\n requireText(evidence.label, `AgentProposal evidence label for ${evidenceId}`)\n requireText(evidence.reference, `AgentProposal evidence reference for ${evidenceId}`)\n }\n return proposal\n}\n\n/** Render an agent-authored proposal while explicitly withholding human authorization. */\nexport const AgentProposal = ({\n className,\n outcome,\n proposal: suppliedProposal,\n state,\n ...props\n}: AgentProposalProps): ReactElement => {\n const proposal = validateAgentProposal(suppliedProposal)\n const headingId = `rly-agent-proposal-${useId()}`\n const referenceId = `rly-agent-proposal-reference-${useId()}`\n\n return (\n <section\n {...props}\n aria-labelledby={`${headingId} ${referenceId}`}\n className={classNames(style(\"root\"), className)}\n data-rly-agent-proposal-id={proposal.id}\n >\n <header className={style(\"header\")}>\n <div className={style(\"agentIdentity\")}>\n <Avatar\n decorative\n fallback={proposal.agent.avatarFallback}\n form=\"rounded-square\"\n {...(proposal.agent.avatarSrc === undefined ? {} : { src: proposal.agent.avatarSrc })}\n />\n <div className={style(\"agentText\")}>\n <p className={style(\"eyebrow\")}>Agent proposal</p>\n <h2 className={style(\"heading\")} id={headingId}>\n {proposal.agent.name}\n </h2>\n <p className={style(\"agentRole\")}>{proposal.agent.role}</p>\n <code className={style(\"proposalReference\")} id={referenceId}>\n {proposal.id}\n </code>\n </div>\n </div>\n <div className={style(\"state\")} data-rly-agent-proposal-slot=\"state\">\n {state}\n </div>\n </header>\n\n <p className={style(\"boundary\")}>This is an agent proposal. It is not human authorization.</p>\n <p className={style(\"context\")}>\n <span>Context</span>\n {proposal.context}\n </p>\n\n <dl className={style(\"facts\")}>\n <div>\n <dt>Capability</dt>\n <dd>{proposal.capability}</dd>\n </div>\n <div>\n <dt>Target</dt>\n <dd>{proposal.target}</dd>\n </div>\n <div>\n <dt>Expected revision</dt>\n <dd>{proposal.expectedRevision}</dd>\n </div>\n <div>\n <dt>Impact</dt>\n <dd>{proposal.impact}</dd>\n </div>\n </dl>\n\n <div className={style(\"evidence\")} data-rly-agent-proposal-evidence=\"\">\n <h3>Evidence</h3>\n <ul>\n {proposal.evidence.map((evidence) => (\n <li key={evidence.id}>\n <span>{evidence.label}</span>\n <code>{evidence.reference}</code>\n </li>\n ))}\n </ul>\n </div>\n\n <div className={style(\"outcome\")} data-rly-agent-proposal-slot=\"outcome\">\n <h3>Outcome</h3>\n {outcome}\n </div>\n </section>\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n container-type: inline-size;\n display: grid;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header,\n .messageHead,\n .actor,\n .actions {\n align-items: center;\n display: flex;\n }\n\n .header {\n gap: calc(var(--rly-space-8) + var(--rly-space-2));\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .header h2 {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .agentGlyph,\n .avatar {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-agent);\n }\n\n .agentGlyph {\n align-items: center;\n border: 1px solid currentcolor;\n border-radius: var(--rly-radius-field);\n display: inline-flex;\n flex: 0 0 auto;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / 1 var(--rly-type-meta-font);\n justify-content: center;\n min-block-size: var(--rly-space-32);\n min-inline-size: var(--rly-space-32);\n }\n\n .context,\n .composer {\n background: var(--rly-color-surface-2);\n border-block-start: 1px solid var(--rly-color-border-1);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .context {\n display: grid;\n gap: var(--rly-space-8);\n }\n\n .conceptLabel {\n color: var(--rly-color-agent);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n letter-spacing: 0.05em;\n text-transform: uppercase;\n }\n\n .messages {\n list-style: none;\n margin: var(--rly-space-0);\n padding: var(--rly-space-0) var(--rly-space-20);\n }\n\n .message {\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-20);\n }\n\n .message + .message {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .messageHead {\n gap: var(--rly-space-12);\n justify-content: space-between;\n }\n\n .actor {\n gap: calc(var(--rly-space-8) + var(--rly-space-2));\n min-inline-size: var(--rly-space-0);\n }\n\n .agent .avatar {\n border: 1px solid var(--rly-color-agent);\n }\n\n .human .avatar {\n color: var(--rly-color-text-1);\n }\n\n .system .avatar {\n color: var(--rly-color-text-2);\n }\n\n .actorText {\n display: grid;\n min-inline-size: var(--rly-space-0);\n }\n\n .actorText strong {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .actorText span,\n .messageHead time,\n .empty {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .messageHead time {\n flex: 0 0 auto;\n }\n\n .content {\n color: var(--rly-color-text-1);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n overflow-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .evidence {\n background: var(--rly-color-surface-2);\n border-radius: var(--rly-radius-tag);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-8) var(--rly-space-12);\n }\n\n .actions {\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n }\n\n .composer {\n border-block-end: 0;\n }\n\n .empty {\n margin: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .visuallyHidden {\n block-size: 1px;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n inline-size: 1px;\n margin: -1px;\n overflow: hidden;\n padding: var(--rly-space-0);\n position: absolute;\n white-space: nowrap;\n }\n\n @container (max-width: 22rem) {\n .header,\n .context,\n .composer,\n .empty {\n padding-inline: calc(var(--rly-space-12) + var(--rly-space-2));\n }\n\n .messages {\n padding-inline: calc(var(--rly-space-12) + var(--rly-space-2));\n }\n\n .messageHead {\n align-items: flex-start;\n display: grid;\n }\n }\n}\n","import type { ComponentPropsWithRef, ReactElement, ReactNode } from \"react\"\nimport { Avatar } from \"../primitives/Avatar.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport type { RlyPerson } from \"./Person.js\"\nimport styles from \"./AgentThread.module.css\"\nimport * as Predicate from \"../internal/predicates.js\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nconst requireSlot = (value: ReactNode, label: string): void => {\n if (value === undefined || value === null || Predicate.isBoolean(value)) {\n throw new Error(`${label} must contain renderable content`)\n }\n if (Predicate.isString(value)) requireText(value, label)\n}\n\n/** A human participant whose circular identity distinguishes them from automation. */\nexport interface RlyAgentThreadHumanActor {\n readonly kind: \"human\"\n readonly person: RlyPerson\n}\n\n/** An application-owned agent identity, always rendered as a rounded square. */\nexport interface RlyAgentThreadAgentActor {\n readonly kind: \"agent\"\n readonly id: string\n readonly name: string\n readonly role: string\n readonly avatarFallback?: string\n}\n\n/** A neutral system source for immutable operational messages. */\nexport interface RlyAgentThreadSystemActor {\n readonly kind: \"system\"\n readonly id: string\n readonly name: string\n}\n\nexport type RlyAgentThreadActor = RlyAgentThreadHumanActor | RlyAgentThreadAgentActor | RlyAgentThreadSystemActor\n\n/** One presenter-owned message in immutable display order. */\nexport interface RlyAgentThreadMessage {\n readonly id: string\n readonly actor: RlyAgentThreadActor\n readonly content: ReactNode\n readonly dateTime: string\n readonly time: string\n readonly evidence?: ReactNode\n readonly actions?: ReactNode\n}\n\n/** Controlled release-context conversation. rly never sends or appends messages. */\nexport type AgentThreadProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly heading: string\n readonly context: ReactNode\n readonly messages: ReadonlyArray<RlyAgentThreadMessage>\n readonly composer: ReactNode\n readonly emptyLabel?: string\n /** A presenter-supplied, short update announced politely without moving focus. */\n readonly announcement?: string\n}\n\nconst initialsFor = (name: string): string => {\n const words = name.trim().split(/\\s+/u)\n const first = Array.from(words[0] ?? \"\")[0] ?? \"\"\n const last = Array.from(words[words.length - 1] ?? \"\")[0] ?? \"\"\n return requireText(`${first}${words.length > 1 ? last : \"\"}`, \"AgentThread actor fallback\")\n}\n\nconst validateActor = (actor: RlyAgentThreadActor): void => {\n if (actor.kind === \"human\") {\n requireText(actor.person.id, \"AgentThread human id\")\n requireText(actor.person.name, \"AgentThread human name\")\n requireText(actor.person.role, \"AgentThread human role\")\n if (actor.person.avatarFallback !== undefined) {\n requireText(actor.person.avatarFallback, \"AgentThread human avatarFallback\")\n }\n if (actor.person.avatarSrc !== undefined) requireText(actor.person.avatarSrc, \"AgentThread human avatarSrc\")\n return\n }\n requireText(actor.id, `AgentThread ${actor.kind} id`)\n requireText(actor.name, `AgentThread ${actor.kind} name`)\n if (actor.kind === \"agent\") {\n requireText(actor.role, \"AgentThread agent role\")\n if (actor.avatarFallback !== undefined) requireText(actor.avatarFallback, \"AgentThread agent avatarFallback\")\n }\n}\n\nconst actorIdentity = (actor: RlyAgentThreadActor): ReactElement => {\n const name = actor.kind === \"human\" ? actor.person.name : actor.name\n const role = actor.kind === \"human\" ? actor.person.role : actor.kind === \"agent\" ? actor.role : \"System event\"\n // Every actor shows initials; a system source (\"CodePipeline\") gets its own, never a bare dot.\n const fallback =\n actor.kind === \"human\"\n ? (actor.person.avatarFallback ?? initialsFor(name))\n : actor.kind === \"agent\"\n ? (actor.avatarFallback ?? initialsFor(name))\n : initialsFor(name)\n const src = actor.kind === \"human\" ? actor.person.avatarSrc : undefined\n\n return (\n <div className={classNames(style(\"actor\"), style(actor.kind))} data-rly-agent-thread-actor={actor.kind}>\n <Avatar\n className={style(\"avatar\")}\n data-rly-agent-thread-avatar-form={actor.kind === \"human\" ? \"circle\" : \"rounded-square\"}\n decorative\n fallback={fallback}\n form={actor.kind === \"human\" ? \"circle\" : \"rounded-square\"}\n size=\"default\"\n {...(src === undefined ? {} : { src })}\n />\n <span className={style(\"actorText\")}>\n <strong>{name}</strong>\n <span>{role}</span>\n </span>\n </div>\n )\n}\n\n/** Render exact context, ordered messages, then the required application composer. */\nexport const AgentThread = ({\n announcement,\n className,\n composer,\n context,\n emptyLabel = \"No messages yet.\",\n heading,\n messages,\n ...props\n}: AgentThreadProps): ReactElement => {\n const visibleHeading = requireText(heading, \"AgentThread heading\")\n const visibleEmpty = requireText(emptyLabel, \"AgentThread emptyLabel\")\n requireSlot(context, \"AgentThread context\")\n requireSlot(composer, \"AgentThread composer\")\n if (announcement !== undefined) requireText(announcement, \"AgentThread announcement\")\n const ids = new Set<string>()\n for (const message of messages) {\n const id = requireText(message.id, \"AgentThread message id\")\n if (ids.has(id)) throw new Error(`AgentThread message ids must be unique: ${id}`)\n ids.add(id)\n validateActor(message.actor)\n requireSlot(message.content, `AgentThread message content for ${id}`)\n requireText(message.dateTime, `AgentThread message dateTime for ${id}`)\n requireText(message.time, `AgentThread message time for ${id}`)\n }\n\n return (\n <section {...props} className={classNames(style(\"root\"), className)} data-rly-agent-thread=\"\">\n <header className={style(\"header\")}>\n <span aria-hidden=\"true\" className={style(\"agentGlyph\")}>\n AI\n </span>\n <h2>{visibleHeading}</h2>\n </header>\n <div className={style(\"context\")} data-rly-agent-thread-context=\"\">\n <span className={style(\"conceptLabel\")}>Exact context</span>\n {context}\n </div>\n {messages.length === 0 ? (\n <p className={style(\"empty\")}>{visibleEmpty}</p>\n ) : (\n <ol aria-label={`${visibleHeading} messages`} className={style(\"messages\")}>\n {messages.map((message) => (\n <li className={style(\"message\")} data-rly-agent-thread-message={message.id} key={message.id}>\n <div className={style(\"messageHead\")}>\n {actorIdentity(message.actor)}\n <time dateTime={message.dateTime}>{message.time}</time>\n </div>\n <div className={style(\"content\")}>{message.content}</div>\n {message.evidence === undefined ? null : (\n <div className={style(\"evidence\")} data-rly-agent-thread-evidence=\"\">\n {message.evidence}\n </div>\n )}\n {message.actions === undefined ? null : (\n <div className={style(\"actions\")} data-rly-agent-thread-actions=\"\">\n {message.actions}\n </div>\n )}\n </li>\n ))}\n </ol>\n )}\n <p aria-atomic=\"true\" aria-live=\"polite\" className={style(\"visuallyHidden\")}>\n {announcement}\n </p>\n <div className={style(\"composer\")} data-rly-agent-thread-composer=\"\">\n {composer}\n </div>\n </section>\n )\n}\n","@layer rly.components {\n .root {\n align-items: center;\n display: grid;\n grid-template-columns: auto minmax(var(--rly-space-0), 1fr);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .compact {\n gap: var(--rly-space-8);\n }\n\n .defaultSize {\n gap: var(--rly-space-12);\n }\n\n .identity {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .name {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .role {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .compact .name,\n .compact .role {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Avatar } from \"../primitives/Avatar.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./Person.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable Person size choices. Both preserve name and role. */\nexport const RLY_PERSON_VARIANTS = defineVariants({\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Dense identity row with complete attribution\",\n tokens: [\"space-24\", \"type-meta\"]\n },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard identity row with complete attribution\",\n tokens: [\"space-32\", \"type-label\", \"type-meta\"]\n }\n }\n})\n\n/** Default Person visual choices. */\nexport const RLY_PERSON_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n\n/** Supported Person geometry. */\nexport type RlyPersonSize = keyof typeof RLY_PERSON_VARIANTS.size\n\n/** Presentation-only human identity supplied by an application presenter. */\nexport interface RlyPerson {\n /** Application-stable identity used for list reconciliation. */\n readonly id: string\n /** Full visible human name. */\n readonly name: string\n /** Explicit visible responsibility; never inferred from position. */\n readonly role: string\n /** Optional deterministic fallback; initials are derived from name when omitted. */\n readonly avatarFallback?: string\n /** Optional application-validated and proxied image URL. */\n readonly avatarSrc?: string\n}\n\n/** Props for one attributed human identity. */\nexport type PersonProps = Omit<ComponentPropsWithRef<\"div\">, \"children\"> & {\n readonly person: RlyPerson\n readonly size?: RlyPersonSize\n}\n\nconst initialsFor = (name: string): string => {\n const parts = name.trim().split(/\\s+/u)\n const firstPart = parts[0] ?? \"\"\n const lastPart = parts[parts.length - 1] ?? firstPart\n const firstCharacters = Array.from(firstPart)\n const first = firstCharacters[0] ?? \"\"\n const second = parts.length > 1 ? (Array.from(lastPart)[0] ?? \"\") : (firstCharacters[1] ?? \"\")\n return requireText(`${first}${second}`, \"Person avatar fallback\")\n}\n\nconst validatedPerson = (person: RlyPerson): RlyPerson => {\n requireText(person.id, \"Person id\")\n requireText(person.name, \"Person name\")\n requireText(person.role, \"Person role\")\n if (person.avatarFallback !== undefined) requireText(person.avatarFallback, \"Person avatarFallback\")\n if (person.avatarSrc !== undefined) requireText(person.avatarSrc, \"Person avatarSrc\")\n return person\n}\n\n/** Render avatar, full name, and explicit role without collapsing identity at compact sizes. */\nexport const Person = ({\n className,\n person: suppliedPerson,\n size = \"default\",\n ...props\n}: PersonProps): ReactElement => {\n const person = validatedPerson(suppliedPerson)\n const fallback = person.avatarFallback ?? initialsFor(person.name)\n\n return (\n <div\n {...props}\n className={classNames(style(\"root\"), RLY_PERSON_VARIANTS.size[size].className, className)}\n data-rly-person-size={size}\n >\n <Avatar\n decorative\n fallback={fallback}\n size={size === \"compact\" ? \"small\" : \"default\"}\n {...(person.avatarSrc === undefined ? {} : { src: person.avatarSrc })}\n />\n <span className={style(\"identity\")}>\n <span className={style(\"name\")}>{person.name}</span>\n <span className={style(\"role\")}>{person.role}</span>\n </span>\n </div>\n )\n}\n","@layer rly.components {\n .root {\n align-items: stretch;\n display: flex;\n flex-wrap: wrap;\n list-style: none;\n margin: var(--rly-space-0);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .compact {\n gap: var(--rly-space-8) var(--rly-space-12);\n }\n\n .defaultSize {\n gap: var(--rly-space-12) var(--rly-space-16);\n }\n\n .personItem {\n flex: 1 1 12rem;\n max-inline-size: 18rem;\n min-inline-size: min(100%, 10rem);\n }\n\n .controlItem {\n align-items: center;\n display: flex;\n flex: none;\n }\n\n .overflow {\n align-items: center;\n appearance: none;\n /* A rectangular dense control like a secondary button, the same in light and dark. */\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-tag);\n min-block-size: var(--rly-control-height-dense);\n color: var(--rly-color-text-1);\n cursor: pointer;\n display: inline-flex;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n justify-content: center;\n padding: var(--rly-space-4) var(--rly-space-12);\n }\n\n .overflow:hover {\n background: var(--rly-color-surface-3);\n }\n\n .overflow:active {\n border-color: var(--rly-color-border-2);\n }\n\n @media (max-width: 30rem) {\n .personItem {\n flex-basis: 100%;\n max-inline-size: none;\n }\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { Person, type RlyPerson } from \"./Person.js\"\nimport styles from \"./PeopleStrip.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable PeopleStrip size choices. */\nexport const RLY_PEOPLE_STRIP_VARIANTS = defineVariants({\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Dense attributed people list for narrow surfaces\",\n tokens: [\"space-8\", \"space-40\"]\n },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard attributed people list\",\n tokens: [\"space-12\", \"space-40\"]\n }\n }\n})\n\n/** Default PeopleStrip visual choices. */\nexport const RLY_PEOPLE_STRIP_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n\n/** Supported PeopleStrip geometry. */\nexport type RlyPeopleStripSize = keyof typeof RLY_PEOPLE_STRIP_VARIANTS.size\n\n/** Controlled props for a semantic, expandable list of named people. */\nexport type PeopleStripProps = Omit<ComponentPropsWithRef<\"ul\">, \"aria-label\" | \"children\"> & {\n /** Accessible name describing the people collection. */\n readonly \"aria-label\": string\n /** Explicit controlled expansion state. */\n readonly expanded: boolean\n /** Maximum visible people before the controlled expansion affordance. */\n readonly limit?: number\n /** Called when the owner should expand or collapse the list. */\n readonly onExpandedChange: (expanded: boolean) => void\n readonly people: ReadonlyArray<RlyPerson>\n readonly size?: RlyPeopleStripSize\n}\n\nconst validateLimit = (limit: number): number => {\n if (!Number.isInteger(limit) || limit < 1) throw new Error(\"PeopleStrip limit must be a positive integer\")\n return limit\n}\n\nconst validatePeople = (people: ReadonlyArray<RlyPerson>): void => {\n const ids = new Set<string>()\n for (const person of people) {\n const id = requireText(person.id, \"PeopleStrip person id\")\n requireText(person.name, `PeopleStrip name for ${id}`)\n requireText(person.role, `PeopleStrip role for ${id}`)\n if (ids.has(id)) throw new Error(`PeopleStrip person ids must be unique: ${id}`)\n ids.add(id)\n }\n}\n\n/** Render every visible person as avatar, full name, and role with controlled deterministic overflow. */\nexport const PeopleStrip = ({\n \"aria-label\": ariaLabel,\n className,\n expanded,\n limit = 3,\n onExpandedChange,\n people,\n size = \"default\",\n ...props\n}: PeopleStripProps): ReactElement => {\n const accessibleLabel = requireText(ariaLabel, \"PeopleStrip aria-label\")\n const visibleLimit = validateLimit(limit)\n validatePeople(people)\n const overflowCount = Math.max(people.length - visibleLimit, 0)\n const visiblePeople = expanded ? people : people.slice(0, visibleLimit)\n\n return (\n <ul\n {...props}\n aria-label={accessibleLabel}\n className={classNames(style(\"root\"), RLY_PEOPLE_STRIP_VARIANTS.size[size].className, className)}\n data-rly-people-strip-size={size}\n >\n {visiblePeople.map((person) => (\n <li className={style(\"personItem\")} key={person.id}>\n <Person person={person} size={size} />\n </li>\n ))}\n {overflowCount === 0 ? null : (\n <li className={style(\"controlItem\")}>\n <button\n aria-expanded={expanded}\n aria-label={expanded ? \"Show fewer people\" : `Show ${overflowCount} more people`}\n className={style(\"overflow\")}\n onClick={() => onExpandedChange(!expanded)}\n type=\"button\"\n >\n {expanded ? \"Show fewer\" : `+${overflowCount} people`}\n </button>\n </li>\n )}\n </ul>\n )\n}\n","@layer rly.components {\n .root {\n display: grid;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .compact {\n gap: var(--rly-space-12);\n }\n\n .defaultSize {\n gap: var(--rly-space-20);\n }\n\n .heading {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .compact .heading {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n }\n\n .lanes {\n display: grid;\n gap: var(--rly-space-20);\n grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));\n min-inline-size: var(--rly-space-0);\n }\n\n .lane {\n align-content: start;\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n }\n\n .compact .lanes,\n .compact .lane {\n gap: var(--rly-space-8);\n }\n\n .laneHeading {\n color: var(--rly-color-text-2);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .empty {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n }\n\n @media (max-width: 30rem) {\n .lanes {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { PeopleStrip } from \"./PeopleStrip.js\"\nimport type { RlyPerson } from \"./Person.js\"\nimport styles from \"./CollaboratorGroup.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable CollaboratorGroup size choices. */\nexport const RLY_COLLABORATOR_GROUP_VARIANTS = defineVariants({\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Narrow entity attribution with explicit role lanes\",\n tokens: [\"space-12\", \"type-label\"]\n },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard entity attribution with explicit role lanes\",\n tokens: [\"space-20\", \"type-card-title\"]\n }\n }\n})\n\n/** Default CollaboratorGroup visual choices. */\nexport const RLY_COLLABORATOR_GROUP_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n\n/** Supported CollaboratorGroup geometry. */\nexport type RlyCollaboratorGroupSize = keyof typeof RLY_COLLABORATOR_GROUP_VARIANTS.size\n\n/** Explicit collaborator category; individual roles remain visible on each Person. */\nexport type RlyCollaboratorCategory = \"approvers\" | \"authors\" | \"operators\" | \"owners\" | \"reviewers\"\n\n/** Controlled presentation props for entity collaborator attribution. */\nexport type CollaboratorGroupProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly approvers?: ReadonlyArray<RlyPerson>\n readonly authors?: ReadonlyArray<RlyPerson>\n /** Visible message when no collaborator category has people. */\n readonly emptyLabel?: string\n /** Categories whose PeopleStrip is expanded. */\n readonly expandedCategories: ReadonlyArray<RlyCollaboratorCategory>\n /** Visible heading and accessible group name. */\n readonly heading: string\n readonly limit?: number\n /** Called when one category's expansion should change. */\n readonly onCategoryExpandedChange: (category: RlyCollaboratorCategory, expanded: boolean) => void\n readonly operators?: ReadonlyArray<RlyPerson>\n readonly owners?: ReadonlyArray<RlyPerson>\n readonly reviewers?: ReadonlyArray<RlyPerson>\n readonly size?: RlyCollaboratorGroupSize\n}\n\ninterface CollaboratorLane {\n readonly category: RlyCollaboratorCategory\n readonly label: string\n readonly people: ReadonlyArray<RlyPerson>\n}\n\n/** Render visible entity collaborator categories without using position as a substitute for role. */\nexport const CollaboratorGroup = ({\n approvers = [],\n authors = [],\n className,\n emptyLabel = \"No collaborators assigned.\",\n expandedCategories,\n heading,\n limit = 3,\n onCategoryExpandedChange,\n operators = [],\n owners = [],\n reviewers = [],\n size = \"default\",\n ...props\n}: CollaboratorGroupProps): ReactElement => {\n const visibleHeading = requireText(heading, \"CollaboratorGroup heading\")\n const visibleEmptyLabel = requireText(emptyLabel, \"CollaboratorGroup emptyLabel\")\n const headingId = `rly-collaborators-${useId()}`\n const expanded = new Set<RlyCollaboratorCategory>(expandedCategories)\n const lanes: ReadonlyArray<CollaboratorLane> = [\n { category: \"authors\", label: \"Authors\", people: authors },\n { category: \"owners\", label: \"Owners\", people: owners },\n { category: \"reviewers\", label: \"Reviewers\", people: reviewers },\n { category: \"operators\", label: \"Operators\", people: operators },\n { category: \"approvers\", label: \"Approvers\", people: approvers }\n ]\n const visibleLanes = lanes.filter((lane) => lane.people.length > 0)\n\n return (\n <section\n {...props}\n aria-labelledby={headingId}\n className={classNames(style(\"root\"), RLY_COLLABORATOR_GROUP_VARIANTS.size[size].className, className)}\n data-rly-collaborator-group-size={size}\n >\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n {visibleLanes.length === 0 ? (\n <p className={style(\"empty\")}>{visibleEmptyLabel}</p>\n ) : (\n <div className={style(\"lanes\")}>\n {visibleLanes.map((lane) => (\n <section className={style(\"lane\")} key={lane.category}>\n <h3 className={style(\"laneHeading\")}>{lane.label}</h3>\n <PeopleStrip\n aria-label={`${visibleHeading}: ${lane.label}`}\n expanded={expanded.has(lane.category)}\n limit={limit}\n onExpandedChange={(nextExpanded) => onCategoryExpandedChange(lane.category, nextExpanded)}\n people={lane.people}\n size={size}\n />\n </section>\n ))}\n </div>\n )}\n </section>\n )\n}\n","@layer rly.components {\n .root {\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .inline {\n position: static;\n }\n\n .sticky {\n background: var(--rly-color-canvas);\n border-block-start: 1px solid var(--rly-color-border-1);\n inset-block-end: var(--rly-space-0);\n padding: var(--rly-space-12) var(--rly-space-16);\n position: sticky;\n z-index: 1;\n }\n\n .target {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n margin: var(--rly-space-0);\n }\n\n .clock {\n font-variant-numeric: tabular-nums;\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n }\n\n .sticky .actions > * {\n flex: 1 1 0;\n }\n\n /* An off action stays focusable (aria-disabled) and reads as inert without losing contrast. */\n .actions > [aria-disabled=\"true\"] {\n color: var(--rly-color-text-2);\n cursor: not-allowed;\n }\n\n /* Kept in the accessibility tree while empty, so its first message is announced. */\n .status:empty {\n block-size: 1px;\n clip-path: inset(50%);\n inline-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n }\n\n .reason,\n .status,\n .note {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n margin: var(--rly-space-0);\n }\n\n /* Forced colours flatten the muted ink of an off action, so mark it with a dashed border too. */\n @media (forced-colors: active) {\n .actions > [aria-disabled=\"true\"] {\n border-style: dashed;\n }\n }\n\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .actions > [aria-disabled=\"true\"] {\n border-style: dashed;\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { Button } from \"../primitives/Button.js\"\nimport styles from \"./DecisionBar.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable placement choices for a DecisionBar. */\nexport const RLY_DECISION_BAR_VARIANTS = defineVariants({\n placement: {\n inline: {\n className: style(\"inline\"),\n purpose: \"In the flow of the detail it decides\",\n tokens: [\"color-text-1\", \"color-text-2\"]\n },\n sticky: {\n className: style(\"sticky\"),\n purpose: \"Pinned to the bottom of a phone viewport while its target is open, at thumb reach\",\n tokens: [\"color-canvas\", \"color-border-1\"]\n }\n }\n})\n\n/** Default DecisionBar placement. */\nexport const RLY_DECISION_BAR_DEFAULT_VARIANTS = defineVariants({ placement: \"inline\" })\n\n/** Where the bar sits. */\nexport type RlyDecisionBarPlacement = keyof typeof RLY_DECISION_BAR_VARIANTS.placement\n\n/**\n * What the bar can do right now. `ready` enables both actions; `off` keeps them focusable but\n * inert and points them at `reason`; `sending` waits for the server's answer, never assuming it.\n */\nexport type RlyDecisionBarState =\n | { readonly _tag: \"ready\" }\n | { readonly _tag: \"off\"; readonly reason: string }\n | { readonly _tag: \"sending\"; readonly action: \"approve\" | \"reject\" }\n\n/** Presentation-only DecisionBar props. */\nexport type DecisionBarProps = Omit<ComponentPropsWithRef<\"div\">, \"children\" | \"title\"> & {\n /** Visible approve label. Defaults to \"Approve\". */\n readonly approveLabel?: string\n /** Time left on the decision, shown after the target (\"4m 12s left\"). */\n readonly clock?: ReactNode\n /** One line under the actions, such as what happens if the request expires first. */\n readonly note?: ReactNode\n readonly onApprove: () => void\n readonly onReject: () => void\n /** Defaults to `inline`. */\n readonly placement?: RlyDecisionBarPlacement\n /** Visible reject label. Defaults to \"Reject\". */\n readonly rejectLabel?: string\n readonly state: RlyDecisionBarState\n /**\n * The server's answer once a sent decision settles, such as \"Approved on the hub.\" or\n * \"Refused: the request expired before your approval arrived.\". It is announced through the\n * bar's status region, the same one that says a decision is waiting for the server.\n */\n readonly status?: string\n /** What is being decided, named in full (\"Reassign Rotate signing keys from arch to arch-b\"). */\n readonly target: string\n}\n\n/**\n * Approve or reject one named target. The target and its clock stay visible above the actions,\n * and both buttons carry the target in their accessible names, so a tap never decides the wrong\n * thing. An `off` decision stays focusable with its reason linked; a sent decision waits for the\n * server, and the caller passes the server's answer (including a refusal) as `status`, never an\n * optimistic one. Both are announced through one status region that stays mounted.\n */\nexport const DecisionBar = ({\n approveLabel = \"Approve\",\n className,\n clock,\n note,\n onApprove,\n onReject,\n placement = RLY_DECISION_BAR_DEFAULT_VARIANTS.placement,\n rejectLabel = \"Reject\",\n state,\n status,\n target,\n ...props\n}: DecisionBarProps): ReactElement => {\n const visibleTarget = requireText(target, \"DecisionBar target\")\n const id = useId()\n const reasonId = `rly-decision-bar-reason-${id}`\n const statusId = `rly-decision-bar-status-${id}`\n const inert = state._tag !== \"ready\"\n const reason = state._tag === \"off\" ? state.reason : undefined\n // Mounted in every state, so a screen reader announces what lands in it: the waiting line while\n // sending, then the caller's `status` with the server's answer.\n const statusText =\n state._tag === \"sending\"\n ? `${state.action === \"approve\" ? approveLabel : rejectLabel} sent; waiting for the server's answer.`\n : (status ?? \"\")\n const describedBy = reason !== undefined ? reasonId : state._tag === \"sending\" ? statusId : undefined\n const guarded = (action: () => void) => () => {\n if (!inert) action()\n }\n return (\n <div\n {...props}\n aria-busy={state._tag === \"sending\" ? \"true\" : undefined}\n className={classNames(style(\"root\"), RLY_DECISION_BAR_VARIANTS.placement[placement].className, className)}\n data-rly-decision-bar=\"\"\n data-state={state._tag}\n >\n <p className={style(\"target\")}>\n {visibleTarget}\n {clock === undefined ? null : (\n <>\n {\", \"}\n <span className={style(\"clock\")}>{clock}</span>\n </>\n )}\n </p>\n <div className={style(\"actions\")}>\n <Button\n aria-describedby={describedBy}\n aria-disabled={inert ? true : undefined}\n aria-label={`${approveLabel}: ${visibleTarget}`}\n onClick={guarded(onApprove)}\n variant={inert ? \"secondary\" : \"primary\"}\n >\n {approveLabel}\n </Button>\n <Button\n aria-describedby={describedBy}\n aria-disabled={inert ? true : undefined}\n aria-label={`${rejectLabel}: ${visibleTarget}`}\n onClick={guarded(onReject)}\n variant=\"secondary\"\n >\n {rejectLabel}\n </Button>\n </div>\n {reason === undefined ? null : (\n <p className={style(\"reason\")} id={reasonId}>\n {reason}\n </p>\n )}\n <p className={style(\"status\")} id={statusId} role=\"status\">\n {statusText}\n </p>\n {note === undefined ? null : <p className={style(\"note\")}>{note}</p>}\n </div>\n )\n}\n","@layer rly.components {\n /* A freshness state is a word in its ink and a time, never a chip (no border, tint or padding). */\n .root {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .stateWord {\n align-items: center;\n display: inline-flex;\n flex: none;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n gap: var(--rly-space-6);\n }\n\n .time {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n min-inline-size: var(--rly-space-0);\n }\n\n .compact {\n gap: var(--rly-space-4);\n }\n .compact .stateWord,\n .compact .time {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .defaultSize {\n gap: var(--rly-space-6);\n }\n\n .current {\n color: var(--rly-color-success-ink);\n }\n .cached,\n .missing {\n color: var(--rly-color-text-2);\n }\n .stale {\n color: var(--rly-color-held-ink);\n }\n .unavailable {\n color: var(--rly-color-blocked-ink);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Icon, type RlyIconName } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./FreshnessStamp.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable freshness states and density choices. */\nexport const RLY_FRESHNESS_STAMP_VARIANTS = defineVariants({\n state: {\n current: {\n className: style(\"current\"),\n purpose: \"Current source observation\",\n tokens: [\"color-success-ink\", \"color-success-tint\"]\n },\n cached: {\n className: style(\"cached\"),\n purpose: \"Valid cached source observation\",\n tokens: [\"color-text-2\", \"color-surface-2\"]\n },\n stale: {\n className: style(\"stale\"),\n purpose: \"Source observation beyond its supplied freshness threshold\",\n tokens: [\"color-held-ink\", \"color-held-tint\"]\n },\n missing: {\n className: style(\"missing\"),\n purpose: \"Provider authoritatively reported no object\",\n tokens: [\"color-text-2\", \"color-surface-2\"]\n },\n unavailable: {\n className: style(\"unavailable\"),\n purpose: \"No valid source observation is available\",\n tokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n }\n },\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense freshness metadata\", tokens: [\"type-meta\"] },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard freshness metadata\",\n tokens: [\"type-label\", \"type-meta\"]\n }\n }\n})\n\n/** Default FreshnessStamp density. Freshness state is always supplied explicitly. */\nexport const RLY_FRESHNESS_STAMP_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n\n/** Explicit freshness states supplied by an application presenter. */\nexport type RlyFreshnessState = keyof typeof RLY_FRESHNESS_STAMP_VARIANTS.state\n\n/** Visual density supported by FreshnessStamp. */\nexport type RlyFreshnessStampSize = keyof typeof RLY_FRESHNESS_STAMP_VARIANTS.size\n\nconst freshnessWords = {\n current: \"Current\",\n cached: \"Cached\",\n stale: \"Stale\",\n missing: \"Missing\",\n unavailable: \"Unavailable\"\n} satisfies Readonly<Record<RlyFreshnessState, string>>\n\nconst freshnessIcons = {\n current: \"check\",\n cached: \"clock\",\n stale: \"clock\",\n missing: \"minus\",\n unavailable: \"alert\"\n} satisfies Readonly<Record<RlyFreshnessState, RlyIconName>>\n\ntype FreshnessTimeProps =\n { readonly dateTime: string; readonly time: string } | { readonly dateTime?: never; readonly time?: never }\n\n/** Props for an explicit freshness word with an optional application-formatted time. */\nexport type FreshnessStampProps = Omit<ComponentPropsWithRef<\"span\">, \"children\"> &\n FreshnessTimeProps & {\n readonly size?: RlyFreshnessStampSize\n readonly state: RlyFreshnessState\n }\n\n/** Render supplied freshness without deriving thresholds, state, or relative time. */\nexport const FreshnessStamp = ({\n className,\n dateTime,\n size = \"default\",\n state,\n time,\n ...props\n}: FreshnessStampProps): ReactElement => {\n const visibleTime = time === undefined ? undefined : requireText(time, \"FreshnessStamp time\")\n const machineTime = dateTime === undefined ? undefined : requireText(dateTime, \"FreshnessStamp dateTime\")\n return (\n <span\n {...props}\n className={classNames(\n style(\"root\"),\n RLY_FRESHNESS_STAMP_VARIANTS.state[state].className,\n RLY_FRESHNESS_STAMP_VARIANTS.size[size].className,\n className\n )}\n data-rly-freshness-state={state}\n >\n <span className={style(\"stateWord\")}>\n <Icon decorative name={freshnessIcons[state]} size=\"small\" />\n {/* A comma on the word, not a middot: the stamp reads as one phrase (\"Current, 10:18\"). */}\n <span>\n {freshnessWords[state]}\n {visibleTime === undefined || machineTime === undefined ? null : \",\"}\n </span>\n </span>\n {visibleTime === undefined || machineTime === undefined ? null : (\n <time className={style(\"time\")} dateTime={machineTime}>\n {visibleTime}\n </time>\n )}\n </span>\n )\n}\n","@layer rly.components {\n .root {\n align-items: center;\n display: inline-grid;\n gap: var(--rly-space-8);\n /* Stretched in a table cell, the name stays beside its glyph instead of drifting to the middle. */\n justify-content: start;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .glyph {\n display: block;\n }\n\n .nameVisible {\n /* A provider name is one fixed word (\"Confluence\"): its column never shrinks below it. */\n grid-template-columns: auto auto;\n }\n\n .nameHidden {\n grid-template-columns: auto;\n }\n\n .name {\n color: var(--rly-color-text-1);\n white-space: nowrap;\n }\n\n .compact {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n .compact .glyph {\n block-size: var(--rly-space-24);\n inline-size: var(--rly-space-24);\n }\n\n .defaultSize {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n }\n .defaultSize .glyph {\n block-size: var(--rly-space-32);\n inline-size: var(--rly-space-32);\n }\n\n .codecommit {\n color: var(--rly-color-service-codecommit);\n }\n .codepipeline {\n color: var(--rly-color-service-codepipeline);\n }\n .jira {\n color: var(--rly-color-service-jira);\n }\n .confluence {\n color: var(--rly-color-service-confluence);\n }\n .clockify {\n color: var(--rly-color-service-clockify);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { classNames, cssClass, defineVariants } from \"../internal/component.js\"\nimport styles from \"./ServiceMark.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable provider and density choices for ServiceMark. */\nexport const RLY_SERVICE_MARK_VARIANTS = defineVariants({\n service: {\n codecommit: {\n className: style(\"codecommit\"),\n purpose: \"CodeCommit provenance\",\n tokens: [\"color-service-codecommit\"]\n },\n codepipeline: {\n className: style(\"codepipeline\"),\n purpose: \"CodePipeline provenance\",\n tokens: [\"color-service-codepipeline\"]\n },\n jira: { className: style(\"jira\"), purpose: \"Jira provenance\", tokens: [\"color-service-jira\"] },\n confluence: {\n className: style(\"confluence\"),\n purpose: \"Confluence provenance\",\n tokens: [\"color-service-confluence\"]\n },\n clockify: {\n className: style(\"clockify\"),\n purpose: \"Clockify provenance\",\n tokens: [\"color-service-clockify\"]\n }\n },\n name: {\n visible: {\n className: style(\"nameVisible\"),\n purpose: \"Provider name printed beside the glyph\",\n tokens: [\"color-text-1\"]\n },\n hidden: {\n className: style(\"nameHidden\"),\n purpose: \"Glyph only, where adjacent text already names the provider; the accessible name stays\",\n tokens: []\n }\n },\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense provenance metadata\", tokens: [\"space-24\", \"type-meta\"] },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard provenance identity\",\n tokens: [\"space-32\", \"type-label\"]\n }\n }\n})\n\n/** Default ServiceMark density. A service is always supplied explicitly. */\nexport const RLY_SERVICE_MARK_DEFAULT_VARIANTS = defineVariants({ name: \"visible\", size: \"default\" })\n\n/** Service identities supported by rly provenance patterns. */\nexport type RlyService = keyof typeof RLY_SERVICE_MARK_VARIANTS.service\n\n/** Whether ServiceMark prints the provider name; the accessible name is always present. */\nexport type RlyServiceMarkName = keyof typeof RLY_SERVICE_MARK_VARIANTS.name\n\n/** Visual density supported by ServiceMark. */\nexport type RlyServiceMarkSize = keyof typeof RLY_SERVICE_MARK_VARIANTS.size\n\nconst serviceNames = {\n codecommit: \"CodeCommit\",\n codepipeline: \"CodePipeline\",\n jira: \"Jira\",\n confluence: \"Confluence\",\n clockify: \"Clockify\"\n} satisfies Readonly<Record<RlyService, string>>\n\nconst CodeCommitGlyph = (): ReactElement => (\n <svg aria-hidden=\"true\" className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"M6 5.5h7.5a3 3 0 0 1 3 3v7\" fill=\"none\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeWidth=\"1.8\" />\n <circle cx=\"6\" cy=\"5.5\" fill=\"currentColor\" r=\"2\" />\n <circle cx=\"16.5\" cy=\"17.5\" fill=\"currentColor\" r=\"2\" />\n <path d=\"m10 12 2-2 2 2-2 2Z\" fill=\"none\" stroke=\"currentColor\" strokeLinejoin=\"round\" strokeWidth=\"1.6\" />\n </svg>\n)\n\nconst CodePipelineGlyph = (): ReactElement => (\n <svg aria-hidden=\"true\" className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <rect fill=\"none\" height=\"5\" rx=\"1\" stroke=\"currentColor\" strokeWidth=\"1.7\" width=\"5\" x=\"2.5\" y=\"9.5\" />\n <rect fill=\"none\" height=\"5\" rx=\"1\" stroke=\"currentColor\" strokeWidth=\"1.7\" width=\"5\" x=\"16.5\" y=\"9.5\" />\n <path\n d=\"M8 12h7m-2.5-2.5L15 12l-2.5 2.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.8\"\n />\n </svg>\n)\n\nconst JiraGlyph = (): ReactElement => (\n <svg aria-hidden=\"true\" className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"m12 2.8 8.8 8.8a.6.6 0 0 1 0 .8L12 21.2l-8.8-8.8a.6.6 0 0 1 0-.8Z\" fill=\"currentColor\" />\n <path d=\"m12 7.2 4.8 4.8-4.8 4.8L7.2 12Z\" fill=\"var(--rly-color-surface-1)\" />\n <path d=\"m12 9.8 2.2 2.2-2.2 2.2L9.8 12Z\" fill=\"currentColor\" />\n </svg>\n)\n\nconst ConfluenceGlyph = (): ReactElement => (\n <svg aria-hidden=\"true\" className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"M4 7.2c3.6 2.1 6.8 2.4 9.6.9L17 6.3l2.7 4.3-3.4 1.8c-4.6 2.4-9.5 1.8-14-1.5Z\" fill=\"currentColor\" />\n <path d=\"M20 16.8c-3.6-2.1-6.8-2.4-9.6-.9L7 17.7l-2.7-4.3 3.4-1.8c4.6-2.4 9.5-1.8 14 1.5Z\" fill=\"currentColor\" />\n </svg>\n)\n\nconst ClockifyGlyph = (): ReactElement => (\n <svg aria-hidden=\"true\" className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <circle cx=\"11\" cy=\"13\" fill=\"none\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"1.8\" />\n <path\n d=\"M11 9v4l3 2m1.5-10.7 1.8-1.8M18 7l2-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeWidth=\"1.8\"\n />\n </svg>\n)\n\ntype ServiceGlyph = () => ReactElement\nconst serviceGlyphs = {\n codecommit: CodeCommitGlyph,\n codepipeline: CodePipelineGlyph,\n jira: JiraGlyph,\n confluence: ConfluenceGlyph,\n clockify: ClockifyGlyph\n} satisfies Readonly<Record<RlyService, ServiceGlyph>>\n\n/** Props for a code-owned service identity mark. */\nexport type ServiceMarkProps = Omit<ComponentPropsWithRef<\"span\">, \"aria-label\" | \"children\" | \"role\"> & {\n readonly service: RlyService\n /** `hidden` drops the printed name where a title beside the mark already says it. Default `visible`. */\n readonly name?: RlyServiceMarkName\n readonly size?: RlyServiceMarkSize\n}\n\n/** Render service provenance: a recognisable glyph and an accessible provider name, printed unless `name=\"hidden\"`. */\nexport const ServiceMark = ({\n className,\n name: nameVariant = \"visible\",\n service,\n size = \"default\",\n ...props\n}: ServiceMarkProps): ReactElement => {\n const Glyph = serviceGlyphs[service]\n const name = serviceNames[service]\n return (\n <span\n {...props}\n aria-label={name}\n className={classNames(\n style(\"root\"),\n RLY_SERVICE_MARK_VARIANTS.service[service].className,\n RLY_SERVICE_MARK_VARIANTS.name[nameVariant].className,\n RLY_SERVICE_MARK_VARIANTS.size[size].className,\n className\n )}\n data-rly-service={service}\n role=\"img\"\n >\n <Glyph />\n {nameVariant === \"visible\" ? (\n <span aria-hidden=\"true\" className={style(\"name\")}>\n {name}\n </span>\n ) : null}\n </span>\n )\n}\n","@layer rly.components {\n .root {\n /* The verdict sizes to the column it sits in, not the viewport (see .verdict). */\n container-type: inline-size;\n display: grid;\n gap: var(--rly-space-24);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .verdict {\n color: var(--rly-color-text-1);\n font: var(--rly-type-verdict-weight) var(--rly-type-verdict-size) / var(--rly-type-verdict-line-height)\n var(--rly-type-verdict-font);\n /*\n * The token is viewport-fluid; a verdict in a narrow column (an entity shell, a preview) would\n * then hold words wider than the column. Cap it at the container's width so every word fits.\n */\n font-size: clamp(var(--rly-type-card-title-size), 11cqi, var(--rly-type-verdict-size));\n letter-spacing: var(--rly-type-verdict-tracking);\n margin: var(--rly-space-0);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n text-wrap: balance;\n }\n\n .caution {\n --rly-verdict-tone-ink: var(--rly-color-held-ink);\n --rly-verdict-tone-tint: var(--rly-color-held-tint);\n }\n\n .critical {\n --rly-verdict-tone-ink: var(--rly-color-blocked-ink);\n --rly-verdict-tone-tint: var(--rly-color-blocked-tint);\n }\n\n .neutral {\n --rly-verdict-tone-ink: var(--rly-color-text-2);\n --rly-verdict-tone-tint: var(--rly-color-surface-2);\n }\n\n .positive {\n --rly-verdict-tone-ink: var(--rly-color-success-ink);\n --rly-verdict-tone-tint: var(--rly-color-success-tint);\n }\n\n .progress {\n --rly-verdict-tone-ink: var(--rly-color-deploying-ink);\n --rly-verdict-tone-tint: var(--rly-color-deploying-tint);\n }\n\n .reasonPanel {\n align-items: start;\n background: var(--rly-verdict-tone-tint, var(--rly-color-surface-2));\n border: 1px solid color-mix(in oklab, var(--rly-verdict-tone-ink, var(--rly-color-text-2)) 35%, transparent);\n border-radius: var(--rly-radius-field);\n display: grid;\n gap: var(--rly-space-12);\n grid-template-columns: auto minmax(var(--rly-space-0), 1fr);\n max-inline-size: 48rem;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .icon {\n color: var(--rly-verdict-tone-ink, var(--rly-color-text-2));\n display: inline-flex;\n }\n\n .reason {\n color: var(--rly-color-text-1);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n text-wrap: pretty;\n }\n\n @media (max-width: 30rem) {\n .root {\n gap: var(--rly-space-16);\n }\n\n .reasonPanel {\n padding: var(--rly-space-12);\n }\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Icon, type RlyIconName } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./Verdict.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable semantic context choices for a caller-supplied Verdict. */\nexport const RLY_VERDICT_VARIANTS = defineVariants({\n tone: {\n caution: {\n className: style(\"caution\"),\n purpose: \"Intentional hold or caution requiring attention\",\n tokens: [\"color-held-ink\", \"color-held-tint\"]\n },\n critical: {\n className: style(\"critical\"),\n purpose: \"Explicit blocker or failed prerequisite\",\n tokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n },\n neutral: {\n className: style(\"neutral\"),\n purpose: \"Neutral, missing, or unavailable outcome\",\n tokens: [\"color-text-2\", \"color-surface-2\"]\n },\n positive: {\n className: style(\"positive\"),\n purpose: \"Satisfied readiness or successful outcome\",\n tokens: [\"color-success-ink\", \"color-success-tint\"]\n },\n progress: {\n className: style(\"progress\"),\n purpose: \"Active work or delivery progress\",\n tokens: [\"color-deploying-ink\", \"color-deploying-tint\"]\n }\n }\n})\n\n/** Owned semantic presentation tone; it does not derive application readiness. */\nexport type RlyVerdictTone = keyof typeof RLY_VERDICT_VARIANTS.tone\n\n/** Minimal presentation-only Verdict props supplied by an authoritative application presenter. */\nexport type VerdictProps = Omit<ComponentPropsWithRef<\"section\">, \"children\"> & {\n /** Required concise evidence or explanation supplied by the application. */\n readonly reason: string\n /** Explicit semantic style only; no readiness or authorization is derived. */\n readonly tone: RlyVerdictTone\n /** Required neutral verdict word or thesis supplied by the application. */\n readonly verdict: string\n}\n\nconst toneIcons = {\n caution: \"clock\",\n critical: \"alert\",\n neutral: \"minus\",\n positive: \"check\",\n progress: \"loader\"\n} satisfies Readonly<Record<RlyVerdictTone, RlyIconName>>\n\n/** Render a neutral giant verdict with an explicit icon, an even tone border and tint, and the supplied reason. */\nexport const Verdict = ({ className, reason, tone, verdict, ...props }: VerdictProps): ReactElement => {\n const visibleReason = requireText(reason, \"Verdict reason\")\n const visibleVerdict = requireText(verdict, \"Verdict verdict\")\n\n return (\n <section\n {...props}\n className={classNames(style(\"root\"), RLY_VERDICT_VARIANTS.tone[tone].className, className)}\n data-rly-verdict-tone={tone}\n >\n <h2 className={style(\"verdict\")}>{visibleVerdict}</h2>\n <div className={style(\"reasonPanel\")}>\n <span aria-hidden=\"true\" className={style(\"icon\")}>\n <Icon decorative name={toneIcons[tone]} size=\"large\" />\n </span>\n <p className={style(\"reason\")}>{visibleReason}</p>\n </div>\n </section>\n )\n}\n","@layer rly.components {\n .root {\n container-type: inline-size;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-40);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .navigation {\n min-inline-size: var(--rly-space-0);\n }\n\n .header {\n border-block-end: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-32);\n min-inline-size: var(--rly-space-0);\n padding-block-end: var(--rly-space-40);\n }\n\n .identity {\n align-items: start;\n display: grid;\n gap: var(--rly-space-16);\n justify-items: start;\n min-inline-size: var(--rly-space-0);\n }\n\n .title {\n font: var(--rly-type-page-title-weight) var(--rly-type-page-title-size) / var(--rly-type-page-title-line-height)\n var(--rly-type-page-title-font);\n letter-spacing: var(--rly-type-page-title-tracking);\n margin: var(--rly-space-0);\n max-inline-size: 24ch;\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n text-wrap: balance;\n }\n\n .hero,\n .body {\n align-items: start;\n display: grid;\n gap: var(--rly-space-40);\n grid-template-columns: minmax(var(--rly-space-0), 1fr) minmax(var(--rly-space-0), 20rem);\n min-inline-size: var(--rly-space-0);\n }\n\n .headerAside {\n align-content: start;\n display: grid;\n gap: var(--rly-space-20);\n min-inline-size: var(--rly-space-0);\n }\n\n .freshness,\n .headerSlot {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n padding-block-start: var(--rly-space-12);\n }\n\n .slotLabel {\n color: var(--rly-color-text-1);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n text-transform: uppercase;\n }\n\n .content,\n .relationships,\n .activity,\n .asideSlot {\n min-inline-size: var(--rly-space-0);\n }\n\n .aside {\n align-content: start;\n background: var(--rly-color-surface-2);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n display: grid;\n gap: var(--rly-space-24);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .asideSlot + .asideSlot {\n border-block-start: 1px solid var(--rly-color-border-1);\n padding-block-start: var(--rly-space-20);\n }\n\n .relationships,\n .activity {\n border-block-start: 1px solid var(--rly-color-border-1);\n padding-block-start: var(--rly-space-32);\n }\n\n @container (max-width: 44rem) {\n .header {\n gap: var(--rly-space-24);\n padding-block-end: var(--rly-space-32);\n }\n\n .title {\n font-size: clamp(2rem, 8cqi, 3.5rem);\n line-height: 0.95;\n max-inline-size: 100%;\n }\n\n .hero,\n .body {\n gap: var(--rly-space-24);\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .aside {\n border-radius: var(--rly-radius-control);\n padding: var(--rly-space-16);\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { FreshnessStamp, type RlyFreshnessState } from \"./FreshnessStamp.js\"\nimport { ServiceMark, type RlyService } from \"./ServiceMark.js\"\nimport { Verdict, type RlyVerdictTone } from \"./Verdict.js\"\nimport styles from \"./EntityShell.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\ntype EntityShellFreshnessTimeProps =\n | { readonly freshnessDateTime: string; readonly freshnessTime: string }\n | { readonly freshnessDateTime?: never; readonly freshnessTime?: never }\n\n/** Presentation-only slots for a complete service entity page. */\nexport type EntityShellProps = Omit<ComponentPropsWithRef<\"article\">, \"children\" | \"content\" | \"title\"> &\n EntityShellFreshnessTimeProps & {\n readonly actions: ReactNode\n readonly activity?: ReactNode\n readonly agentEntry: ReactNode\n readonly collaborators: ReactNode\n readonly content: ReactNode\n readonly evidence?: ReactNode\n readonly facts?: ReactNode\n readonly freshness: RlyFreshnessState\n readonly navigation?: ReactNode\n readonly reason: string\n readonly relationships: ReactNode\n readonly service: RlyService\n readonly title: string\n readonly tone: RlyVerdictTone\n readonly verdict: string\n }\n\n/**\n * Arrange application-owned entity presentation without deriving service state,\n * readiness, freshness, permissions, relationships, or actions.\n */\nexport const EntityShell = ({\n actions,\n activity,\n agentEntry,\n className,\n collaborators,\n content,\n evidence,\n facts,\n freshness,\n freshnessDateTime,\n freshnessTime,\n navigation,\n reason,\n relationships,\n service,\n title,\n tone,\n verdict,\n ...props\n}: EntityShellProps): ReactElement => {\n const visibleTitle = requireText(title, \"EntityShell title\")\n if ((freshnessDateTime === undefined) !== (freshnessTime === undefined)) {\n throw new Error(\"EntityShell freshnessDateTime and freshnessTime must be supplied together\")\n }\n const titleId = `rly-entity-shell-${useId()}`\n\n return (\n <article\n {...props}\n aria-labelledby={titleId}\n className={classNames(style(\"root\"), className)}\n data-rly-entity-shell=\"\"\n >\n {navigation === undefined ? null : (\n <nav\n aria-label={`${visibleTitle} navigation`}\n className={style(\"navigation\")}\n data-rly-entity-shell-slot=\"navigation\"\n >\n {navigation}\n </nav>\n )}\n <header className={style(\"header\")}>\n <div className={style(\"identity\")}>\n <ServiceMark service={service} />\n <h1 className={style(\"title\")} id={titleId}>\n {visibleTitle}\n </h1>\n </div>\n <div className={style(\"hero\")}>\n <Verdict reason={reason} tone={tone} verdict={verdict} />\n <div className={style(\"headerAside\")}>\n <div className={style(\"freshness\")} data-rly-entity-shell-slot=\"freshness\">\n <span className={style(\"slotLabel\")}>Freshness</span>\n {freshnessDateTime === undefined || freshnessTime === undefined ? (\n <FreshnessStamp state={freshness} />\n ) : (\n <FreshnessStamp dateTime={freshnessDateTime} state={freshness} time={freshnessTime} />\n )}\n </div>\n <div className={style(\"headerSlot\")} data-rly-entity-shell-slot=\"actions\">\n {actions}\n </div>\n <div className={style(\"headerSlot\")} data-rly-entity-shell-slot=\"agent-entry\">\n {agentEntry}\n </div>\n </div>\n </div>\n </header>\n\n <div className={style(\"body\")}>\n <section className={style(\"content\")} data-rly-entity-shell-slot=\"content\">\n {content}\n </section>\n <aside className={style(\"aside\")}>\n {facts === undefined ? null : (\n <section className={style(\"asideSlot\")} data-rly-entity-shell-slot=\"facts\">\n {facts}\n </section>\n )}\n {evidence === undefined ? null : (\n <section className={style(\"asideSlot\")} data-rly-entity-shell-slot=\"evidence\">\n {evidence}\n </section>\n )}\n <section className={style(\"asideSlot\")} data-rly-entity-shell-slot=\"collaborators\">\n {collaborators}\n </section>\n </aside>\n </div>\n\n <section className={style(\"relationships\")} data-rly-entity-shell-slot=\"relationships\">\n {relationships}\n </section>\n {activity === undefined ? null : (\n <section className={style(\"activity\")} data-rly-entity-shell-slot=\"activity\">\n {activity}\n </section>\n )}\n </article>\n )\n}\n","@layer rly.components {\n .root {\n container-type: inline-size;\n display: grid;\n gap: var(--rly-space-16);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n /* The comfortable cards below are the default; the class marks which density a root uses. */\n .defaultDensity,\n .compact {\n --rly-entity-table-density: initial;\n }\n\n .heading {\n color: var(--rly-color-text-1);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .sectionHeading .heading {\n font: var(--rly-type-section-title-weight) var(--rly-type-section-title-size) /\n var(--rly-type-section-title-line-height) var(--rly-type-section-title-font);\n letter-spacing: var(--rly-type-section-title-tracking);\n }\n\n .cardHeading .heading {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n }\n\n /* While it is a table, the column headers sort; the separate controls serve the card layout. */\n .headerLabel {\n display: none;\n }\n\n .headerSort {\n align-items: center;\n background: transparent;\n border: 0;\n border-radius: var(--rly-radius-tag);\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n gap: var(--rly-space-6);\n margin-inline: calc(-1 * var(--rly-space-4));\n min-block-size: var(--rly-space-32);\n padding: var(--rly-space-0) var(--rly-space-4);\n text-align: inherit;\n }\n\n .headerSort:hover {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-1);\n }\n\n .headerSort:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n outline-offset: var(--rly-focus-ring-offset);\n }\n\n .sortSelect {\n align-items: center;\n display: flex;\n gap: var(--rly-space-8);\n }\n\n .sortSelect > :first-child {\n flex: 1;\n min-inline-size: var(--rly-space-0);\n }\n\n .loading {\n display: grid;\n gap: var(--rly-space-8);\n }\n\n .stateLabel {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n }\n\n .table {\n border-collapse: separate;\n border-spacing: var(--rly-space-0);\n inline-size: 100%;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n table-layout: fixed;\n }\n\n .head th {\n border-block-end: 1px solid var(--rly-color-border-2);\n color: var(--rly-color-text-2);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n padding: var(--rly-space-2) var(--rly-space-16);\n text-align: start;\n }\n\n .sortControls {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n }\n\n .sortLabel {\n color: var(--rly-color-text-2);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n }\n\n .sortButton {\n align-items: center;\n background: transparent;\n border: 0;\n border-radius: var(--rly-radius-tag);\n color: inherit;\n cursor: pointer;\n display: inline-flex;\n font: inherit;\n gap: var(--rly-space-6);\n min-block-size: 44px;\n padding: var(--rly-space-0) var(--rly-space-4);\n }\n\n .sortButton:hover {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-1);\n }\n\n .sortButton:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n outline-offset: var(--rly-focus-ring-offset);\n }\n\n .cell {\n border-block-end: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-1);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n padding: var(--rly-space-12) var(--rly-space-16);\n vertical-align: top;\n }\n\n .row {\n min-block-size: 48px;\n }\n\n @container (max-width: 40rem) {\n .sortControls {\n align-items: stretch;\n display: grid;\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .sortButton {\n border: 1px solid var(--rly-color-border-2);\n justify-content: space-between;\n padding-inline: var(--rly-space-12);\n }\n\n .table,\n .body {\n display: block;\n }\n\n /* The card layout has its own sort controls; the clipped header keeps only its labels. */\n .headerSort {\n visibility: hidden;\n }\n\n .headerLabel {\n display: inline;\n }\n\n .head {\n block-size: 1px;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n inline-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n }\n\n .body {\n display: grid;\n gap: var(--rly-space-12);\n }\n\n .row {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-control);\n display: grid;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .cell {\n border-block-end: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-8);\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n inline-size: auto;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-12);\n }\n\n .cell:last-child {\n border-block-end: 0;\n }\n\n .cell::before {\n color: var(--rly-color-text-2);\n content: attr(data-label);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n font-weight: 650;\n text-transform: uppercase;\n }\n }\n\n @container (max-width: 40rem) {\n .compact .sortControls {\n display: flex;\n flex-wrap: wrap;\n }\n\n .compact .sortButton {\n justify-content: flex-start;\n }\n\n .compact .body {\n gap: var(--rly-space-8);\n }\n\n .compact .row {\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n }\n\n .compact .cell {\n border-block-end: 0;\n gap: var(--rly-space-2);\n padding: var(--rly-space-8) var(--rly-space-12);\n }\n\n .compact .cell:first-child {\n border-block-end: 1px solid var(--rly-color-border-1);\n grid-column: 1 / -1;\n }\n\n .compact .cell:first-child::before {\n content: none;\n }\n\n .compact .cell::before {\n font-weight: var(--rly-type-meta-weight);\n text-transform: none;\n }\n }\n\n /* Last, so it outranks the base display of both control rows: wide tables sort from the headers. */\n @container (min-width: 40.0625rem) {\n .sortControls,\n .sortSelect {\n display: none;\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { IconButton } from \"../primitives/IconButton.js\"\nimport { Select } from \"../primitives/Select.js\"\nimport { Skeleton } from \"../primitives/Skeleton.js\"\nimport { StatePanel, type RlyStatePanelTone } from \"../primitives/StatePanel.js\"\nimport styles from \"./EntityTable.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nexport const RLY_ENTITY_TABLE_VARIANTS = defineVariants({\n density: {\n default: {\n className: style(\"defaultDensity\"),\n purpose: \"One labelled line per field when the table narrows to cards\",\n tokens: [\"space-12\"]\n },\n compact: {\n className: style(\"compact\"),\n purpose: \"Narrow cards led by the first column, the rest as a two-column label and value grid\",\n tokens: [\"space-8\", \"space-2\"]\n }\n },\n headingSize: {\n section: {\n className: style(\"sectionHeading\"),\n purpose: \"The table is a page section of its own\",\n tokens: [\"type-section-title\"]\n },\n card: {\n className: style(\"cardHeading\"),\n purpose: \"The table sits in a panel beside other card-titled panels\",\n tokens: [\"type-card-title\"]\n }\n }\n})\n\nexport const RLY_ENTITY_TABLE_DEFAULT_VARIANTS = defineVariants({ density: \"default\", headingSize: \"section\" })\nexport type RlyEntityTableDensity = keyof typeof RLY_ENTITY_TABLE_VARIANTS.density\nexport type RlyEntityTableHeadingSize = keyof typeof RLY_ENTITY_TABLE_VARIANTS.headingSize\n\n/** Caller-owned table sort state. */\nexport type RlyEntityTableSortDirection = \"none\" | \"ascending\" | \"descending\"\n\ntype RlyEntityTableColumnBase = {\n readonly id: string\n readonly label: string\n}\n\n/** A column is either static or explicitly controlled by the application. */\nexport type RlyEntityTableColumn = RlyEntityTableColumnBase &\n (\n | { readonly sortable?: false; readonly sortDirection?: never }\n | { readonly sortable: true; readonly sortDirection: RlyEntityTableSortDirection }\n )\n\n/** One caller-rendered cell associated with an explicit column. */\nexport interface RlyEntityTableCell {\n readonly columnId: string\n readonly content: ReactNode\n}\n\n/** One complete presentation row. */\nexport interface RlyEntityTableRow {\n readonly cells: ReadonlyArray<RlyEntityTableCell>\n readonly id: string\n}\n\ntype RlyEntityTableRows = { readonly rows: ReadonlyArray<RlyEntityTableRow> }\n\n/** Complete table data states. Cached failure states retain their supplied rows. */\nexport type RlyEntityTableData =\n | { readonly state: \"ready\"; readonly rows: ReadonlyArray<RlyEntityTableRow> }\n | { readonly label: string; readonly skeletonRows?: number; readonly state: \"loading\" }\n | { readonly description?: string; readonly state: \"empty\" | \"not-found\"; readonly title: string }\n | (RlyEntityTableRows & {\n readonly description: string\n readonly state: \"stale\" | \"partial\" | \"error\" | \"unavailable\"\n readonly title: string\n readonly tone: RlyStatePanelTone\n })\n\n/** Props for an application-controlled, native semantic entity table. */\nexport type EntityTableProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly columns: readonly [RlyEntityTableColumn, ...ReadonlyArray<RlyEntityTableColumn>]\n readonly data: RlyEntityTableData\n /**\n * How rows read once the table narrows to cards; wide tables look the same at both. Compact\n * cards sort through a `Select`, so they need an available `PortalProvider`.\n */\n readonly density?: RlyEntityTableDensity\n readonly heading: string\n readonly headingSize?: RlyEntityTableHeadingSize\n readonly onSortChange: (columnId: string) => void\n}\n\nconst validateColumns = (\n columns: readonly [RlyEntityTableColumn, ...ReadonlyArray<RlyEntityTableColumn>]\n): ReadonlySet<string> => {\n const ids = new Set<string>()\n for (const column of columns) {\n const id = requireText(column.id, \"EntityTable column id\")\n if (ids.has(id)) throw new Error(`EntityTable column ids must be unique: ${id}`)\n ids.add(id)\n requireText(column.label, `EntityTable column label for ${id}`)\n }\n return ids\n}\n\nconst validateRows = (rows: ReadonlyArray<RlyEntityTableRow>, columnIds: ReadonlySet<string>): void => {\n const rowIds = new Set<string>()\n for (const row of rows) {\n const rowId = requireText(row.id, \"EntityTable row id\")\n if (rowIds.has(rowId)) throw new Error(`EntityTable row ids must be unique: ${rowId}`)\n rowIds.add(rowId)\n\n const cellIds = new Set<string>()\n for (const cell of row.cells) {\n const columnId = requireText(cell.columnId, `EntityTable cell column id for ${rowId}`)\n if (!columnIds.has(columnId)) throw new Error(`EntityTable row ${rowId} has an unknown column: ${columnId}`)\n if (cellIds.has(columnId)) throw new Error(`EntityTable row ${rowId} repeats column: ${columnId}`)\n cellIds.add(columnId)\n }\n for (const columnId of columnIds) {\n if (!cellIds.has(columnId)) throw new Error(`EntityTable row ${rowId} is missing column: ${columnId}`)\n }\n }\n}\n\nconst rowsFor = (data: RlyEntityTableData): ReadonlyArray<RlyEntityTableRow> =>\n data.state === \"ready\" ||\n data.state === \"stale\" ||\n data.state === \"partial\" ||\n data.state === \"error\" ||\n data.state === \"unavailable\"\n ? data.rows\n : []\n\n/** The active column's direction; an unsorted column shows no glyph, which would read as a value. */\nconst SortGlyph = ({ direction }: { readonly direction: RlyEntityTableSortDirection }): ReactElement | null =>\n direction === \"none\" ? null : (\n <Icon decorative name={direction === \"ascending\" ? \"arrow-up\" : \"arrow-down\"} size=\"small\" />\n )\n\n/** Render complete entity rows while leaving selection, sorting, and pagination to the application. */\nexport const EntityTable = ({\n className,\n columns,\n data,\n density = \"default\",\n heading,\n headingSize = \"section\",\n onSortChange,\n ...props\n}: EntityTableProps): ReactElement => {\n const visibleHeading = requireText(heading, \"EntityTable heading\")\n const columnIds = validateColumns(columns)\n const rows = rowsFor(data)\n validateRows(rows, columnIds)\n if (data.state === \"ready\" && rows.length === 0) {\n throw new Error(\"EntityTable ready state must contain at least one row; use the empty state instead\")\n }\n if (data.state === \"loading\") {\n requireText(data.label, \"EntityTable loading label\")\n const skeletonRows = data.skeletonRows ?? 3\n if (!Number.isInteger(skeletonRows) || skeletonRows < 1 || skeletonRows > 20) {\n throw new Error(\"EntityTable skeletonRows must be an integer from 1 to 20\")\n }\n }\n if (data.state === \"empty\" || data.state === \"not-found\") {\n requireText(data.title, \"EntityTable state title\")\n if (data.description !== undefined) requireText(data.description, \"EntityTable state description\")\n }\n if (data.state === \"stale\" || data.state === \"partial\" || data.state === \"error\" || data.state === \"unavailable\") {\n requireText(data.title, \"EntityTable cached state title\")\n requireText(data.description, \"EntityTable cached state description\")\n if (rows.length === 0) throw new Error(`EntityTable ${data.state} state must retain at least one cached row`)\n }\n\n const headingId = `rly-entity-table-${useId()}`\n const sortable = columns.filter(\n (\n column\n ): column is RlyEntityTableColumnBase & {\n readonly sortable: true\n readonly sortDirection: RlyEntityTableSortDirection\n } => column.sortable === true\n )\n const current = sortable.find((column) => column.sortDirection !== \"none\")\n const columnById = new Map(columns.map((column) => [column.id, column]))\n const cachedNotice =\n data.state === \"stale\" || data.state === \"partial\" || data.state === \"error\" || data.state === \"unavailable\" ? (\n <StatePanel description={data.description} title={data.title} tone={data.tone} />\n ) : null\n\n return (\n <section\n {...props}\n aria-busy={data.state === \"loading\" ? \"true\" : undefined}\n aria-labelledby={headingId}\n className={classNames(\n style(\"root\"),\n RLY_ENTITY_TABLE_VARIANTS.density[density].className,\n RLY_ENTITY_TABLE_VARIANTS.headingSize[headingSize].className,\n className\n )}\n data-rly-entity-table-density={density}\n data-rly-entity-table-state={data.state}\n >\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n {data.state === \"loading\" ? (\n <div aria-label={data.label} className={style(\"loading\")} role=\"status\">\n <span className={style(\"stateLabel\")}>{data.label}</span>\n {Array.from({ length: data.skeletonRows ?? 3 }, (_, index) => (\n <Skeleton height=\"48px\" key={index} variant=\"block\" />\n ))}\n </div>\n ) : data.state === \"empty\" || data.state === \"not-found\" ? (\n <StatePanel description={data.description} title={data.title} />\n ) : (\n <>\n {cachedNotice}\n {density === \"compact\" ? (\n sortable.length === 0 ? null : (\n <div className={style(\"sortSelect\")}>\n <Select\n aria-label=\"Sort by\"\n onValueChange={(value) => {\n if (value !== current?.id) onSortChange(value)\n }}\n options={sortable.map((column) => ({\n label:\n column.sortDirection === \"ascending\"\n ? `${column.label} ↑`\n : column.sortDirection === \"descending\"\n ? `${column.label} ↓`\n : column.label,\n value: column.id\n }))}\n placeholder=\"Sort by\"\n value={current?.id}\n />\n {current === undefined ? null : (\n <IconButton\n icon={current.sortDirection === \"ascending\" ? \"arrow-up\" : \"arrow-down\"}\n label={`Reverse order, currently ${current.sortDirection}`}\n onClick={() => onSortChange(current.id)}\n variant=\"secondary\"\n />\n )}\n </div>\n )\n ) : (\n <div aria-label={`${visibleHeading} sorting`} className={style(\"sortControls\")} role=\"group\">\n <span className={style(\"sortLabel\")}>Sort</span>\n {sortable.map((column) => (\n <button\n aria-label={`Sort by ${column.label}, currently ${column.sortDirection}`}\n className={style(\"sortButton\")}\n key={column.id}\n onClick={() => onSortChange(column.id)}\n type=\"button\"\n >\n <span>{column.label}</span>\n <SortGlyph direction={column.sortDirection} />\n </button>\n ))}\n </div>\n )}\n <table aria-labelledby={headingId} className={style(\"table\")}>\n <thead className={style(\"head\")}>\n <tr>\n {columns.map((column) => (\n <th\n aria-label={column.label}\n aria-sort={column.sortable === true ? column.sortDirection : undefined}\n key={column.id}\n scope=\"col\"\n >\n {column.sortable === true ? (\n <>\n <span className={style(\"headerLabel\")}>{column.label}</span>\n <button\n aria-label={`Sort by ${column.label}, currently ${column.sortDirection}`}\n className={style(\"headerSort\")}\n onClick={() => onSortChange(column.id)}\n type=\"button\"\n >\n <span>{column.label}</span>\n <SortGlyph direction={column.sortDirection} />\n </button>\n </>\n ) : (\n column.label\n )}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className={style(\"body\")}>\n {rows.map((row) => {\n const cells = new Map(row.cells.map((cell) => [cell.columnId, cell.content]))\n return (\n <tr className={style(\"row\")} data-rly-entity-row-id={row.id} key={row.id}>\n {columns.map((column) => (\n <td className={style(\"cell\")} data-label={columnById.get(column.id)?.label} key={column.id}>\n {cells.get(column.id)}\n </td>\n ))}\n </tr>\n )\n })}\n </tbody>\n </table>\n </>\n )}\n </section>\n )\n}\n","@layer rly.components {\n .root {\n align-items: center;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-control);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-16);\n grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-12) var(--rly-space-16);\n }\n\n .source,\n .freshness {\n display: grid;\n gap: var(--rly-space-6);\n min-inline-size: var(--rly-space-0);\n }\n\n .freshness {\n justify-items: start;\n }\n\n .conceptLabel {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .sourceDetail {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n }\n\n .reference {\n background: var(--rly-color-surface-2);\n border-radius: var(--rly-radius-tag);\n color: var(--rly-color-text-1);\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow-wrap: break-word;\n padding: var(--rly-space-4) var(--rly-space-8);\n /* A wrapped hash splits into even lines, never leaving one character alone on the last. */\n text-wrap: balance;\n white-space: normal;\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { FreshnessStamp, type RlyFreshnessState } from \"./FreshnessStamp.js\"\nimport { ServiceMark, type RlyService } from \"./ServiceMark.js\"\nimport styles from \"./EvidenceStamp.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\ntype EvidenceFreshnessTimeProps =\n | { readonly freshnessDateTime: string; readonly freshnessTime: string }\n | { readonly freshnessDateTime?: never; readonly freshnessTime?: never }\n\n/** Props for immutable evidence identity with separately represented source and freshness. */\nexport type EvidenceStampProps = Omit<ComponentPropsWithRef<\"div\">, \"children\"> &\n EvidenceFreshnessTimeProps & {\n readonly freshness: RlyFreshnessState\n readonly reference: string\n readonly service: RlyService\n }\n\n/** Render evidence provenance and supplied freshness as separate, readable concepts. */\nexport const EvidenceStamp = ({\n className,\n freshness,\n freshnessDateTime,\n freshnessTime,\n reference,\n service,\n ...props\n}: EvidenceStampProps): ReactElement => {\n const visibleReference = requireText(reference, \"EvidenceStamp reference\")\n const freshnessStamp =\n freshnessDateTime === undefined || freshnessTime === undefined ? (\n <FreshnessStamp size=\"compact\" state={freshness} />\n ) : (\n <FreshnessStamp dateTime={freshnessDateTime} size=\"compact\" state={freshness} time={freshnessTime} />\n )\n\n return (\n <div {...props} className={classNames(style(\"root\"), className)} data-rly-evidence-stamp=\"\">\n <div className={style(\"source\")} data-rly-evidence-source={service}>\n <span className={style(\"conceptLabel\")}>Evidence source</span>\n <div className={style(\"sourceDetail\")}>\n <ServiceMark service={service} size=\"compact\" />\n <code className={style(\"reference\")}>{visibleReference}</code>\n </div>\n </div>\n <div className={style(\"freshness\")} data-rly-evidence-freshness={freshness}>\n <span className={style(\"conceptLabel\")}>Freshness</span>\n {freshnessStamp}\n </div>\n </div>\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n color: var(--rly-color-text-1);\n container-type: inline-size;\n display: grid;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header {\n align-items: start;\n display: flex;\n gap: var(--rly-space-20);\n justify-content: space-between;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .header > div {\n display: grid;\n gap: var(--rly-space-4);\n min-inline-size: var(--rly-space-0);\n }\n\n .eyebrow,\n .heading,\n .boundary,\n .confirmationHelp {\n margin: var(--rly-space-0);\n }\n\n .eyebrow,\n .reviewer > span,\n .facts dt,\n .evidence h3,\n .outcome h3 {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n text-transform: uppercase;\n }\n\n .heading {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n overflow-wrap: break-word;\n }\n\n .proposalReference {\n color: var(--rly-color-text-2);\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n overflow-wrap: break-word;\n }\n\n .boundary {\n border-block: 1px solid var(--rly-color-border-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .reviewer {\n align-items: start;\n display: grid;\n gap: var(--rly-space-8);\n padding: var(--rly-space-20);\n }\n\n .facts {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n }\n\n .facts > div {\n display: grid;\n gap: var(--rly-space-8);\n /* One bounded track, so a revision hash wraps inside the cell instead of widening it. */\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .facts > div:nth-child(2n) {\n border-inline-start: 1px solid var(--rly-color-border-1);\n }\n\n .facts > div:nth-child(n + 3) {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .facts dt,\n .facts dd,\n .evidence h3,\n .outcome h3 {\n margin: var(--rly-space-0);\n }\n\n .facts dd {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .evidence,\n .decision,\n .outcome {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-20);\n }\n\n .evidence ul {\n display: grid;\n list-style: none;\n margin: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .evidence li {\n align-items: baseline;\n display: grid;\n gap: var(--rly-space-8);\n grid-template-columns: minmax(var(--rly-space-0), 1fr) minmax(var(--rly-space-0), 1.4fr);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-8);\n }\n\n .evidence li + li {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .evidence code {\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n overflow-wrap: break-word;\n }\n\n .confirmation {\n align-items: start;\n cursor: pointer;\n display: grid;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n gap: var(--rly-space-12);\n grid-template-columns: var(--rly-space-24) minmax(var(--rly-space-0), 1fr);\n }\n\n .confirmation input {\n accent-color: var(--rly-color-action-background);\n block-size: var(--rly-space-20);\n inline-size: var(--rly-space-20);\n margin: var(--rly-space-2) var(--rly-space-0) var(--rly-space-0);\n }\n\n .confirmation input:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n outline-offset: var(--rly-focus-ring-offset);\n }\n\n .confirmationHelp,\n .evidence,\n .outcome {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-12);\n justify-content: flex-end;\n }\n\n @container (max-width: 28rem) {\n .header {\n align-items: stretch;\n flex-direction: column;\n }\n\n .facts {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .facts > div:nth-child(2n) {\n border-inline-start: 0;\n }\n\n .facts > div + div {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .evidence li {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .actions {\n display: grid;\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .actions > * {\n inline-size: 100%;\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { Button } from \"../primitives/Button.js\"\nimport { StateLabel, type RlyStateTone } from \"../primitives/StateLabel.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { type RlyAgentProposal, validateAgentProposal } from \"./AgentProposal.js\"\nimport { Person, type RlyPerson } from \"./Person.js\"\nimport styles from \"./GovernedActionReview.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Caller-owned lifecycle of one governed action review. */\nexport type RlyGovernedActionState =\n \"pending\" | \"rejected\" | \"authorized\" | \"executing\" | \"succeeded\" | \"failed\" | \"cancelled\"\n\n/** Props for a controlled human authorization review. */\nexport type GovernedActionReviewProps = Omit<ComponentPropsWithRef<\"section\">, \"children\"> & {\n readonly authorizeLabel?: string\n readonly confirmationLabel: string\n readonly isConfirmed: boolean\n readonly onAuthorize: () => void\n readonly onConfirmationChange: (confirmed: boolean) => void\n readonly onReject: () => void\n readonly outcome: ReactNode\n readonly proposal: RlyAgentProposal\n readonly rejectLabel?: string\n readonly reviewer: RlyPerson\n readonly state: RlyGovernedActionState\n}\n\nconst statePresentation = {\n pending: { label: \"Awaiting human decision\", tone: \"caution\" },\n rejected: { label: \"Rejected by human reviewer\", tone: \"critical\" },\n authorized: { label: \"Authorized by human reviewer\", tone: \"positive\" },\n executing: { label: \"Authorized action executing\", tone: \"progress\" },\n succeeded: { label: \"Authorized action succeeded\", tone: \"positive\" },\n failed: { label: \"Authorized action failed\", tone: \"critical\" },\n cancelled: { label: \"Authorized action cancelled\", tone: \"neutral\" }\n} satisfies Readonly<Record<RlyGovernedActionState, { readonly label: string; readonly tone: RlyStateTone }>>\n\n/** Render a human decision gate without executing the proposed provider action. */\nexport const GovernedActionReview = ({\n authorizeLabel = \"Authorize exact action\",\n className,\n confirmationLabel,\n isConfirmed,\n onAuthorize,\n onConfirmationChange,\n onReject,\n outcome,\n proposal: suppliedProposal,\n rejectLabel = \"Reject proposal\",\n reviewer,\n state,\n ...props\n}: GovernedActionReviewProps): ReactElement => {\n const proposal = validateAgentProposal(suppliedProposal)\n const visibleAuthorizeLabel = requireText(authorizeLabel, \"GovernedActionReview authorizeLabel\")\n const visibleConfirmationLabel = requireText(confirmationLabel, \"GovernedActionReview confirmationLabel\")\n const visibleRejectLabel = requireText(rejectLabel, \"GovernedActionReview rejectLabel\")\n requireText(reviewer.id, \"GovernedActionReview reviewer id\")\n requireText(reviewer.name, \"GovernedActionReview reviewer name\")\n requireText(reviewer.role, \"GovernedActionReview reviewer role\")\n const headingId = `rly-governed-action-${useId()}`\n const referenceId = `rly-governed-action-reference-${useId()}`\n const confirmationId = `rly-governed-confirmation-${useId()}`\n const presentedState = statePresentation[state]\n\n const authorize = (): void => {\n if (state === \"pending\" && isConfirmed) onAuthorize()\n }\n\n return (\n <section\n {...props}\n aria-labelledby={`${headingId} ${referenceId}`}\n className={classNames(style(\"root\"), className)}\n data-rly-governed-action-state={state}\n >\n <header className={style(\"header\")}>\n <div>\n <p className={style(\"eyebrow\")}>Human authorization</p>\n <h2 className={style(\"heading\")} id={headingId}>\n Review exact proposed action\n </h2>\n <code className={style(\"proposalReference\")} id={referenceId}>\n {proposal.id}\n </code>\n </div>\n <StateLabel label={presentedState.label} tone={presentedState.tone} />\n </header>\n\n <p className={style(\"boundary\")}>\n The agent proposed this action. Only the named human reviewer can authorize it.\n </p>\n\n <div className={style(\"reviewer\")}>\n <span>Human reviewer</span>\n <Person person={reviewer} />\n </div>\n\n <dl className={style(\"facts\")}>\n <div>\n <dt>Proposal</dt>\n <dd>{proposal.capability}</dd>\n </div>\n <div>\n <dt>Target</dt>\n <dd>{proposal.target}</dd>\n </div>\n <div>\n <dt>Expected revision</dt>\n <dd>{proposal.expectedRevision}</dd>\n </div>\n <div>\n <dt>Impact</dt>\n <dd>{proposal.impact}</dd>\n </div>\n </dl>\n\n <div className={style(\"evidence\")} data-rly-governed-action-evidence=\"\">\n <h3>Evidence reviewed before decision</h3>\n <ul>\n {proposal.evidence.map((evidence) => (\n <li key={evidence.id}>\n <span>{evidence.label}</span>\n <code>{evidence.reference}</code>\n </li>\n ))}\n </ul>\n </div>\n\n {state === \"pending\" ? (\n <form className={style(\"decision\")} onSubmit={(event) => event.preventDefault()}>\n <label className={style(\"confirmation\")} htmlFor={confirmationId}>\n <input\n checked={isConfirmed}\n id={confirmationId}\n onChange={(event) => onConfirmationChange(event.currentTarget.checked)}\n type=\"checkbox\"\n />\n <span>{visibleConfirmationLabel}</span>\n </label>\n <p className={style(\"confirmationHelp\")}>\n Confirm the exact proposal, target, revision, impact, and evidence above.\n </p>\n <div className={style(\"actions\")}>\n <Button onClick={onReject} variant=\"secondary\">\n {visibleRejectLabel}\n </Button>\n <Button disabled={!isConfirmed} onClick={authorize} variant=\"primary\">\n {visibleAuthorizeLabel}\n </Button>\n </div>\n </form>\n ) : null}\n\n <div className={style(\"outcome\")} data-rly-governed-action-outcome=\"\">\n <h3>Recorded outcome</h3>\n {outcome}\n </div>\n </section>\n )\n}\n","@layer rly.components {\n .root {\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-4);\n min-inline-size: var(--rly-space-0);\n }\n\n .fact {\n margin: var(--rly-space-0);\n }\n\n .caption {\n color: var(--rly-color-text-2);\n margin: var(--rly-space-0);\n max-inline-size: 62ch;\n }\n\n .heading .fact {\n font: var(--rly-type-section-title-weight) var(--rly-type-section-title-size) /\n var(--rly-type-section-title-line-height) var(--rly-type-section-title-font);\n letter-spacing: var(--rly-type-section-title-tracking);\n }\n\n .heading .caption {\n font: var(--rly-type-body-large-weight) var(--rly-type-body-large-size) / var(--rly-type-body-large-line-height)\n var(--rly-type-body-large-font);\n }\n\n .line .text {\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n }\n\n .line .fact {\n font-weight: var(--rly-type-card-title-weight);\n }\n\n .display .fact {\n font: var(--rly-type-page-title-weight) var(--rly-type-page-title-size) / var(--rly-type-page-title-line-height)\n var(--rly-type-page-title-font);\n letter-spacing: var(--rly-type-page-title-tracking);\n }\n\n .display .caption {\n font: var(--rly-type-body-large-weight) var(--rly-type-body-large-size) / var(--rly-type-body-large-line-height)\n var(--rly-type-body-large-font);\n }\n\n .word {\n font-weight: inherit;\n }\n\n .blocked {\n color: var(--rly-color-blocked-ink);\n }\n\n .held {\n color: var(--rly-color-held-ink);\n }\n\n /*\n * Forced colours drop the state ink, and the word already inherits the sentence's weight, so\n * underline it to keep it distinct. The same rule applies under the Storybook toolbar's mode.\n */\n @media (forced-colors: active) {\n .blocked,\n .held {\n text-decoration: underline;\n text-decoration-thickness: var(--rly-space-2);\n text-underline-offset: var(--rly-space-4);\n }\n }\n\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .blocked,\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .held {\n text-decoration: underline;\n text-decoration-thickness: var(--rly-space-2);\n text-underline-offset: var(--rly-space-4);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement, ReactNode } from \"react\"\nimport { classNames, cssClass, defineVariants } from \"../internal/component.js\"\nimport styles from \"./Hero.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable size choices for a Hero. */\nexport const RLY_HERO_VARIANTS = defineVariants({\n size: {\n heading: {\n className: style(\"heading\"),\n purpose: \"The page's one fact as a sentence at heading size, with its caption below\",\n tokens: [\"type-card-title-size\", \"color-text-1\", \"color-text-2\"]\n },\n line: {\n className: style(\"line\"),\n purpose: \"The same fact folded to one line, when a detail with its own figure sits beside the list\",\n tokens: [\"type-body-size\", \"color-text-1\", \"color-text-2\"]\n },\n display: {\n className: style(\"display\"),\n purpose: \"Read from across a room (a wall or desk board); not for ordinary screens\",\n tokens: [\"type-page-title-size\", \"color-text-1\", \"color-text-2\"]\n }\n }\n})\n\n/** Default Hero size. */\nexport const RLY_HERO_DEFAULT_VARIANTS = defineVariants({ size: \"heading\" })\n\n/** Hero size. Only one Hero per screen, and `display` only where it is read from a distance. */\nexport type RlyHeroSize = keyof typeof RLY_HERO_VARIANTS.size\n\n/** Ink for the one state word inside a hero sentence. */\nexport const RLY_HERO_WORD_VARIANTS = defineVariants({\n tone: {\n blocked: {\n className: style(\"blocked\"),\n purpose: \"Can't proceed, failed, or can't decide\",\n tokens: [\"color-blocked-ink\"]\n },\n held: {\n className: style(\"held\"),\n purpose: \"Degraded or waiting, but still working\",\n tokens: [\"color-held-ink\"]\n }\n }\n})\n\n/** State ink for {@link HeroWord}. */\nexport type RlyHeroWordTone = keyof typeof RLY_HERO_WORD_VARIANTS.tone\n\n/** Presentation-only Hero props. */\nexport type HeroProps = Omit<ComponentPropsWithRef<\"section\">, \"children\" | \"title\"> & {\n /** Supporting facts in secondary ink: what is next, what is missing, how old the reading is. */\n readonly caption?: ReactNode\n /** The one fact as a sentence, with its figure inside (\"3 goals need you, 2 blocked\"). */\n readonly fact: ReactNode\n /** Accessible name of the summary. Defaults to \"Summary\". */\n readonly label?: string\n /** Defaults to `heading`. */\n readonly size?: RlyHeroSize\n}\n\n/**\n * The fact a screen leads with, as one sentence in text ink with its figure inside it. State is\n * carried by a word (wrap it in {@link HeroWord}), never by a coloured display number. Unknown is\n * said, not shown as zero: pass \"Unknown\" or qualify the sentence.\n */\nexport const Hero = ({\n caption,\n className,\n fact,\n label = \"Summary\",\n size = RLY_HERO_DEFAULT_VARIANTS.size,\n ...props\n}: HeroProps): ReactElement => {\n const classes = classNames(style(\"root\"), RLY_HERO_VARIANTS.size[size].className, className)\n if (size === \"line\") {\n return (\n <section {...props} aria-label={label} className={classes} data-rly-hero=\"\">\n <p className={style(\"text\")}>\n <strong className={style(\"fact\")}>{fact}</strong>\n {caption === undefined ? null : (\n <>\n {\" \"}\n <span className={style(\"caption\")}>{caption}</span>\n </>\n )}\n </p>\n </section>\n )\n }\n return (\n <section {...props} aria-label={label} className={classes} data-rly-hero=\"\">\n <p className={style(\"fact\")}>{fact}</p>\n {caption === undefined ? null : <p className={style(\"caption\")}>{caption}</p>}\n </section>\n )\n}\n\n/** Props for the one state word in a hero sentence. */\nexport type HeroWordProps = Omit<ComponentPropsWithRef<\"span\">, \"children\"> & {\n readonly children: string\n readonly tone: RlyHeroWordTone\n}\n\n/** The state word inside a hero sentence (\"Relay 2.4 is <HeroWord tone=\"blocked\">blocked</HeroWord>\"). */\nexport const HeroWord = ({ children, className, tone, ...props }: HeroWordProps): ReactElement => (\n <span {...props} className={classNames(style(\"word\"), RLY_HERO_WORD_VARIANTS.tone[tone].className, className)}>\n {children}\n </span>\n)\n","@layer rly.components {\n .root {\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-control);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n display: grid;\n /* One bounded track, so an unbreakable token in the title or body cannot widen the region. */\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto 1fr;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n /* Inherited by title and body: breaks only a token that cannot fit; words still wrap at spaces. */\n overflow-wrap: break-word;\n }\n\n .default {\n background: var(--rly-color-surface-1);\n }\n\n .tray {\n background: var(--rly-color-surface-2);\n }\n\n .header {\n align-items: center;\n border-block-end: 1px solid var(--rly-color-border-1);\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8) var(--rly-space-12);\n /*\n * Room for one dense (32px) header control plus padding, so headers line up across adjacent\n * regions. Switch to var(--rly-control-height-dense) once the de-template tokens land.\n */\n min-block-size: calc(var(--rly-space-32) + 2 * var(--rly-space-8));\n padding: var(--rly-space-8) var(--rly-space-16);\n }\n\n .title {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n margin-inline-end: auto;\n min-inline-size: var(--rly-space-0);\n }\n\n .title:focus-visible {\n border-radius: var(--rly-radius-tag);\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n outline-offset: var(--rly-focus-ring-offset);\n }\n\n .count {\n color: var(--rly-color-text-2);\n font-variant-numeric: tabular-nums;\n font-weight: 400;\n }\n\n .actions {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n }\n\n .body {\n display: grid;\n gap: var(--rly-space-16);\n grid-template-columns: minmax(0, 1fr);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16);\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./Region.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable surface choices for a Region. */\nexport const RLY_REGION_VARIANTS = defineVariants({\n tone: {\n default: {\n className: style(\"default\"),\n purpose: \"A main page region: list, detail or chart\",\n tokens: [\"color-surface-1\", \"color-border-1\"]\n },\n tray: {\n className: style(\"tray\"),\n purpose: \"A region holding individually actionable cards, one surface step down so the cards stand out\",\n tokens: [\"color-surface-2\", \"color-border-1\"]\n }\n }\n})\n\n/** Default Region surface. */\nexport const RLY_REGION_DEFAULT_VARIANTS = defineVariants({ tone: \"default\" })\n\n/** Surface step for a Region; it carries no state meaning. */\nexport type RlyRegionTone = keyof typeof RLY_REGION_VARIANTS.tone\n\n/** Heading level of the region title, within the page's outline. */\nexport type RlyRegionHeadingLevel = 2 | 3\n\n/** Presentation-only Region props. */\nexport type RegionProps = Omit<ComponentPropsWithRef<\"section\">, \"children\" | \"title\"> & {\n /** Controls at the end of the header row, such as a filter or \"Mark all read\". */\n readonly actions?: ReactNode\n readonly children: ReactNode\n /**\n * Plain count shown after the title in secondary ink, such as the number of rows. It is part of\n * the region's accessible name (\"Queue 3\"), so a screen reader hears the count when it lands on\n * the region.\n */\n readonly count?: number | string\n /** Heading level within the page outline. Defaults to 2. */\n readonly headingLevel?: RlyRegionHeadingLevel\n /**\n * Stable id for the heading, so a caller can move focus to it (for example when a list row\n * opens this region). The heading is focusable by script only.\n */\n readonly headingId?: string\n /** Required visible title in sentence case. */\n readonly title: string\n /** Surface step. Defaults to `default`. */\n readonly tone?: RlyRegionTone\n}\n\n/**\n * One main page region: a bordered surface with a single header row (title, plain count,\n * actions) above a rule, then the content. The section is named by its heading.\n *\n * Use one Region per main block (a queue, a detail, a chart); put titled sub-groups inside it\n * rather than nesting Regions. Cards belong only inside a `tray` Region.\n */\nexport const Region = ({\n actions,\n children,\n className,\n count,\n headingId,\n headingLevel = 2,\n title,\n tone = RLY_REGION_DEFAULT_VARIANTS.tone,\n ...props\n}: RegionProps): ReactElement => {\n const visibleTitle = requireText(title, \"Region title\")\n const generatedId = `rly-region-${useId()}`\n const id = headingId ?? generatedId\n const Heading = headingLevel === 3 ? \"h3\" : \"h2\"\n return (\n <section\n {...props}\n aria-labelledby={id}\n className={classNames(style(\"root\"), RLY_REGION_VARIANTS.tone[tone].className, className)}\n data-rly-region=\"\"\n >\n <header className={style(\"header\")}>\n <Heading className={style(\"title\")} id={id} tabIndex={-1}>\n {visibleTitle}\n {count === undefined ? null : (\n <>\n {\" \"}\n <span className={style(\"count\")}>{count}</span>\n </>\n )}\n </Heading>\n {actions === undefined ? null : <div className={style(\"actions\")}>{actions}</div>}\n </header>\n <div className={style(\"body\")}>{children}</div>\n </section>\n )\n}\n","import type { RlyIconName } from \"../foundations/Icon.js\"\nimport { requireText } from \"../internal/component.js\"\nimport type { RlyPerson } from \"./Person.js\"\nimport { RLY_SERVICE_MARK_VARIANTS, type RlyService } from \"./ServiceMark.js\"\n\n/** Lifecycle words supplied by an application presenter. */\nexport type RlyRelationshipLifecycle =\n | \"missing\"\n | \"inferred\"\n | \"proposed\"\n | \"verified\"\n | \"governed\"\n | \"rejected\"\n | \"superseded\"\n\n/** Direction supplied by an application presenter. */\nexport type RlyRelationshipDirection = \"forward\" | \"reverse\" | \"bidirectional\"\n\n/** A resolvable endpoint with complete visible identity. */\nexport interface RlyPresentRelationshipEndpoint {\n readonly state: \"present\"\n readonly id: string\n readonly title: string\n readonly reference: string\n readonly service: RlyService\n readonly href?: string\n readonly person?: RlyPerson\n}\n\n/** An explicit gap where an endpoint would otherwise be silently absent. */\nexport interface RlyMissingRelationshipEndpoint {\n readonly state: \"missing\"\n readonly label: string\n readonly reason: string\n readonly service?: RlyService\n}\n\n/** Presentation-only endpoint supplied without lookup or derivation. */\nexport type RlyRelationshipEndpoint = RlyPresentRelationshipEndpoint | RlyMissingRelationshipEndpoint\n\n/** One ordered, application-owned relationship record. */\nexport interface RlyRelationship {\n readonly id: string\n readonly kind: string\n readonly direction: RlyRelationshipDirection\n readonly lifecycle: RlyRelationshipLifecycle\n readonly source: RlyRelationshipEndpoint\n readonly target: RlyRelationshipEndpoint\n readonly evidence?: string\n readonly actor?: RlyPerson\n}\n\n/** Stable, color-independent lifecycle presentation. */\nexport const RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION = {\n missing: { icon: \"alert\", label: \"Missing\" },\n inferred: { icon: \"search\", label: \"Inferred\" },\n proposed: { icon: \"plus\", label: \"Proposed\" },\n verified: { icon: \"check\", label: \"Verified\" },\n governed: { icon: \"link\", label: \"Governed\" },\n rejected: { icon: \"close\", label: \"Rejected\" },\n superseded: { icon: \"arrow-right\", label: \"Superseded\" }\n} satisfies Readonly<Record<RlyRelationshipLifecycle, { readonly icon: RlyIconName; readonly label: string }>>\n\n/** Stable direction words and arrows; arrows never carry direction alone. */\nexport const RLY_RELATIONSHIP_DIRECTION_PRESENTATION = {\n forward: { arrow: \"→\", label: \"Forward\" },\n reverse: { arrow: \"←\", label: \"Reverse\" },\n bidirectional: { arrow: \"↔\", label: \"Bidirectional\" }\n} satisfies Readonly<Record<RlyRelationshipDirection, { readonly arrow: string; readonly label: string }>>\n\nconst validatePerson = (person: RlyPerson, context: string): void => {\n requireText(person.id, `${context} person id`)\n requireText(person.name, `${context} person name`)\n requireText(person.role, `${context} person role`)\n if (person.avatarFallback !== undefined) requireText(person.avatarFallback, `${context} person avatarFallback`)\n if (person.avatarSrc !== undefined) requireText(person.avatarSrc, `${context} person avatarSrc`)\n}\n\nconst validateService = (service: RlyService, context: string): void => {\n if (!Object.hasOwn(RLY_SERVICE_MARK_VARIANTS.service, service)) {\n throw new Error(`${context} service must be a supported rly service`)\n }\n}\n\nconst validateEndpoint = (endpoint: RlyRelationshipEndpoint, context: string): void => {\n if (endpoint.state === \"present\") {\n requireText(endpoint.id, `${context} id`)\n requireText(endpoint.title, `${context} title`)\n requireText(endpoint.reference, `${context} reference`)\n validateService(endpoint.service, context)\n if (endpoint.href !== undefined) requireText(endpoint.href, `${context} href`)\n if (endpoint.person !== undefined) validatePerson(endpoint.person, context)\n return\n }\n\n if (endpoint.state === \"missing\") {\n requireText(endpoint.label, `${context} missing label`)\n requireText(endpoint.reason, `${context} missing reason`)\n if (endpoint.service !== undefined) validateService(endpoint.service, context)\n return\n }\n\n throw new Error(`${context} state must be present or missing`)\n}\n\n/** Validate runtime data without sorting, grouping, or deriving domain meaning. */\nexport const validateRelationships = (relationships: ReadonlyArray<RlyRelationship>): void => {\n const ids = new Set<string>()\n for (const relationship of relationships) {\n const id = requireText(relationship.id, \"Relationship id\")\n if (ids.has(id)) throw new Error(`Relationship ids must be unique: ${id}`)\n ids.add(id)\n requireText(relationship.kind, `Relationship kind for ${id}`)\n if (!Object.hasOwn(RLY_RELATIONSHIP_DIRECTION_PRESENTATION, relationship.direction)) {\n throw new Error(`Relationship direction for ${id} must be supported`)\n }\n if (!Object.hasOwn(RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION, relationship.lifecycle)) {\n throw new Error(`Relationship lifecycle for ${id} must be supported`)\n }\n validateEndpoint(relationship.source, `Relationship ${id} source`)\n validateEndpoint(relationship.target, `Relationship ${id} target`)\n if (relationship.evidence !== undefined) requireText(relationship.evidence, `Relationship evidence for ${id}`)\n if (relationship.actor !== undefined) validatePerson(relationship.actor, `Relationship ${id} actor`)\n }\n}\n","@layer rly.components {\n .root {\n container-type: inline-size;\n display: grid;\n gap: var(--rly-space-16);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .heading {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .empty {\n border-block-start: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n padding-block-start: var(--rly-space-16);\n }\n\n .list {\n display: grid;\n gap: var(--rly-space-12);\n list-style: none;\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .item {\n align-items: stretch;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-control);\n display: grid;\n gap: var(--rly-space-12);\n /* The relation column fits its words (\"Implemented by\"), so a phrase never wraps mid-way. */\n grid-template-columns: minmax(var(--rly-space-0), 1fr) max-content minmax(var(--rly-space-0), 1fr);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-12);\n }\n\n .endpoint {\n align-content: start;\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .endpointLink,\n .identity,\n .missingIdentity {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .endpointLink {\n border-radius: var(--rly-radius-tag);\n color: inherit;\n outline-offset: var(--rly-focus-ring-offset);\n text-decoration-color: var(--rly-color-border-2);\n text-underline-offset: var(--rly-space-2);\n }\n\n .endpointLink:hover {\n text-decoration-color: currentcolor;\n }\n\n .endpointLink:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n }\n\n .title,\n .missingLabel,\n .kind {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .reference,\n .direction,\n .evidence,\n .fieldLabel {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .missingEndpoint {\n border: 1px dashed var(--rly-color-border-2);\n border-radius: var(--rly-radius-field);\n padding: var(--rly-space-8);\n }\n\n .missingLabel {\n align-items: center;\n display: flex;\n gap: var(--rly-space-6);\n }\n\n .relationship {\n align-content: center;\n align-items: center;\n border-inline: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-6);\n justify-items: center;\n min-inline-size: var(--rly-space-0);\n padding-inline: var(--rly-space-8);\n text-align: center;\n }\n\n .direction {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-4);\n justify-content: center;\n }\n\n .arrow {\n color: var(--rly-color-text-1);\n font-size: 1rem;\n }\n\n .actor {\n display: grid;\n gap: var(--rly-space-4);\n justify-items: start;\n min-inline-size: var(--rly-space-0);\n text-align: start;\n }\n\n .fieldLabel {\n font-weight: 650;\n text-transform: uppercase;\n }\n\n .evidence {\n display: grid;\n gap: var(--rly-space-4);\n grid-column: 1 / -1;\n grid-template-columns: 7rem minmax(var(--rly-space-0), 1fr);\n margin: var(--rly-space-0);\n padding-block-start: var(--rly-space-8);\n }\n\n @container (max-width: 30rem) {\n .item {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .relationship {\n border-block: 1px solid var(--rly-color-border-1);\n border-inline: 0;\n justify-items: start;\n padding-block: var(--rly-space-12);\n padding-inline: var(--rly-space-0);\n text-align: start;\n }\n\n .direction {\n justify-content: flex-start;\n }\n\n .evidence {\n grid-column: auto;\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n }\n}\n","import { useId, type ComponentPropsWithRef, type ReactElement } from \"react\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { RlyLink } from \"../foundations/LinkProvider.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { StateLabel } from \"../primitives/StateLabel.js\"\nimport { Person } from \"./Person.js\"\nimport {\n RLY_RELATIONSHIP_DIRECTION_PRESENTATION,\n RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION,\n type RlyRelationship,\n type RlyRelationshipEndpoint,\n validateRelationships\n} from \"./Relationship.js\"\nimport { ServiceMark } from \"./ServiceMark.js\"\nimport styles from \"./RelationshipChain.module.css\"\n\nexport { RLY_RELATIONSHIP_DIRECTION_PRESENTATION, RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION } from \"./Relationship.js\"\nexport type {\n RlyMissingRelationshipEndpoint,\n RlyPresentRelationshipEndpoint,\n RlyRelationship,\n RlyRelationshipDirection,\n RlyRelationshipEndpoint,\n RlyRelationshipLifecycle\n} from \"./Relationship.js\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Props shared in meaning and order with RelationshipTable. */\nexport type RelationshipChainProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly relationships: ReadonlyArray<RlyRelationship>\n readonly heading: string\n readonly emptyLabel?: string\n}\n\ninterface EndpointProps {\n readonly endpoint: RlyRelationshipEndpoint\n}\n\nconst Endpoint = ({ endpoint }: EndpointProps): ReactElement => {\n if (endpoint.state === \"missing\") {\n return (\n <div className={classNames(style(\"endpoint\"), style(\"missingEndpoint\"))} data-rly-endpoint-state=\"missing\">\n {endpoint.service === undefined ? null : <ServiceMark service={endpoint.service} size=\"compact\" />}\n <span className={style(\"missingIdentity\")}>\n <span className={style(\"missingLabel\")}>\n <Icon decorative name=\"alert\" size=\"small\" />\n {endpoint.label}\n </span>\n <span className={style(\"reference\")}>{endpoint.reason}</span>\n </span>\n </div>\n )\n }\n\n const identity = (\n <span className={style(\"identity\")}>\n <span className={style(\"title\")}>{endpoint.title}</span>\n <span className={style(\"reference\")}>{endpoint.reference}</span>\n </span>\n )\n\n return (\n <div className={style(\"endpoint\")} data-rly-endpoint-id={endpoint.id} data-rly-endpoint-state=\"present\">\n <ServiceMark service={endpoint.service} size=\"compact\" />\n {endpoint.href === undefined ? (\n identity\n ) : (\n <RlyLink className={style(\"endpointLink\")} href={endpoint.href}>\n {identity}\n </RlyLink>\n )}\n {endpoint.person === undefined ? null : <Person person={endpoint.person} size=\"compact\" />}\n </div>\n )\n}\n\n/** Render an ordered bird's-eye relationship rail without deriving or grouping records. */\nexport const RelationshipChain = ({\n className,\n emptyLabel = \"No relationships recorded.\",\n heading,\n relationships,\n ...props\n}: RelationshipChainProps): ReactElement => {\n const visibleHeading = requireText(heading, \"RelationshipChain heading\")\n const visibleEmptyLabel = requireText(emptyLabel, \"RelationshipChain emptyLabel\")\n validateRelationships(relationships)\n const headingId = `${useId()}-heading`\n\n return (\n <section {...props} aria-labelledby={headingId} className={classNames(style(\"root\"), className)}>\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n {relationships.length === 0 ? (\n <p className={style(\"empty\")}>{visibleEmptyLabel}</p>\n ) : (\n <ol className={style(\"list\")}>\n {relationships.map((relationship) => {\n const direction = RLY_RELATIONSHIP_DIRECTION_PRESENTATION[relationship.direction]\n const lifecycle = RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION[relationship.lifecycle]\n return (\n <li\n className={style(\"item\")}\n data-rly-relationship-id={relationship.id}\n data-rly-relationship-direction={relationship.direction}\n data-rly-relationship-kind={relationship.kind}\n data-rly-relationship-lifecycle={relationship.lifecycle}\n key={relationship.id}\n >\n <Endpoint endpoint={relationship.source} />\n <div className={style(\"relationship\")} data-rly-relationship-detail=\"\">\n <span className={style(\"direction\")}>\n <span>{direction.label}</span>\n <span aria-hidden=\"true\" className={style(\"arrow\")}>\n {direction.arrow}\n </span>\n </span>\n <span className={style(\"kind\")}>{relationship.kind}</span>\n <StateLabel icon={lifecycle.icon} label={lifecycle.label} size=\"compact\" tone=\"neutral\" />\n {relationship.actor === undefined ? null : (\n <div className={style(\"actor\")} data-rly-relationship-actor={relationship.actor.id}>\n <span className={style(\"fieldLabel\")}>Actor</span>\n <Person person={relationship.actor} size=\"compact\" />\n </div>\n )}\n </div>\n <Endpoint endpoint={relationship.target} />\n <p className={style(\"evidence\")}>\n <span className={style(\"fieldLabel\")}>Evidence</span>\n <span data-rly-relationship-evidence=\"\">{relationship.evidence ?? \"No evidence recorded.\"}</span>\n </p>\n </li>\n )\n })}\n </ol>\n )}\n </section>\n )\n}\n","@layer rly.components {\n .root {\n container-type: inline-size;\n display: grid;\n gap: var(--rly-space-16);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .heading {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .empty {\n border-block-start: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n padding-block-start: var(--rly-space-16);\n }\n\n .table {\n border-collapse: separate;\n border-spacing: var(--rly-space-0);\n inline-size: 100%;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n table-layout: fixed;\n }\n\n .head th {\n border-block-end: 1px solid var(--rly-color-border-2);\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n padding: var(--rly-space-8) var(--rly-space-12);\n text-align: start;\n text-transform: uppercase;\n }\n\n .head th:nth-child(1),\n .head th:nth-child(3) {\n inline-size: 28%;\n }\n\n /* The relation column never drops below its longest phrase (\"Implemented by\"). */\n .head th:nth-child(2) {\n inline-size: max(24%, 10rem);\n }\n\n .head th:nth-child(4) {\n inline-size: 20%;\n }\n\n .cell {\n border-block-end: 1px solid var(--rly-color-border-1);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-12);\n vertical-align: top;\n }\n\n .endpoint,\n .identity,\n .relationship,\n .actor {\n display: grid;\n gap: var(--rly-space-6);\n min-inline-size: var(--rly-space-0);\n }\n\n .endpointLink {\n border-radius: var(--rly-radius-tag);\n color: inherit;\n display: grid;\n min-inline-size: var(--rly-space-0);\n outline-offset: var(--rly-focus-ring-offset);\n text-decoration-color: var(--rly-color-border-2);\n text-underline-offset: var(--rly-space-2);\n }\n\n .endpointLink:hover {\n text-decoration-color: currentcolor;\n }\n\n .endpointLink:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n }\n\n .title,\n .missingLabel,\n .kind {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .reference,\n .direction,\n .evidence,\n .fieldLabel {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .missingEndpoint {\n border: 1px dashed var(--rly-color-border-2);\n border-radius: var(--rly-radius-field);\n padding: var(--rly-space-8);\n }\n\n .missingLabel,\n .direction {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-4);\n }\n\n .arrow {\n color: var(--rly-color-text-1);\n font-size: 1rem;\n }\n\n .fieldLabel {\n font-weight: 650;\n text-transform: uppercase;\n }\n\n @container (max-width: 30rem) {\n .table,\n .body {\n display: block;\n }\n\n .head {\n block-size: 1px;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n inline-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n }\n\n .body {\n display: grid;\n gap: var(--rly-space-12);\n }\n\n .row {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-control);\n display: grid;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .cell {\n border-block-end: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-8);\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n inline-size: auto;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-12);\n }\n\n .cell:last-child {\n border-block-end: 0;\n }\n\n .cell::before {\n color: var(--rly-color-text-2);\n content: attr(data-label);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n font-weight: 650;\n overflow-wrap: break-word;\n text-transform: uppercase;\n }\n\n .endpoint,\n .relationship {\n min-inline-size: var(--rly-space-0);\n }\n }\n}\n","import { useId, type ComponentPropsWithRef, type ReactElement } from \"react\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { RlyLink } from \"../foundations/LinkProvider.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { StateLabel } from \"../primitives/StateLabel.js\"\nimport { Person } from \"./Person.js\"\nimport {\n RLY_RELATIONSHIP_DIRECTION_PRESENTATION,\n RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION,\n type RlyRelationship,\n type RlyRelationshipEndpoint,\n validateRelationships\n} from \"./Relationship.js\"\nimport { ServiceMark } from \"./ServiceMark.js\"\nimport styles from \"./RelationshipTable.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Props semantically equivalent to RelationshipChain. */\nexport type RelationshipTableProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly relationships: ReadonlyArray<RlyRelationship>\n readonly heading: string\n readonly emptyLabel?: string\n}\n\ninterface EndpointProps {\n readonly endpoint: RlyRelationshipEndpoint\n}\n\nconst Endpoint = ({ endpoint }: EndpointProps): ReactElement => {\n if (endpoint.state === \"missing\") {\n return (\n <div className={classNames(style(\"endpoint\"), style(\"missingEndpoint\"))} data-rly-endpoint-state=\"missing\">\n {endpoint.service === undefined ? null : <ServiceMark service={endpoint.service} size=\"compact\" />}\n <span className={style(\"identity\")}>\n <span className={style(\"missingLabel\")}>\n <Icon decorative name=\"alert\" size=\"small\" />\n {endpoint.label}\n </span>\n <span className={style(\"reference\")}>{endpoint.reason}</span>\n </span>\n </div>\n )\n }\n\n const identity = (\n <span className={style(\"identity\")}>\n <span className={style(\"title\")}>{endpoint.title}</span>\n <span className={style(\"reference\")}>{endpoint.reference}</span>\n </span>\n )\n\n return (\n <div className={style(\"endpoint\")} data-rly-endpoint-id={endpoint.id} data-rly-endpoint-state=\"present\">\n <ServiceMark service={endpoint.service} size=\"compact\" />\n {endpoint.href === undefined ? (\n identity\n ) : (\n <RlyLink className={style(\"endpointLink\")} href={endpoint.href}>\n {identity}\n </RlyLink>\n )}\n {endpoint.person === undefined ? null : <Person person={endpoint.person} size=\"compact\" />}\n </div>\n )\n}\n\n/** Render the same ordered records as RelationshipChain in a scan-friendly native table. */\nexport const RelationshipTable = ({\n className,\n emptyLabel = \"No relationships recorded.\",\n heading,\n relationships,\n ...props\n}: RelationshipTableProps): ReactElement => {\n const visibleHeading = requireText(heading, \"RelationshipTable heading\")\n const visibleEmptyLabel = requireText(emptyLabel, \"RelationshipTable emptyLabel\")\n validateRelationships(relationships)\n const headingId = `${useId()}-heading`\n\n return (\n <section {...props} aria-labelledby={headingId} className={classNames(style(\"root\"), className)}>\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n {relationships.length === 0 ? (\n <p className={style(\"empty\")}>{visibleEmptyLabel}</p>\n ) : (\n <table aria-labelledby={headingId} className={style(\"table\")}>\n <thead className={style(\"head\")}>\n <tr>\n <th scope=\"col\">Source</th>\n <th scope=\"col\">Relationship</th>\n <th scope=\"col\">Target</th>\n <th scope=\"col\">Evidence</th>\n </tr>\n </thead>\n <tbody className={style(\"body\")}>\n {relationships.map((relationship) => {\n const direction = RLY_RELATIONSHIP_DIRECTION_PRESENTATION[relationship.direction]\n const lifecycle = RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION[relationship.lifecycle]\n return (\n <tr\n className={style(\"row\")}\n data-rly-relationship-id={relationship.id}\n data-rly-relationship-direction={relationship.direction}\n data-rly-relationship-kind={relationship.kind}\n data-rly-relationship-lifecycle={relationship.lifecycle}\n key={relationship.id}\n >\n <td className={style(\"cell\")} data-label=\"Source\">\n <Endpoint endpoint={relationship.source} />\n </td>\n <td className={style(\"cell\")} data-label=\"Relationship\">\n <div className={style(\"relationship\")} data-rly-relationship-detail=\"\">\n <span className={style(\"direction\")}>\n <span>{direction.label}</span>\n <span aria-hidden=\"true\" className={style(\"arrow\")}>\n {direction.arrow}\n </span>\n </span>\n <span className={style(\"kind\")}>{relationship.kind}</span>\n <StateLabel icon={lifecycle.icon} label={lifecycle.label} size=\"compact\" tone=\"neutral\" />\n {relationship.actor === undefined ? null : (\n <div className={style(\"actor\")} data-rly-relationship-actor={relationship.actor.id}>\n <span className={style(\"fieldLabel\")}>Actor</span>\n <Person person={relationship.actor} size=\"compact\" />\n </div>\n )}\n </div>\n </td>\n <td className={style(\"cell\")} data-label=\"Target\">\n <Endpoint endpoint={relationship.target} />\n </td>\n <td className={style(\"cell\")} data-label=\"Evidence\">\n <span className={style(\"evidence\")} data-rly-relationship-evidence=\"\">\n {relationship.evidence ?? \"No evidence recorded.\"}\n </span>\n </td>\n </tr>\n )\n })}\n </tbody>\n </table>\n )}\n </section>\n )\n}\n","@layer rly.components {\n .root {\n position: relative;\n }\n\n .trigger,\n .close {\n align-items: center;\n appearance: none;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n color: var(--rly-color-text-1);\n cursor: pointer;\n display: inline-flex;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n justify-content: center;\n }\n\n .trigger {\n border-radius: var(--rly-radius-round);\n gap: var(--rly-space-8);\n min-block-size: var(--rly-space-40);\n padding: var(--rly-space-6) var(--rly-space-16) var(--rly-space-6) var(--rly-space-6);\n }\n\n .root[data-rly-relay-dock-open=\"true\"] > .trigger {\n visibility: hidden;\n }\n\n .trigger:hover,\n .close:hover {\n background: var(--rly-color-surface-2);\n }\n\n .trigger:active,\n .close:active {\n background: var(--rly-color-surface-3);\n }\n\n .mark {\n align-items: center;\n align-self: stretch;\n background: var(--rly-color-agent);\n border-radius: var(--rly-radius-round);\n color: var(--rly-color-surface-1);\n display: inline-flex;\n inline-size: var(--rly-space-32);\n justify-content: center;\n overflow: hidden;\n position: relative;\n }\n\n .markLine {\n background: currentcolor;\n block-size: 100%;\n inline-size: var(--rly-space-2); /* stripe-ok: a stroke inside the 32px Relay mark glyph */\n inset-inline-start: var(--rly-space-6);\n opacity: 0.42;\n position: absolute;\n }\n\n .markGlyph {\n block-size: var(--rly-space-16);\n inline-size: var(--rly-space-16);\n position: relative;\n }\n\n .layer {\n inset: var(--rly-space-0);\n pointer-events: none;\n position: fixed;\n z-index: 90;\n }\n\n .layer[data-rly-relay-dock-modal=\"true\"] {\n z-index: 100;\n }\n\n .overlay {\n background: var(--rly-color-text-1);\n inset: var(--rly-space-0);\n opacity: 0.3;\n pointer-events: auto;\n position: fixed;\n }\n\n .panel {\n background: var(--rly-color-surface-1);\n block-size: 100vh;\n block-size: 100dvh;\n color: var(--rly-color-text-1);\n display: flex;\n flex-direction: column;\n inset-block: var(--rly-space-0);\n inset-inline-end: var(--rly-space-0);\n overflow: hidden;\n padding-block-end: env(safe-area-inset-bottom, 0px);\n padding-block-start: env(safe-area-inset-top, 0px);\n pointer-events: auto;\n position: fixed;\n }\n\n .sheet {\n inline-size: min(92vw, 34rem);\n max-inline-size: 34rem;\n }\n\n .rail {\n border-inline-start: 1px solid var(--rly-color-border-1);\n box-shadow: -12px 0 32px color-mix(in srgb, var(--rly-color-text-1) 8%, transparent);\n inline-size: min(38vw, 30rem);\n min-inline-size: 24rem;\n }\n\n .railHeader {\n align-items: flex-start;\n border-block-end: 1px solid var(--rly-color-border-1);\n display: flex;\n flex: none;\n gap: var(--rly-space-16);\n justify-content: space-between;\n padding: var(--rly-space-20) var(--rly-space-24);\n }\n\n .railHeading {\n display: grid;\n gap: var(--rly-space-6);\n min-inline-size: var(--rly-space-0);\n }\n\n .title {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n }\n\n .description {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n }\n\n .close {\n border-radius: var(--rly-radius-field);\n flex: none;\n min-block-size: var(--rly-space-40);\n min-inline-size: var(--rly-space-40);\n padding: var(--rly-space-8);\n }\n\n .fixedContext {\n background: var(--rly-color-surface-1);\n border-block-end: 1px solid var(--rly-color-border-1);\n display: grid;\n flex: none;\n gap: var(--rly-space-16);\n padding: var(--rly-space-16) var(--rly-space-24) var(--rly-space-20);\n }\n\n .contents {\n display: contents;\n }\n\n .context,\n .selection {\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .sectionLabel {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n letter-spacing: var(--rly-type-meta-tracking);\n margin: var(--rly-space-0);\n text-transform: uppercase;\n }\n\n .chipList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-6);\n list-style: none;\n margin: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .chip {\n align-items: baseline;\n background: var(--rly-color-surface-2);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-tag);\n display: inline-flex;\n gap: var(--rly-space-6);\n max-inline-size: 100%;\n padding: var(--rly-space-4) var(--rly-space-8);\n }\n\n .chipLabel,\n .chipValue {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .chipLabel {\n color: var(--rly-color-text-2);\n }\n\n .chipValue {\n color: var(--rly-color-text-1);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .selectionGrid {\n display: grid;\n gap: var(--rly-space-12);\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n }\n\n .body {\n flex: 1 1 auto;\n min-block-size: var(--rly-space-0);\n overflow: auto;\n overscroll-behavior: contain;\n padding: var(--rly-space-24);\n }\n\n .ready,\n .state {\n min-inline-size: var(--rly-space-0);\n }\n\n .footer {\n background: var(--rly-color-surface-1);\n border-block-start: 1px solid var(--rly-color-border-1);\n flex: none;\n padding: var(--rly-space-16) var(--rly-space-24);\n }\n\n @media (max-width: 40rem), (max-height: 40rem) and (pointer: coarse) {\n .sheet {\n block-size: 100vh;\n block-size: 100dvh;\n border: var(--rly-space-0);\n border-radius: var(--rly-space-0);\n inline-size: 100vw;\n max-inline-size: none;\n }\n\n .sheet > :first-child,\n .fixedContext,\n .footer {\n padding-inline: max(var(--rly-space-16), env(safe-area-inset-left, 0px))\n max(var(--rly-space-16), env(safe-area-inset-right, 0px));\n }\n\n .body {\n padding-inline: max(var(--rly-space-16), env(safe-area-inset-left, 0px))\n max(var(--rly-space-16), env(safe-area-inset-right, 0px));\n }\n\n .selectionGrid {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n }\n\n @media (max-width: 40rem) and (max-height: 40rem), (max-height: 40rem) and (pointer: coarse) {\n .sheet .contents {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-block-size: var(--rly-space-0);\n overflow-y: auto;\n overscroll-behavior: contain;\n }\n\n .sheet .body {\n flex: none;\n min-block-size: var(--rly-space-64);\n overflow: visible;\n }\n }\n}\n","import {\n type ComponentPropsWithRef,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n useSyncExternalStore\n} from \"react\"\nimport { Portal as RadixPortal } from \"radix-ui\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { PortalBoundary, usePortalTarget } from \"../foundations/PortalProvider.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport * as Predicate from \"../internal/predicates.js\"\nimport {\n invalidateModalFocusRestore,\n isHTMLElement,\n ModalNestingBoundary,\n restoreModalFocusAfterCleanup,\n useModalContentRegistration,\n useModalIsolation,\n useParentModalPresent,\n useParentModalReady,\n useModalScrollLock\n} from \"../internal/modal.js\"\nimport { Field } from \"../primitives/Field.js\"\nimport { Select, type RlySelectOption } from \"../primitives/Select.js\"\nimport { StatePanel } from \"../primitives/StatePanel.js\"\nimport styles from \"./RelayDock.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\nconst compactViewportQuery = \"(max-width: 40rem), (max-height: 40rem) and (pointer: coarse)\"\nconst focusableSelector = [\n \"a[href]\",\n \"button:not([disabled])\",\n 'iframe:not([tabindex=\"-1\"])',\n \"input:not([disabled])\",\n \"select:not([disabled])\",\n \"details > summary:first-of-type\",\n \"textarea:not([disabled])\",\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[tabindex]:not([tabindex=\"-1\"])'\n].join(\",\")\nconst fieldsetDisabledSelector = \"button, fieldset, input, object, optgroup, option, output, select, textarea\"\n\nconst hasActiveElement = (node: Node): node is Node & DocumentOrShadowRoot => \"activeElement\" in node\n\ninterface ShadowRootHost extends Node {\n readonly host: Element\n}\n\nconst hasShadowRootHost = (value: Node): value is ShadowRootHost =>\n \"host\" in value && Predicate.isObjectOrArray(value.host)\n\nconst deepActiveElement = (root: DocumentOrShadowRoot): Element | null => {\n const active = root.activeElement\n if (active === null) return null\n if (active.shadowRoot !== null) return deepActiveElement(active.shadowRoot) ?? active\n return active\n}\n\nconst activeElementFor = (panel: HTMLElement): Element | null => {\n const root = panel.getRootNode()\n return hasActiveElement(root) ? deepActiveElement(root) : panel.ownerDocument.activeElement\n}\n\nconst shadowHostFor = (node: Node): HTMLElement | null => {\n const root = node.getRootNode()\n if (!hasShadowRootHost(root)) return null\n return isHTMLElement(root.host) ? root.host : null\n}\n\ninterface AssignedSlotNode extends Node {\n readonly assignedSlot: HTMLSlotElement | null\n}\n\nconst hasAssignedSlot = (node: Node): node is AssignedSlotNode => \"assignedSlot\" in node\n\nconst isElementNode = (node: Node): node is Element => node.nodeType === 1\n\nconst composedParentFor = (node: Node, composedParents?: ReadonlyMap<Node, Node | null>): Element | null => {\n if (composedParents !== undefined && composedParents.has(node)) {\n const parent = composedParents.get(node)\n return parent !== null && parent !== undefined && isElementNode(parent) ? parent : null\n }\n const assignedSlot = hasAssignedSlot(node) ? node.assignedSlot : null\n return assignedSlot ?? node.parentElement ?? shadowHostFor(node)\n}\n\nconst isWithinComposedElement = (\n ancestor: Element,\n descendant: Node | null,\n composedParents?: ReadonlyMap<Node, Node | null>\n): boolean => {\n if (descendant === null) return false\n if (ancestor.contains(descendant)) return true\n const seen = new Set<Node>()\n let current: Node = descendant\n while (!seen.has(current)) {\n seen.add(current)\n const parent = composedParentFor(current, composedParents)\n if (parent === null) return false\n if (parent === ancestor || ancestor.contains(parent)) return true\n current = parent\n }\n return false\n}\n\nconst isWithinPanel = (panel: HTMLElement, active: Element | null): boolean => isWithinComposedElement(panel, active)\n\nconst deepActiveHTMLElement = (root: DocumentOrShadowRoot): HTMLElement | null => {\n const active = root.activeElement\n if (!isHTMLElement(active)) return null\n return active.shadowRoot === null ? active : (deepActiveHTMLElement(active.shadowRoot) ?? active)\n}\n\nconst focusRestoreTarget = (ownerDocument: Document): HTMLElement | null => {\n const active = deepActiveHTMLElement(ownerDocument)\n return active === ownerDocument.body || active === ownerDocument.documentElement ? null : active\n}\n\nconst isRenderedFocusable = (element: Element, composedParents?: ReadonlyMap<Node, Node | null>): boolean => {\n if (element.matches(\":disabled\")) return false\n const view = element.ownerDocument.defaultView\n if (view === null) return !isHTMLElement(element) || element.hidden === false\n const visibility = view.getComputedStyle(element).visibility\n if (visibility === \"hidden\" || visibility === \"collapse\") return false\n let current: Element | null = element\n while (current !== null) {\n if (isHTMLElement(current) && current.inert) return false\n if (current.tagName === \"DETAILS\" && !current.hasAttribute(\"open\")) {\n const firstSummary: HTMLElement | null = current.querySelector(\":scope > summary:first-of-type\")\n if (firstSummary === null || !isWithinComposedElement(firstSummary, element, composedParents)) return false\n }\n if (\n current !== element &&\n current.tagName === \"FIELDSET\" &&\n current.hasAttribute(\"disabled\") &&\n element.matches(fieldsetDisabledSelector)\n ) {\n const firstLegend: HTMLElement | null = current.querySelector(\":scope > legend:first-of-type\")\n if (firstLegend === null || !isWithinComposedElement(firstLegend, element, composedParents)) return false\n }\n const computed = view.getComputedStyle(current)\n if (\n (isHTMLElement(current) && current.hidden !== false) ||\n computed.display === \"none\" ||\n (current === element && computed.display === \"contents\") ||\n (current !== element && computed.contentVisibility === \"hidden\")\n ) {\n return false\n }\n current = composedParentFor(current, composedParents)\n }\n return true\n}\n\nconst hasContentEditableAncestor = (element: HTMLElement, composedParents: ReadonlyMap<Node, Node | null>): boolean => {\n const nativeRoot = element.getRootNode()\n const seen = new Set<Node>()\n let current = composedParentFor(element, composedParents)\n while (current !== null && !seen.has(current)) {\n seen.add(current)\n if (current.getRootNode() !== nativeRoot) return false\n if (isHTMLElement(current) && current.isContentEditable) return true\n current = composedParentFor(current, composedParents)\n }\n return false\n}\n\ninterface RadioInput extends HTMLElement {\n readonly checked: boolean\n readonly form: HTMLFormElement | null\n readonly name: string\n}\n\nconst isRadioInput = (element: Element): element is RadioInput =>\n isHTMLElement(element) && element.tagName === \"INPUT\" && element.getAttribute(\"type\")?.toLowerCase() === \"radio\"\n\ninterface ComposedElement {\n readonly composedParent: Node | null\n readonly element: Element\n readonly focusScope: ParentNode\n readonly nativeRoot: Node\n}\n\ninterface TabIndexedElement extends Element {\n readonly focus: (options?: FocusOptions) => void\n readonly tabIndex: number\n}\n\nconst hasTabIndexProperty = (element: Element): element is TabIndexedElement =>\n \"tabIndex\" in element && Predicate.isNumber(element.tabIndex)\n\nconst svgNamespace = \"http://www.w3.org/2000/svg\"\n\nconst tabIndexFor = (element: Element): number | null => {\n if (element.namespaceURI === svgNamespace && element.localName === \"a\" && element.hasAttribute(\"href\")) {\n const attribute = element.getAttribute(\"tabindex\")\n if (attribute === null) return 0\n const parsed = Number.parseInt(attribute, 10)\n return Number.isNaN(parsed) ? 0 : parsed\n }\n return hasTabIndexProperty(element) ? element.tabIndex : null\n}\n\ninterface SlotElement extends Element {\n readonly assignedNodes: (options?: { readonly flatten?: boolean }) => Array<Node>\n readonly assignedElements: (options?: { readonly flatten?: boolean }) => Array<Element>\n}\n\nconst isSlotElement = (element: Element): element is SlotElement =>\n element.tagName === \"SLOT\" && \"assignedElements\" in element\n\nconst isShadowSlotElement = (element: Element): element is SlotElement =>\n isSlotElement(element) && hasShadowRootHost(element.getRootNode())\n\nconst compareSequentialTabOrder = (left: Element, right: Element): number => {\n const leftTabIndex = tabIndexFor(left) ?? -1\n const rightTabIndex = tabIndexFor(right) ?? -1\n const leftPositive = leftTabIndex > 0\n const rightPositive = rightTabIndex > 0\n if (leftPositive !== rightPositive) return leftPositive ? -1 : 1\n if (leftPositive && rightPositive && leftTabIndex !== rightTabIndex) return leftTabIndex - rightTabIndex\n return 0\n}\n\nconst hasExplicitNegativeTabIndex = (element: Element): boolean => {\n const tabIndex = tabIndexFor(element)\n return tabIndex !== null && element.hasAttribute(\"tabindex\") && tabIndex < 0\n}\n\nconst ownsNegativeFocusScope = (element: Element): boolean =>\n hasExplicitNegativeTabIndex(element) &&\n (isSlotElement(element) || (isHTMLElement(element) && element.shadowRoot?.delegatesFocus === true))\n\nconst isSequentiallyFocusableRadio = (\n element: RadioInput,\n nativeRoot: Node,\n elements: ReadonlyArray<ComposedElement>,\n composedParents: ReadonlyMap<Node, Node | null>\n): boolean => {\n if (element.name.length === 0) return true\n const group = elements\n .filter(\n ({ element: candidate, nativeRoot: candidateRoot }) =>\n candidateRoot === nativeRoot &&\n isRadioInput(candidate) &&\n candidate.name === element.name &&\n candidate.form === element.form &&\n isRenderedFocusable(candidate, composedParents)\n )\n .map(({ element: candidate }) => candidate)\n .filter(isRadioInput)\n const checked = group.find((candidate) => candidate.checked)\n return checked === undefined ? element.tabIndex >= 0 : checked === element\n}\n\ninterface ScopeTraversal {\n readonly entries: ReadonlyArray<ComposedElement>\n readonly nested: ReadonlyMap<Element, ScopeTraversal>\n}\n\nconst composedElementsInScope = (root: ParentNode): Array<ComposedElement> => {\n const visitScopeElements = (\n elements: ReadonlyArray<Element>,\n focusScope: ParentNode,\n composedParent: Node | null\n ): ScopeTraversal => {\n const entries: Array<ComposedElement> = []\n const nested = new Map<Element, ScopeTraversal>()\n const visitElement = (element: Element, parent: Node | null): void => {\n entries.push({ composedParent: parent, element, focusScope, nativeRoot: element.getRootNode() })\n if (isShadowSlotElement(element)) {\n const assignedNodes = element.assignedNodes({ flatten: false })\n const assignedElements = element.assignedElements({ flatten: false })\n const fallbackElements = [...element.children]\n nested.set(\n element,\n visitScopeElements(assignedNodes.length > 0 ? assignedElements : fallbackElements, element, element)\n )\n return\n }\n if (isSlotElement(element)) {\n nested.set(element, visitScopeElements([...element.children], element, element))\n return\n }\n if (\n element.shadowRoot !== null &&\n (!hasExplicitNegativeTabIndex(element) || element.shadowRoot.delegatesFocus === true)\n ) {\n nested.set(element, visitScope(element.shadowRoot, element.shadowRoot, element))\n } else if (element.shadowRoot === null) {\n for (const child of element.children) visitElement(child, element)\n }\n }\n for (const element of elements) visitElement(element, composedParent)\n return { entries, nested }\n }\n const visitScope = (scope: ParentNode, focusScope: ParentNode, composedParent: Node | null): ScopeTraversal =>\n visitScopeElements([...scope.children], focusScope, composedParent)\n const flattenScope = (scope: ScopeTraversal): Array<ComposedElement> => {\n const ordered = [...scope.entries].sort((left, right) => compareSequentialTabOrder(left.element, right.element))\n const flattened: Array<ComposedElement> = []\n for (const entry of ordered) {\n flattened.push(entry)\n const nested = scope.nested.get(entry.element)\n if (nested !== undefined) {\n for (const nestedEntry of flattenScope(nested)) flattened.push(nestedEntry)\n }\n }\n return flattened\n }\n return flattenScope(visitScope(root, root, root))\n}\n\nconst focusableElementsInScope = (\n panel: HTMLElement,\n composed: ReadonlyArray<ComposedElement>,\n composedParents: ReadonlyMap<Node, Node | null>\n): Array<TabIndexedElement> =>\n composed\n .filter((entry): entry is ComposedElement & { readonly element: TabIndexedElement } => {\n const { element, nativeRoot } = entry\n if (element.tagName === \"SLOT\") return false\n const tabIndex = tabIndexFor(element)\n if (tabIndex === null) return false\n let current: Node = element\n const seen = new Set<Node>()\n while (!seen.has(current)) {\n seen.add(current)\n const parent = composedParentFor(current, composedParents)\n if (parent === null) break\n if (parent === panel) break\n if (ownsNegativeFocusScope(parent)) return false\n current = parent\n }\n if (!element.matches(focusableSelector)) return false\n if (element.shadowRoot?.delegatesFocus === true) return false\n if (!isRenderedFocusable(element, composedParents)) return false\n if (isRadioInput(element) && !isSequentiallyFocusableRadio(element, nativeRoot, composed, composedParents)) {\n return false\n }\n return (\n tabIndex >= 0 ||\n (isHTMLElement(element) &&\n element.isContentEditable &&\n !element.hasAttribute(\"tabindex\") &&\n !hasContentEditableAncestor(element, composedParents)) ||\n (element.matches(\"details > summary:first-of-type\") && !hasExplicitNegativeTabIndex(element))\n )\n })\n .map(({ element }) => element)\n\ninterface IFrameElementLike extends TabIndexedElement {\n readonly contentDocument: Document | null\n}\n\nconst isIframeElement = (value: EventTarget | null): value is IFrameElementLike =>\n Predicate.isObjectOrArray(value) && \"tagName\" in value && value.tagName === \"IFRAME\" && \"contentDocument\" in value\n\nconst isElementTarget = (value: EventTarget | null): value is Element =>\n Predicate.isObjectOrArray(value) && \"nodeType\" in value && value.nodeType === 1\n\nconst focusableElementsInFrame = (frameDocument: Document): Array<TabIndexedElement> =>\n [...frameDocument.querySelectorAll<Element>(focusableSelector)].filter((element): element is TabIndexedElement => {\n const tabIndex = tabIndexFor(element)\n return (\n (tabIndex !== null && tabIndex >= 0) ||\n (isHTMLElement(element) &&\n element.isContentEditable &&\n !element.hasAttribute(\"tabindex\") &&\n !hasContentEditableAncestor(element, new Map<Node, Node | null>()))\n )\n })\n\nconst installIframeFocusContainment = (panel: HTMLElement): (() => void) => {\n const ownerDocument = panel.ownerDocument\n const bindings = new Map<\n IFrameElementLike,\n {\n readonly onLoad: () => void\n readonly onKeyDown: (event: KeyboardEvent) => void\n readonly frameDocument: Document | null\n }\n >()\n\n const focusOuterBoundary = (frame: IFrameElementLike, backwards: boolean): void => {\n const composed = composedElementsInScope(panel)\n const composedParents = new Map<Node, Node | null>(\n composed.map(({ composedParent, element }) => [element, composedParent])\n )\n const focusable = focusableElementsInScope(panel, composed, composedParents)\n const frameIndex = focusable.findIndex((element) => element === frame)\n const fallback = backwards ? focusable[focusable.length - 1] : focusable[0]\n const adjacent = frameIndex < 0 ? undefined : focusable[frameIndex + (backwards ? -1 : 1)]\n ;(adjacent ?? fallback)?.focus()\n }\n\n const attachDocumentListener = (frame: IFrameElementLike): void => {\n const existing = bindings.get(frame)\n const frameDocument = frame.contentDocument\n if (existing?.frameDocument !== null && existing?.frameDocument !== undefined) {\n existing.frameDocument.removeEventListener(\"keydown\", existing.onKeyDown, true)\n }\n if (existing === undefined) return\n if (frameDocument === null) {\n bindings.set(frame, { ...existing, frameDocument: null })\n return\n }\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.defaultPrevented || event.key !== \"Tab\") return\n const frameFocusables = focusableElementsInFrame(frameDocument)\n const active = isElementTarget(event.target) ? event.target : frameDocument.activeElement\n const first = frameFocusables[0]\n const last = frameFocusables[frameFocusables.length - 1]\n const atBoundary = event.shiftKey ? active === first : active === last\n if (!atBoundary) return\n event.preventDefault()\n focusOuterBoundary(frame, event.shiftKey)\n }\n frameDocument.addEventListener(\"keydown\", onKeyDown, true)\n bindings.set(frame, { ...existing, frameDocument, onKeyDown })\n }\n\n const bindFrame = (frame: IFrameElementLike): void => {\n if (bindings.has(frame)) {\n attachDocumentListener(frame)\n return\n }\n const onLoad = (): void => attachDocumentListener(frame)\n bindings.set(frame, { frameDocument: null, onKeyDown: () => undefined, onLoad })\n frame.addEventListener(\"load\", onLoad)\n attachDocumentListener(frame)\n }\n\n const syncFrames = (): void => {\n for (const { element } of composedElementsInScope(panel)) {\n if (element.tagName === \"IFRAME\" && isIframeElement(element)) bindFrame(element)\n }\n }\n\n const onFocusIn = (event: FocusEvent): void => {\n if (isIframeElement(event.target)) bindFrame(event.target)\n }\n ownerDocument.addEventListener(\"focusin\", onFocusIn, true)\n syncFrames()\n const mutationObserver = ownerDocument.defaultView?.MutationObserver\n const observer = mutationObserver === undefined ? null : new mutationObserver(syncFrames)\n observer?.observe(panel, { childList: true, subtree: true })\n\n return () => {\n ownerDocument.removeEventListener(\"focusin\", onFocusIn, true)\n observer?.disconnect()\n for (const [frame, binding] of bindings) {\n frame.removeEventListener(\"load\", binding.onLoad)\n if (binding.frameDocument !== null) binding.frameDocument.removeEventListener(\"keydown\", binding.onKeyDown, true)\n }\n }\n}\n\n/** One explicit piece of application-owned context attached to the current Relay thread. */\nexport interface RlyRelayDockContextChip {\n readonly id: string\n readonly label: string\n readonly value: string\n}\n\n/** One controlled profile or model selector supplied by a product adapter. */\nexport interface RlyRelayDockSelectionControl {\n readonly disabled?: boolean\n readonly onValueChange: (value: string) => void\n readonly options: ReadonlyArray<RlySelectOption>\n readonly value: string\n}\n\n/** Controlled run selection shown before a person asks Relay to do anything. */\nexport interface RlyRelayDockSelection {\n readonly model: RlyRelayDockSelectionControl\n readonly profile: RlyRelayDockSelectionControl\n}\n\n/** Caller-owned thread state. RelayDock does not load, retry, or persist it. */\nexport type RlyRelayDockState =\n | {\n readonly description?: ReactNode\n readonly status: \"loading\"\n readonly title: string\n }\n | {\n readonly action?: ReactNode\n readonly description: ReactNode\n readonly status: \"empty\"\n readonly title: string\n }\n | {\n readonly content: ReactNode\n readonly status: \"ready\"\n }\n | {\n readonly action?: ReactNode\n readonly description: ReactNode\n readonly status: \"error\"\n readonly title: string\n }\n | {\n readonly action?: ReactNode\n readonly description: ReactNode\n readonly status: \"unavailable\"\n readonly title: string\n }\n\n/** Desktop placement policy. Compact viewports always use a full-height modal sheet. */\nexport type RlyRelayDockDesktopPresentation = \"overlay\" | \"rail\"\n\ninterface RelayDockBaseProps extends Omit<ComponentPropsWithRef<\"div\">, \"children\" | \"title\"> {\n readonly context: ReadonlyArray<RlyRelayDockContextChip>\n readonly description?: string\n readonly desktopPresentation?: RlyRelayDockDesktopPresentation\n readonly footer?: ReactNode\n readonly selection: RlyRelayDockSelection\n readonly state: RlyRelayDockState\n readonly title?: string\n readonly triggerLabel?: string\n}\n\ntype ControlledRelayDockProps = RelayDockBaseProps & {\n readonly defaultOpen?: never\n readonly onOpenChange: (open: boolean) => void\n readonly open: boolean\n}\n\ntype DefaultRelayDockProps = RelayDockBaseProps & {\n readonly defaultOpen?: boolean\n readonly onOpenChange?: (open: boolean) => void\n readonly open?: never\n}\n\n/** Controlled-first dock state with a collapsed uncontrolled default. */\nexport type RelayDockProps = ControlledRelayDockProps | DefaultRelayDockProps\n\nconst subscribeToCompactViewport = (view: Window | null, onStoreChange: () => void): (() => void) => {\n if (view === null || !(\"matchMedia\" in view)) return () => undefined\n const query = view.matchMedia(compactViewportQuery)\n query.addEventListener(\"change\", onStoreChange)\n return () => query.removeEventListener(\"change\", onStoreChange)\n}\n\nconst compactViewportSnapshot = (view: Window | null): boolean =>\n view !== null && \"matchMedia\" in view && view.matchMedia(compactViewportQuery).matches\n\nconst serverCompactViewportSnapshot = (): boolean => false\n\nconst useCompactViewport = (view: Window | null): boolean => {\n const subscribe = useCallback((onStoreChange: () => void) => subscribeToCompactViewport(view, onStoreChange), [view])\n const snapshot = useCallback(() => compactViewportSnapshot(view), [view])\n return useSyncExternalStore(subscribe, snapshot, serverCompactViewportSnapshot)\n}\n\nconst RelayMark = (): ReactElement => (\n <span aria-hidden=\"true\" className={style(\"mark\")}>\n <span className={style(\"markLine\")} />\n <svg className={style(\"markGlyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path d=\"M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z\" fill=\"currentColor\" />\n </svg>\n </span>\n)\n\nconst ContextChips = ({\n context,\n labelId\n}: {\n readonly context: ReadonlyArray<RlyRelayDockContextChip>\n readonly labelId: string\n}): ReactElement => {\n if (context.length === 0) throw new Error(\"RelayDock context must contain at least one chip\")\n const ids = new Set<string>()\n return (\n <section aria-labelledby={labelId} className={style(\"context\")}>\n <h2 className={style(\"sectionLabel\")} id={labelId}>\n Context\n </h2>\n <ul className={style(\"chipList\")}>\n {context.map((chip) => {\n const id = requireText(chip.id, \"RelayDock context chip id\")\n if (ids.has(id)) throw new Error(`Duplicate RelayDock context chip id: ${id}`)\n ids.add(id)\n return (\n <li className={style(\"chip\")} data-rly-relay-dock-context={id} key={id}>\n <span className={style(\"chipLabel\")}>{requireText(chip.label, \"RelayDock context chip label\")}</span>\n <span className={style(\"chipValue\")}>{requireText(chip.value, \"RelayDock context chip value\")}</span>\n </li>\n )\n })}\n </ul>\n </section>\n )\n}\n\nconst SelectionControls = ({\n labelId,\n selection\n}: {\n readonly labelId: string\n readonly selection: RlyRelayDockSelection\n}): ReactElement => {\n const profileId = useId()\n const modelId = useId()\n return (\n <section aria-labelledby={labelId} className={style(\"selection\")}>\n <h2 className={style(\"sectionLabel\")} id={labelId}>\n Run with\n </h2>\n <div className={style(\"selectionGrid\")}>\n <Field controlId={`rly-relay-dock-profile-${profileId}`} label=\"Profile\" size=\"compact\">\n {(controlProps) => (\n <Select\n {...controlProps}\n {...(selection.profile.disabled === undefined ? {} : { disabled: selection.profile.disabled })}\n onValueChange={selection.profile.onValueChange}\n options={selection.profile.options}\n size=\"compact\"\n value={selection.profile.value}\n />\n )}\n </Field>\n <Field controlId={`rly-relay-dock-model-${modelId}`} label=\"Model\" size=\"compact\">\n {(controlProps) => (\n <Select\n {...controlProps}\n {...(selection.model.disabled === undefined ? {} : { disabled: selection.model.disabled })}\n onValueChange={selection.model.onValueChange}\n options={selection.model.options}\n size=\"compact\"\n value={selection.model.value}\n />\n )}\n </Field>\n </div>\n </section>\n )\n}\n\nconst DockState = ({ state }: { readonly state: RlyRelayDockState }): ReactElement => {\n if (state.status === \"ready\") {\n return (\n <section aria-live=\"polite\" className={style(\"ready\")} data-rly-relay-dock-state=\"ready\">\n {state.content}\n </section>\n )\n }\n const announcement = state.status === \"error\" ? \"assertive\" : \"polite\"\n const tone = state.status === \"loading\" ? \"progress\" : state.status === \"error\" ? \"critical\" : \"neutral\"\n return (\n <StatePanel\n action={\"action\" in state ? state.action : undefined}\n announce={announcement}\n className={style(\"state\")}\n data-rly-relay-dock-state={state.status}\n description={state.description}\n title={requireText(state.title, `RelayDock ${state.status} title`)}\n tone={tone}\n />\n )\n}\n\nconst DockContents = ({\n context,\n footer,\n selection,\n state\n}: Pick<RelayDockBaseProps, \"context\" | \"footer\" | \"selection\" | \"state\">): ReactElement => {\n const contextLabelId = useId()\n const selectionLabelId = useId()\n return (\n <div className={style(\"contents\")} data-rly-relay-dock-scroll=\"\">\n <div className={style(\"fixedContext\")}>\n <ContextChips context={context} labelId={contextLabelId} />\n <SelectionControls labelId={selectionLabelId} selection={selection} />\n </div>\n <section aria-label=\"Relay thread\" className={style(\"body\")} tabIndex={0}>\n <DockState state={state} />\n </section>\n {footer === undefined || footer === null ? null : <footer className={style(\"footer\")}>{footer}</footer>}\n </div>\n )\n}\n\ninterface DockLayerProps extends Pick<RelayDockBaseProps, \"context\" | \"footer\" | \"selection\" | \"state\"> {\n readonly compactViewport: boolean\n readonly description: string\n readonly headingId: string\n readonly modal: boolean\n readonly parentModalPresent: boolean\n readonly onClose: () => void\n readonly restoreDocument: Document | null\n readonly restoreTargetRef: RefObject<HTMLElement | null>\n readonly title: string\n readonly closeRef: RefObject<HTMLButtonElement | null>\n}\n\nconst DockInitialFocus = ({\n restoreDocument,\n restoreTarget,\n target\n}: {\n readonly restoreDocument: Document | null\n readonly restoreTarget: RefObject<HTMLElement | null>\n readonly target: RefObject<HTMLButtonElement | null>\n}): null => {\n const hasCapturedRestoreTarget = useRef(false)\n useLayoutEffect(() => {\n const focusTarget = target.current\n if (focusTarget === null) return\n if (!hasCapturedRestoreTarget.current) {\n restoreTarget.current = focusRestoreTarget(restoreDocument ?? focusTarget.ownerDocument)\n hasCapturedRestoreTarget.current = true\n }\n focusTarget.focus()\n }, [restoreDocument, restoreTarget, target])\n return null\n}\n\nconst DockLayerSurface = ({\n children,\n modal,\n modalLayer\n}: {\n readonly children: ReactNode\n readonly modal: boolean\n readonly modalLayer: boolean\n}): ReactElement => {\n const layerRef = useRef<HTMLDivElement>(null)\n useModalContentRegistration()\n useModalIsolation(layerRef, modal)\n useModalScrollLock(layerRef, modal)\n return (\n <div\n className={style(\"layer\")}\n data-rly-modal-layer={modalLayer ? \"\" : undefined}\n data-rly-relay-dock-modal={modal ? \"true\" : \"false\"}\n ref={layerRef}\n >\n {children}\n </div>\n )\n}\n\nconst DockLayer = ({\n closeRef,\n compactViewport,\n context,\n description,\n footer,\n headingId,\n modal,\n onClose,\n parentModalPresent,\n restoreDocument,\n restoreTargetRef,\n selection,\n state,\n title\n}: DockLayerProps): ReactElement => {\n const descriptionId = `${headingId}-description`\n const panelRef = useRef<HTMLElement>(null)\n\n useLayoutEffect(() => {\n const panel = panelRef.current\n if (!modal || panel === null) return\n return installIframeFocusContainment(panel)\n }, [modal])\n\n const handleKeyDown = (event: ReactKeyboardEvent<HTMLElement>): void => {\n const panel = event.currentTarget\n if (!event.nativeEvent.composedPath().includes(panel)) return\n if (event.defaultPrevented) return\n if (event.key === \"Escape\") {\n if (event.nativeEvent.isComposing) return\n event.stopPropagation()\n onClose()\n return\n }\n if (!modal || event.key !== \"Tab\") return\n\n const composed = composedElementsInScope(panel)\n const composedParents = new Map<Node, Node | null>(\n composed.map(({ composedParent, element }) => [element, composedParent])\n )\n const delegatingShadowHostFor = (element: Element): HTMLElement | null => {\n const seen = new Set<Node>()\n let current: Node = element\n while (!seen.has(current)) {\n seen.add(current)\n const parent = composedParentFor(current, composedParents)\n if (parent === null) return null\n if (isHTMLElement(parent) && parent.shadowRoot?.delegatesFocus === true) return parent\n current = parent\n }\n return null\n }\n const focusable = focusableElementsInScope(panel, composed, composedParents)\n const first = focusable[0] ?? panel\n const last = focusable[focusable.length - 1] ?? panel\n const active = activeElementFor(panel)\n const focusableElements = new Set<Element>(focusable)\n const activeIsUnlistedFocusTarget =\n active !== null && isWithinPanel(panel, active) && !focusable.some((element) => element === active)\n const composedIndexForActive = (element: Element): number => {\n const seen = new Set<Node>()\n let current: Node = element\n while (!seen.has(current)) {\n seen.add(current)\n const index = composed.findIndex(({ element: candidate }) => candidate === current)\n if (index >= 0) return index\n const parent = composedParentFor(current, composedParents)\n if (parent === null) return -1\n current = parent\n }\n return -1\n }\n const activeDelegatingHost = activeIsUnlistedFocusTarget && active !== null ? delegatingShadowHostFor(active) : null\n const activeComposedIndex = activeIsUnlistedFocusTarget && active !== null ? composedIndexForActive(active) : -1\n const adjacentFocusable = (step: -1 | 1): TabIndexedElement | null => {\n if (activeComposedIndex < 0) return null\n for (let index = activeComposedIndex + step; index >= 0 && index < composed.length; index += step) {\n const candidate = composed[index]?.element\n if (candidate !== undefined && focusableElements.has(candidate) && hasTabIndexProperty(candidate))\n return candidate\n }\n return null\n }\n const adjacent = activeIsUnlistedFocusTarget ? adjacentFocusable(event.shiftKey ? -1 : 1) : null\n const adjacentIsInActiveDelegatingHost =\n activeDelegatingHost !== null &&\n adjacent !== null &&\n isWithinComposedElement(activeDelegatingHost, adjacent, composedParents)\n const unlistedFocusBoundary =\n activeIsUnlistedFocusTarget &&\n !adjacentIsInActiveDelegatingHost &&\n (adjacent === null || !isWithinPanel(panel, adjacent))\n const leavingStart =\n event.shiftKey &&\n (active === first || !isWithinPanel(panel, active) || adjacentIsInActiveDelegatingHost || unlistedFocusBoundary)\n const leavingEnd =\n !event.shiftKey &&\n (active === last || !isWithinPanel(panel, active) || adjacentIsInActiveDelegatingHost || unlistedFocusBoundary)\n if (!leavingStart && !leavingEnd) return\n event.preventDefault()\n const target = adjacentIsInActiveDelegatingHost && adjacent !== null ? adjacent : event.shiftKey ? last : first\n target.focus()\n }\n\n return (\n <PortalBoundary>\n {(container) => (\n <RadixPortal.Root container={container}>\n <DockLayerSurface modal={modal} modalLayer={modal || parentModalPresent}>\n {modal ? (\n <div\n aria-hidden=\"true\"\n className={style(\"overlay\")}\n data-rly-relay-dock-overlay=\"\"\n onPointerDown={onClose}\n />\n ) : null}\n <section\n aria-describedby={descriptionId}\n aria-labelledby={headingId}\n aria-modal={modal ? true : undefined}\n className={classNames(style(\"panel\"), modal ? style(\"sheet\") : style(\"rail\"))}\n data-rly-relay-dock-presentation={compactViewport ? \"mobile-sheet\" : modal ? \"overlay\" : \"rail\"}\n onKeyDown={handleKeyDown}\n ref={panelRef}\n role={modal ? \"dialog\" : \"complementary\"}\n tabIndex={-1}\n >\n <header className={style(\"railHeader\")}>\n <div className={style(\"railHeading\")}>\n <h1 className={style(\"title\")} id={headingId}>\n {title}\n </h1>\n <p className={style(\"description\")} id={descriptionId}>\n {description}\n </p>\n </div>\n <button\n aria-label={`Close ${title}`}\n className={style(\"close\")}\n onClick={onClose}\n ref={closeRef}\n type=\"button\"\n >\n <Icon decorative name=\"close\" />\n </button>\n </header>\n <DockInitialFocus restoreDocument={restoreDocument} restoreTarget={restoreTargetRef} target={closeRef} />\n <DockContents context={context} footer={footer} selection={selection} state={state} />\n </section>\n </DockLayerSurface>\n </RadixPortal.Root>\n )}\n </PortalBoundary>\n )\n}\n\n/**\n * Present one adapter-owned Relay thread. The uncontrolled form starts collapsed.\n * Desktop rail stays non-modal; desktop overlay and compact viewports trap focus in a sheet.\n */\nexport const RelayDock = (componentProps: RelayDockProps): ReactElement => {\n const {\n className,\n context,\n defaultOpen = false,\n description = \"Ask in this context or prepare approval-bound work.\",\n desktopPresentation = \"overlay\",\n footer,\n onOpenChange,\n open,\n ref,\n selection,\n state,\n title = \"Relay\",\n triggerLabel = \"Open Relay\",\n ...props\n } = componentProps\n const [defaultState, setDefaultState] = useState(defaultOpen)\n const parentModalPresent = useParentModalPresent()\n const parentModalReady = useParentModalReady()\n const portalTarget = usePortalTarget()\n const resolvedOpen = (open ?? defaultState) && parentModalReady && portalTarget.available\n const portalView = portalTarget.available ? portalTarget.container.ownerDocument.defaultView : null\n const compactViewport = useCompactViewport(portalView)\n const modal = compactViewport || desktopPresentation === \"overlay\"\n const triggerRef = useRef<HTMLButtonElement>(null)\n const railCloseRef = useRef<HTMLButtonElement>(null)\n const restoreTargetRef = useRef<HTMLElement>(null)\n const previousStateRef = useRef({ modal, open: false })\n const headingId = useId()\n const visibleDescription = requireText(description, \"RelayDock description\")\n const visibleTitle = requireText(title, \"RelayDock title\")\n const visibleTriggerLabel = requireText(triggerLabel, \"RelayDock triggerLabel\")\n\n const requestOpenChange = (nextOpen: boolean): void => {\n if (open === undefined) setDefaultState(nextOpen)\n onOpenChange?.(nextOpen)\n }\n\n useLayoutEffect(() => {\n const previousState = previousStateRef.current\n previousStateRef.current = { modal, open: resolvedOpen }\n if (!previousState.open && resolvedOpen) {\n invalidateModalFocusRestore()\n railCloseRef.current?.focus()\n } else if (previousState.open && resolvedOpen && previousState.modal !== modal) {\n railCloseRef.current?.focus()\n } else if (previousState.open && !resolvedOpen) {\n restoreModalFocusAfterCleanup(restoreTargetRef.current ?? triggerRef.current)\n restoreTargetRef.current = null\n }\n }, [modal, resolvedOpen])\n\n return (\n <div\n {...props}\n className={classNames(style(\"root\"), className)}\n data-rly-relay-dock=\"\"\n data-rly-relay-dock-open={resolvedOpen ? \"true\" : \"false\"}\n ref={ref}\n >\n <button\n aria-expanded={resolvedOpen}\n aria-haspopup={modal ? \"dialog\" : undefined}\n className={style(\"trigger\")}\n data-rly-relay-dock-trigger=\"\"\n // While open the trigger stays in layout (visibility: hidden) so the dock does not shift; inert keeps it out of focus.\n inert={resolvedOpen}\n onClick={(event) => {\n event.currentTarget.focus()\n requestOpenChange(true)\n }}\n ref={triggerRef}\n type=\"button\"\n >\n <RelayMark />\n <span>{visibleTriggerLabel}</span>\n </button>\n {!resolvedOpen ? null : (\n <ModalNestingBoundary>\n <DockLayer\n closeRef={railCloseRef}\n compactViewport={compactViewport}\n context={context}\n description={visibleDescription}\n footer={footer}\n headingId={headingId}\n modal={modal}\n onClose={() => requestOpenChange(false)}\n parentModalPresent={parentModalPresent}\n restoreDocument={triggerRef.current?.ownerDocument ?? null}\n restoreTargetRef={restoreTargetRef}\n selection={selection}\n state={state}\n title={visibleTitle}\n />\n </ModalNestingBoundary>\n )}\n </div>\n )\n}\n","import { requireText } from \"../internal/component.js\"\nimport type { RlyFreshnessState } from \"./FreshnessStamp.js\"\nimport type { RlyPerson } from \"./Person.js\"\nimport type { RlyReleaseRelaySymbolIndices } from \"./ReleaseRelay.js\"\nimport type { RlyVerdictTone } from \"./Verdict.js\"\n\n/** Caller-owned release presentation states, including an explicitly unevaluated state. */\nexport type RlyReleaseState = \"blocked\" | \"ready\" | \"deploying\" | \"building\" | \"shipped\" | \"held\" | \"unknown\"\n\n/** One explicit display fact; values are never counted or derived by rly. */\nexport interface RlyReleaseFact {\n readonly id: string\n readonly label: string\n readonly value: string\n}\n\n/** Caller-owned names for the sole orchestrated row → preview → full release transition. */\nexport interface RlyReleaseTransitionNames {\n readonly relay: string\n readonly verdict: string\n readonly version: string\n}\n\nconst cssCustomIdentifier =\n /^(?:--[A-Za-z0-9_\\-\\u0080-\\uD7FF\\uE000-\\u{10ffff}]*|-?[A-Za-z_\\u0080-\\uD7FF\\uE000-\\u{10ffff}][A-Za-z0-9_\\-\\u0080-\\uD7FF\\uE000-\\u{10ffff}]*)$/u\n\nconst reservedViewTransitionNames = new Set([\n \"auto\",\n \"default\",\n \"inherit\",\n \"initial\",\n \"match-element\",\n \"none\",\n \"revert\",\n \"revert-layer\",\n \"unset\"\n])\n\n/** Validate the caller-owned names before they reach CSS View Transition properties. */\nexport const validateReleaseTransitionNames = (\n names: RlyReleaseTransitionNames | undefined\n): RlyReleaseTransitionNames | undefined => {\n if (names === undefined) return undefined\n const snapshot: RlyReleaseTransitionNames = {\n relay: names.relay,\n verdict: names.verdict,\n version: names.version\n }\n const entries: ReadonlyArray<readonly [\"relay\" | \"verdict\" | \"version\", string]> = [\n [\"relay\", snapshot.relay],\n [\"verdict\", snapshot.verdict],\n [\"version\", snapshot.version]\n ]\n const seen = new Set<string>()\n for (const [part, suppliedName] of entries) {\n const name = requireText(suppliedName, `Release transition ${part} name`)\n if (name === \"root\" || reservedViewTransitionNames.has(name.toLowerCase())) {\n throw new Error(`Release transition ${part} name must not use a reserved CSS value: ${name}`)\n }\n if (!cssCustomIdentifier.test(name)) {\n throw new Error(`Release transition ${part} name must be a valid unescaped CSS custom identifier: ${name}`)\n }\n if (seen.has(name)) throw new Error(`Release transition names must be unique: ${name}`)\n seen.add(name)\n }\n return Object.freeze(snapshot)\n}\n\ntype RlyReleaseFreshnessTime =\n | { readonly freshnessDateTime: string; readonly freshnessTime: string }\n | { readonly freshnessDateTime?: never; readonly freshnessTime?: never }\n\n/** Presentation projection supplied by a release presenter, not a domain record. */\nexport type RlyReleasePresentation = RlyReleaseFreshnessTime & {\n readonly algorithm: string\n readonly approver?: RlyPerson\n readonly codename: string\n readonly facts: ReadonlyArray<RlyReleaseFact>\n readonly freshness: RlyFreshnessState\n readonly id: string\n readonly owner?: RlyPerson\n readonly reason: string\n readonly state: RlyReleaseState\n readonly symbolIndices: RlyReleaseRelaySymbolIndices\n readonly tone: RlyVerdictTone\n readonly verdict: string\n readonly version: string\n}\n\nconst releaseStates = {\n blocked: true,\n ready: true,\n deploying: true,\n building: true,\n shipped: true,\n held: true,\n unknown: true\n} satisfies Readonly<Record<RlyReleaseState, true>>\n\n/** Validate visible release projection fields without deriving identity or readiness. */\nexport const validateReleasePresentation = (release: RlyReleasePresentation): RlyReleasePresentation => {\n requireText(release.id, \"Release presentation id\")\n requireText(release.version, \"Release presentation version\")\n requireText(release.codename, \"Release presentation codename\")\n requireText(release.algorithm, \"Release presentation algorithm\")\n requireText(release.verdict, \"Release presentation verdict\")\n requireText(release.reason, \"Release presentation reason\")\n if (!Object.hasOwn(releaseStates, release.state)) throw new Error(\"Release presentation state must be supported\")\n if (release.freshnessDateTime !== undefined) {\n requireText(release.freshnessDateTime, \"Release presentation freshnessDateTime\")\n requireText(release.freshnessTime, \"Release presentation freshnessTime\")\n }\n\n const factIds = new Set<string>()\n for (const fact of release.facts) {\n const id = requireText(fact.id, \"Release presentation fact id\")\n if (factIds.has(id)) throw new Error(`Release presentation fact ids must be unique: ${id}`)\n factIds.add(id)\n requireText(fact.label, `Release presentation fact label for ${id}`)\n requireText(fact.value, `Release presentation fact value for ${id}`)\n }\n return release\n}\n","@layer rly.components {\n .root {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: var(--rly-space-12);\n margin: var(--rly-space-0);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .tiles {\n color: var(--rly-color-border-2);\n display: inline-flex;\n isolation: isolate;\n position: relative;\n }\n\n .handoff {\n background: currentcolor;\n block-size: 1px;\n inset-inline: var(--rly-space-4);\n inset-block-start: 50%;\n position: absolute;\n }\n\n .tile {\n align-items: center;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-field);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n display: inline-flex;\n flex: none;\n justify-content: center;\n position: relative;\n }\n\n .tile + .tile {\n margin-inline-start: calc(var(--rly-space-8) * -1);\n }\n .tile[data-rly-release-relay-position=\"1\"] {\n background: var(--rly-color-surface-2);\n }\n .tile[data-rly-release-relay-position=\"2\"] {\n background: var(--rly-color-surface-3);\n }\n\n .glyph {\n block-size: 62.5%;\n display: block;\n inline-size: 62.5%;\n }\n\n .identity {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .codename {\n color: var(--rly-color-text-1);\n overflow-wrap: break-word;\n }\n\n .algorithm {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .algorithmValue {\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n white-space: nowrap;\n }\n\n .compact {\n --rly-release-relay-tile-size: var(--rly-space-32);\n }\n .compact .tile {\n block-size: var(--rly-release-relay-tile-size, var(--rly-space-32));\n inline-size: var(--rly-release-relay-tile-size, var(--rly-space-32));\n }\n .compact .codename {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n }\n\n .hero {\n --rly-release-relay-tile-size: calc(var(--rly-space-48) + var(--rly-space-4));\n }\n .hero .tile {\n block-size: var(--rly-release-relay-tile-size, calc(var(--rly-space-48) + var(--rly-space-4)));\n inline-size: var(--rly-release-relay-tile-size, calc(var(--rly-space-48) + var(--rly-space-4)));\n }\n .hero .codename {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./ReleaseRelay.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Closed indices for the versioned rly release-symbol catalog. */\nexport type RlyReleaseRelaySymbolIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15\n\n/** Semver-governed persisted index-to-name contract; reordering changes release identity. */\nexport const RLY_RELEASE_RELAY_SYMBOLS = defineVariants({\n 0: { name: \"orbit\" },\n 1: { name: \"split\" },\n 2: { name: \"brace\" },\n 3: { name: \"wave\" },\n 4: { name: \"gate\" },\n 5: { name: \"fork\" },\n 6: { name: \"bridge\" },\n 7: { name: \"beacon\" },\n 8: { name: \"loop\" },\n 9: { name: \"pulse\" },\n 10: { name: \"anchor\" },\n 11: { name: \"ladder\" },\n 12: { name: \"knot\" },\n 13: { name: \"spark\" },\n 14: { name: \"stack\" },\n 15: { name: \"compass\" }\n}) satisfies Readonly<Record<RlyReleaseRelaySymbolIndex, { readonly name: string }>>\n\n/** Stable name for one code-owned release symbol. */\nexport type RlyReleaseRelaySymbolName = (typeof RLY_RELEASE_RELAY_SYMBOLS)[RlyReleaseRelaySymbolIndex][\"name\"]\n\n/** Machine-readable ReleaseRelay geometry choices. */\nexport const RLY_RELEASE_RELAY_VARIANTS = defineVariants({\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Release rows and compact previews\",\n tokens: [\"space-32\", \"space-8\", \"type-label\"]\n },\n hero: {\n className: style(\"hero\"),\n purpose: \"Page-level release identity\",\n tokens: [\"space-48\", \"space-4\", \"space-8\", \"type-card-title\"]\n }\n }\n})\n\n/** Default ReleaseRelay geometry. */\nexport const RLY_RELEASE_RELAY_DEFAULT_VARIANTS = defineVariants({ size: \"compact\" })\n\n/** Visual geometry supported by ReleaseRelay. */\nexport type RlyReleaseRelaySize = keyof typeof RLY_RELEASE_RELAY_VARIANTS.size\n\n/** Exactly three persisted symbol indices supplied by a release identity projection. */\nexport type RlyReleaseRelaySymbolIndices = readonly [\n RlyReleaseRelaySymbolIndex,\n RlyReleaseRelaySymbolIndex,\n RlyReleaseRelaySymbolIndex\n]\n\nconst symbolPaths = {\n 0: \"M12 4a8 8 0 1 1-6.9 4M5.1 8H9V4.1\",\n 1: \"M5 5v4c0 2 1 3 3 3h8c2 0 3 1 3 3v4M12 12V5\",\n 2: \"M9 4H7v5l-3 3 3 3v5h2M15 4h2v5l3 3-3 3v5h-2\",\n 3: \"M3 9c3-4 6-4 9 0s6 4 9 0M3 15c3-4 6-4 9 0s6 4 9 0\",\n 4: \"M5 19V8l7-4 7 4v11M9 19v-7h6v7\",\n 5: \"M12 20V9M12 12 6 6M12 12l6-6M6 6v4M18 6v4\",\n 6: \"M3 17h18M5 17v-5c4-5 10-5 14 0v5M8 17v-3M16 17v-3\",\n 7: \"M12 3v3M5.6 5.6l2.1 2.1M18.4 5.6l-2.1 2.1M6 20h12l-2-9H8Z\",\n 8: \"M8 8a4 4 0 0 1 8 0v8a4 4 0 0 1-8 0V8Zm0 4h8\",\n 9: \"M3 13h4l2-6 4 12 2-6h6\",\n 10: \"M12 3v15M8 7h8M5 14c0 4 3 7 7 7s7-3 7-7M5 14l-2 2M19 14l2 2\",\n 11: \"M7 3v18M17 3v18M7 7h10M7 12h10M7 17h10\",\n 12: \"M8 5a4 4 0 0 1 4 4v6a4 4 0 1 0 4-4H8a4 4 0 1 0 4 4V9a4 4 0 0 1 4-4\",\n 13: \"M12 3v5M12 16v5M3 12h5M16 12h5M5.6 5.6l3.5 3.5M14.9 14.9l3.5 3.5M18.4 5.6l-3.5 3.5M9.1 14.9l-3.5 3.5\",\n 14: \"m4 8 8-4 8 4-8 4Zm0 4 8 4 8-4M4 16l8 4 8-4\",\n 15: \"m12 3 3 6 6 3-6 3-3 6-3-6-6-3 6-3Zm0 6v6M9 12h6\"\n} satisfies Readonly<Record<RlyReleaseRelaySymbolIndex, string>>\n\nconst validateSymbols = (symbolIndices: RlyReleaseRelaySymbolIndices): RlyReleaseRelaySymbolIndices => {\n if (symbolIndices.length !== 3) throw new Error(\"ReleaseRelay symbolIndices must contain exactly three indices\")\n const seen = new Set<number>()\n for (const symbol of symbolIndices) {\n if (!Number.isInteger(symbol) || symbol < 0 || symbol > 15) {\n throw new Error(\"ReleaseRelay symbol indices must be integers from 0 through 15\")\n }\n if (seen.has(symbol)) throw new Error(\"ReleaseRelay symbol indices must be distinct\")\n seen.add(symbol)\n }\n return symbolIndices\n}\n\n/** Props for an already-derived, versioned release identity projection. */\nexport type ReleaseRelayProps = Omit<ComponentPropsWithRef<\"figure\">, \"aria-label\" | \"children\"> & {\n readonly algorithm: string\n readonly codename: string\n readonly size?: RlyReleaseRelaySize\n readonly symbolIndices: RlyReleaseRelaySymbolIndices\n}\n\n/** Render a supplied codename and three-symbol projection without hashing or domain derivation. */\nexport const ReleaseRelay = ({\n algorithm,\n className,\n codename,\n size = \"compact\",\n symbolIndices: suppliedSymbolIndices,\n ...props\n}: ReleaseRelayProps): ReactElement => {\n const visibleAlgorithm = requireText(algorithm, \"ReleaseRelay algorithm\")\n const visibleCodename = requireText(codename, \"ReleaseRelay codename\")\n const symbolIndices = validateSymbols(suppliedSymbolIndices)\n const names = symbolIndices.map((symbol) => RLY_RELEASE_RELAY_SYMBOLS[symbol].name)\n const accessibleName = `Release relay, ${visibleCodename}, symbols ${names.join(\", \")}.`\n\n return (\n <figure\n {...props}\n className={classNames(style(\"root\"), RLY_RELEASE_RELAY_VARIANTS.size[size].className, className)}\n data-rly-release-relay-size={size}\n >\n <span aria-label={accessibleName} className={style(\"tiles\")} role=\"img\">\n <span aria-hidden=\"true\" className={style(\"handoff\")} data-rly-release-relay-handoff=\"\" />\n {symbolIndices.map((symbol, position) => (\n <span\n aria-hidden=\"true\"\n className={style(\"tile\")}\n data-rly-release-relay-position={position}\n data-rly-release-symbol-index={symbol}\n data-rly-release-symbol-name={RLY_RELEASE_RELAY_SYMBOLS[symbol].name}\n key={symbol}\n >\n <svg className={style(\"glyph\")} focusable=\"false\" viewBox=\"0 0 24 24\">\n <path\n d={symbolPaths[symbol]}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.7\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </svg>\n </span>\n ))}\n </span>\n <figcaption className={style(\"identity\")}>\n <span className={style(\"codename\")}>{visibleCodename}</span>\n {/* Only the value is code; it stays on one line so an id never splits at its hyphen. */}\n <span className={style(\"algorithm\")}>\n Identity algorithm: <code className={style(\"algorithmValue\")}>{visibleAlgorithm}</code>\n </span>\n </figcaption>\n </figure>\n )\n}\n","@layer rly.components {\n .body,\n .summary,\n .releaseMeta,\n .personGroup,\n .fact {\n min-inline-size: var(--rly-space-0);\n }\n\n .body,\n .summary,\n .releaseMeta,\n .personGroup,\n .fact {\n display: grid;\n }\n\n .body {\n gap: var(--rly-space-32);\n }\n\n .dialogSurface {\n block-size: min(48rem, calc(100dvh - var(--rly-space-32)));\n grid-template-rows: auto minmax(var(--rly-space-0), 1fr);\n overflow: hidden;\n }\n\n .dialogSurface > :last-child,\n .dialogFrame,\n .dialogScroll {\n min-block-size: var(--rly-space-0);\n }\n\n .dialogFrame {\n block-size: 100%;\n display: grid;\n gap: var(--rly-space-16);\n grid-template-rows: auto minmax(var(--rly-space-0), 1fr) auto;\n }\n\n .dialogScroll {\n overflow: auto;\n overscroll-behavior: contain;\n padding: var(--rly-space-4);\n }\n\n /* The surface clips overflow, so the scroll region's ring sits inside its edge to stay whole. */\n .dialogScroll:focus-visible {\n outline-offset: calc(var(--rly-focus-ring-width) * -1);\n }\n\n .summary {\n gap: var(--rly-space-32);\n }\n\n .identityRow {\n align-items: start;\n display: grid;\n gap: var(--rly-space-24);\n grid-template-columns: minmax(var(--rly-space-0), 1fr) auto;\n min-inline-size: var(--rly-space-0);\n }\n\n .releaseMeta {\n gap: var(--rly-space-12);\n justify-items: end;\n }\n\n .version {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-code-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n text-align: end;\n }\n\n .people {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-20) var(--rly-space-32);\n }\n\n .personGroup {\n gap: var(--rly-space-8);\n }\n\n .eyebrow,\n .fact dt {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n letter-spacing: var(--rly-type-meta-tracking);\n text-transform: uppercase;\n }\n\n .unassigned {\n color: var(--rly-color-text-2);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n }\n\n .facts {\n border-block: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-20) var(--rly-space-24);\n grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-20);\n }\n\n .fact {\n gap: var(--rly-space-4);\n }\n\n .fact dd {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .slot {\n border-block-start: 1px solid var(--rly-color-border-1);\n min-inline-size: var(--rly-space-0);\n padding-block-start: var(--rly-space-24);\n }\n\n .dialogFooter,\n .sheetFooter {\n background: var(--rly-color-surface-1);\n border-block-start: 1px solid var(--rly-color-border-1);\n display: flex;\n justify-content: flex-end;\n }\n\n .dialogFooter {\n padding-block-start: var(--rly-space-16);\n }\n\n .dialogClose {\n display: flex;\n justify-content: flex-end;\n }\n\n @media (max-height: 30rem) {\n .dialogSurface {\n block-size: calc(100dvh - var(--rly-space-16));\n gap: var(--rly-space-8);\n max-block-size: calc(100dvh - var(--rly-space-16));\n padding: var(--rly-space-12);\n }\n\n .dialogSurface > header > :first-child {\n overflow: hidden;\n text-overflow: ellipsis;\n text-wrap: nowrap;\n }\n\n .dialogFrame {\n gap: var(--rly-space-8);\n }\n\n .dialogFooter {\n padding-block-start: var(--rly-space-8);\n }\n }\n\n @media (max-width: 40rem) {\n .body,\n .summary {\n gap: var(--rly-space-20);\n }\n\n .identityRow {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .releaseMeta {\n justify-items: start;\n }\n\n .version {\n text-align: start;\n }\n\n .facts {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .slot {\n padding-block-start: var(--rly-space-20);\n }\n\n .fullViewButton {\n inline-size: 100%;\n }\n\n .sheetFooter {\n inline-size: 100%;\n }\n }\n}\n","import { type ReactElement, type ReactNode, useRef } from \"react\"\nimport { Button } from \"../primitives/Button.js\"\nimport { Dialog } from \"../primitives/Dialog.js\"\nimport { Sheet } from \"../primitives/Sheet.js\"\nimport { cssClass, requireText } from \"../internal/component.js\"\nimport { FreshnessStamp } from \"./FreshnessStamp.js\"\nimport { Person } from \"./Person.js\"\nimport {\n type RlyReleasePresentation,\n type RlyReleaseTransitionNames,\n validateReleasePresentation,\n validateReleaseTransitionNames\n} from \"./ReleasePresentation.js\"\nimport { ReleaseRelay } from \"./ReleaseRelay.js\"\nimport { Verdict } from \"./Verdict.js\"\nimport styles from \"./ReleasePreview.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Caller-selected overlay presentation; rly does not inspect viewport state. */\nexport type RlyReleasePreviewPresentation = \"dialog\" | \"sheet\"\n\n/** Controlled release-preview composition with application-owned content slots. */\nexport interface ReleasePreviewProps {\n /** Required agent entry supplied by the application. */\n readonly agentEntry: ReactNode\n /** Optional complete collaborator composition supplied by the application. */\n readonly collaborators?: ReactNode\n /** Required evidence composition supplied by the application. */\n readonly evidence: ReactNode\n /**\n * Defaults to intrinsic and is sampled per open cycle. While open, changes apply to the next cycle.\n * External suppresses dialog/sheet surface and overlay entry; exit and reduced-motion behavior stay intrinsic.\n */\n readonly entryMotion?: \"external\" | \"intrinsic\"\n /** Called once when the final full-view action is activated. */\n readonly onOpenFullView: () => void\n /** Receives controlled overlay state requests. */\n readonly onOpenChange: (open: boolean) => void\n /** Visible label for the final full-view action. */\n readonly openFullViewLabel?: string\n /** Controlled overlay state. */\n readonly open: boolean\n /** Caller-selected overlay presentation. Defaults to the desktop dialog. */\n readonly presentation?: RlyReleasePreviewPresentation\n /** Required primary release action supplied by the application. */\n readonly primaryAction: ReactNode\n /** Complete presentation projection supplied by the application. */\n readonly release: RlyReleasePresentation\n /** Required delivery-stage composition supplied by the application. */\n readonly stages: ReactNode\n /** Optional unique names used while an application-owned View Transition is active. */\n readonly transitionNames?: RlyReleaseTransitionNames\n /** Required workset composition supplied by the application. */\n readonly workset: ReactNode\n}\n\n/** Render a caller-selected release dossier overlay without routing, executing, or deriving domain state. */\nexport const ReleasePreview = ({\n agentEntry,\n collaborators,\n entryMotion = \"intrinsic\",\n evidence,\n onOpenChange,\n onOpenFullView,\n open,\n openFullViewLabel = \"Open full view\",\n presentation = \"dialog\",\n primaryAction,\n release: suppliedRelease,\n stages,\n transitionNames,\n workset\n}: ReleasePreviewProps): ReactElement => {\n const release = validateReleasePresentation(suppliedRelease)\n const validatedTransitionNames = validateReleaseTransitionNames(transitionNames)\n const visibleOpenFullViewLabel = requireText(openFullViewLabel, \"ReleasePreview openFullViewLabel\")\n const summaryRef = useRef<HTMLElement>(null)\n const freshness =\n release.freshnessDateTime === undefined ? (\n <FreshnessStamp state={release.freshness} />\n ) : (\n <FreshnessStamp dateTime={release.freshnessDateTime} state={release.freshness} time={release.freshnessTime} />\n )\n\n const title = `Release preview: ${release.version} ${release.codename}`\n const dossier = (\n <div\n className={style(\"body\")}\n data-rly-release-preview-presentation={presentation}\n data-rly-release-state={release.state}\n >\n <section\n aria-label=\"Release summary\"\n className={style(\"summary\")}\n data-rly-release-preview-summary=\"\"\n ref={summaryRef}\n tabIndex={-1}\n >\n <div className={style(\"identityRow\")}>\n <ReleaseRelay\n algorithm={release.algorithm}\n codename={release.codename}\n data-rly-release-transition-name={validatedTransitionNames?.relay}\n data-rly-release-transition-part=\"relay\"\n size=\"hero\"\n style={\n validatedTransitionNames === undefined\n ? undefined\n : { viewTransitionName: validatedTransitionNames.relay }\n }\n symbolIndices={release.symbolIndices}\n />\n <div className={style(\"releaseMeta\")}>\n <p\n className={style(\"version\")}\n data-rly-release-transition-name={validatedTransitionNames?.version}\n data-rly-release-transition-part=\"version\"\n style={\n validatedTransitionNames === undefined\n ? undefined\n : { viewTransitionName: validatedTransitionNames.version }\n }\n >\n {release.version}\n </p>\n {freshness}\n </div>\n </div>\n\n <div className={style(\"people\")}>\n <div className={style(\"personGroup\")}>\n <span className={style(\"eyebrow\")}>Owner</span>\n {release.owner === undefined ? (\n <span className={style(\"unassigned\")} data-rly-release-owner=\"unassigned\">\n Unassigned\n </span>\n ) : (\n <Person person={release.owner} />\n )}\n </div>\n <div className={style(\"personGroup\")}>\n <span className={style(\"eyebrow\")}>Approver</span>\n {release.approver === undefined ? (\n <span className={style(\"unassigned\")} data-rly-release-approver=\"unassigned\">\n Unassigned\n </span>\n ) : (\n <Person person={release.approver} />\n )}\n </div>\n </div>\n\n <Verdict\n data-rly-release-transition-name={validatedTransitionNames?.verdict}\n data-rly-release-transition-part=\"verdict\"\n reason={release.reason}\n style={\n validatedTransitionNames === undefined\n ? undefined\n : { viewTransitionName: validatedTransitionNames.verdict }\n }\n tone={release.tone}\n verdict={release.verdict}\n />\n\n <dl className={style(\"facts\")}>\n {release.facts.map((fact) => (\n <div className={style(\"fact\")} key={fact.id}>\n <dt>{fact.label}</dt>\n <dd>{fact.value}</dd>\n </div>\n ))}\n </dl>\n </section>\n\n {collaborators === undefined ? null : (\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"collaborators\">\n {collaborators}\n </div>\n )}\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"primary-action\">\n {primaryAction}\n </div>\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"stages\">\n {stages}\n </div>\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"workset\">\n {workset}\n </div>\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"evidence\">\n {evidence}\n </div>\n <div className={style(\"slot\")} data-rly-release-preview-slot=\"agent-entry\">\n {agentEntry}\n </div>\n </div>\n )\n\n const fullViewAction = (\n <Button className={style(\"fullViewButton\")} onClick={onOpenFullView} size=\"default\" variant=\"secondary\">\n {visibleOpenFullViewLabel}\n </Button>\n )\n\n return presentation === \"sheet\" ? (\n <Sheet.Root onOpenChange={onOpenChange} open={open}>\n <Sheet.Content entryMotion={entryMotion} initialFocusRef={summaryRef} title={title}>\n <Sheet.Body data-rly-release-preview-scroll=\"sheet\">{dossier}</Sheet.Body>\n <Sheet.Footer className={style(\"sheetFooter\")} data-rly-release-preview-footer=\"sheet\">\n {fullViewAction}\n </Sheet.Footer>\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <Dialog.Root onOpenChange={onOpenChange} open={open}>\n <Dialog.Content\n className={style(\"dialogSurface\")}\n entryMotion={entryMotion}\n initialFocusRef={summaryRef}\n size=\"wide\"\n title={title}\n >\n <div className={style(\"dialogFrame\")}>\n <div className={style(\"dialogClose\")}>\n <Dialog.Close size=\"compact\" variant=\"quiet\">\n Close preview\n </Dialog.Close>\n </div>\n <div className={style(\"dialogScroll\")} data-rly-release-preview-scroll=\"dialog\">\n {dossier}\n </div>\n <footer className={style(\"dialogFooter\")} data-rly-release-preview-footer=\"dialog\">\n {fullViewAction}\n </footer>\n </div>\n </Dialog.Content>\n </Dialog.Root>\n )\n}\n","@layer rly.components {\n .root {\n align-items: start;\n border-block-end: 1px solid var(--rly-color-border-1);\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-20) var(--rly-space-24);\n grid-template-columns: minmax(12rem, 1.05fr) minmax(13rem, 1fr) minmax(12rem, 0.9fr) auto;\n padding: var(--rly-space-20) var(--rly-space-24);\n }\n\n .identity,\n .verdictBlock,\n .people,\n .actions,\n .personGroup,\n .fact {\n min-inline-size: var(--rly-space-0);\n }\n\n .identity,\n .verdictBlock,\n .personGroup,\n .fact {\n display: grid;\n }\n\n .identity {\n gap: var(--rly-space-8);\n }\n\n .version {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-code-font);\n letter-spacing: var(--rly-type-label-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .verdictBlock {\n gap: var(--rly-space-8);\n }\n\n .verdict {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n /* Body copy: body weight in secondary ink; weight is reserved for the title above it. */\n .reason {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n letter-spacing: var(--rly-type-body-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .people {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-16) var(--rly-space-24);\n }\n\n .personGroup {\n gap: var(--rly-space-6);\n }\n\n .eyebrow,\n .fact dt {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n letter-spacing: var(--rly-type-meta-tracking);\n text-transform: uppercase;\n }\n\n .unassigned {\n color: var(--rly-color-text-2);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n }\n\n .facts {\n display: grid;\n gap: var(--rly-space-16) var(--rly-space-24);\n grid-column: 1 / -1;\n grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n }\n\n .fact {\n gap: var(--rly-space-4);\n /* One bounded track, so an unbreakable value (a commit hash) wraps instead of widening the row. */\n grid-template-columns: minmax(0, 1fr);\n }\n\n .fact dd {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .actions {\n align-items: stretch;\n display: grid;\n gap: var(--rly-space-12);\n grid-column: 4;\n grid-row: 1;\n justify-items: end;\n }\n\n .agentEntry {\n max-inline-size: 100%;\n }\n\n @media (max-width: 64rem) {\n .root {\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n }\n\n .actions {\n align-items: end;\n grid-column: 2;\n grid-row: 2;\n }\n }\n\n @media (max-width: 40rem) {\n .root {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n padding: var(--rly-space-16);\n }\n\n .facts {\n grid-column: auto;\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .actions {\n grid-column: auto;\n grid-row: auto;\n justify-items: stretch;\n }\n\n .previewButton {\n inline-size: 100%;\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { Button } from \"../primitives/Button.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { FreshnessStamp } from \"./FreshnessStamp.js\"\nimport { Person } from \"./Person.js\"\nimport {\n type RlyReleasePresentation,\n type RlyReleaseTransitionNames,\n validateReleasePresentation,\n validateReleaseTransitionNames\n} from \"./ReleasePresentation.js\"\nimport { ReleaseRelay } from \"./ReleaseRelay.js\"\nimport styles from \"./ReleaseRow.module.css\"\n\nexport type {\n RlyReleaseFact,\n RlyReleasePresentation,\n RlyReleaseState,\n RlyReleaseTransitionNames\n} from \"./ReleasePresentation.js\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Props for one complete, caller-owned release presentation row. */\nexport type ReleaseRowProps = Omit<ComponentPropsWithRef<\"article\">, \"children\"> & {\n /** Optional adjacent agent affordance; rly does not assign behavior to it. */\n readonly agentEntry?: ReactNode\n /** Called once when the visible preview action is activated. */\n readonly onPreview: () => void\n /** Visible preview action label. */\n readonly previewLabel?: string\n /** Complete presentation projection supplied by the application. */\n readonly release: RlyReleasePresentation\n /** Optional unique names used while an application-owned View Transition is active. */\n readonly transitionNames?: RlyReleaseTransitionNames\n}\n\n/** Render a full-width release dossier row without deriving release state or readiness. */\nexport const ReleaseRow = ({\n agentEntry,\n className,\n onPreview,\n previewLabel = \"Preview release\",\n release: suppliedRelease,\n transitionNames,\n ...props\n}: ReleaseRowProps): ReactElement => {\n const release = validateReleasePresentation(suppliedRelease)\n const validatedTransitionNames = validateReleaseTransitionNames(transitionNames)\n const visiblePreviewLabel = requireText(previewLabel, \"ReleaseRow previewLabel\")\n const verdictId = `rly-release-row-verdict-${useId()}`\n const freshness =\n release.freshnessDateTime === undefined ? (\n <FreshnessStamp size=\"compact\" state={release.freshness} />\n ) : (\n <FreshnessStamp\n dateTime={release.freshnessDateTime}\n size=\"compact\"\n state={release.freshness}\n time={release.freshnessTime}\n />\n )\n\n return (\n <article\n {...props}\n className={classNames(style(\"root\"), className)}\n data-rly-release-id={release.id}\n data-rly-release-state={release.state}\n >\n <div className={style(\"identity\")}>\n <ReleaseRelay\n algorithm={release.algorithm}\n codename={release.codename}\n data-rly-release-transition-name={validatedTransitionNames?.relay}\n data-rly-release-transition-part=\"relay\"\n size=\"compact\"\n style={\n validatedTransitionNames === undefined ? undefined : { viewTransitionName: validatedTransitionNames.relay }\n }\n symbolIndices={release.symbolIndices}\n />\n <p\n className={style(\"version\")}\n data-rly-release-transition-name={validatedTransitionNames?.version}\n data-rly-release-transition-part=\"version\"\n style={\n validatedTransitionNames === undefined\n ? undefined\n : { viewTransitionName: validatedTransitionNames.version }\n }\n >\n {release.version}\n </p>\n {freshness}\n </div>\n\n <section\n aria-labelledby={verdictId}\n className={style(\"verdictBlock\")}\n data-rly-release-transition-name={validatedTransitionNames?.verdict}\n data-rly-release-transition-part=\"verdict\"\n style={\n validatedTransitionNames === undefined ? undefined : { viewTransitionName: validatedTransitionNames.verdict }\n }\n >\n <h2 className={style(\"verdict\")} id={verdictId}>\n {release.verdict}\n </h2>\n <p className={style(\"reason\")}>{release.reason}</p>\n </section>\n\n <div className={style(\"people\")}>\n <div className={style(\"personGroup\")}>\n <span className={style(\"eyebrow\")}>Owner</span>\n {release.owner === undefined ? (\n <span className={style(\"unassigned\")} data-rly-release-owner=\"unassigned\">\n Unassigned\n </span>\n ) : (\n <Person person={release.owner} size=\"compact\" />\n )}\n </div>\n {release.approver === undefined ? null : (\n <div className={style(\"personGroup\")}>\n <span className={style(\"eyebrow\")}>Approver</span>\n <Person person={release.approver} size=\"compact\" />\n </div>\n )}\n </div>\n\n <dl className={style(\"facts\")}>\n {release.facts.map((fact) => (\n <div className={style(\"fact\")} data-rly-release-fact={fact.id} key={fact.id}>\n <dt>{fact.label}</dt>\n <dd>{fact.value}</dd>\n </div>\n ))}\n </dl>\n\n <div className={style(\"actions\")}>\n <Button className={style(\"previewButton\")} onClick={onPreview} size=\"default\">\n {visiblePreviewLabel}\n </Button>\n {agentEntry === undefined ? null : <div className={style(\"agentEntry\")}>{agentEntry}</div>}\n </div>\n </article>\n )\n}\n","@layer rly.components {\n .root {\n display: grid;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .heading {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .list {\n display: flex;\n list-style: none;\n margin: var(--rly-space-0);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .item {\n flex: 1 1 var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n padding-inline-end: var(--rly-space-32);\n position: relative;\n }\n\n .item:last-child {\n padding-inline-end: var(--rly-space-0);\n }\n\n .marker {\n align-items: center;\n background: var(--rly-color-surface-1);\n block-size: var(--rly-space-24);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-round);\n color: var(--rly-color-text-2);\n display: inline-flex;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n inline-size: var(--rly-space-24);\n justify-content: center;\n position: relative;\n z-index: 1;\n }\n\n .connector {\n background: var(--rly-color-border-2);\n block-size: 1px;\n inset-block-start: calc(var(--rly-space-12) - 1px);\n inset-inline-end: var(--rly-space-0);\n inset-inline-start: var(--rly-space-24);\n position: absolute;\n }\n\n .content {\n align-items: start;\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n padding-block-start: var(--rly-space-12);\n }\n\n .name {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .reason,\n .empty {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .compact {\n gap: var(--rly-space-12);\n }\n .defaultSize {\n gap: var(--rly-space-20);\n }\n .compact .heading,\n .compact .name {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n letter-spacing: var(--rly-type-label-tracking);\n }\n .compact .content {\n gap: var(--rly-space-8);\n }\n .compact .reason,\n .compact .empty {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .long .list,\n .long .item {\n display: grid;\n }\n .long .list {\n gap: var(--rly-space-0);\n }\n .long .item {\n grid-template-columns: var(--rly-space-24) minmax(var(--rly-space-0), 1fr);\n padding-block-end: var(--rly-space-24);\n padding-inline-end: var(--rly-space-0);\n }\n .long .item:last-child {\n padding-block-end: var(--rly-space-0);\n }\n .long .connector {\n block-size: auto;\n inline-size: 1px;\n inset-block-end: var(--rly-space-0);\n inset-block-start: var(--rly-space-24);\n inset-inline-end: auto;\n inset-inline-start: calc(var(--rly-space-12) - 1px);\n }\n .long .content {\n padding-block-start: var(--rly-space-0);\n padding-inline-start: var(--rly-space-12);\n }\n\n @media (max-width: 40rem) {\n .list,\n .item {\n display: grid;\n }\n .list {\n gap: var(--rly-space-0);\n }\n .item {\n grid-template-columns: var(--rly-space-24) minmax(var(--rly-space-0), 1fr);\n padding-block-end: var(--rly-space-24);\n padding-inline-end: var(--rly-space-0);\n }\n .item:last-child {\n padding-block-end: var(--rly-space-0);\n }\n .connector {\n block-size: auto;\n inline-size: 1px;\n inset-block-end: var(--rly-space-0);\n inset-block-start: var(--rly-space-24);\n inset-inline-end: auto;\n inset-inline-start: calc(var(--rly-space-12) - 1px);\n }\n .content {\n padding-block-start: var(--rly-space-0);\n padding-inline-start: var(--rly-space-12);\n }\n }\n\n /* Words: one line of \"Name state\" pairs, commas between them, no chips or markers. */\n /* Words: no heading row, so the list sits flush in the row or fact around it. */\n .words {\n gap: var(--rly-space-0);\n }\n\n .wordList {\n display: flex;\n flex-wrap: wrap;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n gap: var(--rly-space-2) var(--rly-space-4);\n list-style: none;\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .word {\n color: var(--rly-color-text-1);\n min-inline-size: var(--rly-space-0);\n }\n\n .wordState {\n color: var(--rly-color-text-2);\n }\n\n .wordState[data-rly-stage-word=\"blocked\"] {\n color: var(--rly-color-blocked-ink);\n font-weight: 600;\n }\n\n .wordState[data-rly-stage-word=\"held\"] {\n color: var(--rly-color-held-ink);\n font-weight: 600;\n }\n\n .wordReason {\n color: var(--rly-color-text-2);\n overflow-wrap: break-word;\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { StateLabel, type RlyStateTone } from \"../primitives/StateLabel.js\"\nimport { Person, type RlyPerson } from \"./Person.js\"\nimport styles from \"./StageRail.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Machine-readable StageRail density choices. */\nexport const RLY_STAGE_RAIL_VARIANTS = defineVariants({\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Dense release and entity stage summaries\",\n tokens: [\"space-24\", \"space-8\", \"type-label\", \"type-meta\"]\n },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard stage progression with supporting context\",\n tokens: [\"space-24\", \"space-12\", \"type-card-title\", \"type-body\"]\n },\n words: {\n className: style(\"words\"),\n purpose:\n \"Stages as one line of words inside a row or fact (no markers, chips or owners); only blocking and held states take ink\",\n tokens: [\"type-meta\", \"color-text-1\", \"color-text-2\", \"color-blocked-ink\", \"color-held-ink\"]\n }\n }\n})\n\n/** Default StageRail density. */\nexport const RLY_STAGE_RAIL_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n\n/** Visual density supported by StageRail. */\nexport type RlyStageRailSize = keyof typeof RLY_STAGE_RAIL_VARIANTS.size\n\n/** Presentation-only stage supplied in application-defined order. */\nexport interface RlyStage {\n readonly id: string\n readonly name: string\n readonly owner?: RlyPerson\n readonly reason?: string\n readonly state: string\n readonly tone: RlyStateTone\n}\n\n/** Props for a complete, ordered stage progression. */\nexport type StageRailProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly emptyLabel?: string\n readonly heading: string\n readonly size?: RlyStageRailSize\n readonly stages: ReadonlyArray<RlyStage>\n}\n\nconst validateStages = (stages: ReadonlyArray<RlyStage>): ReadonlyArray<RlyStage> => {\n const ids = new Set<string>()\n for (const stage of stages) {\n const id = requireText(stage.id, \"StageRail stage id\")\n requireText(stage.name, `StageRail name for ${id}`)\n requireText(stage.state, `StageRail state for ${id}`)\n if (stage.reason !== undefined) requireText(stage.reason, `StageRail reason for ${id}`)\n if (ids.has(id)) throw new Error(`StageRail stage ids must be unique: ${id}`)\n ids.add(id)\n }\n return stages\n}\n\nconst wordTone = (tone: RlyStateTone): \"blocked\" | \"held\" | \"quiet\" =>\n tone === \"critical\" ? \"blocked\" : tone === \"caution\" ? \"held\" : \"quiet\"\n\n/**\n * Render every supplied stage as an ordered, color-independent progression. The `words` size\n * reads as a sentence (\"Build succeeded, Staging failed: integration tests, Prod waiting\") for\n * rows and facts: it renders no heading or landmark, only a list named by `heading`, so a long\n * list of rows does not become a long list of regions.\n */\nexport const StageRail = ({\n className,\n emptyLabel = \"No stages recorded.\",\n heading,\n size = \"default\",\n stages: suppliedStages,\n ...props\n}: StageRailProps): ReactElement => {\n const visibleHeading = requireText(heading, \"StageRail heading\")\n const visibleEmptyLabel = requireText(emptyLabel, \"StageRail emptyLabel\")\n const stages = validateStages(suppliedStages)\n const headingId = `rly-stage-rail-${useId()}`\n\n return (\n <section\n {...props}\n aria-labelledby={size === \"words\" ? undefined : headingId}\n className={classNames(\n style(\"root\"),\n RLY_STAGE_RAIL_VARIANTS.size[size].className,\n stages.length > 6 && style(\"long\"),\n className\n )}\n data-rly-stage-rail-size={size}\n >\n {size === \"words\" ? null : (\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n )}\n {stages.length === 0 ? (\n <p className={style(\"empty\")}>{visibleEmptyLabel}</p>\n ) : size === \"words\" ? (\n <ol aria-label={visibleHeading} className={style(\"wordList\")}>\n {stages.map((stage, index) => (\n <li className={style(\"word\")} data-rly-stage-id={stage.id} key={stage.id}>\n {stage.name}{\" \"}\n <span className={style(\"wordState\")} data-rly-stage-word={wordTone(stage.tone)}>\n {stage.state}\n </span>\n {stage.reason === undefined ? null : <span className={style(\"wordReason\")}>: {stage.reason}</span>}\n {index === stages.length - 1 ? null : \",\"}\n </li>\n ))}\n </ol>\n ) : (\n <ol className={style(\"list\")}>\n {stages.map((stage, index) => (\n <li className={style(\"item\")} data-rly-stage-id={stage.id} key={stage.id}>\n <span aria-hidden=\"true\" className={style(\"marker\")} data-rly-stage-marker=\"\">\n {index + 1}\n </span>\n {index === stages.length - 1 ? null : (\n <span aria-hidden=\"true\" className={style(\"connector\")} data-rly-stage-connector=\"\" />\n )}\n <div className={style(\"content\")}>\n <h3 className={style(\"name\")}>{stage.name}</h3>\n <StateLabel label={stage.state} size={size === \"default\" ? \"default\" : \"compact\"} tone={stage.tone} />\n {stage.reason === undefined ? null : <p className={style(\"reason\")}>{stage.reason}</p>}\n {stage.owner === undefined ? null : <Person person={stage.owner} size={size} />}\n </div>\n </li>\n ))}\n </ol>\n )}\n </section>\n )\n}\n","@layer rly.components {\n .root {\n align-items: start;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-16);\n grid-template-columns: 8rem var(--rly-space-24) minmax(var(--rly-space-0), 1fr) minmax(var(--rly-space-0), auto);\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-12);\n }\n\n .time {\n color: var(--rly-color-text-2);\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n overflow-wrap: break-word;\n padding-block-start: var(--rly-space-2);\n }\n\n .marker {\n align-self: stretch;\n display: grid;\n grid-template-rows: var(--rly-space-24) minmax(var(--rly-space-0), 1fr);\n justify-items: center;\n min-block-size: var(--rly-space-40);\n }\n\n .dot {\n align-self: center;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-round);\n block-size: var(--rly-space-8);\n inline-size: var(--rly-space-8);\n }\n\n .connector {\n background: var(--rly-color-border-1);\n inline-size: 1px;\n min-block-size: var(--rly-space-24);\n }\n\n .content,\n .meta {\n min-inline-size: var(--rly-space-0);\n }\n\n .content {\n display: grid;\n gap: var(--rly-space-6);\n }\n\n .title {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .link {\n border-radius: var(--rly-radius-tag);\n color: inherit;\n outline-offset: var(--rly-focus-ring-offset);\n text-decoration-color: var(--rly-color-border-2);\n text-underline-offset: var(--rly-space-4);\n }\n\n .link:hover {\n text-decoration-color: currentcolor;\n }\n\n .link:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n }\n\n .detail {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n text-wrap: pretty;\n }\n\n .meta {\n align-content: start;\n display: grid;\n gap: var(--rly-space-8);\n justify-items: start;\n }\n\n .actorKind {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n text-transform: uppercase;\n }\n\n .actor {\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n @media (max-width: 30rem) {\n .root {\n gap: var(--rly-space-8) var(--rly-space-12);\n grid-template-columns: var(--rly-space-24) minmax(var(--rly-space-0), 1fr);\n padding-block: var(--rly-space-16);\n }\n\n .time {\n grid-column: 2;\n grid-row: 1;\n }\n\n .marker {\n grid-column: 1;\n grid-row: 1 / 4;\n }\n\n .content {\n grid-column: 2;\n grid-row: 2;\n }\n\n .meta {\n align-items: start;\n grid-column: 2;\n grid-row: 3;\n }\n }\n\n /* Provenance shapes: they keep their meaning in forced colours (shape, not hue). */\n .markAuto,\n .markApproved,\n .markPending,\n .markUnknown,\n .markFlag {\n align-self: center;\n block-size: 10px;\n box-sizing: border-box;\n display: inline-block;\n inline-size: 10px;\n }\n\n .markAuto {\n border: var(--rly-space-2) solid var(--rly-color-text-2);\n border-radius: var(--rly-radius-round);\n }\n\n .markApproved {\n background: var(--rly-color-text-1);\n border-radius: var(--rly-radius-round);\n }\n\n .markPending {\n background: var(--rly-color-held-ink);\n rotate: 45deg;\n }\n\n .markFlag {\n background: var(--rly-color-held-ink);\n clip-path: polygon(50% 0, 100% 100%, 0 100%);\n }\n\n .markUnknown {\n background: repeating-linear-gradient(\n 135deg,\n var(--rly-color-text-2) 0 var(--rly-space-2),\n transparent var(--rly-space-2) var(--rly-space-4)\n );\n border: 1px solid var(--rly-color-text-2);\n }\n\n .provenance {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n margin: var(--rly-space-0);\n }\n\n .provenance[data-rly-timeline-provenance-label=\"pending\"] {\n color: var(--rly-color-held-ink);\n }\n\n .key {\n color: var(--rly-color-text-2);\n display: flex;\n list-style: none;\n padding: var(--rly-space-0);\n flex-wrap: wrap;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n gap: var(--rly-space-6) var(--rly-space-16);\n margin: var(--rly-space-0);\n }\n\n .keyItem {\n align-items: center;\n display: inline-flex;\n gap: var(--rly-space-6);\n white-space: nowrap;\n }\n\n /*\n * Forced colours drop background fills and may flatten the unknown hatch, which would leave it\n * looking like auto's ring. Draw fills and the hatch in system colours instead. The same rules\n * apply under the Storybook toolbar's forced-colours attribute.\n */\n @media (forced-colors: active) {\n .markApproved,\n .markPending,\n .markFlag {\n background: CanvasText;\n forced-color-adjust: none;\n }\n\n .markUnknown {\n background: repeating-linear-gradient(135deg, CanvasText 0 2px, Canvas 2px 4px);\n border-color: CanvasText;\n forced-color-adjust: none;\n }\n\n .markAuto {\n border-color: CanvasText;\n }\n }\n\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .markApproved,\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .markPending,\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .markFlag {\n background: CanvasText;\n forced-color-adjust: none;\n }\n\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .markUnknown {\n background: repeating-linear-gradient(135deg, CanvasText 0 2px, Canvas 2px 4px);\n border-color: CanvasText;\n forced-color-adjust: none;\n }\n\n :where([data-forced-colors=\"active\"], [data-rly-forced-colors=\"active\"]) .markAuto {\n border-color: CanvasText;\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, type ReactNode, useId } from \"react\"\nimport { RlyLink } from \"../foundations/LinkProvider.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { ServiceMark, type RlyService } from \"./ServiceMark.js\"\nimport styles from \"./TimelineRow.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Explicit actor identities supported by normalized activity presentation. */\nexport type RlyTimelineActorKind = \"human\" | \"agent\" | \"plugin\" | \"system\"\n\n/**\n * How an event changed the record, told apart by shape and by a visible label:\n * `auto` was applied automatically (an observation), `approved` was approved by a person,\n * `pending` waits for approval, `unknown` could not be read and changed nothing, and `flag`\n * only raised a flag.\n */\nexport type RlyTimelineProvenanceKind = \"auto\" | \"approved\" | \"pending\" | \"unknown\" | \"flag\"\n\n/** The provenance of one event: its kind and the words that say it (\"Applied automatically, from GitHub\"). */\nexport interface RlyTimelineProvenance {\n readonly kind: RlyTimelineProvenanceKind\n readonly label: string\n}\n\n/** One application-supplied activity record with no time or provenance derivation. */\nexport interface RlyTimelineEvent {\n readonly actor?: ReactNode\n readonly actorKind: RlyTimelineActorKind\n readonly dateTime: string\n readonly detail: string\n readonly href?: string\n readonly id: string\n /** Optional provenance; when given, the marker takes its shape and its label is shown. */\n readonly provenance?: RlyTimelineProvenance\n readonly service?: RlyService\n readonly time: string\n readonly title: string\n}\n\n/** Props for one native timeline list item. */\nexport type TimelineRowProps = Omit<ComponentPropsWithRef<\"li\">, \"children\"> & {\n /** Whether the neutral chronology line continues to the following item. */\n readonly continued: boolean\n readonly event: RlyTimelineEvent\n}\n\nconst actorLabels = {\n human: \"Human\",\n agent: \"Agent\",\n plugin: \"Plugin\",\n system: \"System\"\n} satisfies Readonly<Record<RlyTimelineActorKind, string>>\n\nconst provenanceMarkClass = {\n auto: \"markAuto\",\n approved: \"markApproved\",\n pending: \"markPending\",\n unknown: \"markUnknown\",\n flag: \"markFlag\"\n} satisfies Readonly<Record<RlyTimelineProvenanceKind, string>>\n\nconst validateEvent = (event: RlyTimelineEvent): RlyTimelineEvent => {\n requireText(event.id, \"TimelineRow event id\")\n requireText(event.title, \"TimelineRow event title\")\n requireText(event.detail, \"TimelineRow event detail\")\n requireText(event.dateTime, \"TimelineRow event dateTime\")\n requireText(event.time, \"TimelineRow event time\")\n if (event.href !== undefined) requireText(event.href, \"TimelineRow event href\")\n if (event.provenance !== undefined) {\n if (!Object.hasOwn(provenanceMarkClass, event.provenance.kind)) {\n throw new Error(\"TimelineRow provenance kind must be auto, approved, pending, unknown, or flag\")\n }\n requireText(event.provenance.label, \"TimelineRow provenance label\")\n }\n if (!Object.hasOwn(actorLabels, event.actorKind)) {\n throw new Error(\"TimelineRow event actorKind must be human, agent, plugin, or system\")\n }\n return event\n}\n\n/** Render a complete activity record without owning filtering, grouping, or live announcements. */\nexport const TimelineRow = ({\n className,\n continued,\n event: suppliedEvent,\n ...props\n}: TimelineRowProps): ReactElement => {\n const event = validateEvent(suppliedEvent)\n const titleId = `rly-timeline-row-${useId()}`\n const title = (\n <h2 className={style(\"title\")} id={titleId}>\n {event.title}\n </h2>\n )\n\n return (\n <li\n {...props}\n className={classNames(style(\"root\"), className)}\n data-rly-timeline-actor={event.actorKind}\n data-rly-timeline-event-id={event.id}\n >\n <time className={style(\"time\")} dateTime={event.dateTime}>\n {event.time}\n </time>\n <span aria-hidden=\"true\" className={style(\"marker\")}>\n <span\n className={event.provenance === undefined ? style(\"dot\") : style(provenanceMarkClass[event.provenance.kind])}\n data-rly-timeline-provenance={event.provenance?.kind}\n />\n {continued ? <span className={style(\"connector\")} data-rly-timeline-connector=\"\" /> : null}\n </span>\n <article aria-labelledby={titleId} className={style(\"content\")}>\n {event.href === undefined ? (\n title\n ) : (\n <RlyLink className={style(\"link\")} href={event.href}>\n {title}\n </RlyLink>\n )}\n <p className={style(\"detail\")}>{event.detail}</p>\n {event.provenance === undefined ? null : (\n <p className={style(\"provenance\")} data-rly-timeline-provenance-label={event.provenance.kind}>\n {event.provenance.label}\n </p>\n )}\n </article>\n <div className={style(\"meta\")}>\n <span className={style(\"actorKind\")}>{actorLabels[event.actorKind]}</span>\n {event.service === undefined ? null : <ServiceMark service={event.service} size=\"compact\" />}\n {event.actor === undefined ? null : <div className={style(\"actor\")}>{event.actor}</div>}\n </div>\n </li>\n )\n}\n\nconst keyLabels = {\n auto: \"applied automatically\",\n approved: \"approved\",\n pending: \"waiting for approval\",\n unknown: \"couldn't read\",\n flag: \"flag only\"\n} satisfies Readonly<Record<RlyTimelineProvenanceKind, string>>\n\n/** Props for the legend of provenance shapes shown beside a timeline. */\nexport type TimelineProvenanceKeyProps = Omit<ComponentPropsWithRef<\"ul\">, \"children\"> & {\n /** Kinds to explain, in order. Defaults to every kind. */\n readonly kinds?: ReadonlyArray<RlyTimelineProvenanceKind>\n /** Required accessible name of the legend, such as \"Observation key\". */\n readonly label: string\n /** Words per kind, when the application's wording differs from the defaults. */\n readonly labels?: Partial<Readonly<Record<RlyTimelineProvenanceKind, string>>>\n}\n\n/** The key for provenance shapes: a named list, each shape beside its words, kept together when it wraps. */\nexport const TimelineProvenanceKey = ({\n className,\n kinds = [\"auto\", \"approved\", \"pending\", \"unknown\", \"flag\"],\n label,\n labels = {},\n ...props\n}: TimelineProvenanceKeyProps): ReactElement => (\n <ul\n {...props}\n aria-label={requireText(label, \"TimelineProvenanceKey label\")}\n className={classNames(style(\"key\"), className)}\n role=\"list\"\n >\n {kinds.map((kind) => (\n <li className={style(\"keyItem\")} key={kind}>\n <span aria-hidden=\"true\" className={style(provenanceMarkClass[kind])} data-rly-timeline-provenance={kind} />{\" \"}\n {labels[kind] ?? keyLabels[kind]}\n </li>\n ))}\n </ul>\n)\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n container-type: inline-size;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .heading {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .dimensions {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n grid-template-columns: minmax(var(--rly-space-0), 1.15fr) minmax(var(--rly-space-0), 1fr) minmax(\n var(--rly-space-0),\n 1fr\n );\n min-inline-size: var(--rly-space-0);\n }\n\n .dimension {\n align-content: start;\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-16);\n }\n\n .dimension + .dimension {\n border-inline-start: 1px solid var(--rly-color-border-1);\n }\n\n .dimensionHeading {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n }\n\n .dimensionHeading h3,\n .gaps h4 {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n margin: var(--rly-space-0);\n overflow-wrap: break-word;\n }\n\n .list,\n .gapList,\n .keyList {\n list-style: none;\n margin: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-0);\n }\n\n .list,\n .gapList {\n display: grid;\n }\n\n .item,\n .gap {\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-12);\n }\n\n .item:first-child,\n .gap:first-child {\n padding-block-start: var(--rly-space-4);\n }\n\n .item + .item,\n .gap + .gap {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .identity,\n .link {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .link {\n border-radius: var(--rly-radius-tag);\n color: inherit;\n outline-offset: var(--rly-focus-ring-offset);\n text-decoration-color: var(--rly-color-border-2);\n text-underline-offset: var(--rly-space-2);\n }\n\n .link:hover {\n text-decoration-color: currentcolor;\n }\n\n .link:focus-visible {\n outline: var(--rly-focus-ring-width) solid var(--rly-color-focus);\n }\n\n .itemTitle,\n .gap strong {\n color: var(--rly-color-text-1);\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: break-word;\n }\n\n .reference,\n .empty,\n .conceptLabel,\n .emptyLink,\n .keyList,\n .gap span {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n overflow-wrap: break-word;\n }\n\n .empty {\n margin: var(--rly-space-0);\n }\n\n .linkedWork {\n display: grid;\n gap: var(--rly-space-6);\n }\n\n .conceptLabel {\n font-weight: 650;\n text-transform: uppercase;\n }\n\n .keyList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-6);\n }\n\n .keyList li {\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-tag);\n padding: var(--rly-space-2) var(--rly-space-6);\n }\n\n .gaps {\n border-block-start: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-8);\n padding-block-start: var(--rly-space-12);\n }\n\n .gap {\n padding-inline-start: var(--rly-space-0);\n }\n\n @container (max-width: 48rem) {\n .dimensions {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .dimension + .dimension {\n border-block-start: 1px solid var(--rly-color-border-1);\n border-inline-start: 0;\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { RlyLink } from \"../foundations/LinkProvider.js\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport { StateLabel, type RlyStateTone } from \"../primitives/StateLabel.js\"\nimport { Person, type RlyPerson } from \"./Person.js\"\nimport { ServiceMark, RLY_SERVICE_MARK_VARIANTS, type RlyService } from \"./ServiceMark.js\"\nimport { type RlyStage, StageRail } from \"./StageRail.js\"\nimport styles from \"./WorksetCard.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** One presenter-owned Jira work item. */\nexport interface RlyWorksetJiraItem {\n readonly id: string\n readonly key: string\n readonly title: string\n readonly state: string\n readonly tone: RlyStateTone\n readonly href?: string\n readonly owner?: RlyPerson\n}\n\n/** One presenter-owned pull-request grouping with every linked Jira key supplied explicitly. */\nexport interface RlyWorksetPullRequestGroup {\n readonly id: string\n readonly title: string\n readonly reference: string\n readonly state: string\n readonly tone: RlyStateTone\n readonly href?: string\n readonly linkedJiraKeys: ReadonlyArray<string>\n readonly author?: RlyPerson\n}\n\n/** An explicit missing relationship; WorksetCard never invents gaps from other arrays. */\nexport interface RlyWorksetGap {\n readonly id: string\n readonly label: string\n readonly reason: string\n readonly service: RlyService\n}\n\n/** One presenter-owned pipeline execution and its complete ordered stage projection. */\nexport interface RlyWorksetPipeline {\n readonly id: string\n readonly title: string\n readonly reference: string\n readonly state: string\n readonly tone: RlyStateTone\n readonly href?: string\n readonly stages: ReadonlyArray<RlyStage>\n readonly operator?: RlyPerson\n readonly approver?: RlyPerson\n}\n\n/** Presentation-only release work dimensions supplied in application-defined order. */\nexport type WorksetCardProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly heading: string\n readonly jiraItems: ReadonlyArray<RlyWorksetJiraItem>\n readonly pullRequestGroups: ReadonlyArray<RlyWorksetPullRequestGroup>\n readonly gaps: ReadonlyArray<RlyWorksetGap>\n readonly pipelines: ReadonlyArray<RlyWorksetPipeline>\n readonly jiraEmptyLabel?: string\n readonly pullRequestEmptyLabel?: string\n readonly gapEmptyLabel?: string\n readonly pipelineEmptyLabel?: string\n}\n\nconst validateHref = (href: string | undefined, context: string): void => {\n if (href !== undefined) requireText(href, `${context} href`)\n}\n\nconst validateUniqueId = (id: string, ids: Set<string>, context: string): string => {\n const visibleId = requireText(id, `${context} id`)\n if (ids.has(visibleId)) throw new Error(`${context} ids must be unique: ${visibleId}`)\n ids.add(visibleId)\n return visibleId\n}\n\nconst validateJiraItems = (items: ReadonlyArray<RlyWorksetJiraItem>): void => {\n const ids = new Set<string>()\n for (const item of items) {\n const id = validateUniqueId(item.id, ids, \"WorksetCard Jira item\")\n requireText(item.key, `WorksetCard Jira key for ${id}`)\n requireText(item.title, `WorksetCard Jira title for ${id}`)\n requireText(item.state, `WorksetCard Jira state for ${id}`)\n validateHref(item.href, `WorksetCard Jira item ${id}`)\n }\n}\n\nconst validatePullRequestGroups = (groups: ReadonlyArray<RlyWorksetPullRequestGroup>): void => {\n const ids = new Set<string>()\n for (const group of groups) {\n const id = validateUniqueId(group.id, ids, \"WorksetCard pull request group\")\n requireText(group.title, `WorksetCard pull request title for ${id}`)\n requireText(group.reference, `WorksetCard pull request reference for ${id}`)\n requireText(group.state, `WorksetCard pull request state for ${id}`)\n validateHref(group.href, `WorksetCard pull request group ${id}`)\n for (const key of group.linkedJiraKeys) requireText(key, `WorksetCard linked Jira key for ${id}`)\n }\n}\n\nconst validateGaps = (gaps: ReadonlyArray<RlyWorksetGap>): void => {\n const ids = new Set<string>()\n for (const gap of gaps) {\n const id = validateUniqueId(gap.id, ids, \"WorksetCard gap\")\n requireText(gap.label, `WorksetCard gap label for ${id}`)\n requireText(gap.reason, `WorksetCard gap reason for ${id}`)\n if (!Object.hasOwn(RLY_SERVICE_MARK_VARIANTS.service, gap.service)) {\n throw new Error(`WorksetCard gap service for ${id} must be supported`)\n }\n }\n}\n\nconst validatePipelines = (pipelines: ReadonlyArray<RlyWorksetPipeline>): void => {\n const ids = new Set<string>()\n for (const pipeline of pipelines) {\n const id = validateUniqueId(pipeline.id, ids, \"WorksetCard pipeline\")\n requireText(pipeline.title, `WorksetCard pipeline title for ${id}`)\n requireText(pipeline.reference, `WorksetCard pipeline reference for ${id}`)\n requireText(pipeline.state, `WorksetCard pipeline state for ${id}`)\n validateHref(pipeline.href, `WorksetCard pipeline ${id}`)\n }\n}\n\ninterface LinkedIdentityProps {\n readonly href?: string\n readonly reference: string\n readonly title: string\n}\n\nconst LinkedIdentity = ({ href, reference, title }: LinkedIdentityProps): ReactElement => {\n const identity = (\n <span className={style(\"identity\")}>\n <span className={style(\"itemTitle\")}>{title}</span>\n <span className={style(\"reference\")}>{reference}</span>\n </span>\n )\n return href === undefined ? (\n identity\n ) : (\n <RlyLink className={style(\"link\")} href={href}>\n {identity}\n </RlyLink>\n )\n}\n\n/** Render Jira, PR, and pipeline dimensions as one complete release work surface. */\nexport const WorksetCard = ({\n className,\n gapEmptyLabel = \"No relationship gaps recorded.\",\n gaps,\n heading,\n jiraEmptyLabel = \"No Jira work recorded.\",\n jiraItems,\n pipelineEmptyLabel = \"No pipeline delivery recorded.\",\n pipelines,\n pullRequestEmptyLabel = \"No pull request groups recorded.\",\n pullRequestGroups,\n ...props\n}: WorksetCardProps): ReactElement => {\n const visibleHeading = requireText(heading, \"WorksetCard heading\")\n const visibleJiraEmpty = requireText(jiraEmptyLabel, \"WorksetCard jiraEmptyLabel\")\n const visiblePullRequestEmpty = requireText(pullRequestEmptyLabel, \"WorksetCard pullRequestEmptyLabel\")\n const visibleGapEmpty = requireText(gapEmptyLabel, \"WorksetCard gapEmptyLabel\")\n const visiblePipelineEmpty = requireText(pipelineEmptyLabel, \"WorksetCard pipelineEmptyLabel\")\n validateJiraItems(jiraItems)\n validatePullRequestGroups(pullRequestGroups)\n validateGaps(gaps)\n validatePipelines(pipelines)\n const headingId = `rly-workset-${useId()}`\n\n return (\n <section {...props} aria-labelledby={headingId} className={classNames(style(\"root\"), className)}>\n <h2 className={style(\"heading\")} id={headingId}>\n {visibleHeading}\n </h2>\n <div className={style(\"dimensions\")}>\n <section className={style(\"dimension\")} data-rly-workset-dimension=\"jira\">\n <div className={style(\"dimensionHeading\")}>\n <ServiceMark service=\"jira\" size=\"compact\" />\n <h3>Jira work</h3>\n </div>\n {jiraItems.length === 0 ? (\n <p className={style(\"empty\")}>{visibleJiraEmpty}</p>\n ) : (\n <ul className={style(\"list\")}>\n {jiraItems.map((item) => (\n <li className={style(\"item\")} data-rly-workset-jira-id={item.id} key={item.id}>\n <LinkedIdentity\n {...(item.href === undefined ? {} : { href: item.href })}\n reference={item.key}\n title={item.title}\n />\n <StateLabel label={item.state} size=\"compact\" tone={item.tone} />\n {item.owner === undefined ? null : <Person person={item.owner} size=\"compact\" />}\n </li>\n ))}\n </ul>\n )}\n </section>\n\n <section className={style(\"dimension\")} data-rly-workset-dimension=\"pull-requests\">\n <div className={style(\"dimensionHeading\")}>\n <ServiceMark service=\"codecommit\" size=\"compact\" />\n <h3>Pull request groups</h3>\n </div>\n {pullRequestGroups.length === 0 ? (\n <p className={style(\"empty\")}>{visiblePullRequestEmpty}</p>\n ) : (\n <ul className={style(\"list\")}>\n {pullRequestGroups.map((group) => (\n <li className={style(\"item\")} data-rly-workset-pr-id={group.id} key={group.id}>\n <LinkedIdentity\n {...(group.href === undefined ? {} : { href: group.href })}\n reference={group.reference}\n title={group.title}\n />\n <StateLabel label={group.state} size=\"compact\" tone={group.tone} />\n <div className={style(\"linkedWork\")}>\n <span className={style(\"conceptLabel\")}>Linked Jira work</span>\n {group.linkedJiraKeys.length === 0 ? (\n <span className={style(\"emptyLink\")}>No Jira links recorded.</span>\n ) : (\n <ul className={style(\"keyList\")}>\n {group.linkedJiraKeys.map((key, index) => (\n <li data-rly-linked-jira-key={key} key={`${key}-${index}`}>\n {key}\n </li>\n ))}\n </ul>\n )}\n </div>\n {group.author === undefined ? null : <Person person={group.author} size=\"compact\" />}\n </li>\n ))}\n </ul>\n )}\n\n <div className={style(\"gaps\")}>\n <h4>Relationship gaps</h4>\n {gaps.length === 0 ? (\n <p className={style(\"empty\")}>{visibleGapEmpty}</p>\n ) : (\n <ul className={style(\"gapList\")}>\n {gaps.map((gap) => (\n <li className={style(\"gap\")} data-rly-workset-gap-id={gap.id} key={gap.id}>\n <ServiceMark service={gap.service} size=\"compact\" />\n <strong>{gap.label}</strong>\n <span>{gap.reason}</span>\n </li>\n ))}\n </ul>\n )}\n </div>\n </section>\n\n <section className={style(\"dimension\")} data-rly-workset-dimension=\"pipelines\">\n <div className={style(\"dimensionHeading\")}>\n <ServiceMark service=\"codepipeline\" size=\"compact\" />\n <h3>Pipeline delivery</h3>\n </div>\n {pipelines.length === 0 ? (\n <p className={style(\"empty\")}>{visiblePipelineEmpty}</p>\n ) : (\n <ul className={style(\"list\")}>\n {pipelines.map((pipeline) => (\n <li className={style(\"item\")} data-rly-workset-pipeline-id={pipeline.id} key={pipeline.id}>\n <LinkedIdentity\n {...(pipeline.href === undefined ? {} : { href: pipeline.href })}\n reference={pipeline.reference}\n title={pipeline.title}\n />\n <StateLabel label={pipeline.state} size=\"compact\" tone={pipeline.tone} />\n {pipeline.operator === undefined ? null : <Person person={pipeline.operator} size=\"compact\" />}\n {pipeline.approver === undefined ? null : <Person person={pipeline.approver} size=\"compact\" />}\n <StageRail heading={`${pipeline.reference} stages`} size=\"compact\" stages={pipeline.stages} />\n </li>\n ))}\n </ul>\n )}\n </section>\n </div>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;GCIMM,KAAS,MAAyBwO,EAASvO,IAAQiQ,CAAI,GAiBvDhQ,WACJ,kBAAC,QAAD;CAAM,eAAY;CAAO,WAAWF,EAAM,MAAM;CAC9C,UAAA,kBAAC,OAAD;EAAK,WAAWA,EAAM,OAAO;EAAG,WAAU;EAAQ,SAAQ;EACxD,UAAA,kBAAC,QAAD;GAAM,GAAE;GAAsD,MAAK;EAAgB,CAAA;CAChF,CAAA;AACD,CAAA,GAOKoQ,MAAsB,EACjC,iBAAc,aACd,cACA,cACA,YACA,kBAAe,WACf,QACA,SACA,GAAGC,QACwC;CAC3C,IAAMC,IAAgBhC,EAAYiC,GAAa,gCAAgC,GACzEC,IAAelC,EAAYmC,GAAW,8BAA8B,GACpEC,IAAiBpC,EAAYqC,GAAS,4BAA4B,GAClEC,IAAsBtC,EAAYuC,GAAc,iCAAiC,GACjFC,IAAaC,MAAQ,KAAA,IAAY,KAAA,IAAYzC,EAAYyC,EAAI,QAAQ,+BAA+B;CAC1G,IAAIA,GAAK,UAAU,KAAA,MAAc,CAAC,OAAO,UAAUA,EAAI,KAAK,KAAKA,EAAI,QAAQ,IAC3E,MAAU,MAAM,6DAA6D;CAG/E,OACE,kBAAC,UAAD;EACE,GAAIV;EACJ,WAAW1B,EAAW3O,EAAM,MAAM,GAAGgR,CAAS;EAC9C,iCAA8B;EAC9B,MAAMC,KAAQ;EAJhB,UAAA;GAME,kBAAC/Q,IAAD,CAAY,CAAA;GACZ,kBAAC,QAAD;IAAM,WAAWF,EAAM,MAAM;IAA7B,UAAA;KACE,kBAAC,QAAD;MAAM,WAAWA,EAAM,QAAQ;MAAI,UAAAsQ;KAAoB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