@agimon-ai/po-web-components 0.0.0-alpha.165 → 0.0.0-alpha.167

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.
Files changed (26) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.mts +2 -2
  3. package/dist/index.mjs +1 -1
  4. package/dist/packages/core/po-core/dist/src/schemas/hubChannel.d.mts.map +1 -1
  5. package/dist/packages/core/po-core/dist/src/web/types/webPlugin.d.mts +6 -0
  6. package/dist/packages/core/po-core/dist/src/web/types/webPlugin.d.mts.map +1 -1
  7. package/dist/packages/core/po-web-components/src/components/MediaViewerDialog.d.mts +8 -2
  8. package/dist/packages/core/po-web-components/src/components/MediaViewerDialog.d.mts.map +1 -1
  9. package/dist/packages/core/po-web-components/src/components/MediaViewerDialog.mjs +1 -1
  10. package/dist/packages/core/po-web-components/src/components/MediaViewerDialog.mjs.map +1 -1
  11. package/dist/packages/core/po-web-components/src/components/ViewableImage.d.mts +6 -2
  12. package/dist/packages/core/po-web-components/src/components/ViewableImage.d.mts.map +1 -1
  13. package/dist/packages/core/po-web-components/src/components/ViewableImage.mjs +1 -1
  14. package/dist/packages/core/po-web-components/src/components/ViewableImage.mjs.map +1 -1
  15. package/dist/packages/core/po-web-components/src/lib/markdownMedia.d.mts +1 -1
  16. package/dist/packages/core/po-web-components/src/lib/markdownMedia.mjs.map +1 -1
  17. package/dist/packages/core/po-web-components/src/lib/markdownMediaSlot.mjs +1 -1
  18. package/dist/packages/core/po-web-components/src/lib/markdownMediaSlot.mjs.map +1 -1
  19. package/dist/src/components/MediaViewerDialog.cjs +1 -1
  20. package/dist/src/components/MediaViewerDialog.cjs.map +1 -1
  21. package/dist/src/components/ViewableImage.cjs +1 -1
  22. package/dist/src/components/ViewableImage.cjs.map +1 -1
  23. package/dist/src/lib/markdownMedia.cjs.map +1 -1
  24. package/dist/src/lib/markdownMediaSlot.cjs +1 -1
  25. package/dist/src/lib/markdownMediaSlot.cjs.map +1 -1
  26. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./src/icons/icons.cjs");const ee=require("./src/lib/cn.cjs"),e=require("./src/components/Accordion.cjs"),t=require("./src/lib/ansiSpans.cjs"),n=require("./src/components/AnsiText.cjs"),r=require("./src/components/Avatar.cjs"),i=require("./src/components/Dot.cjs"),a=require("./src/components/AgentAvatar.cjs"),o=require("./src/components/Badge.cjs"),s=require("./src/components/Tooltip.cjs"),c=require("./src/components/Breadcrumb.cjs"),l=require("./src/components/Spinner.cjs"),u=require("./src/components/Button.cjs"),d=require("./src/components/Dialog.cjs"),f=require("./src/lib/review.cjs"),te=require("./src/components/DiffView.cjs"),ne=require("./src/components/Drawer.cjs"),p=require("./src/components/DropdownMenu.cjs"),re=require("./src/components/Checkbox.cjs"),m=require("./src/lib/editorLanguage.cjs"),ie=require("./src/lib/markdownMediaSlot.cjs"),h=require("./src/lib/markdownMedia.cjs"),g=require("./src/lib/syntaxHighlight.cjs"),_=require("./src/components/SyntaxText.cjs"),v=require("./src/components/CodeBlock.cjs"),ae=require("./src/components/Skeleton.cjs"),oe=require("./src/components/CodeEditor.cjs"),y=require("./src/components/Collapsible.cjs"),b=require("./src/components/Input.cjs"),x=require("./src/lib/optionList.cjs"),S=require("./src/components/OptionList.cjs"),C=require("./src/components/Command.cjs"),se=require("./src/components/EmptyState.cjs"),w=require("./src/lib/files.cjs"),T=require("./src/components/Tabs.cjs"),E=require("./src/components/FileBrowser.cjs"),ce=require("./src/components/MediaViewerDialog.cjs"),D=require("./src/components/Markdown.cjs"),le=require("./src/components/FilePreview.cjs"),O=require("./src/lib/fileDownload.cjs"),k=require("./src/components/FlowGraph.cjs"),A=require("./src/lib/hashlineHighlight.cjs"),ue=require("./src/components/HashlineLines.cjs"),de=require("./src/components/Kbd.cjs"),j=require("./src/components/McpToolWidget.cjs"),fe=require("./src/components/Label.cjs"),pe=require("./src/components/ViewableImage.cjs"),me=require("./src/lib/media.cjs"),M=require("./src/components/PdfPreview.cjs"),he=require("./src/components/MediaPreview.cjs"),N=require("./src/components/StatusBadge.cjs"),P=require("./src/components/MessageItem.cjs"),F=require("./src/components/MessageLines.cjs"),I=require("./src/components/Panel.cjs"),L=require("./src/components/Popover.cjs"),R=require("./src/components/Picker.cjs"),z=require("./src/lib/profilePicker.cjs"),B=require("./src/components/ProfilePicker.cjs"),V=require("./src/lib/runDuration.cjs"),H=require("./src/components/LiveDuration.cjs"),ge=require("./src/components/Progress.cjs"),U=require("./src/components/RadioGroup.cjs"),_e=require("./src/components/Textarea.cjs"),ve=require("./src/components/ReviewCommentDraft.cjs"),W=require("./src/components/ScrollArea.cjs"),ye=require("./src/components/SectionLabel.cjs"),G=require("./src/components/Select.cjs"),be=require("./src/components/Separator.cjs"),K=require("./src/components/Settings.cjs"),xe=require("./src/components/SetupRow.cjs"),q=require("./src/components/Sheet.cjs"),Se=require("./src/components/StreamCursor.cjs"),Ce=require("./src/components/Switch.cjs"),we=require("./src/components/TerminalView.cjs"),J=require("./src/components/Toast.cjs"),Te=require("./src/components/PathText.cjs"),Ee=require("./src/components/ToolPathLink.cjs"),De=require("./src/lib/collapse.cjs"),Y=require("./src/lib/hashlineView.cjs"),X=require("./src/lib/pathGroups.cjs"),Z=require("./src/lib/tone.cjs"),Oe=require("./src/types/editor.cjs"),Q=require("./src/types/tone.cjs");let $=require("lucide-react");exports.ACCENT_TONES=Q.ACCENT_TONES,exports.Accordion=e.Accordion,exports.AccordionContent=e.AccordionContent,exports.AccordionItem=e.AccordionItem,exports.AccordionTrigger=e.AccordionTrigger,Object.defineProperty(exports,"ActivityIcon",{enumerable:!0,get:function(){return $.Activity}}),exports.AgentAvatar=a.AgentAvatar,Object.defineProperty(exports,"AlertIcon",{enumerable:!0,get:function(){return $.CircleAlert}}),exports.AnsiLine=n.AnsiLine,exports.AnsiText=n.AnsiText,Object.defineProperty(exports,"AppWindowIcon",{enumerable:!0,get:function(){return $.AppWindow}}),Object.defineProperty(exports,"ArrowLeftIcon",{enumerable:!0,get:function(){return $.ArrowLeft}}),Object.defineProperty(exports,"ArrowRightIcon",{enumerable:!0,get:function(){return $.ArrowRight}}),Object.defineProperty(exports,"ArrowUpRightIcon",{enumerable:!0,get:function(){return $.ArrowUpRight}}),Object.defineProperty(exports,"AudioLinesIcon",{enumerable:!0,get:function(){return $.AudioLines}}),exports.Avatar=r.Avatar,exports.AvatarFallback=r.AvatarFallback,exports.AvatarImage=r.AvatarImage,exports.BREADCRUMB_ELLIPSIS=c.BREADCRUMB_ELLIPSIS,exports.Badge=o.Badge,Object.defineProperty(exports,"BellIcon",{enumerable:!0,get:function(){return $.Bell}}),Object.defineProperty(exports,"BookmarkPlusIcon",{enumerable:!0,get:function(){return $.BookmarkPlus}}),Object.defineProperty(exports,"BoxIcon",{enumerable:!0,get:function(){return $.Square}}),Object.defineProperty(exports,"BranchIcon",{enumerable:!0,get:function(){return $.GitBranch}}),exports.Breadcrumb=c.Breadcrumb,exports.Button=u.Button,exports.CHIP_TONES=Q.CHIP_TONES,exports.CHIP_TO_STATUS=Z.CHIP_TO_STATUS,Object.defineProperty(exports,"CalendarIcon",{enumerable:!0,get:function(){return $.Calendar}}),Object.defineProperty(exports,"CheckIcon",{enumerable:!0,get:function(){return $.Check}}),exports.Checkbox=re.Checkbox,Object.defineProperty(exports,"ChevronDownIcon",{enumerable:!0,get:function(){return $.ChevronDown}}),Object.defineProperty(exports,"ChevronRightIcon",{enumerable:!0,get:function(){return $.ChevronRight}}),Object.defineProperty(exports,"ChevronUpIcon",{enumerable:!0,get:function(){return $.ChevronUp}}),Object.defineProperty(exports,"CloseIcon",{enumerable:!0,get:function(){return $.X}}),exports.CodeBlock=v.CodeBlock,exports.CodeEditor=oe.CodeEditor,exports.Collapsible=y.Collapsible,exports.CollapsibleContent=y.CollapsibleContent,exports.CollapsibleTrigger=y.CollapsibleTrigger,exports.CommandDialog=C.CommandDialog,exports.CommandEmpty=C.CommandEmpty,exports.CommandFooter=C.CommandFooter,exports.CommandGroup=C.CommandGroup,exports.CommandGroupLabel=C.CommandGroupLabel,exports.CommandHeader=C.CommandHeader,exports.CommandInput=C.CommandInput,exports.CommandItem=C.CommandItem,exports.CommandItemLabel=C.CommandItemLabel,exports.CommandList=C.CommandList,Object.defineProperty(exports,"CopyIcon",{enumerable:!0,get:function(){return $.Copy}}),exports.DEFAULT_FILE_BROWSER_FILTERS=E.DEFAULT_FILE_BROWSER_FILTERS,exports.DOT_TONES=Q.DOT_TONES,exports.Dialog=d.Dialog,exports.DialogBody=d.DialogBody,exports.DialogClose=d.DialogClose,exports.DialogContent=d.DialogContent,exports.DialogDescription=d.DialogDescription,exports.DialogFooter=d.DialogFooter,exports.DialogHeader=d.DialogHeader,exports.DialogTitle=d.DialogTitle,exports.DialogTrigger=d.DialogTrigger,exports.DiffView=te.DiffView,exports.Dot=i.Dot,Object.defineProperty(exports,"DownloadIcon",{enumerable:!0,get:function(){return $.Download}}),exports.Drawer=ne.Drawer,exports.DropdownMenu=p.DropdownMenu,exports.DropdownMenuCheckboxItem=p.DropdownMenuCheckboxItem,exports.DropdownMenuContent=p.DropdownMenuContent,exports.DropdownMenuGroup=p.DropdownMenuGroup,exports.DropdownMenuItem=p.DropdownMenuItem,exports.DropdownMenuLabel=p.DropdownMenuLabel,exports.DropdownMenuRadioGroup=p.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=p.DropdownMenuRadioItem,exports.DropdownMenuSeparator=p.DropdownMenuSeparator,exports.DropdownMenuShortcut=p.DropdownMenuShortcut,exports.DropdownMenuSub=p.DropdownMenuSub,exports.DropdownMenuSubContent=p.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=p.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=p.DropdownMenuTrigger,Object.defineProperty(exports,"EditIcon",{enumerable:!0,get:function(){return $.Pencil}}),exports.EmptyState=se.EmptyState,Object.defineProperty(exports,"EnterIcon",{enumerable:!0,get:function(){return $.CornerDownLeft}}),Object.defineProperty(exports,"EraserIcon",{enumerable:!0,get:function(){return $.Eraser}}),Object.defineProperty(exports,"ExternalLinkIcon",{enumerable:!0,get:function(){return $.ExternalLink}}),exports.FileAge=E.FileAge,exports.FileBrowser=E.FileBrowser,Object.defineProperty(exports,"FileIcon",{enumerable:!0,get:function(){return $.FileText}}),exports.FilePreview=le.FilePreview,Object.defineProperty(exports,"FitIcon",{enumerable:!0,get:function(){return $.Scan}}),exports.FlowGraph=k.FlowGraph,Object.defineProperty(exports,"FolderIcon",{enumerable:!0,get:function(){return $.Folder}}),Object.defineProperty(exports,"ForkIcon",{enumerable:!0,get:function(){return $.GitFork}}),exports.GREP_COLLAPSED_LINES=Y.GREP_COLLAPSED_LINES,Object.defineProperty(exports,"GearIcon",{enumerable:!0,get:function(){return $.Settings}}),Object.defineProperty(exports,"GlobeIcon",{enumerable:!0,get:function(){return $.Globe}}),Object.defineProperty(exports,"GridIcon",{enumerable:!0,get:function(){return $.LayoutGrid}}),Object.defineProperty(exports,"HandIcon",{enumerable:!0,get:function(){return $.Hand}}),exports.HashlineLines=ue.HashlineLines,Object.defineProperty(exports,"HelpIcon",{enumerable:!0,get:function(){return $.CircleHelp}}),Object.defineProperty(exports,"HighlighterIcon",{enumerable:!0,get:function(){return $.Highlighter}}),Object.defineProperty(exports,"HomeIcon",{enumerable:!0,get:function(){return $.House}}),Object.defineProperty(exports,"ImageIcon",{enumerable:!0,get:function(){return $.Image}}),exports.Input=b.Input,exports.Kbd=de.Kbd,Object.defineProperty(exports,"KebabIcon",{enumerable:!0,get:function(){return $.MoreVertical}}),exports.LINE_TONE_TO_STATUS=Z.LINE_TONE_TO_STATUS,exports.Label=fe.Label,Object.defineProperty(exports,"LightbulbIcon",{enumerable:!0,get:function(){return $.Lightbulb}}),Object.defineProperty(exports,"ListIcon",{enumerable:!0,get:function(){return $.List}}),exports.LiveDuration=H.LiveDuration,Object.defineProperty(exports,"LoaderIcon",{enumerable:!0,get:function(){return $.Loader2}}),Object.defineProperty(exports,"LockIcon",{enumerable:!0,get:function(){return $.Lock}}),exports.MAX_DIGIT_SHORTCUT=x.MAX_DIGIT_SHORTCUT,exports.MEDIA_KINDS=Oe.MEDIA_KINDS,exports.MESSAGE_LINE_TONES=Q.MESSAGE_LINE_TONES,exports.Markdown=D.Markdown,exports.McpToolFields=j.McpToolFields,exports.McpToolFrame=j.McpToolFrame,exports.McpToolOutput=j.McpToolOutput,exports.MediaPreview=he.MediaPreview,exports.MediaViewerDialog=ce.MediaViewerDialog,Object.defineProperty(exports,"MenuIcon",{enumerable:!0,get:function(){return $.Menu}}),Object.defineProperty(exports,"MessageIcon",{enumerable:!0,get:function(){return $.MessageCircle}}),exports.MessageItem=P.MessageItem,exports.MessageItemBody=P.MessageItemBody,exports.MessageItemGroup=P.MessageItemGroup,exports.MessageItemHeader=P.MessageItemHeader,exports.MessageItemHeaderAccessoryContext=P.MessageItemHeaderAccessoryContext,exports.MessageItemStatus=P.MessageItemStatus,exports.MessageLines=F.MessageLines,Object.defineProperty(exports,"MicIcon",{enumerable:!0,get:function(){return $.Mic}}),Object.defineProperty(exports,"MinusIcon",{enumerable:!0,get:function(){return $.Minus}}),Object.defineProperty(exports,"MonitorIcon",{enumerable:!0,get:function(){return $.Monitor}}),exports.NavTab=T.NavTab,exports.NavTabBadge=T.NavTabBadge,exports.OptionLabel=S.OptionLabel,exports.OptionList=S.OptionList,exports.OptionRow=S.OptionRow,Object.defineProperty(exports,"PaletteIcon",{enumerable:!0,get:function(){return $.Palette}}),exports.Panel=I.Panel,exports.PanelBody=I.PanelBody,exports.PanelHeader=I.PanelHeader,Object.defineProperty(exports,"PaperclipIcon",{enumerable:!0,get:function(){return $.Paperclip}}),exports.PathText=Te.PathText,exports.PdfPreview=M.PdfPreview,exports.PickerContent=R.PickerContent,exports.PickerList=R.PickerList,Object.defineProperty(exports,"PinIcon",{enumerable:!0,get:function(){return $.MapPin}}),Object.defineProperty(exports,"PlayCircleIcon",{enumerable:!0,get:function(){return $.CirclePlay}}),Object.defineProperty(exports,"PlusIcon",{enumerable:!0,get:function(){return $.Plus}}),exports.Popover=L.Popover,exports.PopoverAnchor=L.PopoverAnchor,exports.PopoverClose=L.PopoverClose,exports.PopoverContent=L.PopoverContent,exports.PopoverFooter=L.PopoverFooter,exports.PopoverHeader=L.PopoverHeader,exports.PopoverTrigger=L.PopoverTrigger,exports.ProfilePicker=B.ProfilePicker,exports.Progress=ge.Progress,Object.defineProperty(exports,"PuzzleIcon",{enumerable:!0,get:function(){return $.Puzzle}}),Object.defineProperty(exports,"QuoteIcon",{enumerable:!0,get:function(){return $.Quote}}),exports.READ_COLLAPSED_LINES=Y.READ_COLLAPSED_LINES,exports.RadioGroup=U.RadioGroup,exports.RadioGroupCard=U.RadioGroupCard,exports.RadioGroupItem=U.RadioGroupItem,Object.defineProperty(exports,"RedoIcon",{enumerable:!0,get:function(){return $.Redo2}}),Object.defineProperty(exports,"RefreshIcon",{enumerable:!0,get:function(){return $.RefreshCw}}),exports.ReviewCommentDraft=ve.ReviewCommentDraft,Object.defineProperty(exports,"RewindIcon",{enumerable:!0,get:function(){return $.Rewind}}),exports.STATUS_EDGE=N.STATUS_EDGE,exports.STATUS_GLYPH=P.STATUS_GLYPH,exports.STATUS_LABEL=P.STATUS_LABEL,exports.STATUS_TONES=Q.STATUS_TONES,exports.STATUS_TO_CHIP=Z.STATUS_TO_CHIP,exports.STATUS_TO_DOT=Z.STATUS_TO_DOT,exports.ScrollArea=W.ScrollArea,exports.ScrollBar=W.ScrollBar,Object.defineProperty(exports,"SearchIcon",{enumerable:!0,get:function(){return $.Search}}),exports.SectionLabel=ye.SectionLabel,exports.Select=G.Select,exports.SelectContent=G.SelectContent,exports.SelectGroup=G.SelectGroup,exports.SelectItem=G.SelectItem,exports.SelectLabel=G.SelectLabel,exports.SelectSeparator=G.SelectSeparator,exports.SelectTrigger=G.SelectTrigger,exports.SelectValue=G.SelectValue,Object.defineProperty(exports,"SendIcon",{enumerable:!0,get:function(){return $.Send}}),exports.Separator=be.Separator,Object.defineProperty(exports,"ServerIcon",{enumerable:!0,get:function(){return $.Server}}),exports.SettingsActions=K.SettingsActions,exports.SettingsCard=K.SettingsCard,exports.SettingsDescription=K.SettingsDescription,exports.SettingsField=K.SettingsField,exports.SettingsHeader=K.SettingsHeader,exports.SettingsNote=K.SettingsNote,exports.SettingsPage=K.SettingsPage,exports.SettingsRow=K.SettingsRow,exports.SettingsRowDescription=K.SettingsRowDescription,exports.SettingsRowText=K.SettingsRowText,exports.SettingsRowTitle=K.SettingsRowTitle,exports.SettingsSection=K.SettingsSection,exports.SettingsSectionDescription=K.SettingsSectionDescription,exports.SettingsSectionHeader=K.SettingsSectionHeader,exports.SettingsSectionTitle=K.SettingsSectionTitle,exports.SettingsTitle=K.SettingsTitle,exports.SetupRow=xe.SetupRow,exports.Sheet=q.Sheet,exports.SheetBody=q.SheetBody,exports.SheetClose=q.SheetClose,exports.SheetContent=q.SheetContent,exports.SheetDescription=q.SheetDescription,exports.SheetFooter=q.SheetFooter,exports.SheetHeader=q.SheetHeader,exports.SheetOverlay=q.SheetOverlay,exports.SheetTitle=q.SheetTitle,exports.SheetTrigger=q.SheetTrigger,Object.defineProperty(exports,"ShieldIcon",{enumerable:!0,get:function(){return $.ShieldCheck}}),Object.defineProperty(exports,"ShrinkIcon",{enumerable:!0,get:function(){return $.Shrink}}),Object.defineProperty(exports,"SidebarIcon",{enumerable:!0,get:function(){return $.PanelLeft}}),exports.Skeleton=ae.Skeleton,Object.defineProperty(exports,"SlidersIcon",{enumerable:!0,get:function(){return $.SlidersHorizontal}}),Object.defineProperty(exports,"SmartphoneIcon",{enumerable:!0,get:function(){return $.Smartphone}}),Object.defineProperty(exports,"SparklesIcon",{enumerable:!0,get:function(){return $.Sparkles}}),exports.Spinner=l.Spinner,exports.StatusBadge=N.StatusBadge,Object.defineProperty(exports,"StopIcon",{enumerable:!0,get:function(){return $.Square}}),exports.StreamCursor=Se.StreamCursor,exports.Switch=Ce.Switch,exports.SyntaxLine=_.SyntaxLine,exports.SyntaxText=_.SyntaxText,exports.Tabs=T.Tabs,exports.TabsContent=T.TabsContent,exports.TabsList=T.TabsList,exports.TabsTrigger=T.TabsTrigger,Object.defineProperty(exports,"TargetIcon",{enumerable:!0,get:function(){return $.Target}}),Object.defineProperty(exports,"TaskIcon",{enumerable:!0,get:function(){return $.SquareCheckBig}}),Object.defineProperty(exports,"TerminalIcon",{enumerable:!0,get:function(){return $.SquareTerminal}}),exports.TerminalView=we.TerminalView,exports.Textarea=_e.Textarea,exports.Toast=J.Toast,exports.ToastAction=J.ToastAction,exports.ToastClose=J.ToastClose,exports.ToastDescription=J.ToastDescription,exports.ToastProvider=J.ToastProvider,exports.ToastTitle=J.ToastTitle,exports.ToastViewport=J.ToastViewport,exports.ToolPathLink=Ee.ToolPathLink,exports.Tooltip=s.Tooltip,exports.TooltipContent=s.TooltipContent,exports.TooltipProvider=s.TooltipProvider,exports.TooltipTrigger=s.TooltipTrigger,Object.defineProperty(exports,"TrashIcon",{enumerable:!0,get:function(){return $.Trash2}}),Object.defineProperty(exports,"UndoIcon",{enumerable:!0,get:function(){return $.Undo2}}),Object.defineProperty(exports,"UnlockIcon",{enumerable:!0,get:function(){return $.LockOpen}}),Object.defineProperty(exports,"UserIcon",{enumerable:!0,get:function(){return $.UserRound}}),Object.defineProperty(exports,"UsersIcon",{enumerable:!0,get:function(){return $.Users}}),exports.ViewableImage=pe.ViewableImage,Object.defineProperty(exports,"VolumeIcon",{enumerable:!0,get:function(){return $.Volume2}}),Object.defineProperty(exports,"WorkflowIcon",{enumerable:!0,get:function(){return $.Workflow}}),Object.defineProperty(exports,"WrenchIcon",{enumerable:!0,get:function(){return $.Wrench}}),exports.ageLabel=w.ageLabel,exports.agentInitials=a.agentInitials,exports.ansiSpans=t.ansiSpans,exports.badgeVariants=o.badgeVariants,exports.boundedFileSource=O.boundedFileSource,exports.breadcrumbSegments=c.breadcrumbSegments,exports.buildReviewPrompt=f.buildReviewPrompt,exports.buttonVariants=u.buttonVariants,exports.clockRefreshMs=V.clockRefreshMs,exports.clockText=V.clockText,exports.cn=ee.cn,exports.collapseLines=De.collapseLines,exports.compactDetails=Y.compactDetails,exports.defaultReviewHeading=f.defaultReviewHeading,exports.detectGrammar=g.detectGrammar,exports.dialogFooterVariants=d.dialogFooterVariants,exports.diffGutterWidth=f.diffGutterWidth,exports.diffRangeOf=f.diffRangeOf,exports.dotVariants=i.dotVariants,exports.drawableImageUrl=h.drawableImageUrl,exports.dropdownMenuItemVariants=p.dropdownMenuItemVariants,exports.fieldVariants=b.fieldVariants,exports.fileAssetPath=w.fileAssetPath,exports.fileKind=w.fileKind,exports.filePreviewMode=w.filePreviewMode,exports.fileTree=w.fileTree,exports.filterFiles=w.filterFiles,exports.formatRunDuration=V.formatRunDuration,exports.grammarKeyOf=m.grammarKeyOf,exports.groupByDirectory=X.groupByDirectory,exports.groupRowLabel=X.groupRowLabel,exports.handleOptionListKey=x.handleOptionListKey,exports.hashlineBody=Y.hashlineBody,exports.hashlineGroups=A.hashlineGroups,exports.hashlineGroupsKey=A.hashlineGroupsKey,exports.highlightToLines=g.highlightToLines,exports.inlineProfileIcon=z.inlineProfileIcon,exports.isFileLayout=w.isFileLayout,exports.markdownMediaReview=h.markdownMediaReview,exports.markdownMediaReviewSlot=ie.markdownMediaReviewSlot,exports.mediaKindOf=me.mediaKindOf,exports.messageItemRowVariants=P.messageItemRowVariants,exports.messageItemStatusVariants=P.messageItemStatusVariants,exports.messageItemVariants=P.messageItemVariants,exports.messageLineVariants=F.messageLineVariants,exports.modifiedLabel=w.modifiedLabel,exports.newestFiles=w.newestFiles,exports.optionListHint=x.optionListHint,exports.optionListVariants=S.optionListVariants,exports.optionMarker=x.optionMarker,exports.optionMarkerVariants=S.optionMarkerVariants,exports.optionRowVariants=S.optionRowVariants,exports.parseFileHeader=Y.parseFileHeader,exports.parseProfileCatalog=z.parseProfileCatalog,exports.parseTaggedLine=Y.parseTaggedLine,exports.presentHashlineLines=Y.presentHashlineLines,exports.rangedFileBlob=O.rangedFileBlob,exports.readMediaBytes=O.readMediaBytes,exports.resolvePdfViewportRegion=M.resolvePdfViewportRegion,exports.resultTextLines=Y.resultTextLines,exports.reviewCommentAnchor=f.reviewCommentAnchor,exports.sizeLabel=w.sizeLabel,exports.sortFiles=w.sortFiles,exports.statusBadgeVariants=N.statusBadgeVariants,exports.svgImageUrl=h.svgImageUrl,exports.syntaxStyleOf=g.syntaxStyleOf,exports.tabBadgeVariants=T.tabBadgeVariants,exports.tabVariants=T.tabVariants,exports.takeTrailingNotice=Y.takeTrailingNotice,exports.toastVariants=J.toastVariants,exports.toolTone=P.toolTone,exports.trimSnippet=f.trimSnippet,exports.useMessageItem=P.useMessageItem,exports.useProfileCatalog=B.useProfileCatalog,exports.useSyntaxLines=_.useSyntaxLines;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("./src/icons/icons.cjs");const ee=require("./src/lib/cn.cjs"),e=require("./src/components/Accordion.cjs"),t=require("./src/lib/ansiSpans.cjs"),n=require("./src/components/AnsiText.cjs"),r=require("./src/components/Avatar.cjs"),i=require("./src/components/Dot.cjs"),a=require("./src/components/AgentAvatar.cjs"),o=require("./src/components/Badge.cjs"),s=require("./src/components/Tooltip.cjs"),c=require("./src/components/Breadcrumb.cjs"),l=require("./src/components/Spinner.cjs"),u=require("./src/components/Button.cjs"),d=require("./src/components/Dialog.cjs"),f=require("./src/lib/review.cjs"),te=require("./src/components/DiffView.cjs"),ne=require("./src/components/Drawer.cjs"),p=require("./src/components/DropdownMenu.cjs"),re=require("./src/components/Checkbox.cjs"),ie=require("./src/lib/editorLanguage.cjs"),ae=require("./src/lib/markdownMediaSlot.cjs"),m=require("./src/lib/markdownMedia.cjs"),h=require("./src/lib/syntaxHighlight.cjs"),g=require("./src/components/SyntaxText.cjs"),_=require("./src/components/CodeBlock.cjs"),oe=require("./src/components/Skeleton.cjs"),se=require("./src/components/CodeEditor.cjs"),v=require("./src/components/Collapsible.cjs"),y=require("./src/components/Input.cjs"),b=require("./src/lib/optionList.cjs"),x=require("./src/components/OptionList.cjs"),S=require("./src/components/Command.cjs"),ce=require("./src/components/EmptyState.cjs"),C=require("./src/lib/files.cjs"),w=require("./src/components/Tabs.cjs"),T=require("./src/components/FileBrowser.cjs"),E=require("./src/components/MediaViewerDialog.cjs"),D=require("./src/components/Markdown.cjs"),le=require("./src/components/FilePreview.cjs"),O=require("./src/lib/fileDownload.cjs"),k=require("./src/components/FlowGraph.cjs"),A=require("./src/lib/hashlineHighlight.cjs"),ue=require("./src/components/HashlineLines.cjs"),de=require("./src/components/Kbd.cjs"),j=require("./src/components/McpToolWidget.cjs"),fe=require("./src/components/Label.cjs"),pe=require("./src/components/ViewableImage.cjs"),me=require("./src/lib/media.cjs"),M=require("./src/components/PdfPreview.cjs"),he=require("./src/components/MediaPreview.cjs"),N=require("./src/components/StatusBadge.cjs"),P=require("./src/components/MessageItem.cjs"),F=require("./src/components/MessageLines.cjs"),I=require("./src/components/Panel.cjs"),L=require("./src/components/Popover.cjs"),R=require("./src/components/Picker.cjs"),z=require("./src/lib/profilePicker.cjs"),B=require("./src/components/ProfilePicker.cjs"),V=require("./src/lib/runDuration.cjs"),H=require("./src/components/LiveDuration.cjs"),ge=require("./src/components/Progress.cjs"),U=require("./src/components/RadioGroup.cjs"),_e=require("./src/components/Textarea.cjs"),ve=require("./src/components/ReviewCommentDraft.cjs"),W=require("./src/components/ScrollArea.cjs"),ye=require("./src/components/SectionLabel.cjs"),G=require("./src/components/Select.cjs"),be=require("./src/components/Separator.cjs"),K=require("./src/components/Settings.cjs"),xe=require("./src/components/SetupRow.cjs"),q=require("./src/components/Sheet.cjs"),Se=require("./src/components/StreamCursor.cjs"),Ce=require("./src/components/Switch.cjs"),we=require("./src/components/TerminalView.cjs"),J=require("./src/components/Toast.cjs"),Te=require("./src/components/PathText.cjs"),Ee=require("./src/components/ToolPathLink.cjs"),De=require("./src/lib/collapse.cjs"),Y=require("./src/lib/hashlineView.cjs"),X=require("./src/lib/pathGroups.cjs"),Z=require("./src/lib/tone.cjs"),Oe=require("./src/types/editor.cjs"),Q=require("./src/types/tone.cjs");let $=require("lucide-react");exports.ACCENT_TONES=Q.ACCENT_TONES,exports.Accordion=e.Accordion,exports.AccordionContent=e.AccordionContent,exports.AccordionItem=e.AccordionItem,exports.AccordionTrigger=e.AccordionTrigger,Object.defineProperty(exports,"ActivityIcon",{enumerable:!0,get:function(){return $.Activity}}),exports.AgentAvatar=a.AgentAvatar,Object.defineProperty(exports,"AlertIcon",{enumerable:!0,get:function(){return $.CircleAlert}}),exports.AnsiLine=n.AnsiLine,exports.AnsiText=n.AnsiText,Object.defineProperty(exports,"AppWindowIcon",{enumerable:!0,get:function(){return $.AppWindow}}),Object.defineProperty(exports,"ArrowLeftIcon",{enumerable:!0,get:function(){return $.ArrowLeft}}),Object.defineProperty(exports,"ArrowRightIcon",{enumerable:!0,get:function(){return $.ArrowRight}}),Object.defineProperty(exports,"ArrowUpRightIcon",{enumerable:!0,get:function(){return $.ArrowUpRight}}),Object.defineProperty(exports,"AudioLinesIcon",{enumerable:!0,get:function(){return $.AudioLines}}),exports.Avatar=r.Avatar,exports.AvatarFallback=r.AvatarFallback,exports.AvatarImage=r.AvatarImage,exports.BREADCRUMB_ELLIPSIS=c.BREADCRUMB_ELLIPSIS,exports.Badge=o.Badge,Object.defineProperty(exports,"BellIcon",{enumerable:!0,get:function(){return $.Bell}}),Object.defineProperty(exports,"BookmarkPlusIcon",{enumerable:!0,get:function(){return $.BookmarkPlus}}),Object.defineProperty(exports,"BoxIcon",{enumerable:!0,get:function(){return $.Square}}),Object.defineProperty(exports,"BranchIcon",{enumerable:!0,get:function(){return $.GitBranch}}),exports.Breadcrumb=c.Breadcrumb,exports.Button=u.Button,exports.CHIP_TONES=Q.CHIP_TONES,exports.CHIP_TO_STATUS=Z.CHIP_TO_STATUS,Object.defineProperty(exports,"CalendarIcon",{enumerable:!0,get:function(){return $.Calendar}}),Object.defineProperty(exports,"CheckIcon",{enumerable:!0,get:function(){return $.Check}}),exports.Checkbox=re.Checkbox,Object.defineProperty(exports,"ChevronDownIcon",{enumerable:!0,get:function(){return $.ChevronDown}}),Object.defineProperty(exports,"ChevronRightIcon",{enumerable:!0,get:function(){return $.ChevronRight}}),Object.defineProperty(exports,"ChevronUpIcon",{enumerable:!0,get:function(){return $.ChevronUp}}),Object.defineProperty(exports,"CloseIcon",{enumerable:!0,get:function(){return $.X}}),exports.CodeBlock=_.CodeBlock,exports.CodeEditor=se.CodeEditor,exports.Collapsible=v.Collapsible,exports.CollapsibleContent=v.CollapsibleContent,exports.CollapsibleTrigger=v.CollapsibleTrigger,exports.CommandDialog=S.CommandDialog,exports.CommandEmpty=S.CommandEmpty,exports.CommandFooter=S.CommandFooter,exports.CommandGroup=S.CommandGroup,exports.CommandGroupLabel=S.CommandGroupLabel,exports.CommandHeader=S.CommandHeader,exports.CommandInput=S.CommandInput,exports.CommandItem=S.CommandItem,exports.CommandItemLabel=S.CommandItemLabel,exports.CommandList=S.CommandList,Object.defineProperty(exports,"CopyIcon",{enumerable:!0,get:function(){return $.Copy}}),exports.DEFAULT_FILE_BROWSER_FILTERS=T.DEFAULT_FILE_BROWSER_FILTERS,exports.DOT_TONES=Q.DOT_TONES,exports.Dialog=d.Dialog,exports.DialogBody=d.DialogBody,exports.DialogClose=d.DialogClose,exports.DialogContent=d.DialogContent,exports.DialogDescription=d.DialogDescription,exports.DialogFooter=d.DialogFooter,exports.DialogHeader=d.DialogHeader,exports.DialogTitle=d.DialogTitle,exports.DialogTrigger=d.DialogTrigger,exports.DiffView=te.DiffView,exports.Dot=i.Dot,Object.defineProperty(exports,"DownloadIcon",{enumerable:!0,get:function(){return $.Download}}),exports.Drawer=ne.Drawer,exports.DropdownMenu=p.DropdownMenu,exports.DropdownMenuCheckboxItem=p.DropdownMenuCheckboxItem,exports.DropdownMenuContent=p.DropdownMenuContent,exports.DropdownMenuGroup=p.DropdownMenuGroup,exports.DropdownMenuItem=p.DropdownMenuItem,exports.DropdownMenuLabel=p.DropdownMenuLabel,exports.DropdownMenuRadioGroup=p.DropdownMenuRadioGroup,exports.DropdownMenuRadioItem=p.DropdownMenuRadioItem,exports.DropdownMenuSeparator=p.DropdownMenuSeparator,exports.DropdownMenuShortcut=p.DropdownMenuShortcut,exports.DropdownMenuSub=p.DropdownMenuSub,exports.DropdownMenuSubContent=p.DropdownMenuSubContent,exports.DropdownMenuSubTrigger=p.DropdownMenuSubTrigger,exports.DropdownMenuTrigger=p.DropdownMenuTrigger,Object.defineProperty(exports,"EditIcon",{enumerable:!0,get:function(){return $.Pencil}}),exports.EmptyState=ce.EmptyState,Object.defineProperty(exports,"EnterIcon",{enumerable:!0,get:function(){return $.CornerDownLeft}}),Object.defineProperty(exports,"EraserIcon",{enumerable:!0,get:function(){return $.Eraser}}),Object.defineProperty(exports,"ExternalLinkIcon",{enumerable:!0,get:function(){return $.ExternalLink}}),exports.FileAge=T.FileAge,exports.FileBrowser=T.FileBrowser,Object.defineProperty(exports,"FileIcon",{enumerable:!0,get:function(){return $.FileText}}),exports.FilePreview=le.FilePreview,Object.defineProperty(exports,"FitIcon",{enumerable:!0,get:function(){return $.Scan}}),exports.FlowGraph=k.FlowGraph,Object.defineProperty(exports,"FolderIcon",{enumerable:!0,get:function(){return $.Folder}}),Object.defineProperty(exports,"ForkIcon",{enumerable:!0,get:function(){return $.GitFork}}),exports.GREP_COLLAPSED_LINES=Y.GREP_COLLAPSED_LINES,Object.defineProperty(exports,"GearIcon",{enumerable:!0,get:function(){return $.Settings}}),Object.defineProperty(exports,"GlobeIcon",{enumerable:!0,get:function(){return $.Globe}}),Object.defineProperty(exports,"GridIcon",{enumerable:!0,get:function(){return $.LayoutGrid}}),Object.defineProperty(exports,"HandIcon",{enumerable:!0,get:function(){return $.Hand}}),exports.HashlineLines=ue.HashlineLines,Object.defineProperty(exports,"HelpIcon",{enumerable:!0,get:function(){return $.CircleHelp}}),Object.defineProperty(exports,"HighlighterIcon",{enumerable:!0,get:function(){return $.Highlighter}}),Object.defineProperty(exports,"HomeIcon",{enumerable:!0,get:function(){return $.House}}),Object.defineProperty(exports,"ImageIcon",{enumerable:!0,get:function(){return $.Image}}),exports.Input=y.Input,exports.Kbd=de.Kbd,Object.defineProperty(exports,"KebabIcon",{enumerable:!0,get:function(){return $.MoreVertical}}),exports.LINE_TONE_TO_STATUS=Z.LINE_TONE_TO_STATUS,exports.Label=fe.Label,Object.defineProperty(exports,"LightbulbIcon",{enumerable:!0,get:function(){return $.Lightbulb}}),Object.defineProperty(exports,"ListIcon",{enumerable:!0,get:function(){return $.List}}),exports.LiveDuration=H.LiveDuration,Object.defineProperty(exports,"LoaderIcon",{enumerable:!0,get:function(){return $.Loader2}}),Object.defineProperty(exports,"LockIcon",{enumerable:!0,get:function(){return $.Lock}}),exports.MAX_DIGIT_SHORTCUT=b.MAX_DIGIT_SHORTCUT,exports.MEDIA_KINDS=Oe.MEDIA_KINDS,exports.MESSAGE_LINE_TONES=Q.MESSAGE_LINE_TONES,exports.Markdown=D.Markdown,exports.McpToolFields=j.McpToolFields,exports.McpToolFrame=j.McpToolFrame,exports.McpToolOutput=j.McpToolOutput,exports.MediaPreview=he.MediaPreview,exports.MediaViewerDialog=E.MediaViewerDialog,Object.defineProperty(exports,"MenuIcon",{enumerable:!0,get:function(){return $.Menu}}),Object.defineProperty(exports,"MessageIcon",{enumerable:!0,get:function(){return $.MessageCircle}}),exports.MessageItem=P.MessageItem,exports.MessageItemBody=P.MessageItemBody,exports.MessageItemGroup=P.MessageItemGroup,exports.MessageItemHeader=P.MessageItemHeader,exports.MessageItemHeaderAccessoryContext=P.MessageItemHeaderAccessoryContext,exports.MessageItemStatus=P.MessageItemStatus,exports.MessageLines=F.MessageLines,Object.defineProperty(exports,"MicIcon",{enumerable:!0,get:function(){return $.Mic}}),Object.defineProperty(exports,"MinusIcon",{enumerable:!0,get:function(){return $.Minus}}),Object.defineProperty(exports,"MonitorIcon",{enumerable:!0,get:function(){return $.Monitor}}),exports.NavTab=w.NavTab,exports.NavTabBadge=w.NavTabBadge,exports.OptionLabel=x.OptionLabel,exports.OptionList=x.OptionList,exports.OptionRow=x.OptionRow,Object.defineProperty(exports,"PaletteIcon",{enumerable:!0,get:function(){return $.Palette}}),exports.PanZoom=E.PanZoom,exports.Panel=I.Panel,exports.PanelBody=I.PanelBody,exports.PanelHeader=I.PanelHeader,Object.defineProperty(exports,"PaperclipIcon",{enumerable:!0,get:function(){return $.Paperclip}}),exports.PathText=Te.PathText,exports.PdfPreview=M.PdfPreview,exports.PickerContent=R.PickerContent,exports.PickerList=R.PickerList,Object.defineProperty(exports,"PinIcon",{enumerable:!0,get:function(){return $.MapPin}}),Object.defineProperty(exports,"PlayCircleIcon",{enumerable:!0,get:function(){return $.CirclePlay}}),Object.defineProperty(exports,"PlusIcon",{enumerable:!0,get:function(){return $.Plus}}),exports.Popover=L.Popover,exports.PopoverAnchor=L.PopoverAnchor,exports.PopoverClose=L.PopoverClose,exports.PopoverContent=L.PopoverContent,exports.PopoverFooter=L.PopoverFooter,exports.PopoverHeader=L.PopoverHeader,exports.PopoverTrigger=L.PopoverTrigger,exports.ProfilePicker=B.ProfilePicker,exports.Progress=ge.Progress,Object.defineProperty(exports,"PuzzleIcon",{enumerable:!0,get:function(){return $.Puzzle}}),Object.defineProperty(exports,"QuoteIcon",{enumerable:!0,get:function(){return $.Quote}}),exports.READ_COLLAPSED_LINES=Y.READ_COLLAPSED_LINES,exports.RadioGroup=U.RadioGroup,exports.RadioGroupCard=U.RadioGroupCard,exports.RadioGroupItem=U.RadioGroupItem,Object.defineProperty(exports,"RedoIcon",{enumerable:!0,get:function(){return $.Redo2}}),Object.defineProperty(exports,"RefreshIcon",{enumerable:!0,get:function(){return $.RefreshCw}}),exports.ReviewCommentDraft=ve.ReviewCommentDraft,Object.defineProperty(exports,"RewindIcon",{enumerable:!0,get:function(){return $.Rewind}}),exports.STATUS_EDGE=N.STATUS_EDGE,exports.STATUS_GLYPH=P.STATUS_GLYPH,exports.STATUS_LABEL=P.STATUS_LABEL,exports.STATUS_TONES=Q.STATUS_TONES,exports.STATUS_TO_CHIP=Z.STATUS_TO_CHIP,exports.STATUS_TO_DOT=Z.STATUS_TO_DOT,exports.ScrollArea=W.ScrollArea,exports.ScrollBar=W.ScrollBar,Object.defineProperty(exports,"SearchIcon",{enumerable:!0,get:function(){return $.Search}}),exports.SectionLabel=ye.SectionLabel,exports.Select=G.Select,exports.SelectContent=G.SelectContent,exports.SelectGroup=G.SelectGroup,exports.SelectItem=G.SelectItem,exports.SelectLabel=G.SelectLabel,exports.SelectSeparator=G.SelectSeparator,exports.SelectTrigger=G.SelectTrigger,exports.SelectValue=G.SelectValue,Object.defineProperty(exports,"SendIcon",{enumerable:!0,get:function(){return $.Send}}),exports.Separator=be.Separator,Object.defineProperty(exports,"ServerIcon",{enumerable:!0,get:function(){return $.Server}}),exports.SettingsActions=K.SettingsActions,exports.SettingsCard=K.SettingsCard,exports.SettingsDescription=K.SettingsDescription,exports.SettingsField=K.SettingsField,exports.SettingsHeader=K.SettingsHeader,exports.SettingsNote=K.SettingsNote,exports.SettingsPage=K.SettingsPage,exports.SettingsRow=K.SettingsRow,exports.SettingsRowDescription=K.SettingsRowDescription,exports.SettingsRowText=K.SettingsRowText,exports.SettingsRowTitle=K.SettingsRowTitle,exports.SettingsSection=K.SettingsSection,exports.SettingsSectionDescription=K.SettingsSectionDescription,exports.SettingsSectionHeader=K.SettingsSectionHeader,exports.SettingsSectionTitle=K.SettingsSectionTitle,exports.SettingsTitle=K.SettingsTitle,exports.SetupRow=xe.SetupRow,exports.Sheet=q.Sheet,exports.SheetBody=q.SheetBody,exports.SheetClose=q.SheetClose,exports.SheetContent=q.SheetContent,exports.SheetDescription=q.SheetDescription,exports.SheetFooter=q.SheetFooter,exports.SheetHeader=q.SheetHeader,exports.SheetOverlay=q.SheetOverlay,exports.SheetTitle=q.SheetTitle,exports.SheetTrigger=q.SheetTrigger,Object.defineProperty(exports,"ShieldIcon",{enumerable:!0,get:function(){return $.ShieldCheck}}),Object.defineProperty(exports,"ShrinkIcon",{enumerable:!0,get:function(){return $.Shrink}}),Object.defineProperty(exports,"SidebarIcon",{enumerable:!0,get:function(){return $.PanelLeft}}),exports.Skeleton=oe.Skeleton,Object.defineProperty(exports,"SlidersIcon",{enumerable:!0,get:function(){return $.SlidersHorizontal}}),Object.defineProperty(exports,"SmartphoneIcon",{enumerable:!0,get:function(){return $.Smartphone}}),Object.defineProperty(exports,"SparklesIcon",{enumerable:!0,get:function(){return $.Sparkles}}),exports.Spinner=l.Spinner,exports.StatusBadge=N.StatusBadge,Object.defineProperty(exports,"StopIcon",{enumerable:!0,get:function(){return $.Square}}),exports.StreamCursor=Se.StreamCursor,exports.Switch=Ce.Switch,exports.SyntaxLine=g.SyntaxLine,exports.SyntaxText=g.SyntaxText,exports.Tabs=w.Tabs,exports.TabsContent=w.TabsContent,exports.TabsList=w.TabsList,exports.TabsTrigger=w.TabsTrigger,Object.defineProperty(exports,"TargetIcon",{enumerable:!0,get:function(){return $.Target}}),Object.defineProperty(exports,"TaskIcon",{enumerable:!0,get:function(){return $.SquareCheckBig}}),Object.defineProperty(exports,"TerminalIcon",{enumerable:!0,get:function(){return $.SquareTerminal}}),exports.TerminalView=we.TerminalView,exports.Textarea=_e.Textarea,exports.Toast=J.Toast,exports.ToastAction=J.ToastAction,exports.ToastClose=J.ToastClose,exports.ToastDescription=J.ToastDescription,exports.ToastProvider=J.ToastProvider,exports.ToastTitle=J.ToastTitle,exports.ToastViewport=J.ToastViewport,exports.ToolPathLink=Ee.ToolPathLink,exports.Tooltip=s.Tooltip,exports.TooltipContent=s.TooltipContent,exports.TooltipProvider=s.TooltipProvider,exports.TooltipTrigger=s.TooltipTrigger,Object.defineProperty(exports,"TrashIcon",{enumerable:!0,get:function(){return $.Trash2}}),Object.defineProperty(exports,"UndoIcon",{enumerable:!0,get:function(){return $.Undo2}}),Object.defineProperty(exports,"UnlockIcon",{enumerable:!0,get:function(){return $.LockOpen}}),Object.defineProperty(exports,"UserIcon",{enumerable:!0,get:function(){return $.UserRound}}),Object.defineProperty(exports,"UsersIcon",{enumerable:!0,get:function(){return $.Users}}),exports.ViewableImage=pe.ViewableImage,Object.defineProperty(exports,"VolumeIcon",{enumerable:!0,get:function(){return $.Volume2}}),Object.defineProperty(exports,"WorkflowIcon",{enumerable:!0,get:function(){return $.Workflow}}),Object.defineProperty(exports,"WrenchIcon",{enumerable:!0,get:function(){return $.Wrench}}),exports.ageLabel=C.ageLabel,exports.agentInitials=a.agentInitials,exports.ansiSpans=t.ansiSpans,exports.badgeVariants=o.badgeVariants,exports.boundedFileSource=O.boundedFileSource,exports.breadcrumbSegments=c.breadcrumbSegments,exports.buildReviewPrompt=f.buildReviewPrompt,exports.buttonVariants=u.buttonVariants,exports.clockRefreshMs=V.clockRefreshMs,exports.clockText=V.clockText,exports.cn=ee.cn,exports.collapseLines=De.collapseLines,exports.compactDetails=Y.compactDetails,exports.defaultReviewHeading=f.defaultReviewHeading,exports.detectGrammar=h.detectGrammar,exports.dialogFooterVariants=d.dialogFooterVariants,exports.diffGutterWidth=f.diffGutterWidth,exports.diffRangeOf=f.diffRangeOf,exports.dotVariants=i.dotVariants,exports.drawableImageUrl=m.drawableImageUrl,exports.dropdownMenuItemVariants=p.dropdownMenuItemVariants,exports.fieldVariants=y.fieldVariants,exports.fileAssetPath=C.fileAssetPath,exports.fileKind=C.fileKind,exports.filePreviewMode=C.filePreviewMode,exports.fileTree=C.fileTree,exports.filterFiles=C.filterFiles,exports.formatRunDuration=V.formatRunDuration,exports.grammarKeyOf=ie.grammarKeyOf,exports.groupByDirectory=X.groupByDirectory,exports.groupRowLabel=X.groupRowLabel,exports.handleOptionListKey=b.handleOptionListKey,exports.hashlineBody=Y.hashlineBody,exports.hashlineGroups=A.hashlineGroups,exports.hashlineGroupsKey=A.hashlineGroupsKey,exports.highlightToLines=h.highlightToLines,exports.inlineProfileIcon=z.inlineProfileIcon,exports.isFileLayout=C.isFileLayout,exports.markdownMediaReview=m.markdownMediaReview,exports.markdownMediaReviewSlot=ae.markdownMediaReviewSlot,exports.mediaKindOf=me.mediaKindOf,exports.messageItemRowVariants=P.messageItemRowVariants,exports.messageItemStatusVariants=P.messageItemStatusVariants,exports.messageItemVariants=P.messageItemVariants,exports.messageLineVariants=F.messageLineVariants,exports.modifiedLabel=C.modifiedLabel,exports.newestFiles=C.newestFiles,exports.optionListHint=b.optionListHint,exports.optionListVariants=x.optionListVariants,exports.optionMarker=b.optionMarker,exports.optionMarkerVariants=x.optionMarkerVariants,exports.optionRowVariants=x.optionRowVariants,exports.parseFileHeader=Y.parseFileHeader,exports.parseProfileCatalog=z.parseProfileCatalog,exports.parseTaggedLine=Y.parseTaggedLine,exports.presentHashlineLines=Y.presentHashlineLines,exports.rangedFileBlob=O.rangedFileBlob,exports.readMediaBytes=O.readMediaBytes,exports.resolvePdfViewportRegion=M.resolvePdfViewportRegion,exports.resultTextLines=Y.resultTextLines,exports.reviewCommentAnchor=f.reviewCommentAnchor,exports.sizeLabel=C.sizeLabel,exports.sortFiles=C.sortFiles,exports.statusBadgeVariants=N.statusBadgeVariants,exports.svgImageUrl=m.svgImageUrl,exports.syntaxStyleOf=h.syntaxStyleOf,exports.tabBadgeVariants=w.tabBadgeVariants,exports.tabVariants=w.tabVariants,exports.takeTrailingNotice=Y.takeTrailingNotice,exports.toastVariants=J.toastVariants,exports.toolTone=P.toolTone,exports.trimSnippet=f.trimSnippet,exports.useMessageItem=P.useMessageItem,exports.useProfileCatalog=B.useProfileCatalog,exports.useSyntaxLines=g.useSyntaxLines;
package/dist/index.d.mts CHANGED
@@ -34,7 +34,7 @@ import { Kbd } from "./packages/core/po-web-components/src/components/Kbd.mjs";
34
34
  import { McpToolFields, McpToolFrame, McpToolOutput } from "./packages/core/po-web-components/src/components/McpToolWidget.mjs";
35
35
  import { Label } from "./packages/core/po-web-components/src/components/Label.mjs";
36
36
  import { Markdown, ReferenceRenderer } from "./packages/core/po-web-components/src/components/Markdown.mjs";
37
- import { MediaViewerDialog } from "./packages/core/po-web-components/src/components/MediaViewerDialog.mjs";
37
+ import { MediaViewerDialog, PanZoom } from "./packages/core/po-web-components/src/components/MediaViewerDialog.mjs";
38
38
  import { ViewableImage, ViewableImageProps } from "./packages/core/po-web-components/src/components/ViewableImage.mjs";
39
39
  import { PdfNormalizedRectangle, PdfPageRegion, PdfPageState, PdfPreview, PdfPreviewController, PdfPreviewProps, resolvePdfViewportRegion } from "./packages/core/po-web-components/src/components/PdfPreview.mjs";
40
40
  import { MediaFrameCapture, MediaFrameMetadata, MediaIntrinsicSize, MediaPlaybackState, MediaPreview, MediaPreviewController, MediaPreviewProps } from "./packages/core/po-web-components/src/components/MediaPreview.mjs";
@@ -82,4 +82,4 @@ import { buildReviewPrompt, defaultReviewHeading, diffGutterWidth, diffRangeOf,
82
82
  import { MAX_DIGIT_SHORTCUT, handleOptionListKey, optionListHint, optionMarker } from "./packages/core/po-web-components/src/lib/optionList.mjs";
83
83
  import { CHIP_TO_STATUS, LINE_TONE_TO_STATUS, STATUS_TO_CHIP, STATUS_TO_DOT } from "./packages/core/po-web-components/src/lib/tone.mjs";
84
84
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./packages/core/po-web-components/src/components/Tooltip.mjs";
85
- export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AgentAvatar, type AgentState, AlertIcon, AnsiLine, type AnsiLineProps, type AnsiSpan, AnsiText, type AnsiTextProps, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Avatar, AvatarFallback, AvatarImage, BREADCRUMB_ELLIPSIS, Badge, type BadgeProps, type BadgeTone, BellIcon, BookmarkPlusIcon, type BoundedFileSource, BoxIcon, BranchIcon, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CalendarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorController, type CodeEditorProps, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, CopyIcon, DEFAULT_FILE_BROWSER_FILTERS, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, type DiffHunk, type DiffMarker, type DiffRow, type DiffSelection, type DiffSide, DiffView, type DiffViewProps, Dot, type DotProps, type DotTone, DownloadIcon, Drawer, type DrawerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditIcon, type EditorEdit, type EditorMarkedRange, type EditorSelectionRange, type EditorTextRange, type EditorViewportRectangle, EmptyState, type EmptyStateProps, EnterIcon, EraserIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileAge, FileBrowser, type FileBrowserFilters, type FileBrowserLayout, type FileBrowserProps, type FileFilters, FileIcon, type FileItem, type FileKind, type FileLayout, type FileModified, FilePreview, type FilePreviewProps, type FileRangeLoader, type FileSort, type FileSortDirection, type FileStatus, type FileStatusFilter, type FileTextPreview, type FileTreeRow, FitIcon, FlowGraph, type FlowGraphEdge, type FlowGraphEdgeTone, type FlowGraphNode, type FlowGraphProps, FolderIcon, ForkIcon, GREP_COLLAPSED_LINES, GearIcon, GlobeIcon, type GrammarKey, type GrammarQuery, GridIcon, HandIcon, type HashlineBody, type HashlineGroup, HashlineLines, type HashlineLinesProps, type HashlineResult, type HashlineResultKind, HelpIcon, HighlighterIcon, HomeIcon, ImageIcon, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LightbulbIcon, ListIcon, LiveDuration, type LiveDurationProps, LoaderIcon, LockIcon, MAX_DIGIT_SHORTCUT, MEDIA_KINDS, MESSAGE_LINE_TONES, Markdown, type MarkdownMedia, type MarkdownMediaReview, type MarkdownMediaReviewContribution, type MarkdownMediaReviewPanelProps, McpToolFields, McpToolFrame, McpToolOutput, type MediaFrameCapture, type MediaFrameMetadata, type MediaIntrinsicSize, type MediaKind, type MediaPlaybackState, MediaPreview, type MediaPreviewController, type MediaPreviewProps, MediaViewerDialog, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, MessageItemHeaderAccessoryContext, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, MicIcon, MinusIcon, MonitorIcon, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, Panel, PanelBody, PanelHeader, type PanelProps, PaperclipIcon, type PathGroup, PathText, type PathTextProps, type PdfNormalizedRectangle, type PdfPageRegion, type PdfPageState, PdfPreview, type PdfPreviewController, type PdfPreviewProps, PickerContent, type PickerContentProps, type PickerItem, PickerList, type PickerListProps, PinIcon, PlayCircleIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, type PresentedLine, type ProfileChoice, ProfilePicker, type ProfilePickerCatalog, type ProfilePickerProfile, type ProfilePickerProps, type ProfilePickerState, type ProfilePickerStatus, Progress, PuzzleIcon, QuoteIcon, READ_COLLAPSED_LINES, RadioGroup, RadioGroupCard, RadioGroupItem, RedoIcon, type ReferenceRenderer, RefreshIcon, type ReviewComment, ReviewCommentDraft, type ReviewCommentDraftProps, RewindIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator, ServerIcon, SettingsActions, SettingsCard, SettingsDescription, SettingsField, SettingsHeader, SettingsNote, SettingsPage, SettingsRow, SettingsRowDescription, SettingsRowText, SettingsRowTitle, SettingsSection, SettingsSectionDescription, SettingsSectionHeader, SettingsSectionTitle, SettingsTitle, SetupRow, type SetupRowProps, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetOverlay, SheetTitle, SheetTrigger, ShieldIcon, ShrinkIcon, SidebarIcon, Skeleton, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, SyntaxLine, type SyntaxLineProps, type SyntaxLines, type SyntaxQuery, type SyntaxSpan, SyntaxText, type SyntaxTextProps, type SyntaxToken, Tabs, TabsContent, TabsList, TabsTrigger, type TaggedLine, type TaggedLineMarker, TargetIcon, TaskIcon, type TerminalHandle, TerminalIcon, TerminalView, type TerminalViewProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, ToolPathLink, type ToolPathLinkProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, UndoIcon, UnlockIcon, UserIcon, UsersIcon, ViewableImage, type ViewableImageProps, VolumeIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, badgeVariants, boundedFileSource, breadcrumbSegments, buildReviewPrompt, buttonVariants, clockRefreshMs, clockText, cn, collapseLines, compactDetails, defaultReviewHeading, detectGrammar, dialogFooterVariants, diffGutterWidth, diffRangeOf, dotVariants, drawableImageUrl, dropdownMenuItemVariants, fieldVariants, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, formatRunDuration, grammarKeyOf, groupByDirectory, groupRowLabel, handleOptionListKey, hashlineBody, hashlineGroups, hashlineGroupsKey, highlightToLines, inlineProfileIcon, isFileLayout, markdownMediaReview, markdownMediaReviewSlot, mediaKindOf, messageItemRowVariants, messageItemStatusVariants, messageItemVariants, messageLineVariants, modifiedLabel, newestFiles, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, parseFileHeader, parseProfileCatalog, parseTaggedLine, presentHashlineLines, rangedFileBlob, readMediaBytes, resolvePdfViewportRegion, resultTextLines, reviewCommentAnchor, sizeLabel, sortFiles, statusBadgeVariants, svgImageUrl, syntaxStyleOf, tabBadgeVariants, tabVariants, takeTrailingNotice, toastVariants, toolTone, trimSnippet, useMessageItem, useProfileCatalog, useSyntaxLines };
85
+ export { ACCENT_TONES, type AccentTone, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityIcon, AgentAvatar, type AgentState, AlertIcon, AnsiLine, type AnsiLineProps, type AnsiSpan, AnsiText, type AnsiTextProps, AppWindowIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpRightIcon, AudioLinesIcon, Avatar, AvatarFallback, AvatarImage, BREADCRUMB_ELLIPSIS, Badge, type BadgeProps, type BadgeTone, BellIcon, BookmarkPlusIcon, type BoundedFileSource, BoxIcon, BranchIcon, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHIP_TONES, CHIP_TO_STATUS, CalendarIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, type ChipTone, CloseIcon, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorController, type CodeEditorProps, type CollapsedLines, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandDialog, type CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandHeader, CommandInput, CommandItem, CommandItemLabel, CommandList, CopyIcon, DEFAULT_FILE_BROWSER_FILTERS, DOT_TONES, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogTitle, DialogTrigger, type DiffHunk, type DiffMarker, type DiffRow, type DiffSelection, type DiffSide, DiffView, type DiffViewProps, Dot, type DotProps, type DotTone, DownloadIcon, Drawer, type DrawerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditIcon, type EditorEdit, type EditorMarkedRange, type EditorSelectionRange, type EditorTextRange, type EditorViewportRectangle, EmptyState, type EmptyStateProps, EnterIcon, EraserIcon, ExternalLinkIcon, type FieldSize, type FieldVariant, FileAge, FileBrowser, type FileBrowserFilters, type FileBrowserLayout, type FileBrowserProps, type FileFilters, FileIcon, type FileItem, type FileKind, type FileLayout, type FileModified, FilePreview, type FilePreviewProps, type FileRangeLoader, type FileSort, type FileSortDirection, type FileStatus, type FileStatusFilter, type FileTextPreview, type FileTreeRow, FitIcon, FlowGraph, type FlowGraphEdge, type FlowGraphEdgeTone, type FlowGraphNode, type FlowGraphProps, FolderIcon, ForkIcon, GREP_COLLAPSED_LINES, GearIcon, GlobeIcon, type GrammarKey, type GrammarQuery, GridIcon, HandIcon, type HashlineBody, type HashlineGroup, HashlineLines, type HashlineLinesProps, type HashlineResult, type HashlineResultKind, HelpIcon, HighlighterIcon, HomeIcon, ImageIcon, Input, type InputProps, Kbd, KebabIcon, LINE_TONE_TO_STATUS, Label, LightbulbIcon, ListIcon, LiveDuration, type LiveDurationProps, LoaderIcon, LockIcon, MAX_DIGIT_SHORTCUT, MEDIA_KINDS, MESSAGE_LINE_TONES, Markdown, type MarkdownMedia, type MarkdownMediaReview, type MarkdownMediaReviewContribution, type MarkdownMediaReviewPanelProps, McpToolFields, McpToolFrame, McpToolOutput, type MediaFrameCapture, type MediaFrameMetadata, type MediaIntrinsicSize, type MediaKind, type MediaPlaybackState, MediaPreview, type MediaPreviewController, type MediaPreviewProps, MediaViewerDialog, MenuIcon, MessageIcon, MessageItem, MessageItemBody, MessageItemGroup, type MessageItemGroupProps, MessageItemHeader, MessageItemHeaderAccessoryContext, type MessageItemHeaderProps, type MessageItemProps, type MessageItemState, MessageItemStatus, type MessageItemStatusProps, type MessageLine, type MessageLineTone, MessageLines, type MessageLinesProps, MicIcon, MinusIcon, MonitorIcon, NavTab, NavTabBadge, type NavTabProps, OptionLabel, OptionList, type OptionListProps, OptionRow, type OptionRowProps, PaletteIcon, PanZoom, Panel, PanelBody, PanelHeader, type PanelProps, PaperclipIcon, type PathGroup, PathText, type PathTextProps, type PdfNormalizedRectangle, type PdfPageRegion, type PdfPageState, PdfPreview, type PdfPreviewController, type PdfPreviewProps, PickerContent, type PickerContentProps, type PickerItem, PickerList, type PickerListProps, PinIcon, PlayCircleIcon, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, type PresentedLine, type ProfileChoice, ProfilePicker, type ProfilePickerCatalog, type ProfilePickerProfile, type ProfilePickerProps, type ProfilePickerState, type ProfilePickerStatus, Progress, PuzzleIcon, QuoteIcon, READ_COLLAPSED_LINES, RadioGroup, RadioGroupCard, RadioGroupItem, RedoIcon, type ReferenceRenderer, RefreshIcon, type ReviewComment, ReviewCommentDraft, type ReviewCommentDraftProps, RewindIcon, STATUS_EDGE, STATUS_GLYPH, STATUS_LABEL, STATUS_TONES, STATUS_TO_CHIP, STATUS_TO_DOT, ScrollArea, ScrollBar, SearchIcon, SectionLabel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator, ServerIcon, SettingsActions, SettingsCard, SettingsDescription, SettingsField, SettingsHeader, SettingsNote, SettingsPage, SettingsRow, SettingsRowDescription, SettingsRowText, SettingsRowTitle, SettingsSection, SettingsSectionDescription, SettingsSectionHeader, SettingsSectionTitle, SettingsTitle, SetupRow, type SetupRowProps, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetOverlay, SheetTitle, SheetTrigger, ShieldIcon, ShrinkIcon, SidebarIcon, Skeleton, SlidersIcon, SmartphoneIcon, SparklesIcon, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusTone, StopIcon, StreamCursor, Switch, SyntaxLine, type SyntaxLineProps, type SyntaxLines, type SyntaxQuery, type SyntaxSpan, SyntaxText, type SyntaxTextProps, type SyntaxToken, Tabs, TabsContent, TabsList, TabsTrigger, type TaggedLine, type TaggedLineMarker, TargetIcon, TaskIcon, type TerminalHandle, TerminalIcon, TerminalView, type TerminalViewProps, Textarea, type TextareaProps, Toast, ToastAction, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, ToolPathLink, type ToolPathLinkProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, UndoIcon, UnlockIcon, UserIcon, UsersIcon, ViewableImage, type ViewableImageProps, VolumeIcon, WorkflowIcon, WrenchIcon, ageLabel, agentInitials, ansiSpans, badgeVariants, boundedFileSource, breadcrumbSegments, buildReviewPrompt, buttonVariants, clockRefreshMs, clockText, cn, collapseLines, compactDetails, defaultReviewHeading, detectGrammar, dialogFooterVariants, diffGutterWidth, diffRangeOf, dotVariants, drawableImageUrl, dropdownMenuItemVariants, fieldVariants, fileAssetPath, fileKind, filePreviewMode, fileTree, filterFiles, formatRunDuration, grammarKeyOf, groupByDirectory, groupRowLabel, handleOptionListKey, hashlineBody, hashlineGroups, hashlineGroupsKey, highlightToLines, inlineProfileIcon, isFileLayout, markdownMediaReview, markdownMediaReviewSlot, mediaKindOf, messageItemRowVariants, messageItemStatusVariants, messageItemVariants, messageLineVariants, modifiedLabel, newestFiles, optionListHint, optionListVariants, optionMarker, optionMarkerVariants, optionRowVariants, parseFileHeader, parseProfileCatalog, parseTaggedLine, presentHashlineLines, rangedFileBlob, readMediaBytes, resolvePdfViewportRegion, resultTextLines, reviewCommentAnchor, sizeLabel, sortFiles, statusBadgeVariants, svgImageUrl, syntaxStyleOf, tabBadgeVariants, tabVariants, takeTrailingNotice, toastVariants, toolTone, trimSnippet, useMessageItem, useProfileCatalog, useSyntaxLines };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{ActivityIcon as e,AlertIcon as t,AppWindowIcon as n,ArrowLeftIcon as r,ArrowRightIcon as i,ArrowUpRightIcon as a,AudioLinesIcon as o,BellIcon as s,BookmarkPlusIcon as c,BoxIcon as l,BranchIcon as u,CalendarIcon as d,CheckIcon as f,ChevronDownIcon as p,ChevronRightIcon as m,ChevronUpIcon as h,CloseIcon as g,CopyIcon as _,DownloadIcon as v,EditIcon as y,EnterIcon as b,EraserIcon as x,ExternalLinkIcon as S,FileIcon as C,FitIcon as w,FolderIcon as T,ForkIcon as E,GearIcon as D,GlobeIcon as O,GridIcon as k,HandIcon as A,HelpIcon as j,HighlighterIcon as M,HomeIcon as N,ImageIcon as P,KebabIcon as F,LightbulbIcon as I,ListIcon as L,LoaderIcon as R,LockIcon as z,MenuIcon as B,MessageIcon as V,MicIcon as H,MinusIcon as U,MonitorIcon as W,PaletteIcon as G,PaperclipIcon as K,PinIcon as q,PlayCircleIcon as J,PlusIcon as Y,PuzzleIcon as X,QuoteIcon as Z,RedoIcon as Q,RefreshIcon as $,RewindIcon as ee,SearchIcon as te,SendIcon as ne,ServerIcon as re,ShieldIcon as ie,ShrinkIcon as ae,SidebarIcon as oe,SlidersIcon as se,SmartphoneIcon as ce,SparklesIcon as le,StopIcon as ue,TargetIcon as de,TaskIcon as fe,TerminalIcon as pe,TrashIcon as me,UndoIcon as he,UnlockIcon as ge,UserIcon as _e,UsersIcon as ve,VolumeIcon as ye,WorkflowIcon as be,WrenchIcon as xe}from"./packages/core/po-web-components/src/icons/icons.mjs";import{cn as Se}from"./packages/core/po-web-components/src/lib/cn.mjs";import{Accordion as Ce,AccordionContent as we,AccordionItem as Te,AccordionTrigger as Ee}from"./packages/core/po-web-components/src/components/Accordion.mjs";import{ansiSpans as De}from"./packages/core/po-web-components/src/lib/ansiSpans.mjs";import{AnsiLine as Oe,AnsiText as ke}from"./packages/core/po-web-components/src/components/AnsiText.mjs";import{Avatar as Ae,AvatarFallback as je,AvatarImage as Me}from"./packages/core/po-web-components/src/components/Avatar.mjs";import{Dot as Ne,dotVariants as Pe}from"./packages/core/po-web-components/src/components/Dot.mjs";import{AgentAvatar as Fe,agentInitials as Ie}from"./packages/core/po-web-components/src/components/AgentAvatar.mjs";import{Badge as Le,badgeVariants as Re}from"./packages/core/po-web-components/src/components/Badge.mjs";import{Tooltip as ze,TooltipContent as Be,TooltipProvider as Ve,TooltipTrigger as He}from"./packages/core/po-web-components/src/components/Tooltip.mjs";import{BREADCRUMB_ELLIPSIS as Ue,Breadcrumb as We,breadcrumbSegments as Ge}from"./packages/core/po-web-components/src/components/Breadcrumb.mjs";import{Spinner as Ke}from"./packages/core/po-web-components/src/components/Spinner.mjs";import{Button as qe,buttonVariants as Je}from"./packages/core/po-web-components/src/components/Button.mjs";import{Dialog as Ye,DialogBody as Xe,DialogClose as Ze,DialogContent as Qe,DialogDescription as $e,DialogFooter as et,DialogHeader as tt,DialogTitle as nt,DialogTrigger as rt,dialogFooterVariants as it}from"./packages/core/po-web-components/src/components/Dialog.mjs";import{buildReviewPrompt as at,defaultReviewHeading as ot,diffGutterWidth as st,diffRangeOf as ct,reviewCommentAnchor as lt,trimSnippet as ut}from"./packages/core/po-web-components/src/lib/review.mjs";import{DiffView as dt}from"./packages/core/po-web-components/src/components/DiffView.mjs";import{Drawer as ft}from"./packages/core/po-web-components/src/components/Drawer.mjs";import{DropdownMenu as pt,DropdownMenuCheckboxItem as mt,DropdownMenuContent as ht,DropdownMenuGroup as gt,DropdownMenuItem as _t,DropdownMenuLabel as vt,DropdownMenuRadioGroup as yt,DropdownMenuRadioItem as bt,DropdownMenuSeparator as xt,DropdownMenuShortcut as St,DropdownMenuSub as Ct,DropdownMenuSubContent as wt,DropdownMenuSubTrigger as Tt,DropdownMenuTrigger as Et,dropdownMenuItemVariants as Dt}from"./packages/core/po-web-components/src/components/DropdownMenu.mjs";import{Checkbox as Ot}from"./packages/core/po-web-components/src/components/Checkbox.mjs";import{grammarKeyOf as kt}from"./packages/core/po-web-components/src/lib/editorLanguage.mjs";import{markdownMediaReviewSlot as At}from"./packages/core/po-web-components/src/lib/markdownMediaSlot.mjs";import{drawableImageUrl as jt,markdownMediaReview as Mt,svgImageUrl as Nt}from"./packages/core/po-web-components/src/lib/markdownMedia.mjs";import{detectGrammar as Pt,highlightToLines as Ft,syntaxStyleOf as It}from"./packages/core/po-web-components/src/lib/syntaxHighlight.mjs";import{SyntaxLine as Lt,SyntaxText as Rt,useSyntaxLines as zt}from"./packages/core/po-web-components/src/components/SyntaxText.mjs";import{CodeBlock as Bt}from"./packages/core/po-web-components/src/components/CodeBlock.mjs";import{Skeleton as Vt}from"./packages/core/po-web-components/src/components/Skeleton.mjs";import{CodeEditor as Ht}from"./packages/core/po-web-components/src/components/CodeEditor.mjs";import{Collapsible as Ut,CollapsibleContent as Wt,CollapsibleTrigger as Gt}from"./packages/core/po-web-components/src/components/Collapsible.mjs";import{Input as Kt,fieldVariants as qt}from"./packages/core/po-web-components/src/components/Input.mjs";import{MAX_DIGIT_SHORTCUT as Jt,handleOptionListKey as Yt,optionListHint as Xt,optionMarker as Zt}from"./packages/core/po-web-components/src/lib/optionList.mjs";import{OptionLabel as Qt,OptionList as $t,OptionRow as en,optionListVariants as tn,optionMarkerVariants as nn,optionRowVariants as rn}from"./packages/core/po-web-components/src/components/OptionList.mjs";import{CommandDialog as an,CommandEmpty as on,CommandFooter as sn,CommandGroup as cn,CommandGroupLabel as ln,CommandHeader as un,CommandInput as dn,CommandItem as fn,CommandItemLabel as pn,CommandList as mn}from"./packages/core/po-web-components/src/components/Command.mjs";import{EmptyState as hn}from"./packages/core/po-web-components/src/components/EmptyState.mjs";import{ageLabel as gn,fileAssetPath as _n,fileKind as vn,filePreviewMode as yn,fileTree as bn,filterFiles as xn,isFileLayout as Sn,modifiedLabel as Cn,newestFiles as wn,sizeLabel as Tn,sortFiles as En}from"./packages/core/po-web-components/src/lib/files.mjs";import{NavTab as Dn,NavTabBadge as On,Tabs as kn,TabsContent as An,TabsList as jn,TabsTrigger as Mn,tabBadgeVariants as Nn,tabVariants as Pn}from"./packages/core/po-web-components/src/components/Tabs.mjs";import{DEFAULT_FILE_BROWSER_FILTERS as Fn,FileAge as In,FileBrowser as Ln}from"./packages/core/po-web-components/src/components/FileBrowser.mjs";import{MediaViewerDialog as Rn}from"./packages/core/po-web-components/src/components/MediaViewerDialog.mjs";import{Markdown as zn}from"./packages/core/po-web-components/src/components/Markdown.mjs";import{FilePreview as Bn}from"./packages/core/po-web-components/src/components/FilePreview.mjs";import{boundedFileSource as Vn,rangedFileBlob as Hn,readMediaBytes as Un}from"./packages/core/po-web-components/src/lib/fileDownload.mjs";import{FlowGraph as Wn}from"./packages/core/po-web-components/src/components/FlowGraph.mjs";import{hashlineGroups as Gn,hashlineGroupsKey as Kn}from"./packages/core/po-web-components/src/lib/hashlineHighlight.mjs";import{HashlineLines as qn}from"./packages/core/po-web-components/src/components/HashlineLines.mjs";import{Kbd as Jn}from"./packages/core/po-web-components/src/components/Kbd.mjs";import{McpToolFields as Yn,McpToolFrame as Xn,McpToolOutput as Zn}from"./packages/core/po-web-components/src/components/McpToolWidget.mjs";import{Label as Qn}from"./packages/core/po-web-components/src/components/Label.mjs";import{ViewableImage as $n}from"./packages/core/po-web-components/src/components/ViewableImage.mjs";import{mediaKindOf as er}from"./packages/core/po-web-components/src/lib/media.mjs";import{PdfPreview as tr,resolvePdfViewportRegion as nr}from"./packages/core/po-web-components/src/components/PdfPreview.mjs";import{MediaPreview as rr}from"./packages/core/po-web-components/src/components/MediaPreview.mjs";import{STATUS_EDGE as ir,StatusBadge as ar,statusBadgeVariants as or}from"./packages/core/po-web-components/src/components/StatusBadge.mjs";import{MessageItem as sr,MessageItemBody as cr,MessageItemGroup as lr,MessageItemHeader as ur,MessageItemHeaderAccessoryContext as dr,MessageItemStatus as fr,STATUS_GLYPH as pr,STATUS_LABEL as mr,messageItemRowVariants as hr,messageItemStatusVariants as gr,messageItemVariants as _r,toolTone as vr,useMessageItem as yr}from"./packages/core/po-web-components/src/components/MessageItem.mjs";import{MessageLines as br,messageLineVariants as xr}from"./packages/core/po-web-components/src/components/MessageLines.mjs";import{Panel as Sr,PanelBody as Cr,PanelHeader as wr}from"./packages/core/po-web-components/src/components/Panel.mjs";import{Popover as Tr,PopoverAnchor as Er,PopoverClose as Dr,PopoverContent as Or,PopoverFooter as kr,PopoverHeader as Ar,PopoverTrigger as jr}from"./packages/core/po-web-components/src/components/Popover.mjs";import{PickerContent as Mr,PickerList as Nr}from"./packages/core/po-web-components/src/components/Picker.mjs";import{inlineProfileIcon as Pr,parseProfileCatalog as Fr}from"./packages/core/po-web-components/src/lib/profilePicker.mjs";import{ProfilePicker as Ir,useProfileCatalog as Lr}from"./packages/core/po-web-components/src/components/ProfilePicker.mjs";import{clockRefreshMs as Rr,clockText as zr,formatRunDuration as Br}from"./packages/core/po-web-components/src/lib/runDuration.mjs";import{LiveDuration as Vr}from"./packages/core/po-web-components/src/components/LiveDuration.mjs";import{Progress as Hr}from"./packages/core/po-web-components/src/components/Progress.mjs";import{RadioGroup as Ur,RadioGroupCard as Wr,RadioGroupItem as Gr}from"./packages/core/po-web-components/src/components/RadioGroup.mjs";import{Textarea as Kr}from"./packages/core/po-web-components/src/components/Textarea.mjs";import{ReviewCommentDraft as qr}from"./packages/core/po-web-components/src/components/ReviewCommentDraft.mjs";import{ScrollArea as Jr,ScrollBar as Yr}from"./packages/core/po-web-components/src/components/ScrollArea.mjs";import{SectionLabel as Xr}from"./packages/core/po-web-components/src/components/SectionLabel.mjs";import{Select as Zr,SelectContent as Qr,SelectGroup as $r,SelectItem as ei,SelectLabel as ti,SelectSeparator as ni,SelectTrigger as ri,SelectValue as ii}from"./packages/core/po-web-components/src/components/Select.mjs";import{Separator as ai}from"./packages/core/po-web-components/src/components/Separator.mjs";import{SettingsActions as oi,SettingsCard as si,SettingsDescription as ci,SettingsField as li,SettingsHeader as ui,SettingsNote as di,SettingsPage as fi,SettingsRow as pi,SettingsRowDescription as mi,SettingsRowText as hi,SettingsRowTitle as gi,SettingsSection as _i,SettingsSectionDescription as vi,SettingsSectionHeader as yi,SettingsSectionTitle as bi,SettingsTitle as xi}from"./packages/core/po-web-components/src/components/Settings.mjs";import{SetupRow as Si}from"./packages/core/po-web-components/src/components/SetupRow.mjs";import{Sheet as Ci,SheetBody as wi,SheetClose as Ti,SheetContent as Ei,SheetDescription as Di,SheetFooter as Oi,SheetHeader as ki,SheetOverlay as Ai,SheetTitle as ji,SheetTrigger as Mi}from"./packages/core/po-web-components/src/components/Sheet.mjs";import{StreamCursor as Ni}from"./packages/core/po-web-components/src/components/StreamCursor.mjs";import{Switch as Pi}from"./packages/core/po-web-components/src/components/Switch.mjs";import{TerminalView as Fi}from"./packages/core/po-web-components/src/components/TerminalView.mjs";import{Toast as Ii,ToastAction as Li,ToastClose as Ri,ToastDescription as zi,ToastProvider as Bi,ToastTitle as Vi,ToastViewport as Hi,toastVariants as Ui}from"./packages/core/po-web-components/src/components/Toast.mjs";import{PathText as Wi}from"./packages/core/po-web-components/src/components/PathText.mjs";import{ToolPathLink as Gi}from"./packages/core/po-web-components/src/components/ToolPathLink.mjs";import{collapseLines as Ki}from"./packages/core/po-web-components/src/lib/collapse.mjs";import{GREP_COLLAPSED_LINES as qi,READ_COLLAPSED_LINES as Ji,compactDetails as Yi,hashlineBody as Xi,parseFileHeader as Zi,parseTaggedLine as Qi,presentHashlineLines as $i,resultTextLines as ea,takeTrailingNotice as ta}from"./packages/core/po-web-components/src/lib/hashlineView.mjs";import{groupByDirectory as na,groupRowLabel as ra}from"./packages/core/po-web-components/src/lib/pathGroups.mjs";import{CHIP_TO_STATUS as ia,LINE_TONE_TO_STATUS as aa,STATUS_TO_CHIP as oa,STATUS_TO_DOT as sa}from"./packages/core/po-web-components/src/lib/tone.mjs";import{MEDIA_KINDS as ca}from"./packages/core/po-web-components/src/types/editor.mjs";import{ACCENT_TONES as la,CHIP_TONES as ua,DOT_TONES as da,MESSAGE_LINE_TONES as fa,STATUS_TONES as pa}from"./packages/core/po-web-components/src/types/tone.mjs";export{la as ACCENT_TONES,Ce as Accordion,we as AccordionContent,Te as AccordionItem,Ee as AccordionTrigger,e as ActivityIcon,Fe as AgentAvatar,t as AlertIcon,Oe as AnsiLine,ke as AnsiText,n as AppWindowIcon,r as ArrowLeftIcon,i as ArrowRightIcon,a as ArrowUpRightIcon,o as AudioLinesIcon,Ae as Avatar,je as AvatarFallback,Me as AvatarImage,Ue as BREADCRUMB_ELLIPSIS,Le as Badge,s as BellIcon,c as BookmarkPlusIcon,l as BoxIcon,u as BranchIcon,We as Breadcrumb,qe as Button,ua as CHIP_TONES,ia as CHIP_TO_STATUS,d as CalendarIcon,f as CheckIcon,Ot as Checkbox,p as ChevronDownIcon,m as ChevronRightIcon,h as ChevronUpIcon,g as CloseIcon,Bt as CodeBlock,Ht as CodeEditor,Ut as Collapsible,Wt as CollapsibleContent,Gt as CollapsibleTrigger,an as CommandDialog,on as CommandEmpty,sn as CommandFooter,cn as CommandGroup,ln as CommandGroupLabel,un as CommandHeader,dn as CommandInput,fn as CommandItem,pn as CommandItemLabel,mn as CommandList,_ as CopyIcon,Fn as DEFAULT_FILE_BROWSER_FILTERS,da as DOT_TONES,Ye as Dialog,Xe as DialogBody,Ze as DialogClose,Qe as DialogContent,$e as DialogDescription,et as DialogFooter,tt as DialogHeader,nt as DialogTitle,rt as DialogTrigger,dt as DiffView,Ne as Dot,v as DownloadIcon,ft as Drawer,pt as DropdownMenu,mt as DropdownMenuCheckboxItem,ht as DropdownMenuContent,gt as DropdownMenuGroup,_t as DropdownMenuItem,vt as DropdownMenuLabel,yt as DropdownMenuRadioGroup,bt as DropdownMenuRadioItem,xt as DropdownMenuSeparator,St as DropdownMenuShortcut,Ct as DropdownMenuSub,wt as DropdownMenuSubContent,Tt as DropdownMenuSubTrigger,Et as DropdownMenuTrigger,y as EditIcon,hn as EmptyState,b as EnterIcon,x as EraserIcon,S as ExternalLinkIcon,In as FileAge,Ln as FileBrowser,C as FileIcon,Bn as FilePreview,w as FitIcon,Wn as FlowGraph,T as FolderIcon,E as ForkIcon,qi as GREP_COLLAPSED_LINES,D as GearIcon,O as GlobeIcon,k as GridIcon,A as HandIcon,qn as HashlineLines,j as HelpIcon,M as HighlighterIcon,N as HomeIcon,P as ImageIcon,Kt as Input,Jn as Kbd,F as KebabIcon,aa as LINE_TONE_TO_STATUS,Qn as Label,I as LightbulbIcon,L as ListIcon,Vr as LiveDuration,R as LoaderIcon,z as LockIcon,Jt as MAX_DIGIT_SHORTCUT,ca as MEDIA_KINDS,fa as MESSAGE_LINE_TONES,zn as Markdown,Yn as McpToolFields,Xn as McpToolFrame,Zn as McpToolOutput,rr as MediaPreview,Rn as MediaViewerDialog,B as MenuIcon,V as MessageIcon,sr as MessageItem,cr as MessageItemBody,lr as MessageItemGroup,ur as MessageItemHeader,dr as MessageItemHeaderAccessoryContext,fr as MessageItemStatus,br as MessageLines,H as MicIcon,U as MinusIcon,W as MonitorIcon,Dn as NavTab,On as NavTabBadge,Qt as OptionLabel,$t as OptionList,en as OptionRow,G as PaletteIcon,Sr as Panel,Cr as PanelBody,wr as PanelHeader,K as PaperclipIcon,Wi as PathText,tr as PdfPreview,Mr as PickerContent,Nr as PickerList,q as PinIcon,J as PlayCircleIcon,Y as PlusIcon,Tr as Popover,Er as PopoverAnchor,Dr as PopoverClose,Or as PopoverContent,kr as PopoverFooter,Ar as PopoverHeader,jr as PopoverTrigger,Ir as ProfilePicker,Hr as Progress,X as PuzzleIcon,Z as QuoteIcon,Ji as READ_COLLAPSED_LINES,Ur as RadioGroup,Wr as RadioGroupCard,Gr as RadioGroupItem,Q as RedoIcon,$ as RefreshIcon,qr as ReviewCommentDraft,ee as RewindIcon,ir as STATUS_EDGE,pr as STATUS_GLYPH,mr as STATUS_LABEL,pa as STATUS_TONES,oa as STATUS_TO_CHIP,sa as STATUS_TO_DOT,Jr as ScrollArea,Yr as ScrollBar,te as SearchIcon,Xr as SectionLabel,Zr as Select,Qr as SelectContent,$r as SelectGroup,ei as SelectItem,ti as SelectLabel,ni as SelectSeparator,ri as SelectTrigger,ii as SelectValue,ne as SendIcon,ai as Separator,re as ServerIcon,oi as SettingsActions,si as SettingsCard,ci as SettingsDescription,li as SettingsField,ui as SettingsHeader,di as SettingsNote,fi as SettingsPage,pi as SettingsRow,mi as SettingsRowDescription,hi as SettingsRowText,gi as SettingsRowTitle,_i as SettingsSection,vi as SettingsSectionDescription,yi as SettingsSectionHeader,bi as SettingsSectionTitle,xi as SettingsTitle,Si as SetupRow,Ci as Sheet,wi as SheetBody,Ti as SheetClose,Ei as SheetContent,Di as SheetDescription,Oi as SheetFooter,ki as SheetHeader,Ai as SheetOverlay,ji as SheetTitle,Mi as SheetTrigger,ie as ShieldIcon,ae as ShrinkIcon,oe as SidebarIcon,Vt as Skeleton,se as SlidersIcon,ce as SmartphoneIcon,le as SparklesIcon,Ke as Spinner,ar as StatusBadge,ue as StopIcon,Ni as StreamCursor,Pi as Switch,Lt as SyntaxLine,Rt as SyntaxText,kn as Tabs,An as TabsContent,jn as TabsList,Mn as TabsTrigger,de as TargetIcon,fe as TaskIcon,pe as TerminalIcon,Fi as TerminalView,Kr as Textarea,Ii as Toast,Li as ToastAction,Ri as ToastClose,zi as ToastDescription,Bi as ToastProvider,Vi as ToastTitle,Hi as ToastViewport,Gi as ToolPathLink,ze as Tooltip,Be as TooltipContent,Ve as TooltipProvider,He as TooltipTrigger,me as TrashIcon,he as UndoIcon,ge as UnlockIcon,_e as UserIcon,ve as UsersIcon,$n as ViewableImage,ye as VolumeIcon,be as WorkflowIcon,xe as WrenchIcon,gn as ageLabel,Ie as agentInitials,De as ansiSpans,Re as badgeVariants,Vn as boundedFileSource,Ge as breadcrumbSegments,at as buildReviewPrompt,Je as buttonVariants,Rr as clockRefreshMs,zr as clockText,Se as cn,Ki as collapseLines,Yi as compactDetails,ot as defaultReviewHeading,Pt as detectGrammar,it as dialogFooterVariants,st as diffGutterWidth,ct as diffRangeOf,Pe as dotVariants,jt as drawableImageUrl,Dt as dropdownMenuItemVariants,qt as fieldVariants,_n as fileAssetPath,vn as fileKind,yn as filePreviewMode,bn as fileTree,xn as filterFiles,Br as formatRunDuration,kt as grammarKeyOf,na as groupByDirectory,ra as groupRowLabel,Yt as handleOptionListKey,Xi as hashlineBody,Gn as hashlineGroups,Kn as hashlineGroupsKey,Ft as highlightToLines,Pr as inlineProfileIcon,Sn as isFileLayout,Mt as markdownMediaReview,At as markdownMediaReviewSlot,er as mediaKindOf,hr as messageItemRowVariants,gr as messageItemStatusVariants,_r as messageItemVariants,xr as messageLineVariants,Cn as modifiedLabel,wn as newestFiles,Xt as optionListHint,tn as optionListVariants,Zt as optionMarker,nn as optionMarkerVariants,rn as optionRowVariants,Zi as parseFileHeader,Fr as parseProfileCatalog,Qi as parseTaggedLine,$i as presentHashlineLines,Hn as rangedFileBlob,Un as readMediaBytes,nr as resolvePdfViewportRegion,ea as resultTextLines,lt as reviewCommentAnchor,Tn as sizeLabel,En as sortFiles,or as statusBadgeVariants,Nt as svgImageUrl,It as syntaxStyleOf,Nn as tabBadgeVariants,Pn as tabVariants,ta as takeTrailingNotice,Ui as toastVariants,vr as toolTone,ut as trimSnippet,yr as useMessageItem,Lr as useProfileCatalog,zt as useSyntaxLines};
1
+ import{ActivityIcon as e,AlertIcon as t,AppWindowIcon as n,ArrowLeftIcon as r,ArrowRightIcon as i,ArrowUpRightIcon as a,AudioLinesIcon as o,BellIcon as s,BookmarkPlusIcon as c,BoxIcon as l,BranchIcon as u,CalendarIcon as d,CheckIcon as f,ChevronDownIcon as p,ChevronRightIcon as m,ChevronUpIcon as h,CloseIcon as g,CopyIcon as _,DownloadIcon as v,EditIcon as y,EnterIcon as b,EraserIcon as x,ExternalLinkIcon as S,FileIcon as C,FitIcon as w,FolderIcon as T,ForkIcon as E,GearIcon as D,GlobeIcon as O,GridIcon as k,HandIcon as A,HelpIcon as j,HighlighterIcon as M,HomeIcon as N,ImageIcon as P,KebabIcon as F,LightbulbIcon as I,ListIcon as L,LoaderIcon as R,LockIcon as z,MenuIcon as B,MessageIcon as V,MicIcon as H,MinusIcon as U,MonitorIcon as W,PaletteIcon as G,PaperclipIcon as K,PinIcon as q,PlayCircleIcon as J,PlusIcon as Y,PuzzleIcon as X,QuoteIcon as Z,RedoIcon as Q,RefreshIcon as $,RewindIcon as ee,SearchIcon as te,SendIcon as ne,ServerIcon as re,ShieldIcon as ie,ShrinkIcon as ae,SidebarIcon as oe,SlidersIcon as se,SmartphoneIcon as ce,SparklesIcon as le,StopIcon as ue,TargetIcon as de,TaskIcon as fe,TerminalIcon as pe,TrashIcon as me,UndoIcon as he,UnlockIcon as ge,UserIcon as _e,UsersIcon as ve,VolumeIcon as ye,WorkflowIcon as be,WrenchIcon as xe}from"./packages/core/po-web-components/src/icons/icons.mjs";import{cn as Se}from"./packages/core/po-web-components/src/lib/cn.mjs";import{Accordion as Ce,AccordionContent as we,AccordionItem as Te,AccordionTrigger as Ee}from"./packages/core/po-web-components/src/components/Accordion.mjs";import{ansiSpans as De}from"./packages/core/po-web-components/src/lib/ansiSpans.mjs";import{AnsiLine as Oe,AnsiText as ke}from"./packages/core/po-web-components/src/components/AnsiText.mjs";import{Avatar as Ae,AvatarFallback as je,AvatarImage as Me}from"./packages/core/po-web-components/src/components/Avatar.mjs";import{Dot as Ne,dotVariants as Pe}from"./packages/core/po-web-components/src/components/Dot.mjs";import{AgentAvatar as Fe,agentInitials as Ie}from"./packages/core/po-web-components/src/components/AgentAvatar.mjs";import{Badge as Le,badgeVariants as Re}from"./packages/core/po-web-components/src/components/Badge.mjs";import{Tooltip as ze,TooltipContent as Be,TooltipProvider as Ve,TooltipTrigger as He}from"./packages/core/po-web-components/src/components/Tooltip.mjs";import{BREADCRUMB_ELLIPSIS as Ue,Breadcrumb as We,breadcrumbSegments as Ge}from"./packages/core/po-web-components/src/components/Breadcrumb.mjs";import{Spinner as Ke}from"./packages/core/po-web-components/src/components/Spinner.mjs";import{Button as qe,buttonVariants as Je}from"./packages/core/po-web-components/src/components/Button.mjs";import{Dialog as Ye,DialogBody as Xe,DialogClose as Ze,DialogContent as Qe,DialogDescription as $e,DialogFooter as et,DialogHeader as tt,DialogTitle as nt,DialogTrigger as rt,dialogFooterVariants as it}from"./packages/core/po-web-components/src/components/Dialog.mjs";import{buildReviewPrompt as at,defaultReviewHeading as ot,diffGutterWidth as st,diffRangeOf as ct,reviewCommentAnchor as lt,trimSnippet as ut}from"./packages/core/po-web-components/src/lib/review.mjs";import{DiffView as dt}from"./packages/core/po-web-components/src/components/DiffView.mjs";import{Drawer as ft}from"./packages/core/po-web-components/src/components/Drawer.mjs";import{DropdownMenu as pt,DropdownMenuCheckboxItem as mt,DropdownMenuContent as ht,DropdownMenuGroup as gt,DropdownMenuItem as _t,DropdownMenuLabel as vt,DropdownMenuRadioGroup as yt,DropdownMenuRadioItem as bt,DropdownMenuSeparator as xt,DropdownMenuShortcut as St,DropdownMenuSub as Ct,DropdownMenuSubContent as wt,DropdownMenuSubTrigger as Tt,DropdownMenuTrigger as Et,dropdownMenuItemVariants as Dt}from"./packages/core/po-web-components/src/components/DropdownMenu.mjs";import{Checkbox as Ot}from"./packages/core/po-web-components/src/components/Checkbox.mjs";import{grammarKeyOf as kt}from"./packages/core/po-web-components/src/lib/editorLanguage.mjs";import{markdownMediaReviewSlot as At}from"./packages/core/po-web-components/src/lib/markdownMediaSlot.mjs";import{drawableImageUrl as jt,markdownMediaReview as Mt,svgImageUrl as Nt}from"./packages/core/po-web-components/src/lib/markdownMedia.mjs";import{detectGrammar as Pt,highlightToLines as Ft,syntaxStyleOf as It}from"./packages/core/po-web-components/src/lib/syntaxHighlight.mjs";import{SyntaxLine as Lt,SyntaxText as Rt,useSyntaxLines as zt}from"./packages/core/po-web-components/src/components/SyntaxText.mjs";import{CodeBlock as Bt}from"./packages/core/po-web-components/src/components/CodeBlock.mjs";import{Skeleton as Vt}from"./packages/core/po-web-components/src/components/Skeleton.mjs";import{CodeEditor as Ht}from"./packages/core/po-web-components/src/components/CodeEditor.mjs";import{Collapsible as Ut,CollapsibleContent as Wt,CollapsibleTrigger as Gt}from"./packages/core/po-web-components/src/components/Collapsible.mjs";import{Input as Kt,fieldVariants as qt}from"./packages/core/po-web-components/src/components/Input.mjs";import{MAX_DIGIT_SHORTCUT as Jt,handleOptionListKey as Yt,optionListHint as Xt,optionMarker as Zt}from"./packages/core/po-web-components/src/lib/optionList.mjs";import{OptionLabel as Qt,OptionList as $t,OptionRow as en,optionListVariants as tn,optionMarkerVariants as nn,optionRowVariants as rn}from"./packages/core/po-web-components/src/components/OptionList.mjs";import{CommandDialog as an,CommandEmpty as on,CommandFooter as sn,CommandGroup as cn,CommandGroupLabel as ln,CommandHeader as un,CommandInput as dn,CommandItem as fn,CommandItemLabel as pn,CommandList as mn}from"./packages/core/po-web-components/src/components/Command.mjs";import{EmptyState as hn}from"./packages/core/po-web-components/src/components/EmptyState.mjs";import{ageLabel as gn,fileAssetPath as _n,fileKind as vn,filePreviewMode as yn,fileTree as bn,filterFiles as xn,isFileLayout as Sn,modifiedLabel as Cn,newestFiles as wn,sizeLabel as Tn,sortFiles as En}from"./packages/core/po-web-components/src/lib/files.mjs";import{NavTab as Dn,NavTabBadge as On,Tabs as kn,TabsContent as An,TabsList as jn,TabsTrigger as Mn,tabBadgeVariants as Nn,tabVariants as Pn}from"./packages/core/po-web-components/src/components/Tabs.mjs";import{DEFAULT_FILE_BROWSER_FILTERS as Fn,FileAge as In,FileBrowser as Ln}from"./packages/core/po-web-components/src/components/FileBrowser.mjs";import{MediaViewerDialog as Rn,PanZoom as zn}from"./packages/core/po-web-components/src/components/MediaViewerDialog.mjs";import{Markdown as Bn}from"./packages/core/po-web-components/src/components/Markdown.mjs";import{FilePreview as Vn}from"./packages/core/po-web-components/src/components/FilePreview.mjs";import{boundedFileSource as Hn,rangedFileBlob as Un,readMediaBytes as Wn}from"./packages/core/po-web-components/src/lib/fileDownload.mjs";import{FlowGraph as Gn}from"./packages/core/po-web-components/src/components/FlowGraph.mjs";import{hashlineGroups as Kn,hashlineGroupsKey as qn}from"./packages/core/po-web-components/src/lib/hashlineHighlight.mjs";import{HashlineLines as Jn}from"./packages/core/po-web-components/src/components/HashlineLines.mjs";import{Kbd as Yn}from"./packages/core/po-web-components/src/components/Kbd.mjs";import{McpToolFields as Xn,McpToolFrame as Zn,McpToolOutput as Qn}from"./packages/core/po-web-components/src/components/McpToolWidget.mjs";import{Label as $n}from"./packages/core/po-web-components/src/components/Label.mjs";import{ViewableImage as er}from"./packages/core/po-web-components/src/components/ViewableImage.mjs";import{mediaKindOf as tr}from"./packages/core/po-web-components/src/lib/media.mjs";import{PdfPreview as nr,resolvePdfViewportRegion as rr}from"./packages/core/po-web-components/src/components/PdfPreview.mjs";import{MediaPreview as ir}from"./packages/core/po-web-components/src/components/MediaPreview.mjs";import{STATUS_EDGE as ar,StatusBadge as or,statusBadgeVariants as sr}from"./packages/core/po-web-components/src/components/StatusBadge.mjs";import{MessageItem as cr,MessageItemBody as lr,MessageItemGroup as ur,MessageItemHeader as dr,MessageItemHeaderAccessoryContext as fr,MessageItemStatus as pr,STATUS_GLYPH as mr,STATUS_LABEL as hr,messageItemRowVariants as gr,messageItemStatusVariants as _r,messageItemVariants as vr,toolTone as yr,useMessageItem as br}from"./packages/core/po-web-components/src/components/MessageItem.mjs";import{MessageLines as xr,messageLineVariants as Sr}from"./packages/core/po-web-components/src/components/MessageLines.mjs";import{Panel as Cr,PanelBody as wr,PanelHeader as Tr}from"./packages/core/po-web-components/src/components/Panel.mjs";import{Popover as Er,PopoverAnchor as Dr,PopoverClose as Or,PopoverContent as kr,PopoverFooter as Ar,PopoverHeader as jr,PopoverTrigger as Mr}from"./packages/core/po-web-components/src/components/Popover.mjs";import{PickerContent as Nr,PickerList as Pr}from"./packages/core/po-web-components/src/components/Picker.mjs";import{inlineProfileIcon as Fr,parseProfileCatalog as Ir}from"./packages/core/po-web-components/src/lib/profilePicker.mjs";import{ProfilePicker as Lr,useProfileCatalog as Rr}from"./packages/core/po-web-components/src/components/ProfilePicker.mjs";import{clockRefreshMs as zr,clockText as Br,formatRunDuration as Vr}from"./packages/core/po-web-components/src/lib/runDuration.mjs";import{LiveDuration as Hr}from"./packages/core/po-web-components/src/components/LiveDuration.mjs";import{Progress as Ur}from"./packages/core/po-web-components/src/components/Progress.mjs";import{RadioGroup as Wr,RadioGroupCard as Gr,RadioGroupItem as Kr}from"./packages/core/po-web-components/src/components/RadioGroup.mjs";import{Textarea as qr}from"./packages/core/po-web-components/src/components/Textarea.mjs";import{ReviewCommentDraft as Jr}from"./packages/core/po-web-components/src/components/ReviewCommentDraft.mjs";import{ScrollArea as Yr,ScrollBar as Xr}from"./packages/core/po-web-components/src/components/ScrollArea.mjs";import{SectionLabel as Zr}from"./packages/core/po-web-components/src/components/SectionLabel.mjs";import{Select as Qr,SelectContent as $r,SelectGroup as ei,SelectItem as ti,SelectLabel as ni,SelectSeparator as ri,SelectTrigger as ii,SelectValue as ai}from"./packages/core/po-web-components/src/components/Select.mjs";import{Separator as oi}from"./packages/core/po-web-components/src/components/Separator.mjs";import{SettingsActions as si,SettingsCard as ci,SettingsDescription as li,SettingsField as ui,SettingsHeader as di,SettingsNote as fi,SettingsPage as pi,SettingsRow as mi,SettingsRowDescription as hi,SettingsRowText as gi,SettingsRowTitle as _i,SettingsSection as vi,SettingsSectionDescription as yi,SettingsSectionHeader as bi,SettingsSectionTitle as xi,SettingsTitle as Si}from"./packages/core/po-web-components/src/components/Settings.mjs";import{SetupRow as Ci}from"./packages/core/po-web-components/src/components/SetupRow.mjs";import{Sheet as wi,SheetBody as Ti,SheetClose as Ei,SheetContent as Di,SheetDescription as Oi,SheetFooter as ki,SheetHeader as Ai,SheetOverlay as ji,SheetTitle as Mi,SheetTrigger as Ni}from"./packages/core/po-web-components/src/components/Sheet.mjs";import{StreamCursor as Pi}from"./packages/core/po-web-components/src/components/StreamCursor.mjs";import{Switch as Fi}from"./packages/core/po-web-components/src/components/Switch.mjs";import{TerminalView as Ii}from"./packages/core/po-web-components/src/components/TerminalView.mjs";import{Toast as Li,ToastAction as Ri,ToastClose as zi,ToastDescription as Bi,ToastProvider as Vi,ToastTitle as Hi,ToastViewport as Ui,toastVariants as Wi}from"./packages/core/po-web-components/src/components/Toast.mjs";import{PathText as Gi}from"./packages/core/po-web-components/src/components/PathText.mjs";import{ToolPathLink as Ki}from"./packages/core/po-web-components/src/components/ToolPathLink.mjs";import{collapseLines as qi}from"./packages/core/po-web-components/src/lib/collapse.mjs";import{GREP_COLLAPSED_LINES as Ji,READ_COLLAPSED_LINES as Yi,compactDetails as Xi,hashlineBody as Zi,parseFileHeader as Qi,parseTaggedLine as $i,presentHashlineLines as ea,resultTextLines as ta,takeTrailingNotice as na}from"./packages/core/po-web-components/src/lib/hashlineView.mjs";import{groupByDirectory as ra,groupRowLabel as ia}from"./packages/core/po-web-components/src/lib/pathGroups.mjs";import{CHIP_TO_STATUS as aa,LINE_TONE_TO_STATUS as oa,STATUS_TO_CHIP as sa,STATUS_TO_DOT as ca}from"./packages/core/po-web-components/src/lib/tone.mjs";import{MEDIA_KINDS as la}from"./packages/core/po-web-components/src/types/editor.mjs";import{ACCENT_TONES as ua,CHIP_TONES as da,DOT_TONES as fa,MESSAGE_LINE_TONES as pa,STATUS_TONES as ma}from"./packages/core/po-web-components/src/types/tone.mjs";export{ua as ACCENT_TONES,Ce as Accordion,we as AccordionContent,Te as AccordionItem,Ee as AccordionTrigger,e as ActivityIcon,Fe as AgentAvatar,t as AlertIcon,Oe as AnsiLine,ke as AnsiText,n as AppWindowIcon,r as ArrowLeftIcon,i as ArrowRightIcon,a as ArrowUpRightIcon,o as AudioLinesIcon,Ae as Avatar,je as AvatarFallback,Me as AvatarImage,Ue as BREADCRUMB_ELLIPSIS,Le as Badge,s as BellIcon,c as BookmarkPlusIcon,l as BoxIcon,u as BranchIcon,We as Breadcrumb,qe as Button,da as CHIP_TONES,aa as CHIP_TO_STATUS,d as CalendarIcon,f as CheckIcon,Ot as Checkbox,p as ChevronDownIcon,m as ChevronRightIcon,h as ChevronUpIcon,g as CloseIcon,Bt as CodeBlock,Ht as CodeEditor,Ut as Collapsible,Wt as CollapsibleContent,Gt as CollapsibleTrigger,an as CommandDialog,on as CommandEmpty,sn as CommandFooter,cn as CommandGroup,ln as CommandGroupLabel,un as CommandHeader,dn as CommandInput,fn as CommandItem,pn as CommandItemLabel,mn as CommandList,_ as CopyIcon,Fn as DEFAULT_FILE_BROWSER_FILTERS,fa as DOT_TONES,Ye as Dialog,Xe as DialogBody,Ze as DialogClose,Qe as DialogContent,$e as DialogDescription,et as DialogFooter,tt as DialogHeader,nt as DialogTitle,rt as DialogTrigger,dt as DiffView,Ne as Dot,v as DownloadIcon,ft as Drawer,pt as DropdownMenu,mt as DropdownMenuCheckboxItem,ht as DropdownMenuContent,gt as DropdownMenuGroup,_t as DropdownMenuItem,vt as DropdownMenuLabel,yt as DropdownMenuRadioGroup,bt as DropdownMenuRadioItem,xt as DropdownMenuSeparator,St as DropdownMenuShortcut,Ct as DropdownMenuSub,wt as DropdownMenuSubContent,Tt as DropdownMenuSubTrigger,Et as DropdownMenuTrigger,y as EditIcon,hn as EmptyState,b as EnterIcon,x as EraserIcon,S as ExternalLinkIcon,In as FileAge,Ln as FileBrowser,C as FileIcon,Vn as FilePreview,w as FitIcon,Gn as FlowGraph,T as FolderIcon,E as ForkIcon,Ji as GREP_COLLAPSED_LINES,D as GearIcon,O as GlobeIcon,k as GridIcon,A as HandIcon,Jn as HashlineLines,j as HelpIcon,M as HighlighterIcon,N as HomeIcon,P as ImageIcon,Kt as Input,Yn as Kbd,F as KebabIcon,oa as LINE_TONE_TO_STATUS,$n as Label,I as LightbulbIcon,L as ListIcon,Hr as LiveDuration,R as LoaderIcon,z as LockIcon,Jt as MAX_DIGIT_SHORTCUT,la as MEDIA_KINDS,pa as MESSAGE_LINE_TONES,Bn as Markdown,Xn as McpToolFields,Zn as McpToolFrame,Qn as McpToolOutput,ir as MediaPreview,Rn as MediaViewerDialog,B as MenuIcon,V as MessageIcon,cr as MessageItem,lr as MessageItemBody,ur as MessageItemGroup,dr as MessageItemHeader,fr as MessageItemHeaderAccessoryContext,pr as MessageItemStatus,xr as MessageLines,H as MicIcon,U as MinusIcon,W as MonitorIcon,Dn as NavTab,On as NavTabBadge,Qt as OptionLabel,$t as OptionList,en as OptionRow,G as PaletteIcon,zn as PanZoom,Cr as Panel,wr as PanelBody,Tr as PanelHeader,K as PaperclipIcon,Gi as PathText,nr as PdfPreview,Nr as PickerContent,Pr as PickerList,q as PinIcon,J as PlayCircleIcon,Y as PlusIcon,Er as Popover,Dr as PopoverAnchor,Or as PopoverClose,kr as PopoverContent,Ar as PopoverFooter,jr as PopoverHeader,Mr as PopoverTrigger,Lr as ProfilePicker,Ur as Progress,X as PuzzleIcon,Z as QuoteIcon,Yi as READ_COLLAPSED_LINES,Wr as RadioGroup,Gr as RadioGroupCard,Kr as RadioGroupItem,Q as RedoIcon,$ as RefreshIcon,Jr as ReviewCommentDraft,ee as RewindIcon,ar as STATUS_EDGE,mr as STATUS_GLYPH,hr as STATUS_LABEL,ma as STATUS_TONES,sa as STATUS_TO_CHIP,ca as STATUS_TO_DOT,Yr as ScrollArea,Xr as ScrollBar,te as SearchIcon,Zr as SectionLabel,Qr as Select,$r as SelectContent,ei as SelectGroup,ti as SelectItem,ni as SelectLabel,ri as SelectSeparator,ii as SelectTrigger,ai as SelectValue,ne as SendIcon,oi as Separator,re as ServerIcon,si as SettingsActions,ci as SettingsCard,li as SettingsDescription,ui as SettingsField,di as SettingsHeader,fi as SettingsNote,pi as SettingsPage,mi as SettingsRow,hi as SettingsRowDescription,gi as SettingsRowText,_i as SettingsRowTitle,vi as SettingsSection,yi as SettingsSectionDescription,bi as SettingsSectionHeader,xi as SettingsSectionTitle,Si as SettingsTitle,Ci as SetupRow,wi as Sheet,Ti as SheetBody,Ei as SheetClose,Di as SheetContent,Oi as SheetDescription,ki as SheetFooter,Ai as SheetHeader,ji as SheetOverlay,Mi as SheetTitle,Ni as SheetTrigger,ie as ShieldIcon,ae as ShrinkIcon,oe as SidebarIcon,Vt as Skeleton,se as SlidersIcon,ce as SmartphoneIcon,le as SparklesIcon,Ke as Spinner,or as StatusBadge,ue as StopIcon,Pi as StreamCursor,Fi as Switch,Lt as SyntaxLine,Rt as SyntaxText,kn as Tabs,An as TabsContent,jn as TabsList,Mn as TabsTrigger,de as TargetIcon,fe as TaskIcon,pe as TerminalIcon,Ii as TerminalView,qr as Textarea,Li as Toast,Ri as ToastAction,zi as ToastClose,Bi as ToastDescription,Vi as ToastProvider,Hi as ToastTitle,Ui as ToastViewport,Ki as ToolPathLink,ze as Tooltip,Be as TooltipContent,Ve as TooltipProvider,He as TooltipTrigger,me as TrashIcon,he as UndoIcon,ge as UnlockIcon,_e as UserIcon,ve as UsersIcon,er as ViewableImage,ye as VolumeIcon,be as WorkflowIcon,xe as WrenchIcon,gn as ageLabel,Ie as agentInitials,De as ansiSpans,Re as badgeVariants,Hn as boundedFileSource,Ge as breadcrumbSegments,at as buildReviewPrompt,Je as buttonVariants,zr as clockRefreshMs,Br as clockText,Se as cn,qi as collapseLines,Xi as compactDetails,ot as defaultReviewHeading,Pt as detectGrammar,it as dialogFooterVariants,st as diffGutterWidth,ct as diffRangeOf,Pe as dotVariants,jt as drawableImageUrl,Dt as dropdownMenuItemVariants,qt as fieldVariants,_n as fileAssetPath,vn as fileKind,yn as filePreviewMode,bn as fileTree,xn as filterFiles,Vr as formatRunDuration,kt as grammarKeyOf,ra as groupByDirectory,ia as groupRowLabel,Yt as handleOptionListKey,Zi as hashlineBody,Kn as hashlineGroups,qn as hashlineGroupsKey,Ft as highlightToLines,Fr as inlineProfileIcon,Sn as isFileLayout,Mt as markdownMediaReview,At as markdownMediaReviewSlot,tr as mediaKindOf,gr as messageItemRowVariants,_r as messageItemStatusVariants,vr as messageItemVariants,Sr as messageLineVariants,Cn as modifiedLabel,wn as newestFiles,Xt as optionListHint,tn as optionListVariants,Zt as optionMarker,nn as optionMarkerVariants,rn as optionRowVariants,Qi as parseFileHeader,Ir as parseProfileCatalog,$i as parseTaggedLine,ea as presentHashlineLines,Un as rangedFileBlob,Wn as readMediaBytes,rr as resolvePdfViewportRegion,ta as resultTextLines,lt as reviewCommentAnchor,Tn as sizeLabel,En as sortFiles,sr as statusBadgeVariants,Nt as svgImageUrl,It as syntaxStyleOf,Nn as tabBadgeVariants,Pn as tabVariants,na as takeTrailingNotice,Wi as toastVariants,yr as toolTone,ut as trimSnippet,br as useMessageItem,Rr as useProfileCatalog,zt as useSyntaxLines};
@@ -1 +1 @@
1
- {"version":3,"file":"hubChannel.d.mts","names":[],"sources":["../../../../../../../../po-core/dist/src/schemas/hubChannel.d.mts"],"mappings":";;;;;;;;iBAsSiB;WACN;aACE;aACA;aACA;aACA;aACA;;WAEF;WACA"}
1
+ {"version":3,"file":"hubChannel.d.mts","names":[],"sources":["../../../../../../../../po-core/dist/src/schemas/hubChannel.d.mts"],"mappings":";;;;;;;;iBAgTiB;WACN;aACE;aACA;aACA;aACA;aACA;;WAEF;WACA"}
@@ -72,6 +72,10 @@ export interface TransientTab {
72
72
  panel: ComponentType<WebPluginSlotProps>;
73
73
  /** Keeps the host composer below this panel. Defaults to false. */
74
74
  retainComposer?: boolean;
75
+ /** With retainComposer, the host shows the composer beside the panel instead of below it. */
76
+ composerAside?: boolean;
77
+ /** The dock face the conversation sits beside, grouped, while this tab keeps its composer aside. */
78
+ asideFace?: string;
75
79
  /** Conversation controls target this session while the owning session keeps its route and tabs. */
76
80
  targetSessionId?: string;
77
81
  /** Names what the activity panel shows while targetSessionId is open, such as a workflow step. */
@@ -287,6 +291,8 @@ export interface WebPluginSlotProps {
287
291
  runNativeVoice?: (start: () => Promise<void>, stop: () => Promise<void>) => Promise<void>;
288
292
  /** Host navigation for the target session; null returns to the conversation tab. */
289
293
  openTab: (tabId: string | null) => void;
294
+ /** Opens the conversation beside this panel with the prompt focused. When absent, the host offers its own way in. */
295
+ openConversation?: () => void;
290
296
  /**
291
297
  * Host navigation to another session the page lists, such as a child session
292
298
  * this plugin started. Absent in hosts without session navigation.
@@ -1 +1 @@
1
- {"version":3,"file":"webPlugin.d.mts","names":[],"sources":["../../../../../../../../../po-core/dist/src/web/types/webPlugin.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BY,sBAAsB,mBAAmB,OAAO;;;;;;;;;;iBAU3C,gBAAgB;EAC/B;;EAEA;;EAEA;;EAEA,OAAO,iBAAiB;;;iBAGT,aAAa;EAC5B;EACA;EACA;EACA,MAAM;;;iBAGS;;EAEf;;EAEA,SAAS;;;;;;;;iBAQM;;EAEf;EACA;EACA,OAAO,cAAc;;EAErB;;EAEA;;EAEA;;;;;EAKA,mBAAmB,sBAAsB;;EAEzC,UAAU;;EAEV,WAAW;;;;;;;iBAkDI;;EAEf;;EAEA;;;iBAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAGe;;EAEf;EACA;;EAEA,SAAS;;;iBAkBM;;EAEf;EACA;EACA;EACA;;;iBAyBe;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;iBAMe;WACN;WACA;WACA;;WAEA;;;;;;iBAMM;WACN;;;iBAGM;WACN;WACA;aACE;aACA;;;WAGF;;iBAEM;WACN,mBAAmB;;WAEnB;;;;;;;iBAOM;WACN;WAC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BAAsB;IACpB;IACA;IACA;IACA,aAAa,OAAO,KAAK;QACrB;;EAEN,qBAAqB;IACnB;IACA;IACA;QACI;;EAEN,gBAAgB;IACd;IACA;QACI;EACN,eAAe;;;EAGf,kBAAkB;IAChB;IACA;IACA;IACA,SAAS;IACT,OAAO,gBAAgB,kBAAkB,QAAQ,gBAAgB,QAAQ;QACrE;EACN,sBAAsB;IACpB;IACA;IACA;IACA;IACA;QACI;;EAEN,wBAAwB;IACtB;IACA,OAAO,cAAc,gCAAgC,QAAQ,gBAAgB;MAC3E;MACA;MACA;MACA;MACA;MACA;MACA;;IAEF,QAAQ,iBAAiB;QACrB;;EAEN,kBAAkB;IAChB,YAAY,aAAa,QAAQ,gBAAgB;IACjD,UAAU;IACV,UAAU;MACR;MACA;MACA;MACA;MACA;;;IAGF,aAAa;IACb;IACA,OAAO;IACP;IACA,OAAO;;;EAGT;IACE,iBAAiB;MACf,QAAQ,KAAK;MACb,UAAU;QACR;QACA;QACA;QACA;;UAEE;MACJ,YAAY;QACV;QACA;QACA;QACA;;;IAGJ,UAAU,KAAK,eAAe;MAC5B,YAAY;MACZ;;IAEF,aAAa;;;EAGf,sBAAsB;;;;;EAKtB;;EAEA,wBAAwB,MAAM;;EAE9B,wBAAwB,SAAS;;EAEjC,iBAAiB,SAAS,oBAAoB;;EAE9C,oBAAoB,MAAM,kCAAkC;;EAE5D,kBAAkB;;EAElB,aAAa,iBAAiB;;EAE9B,WAAW,MAAM,MAAM,gBAAgB,mBAAmB,aAAa;;;;;;;EAOvE,WAAW;;;;;;;EAOX,UAAU,SAAS;;EAEnB,4BAA4B;;EAE5B;;EAEA;;EAEA,iBAAiB;;EAEjB,aAAa"}
1
+ {"version":3,"file":"webPlugin.d.mts","names":[],"sources":["../../../../../../../../../po-core/dist/src/web/types/webPlugin.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BY,sBAAsB,mBAAmB,OAAO;;;;;;;;;;iBAU3C,gBAAgB;EAC/B;;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ACA;QACA;;;IAGJ,UAAU,KAAK,eAAe;MAC5B,YAAY;MACZ;;IAEF,aAAa;;;EAGf,sBAAsB;;;;;EAKtB;;EAEA,wBAAwB,MAAM;;EAE9B,wBAAwB,SAAS;;EAEjC,iBAAiB,SAAS,oBAAoB;;EAE9C,oBAAoB,MAAM,kCAAkC;;EAE5D,kBAAkB;;EAElB,aAAa,iBAAiB;;EAE9B,WAAW,MAAM,MAAM,gBAAgB,mBAAmB,aAAa;;;;;;;EAOvE,WAAW;;;;;;;EAOX,UAAU,SAAS;;EAEnB,4BAA4B;;EAE5B;;EAEA;;EAEA,iBAAiB;;EAEjB,aAAa"}
@@ -1,9 +1,15 @@
1
1
  import { MarkdownMedia } from "../lib/markdownMedia.mjs";
2
2
  import { ReactNode } from "react";
3
3
  //#region src/components/MediaViewerDialog.d.ts
4
+ /** Pan by dragging, zoom with the wheel or the footer; the picture starts fitted to the view. */
5
+ export declare function PanZoom({ media, action }: {
6
+ media: MarkdownMedia;
7
+ action?: ReactNode;
8
+ }): import("react").JSX.Element;
4
9
  /**
5
- * Opened media, full screen. Without a `review` surface it is a pan and zoom
6
- * viewer; with one (the Author mode's panel), that surface owns the body.
10
+ * Opened media, full screen, as a pan and zoom viewer. `review` (the Author
11
+ * mode's "Open in Author" button) sits in the footer; marking up happens in
12
+ * Author's own tab, never inside this preview.
7
13
  */
8
14
  export declare function MediaViewerDialog({ media, onClose, review }: {
9
15
  media: MarkdownMedia | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"MediaViewerDialog.d.mts","names":[],"sources":["../../../../../../src/components/MediaViewerDialog.tsx"],"mappings":";;;;;;;wBAuGgB,oBACd,OACA,SACA;EAEA,OAAO;EACP;EACA,SAAS;oBACV,IAAA"}
1
+ {"version":3,"file":"MediaViewerDialog.d.mts","names":[],"sources":["../../../../../../src/components/MediaViewerDialog.tsx"],"mappings":";;;;wBAkBgB,UAAU,OAAO;EAAY,OAAO;EAAe,SAAS;oBAAW,IAAA;;;;;;wBA4FvE,oBACd,OACA,SACA;EAEA,OAAO;EACP;EACA,SAAS;oBACV,IAAA"}
@@ -1,2 +1,2 @@
1
- import{Button as e}from"./Button.mjs";import{Dialog as t,DialogContent as n,DialogDescription as r,DialogHeader as i,DialogTitle as a}from"./Dialog.mjs";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{useRef as l,useState as u}from"react";const d={zoom:1,x:0,y:0};function f({media:t}){let[n,r]=u(d),i=l(null),a=l(void 0),f=(e,t)=>r(n=>{let r=Math.min(8,Math.max(.25,e)),a=i.current?.getBoundingClientRect();if(a===void 0||t===void 0)return{...n,zoom:r};let o=t.x-(a.left+a.width/2),s=t.y-(a.top+a.height/2),c=r/n.zoom;return{zoom:r,x:o-(o-n.x)*c,y:s-(s-n.y)*c}});return/* @__PURE__ */ c(o,{children:[/* @__PURE__ */ s(`div`,{ref:i,"data-testid":`media-viewer-canvas`,tabIndex:0,"aria-label":`${t.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`,className:`relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing`,onWheel:e=>f(n.zoom*(e.deltaY<0?1.15:1/1.15),{x:e.clientX,y:e.clientY}),onPointerDown:e=>{e.button===0&&(a.current={x:e.clientX,y:e.clientY,from:n},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=a.current;t!==void 0&&r({...t.from,x:t.from.x+e.clientX-t.x,y:t.from.y+e.clientY-t.y})},onPointerUp:()=>a.current=void 0,onPointerCancel:()=>a.current=void 0,onKeyDown:e=>{if(e.key===`+`||e.key===`=`)f(n.zoom*1.5);else if(e.key===`-`)f(n.zoom/1.5);else if(e.key===`0`)r(d);else return;e.preventDefault()},children:/* @__PURE__ */ s(`img`,{src:t.url,alt:t.title,draggable:!1,className:`absolute top-1/2 left-1/2 max-h-full max-w-full select-none`,style:{transform:`translate(calc(-50% + ${String(n.x)}px), calc(-50% + ${String(n.y)}px)) scale(${String(n.zoom)})`}})}),/* @__PURE__ */ c(`footer`,{className:`flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5`,children:[/* @__PURE__ */ c(`div`,{role:`group`,"aria-label":`Zoom`,className:`flex items-center rounded-md border border-po-border`,children:[/* @__PURE__ */ s(e,{size:`sm`,variant:`ghost`,"aria-label":`Zoom out`,onClick:()=>f(n.zoom/1.5),children:`−`}),/* @__PURE__ */ c(`output`,{className:`flex min-w-14 justify-center text-sm tabular-nums text-po-text`,children:[Math.round(n.zoom*100),`%`]}),/* @__PURE__ */ s(e,{size:`sm`,variant:`ghost`,"aria-label":`Zoom in`,onClick:()=>f(n.zoom*1.5),children:`+`})]}),/* @__PURE__ */ s(e,{size:`sm`,variant:`outline`,onClick:()=>r(d),children:`Fit`}),/* @__PURE__ */ s(`span`,{className:`ml-auto truncate text-sm text-po-dim`,children:t.sourcePath??t.documentPath??``})]})]})}function p({media:e,onClose:o,review:l}){return/* @__PURE__ */ s(t,{open:e!==void 0,onOpenChange:e=>e?void 0:o(),children:e===void 0?null:/* @__PURE__ */ c(n,{"data-testid":`media-viewer`,className:`h-[calc(100dvh-24px)] w-[calc(100vw-24px)]`,children:[/* @__PURE__ */ c(i,{dismissible:!0,closeLabel:`Close viewer`,children:[/* @__PURE__ */ s(a,{className:`min-w-0 truncate text-base`,children:e.title}),/* @__PURE__ */ c(r,{className:`sr-only`,children:[e.kind===`mermaid`?`Mermaid diagram`:`Image`,` opened full screen.`]})]}),l??/* @__PURE__ */ s(f,{media:e},e.url)]})})}export{p as MediaViewerDialog,f as PanZoom};
1
+ import{Button as e}from"./Button.mjs";import{Dialog as t,DialogContent as n,DialogDescription as r,DialogHeader as i,DialogTitle as a}from"./Dialog.mjs";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{useRef as l,useState as u}from"react";const d={zoom:1,x:0,y:0};function f({media:t,action:n}){let[r,i]=u(d),a=l(null),f=l(void 0),p=(e,t)=>i(n=>{let r=Math.min(8,Math.max(.25,e)),i=a.current?.getBoundingClientRect();if(i===void 0||t===void 0)return{...n,zoom:r};let o=t.x-(i.left+i.width/2),s=t.y-(i.top+i.height/2),c=r/n.zoom;return{zoom:r,x:o-(o-n.x)*c,y:s-(s-n.y)*c}});return/* @__PURE__ */ c(o,{children:[/* @__PURE__ */ s(`div`,{ref:a,"data-testid":`media-viewer-canvas`,tabIndex:0,"aria-label":`${t.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`,className:`relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing`,onWheel:e=>p(r.zoom*(e.deltaY<0?1.15:1/1.15),{x:e.clientX,y:e.clientY}),onPointerDown:e=>{e.button===0&&(f.current={x:e.clientX,y:e.clientY,from:r},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=f.current;t!==void 0&&i({...t.from,x:t.from.x+e.clientX-t.x,y:t.from.y+e.clientY-t.y})},onPointerUp:()=>f.current=void 0,onPointerCancel:()=>f.current=void 0,onKeyDown:e=>{if(e.key===`+`||e.key===`=`)p(r.zoom*1.5);else if(e.key===`-`)p(r.zoom/1.5);else if(e.key===`0`)i(d);else return;e.preventDefault()},children:/* @__PURE__ */ s(`div`,{className:`pointer-events-none absolute inset-4`,children:/* @__PURE__ */ s(`img`,{src:t.url,alt:t.title,draggable:!1,className:`absolute top-1/2 left-1/2 max-h-full max-w-full select-none`,style:{transform:`translate(calc(-50% + ${String(r.x)}px), calc(-50% + ${String(r.y)}px)) scale(${String(r.zoom)})`}})})}),/* @__PURE__ */ c(`footer`,{className:`flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5`,children:[/* @__PURE__ */ c(`div`,{role:`group`,"aria-label":`Zoom`,className:`flex items-center rounded-md border border-po-border`,children:[/* @__PURE__ */ s(e,{size:`sm`,variant:`ghost`,"aria-label":`Zoom out`,onClick:()=>p(r.zoom/1.5),children:`−`}),/* @__PURE__ */ c(`output`,{className:`flex min-w-14 justify-center text-sm tabular-nums text-po-text`,children:[Math.round(r.zoom*100),`%`]}),/* @__PURE__ */ s(e,{size:`sm`,variant:`ghost`,"aria-label":`Zoom in`,onClick:()=>p(r.zoom*1.5),children:`+`})]}),/* @__PURE__ */ s(e,{size:`sm`,variant:`outline`,onClick:()=>i(d),children:`Fit`}),/* @__PURE__ */ s(`span`,{className:`ml-auto min-w-0 truncate font-mono text-sm text-po-dim`,children:t.sourcePath??t.documentPath??``}),n]})]})}function p({media:e,onClose:o,review:l}){return/* @__PURE__ */ s(t,{open:e!==void 0,onOpenChange:e=>e?void 0:o(),children:e===void 0?null:/* @__PURE__ */ c(n,{"data-testid":`media-viewer`,className:`h-[calc(100dvh-24px)] w-[calc(100vw-24px)]`,children:[/* @__PURE__ */ c(i,{dismissible:!0,closeLabel:`Close viewer`,children:[/* @__PURE__ */ s(a,{className:`min-w-0 truncate text-base`,children:e.title}),/* @__PURE__ */ c(r,{className:`sr-only`,children:[e.kind===`mermaid`?`Mermaid diagram`:`Image`,` opened full screen.`]})]}),/* @__PURE__ */ s(f,{media:e,action:l},e.url)]})})}export{p as MediaViewerDialog,f as PanZoom};
2
2
  //# sourceMappingURL=MediaViewerDialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaViewerDialog.mjs","names":["FIT","PanZoom","view","setView","useState","host","useRef","drag","zoomTo","zoom","requested","bounds","at","current","px","py","ratio","Fragment","media","event","start","Button","MediaViewerDialog","Dialog","open","onClose","DialogContent","DialogHeader","DialogTitle","DialogDescription","review"],"sources":["../../../../../../src/components/MediaViewerDialog.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react';\n\nimport type { MarkdownMedia } from '../lib/markdownMedia';\nimport { Button } from './Button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './Dialog';\n\nconst MIN_ZOOM = 0.25;\nconst MAX_ZOOM = 8;\n\ninterface View {\n zoom: number;\n x: number;\n y: number;\n}\n\nconst FIT: View = { zoom: 1, x: 0, y: 0 };\n\n/** Pan by dragging, zoom with the wheel or the footer; the picture starts fitted to the view. */\nexport function PanZoom({ media }: { media: MarkdownMedia }) {\n const [view, setView] = useState<View>(FIT);\n const host = useRef<HTMLDivElement>(null);\n const drag = useRef<{ x: number; y: number; from: View } | undefined>(undefined);\n // Keeps the point under `at` (client coordinates) fixed while the zoom changes.\n const zoomTo = (requested: number, at?: { x: number; y: number }) =>\n setView((current) => {\n const zoom = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, requested));\n const bounds = host.current?.getBoundingClientRect();\n if (bounds === undefined || at === undefined) return { ...current, zoom };\n const px = at.x - (bounds.left + bounds.width / 2);\n const py = at.y - (bounds.top + bounds.height / 2);\n const ratio = zoom / current.zoom;\n return { zoom, x: px - (px - current.x) * ratio, y: py - (py - current.y) * ratio };\n });\n return (\n <>\n <div\n ref={host}\n data-testid=\"media-viewer-canvas\"\n tabIndex={0}\n aria-label={`${media.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`}\n className=\"relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing\"\n onWheel={(event) =>\n zoomTo(view.zoom * (event.deltaY < 0 ? 1.15 : 1 / 1.15), { x: event.clientX, y: event.clientY })\n }\n onPointerDown={(event) => {\n if (event.button !== 0) return;\n drag.current = { x: event.clientX, y: event.clientY, from: view };\n event.currentTarget.setPointerCapture(event.pointerId);\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n if (start === undefined) return;\n setView({\n ...start.from,\n x: start.from.x + event.clientX - start.x,\n y: start.from.y + event.clientY - start.y,\n });\n }}\n onPointerUp={() => (drag.current = undefined)}\n onPointerCancel={() => (drag.current = undefined)}\n onKeyDown={(event) => {\n if (event.key === '+' || event.key === '=') zoomTo(view.zoom * 1.5);\n else if (event.key === '-') zoomTo(view.zoom / 1.5);\n else if (event.key === '0') setView(FIT);\n else return;\n event.preventDefault();\n }}\n >\n <img\n src={media.url}\n alt={media.title}\n draggable={false}\n className=\"absolute top-1/2 left-1/2 max-h-full max-w-full select-none\"\n style={{\n transform: `translate(calc(-50% + ${String(view.x)}px), calc(-50% + ${String(view.y)}px)) scale(${String(view.zoom)})`,\n }}\n />\n </div>\n <footer className=\"flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5\">\n <div role=\"group\" aria-label=\"Zoom\" className=\"flex items-center rounded-md border border-po-border\">\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom out\" onClick={() => zoomTo(view.zoom / 1.5)}>\n −\n </Button>\n <output className=\"flex min-w-14 justify-center text-sm tabular-nums text-po-text\">\n {Math.round(view.zoom * 100)}%\n </output>\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom in\" onClick={() => zoomTo(view.zoom * 1.5)}>\n +\n </Button>\n </div>\n <Button size=\"sm\" variant=\"outline\" onClick={() => setView(FIT)}>\n Fit\n </Button>\n <span className=\"ml-auto truncate text-sm text-po-dim\">{media.sourcePath ?? media.documentPath ?? ''}</span>\n </footer>\n </>\n );\n}\n\n/**\n * Opened media, full screen. Without a `review` surface it is a pan and zoom\n * viewer; with one (the Author mode's panel), that surface owns the body.\n */\nexport function MediaViewerDialog({\n media,\n onClose,\n review,\n}: {\n media: MarkdownMedia | undefined;\n onClose: () => void;\n review?: ReactNode;\n}) {\n return (\n <Dialog open={media !== undefined} onOpenChange={(open) => (open ? undefined : onClose())}>\n {media === undefined ? null : (\n <DialogContent data-testid=\"media-viewer\" className=\"h-[calc(100dvh-24px)] w-[calc(100vw-24px)]\">\n <DialogHeader dismissible closeLabel=\"Close viewer\">\n <DialogTitle className=\"min-w-0 truncate text-base\">{media.title}</DialogTitle>\n <DialogDescription className=\"sr-only\">\n {media.kind === 'mermaid' ? 'Mermaid diagram' : 'Image'} opened full screen.\n </DialogDescription>\n </DialogHeader>\n {review ??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AQH,CAAG,EAAG,SAAA,KAEzD,CAAA,EACR,kBAAC,OAAD,CAAM,UAAU,uCAAwC,SAAAkB,EAAM,YAAcA,EAAM,cAAgB,EAAS,CAAA,CACrG,CACR,CAAA,CAAA,CAAA,CAAA,CAEN,CAMA,SAAgBI,EAAkB,CAChC,QACA,UACA,UAKC,CACD,MACE,kBAACC,EAAD,CAAQ,KAAML,IAAU,IAAA,GAAW,aAAe,GAAUM,EAAO,IAAA,GAAYC,EAAQ,EACpF,SAAAP,IAAU,IAAA,GAAY,KACrB,kBAACQ,EAAD,CAAe,cAAY,eAAe,UAAU,6CAApD,SAAA,CACE,kBAACC,EAAD,CAAc,YAAA,GAAY,WAAW,eAArC,SAAA,CACE,kBAACC,EAAD,CAAa,UAAU,6BAA8B,SAAAV,EAAM,KAAmB,CAAA,EAC9E,kBAACW,EAAD,CAAmB,UAAU,UAA7B,SAAA,CACGX,EAAM,OAAS,UAAY,kBAAoB,QAAQ,sBACvC,CACP,CAAA,CAAA,CACb,CAAA,EAAAY,GAAU,kBAAC7B,EAAD,CAAgC,OAAQ,EAA1BiB,EAAM,GAAoB,CACtC,C,EAEX,CAAA,CAEZ,C"}
1
+ {"version":3,"file":"MediaViewerDialog.mjs","names":["FIT","PanZoom","view","setView","useState","host","useRef","drag","zoomTo","zoom","requested","bounds","at","current","px","py","ratio","Fragment","media","event","start","Button","action","MediaViewerDialog","Dialog","open","onClose","DialogContent","DialogHeader","DialogTitle","DialogDescription","review"],"sources":["../../../../../../src/components/MediaViewerDialog.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react';\n\nimport type { MarkdownMedia } from '../lib/markdownMedia';\nimport { Button } from './Button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './Dialog';\n\nconst MIN_ZOOM = 0.25;\nconst MAX_ZOOM = 8;\n\ninterface View {\n zoom: number;\n x: number;\n y: number;\n}\n\nconst FIT: View = { zoom: 1, x: 0, y: 0 };\n\n/** Pan by dragging, zoom with the wheel or the footer; the picture starts fitted to the view. */\nexport function PanZoom({ media, action }: { media: MarkdownMedia; action?: ReactNode }) {\n const [view, setView] = useState<View>(FIT);\n const host = useRef<HTMLDivElement>(null);\n const drag = useRef<{ x: number; y: number; from: View } | undefined>(undefined);\n // Keeps the point under `at` (client coordinates) fixed while the zoom changes.\n const zoomTo = (requested: number, at?: { x: number; y: number }) =>\n setView((current) => {\n const zoom = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, requested));\n const bounds = host.current?.getBoundingClientRect();\n if (bounds === undefined || at === undefined) return { ...current, zoom };\n const px = at.x - (bounds.left + bounds.width / 2);\n const py = at.y - (bounds.top + bounds.height / 2);\n const ratio = zoom / current.zoom;\n return { zoom, x: px - (px - current.x) * ratio, y: py - (py - current.y) * ratio };\n });\n return (\n <>\n <div\n ref={host}\n data-testid=\"media-viewer-canvas\"\n tabIndex={0}\n aria-label={`${media.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`}\n className=\"relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing\"\n onWheel={(event) =>\n zoomTo(view.zoom * (event.deltaY < 0 ? 1.15 : 1 / 1.15), { x: event.clientX, y: event.clientY })\n }\n onPointerDown={(event) => {\n if (event.button !== 0) return;\n drag.current = { x: event.clientX, y: event.clientY, from: view };\n event.currentTarget.setPointerCapture(event.pointerId);\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n if (start === undefined) return;\n setView({\n ...start.from,\n x: start.from.x + event.clientX - start.x,\n y: start.from.y + event.clientY - start.y,\n });\n }}\n onPointerUp={() => (drag.current = undefined)}\n onPointerCancel={() => (drag.current = undefined)}\n onKeyDown={(event) => {\n if (event.key === '+' || event.key === '=') zoomTo(view.zoom * 1.5);\n else if (event.key === '-') zoomTo(view.zoom / 1.5);\n else if (event.key === '0') setView(FIT);\n else return;\n event.preventDefault();\n }}\n >\n {/* An inset frame keeps a fitted picture off the header and footer edges. */}\n <div className=\"pointer-events-none absolute inset-4\">\n <img\n src={media.url}\n alt={media.title}\n draggable={false}\n className=\"absolute top-1/2 left-1/2 max-h-full max-w-full select-none\"\n style={{\n transform: `translate(calc(-50% + ${String(view.x)}px), calc(-50% + ${String(view.y)}px)) scale(${String(view.zoom)})`,\n }}\n />\n </div>\n </div>\n <footer className=\"flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5\">\n <div role=\"group\" aria-label=\"Zoom\" className=\"flex items-center rounded-md border border-po-border\">\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom out\" onClick={() => zoomTo(view.zoom / 1.5)}>\n −\n </Button>\n <output className=\"flex min-w-14 justify-center text-sm tabular-nums text-po-text\">\n {Math.round(view.zoom * 100)}%\n </output>\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom in\" onClick={() => zoomTo(view.zoom * 1.5)}>\n +\n </Button>\n </div>\n <Button size=\"sm\" variant=\"outline\" onClick={() => setView(FIT)}>\n Fit\n </Button>\n <span className=\"ml-auto min-w-0 truncate font-mono text-sm text-po-dim\">\n {media.sourcePath ?? media.documentPath ?? ''}\n </span>\n {action}\n </footer>\n </>\n );\n}\n\n/**\n * Opened media, full screen, as a pan and zoom viewer. `review` (the Author\n * mode's \"Open in Author\" button) sits in the footer; marking up happens in\n * Author's own tab, never inside this preview.\n */\nexport function MediaViewerDialog({\n media,\n onClose,\n review,\n}: {\n media: MarkdownMedia | undefined;\n onClose: () => void;\n review?: ReactNode;\n}) {\n return (\n <Dialog open={media !== undefined} onOpenChange={(open) => (open ? undefined : onClose())}>\n {media === undefined ? null : (\n <DialogContent data-testid=\"media-viewer\" className=\"h-[calc(100dvh-24px)] w-[calc(100vw-24px)]\">\n <DialogHeader dismissible closeLabel=\"Close viewer\">\n <DialogTitle className=\"min-w-0 truncate text-base\">{media.title}</DialogTitle>\n <DialogDescription className=\"sr-only\">\n {media.kind === 'mermaid' ? 'Mermaid diagram' : 'Image'} opened full screen.\n </DialogDescription>\n </DialogHeader>\n <PanZoom key={media.url} media={media} action={review} />\n </DialogContent>\n )}\n </Dialog>\n );\n}\n"],"mappings":"A,sQAMA,MASMA,EAAY,CAAE,KAAM,EAAG,EAAG,EAAG,EAAG,CAAE,EAGxC,SAAgBC,EAAQ,CAAE,QAAO,UAAwD,CACvF,GAAM,CAACC,EAAMC,GAAWC,EAAeJ,CAAG,EACpCK,EAAOC,EAAuB,IAAI,EAClCC,EAAOD,EAAyD,IAAA,EAAS,EAEzEE,GAAU,EAAmB,IACjCL,EAAS,GAAY,CACnB,IAAMM,EAAO,KAAK,IAAI,EAAU,KAAK,IAAI,IAAUC,CAAS,CAAC,EACvDC,EAASN,EAAK,SAAS,sBAAsB,EACnD,GAAIM,IAAW,IAAA,IAAaC,IAAO,IAAA,GAAW,MAAO,CAAE,GAAGC,EAAS,MAAK,EACxE,IAAMC,EAAKF,EAAG,GAAKD,EAAO,KAAOA,EAAO,MAAQ,GAC1CI,EAAKH,EAAG,GAAKD,EAAO,IAAMA,EAAO,OAAS,GAC1CK,EAAQP,EAAOI,EAAQ,KAC7B,MAAO,CAAE,OAAM,EAAGC,GAAMA,EAAKD,EAAQ,GAAKG,EAAO,EAAGD,GAAMA,EAAKF,EAAQ,GAAKG,CAAM,CACpF,CAAC,EACH,MACE,kBAAAC,EAAA,CAAA,SAAA,CACE,kBAAC,MAAD,CACE,IAAKZ,EACL,cAAY,sBACZ,SAAU,EACV,aAAY,GAAGa,EAAM,MAAM,kEAC3B,UAAU,gKACV,QAAU,GACRV,EAAON,EAAK,MAAQiB,EAAM,OAAS,EAAI,KAAO,EAAI,MAAO,CAAE,EAAGA,EAAM,QAAS,EAAGA,EAAM,OAAQ,CAAC,EAEjG,cAAgB,GAAU,CACpBA,EAAM,SAAW,IACrB,EAAK,QAAU,CAAE,EAAGA,EAAM,QAAS,EAAGA,EAAM,QAAS,KAAMjB,CAAK,EAChEiB,EAAM,cAAc,kBAAkBA,EAAM,SAAS,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AAG,SAAA,GAEvF,CAAA,CACL,C,GACL,kBAACmB,EAAD,CAAQ,KAAK,KAAK,QAAQ,UAAU,YAAelB,EAAQH,CAAG,EAAG,SAAA,KAEzD,CAAA,EACR,kBAAC,OAAD,CAAM,UAAU,yDACb,SAAAkB,EAAM,YAAcA,EAAM,cAAgB,EACvC,CAAA,EACLI,CACK,CACR,CAAA,CAAA,CAAA,CAAA,CAEN,CAOA,SAAgBC,EAAkB,CAChC,QACA,UACA,UAKC,CACD,MACE,kBAACC,EAAD,CAAQ,KAAMN,IAAU,IAAA,GAAW,aAAe,GAAUO,EAAO,IAAA,GAAYC,EAAQ,EACpF,SAAAR,IAAU,IAAA,GAAY,KACrB,kBAACS,EAAD,CAAe,cAAY,eAAe,UAAU,6CAApD,SAAA,CACE,kBAACC,EAAD,CAAc,YAAA,GAAY,WAAW,eAArC,SAAA,CACE,kBAACC,EAAD,CAAa,UAAU,6BAA8B,SAAAX,EAAM,KAAmB,CAAA,EAC9E,kBAACY,EAAD,CAAmB,UAAU,UAA7B,SAAA,CACGZ,EAAM,OAAS,UAAY,kBAAoB,QAAQ,sBACvC,CACP,CAAA,CAAA,CACd,CAAA,EAAA,kBAACjB,EAAD,CAAgC,QAAO,OAAQ8B,CAAS,EAA1Cb,EAAM,GAAoC,CAC3C,C,EAEX,CAAA,CAEZ,C"}
@@ -6,10 +6,14 @@ export interface ViewableImageProps extends Omit<ComponentProps<'img'>, 'src' |
6
6
  alt: string;
7
7
  /** The viewer's heading; defaults to `alt`. */
8
8
  title?: string;
9
- /** Annotate and review surface for the opened picture; without it the viewer only pans and zooms. */
9
+ /** Footer action for the opened picture (Author's "Open in Author"); without it the viewer only pans and zooms. */
10
10
  renderReview?: MarkdownMediaReview;
11
11
  }
12
- /** A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click. */
12
+ /**
13
+ * A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click.
14
+ * `data-viewable-image` lets a host that frames pictures itself, such as an outputs gallery, find it and take
15
+ * the click first.
16
+ */
13
17
  export declare function ViewableImage({ src, alt, title, renderReview, ...image }: ViewableImageProps): import("react").JSX.Element;
14
18
  //#endregion
15
19
  //# sourceMappingURL=ViewableImage.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewableImage.d.mts","names":[],"sources":["../../../../../../src/components/ViewableImage.tsx"],"mappings":";;;iBAKiB,2BAA2B,KAAK;EAC/C;EACA;;EAEA;;EAEA,eAAe;;;wBAID,gBAAgB,KAAK,KAAK,OAAO,iBAAiB,SAAS,qCAAkB,IAAA"}
1
+ {"version":3,"file":"ViewableImage.d.mts","names":[],"sources":["../../../../../../src/components/ViewableImage.tsx"],"mappings":";;;iBAKiB,2BAA2B,KAAK;EAC/C;EACA;;EAEA;;EAEA,eAAe;;;;;;;wBAQD,gBAAgB,KAAK,KAAK,OAAO,iBAAiB,SAAS,qCAAkB,IAAA"}
@@ -1,2 +1,2 @@
1
- import{MediaViewerDialog as e}from"./MediaViewerDialog.mjs";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";import{useState as i}from"react";function a({src:a,alt:o,title:s,renderReview:c,...l}){let[u,d]=i(),f=()=>d(void 0),p=s||o||`Image`;return/* @__PURE__ */ r(t,{children:[/* @__PURE__ */ n(`button`,{type:`button`,"aria-label":`Open ${p} full screen`,onClick:()=>d({kind:`image`,title:p,url:a}),className:`max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none`,children:/* @__PURE__ */ n(`img`,{...l,src:a,alt:o})}),/* @__PURE__ */ n(e,{media:u,onClose:f,review:u===void 0?void 0:c?.(u,f)})]})}export{a as ViewableImage};
1
+ import{MediaViewerDialog as e}from"./MediaViewerDialog.mjs";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";import{useState as i}from"react";function a({src:a,alt:o,title:s,renderReview:c,...l}){let[u,d]=i(),f=()=>d(void 0),p=s||o||`Image`;return/* @__PURE__ */ r(t,{children:[/* @__PURE__ */ n(`button`,{type:`button`,"data-viewable-image":!0,"aria-label":`Open ${p} full screen`,onClick:()=>d({kind:`image`,title:p,url:a}),className:`max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none`,children:/* @__PURE__ */ n(`img`,{...l,src:a,alt:o})}),/* @__PURE__ */ n(e,{media:u,onClose:f,review:u===void 0?void 0:c?.(u,f)})]})}export{a as ViewableImage};
2
2
  //# sourceMappingURL=ViewableImage.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewableImage.mjs","names":["ViewableImage","image","opened","setOpened","useState","close","name","title","alt","Fragment","src","MediaViewerDialog","renderReview"],"sources":["../../../../../../src/components/ViewableImage.tsx"],"sourcesContent":["import { useState, type ComponentProps } from 'react';\n\nimport type { MarkdownMedia, MarkdownMediaReview } from '../lib/markdownMedia';\nimport { MediaViewerDialog } from './MediaViewerDialog';\n\nexport interface ViewableImageProps extends Omit<ComponentProps<'img'>, 'src' | 'alt' | 'title'> {\n src: string;\n alt: string;\n /** The viewer's heading; defaults to `alt`. */\n title?: string;\n /** Annotate and review surface for the opened picture; without it the viewer only pans and zooms. */\n renderReview?: MarkdownMediaReview;\n}\n\n/** A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click. */\nexport function ViewableImage({ src, alt, title, renderReview, ...image }: ViewableImageProps) {\n const [opened, setOpened] = useState<MarkdownMedia>();\n const close = () => setOpened(undefined);\n const name = title || alt || 'Image';\n return (\n <>\n <button\n type=\"button\"\n aria-label={`Open ${name} full screen`}\n onClick={() => setOpened({ kind: 'image', title: name, url: src })}\n className=\"max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none\"\n >\n <img {...image} src={src} alt={alt} />\n </button>\n <MediaViewerDialog\n media={opened}\n onClose={close}\n review={opened === undefined ? undefined : renderReview?.(opened, close)}\n />\n </>\n );\n}\n"],"mappings":"A,6JAeA,SAAgBA,EAAc,CAAE,MAAK,MAAK,QAAO,eAAc,GAAGC,GAA6B,CAC7F,GAAM,CAACC,EAAQC,GAAaC,EAAwB,EAC9CC,MAAcF,EAAU,IAAA,EAAS,EACjCG,EAAOC,GAASC,GAAO,QAC7B,MACE,kBAAAC,EAAA,CAAA,SAAA,CACE,kBAAC,SAAD,CACE,KAAK,SACL,aAAY,QAAQH,EAAK,cACzB,YAAeH,EAAU,CAAE,KAAM,QAAS,MAAOG,EAAM,IAAKI,CAAI,CAAC,EACjE,UAAU,0HAEV,SAAA,kBAAC,MAAD,CAAK,GAAIT,EAAY,MAAU,KAAM,CAAA,CAC/B,CAAA,EACR,kBAACU,EAAD,CACE,MAAOT,EACP,QAASG,EACT,OAAQH,IAAW,IAAA,GAAY,IAAA,GAAYU,IAAeV,EAAQG,CAAK,CACxE,CAAA,CACD,CAAA,CAAA,CAEN,C"}
1
+ {"version":3,"file":"ViewableImage.mjs","names":["ViewableImage","image","opened","setOpened","useState","close","name","title","alt","Fragment","src","MediaViewerDialog","renderReview"],"sources":["../../../../../../src/components/ViewableImage.tsx"],"sourcesContent":["import { useState, type ComponentProps } from 'react';\n\nimport type { MarkdownMedia, MarkdownMediaReview } from '../lib/markdownMedia';\nimport { MediaViewerDialog } from './MediaViewerDialog';\n\nexport interface ViewableImageProps extends Omit<ComponentProps<'img'>, 'src' | 'alt' | 'title'> {\n src: string;\n alt: string;\n /** The viewer's heading; defaults to `alt`. */\n title?: string;\n /** Footer action for the opened picture (Author's \"Open in Author\"); without it the viewer only pans and zooms. */\n renderReview?: MarkdownMediaReview;\n}\n\n/**\n * A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click.\n * `data-viewable-image` lets a host that frames pictures itself, such as an outputs gallery, find it and take\n * the click first.\n */\nexport function ViewableImage({ src, alt, title, renderReview, ...image }: ViewableImageProps) {\n const [opened, setOpened] = useState<MarkdownMedia>();\n const close = () => setOpened(undefined);\n const name = title || alt || 'Image';\n return (\n <>\n <button\n type=\"button\"\n data-viewable-image\n aria-label={`Open ${name} full screen`}\n onClick={() => setOpened({ kind: 'image', title: name, url: src })}\n className=\"max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none\"\n >\n <img {...image} src={src} alt={alt} />\n </button>\n <MediaViewerDialog\n media={opened}\n onClose={close}\n review={opened === undefined ? undefined : renderReview?.(opened, close)}\n />\n </>\n );\n}\n"],"mappings":"A,6JAmBA,SAAgBA,EAAc,CAAE,MAAK,MAAK,QAAO,eAAc,GAAGC,GAA6B,CAC7F,GAAM,CAACC,EAAQC,GAAaC,EAAwB,EAC9CC,MAAcF,EAAU,IAAA,EAAS,EACjCG,EAAOC,GAASC,GAAO,QAC7B,MACE,kBAAAC,EAAA,CAAA,SAAA,CACE,kBAAC,SAAD,CACE,KAAK,SACL,sBAAA,GACA,aAAY,QAAQH,EAAK,cACzB,YAAeH,EAAU,CAAE,KAAM,QAAS,MAAOG,EAAM,IAAKI,CAAI,CAAC,EACjE,UAAU,0HAEV,SAAA,kBAAC,MAAD,CAAK,GAAIT,EAAY,MAAU,KAAM,CAAA,CAC/B,CAAA,EACR,kBAACU,EAAD,CACE,MAAOT,EACP,QAASG,EACT,OAAQH,IAAW,IAAA,GAAY,IAAA,GAAYU,IAAeV,EAAQG,CAAK,CACxE,CAAA,CACD,CAAA,CAAA,CAEN,C"}
@@ -21,7 +21,7 @@ export interface MarkdownMedia {
21
21
  /** The diagram text, for a mermaid fence. */
22
22
  mermaidSource?: string;
23
23
  }
24
- /** Renders a review surface (annotate, comment, send) for opened media. */
24
+ /** Renders the viewer's footer action for opened media, such as Author's "Open in Author" button. */
25
25
  export type MarkdownMediaReview = (media: MarkdownMedia, close: () => void) => ReactNode;
26
26
  export interface MarkdownMediaReviewPanelProps extends WebPluginSlotProps {
27
27
  media: MarkdownMedia;
@@ -1 +1 @@
1
- {"version":3,"file":"markdownMedia.mjs","names":["MarkdownMediaContext","createContext","markdownMediaReview","panel","host","markdownMediaReviewSlot","createElement","close","ABSOLUTE_LENGTH","svgImageUrl","svg","markup","width","height","sized","box","drawableImageUrl","url","blob","signal"],"sources":["../../../../../../src/lib/markdownMedia.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { createContext, createElement, type ComponentType, type ReactNode } from 'react';\n\nimport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\nexport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\n/**\n * A picture inside rendered Markdown that the person opened full screen.\n *\n * `url` is what the viewer draws: a blob URL from the host's image loader, a\n * remote URL, or a data URL for a mermaid diagram. The paths are provenance\n * for a reviewer, never read authority.\n */\nexport interface MarkdownMedia {\n kind: 'image' | 'mermaid';\n title: string;\n url: string;\n /** The file the image was read from, as the host addresses it. */\n sourcePath?: string;\n /** The Markdown document that embeds the picture, when it is a file. */\n documentPath?: string;\n /** The diagram text, for a mermaid fence. */\n mermaidSource?: string;\n}\n\n/** Renders a review surface (annotate, comment, send) for opened media. */\nexport type MarkdownMediaReview = (media: MarkdownMedia, close: () => void) => ReactNode;\n\nexport interface MarkdownMediaContextValue {\n open(media: Omit<MarkdownMedia, 'documentPath'>): void;\n}\n\n/** Set by Markdown; images and mermaid diagrams become openable only inside it. */\nexport const MarkdownMediaContext = createContext<MarkdownMediaContextValue | undefined>(undefined);\n\nexport interface MarkdownMediaReviewPanelProps extends WebPluginSlotProps {\n media: MarkdownMedia;\n onClose(): void;\n}\n\nexport interface MarkdownMediaReviewContribution {\n version: 1;\n panel: ComponentType<MarkdownMediaReviewPanelProps>;\n}\n\n/** The installed review panel bound to a host's slot props, or undefined when none is installed. */\nexport function markdownMediaReview(host: WebPluginSlotProps | undefined): MarkdownMediaReview | undefined {\n // Partial host props (stories, tests) carry no slot reader; they get the plain viewer.\n const panel =\n typeof host?.slotData === 'function' ? host.slotData(markdownMediaReviewSlot)[0]?.data.panel : undefined;\n if (host === undefined || panel === undefined) return undefined;\n return (media, close) => createElement(panel, { ...host, media, onClose: close });\n}\n\nconst ABSOLUTE_LENGTH = /^\\s*\\d*\\.?\\d+(?:px)?\\s*$/u;\n\n/**\n * SVG markup as an `<img>` source, sized from its viewBox when its own size is\n * relative. Mermaid writes `width=\"100%\"`, which leaves an image with no\n * intrinsic size, so it collapses in a shrink-to-fit frame.\n *\n * A data URL rather than a blob URL: Chrome taints a canvas that draws a blob\n * SVG carrying `foreignObject` (mermaid's labels), which breaks capture.\n *\n * Parsed as HTML, not XML: mermaid's labels hold HTML such as `<br>`, which is\n * not well-formed XML, and an image of it never decodes. Serializing the parsed\n * element writes it back as valid XML.\n */\nexport function svgImageUrl(markup: string): string {\n const svg = new DOMParser().parseFromString(markup, 'text/html').querySelector('svg');\n if (svg === null) return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;\n const width = svg.getAttribute('width');\n const height = svg.getAttribute('height');\n const sized = width !== null && height !== null && ABSOLUTE_LENGTH.test(width) && ABSOLUTE_LENGTH.test(height);\n const box = (svg.getAttribute('viewBox') ?? '')\n .trim()\n .split(/[\\s,]+/u)\n .map(Number);\n if (!sized && box.length === 4 && box[2]! > 0 && box[3]! > 0) {\n svg.setAttribute('width', String(box[2]));\n svg.setAttribute('height', String(box[3]));\n }\n return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n}\n\n/**\n * A URL a canvas can draw without being tainted. A blob URL that holds an SVG\n * is re-read and turned into a sized data URL (see `svgImageUrl`); anything\n * else is returned as is. Reading a local blob URL is not a network request.\n */\nexport async function drawableImageUrl(url: string, signal?: AbortSignal): Promise<string> {\n if (!url.startsWith('blob:')) return url;\n const blob = await (await fetch(url, signal === undefined ? {} : { signal })).blob();\n return blob.type.startsWith('image/svg+xml') ? svgImageUrl(await blob.text()) : url;\n}\n"],"mappings":"A,2HAkCA,MAAaA,EAAuBC,EAAqD,IAAA,EAAS,EAalG,SAAgBC,EAAoB,EAAuE,CAEzG,IAAMC,EACJ,OAAOC,GAAM,UAAa,WAAaA,EA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downMediaContext","createContext","markdownMediaReview","panel","host","markdownMediaReviewSlot","createElement","close","ABSOLUTE_LENGTH","svgImageUrl","svg","markup","width","height","sized","box","drawableImageUrl","url","blob","signal"],"sources":["../../../../../../src/lib/markdownMedia.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { createContext, createElement, type ComponentType, type ReactNode } from 'react';\n\nimport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\nexport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\n/**\n * A picture inside rendered Markdown that the person opened full screen.\n *\n * `url` is what the viewer draws: a blob URL from the host's image loader, a\n * remote URL, or a data URL for a mermaid diagram. The paths are provenance\n * for a reviewer, never read authority.\n */\nexport interface MarkdownMedia {\n kind: 'image' | 'mermaid';\n title: string;\n url: string;\n /** The file the image was read from, as the host addresses it. */\n sourcePath?: string;\n /** The Markdown document that embeds the picture, when it is a file. */\n documentPath?: string;\n /** The diagram text, for a mermaid fence. */\n mermaidSource?: string;\n}\n\n/** Renders the viewer's footer action for opened media, such as Author's \"Open in Author\" button. */\nexport type MarkdownMediaReview = (media: MarkdownMedia, close: () => void) => ReactNode;\n\nexport interface MarkdownMediaContextValue {\n open(media: Omit<MarkdownMedia, 'documentPath'>): void;\n}\n\n/** Set by Markdown; images and mermaid diagrams become openable only inside it. */\nexport const MarkdownMediaContext = createContext<MarkdownMediaContextValue | undefined>(undefined);\n\nexport interface MarkdownMediaReviewPanelProps extends WebPluginSlotProps {\n media: MarkdownMedia;\n onClose(): void;\n}\n\nexport interface MarkdownMediaReviewContribution {\n version: 1;\n panel: ComponentType<MarkdownMediaReviewPanelProps>;\n}\n\n/** The installed review panel bound to a host's slot props, or undefined when none is installed. */\nexport function markdownMediaReview(host: WebPluginSlotProps | undefined): MarkdownMediaReview | undefined {\n // Partial host props (stories, tests) carry no slot reader; they get the plain viewer.\n const panel =\n typeof host?.slotData === 'function' ? host.slotData(markdownMediaReviewSlot)[0]?.data.panel : undefined;\n if (host === undefined || panel === undefined) return undefined;\n return (media, close) => createElement(panel, { ...host, media, onClose: close });\n}\n\nconst ABSOLUTE_LENGTH = /^\\s*\\d*\\.?\\d+(?:px)?\\s*$/u;\n\n/**\n * SVG markup as an `<img>` source, sized from its viewBox when its own size is\n * relative. Mermaid writes `width=\"100%\"`, which leaves an image with no\n * intrinsic size, so it collapses in a shrink-to-fit frame.\n *\n * A data URL rather than a blob URL: Chrome taints a canvas that draws a blob\n * SVG carrying `foreignObject` (mermaid's labels), which breaks capture.\n *\n * Parsed as HTML, not XML: mermaid's labels hold HTML such as `<br>`, which is\n * not well-formed XML, and an image of it never decodes. Serializing the parsed\n * element writes it back as valid XML.\n */\nexport function svgImageUrl(markup: string): string {\n const svg = new DOMParser().parseFromString(markup, 'text/html').querySelector('svg');\n if (svg === null) return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;\n const width = svg.getAttribute('width');\n const height = svg.getAttribute('height');\n const sized = width !== null && height !== null && ABSOLUTE_LENGTH.test(width) && ABSOLUTE_LENGTH.test(height);\n const box = (svg.getAttribute('viewBox') ?? '')\n .trim()\n .split(/[\\s,]+/u)\n .map(Number);\n if (!sized && box.length === 4 && box[2]! > 0 && box[3]! > 0) {\n svg.setAttribute('width', String(box[2]));\n svg.setAttribute('height', String(box[3]));\n }\n return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n}\n\n/**\n * A URL a canvas can draw without being tainted. A blob URL that holds an SVG\n * is re-read and turned into a sized data URL (see `svgImageUrl`); anything\n * else is returned as is. Reading a local blob URL is not a network request.\n */\nexport async function drawableImageUrl(url: string, signal?: AbortSignal): Promise<string> {\n if (!url.startsWith('blob:')) return url;\n const blob = await (await fetch(url, signal === undefined ? {} : { signal })).blob();\n return blob.type.startsWith('image/svg+xml') ? svgImageUrl(await blob.text()) : url;\n}\n"],"mappings":"A,2HAkCA,MAAaA,EAAuBC,EAAqD,IAAA,EAAS,EAalG,SAAgBC,EA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,CAAC,EAAID,CAClF,C"}
@@ -1,2 +1,2 @@
1
- const e={slot:`author.media-review`,description:`Provide an annotation and feedback panel for an image or diagram opened from Markdown.`,parse:e=>{if(typeof e!=`object`||!e)return null;let t=e;return t.version===1&&typeof t.panel==`function`?t:null}};export{e as markdownMediaReviewSlot};
1
+ const e={slot:`author.media-review`,description:`Provide the viewer action that opens an image or diagram from Markdown for annotation and feedback.`,parse:e=>{if(typeof e!=`object`||!e)return null;let t=e;return t.version===1&&typeof t.panel==`function`?t:null}};export{e as markdownMediaReviewSlot};
2
2
  //# sourceMappingURL=markdownMediaSlot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownMediaSlot.mjs","names":["markdownMediaReviewSlot","input","value"],"sources":["../../../../../../src/lib/markdownMediaSlot.ts"],"sourcesContent":["import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\nimport type { MarkdownMediaReviewContribution } from './markdownMedia';\n\n/** Filled by the Author mode; any Markdown host reads it through `markdownMediaReview`. */\nexport const markdownMediaReviewSlot = {\n slot: 'author.media-review',\n description: 'Provide an annotation and feedback panel for an image or diagram opened from Markdown.',\n parse: (input: unknown): MarkdownMediaReviewContribution | null => {\n if (input === null || typeof input !== 'object') return null;\n const value = input as Partial<MarkdownMediaReviewContribution>;\n return value.version === 1 && typeof value.panel === 'function' ? (value as MarkdownMediaReviewContribution) : null;\n },\n} satisfies SlotDeclaration<MarkdownMediaReviewContribution>;\n"],"mappings":"AAKA,MAAaA,EAA0B,CACrC,KAAM,sBACN,YAAa,yFACb,MAAQ,GAA2D,CACjE,GAAsB,OAAOC,GAAU,WAAnCA,EAA6C,OAAO,KACxD,IAAMC,EAAQD,EACd,OAAOC,EAAM,UAAY,GAAK,OAAOA,EAAM,OAAU,WAAcA,EAA4C,IACjH,CACF,E"}
1
+ {"version":3,"file":"markdownMediaSlot.mjs","names":["markdownMediaReviewSlot","input","value"],"sources":["../../../../../../src/lib/markdownMediaSlot.ts"],"sourcesContent":["import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\nimport type { MarkdownMediaReviewContribution } from './markdownMedia';\n\n/** Filled by the Author mode; any Markdown host reads it through `markdownMediaReview`. */\nexport const markdownMediaReviewSlot = {\n slot: 'author.media-review',\n description: 'Provide the viewer action that opens an image or diagram from Markdown for annotation and feedback.',\n parse: (input: unknown): MarkdownMediaReviewContribution | null => {\n if (input === null || typeof input !== 'object') return null;\n const value = input as Partial<MarkdownMediaReviewContribution>;\n return value.version === 1 && typeof value.panel === 'function' ? (value as MarkdownMediaReviewContribution) : null;\n },\n} satisfies SlotDeclaration<MarkdownMediaReviewContribution>;\n"],"mappings":"AAKA,MAAaA,EAA0B,CACrC,KAAM,sBACN,YAAa,sGACb,MAAQ,GAA2D,CACjE,GAAsB,OAAOC,GAAU,WAAnCA,EAA6C,OAAO,KACxD,IAAMC,EAAQD,EACd,OAAOC,EAAM,UAAY,GAAK,OAAOA,EAAM,OAAU,WAAcA,EAA4C,IACjH,CACF,E"}
@@ -1,2 +1,2 @@
1
- const e=require("./Button.cjs"),t=require("./Dialog.cjs");let n=require("react/jsx-runtime"),r=require("react");const i={zoom:1,x:0,y:0};function a({media:t}){let[a,o]=(0,r.useState)(i),s=(0,r.useRef)(null),c=(0,r.useRef)(void 0),l=(e,t)=>o(n=>{let r=Math.min(8,Math.max(.25,e)),i=s.current?.getBoundingClientRect();if(i===void 0||t===void 0)return{...n,zoom:r};let a=t.x-(i.left+i.width/2),o=t.y-(i.top+i.height/2),c=r/n.zoom;return{zoom:r,x:a-(a-n.x)*c,y:o-(o-n.y)*c}});return/* @__PURE__ */ (0,n.jsxs)(n.Fragment,{children:[/* @__PURE__ */ (0,n.jsx)(`div`,{ref:s,"data-testid":`media-viewer-canvas`,tabIndex:0,"aria-label":`${t.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`,className:`relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing`,onWheel:e=>l(a.zoom*(e.deltaY<0?1.15:1/1.15),{x:e.clientX,y:e.clientY}),onPointerDown:e=>{e.button===0&&(c.current={x:e.clientX,y:e.clientY,from:a},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=c.current;t!==void 0&&o({...t.from,x:t.from.x+e.clientX-t.x,y:t.from.y+e.clientY-t.y})},onPointerUp:()=>c.current=void 0,onPointerCancel:()=>c.current=void 0,onKeyDown:e=>{if(e.key===`+`||e.key===`=`)l(a.zoom*1.5);else if(e.key===`-`)l(a.zoom/1.5);else if(e.key===`0`)o(i);else return;e.preventDefault()},children:/* @__PURE__ */ (0,n.jsx)(`img`,{src:t.url,alt:t.title,draggable:!1,className:`absolute top-1/2 left-1/2 max-h-full max-w-full select-none`,style:{transform:`translate(calc(-50% + ${String(a.x)}px), calc(-50% + ${String(a.y)}px)) scale(${String(a.zoom)})`}})}),/* @__PURE__ */ (0,n.jsxs)(`footer`,{className:`flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5`,children:[/* @__PURE__ */ (0,n.jsxs)(`div`,{role:`group`,"aria-label":`Zoom`,className:`flex items-center rounded-md border border-po-border`,children:[/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`ghost`,"aria-label":`Zoom out`,onClick:()=>l(a.zoom/1.5),children:`−`}),/* @__PURE__ */ (0,n.jsxs)(`output`,{className:`flex min-w-14 justify-center text-sm tabular-nums text-po-text`,children:[Math.round(a.zoom*100),`%`]}),/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`ghost`,"aria-label":`Zoom in`,onClick:()=>l(a.zoom*1.5),children:`+`})]}),/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`outline`,onClick:()=>o(i),children:`Fit`}),/* @__PURE__ */ (0,n.jsx)(`span`,{className:`ml-auto truncate text-sm text-po-dim`,children:t.sourcePath??t.documentPath??``})]})]})}function o({media:e,onClose:r,review:i}){return/* @__PURE__ */ (0,n.jsx)(t.Dialog,{open:e!==void 0,onOpenChange:e=>e?void 0:r(),children:e===void 0?null:/* @__PURE__ */ (0,n.jsxs)(t.DialogContent,{"data-testid":`media-viewer`,className:`h-[calc(100dvh-24px)] w-[calc(100vw-24px)]`,children:[/* @__PURE__ */ (0,n.jsxs)(t.DialogHeader,{dismissible:!0,closeLabel:`Close viewer`,children:[/* @__PURE__ */ (0,n.jsx)(t.DialogTitle,{className:`min-w-0 truncate text-base`,children:e.title}),/* @__PURE__ */ (0,n.jsxs)(t.DialogDescription,{className:`sr-only`,children:[e.kind===`mermaid`?`Mermaid diagram`:`Image`,` opened full screen.`]})]}),i??/* @__PURE__ */ (0,n.jsx)(a,{media:e},e.url)]})})}exports.MediaViewerDialog=o,exports.PanZoom=a;
1
+ const e=require("./Button.cjs"),t=require("./Dialog.cjs");let n=require("react/jsx-runtime"),r=require("react");const i={zoom:1,x:0,y:0};function a({media:t,action:a}){let[o,s]=(0,r.useState)(i),c=(0,r.useRef)(null),l=(0,r.useRef)(void 0),u=(e,t)=>s(n=>{let r=Math.min(8,Math.max(.25,e)),i=c.current?.getBoundingClientRect();if(i===void 0||t===void 0)return{...n,zoom:r};let a=t.x-(i.left+i.width/2),o=t.y-(i.top+i.height/2),s=r/n.zoom;return{zoom:r,x:a-(a-n.x)*s,y:o-(o-n.y)*s}});return/* @__PURE__ */ (0,n.jsxs)(n.Fragment,{children:[/* @__PURE__ */ (0,n.jsx)(`div`,{ref:c,"data-testid":`media-viewer-canvas`,tabIndex:0,"aria-label":`${t.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`,className:`relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing`,onWheel:e=>u(o.zoom*(e.deltaY<0?1.15:1/1.15),{x:e.clientX,y:e.clientY}),onPointerDown:e=>{e.button===0&&(l.current={x:e.clientX,y:e.clientY,from:o},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=l.current;t!==void 0&&s({...t.from,x:t.from.x+e.clientX-t.x,y:t.from.y+e.clientY-t.y})},onPointerUp:()=>l.current=void 0,onPointerCancel:()=>l.current=void 0,onKeyDown:e=>{if(e.key===`+`||e.key===`=`)u(o.zoom*1.5);else if(e.key===`-`)u(o.zoom/1.5);else if(e.key===`0`)s(i);else return;e.preventDefault()},children:/* @__PURE__ */ (0,n.jsx)(`div`,{className:`pointer-events-none absolute inset-4`,children:/* @__PURE__ */ (0,n.jsx)(`img`,{src:t.url,alt:t.title,draggable:!1,className:`absolute top-1/2 left-1/2 max-h-full max-w-full select-none`,style:{transform:`translate(calc(-50% + ${String(o.x)}px), calc(-50% + ${String(o.y)}px)) scale(${String(o.zoom)})`}})})}),/* @__PURE__ */ (0,n.jsxs)(`footer`,{className:`flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5`,children:[/* @__PURE__ */ (0,n.jsxs)(`div`,{role:`group`,"aria-label":`Zoom`,className:`flex items-center rounded-md border border-po-border`,children:[/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`ghost`,"aria-label":`Zoom out`,onClick:()=>u(o.zoom/1.5),children:`−`}),/* @__PURE__ */ (0,n.jsxs)(`output`,{className:`flex min-w-14 justify-center text-sm tabular-nums text-po-text`,children:[Math.round(o.zoom*100),`%`]}),/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`ghost`,"aria-label":`Zoom in`,onClick:()=>u(o.zoom*1.5),children:`+`})]}),/* @__PURE__ */ (0,n.jsx)(e.Button,{size:`sm`,variant:`outline`,onClick:()=>s(i),children:`Fit`}),/* @__PURE__ */ (0,n.jsx)(`span`,{className:`ml-auto min-w-0 truncate font-mono text-sm text-po-dim`,children:t.sourcePath??t.documentPath??``}),a]})]})}function o({media:e,onClose:r,review:i}){return/* @__PURE__ */ (0,n.jsx)(t.Dialog,{open:e!==void 0,onOpenChange:e=>e?void 0:r(),children:e===void 0?null:/* @__PURE__ */ (0,n.jsxs)(t.DialogContent,{"data-testid":`media-viewer`,className:`h-[calc(100dvh-24px)] w-[calc(100vw-24px)]`,children:[/* @__PURE__ */ (0,n.jsxs)(t.DialogHeader,{dismissible:!0,closeLabel:`Close viewer`,children:[/* @__PURE__ */ (0,n.jsx)(t.DialogTitle,{className:`min-w-0 truncate text-base`,children:e.title}),/* @__PURE__ */ (0,n.jsxs)(t.DialogDescription,{className:`sr-only`,children:[e.kind===`mermaid`?`Mermaid diagram`:`Image`,` opened full screen.`]})]}),/* @__PURE__ */ (0,n.jsx)(a,{media:e,action:i},e.url)]})})}exports.MediaViewerDialog=o,exports.PanZoom=a;
2
2
  //# sourceMappingURL=MediaViewerDialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaViewerDialog.cjs","names":["useState","useRef","Button","Dialog","DialogContent","DialogHeader","DialogTitle","DialogDescription","require_Button","require_Dialog","react_jsx_runtime","react","FIT","PanZoom","view","setView","host","drag","zoomTo","zoom","requested","bounds","at","current","px","py","ratio","media","event","start","MediaViewerDialog","open","onClose","review"],"sources":["../../../src/components/MediaViewerDialog.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react';\n\nimport type { MarkdownMedia } from '../lib/markdownMedia';\nimport { Button } from './Button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './Dialog';\n\nconst MIN_ZOOM = 0.25;\nconst MAX_ZOOM = 8;\n\ninterface View {\n zoom: number;\n x: number;\n y: number;\n}\n\nconst FIT: View = { zoom: 1, x: 0, y: 0 };\n\n/** Pan by dragging, zoom with the wheel or the footer; the picture starts fitted to the view. */\nexport function PanZoom({ media }: { media: MarkdownMedia }) {\n const [view, setView] = useState<View>(FIT);\n const host = useRef<HTMLDivElement>(null);\n const drag = useRef<{ x: number; y: number; from: View } | undefined>(undefined);\n // Keeps the point under `at` (client coordinates) fixed while the zoom changes.\n const zoomTo = (requested: number, at?: { x: number; y: number }) =>\n setView((current) => {\n const zoom = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, requested));\n const bounds = host.current?.getBoundingClientRect();\n if (bounds === undefined || at === undefined) return { ...current, zoom };\n const px = at.x - (bounds.left + bounds.width / 2);\n const py = at.y - (bounds.top + bounds.height / 2);\n const ratio = zoom / current.zoom;\n return { zoom, x: px - (px - current.x) * ratio, y: py - (py - current.y) * ratio };\n });\n return (\n <>\n <div\n ref={host}\n data-testid=\"media-viewer-canvas\"\n tabIndex={0}\n aria-label={`${media.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`}\n className=\"relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing\"\n onWheel={(event) =>\n zoomTo(view.zoom * (event.deltaY < 0 ? 1.15 : 1 / 1.15), { x: event.clientX, y: event.clientY })\n }\n onPointerDown={(event) => {\n if (event.button !== 0) return;\n drag.current = { x: event.clientX, y: event.clientY, from: view };\n event.currentTarget.setPointerCapture(event.pointerId);\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n if (start === undefined) return;\n setView({\n ...start.from,\n x: start.from.x + event.clientX - start.x,\n y: start.from.y + event.clientY - start.y,\n });\n }}\n onPointerUp={() => (drag.current = undefined)}\n onPointerCancel={() => (drag.current = undefined)}\n onKeyDown={(event) => {\n if (event.key === '+' || event.key === '=') zoomTo(view.zoom * 1.5);\n else if (event.key === '-') zoomTo(view.zoom / 1.5);\n else if (event.key === '0') setView(FIT);\n else return;\n event.preventDefault();\n }}\n >\n <img\n src={media.url}\n alt={media.title}\n draggable={false}\n className=\"absolute top-1/2 left-1/2 max-h-full max-w-full select-none\"\n style={{\n transform: `translate(calc(-50% + ${String(view.x)}px), calc(-50% + ${String(view.y)}px)) scale(${String(view.zoom)})`,\n }}\n />\n </div>\n <footer className=\"flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5\">\n <div role=\"group\" aria-label=\"Zoom\" className=\"flex items-center rounded-md border border-po-border\">\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom out\" onClick={() => zoomTo(view.zoom / 1.5)}>\n −\n </Button>\n <output className=\"flex min-w-14 justify-center text-sm tabular-nums text-po-text\">\n {Math.round(view.zoom * 100)}%\n </output>\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom in\" onClick={() => zoomTo(view.zoom * 1.5)}>\n +\n </Button>\n </div>\n <Button size=\"sm\" variant=\"outline\" onClick={() => setView(FIT)}>\n Fit\n </Button>\n <span className=\"ml-auto truncate text-sm text-po-dim\">{media.sourcePath ?? media.documentPath ?? ''}</span>\n </footer>\n </>\n );\n}\n\n/**\n * Opened media, full screen. Without a `review` surface it is a pan and zoom\n * viewer; with one (the Author mode's panel), that surface owns the body.\n */\nexport function MediaViewerDialog({\n media,\n onClose,\n review,\n}: {\n media: MarkdownMedia | undefined;\n onClose: () => void;\n review?: ReactNode;\n}) {\n return (\n <Dialog open={media !== undefined} onOpenChange={(open) => (open ? undefined : onClose())}>\n {media === undefined ? null : (\n <DialogContent data-testid=\"media-viewer\" className=\"h-[calc(100dvh-24px)] w-[calc(100vw-24px)]\">\n <DialogHeader dismissible closeLabel=\"Close viewer\">\n <DialogTitle className=\"min-w-0 truncate text-base\">{media.title}</DialogTitle>\n <DialogDescription className=\"sr-only\">\n {media.kind === 'mermaid' ? 'Mermaid diagram' : 'Image'} opened full screen.\n </DialogDescription>\n </DialogHeader>\n {review ?? <PanZoom key={media.url} media={media} />}\n </DialogContent>\n )}\n </Dialog>\n );\n}\n"],"mappings":"A,gHAMA,MASMY,EAAY,CAAE,KAAM,EAAG,EAAG,EAAG,EAAG,CAAE,EAGxC,SAAgBC,EAAQ,CAAE,SAAmC,CAC3D,GAAM,CAACC,EAAMC,IAAA,EAAWf,EAAAA,SAAAA,CAAeY,CAAG,EACpCI,GAAA,EAAOf,EAAAA,OAAAA,CAAuB,IAAI,EAClCgB,GAAA,EAAOhB,EAAAA,OAAAA,CAAyD,IAAA,EAA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AAG,SAAA,KAEzD,CAAA,EACR,iBAAA,EAAAF,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,uCAAwC,SAAAiB,EAAM,YAAcA,EAAM,cAAgB,EAAS,CAAA,CACrG,CACR,CAAA,CAAA,CAAA,CAAA,CAEN,CAMA,SAAgBG,EAAkB,CAChC,QACA,UACA,UAKC,CACD,MACE,iBAAA,EAAApB,EAAA,IAAA,CAACP,EAAAA,OAAD,CAAQ,KAAMwB,IAAU,IAAA,GAAW,aAAe,GAAUI,EAAO,IAAA,GAAYC,EAAQ,EACpF,SAAAL,IAAU,IAAA,GAAY,KACrB,iBAAA,EAAAjB,EAAA,KAAA,CAACN,EAAAA,cAAD,CAAe,cAAY,eAAe,UAAU,6CAApD,SAAA,CACE,iBAAA,EAAAM,EAAA,KAAA,CAACL,EAAAA,aAAD,CAAc,YAAA,GAAY,WAAW,eAArC,SAAA,CACE,iBAAA,EAAAK,EAAA,IAAA,CAACJ,EAAAA,YAAD,CAAa,UAAU,6BAA8B,SAAAqB,EAAM,KAAmB,CAAA,EAC9E,iBAAA,EAAAjB,EAAA,KAAA,CAACH,EAAAA,kBAAD,CAAmB,UAAU,UAA7B,SAAA,CACGoB,EAAM,OAAS,UAAY,kBAAoB,QAAQ,sBACvC,CACP,CAAA,CAAA,CACb,CAAA,EAAAM,GAAU,iBAAA,EAAAvB,EAAA,IAAA,CAACG,EAAD,CAAgC,OAAQ,EAA1Bc,EAAM,GAAoB,CACtC,C,EAEX,CAAA,CAEZ,C"}
1
+ {"version":3,"file":"MediaViewerDialog.cjs","names":["useState","useRef","Button","Dialog","DialogContent","DialogHeader","DialogTitle","DialogDescription","require_Button","require_Dialog","react_jsx_runtime","react","FIT","PanZoom","view","setView","host","drag","zoomTo","zoom","requested","bounds","at","current","px","py","ratio","media","event","start","action","MediaViewerDialog","open","onClose","review"],"sources":["../../../src/components/MediaViewerDialog.tsx"],"sourcesContent":["import { useRef, useState, type ReactNode } from 'react';\n\nimport type { MarkdownMedia } from '../lib/markdownMedia';\nimport { Button } from './Button';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './Dialog';\n\nconst MIN_ZOOM = 0.25;\nconst MAX_ZOOM = 8;\n\ninterface View {\n zoom: number;\n x: number;\n y: number;\n}\n\nconst FIT: View = { zoom: 1, x: 0, y: 0 };\n\n/** Pan by dragging, zoom with the wheel or the footer; the picture starts fitted to the view. */\nexport function PanZoom({ media, action }: { media: MarkdownMedia; action?: ReactNode }) {\n const [view, setView] = useState<View>(FIT);\n const host = useRef<HTMLDivElement>(null);\n const drag = useRef<{ x: number; y: number; from: View } | undefined>(undefined);\n // Keeps the point under `at` (client coordinates) fixed while the zoom changes.\n const zoomTo = (requested: number, at?: { x: number; y: number }) =>\n setView((current) => {\n const zoom = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, requested));\n const bounds = host.current?.getBoundingClientRect();\n if (bounds === undefined || at === undefined) return { ...current, zoom };\n const px = at.x - (bounds.left + bounds.width / 2);\n const py = at.y - (bounds.top + bounds.height / 2);\n const ratio = zoom / current.zoom;\n return { zoom, x: px - (px - current.x) * ratio, y: py - (py - current.y) * ratio };\n });\n return (\n <>\n <div\n ref={host}\n data-testid=\"media-viewer-canvas\"\n tabIndex={0}\n aria-label={`${media.title}. Drag to pan, scroll or press plus and minus to zoom, 0 to fit.`}\n className=\"relative min-h-0 flex-1 cursor-grab touch-none overflow-hidden bg-po-deep outline-none focus-visible:ring-2 focus-visible:ring-po-blue active:cursor-grabbing\"\n onWheel={(event) =>\n zoomTo(view.zoom * (event.deltaY < 0 ? 1.15 : 1 / 1.15), { x: event.clientX, y: event.clientY })\n }\n onPointerDown={(event) => {\n if (event.button !== 0) return;\n drag.current = { x: event.clientX, y: event.clientY, from: view };\n event.currentTarget.setPointerCapture(event.pointerId);\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n if (start === undefined) return;\n setView({\n ...start.from,\n x: start.from.x + event.clientX - start.x,\n y: start.from.y + event.clientY - start.y,\n });\n }}\n onPointerUp={() => (drag.current = undefined)}\n onPointerCancel={() => (drag.current = undefined)}\n onKeyDown={(event) => {\n if (event.key === '+' || event.key === '=') zoomTo(view.zoom * 1.5);\n else if (event.key === '-') zoomTo(view.zoom / 1.5);\n else if (event.key === '0') setView(FIT);\n else return;\n event.preventDefault();\n }}\n >\n {/* An inset frame keeps a fitted picture off the header and footer edges. */}\n <div className=\"pointer-events-none absolute inset-4\">\n <img\n src={media.url}\n alt={media.title}\n draggable={false}\n className=\"absolute top-1/2 left-1/2 max-h-full max-w-full select-none\"\n style={{\n transform: `translate(calc(-50% + ${String(view.x)}px), calc(-50% + ${String(view.y)}px)) scale(${String(view.zoom)})`,\n }}\n />\n </div>\n </div>\n <footer className=\"flex shrink-0 items-center gap-2 border-t border-po-border bg-po-bg px-3 py-1.5\">\n <div role=\"group\" aria-label=\"Zoom\" className=\"flex items-center rounded-md border border-po-border\">\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom out\" onClick={() => zoomTo(view.zoom / 1.5)}>\n −\n </Button>\n <output className=\"flex min-w-14 justify-center text-sm tabular-nums text-po-text\">\n {Math.round(view.zoom * 100)}%\n </output>\n <Button size=\"sm\" variant=\"ghost\" aria-label=\"Zoom in\" onClick={() => zoomTo(view.zoom * 1.5)}>\n +\n </Button>\n </div>\n <Button size=\"sm\" variant=\"outline\" onClick={() => setView(FIT)}>\n Fit\n </Button>\n <span className=\"ml-auto min-w-0 truncate font-mono text-sm text-po-dim\">\n {media.sourcePath ?? media.documentPath ?? ''}\n </span>\n {action}\n </footer>\n </>\n );\n}\n\n/**\n * Opened media, full screen, as a pan and zoom viewer. `review` (the Author\n * mode's \"Open in Author\" button) sits in the footer; marking up happens in\n * Author's own tab, never inside this preview.\n */\nexport function MediaViewerDialog({\n media,\n onClose,\n review,\n}: {\n media: MarkdownMedia | undefined;\n onClose: () => void;\n review?: ReactNode;\n}) {\n return (\n <Dialog open={media !== undefined} onOpenChange={(open) => (open ? undefined : onClose())}>\n {media === undefined ? null : (\n <DialogContent data-testid=\"media-viewer\" className=\"h-[calc(100dvh-24px)] w-[calc(100vw-24px)]\">\n <DialogHeader dismissible closeLabel=\"Close viewer\">\n <DialogTitle className=\"min-w-0 truncate text-base\">{media.title}</DialogTitle>\n <DialogDescription className=\"sr-only\">\n {media.kind === 'mermaid' ? 'Mermaid diagram' : 'Image'} opened full screen.\n </DialogDescription>\n </DialogHeader>\n <PanZoom key={media.url} media={media} action={review} />\n </DialogContent>\n )}\n </Dialog>\n );\n}\n"],"mappings":"A,gHAMA,MASMY,EAAY,CAAE,KAAM,EAAG,EAAG,EAAG,EAAG,CAAE,EAGxC,SAAgBC,EAAQ,CAAE,QAAO,UAAwD,CACvF,GAAM,CAACC,EAAMC,IAAA,EAAWf,EAAAA,SAAAA,CAAeY,CAAG,EACpCI,GAAA,EAAOf,EAAAA,OAAAA,CAAuB,IAAI,EAClCgB,GAAA,EAAOhB,EAAAA,OAAAA,CAAyD,IAAA,EAAS,EAEzEiB,GAAU,EAAmB,IACjCH,EAAS,GAAY,CACnB,IAAMI,EAAO,KAAK,IAAI,EAAU,KAAK,IAAI,IAAUC,CAAS,CAAC,EACvDC,EAASL,EAAK,SAAS,sBAAsB,EACnD,GAAIK,IAAW,IAAA,IAAaC,IAAO,IAAA,GAAW,MAAO,CAAE,GAAGC,EAAS,MAAK,EACxE,IAAMC,EAAKF,EAAG,GAAKD,EAAO,KAAOA,EAAO,MAAQ,GAC1CI,EAAKH,EAAG,GAAKD,EAAO,IAAMA,EAAO,OAAS,GAC1CK,EAAQP,EAAOI,EAAQ,KAC7B,MAAO,CAAE,OAAM,EAAGC,GAAMA,EAAKD,EAAQ,GAAKG,EAAO,EAAGD,GAAMA,EAAKF,EAAQ,GAAKG,CAAM,CACpF,CAAC,EACH,MACE,iBAAA,EAAAhB,EAAA,KAAA,CAAAA,EAAA,SAAA,CAAA,SAAA,CACE,iBAAA,EAAAA,EAAA,IAAA,CAAC,MAAD,CACE,IAAKM,EACL,c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,SAAA,CACE,iBAAA,EAAAK,EAAA,IAAA,CAACJ,EAAAA,YAAD,CAAa,UAAU,6BAA8B,SAAAqB,EAAM,KAAmB,CAAA,EAC9E,iBAAA,EAAAjB,EAAA,KAAA,CAACH,EAAAA,kBAAD,CAAmB,UAAU,UAA7B,SAAA,CACGoB,EAAM,OAAS,UAAY,kBAAoB,QAAQ,sBACvC,CACP,CAAA,CAAA,CACd,CAAA,EAAA,iBAAA,EAAAjB,EAAA,IAAA,CAACG,EAAD,CAAgC,QAAO,OAAQqB,CAAS,EAA1CP,EAAM,GAAoC,CAC3C,C,EAEX,CAAA,CAEZ,C"}
@@ -1,2 +1,2 @@
1
- const e=require("./MediaViewerDialog.cjs");let t=require("react/jsx-runtime"),n=require("react");function r({src:r,alt:i,title:a,renderReview:o,...s}){let[c,l]=(0,n.useState)(),u=()=>l(void 0),d=a||i||`Image`;return/* @__PURE__ */ (0,t.jsxs)(t.Fragment,{children:[/* @__PURE__ */ (0,t.jsx)(`button`,{type:`button`,"aria-label":`Open ${d} full screen`,onClick:()=>l({kind:`image`,title:d,url:r}),className:`max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none`,children:/* @__PURE__ */ (0,t.jsx)(`img`,{...s,src:r,alt:i})}),/* @__PURE__ */ (0,t.jsx)(e.MediaViewerDialog,{media:c,onClose:u,review:c===void 0?void 0:o?.(c,u)})]})}exports.ViewableImage=r;
1
+ const e=require("./MediaViewerDialog.cjs");let t=require("react/jsx-runtime"),n=require("react");function r({src:r,alt:i,title:a,renderReview:o,...s}){let[c,l]=(0,n.useState)(),u=()=>l(void 0),d=a||i||`Image`;return/* @__PURE__ */ (0,t.jsxs)(t.Fragment,{children:[/* @__PURE__ */ (0,t.jsx)(`button`,{type:`button`,"data-viewable-image":!0,"aria-label":`Open ${d} full screen`,onClick:()=>l({kind:`image`,title:d,url:r}),className:`max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none`,children:/* @__PURE__ */ (0,t.jsx)(`img`,{...s,src:r,alt:i})}),/* @__PURE__ */ (0,t.jsx)(e.MediaViewerDialog,{media:c,onClose:u,review:c===void 0?void 0:o?.(c,u)})]})}exports.ViewableImage=r;
2
2
  //# sourceMappingURL=ViewableImage.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewableImage.cjs","names":["useState","MediaViewerDialog","require_MediaViewerDialog","react_jsx_runtime","react","ViewableImage","image","opened","setOpened","close","name","title","alt","src","renderReview"],"sources":["../../../src/components/ViewableImage.tsx"],"sourcesContent":["import { useState, type ComponentProps } from 'react';\n\nimport type { MarkdownMedia, MarkdownMediaReview } from '../lib/markdownMedia';\nimport { MediaViewerDialog } from './MediaViewerDialog';\n\nexport interface ViewableImageProps extends Omit<ComponentProps<'img'>, 'src' | 'alt' | 'title'> {\n src: string;\n alt: string;\n /** The viewer's heading; defaults to `alt`. */\n title?: string;\n /** Annotate and review surface for the opened picture; without it the viewer only pans and zooms. */\n renderReview?: MarkdownMediaReview;\n}\n\n/** A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click. */\nexport function ViewableImage({ src, alt, title, renderReview, ...image }: ViewableImageProps) {\n const [opened, setOpened] = useState<MarkdownMedia>();\n const close = () => setOpened(undefined);\n const name = title || alt || 'Image';\n return (\n <>\n <button\n type=\"button\"\n aria-label={`Open ${name} full screen`}\n onClick={() => setOpened({ kind: 'image', title: name, url: src })}\n className=\"max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none\"\n >\n <img {...image} src={src} alt={alt} />\n </button>\n <MediaViewerDialog\n media={opened}\n onClose={close}\n review={opened === undefined ? undefined : renderReview?.(opened, close)}\n />\n </>\n );\n}\n"],"mappings":"A,iGAeA,SAAgBK,EAAc,CAAE,MAAK,MAAK,QAAO,eAAc,GAAGC,GAA6B,CAC7F,GAAM,CAACC,EAAQC,IAAA,EAAaR,EAAAA,SAAAA,CAAwB,EAC9CS,MAAcD,EAAU,IAAA,EAAS,EACjCE,EAAOC,GAASC,GAAO,QAC7B,MACE,iBAAA,EAAAT,EAAA,KAAA,CAAAA,EAAA,SAAA,CAAA,SAAA,CACE,iBAAA,EAAAA,EAAA,IAAA,CAAC,SAAD,CACE,KAAK,SACL,aAAY,QAAQO,EAAK,cACzB,YAAeF,EAAU,CAAE,KAAM,QAAS,MAAOE,EAAM,IAAKG,CAAI,CAAC,EACjE,UAAU,0HAEV,SAAA,iBAAA,EAAAV,EAAA,IAAA,CAAC,MAAD,CAAK,GAAIG,EAAY,MAAU,KAAM,CAAA,CAC/B,CAAA,EACR,iBAAA,EAAAH,EAAA,IAAA,CAACF,EAAAA,kBAAD,CACE,MAAOM,EACP,QAASE,EACT,OAAQF,IAAW,IAAA,GAAY,IAAA,GAAYO,IAAeP,EAAQE,CAAK,CACxE,CAAA,CACD,CAAA,CAAA,CAEN,C"}
1
+ {"version":3,"file":"ViewableImage.cjs","names":["useState","MediaViewerDialog","require_MediaViewerDialog","react_jsx_runtime","react","ViewableImage","image","opened","setOpened","close","name","title","alt","src","renderReview"],"sources":["../../../src/components/ViewableImage.tsx"],"sourcesContent":["import { useState, type ComponentProps } from 'react';\n\nimport type { MarkdownMedia, MarkdownMediaReview } from '../lib/markdownMedia';\nimport { MediaViewerDialog } from './MediaViewerDialog';\n\nexport interface ViewableImageProps extends Omit<ComponentProps<'img'>, 'src' | 'alt' | 'title'> {\n src: string;\n alt: string;\n /** The viewer's heading; defaults to `alt`. */\n title?: string;\n /** Footer action for the opened picture (Author's \"Open in Author\"); without it the viewer only pans and zooms. */\n renderReview?: MarkdownMediaReview;\n}\n\n/**\n * A picture outside Markdown (a tool result, an attachment) that opens the same full-screen viewer on click.\n * `data-viewable-image` lets a host that frames pictures itself, such as an outputs gallery, find it and take\n * the click first.\n */\nexport function ViewableImage({ src, alt, title, renderReview, ...image }: ViewableImageProps) {\n const [opened, setOpened] = useState<MarkdownMedia>();\n const close = () => setOpened(undefined);\n const name = title || alt || 'Image';\n return (\n <>\n <button\n type=\"button\"\n data-viewable-image\n aria-label={`Open ${name} full screen`}\n onClick={() => setOpened({ kind: 'image', title: name, url: src })}\n className=\"max-w-full cursor-zoom-in self-start rounded focus-visible:ring-2 focus-visible:ring-po-blue focus-visible:outline-none\"\n >\n <img {...image} src={src} alt={alt} />\n </button>\n <MediaViewerDialog\n media={opened}\n onClose={close}\n review={opened === undefined ? undefined : renderReview?.(opened, close)}\n />\n </>\n );\n}\n"],"mappings":"A,iGAmBA,SAAgBK,EAAc,CAAE,MAAK,MAAK,QAAO,eAAc,GAAGC,GAA6B,CAC7F,GAAM,CAACC,EAAQC,IAAA,EAAaR,EAAAA,SAAAA,CAAwB,EAC9CS,MAAcD,EAAU,IAAA,EAAS,EACjCE,EAAOC,GAASC,GAAO,QAC7B,MACE,iBAAA,EAAAT,EAAA,KAAA,CAAAA,EAAA,SAAA,CAAA,SAAA,CACE,iBAAA,EAAAA,EAAA,IAAA,CAAC,SAAD,CACE,KAAK,SACL,sBAAA,GACA,aAAY,QAAQO,EAAK,cACzB,YAAeF,EAAU,CAAE,KAAM,QAAS,MAAOE,EAAM,IAAKG,CAAI,CAAC,EACjE,UAAU,0HAEV,SAAA,iBAAA,EAAAV,EAAA,IAAA,CAAC,MAAD,CAAK,GAAIG,EAAY,MAAU,KAAM,CAAA,CAC/B,CAAA,EACR,iBAAA,EAAAH,EAAA,IAAA,CAACF,EAAAA,kBAAD,CACE,MAAOM,EACP,QAASE,EACT,OAAQF,IAAW,IAAA,GAAY,IAAA,GAAYO,IAAeP,EAAQE,CAAK,CACxE,CAAA,CACD,CAAA,CAAA,CAEN,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownMedia.cjs","names":["createContext","markdownMediaReviewSlot","createElement","require_markdownMediaSlot","react","MarkdownMediaContext","markdownMediaReview","panel","host","close","ABSOLUTE_LENGTH","svgImageUrl","svg","markup","width","height","sized","box","drawableImageUrl","url","blob","signal"],"sources":["../../../src/lib/markdownMedia.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { createContext, createElement, type ComponentType, type ReactNode } from 'react';\n\nimport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\nexport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\n/**\n * A picture inside rendered Markdown that the person opened full screen.\n *\n * `url` is what the viewer draws: a blob URL from the host's image loader, a\n * remote URL, or a data URL for a mermaid diagram. The paths are provenance\n * for a reviewer, never read authority.\n */\nexport interface MarkdownMedia {\n kind: 'image' | 'mermaid';\n title: string;\n url: string;\n /** The file the image was read from, as the host addresses it. */\n sourcePath?: string;\n /** The Markdown document that embeds the picture, when it is a file. */\n documentPath?: string;\n /** The diagram text, for a mermaid fence. */\n mermaidSource?: string;\n}\n\n/** Renders a review surface (annotate, comment, send) for opened media. */\nexport type MarkdownMediaReview = (media: MarkdownMedia, close: () => void) => ReactNode;\n\nexport interface MarkdownMediaContextValue {\n open(media: Omit<MarkdownMedia, 'documentPath'>): void;\n}\n\n/** Set by Markdown; images and mermaid diagrams become openable only inside it. */\nexport const MarkdownMediaContext = createContext<MarkdownMediaContextValue | undefined>(undefined);\n\nexport interface MarkdownMediaReviewPanelProps extends WebPluginSlotProps {\n media: MarkdownMedia;\n onClose(): void;\n}\n\nexport interface MarkdownMediaReviewContribution {\n version: 1;\n panel: ComponentType<MarkdownMediaReviewPanelProps>;\n}\n\n/** The installed review panel bound to a host's slot props, or undefined when none is installed. */\nexport function markdownMediaReview(host: WebPluginSlotProps | undefined): MarkdownMediaReview | undefined {\n // Partial host props (stories, tests) carry no slot reader; they get the plain viewer.\n const panel =\n typeof host?.slotData === 'function' ? host.slotData(markdownMediaReviewSlot)[0]?.data.panel : undefined;\n if (host === undefined || panel === undefined) return undefined;\n return (media, close) => createElement(panel, { ...host, media, onClose: close });\n}\n\nconst ABSOLUTE_LENGTH = /^\\s*\\d*\\.?\\d+(?:px)?\\s*$/u;\n\n/**\n * SVG markup as an `<img>` source, sized from its viewBox when its own size is\n * relative. Mermaid writes `width=\"100%\"`, which leaves an image with no\n * intrinsic size, so it collapses in a shrink-to-fit frame.\n *\n * A data URL rather than a blob URL: Chrome taints a canvas that draws a blob\n * SVG carrying `foreignObject` (mermaid's labels), which breaks capture.\n *\n * Parsed as HTML, not XML: mermaid's labels hold HTML such as `<br>`, which is\n * not well-formed XML, and an image of it never decodes. Serializing the parsed\n * element writes it back as valid XML.\n */\nexport function svgImageUrl(markup: string): string {\n const svg = new DOMParser().parseFromString(markup, 'text/html').querySelector('svg');\n if (svg === null) return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;\n const width = svg.getAttribute('width');\n const height = svg.getAttribute('height');\n const sized = width !== null && height !== null && ABSOLUTE_LENGTH.test(width) && ABSOLUTE_LENGTH.test(height);\n const box = (svg.getAttribute('viewBox') ?? '')\n .trim()\n .split(/[\\s,]+/u)\n .map(Number);\n if (!sized && box.length === 4 && box[2]! > 0 && box[3]! > 0) {\n svg.setAttribute('width', String(box[2]));\n svg.setAttribute('height', String(box[3]));\n }\n return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n}\n\n/**\n * A URL a canvas can draw without being tainted. A blob URL that holds an SVG\n * is re-read and turned into a sized data URL (see `svgImageUrl`); anything\n * else is returned as is. Reading a local blob URL is not a network request.\n */\nexport async function drawableImageUrl(url: string, signal?: AbortSignal): Promise<string> {\n if (!url.startsWith('blob:')) return url;\n const blob = await (await fetch(url, signal === undefined ? {} : { signal })).blob();\n return blob.type.startsWith('image/svg+xml') ? svgImageUrl(await blob.text()) : url;\n}\n"],"mappings":"A,kEAkCA,MAAaK,GAAA,EAAuBL,EAAAA,cAAAA,CAAqD,IAAA,EAAS,EAalG,SAAgBM,EAAoB,EAAuE,CAEzG,IAAMC,EACJ,OAAOC,GAAM,UAAa,WAAaA,EAAK,SAASP,EAAAA,uBAAuB,CAAC,CAAC,EAAE,EAAE,KAAK,MAAQ,I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ot","react","MarkdownMediaContext","markdownMediaReview","panel","host","close","ABSOLUTE_LENGTH","svgImageUrl","svg","markup","width","height","sized","box","drawableImageUrl","url","blob","signal"],"sources":["../../../src/lib/markdownMedia.ts"],"sourcesContent":["import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { createContext, createElement, type ComponentType, type ReactNode } from 'react';\n\nimport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\nexport { markdownMediaReviewSlot } from './markdownMediaSlot';\n\n/**\n * A picture inside rendered Markdown that the person opened full screen.\n *\n * `url` is what the viewer draws: a blob URL from the host's image loader, a\n * remote URL, or a data URL for a mermaid diagram. The paths are provenance\n * for a reviewer, never read authority.\n */\nexport interface MarkdownMedia {\n kind: 'image' | 'mermaid';\n title: string;\n url: string;\n /** The file the image was read from, as the host addresses it. */\n sourcePath?: string;\n /** The Markdown document that embeds the picture, when it is a file. */\n documentPath?: string;\n /** The diagram text, for a mermaid fence. */\n mermaidSource?: string;\n}\n\n/** Renders the viewer's footer action for opened media, such as Author's \"Open in Author\" button. */\nexport type MarkdownMediaReview = (media: MarkdownMedia, close: () => void) => ReactNode;\n\nexport interface MarkdownMediaContextValue {\n open(media: Omit<MarkdownMedia, 'documentPath'>): void;\n}\n\n/** Set by Markdown; images and mermaid diagrams become openable only inside it. */\nexport const MarkdownMediaContext = createContext<MarkdownMediaContextValue | undefined>(undefined);\n\nexport interface MarkdownMediaReviewPanelProps extends WebPluginSlotProps {\n media: MarkdownMedia;\n onClose(): void;\n}\n\nexport interface MarkdownMediaReviewContribution {\n version: 1;\n panel: ComponentType<MarkdownMediaReviewPanelProps>;\n}\n\n/** The installed review panel bound to a host's slot props, or undefined when none is installed. */\nexport function markdownMediaReview(host: WebPluginSlotProps | undefined): MarkdownMediaReview | undefined {\n // Partial host props (stories, tests) carry no slot reader; they get the plain viewer.\n const panel =\n typeof host?.slotData === 'function' ? host.slotData(markdownMediaReviewSlot)[0]?.data.panel : undefined;\n if (host === undefined || panel === undefined) return undefined;\n return (media, close) => createElement(panel, { ...host, media, onClose: close });\n}\n\nconst ABSOLUTE_LENGTH = /^\\s*\\d*\\.?\\d+(?:px)?\\s*$/u;\n\n/**\n * SVG markup as an `<img>` source, sized from its viewBox when its own size is\n * relative. Mermaid writes `width=\"100%\"`, which leaves an image with no\n * intrinsic size, so it collapses in a shrink-to-fit frame.\n *\n * A data URL rather than a blob URL: Chrome taints a canvas that draws a blob\n * SVG carrying `foreignObject` (mermaid's labels), which breaks capture.\n *\n * Parsed as HTML, not XML: mermaid's labels hold HTML such as `<br>`, which is\n * not well-formed XML, and an image of it never decodes. Serializing the parsed\n * element writes it back as valid XML.\n */\nexport function svgImageUrl(markup: string): string {\n const svg = new DOMParser().parseFromString(markup, 'text/html').querySelector('svg');\n if (svg === null) return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(markup)}`;\n const width = svg.getAttribute('width');\n const height = svg.getAttribute('height');\n const sized = width !== null && height !== null && ABSOLUTE_LENGTH.test(width) && ABSOLUTE_LENGTH.test(height);\n const box = (svg.getAttribute('viewBox') ?? '')\n .trim()\n .split(/[\\s,]+/u)\n .map(Number);\n if (!sized && box.length === 4 && box[2]! > 0 && box[3]! > 0) {\n svg.setAttribute('width', String(box[2]));\n svg.setAttribute('height', String(box[3]));\n }\n return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;\n}\n\n/**\n * A URL a canvas can draw without being tainted. A blob URL that holds an SVG\n * is re-read and turned into a sized data URL (see `svgImageUrl`); anything\n * else is returned as is. Reading a local blob URL is not a network request.\n */\nexport async function drawableImageUrl(url: string, signal?: AbortSignal): Promise<string> {\n if (!url.startsWith('blob:')) return url;\n const blob = await (await fetch(url, signal === undefined ? {} : { signal })).blob();\n return blob.type.startsWith('image/svg+xml') ? svgImageUrl(await blob.text()) : url;\n}\n"],"mappings":"A,kEAkCA,MAAaK,GAAA,EAAuBL,EAAAA,cAAAA,CAAqD,IAAA,EAAS,EAalG,SAAgBM,EA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AAIT,EAAY,MAAMS,EAAK,KAAK,CAAC,EAAID,CAClF,C"}
@@ -1,2 +1,2 @@
1
- const e={slot:`author.media-review`,description:`Provide an annotation and feedback panel for an image or diagram opened from Markdown.`,parse:e=>{if(typeof e!=`object`||!e)return null;let t=e;return t.version===1&&typeof t.panel==`function`?t:null}};exports.markdownMediaReviewSlot=e;
1
+ const e={slot:`author.media-review`,description:`Provide the viewer action that opens an image or diagram from Markdown for annotation and feedback.`,parse:e=>{if(typeof e!=`object`||!e)return null;let t=e;return t.version===1&&typeof t.panel==`function`?t:null}};exports.markdownMediaReviewSlot=e;
2
2
  //# sourceMappingURL=markdownMediaSlot.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownMediaSlot.cjs","names":["markdownMediaReviewSlot","input","value"],"sources":["../../../src/lib/markdownMediaSlot.ts"],"sourcesContent":["import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\nimport type { MarkdownMediaReviewContribution } from './markdownMedia';\n\n/** Filled by the Author mode; any Markdown host reads it through `markdownMediaReview`. */\nexport const markdownMediaReviewSlot = {\n slot: 'author.media-review',\n description: 'Provide an annotation and feedback panel for an image or diagram opened from Markdown.',\n parse: (input: unknown): MarkdownMediaReviewContribution | null => {\n if (input === null || typeof input !== 'object') return null;\n const value = input as Partial<MarkdownMediaReviewContribution>;\n return value.version === 1 && typeof value.panel === 'function' ? (value as MarkdownMediaReviewContribution) : null;\n },\n} satisfies SlotDeclaration<MarkdownMediaReviewContribution>;\n"],"mappings":"AAKA,MAAaA,EAA0B,CACrC,KAAM,sBACN,YAAa,yFACb,MAAQ,GAA2D,CACjE,GAAsB,OAAOC,GAAU,WAAnCA,EAA6C,OAAO,KACxD,IAAMC,EAAQD,EACd,OAAOC,EAAM,UAAY,GAAK,OAAOA,EAAM,OAAU,WAAcA,EAA4C,IACjH,CACF,E"}
1
+ {"version":3,"file":"markdownMediaSlot.cjs","names":["markdownMediaReviewSlot","input","value"],"sources":["../../../src/lib/markdownMediaSlot.ts"],"sourcesContent":["import type { SlotDeclaration } from '@agimon-ai/po-core/web';\n\nimport type { MarkdownMediaReviewContribution } from './markdownMedia';\n\n/** Filled by the Author mode; any Markdown host reads it through `markdownMediaReview`. */\nexport const markdownMediaReviewSlot = {\n slot: 'author.media-review',\n description: 'Provide the viewer action that opens an image or diagram from Markdown for annotation and feedback.',\n parse: (input: unknown): MarkdownMediaReviewContribution | null => {\n if (input === null || typeof input !== 'object') return null;\n const value = input as Partial<MarkdownMediaReviewContribution>;\n return value.version === 1 && typeof value.panel === 'function' ? (value as MarkdownMediaReviewContribution) : null;\n },\n} satisfies SlotDeclaration<MarkdownMediaReviewContribution>;\n"],"mappings":"AAKA,MAAaA,EAA0B,CACrC,KAAM,sBACN,YAAa,sGACb,MAAQ,GAA2D,CACjE,GAAsB,OAAOC,GAAU,WAAnCA,EAA6C,OAAO,KACxD,IAAMC,EAAQD,EACd,OAAOC,EAAM,UAAY,GAAK,OAAOA,EAAM,OAAU,WAAcA,EAA4C,IACjH,CACF,E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-web-components",
3
- "version": "0.0.0-alpha.165",
3
+ "version": "0.0.0-alpha.167",
4
4
  "description": "Shared web components and theme tokens for the Po cockpit and its web plugins: shadcn-style primitives on Radix, tuned to the Po palette, with runtime theme configs.",
5
5
  "keywords": [
6
6
  "ai",
@@ -117,8 +117,8 @@
117
117
  "tailwind-merge": "3.7.0"
118
118
  },
119
119
  "devDependencies": {
120
- "@agimon-ai/po-core": "0.0.0-alpha.165",
121
- "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.165",
120
+ "@agimon-ai/po-core": "0.0.0-alpha.167",
121
+ "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.167",
122
122
  "@types/node": "26.6.5",
123
123
  "@types/react": "19.3.0",
124
124
  "@types/react-dom": "19.3.0",