@agimon-ai/po-web-components 0.0.0-alpha.2 → 0.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -1
- package/README.md +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{@modelcontextprotocol_server@2.2.0/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CfX6zgs1.d.mts → @modelcontextprotocol_server@2.3.1/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts} +5 -6
- package/dist/node_modules/.pnpm/@modelcontextprotocol_server@2.3.1/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/@modelcontextprotocol_server@2.3.1/node_modules/@modelcontextprotocol/server/dist/index.d.mts +2 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/compat.d.mts +8 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/compat.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/errors.d.mts +21 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/errors.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/parse.d.mts +15 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/parse.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/schemas.d.mts +169 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/schemas.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/api.d.mts +38 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/api.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/checks.d.mts +63 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/checks.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/core.d.mts +50 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/core.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/errors.d.mts +3 -87
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/errors.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/json-schema.d.mts +1 -26
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/json-schema.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/registries.d.mts +3 -7
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/registries.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/schemas.d.mts +10 -405
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/schemas.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/standard-schema.d.mts +1 -1
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/standard-schema.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/to-json-schema.d.mts +4 -33
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/to-json-schema.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/util.d.mts +38 -0
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/util.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/{zod@4.6.5 → zod@4.6.6}/node_modules/zod/v4/core/versions.d.mts +1 -1
- package/dist/node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/versions.d.mts.map +1 -0
- package/dist/packages/core/po-core/dist/mcpWidget.d.mts +2 -2
- package/dist/packages/core/po-core/dist/src/web/types/mcpWidget.d.mts +3 -3
- package/dist/packages/core/po-core/dist/web.d.mts +2 -2
- package/dist/packages/core/po-web-components/src/components/Accordion.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Accordion.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/AgentAvatar.d.mts +14 -0
- package/dist/packages/core/po-web-components/src/components/AgentAvatar.d.mts.map +1 -0
- package/dist/packages/core/po-web-components/src/components/AgentAvatar.mjs +2 -0
- package/dist/packages/core/po-web-components/src/components/AgentAvatar.mjs.map +1 -0
- package/dist/packages/core/po-web-components/src/components/AnsiText.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/AnsiText.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Avatar.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Avatar.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Badge.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Badge.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Breadcrumb.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Breadcrumb.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Button.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Button.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Button.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Checkbox.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Checkbox.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/CodeBlock.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/CodeBlock.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/CodeEditorView.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/CodeEditorView.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Command.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Command.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/CopyButton.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/CopyButton.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Dialog.d.mts +1 -1
- package/dist/packages/core/po-web-components/src/components/Dialog.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Dialog.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/DiffView.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/DiffView.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Dot.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Dot.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Drawer.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Drawer.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/DropdownMenu.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/DropdownMenu.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/EmptyState.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/EmptyState.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/HashlineLines.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/HashlineLines.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Input.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Input.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Kbd.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Kbd.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Label.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Label.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Markdown.d.mts +1 -0
- package/dist/packages/core/po-web-components/src/components/Markdown.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Markdown.mjs +2 -2
- package/dist/packages/core/po-web-components/src/components/Markdown.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/McpApp.d.mts +5 -4
- package/dist/packages/core/po-web-components/src/components/McpApp.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/components/McpApp.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/McpToolWidget.d.mts +3 -3
- package/dist/packages/core/po-web-components/src/components/McpToolWidget.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/components/McpToolWidget.mjs +2 -2
- package/dist/packages/core/po-web-components/src/components/McpToolWidget.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/MediaPreview.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/MediaPreview.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/MermaidDiagram.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/MermaidDiagram.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/MessageItem.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/MessageItem.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/MessageLines.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/MessageLines.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/OptionList.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/OptionList.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Panel.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Panel.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/PdfPreview.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/PdfPreview.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Picker.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Picker.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Popover.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Popover.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Progress.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Progress.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/RadioGroup.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/RadioGroup.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/ReviewCommentDraft.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/ReviewCommentDraft.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/ScrollArea.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/ScrollArea.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/SectionLabel.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/SectionLabel.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Select.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Select.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Separator.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Separator.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Settings.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Settings.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Sheet.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Sheet.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Skeleton.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Skeleton.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/StatusBadge.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/StatusBadge.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/StreamCursor.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/StreamCursor.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Switch.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Switch.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Tabs.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Tabs.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Toast.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Toast.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/ToolPathLink.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/ToolPathLink.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/components/Tooltip.mjs +1 -1
- package/dist/packages/core/po-web-components/src/components/Tooltip.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/icons/icons.d.mts +2 -2
- package/dist/packages/core/po-web-components/src/icons/icons.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/ansiSpans.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/ansiSpans.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/lib/editorTheme.d.mts +19 -19
- package/dist/packages/core/po-web-components/src/lib/editorTheme.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/lib/editorTheme.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/editorTheme.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/lib/hashlineHighlight.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/hashlineHighlight.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/lib/hashlineView.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/hashlineView.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/lib/syntaxHighlight.d.mts +2 -2
- package/dist/packages/core/po-web-components/src/lib/syntaxHighlight.mjs +1 -1
- package/dist/packages/core/po-web-components/src/lib/syntaxHighlight.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/theme/builtinThemes.d.mts +1 -1
- package/dist/packages/core/po-web-components/src/theme/builtinThemes.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/theme/builtinThemes.mjs +1 -1
- package/dist/packages/core/po-web-components/src/theme/builtinThemes.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/theme/derive.mjs +1 -1
- package/dist/packages/core/po-web-components/src/theme/derive.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/theme/nativeTheme.d.mts +2 -2
- package/dist/packages/core/po-web-components/src/theme/nativeTheme.mjs +1 -1
- package/dist/packages/core/po-web-components/src/theme/nativeTheme.mjs.map +1 -1
- package/dist/packages/core/po-web-components/src/types/theme.d.mts +1 -1
- package/dist/packages/core/po-web-components/src/types/theme.d.mts.map +1 -1
- package/dist/packages/core/po-web-components/src/types/theme.mjs +1 -1
- package/dist/packages/core/po-web-components/src/types/theme.mjs.map +1 -1
- package/dist/packages/core/po-web-components/themes/po-nord-dark.mjs +2 -0
- package/dist/packages/core/po-web-components/themes/po-nord-dark.mjs.map +1 -0
- package/dist/packages/core/po-web-components/themes/po-one-light.mjs +2 -0
- package/dist/packages/core/po-web-components/themes/po-one-light.mjs.map +1 -0
- package/dist/src/components/Accordion.cjs +1 -1
- package/dist/src/components/Accordion.cjs.map +1 -1
- package/dist/src/components/AgentAvatar.cjs +2 -0
- package/dist/src/components/AgentAvatar.cjs.map +1 -0
- package/dist/src/components/AnsiText.cjs +1 -1
- package/dist/src/components/AnsiText.cjs.map +1 -1
- package/dist/src/components/Avatar.cjs +1 -1
- package/dist/src/components/Avatar.cjs.map +1 -1
- package/dist/src/components/Badge.cjs +1 -1
- package/dist/src/components/Badge.cjs.map +1 -1
- package/dist/src/components/Breadcrumb.cjs +1 -1
- package/dist/src/components/Breadcrumb.cjs.map +1 -1
- package/dist/src/components/Button.cjs +1 -1
- package/dist/src/components/Button.cjs.map +1 -1
- package/dist/src/components/Checkbox.cjs +1 -1
- package/dist/src/components/Checkbox.cjs.map +1 -1
- package/dist/src/components/CodeBlock.cjs +1 -1
- package/dist/src/components/CodeBlock.cjs.map +1 -1
- package/dist/src/components/CodeEditorView.cjs +1 -1
- package/dist/src/components/CodeEditorView.cjs.map +1 -1
- package/dist/src/components/Command.cjs +1 -1
- package/dist/src/components/Command.cjs.map +1 -1
- package/dist/src/components/CopyButton.cjs +1 -1
- package/dist/src/components/CopyButton.cjs.map +1 -1
- package/dist/src/components/Dialog.cjs +1 -1
- package/dist/src/components/Dialog.cjs.map +1 -1
- package/dist/src/components/DiffView.cjs +1 -1
- package/dist/src/components/DiffView.cjs.map +1 -1
- package/dist/src/components/Dot.cjs +1 -1
- package/dist/src/components/Dot.cjs.map +1 -1
- package/dist/src/components/Drawer.cjs +1 -1
- package/dist/src/components/Drawer.cjs.map +1 -1
- package/dist/src/components/DropdownMenu.cjs +1 -1
- package/dist/src/components/DropdownMenu.cjs.map +1 -1
- package/dist/src/components/EmptyState.cjs +1 -1
- package/dist/src/components/EmptyState.cjs.map +1 -1
- package/dist/src/components/HashlineLines.cjs +1 -1
- package/dist/src/components/HashlineLines.cjs.map +1 -1
- package/dist/src/components/Input.cjs +1 -1
- package/dist/src/components/Input.cjs.map +1 -1
- package/dist/src/components/Kbd.cjs +1 -1
- package/dist/src/components/Kbd.cjs.map +1 -1
- package/dist/src/components/Label.cjs +1 -1
- package/dist/src/components/Label.cjs.map +1 -1
- package/dist/src/components/Markdown.cjs +2 -2
- package/dist/src/components/Markdown.cjs.map +1 -1
- package/dist/src/components/McpApp.cjs.map +1 -1
- package/dist/src/components/McpToolWidget.cjs +2 -2
- package/dist/src/components/McpToolWidget.cjs.map +1 -1
- package/dist/src/components/MediaPreview.cjs +1 -1
- package/dist/src/components/MediaPreview.cjs.map +1 -1
- package/dist/src/components/MermaidDiagram.cjs +1 -1
- package/dist/src/components/MermaidDiagram.cjs.map +1 -1
- package/dist/src/components/MessageItem.cjs +1 -1
- package/dist/src/components/MessageItem.cjs.map +1 -1
- package/dist/src/components/MessageLines.cjs +1 -1
- package/dist/src/components/MessageLines.cjs.map +1 -1
- package/dist/src/components/OptionList.cjs +1 -1
- package/dist/src/components/OptionList.cjs.map +1 -1
- package/dist/src/components/Panel.cjs +1 -1
- package/dist/src/components/Panel.cjs.map +1 -1
- package/dist/src/components/PdfPreview.cjs +1 -1
- package/dist/src/components/PdfPreview.cjs.map +1 -1
- package/dist/src/components/Picker.cjs +1 -1
- package/dist/src/components/Picker.cjs.map +1 -1
- package/dist/src/components/Popover.cjs +1 -1
- package/dist/src/components/Popover.cjs.map +1 -1
- package/dist/src/components/Progress.cjs +1 -1
- package/dist/src/components/Progress.cjs.map +1 -1
- package/dist/src/components/RadioGroup.cjs +1 -1
- package/dist/src/components/RadioGroup.cjs.map +1 -1
- package/dist/src/components/ReviewCommentDraft.cjs +1 -1
- package/dist/src/components/ReviewCommentDraft.cjs.map +1 -1
- package/dist/src/components/ScrollArea.cjs +1 -1
- package/dist/src/components/ScrollArea.cjs.map +1 -1
- package/dist/src/components/SectionLabel.cjs +1 -1
- package/dist/src/components/SectionLabel.cjs.map +1 -1
- package/dist/src/components/Select.cjs +1 -1
- package/dist/src/components/Select.cjs.map +1 -1
- package/dist/src/components/Separator.cjs +1 -1
- package/dist/src/components/Separator.cjs.map +1 -1
- package/dist/src/components/Settings.cjs +1 -1
- package/dist/src/components/Settings.cjs.map +1 -1
- package/dist/src/components/Sheet.cjs +1 -1
- package/dist/src/components/Sheet.cjs.map +1 -1
- package/dist/src/components/Skeleton.cjs +1 -1
- package/dist/src/components/Skeleton.cjs.map +1 -1
- package/dist/src/components/StatusBadge.cjs +1 -1
- package/dist/src/components/StatusBadge.cjs.map +1 -1
- package/dist/src/components/StreamCursor.cjs +1 -1
- package/dist/src/components/StreamCursor.cjs.map +1 -1
- package/dist/src/components/Switch.cjs +1 -1
- package/dist/src/components/Switch.cjs.map +1 -1
- package/dist/src/components/Tabs.cjs +1 -1
- package/dist/src/components/Tabs.cjs.map +1 -1
- package/dist/src/components/Toast.cjs +1 -1
- package/dist/src/components/Toast.cjs.map +1 -1
- package/dist/src/components/ToolPathLink.cjs +1 -1
- package/dist/src/components/ToolPathLink.cjs.map +1 -1
- package/dist/src/components/Tooltip.cjs +1 -1
- package/dist/src/components/Tooltip.cjs.map +1 -1
- package/dist/src/icons/icons.cjs +1 -1
- package/dist/src/lib/ansiSpans.cjs +1 -1
- package/dist/src/lib/ansiSpans.cjs.map +1 -1
- package/dist/src/lib/editorTheme.cjs +1 -1
- package/dist/src/lib/editorTheme.cjs.map +1 -1
- package/dist/src/lib/hashlineHighlight.cjs +1 -1
- package/dist/src/lib/hashlineHighlight.cjs.map +1 -1
- package/dist/src/lib/hashlineView.cjs +1 -1
- package/dist/src/lib/hashlineView.cjs.map +1 -1
- package/dist/src/lib/syntaxHighlight.cjs +1 -1
- package/dist/src/lib/syntaxHighlight.cjs.map +1 -1
- package/dist/src/theme/builtinThemes.cjs +1 -1
- package/dist/src/theme/builtinThemes.cjs.map +1 -1
- package/dist/src/theme/derive.cjs +1 -1
- package/dist/src/theme/derive.cjs.map +1 -1
- package/dist/src/theme/nativeTheme.cjs +1 -1
- package/dist/src/theme/nativeTheme.cjs.map +1 -1
- package/dist/src/types/theme.cjs +1 -1
- package/dist/src/types/theme.cjs.map +1 -1
- package/dist/themes/po-nord-dark.cjs +2 -0
- package/dist/themes/po-nord-dark.cjs.map +1 -0
- package/dist/themes/po-one-light.cjs +2 -0
- package/dist/themes/po-one-light.cjs.map +1 -0
- package/package.json +18 -18
- package/styles/mcp.css +11 -11
- package/styles/preview.css +1 -1
- package/styles/theme.css +118 -119
- package/themes/{doom-nord-dark.json → po-nord-dark.json} +1 -1
- package/themes/{doom-one-light.json → po-one-light.json} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +0 -1
- package/dist/node_modules/.pnpm/@modelcontextprotocol_server@2.2.0/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CfX6zgs1.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/@modelcontextprotocol_server@2.2.0/node_modules/@modelcontextprotocol/server/dist/index.d.mts +0 -2
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/coerce.d.mts +0 -20
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/coerce.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/compat.d.mts +0 -50
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/compat.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/deep-partial.d.mts +0 -10
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/deep-partial.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.d.mts +0 -33
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/external.d.mts +0 -28
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/external.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/from-json-schema.d.mts +0 -14
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/from-json-schema.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/in-out.d.mts +0 -13
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/in-out.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.d.mts +0 -13
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.d.mts +0 -54
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.d.mts +0 -775
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.d.mts +0 -331
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.d.mts +0 -296
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/compile.d.mts +0 -67
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/compile.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.d.mts +0 -85
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.d.mts +0 -18
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/index.d.mts +0 -24
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/index.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-generator.d.mts +0 -67
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-generator.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.d.mts +0 -12
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.d.mts +0 -18
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.d.mts +0 -54
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.d.mts +0 -94
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/standard-schema.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.d.mts +0 -237
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/index.d.mts +0 -29
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/index.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ar.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ar.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/az.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/az.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bg.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bg.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bn.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/bn.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ca.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ca.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ckb.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ckb.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/cs.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/cs.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/da.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/da.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/de.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/de.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/el.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/el.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/eo.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/eo.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/es.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/es.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fa.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fa.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fi.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fi.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr-CA.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr-CA.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/fr.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/gu.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/gu.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/he.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/he.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hi.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hi.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hr.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hr.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hu.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hu.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/id.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/id.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/index.d.mts +0 -69
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/index.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/is.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/is.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/it.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/it.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ja.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ja.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ka.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ka.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kh.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kh.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/km.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/km.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kn.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/kn.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ko.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ko.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/lt.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/lt.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/mk.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/mk.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ms.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ms.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ne.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ne.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nl.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nl.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nn.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/nn.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/no.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/no.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ota.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ota.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pl.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pl.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ps.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ps.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt-BR.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt-BR.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/pt.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ro.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ro.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sk.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sk.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sl.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sl.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sv.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/sv.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ta.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ta.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tg.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tg.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/th.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/th.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tk.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tk.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tr.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/tr.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ua.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ua.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uk.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uk.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ur.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ur.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uz.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/uz.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/vi.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/vi.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/yo.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/yo.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-CN.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-CN.d.mts.map +0 -1
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-TW.d.mts +0 -8
- package/dist/node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/zh-TW.d.mts.map +0 -1
- package/dist/packages/core/po-web-components/themes/doom-nord-dark.mjs +0 -2
- package/dist/packages/core/po-web-components/themes/doom-nord-dark.mjs.map +0 -1
- package/dist/packages/core/po-web-components/themes/doom-one-dark.mjs +0 -2
- package/dist/packages/core/po-web-components/themes/doom-one-dark.mjs.map +0 -1
- package/dist/packages/core/po-web-components/themes/doom-one-light.mjs +0 -2
- package/dist/packages/core/po-web-components/themes/doom-one-light.mjs.map +0 -1
- package/dist/themes/doom-nord-dark.cjs +0 -2
- package/dist/themes/doom-nord-dark.cjs.map +0 -1
- package/dist/themes/doom-one-dark.cjs +0 -2
- package/dist/themes/doom-one-dark.cjs.map +0 -1
- package/dist/themes/doom-one-light.cjs +0 -2
- package/dist/themes/doom-one-light.cjs.map +0 -1
- package/themes/doom-one-dark.json +0 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.mjs","names":["CommandDialog","props","Dialog","DialogContent","cn","className","DialogTitle","titleVisible","title","children","CommandHeader","CommandInput","Input","CommandList","CommandGroup","CommandGroupLabel","CommandItem","OptionRow","CommandItemLabel","OptionLabel","CommandEmpty","CommandFooter"],"sources":["../../../../../../src/components/Command.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogContent, type DialogContentProps, DialogTitle } from './Dialog';\nimport { Input, type InputProps } from './Input';\nimport { OptionLabel, OptionRow, type OptionRowProps } from './OptionList';\n\n/**\n * The command palette's frame, its search strip, its rows, and its hint.\n *\n * It has no Radix counterpart and it deliberately does no filtering: the\n * surface that opens a palette already knows how to rank its own commands,\n * and a matcher baked in here would be a second, worse one. Built on Dialog,\n * Input, and the option row so a palette and a select popover cannot drift\n * apart, rather than on a new dependency.\n */\n\nexport interface CommandDialogProps extends Omit<DialogContentProps, 'title'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Names the dialog for assistive tech; visually hidden unless the palette draws its own heading. */\n title: ReactNode;\n titleVisible?: boolean;\n}\n\nexport function CommandDialog({\n open,\n onOpenChange,\n title,\n titleVisible = false,\n className,\n children,\n width = 'lg',\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent data-slot=\"command-dialog\" width={width} className={cn('max-h-[70vh]', className)} {...props}>\n <DialogTitle className={titleVisible ? undefined : 'sr-only'}>{title}</DialogTitle>\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The strip the search field sits in. */\nexport function CommandHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-header\"\n className={cn('flex shrink-0 items-center gap-2 border-b border-
|
|
1
|
+
{"version":3,"file":"Command.mjs","names":["CommandDialog","props","Dialog","DialogContent","cn","className","DialogTitle","titleVisible","title","children","CommandHeader","CommandInput","Input","CommandList","CommandGroup","CommandGroupLabel","CommandItem","OptionRow","CommandItemLabel","OptionLabel","CommandEmpty","CommandFooter"],"sources":["../../../../../../src/components/Command.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogContent, type DialogContentProps, DialogTitle } from './Dialog';\nimport { Input, type InputProps } from './Input';\nimport { OptionLabel, OptionRow, type OptionRowProps } from './OptionList';\n\n/**\n * The command palette's frame, its search strip, its rows, and its hint.\n *\n * It has no Radix counterpart and it deliberately does no filtering: the\n * surface that opens a palette already knows how to rank its own commands,\n * and a matcher baked in here would be a second, worse one. Built on Dialog,\n * Input, and the option row so a palette and a select popover cannot drift\n * apart, rather than on a new dependency.\n */\n\nexport interface CommandDialogProps extends Omit<DialogContentProps, 'title'> {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Names the dialog for assistive tech; visually hidden unless the palette draws its own heading. */\n title: ReactNode;\n titleVisible?: boolean;\n}\n\nexport function CommandDialog({\n open,\n onOpenChange,\n title,\n titleVisible = false,\n className,\n children,\n width = 'lg',\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent data-slot=\"command-dialog\" width={width} className={cn('max-h-[70vh]', className)} {...props}>\n <DialogTitle className={titleVisible ? undefined : 'sr-only'}>{title}</DialogTitle>\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\n/** The strip the search field sits in. */\nexport function CommandHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-header\"\n className={cn('flex shrink-0 items-center gap-2 border-b border-po-border px-3 py-2.5', className)}\n {...props}\n />\n );\n}\n\n/** The search field: bare, because the header already draws the surface. */\nexport function CommandInput({ className, ...props }: InputProps) {\n return (\n <Input\n data-slot=\"command-input\"\n variant=\"bare\"\n autoFocus\n autoComplete=\"off\"\n className={cn('flex-1', className)}\n {...props}\n />\n );\n}\n\n/** The scrolling body. It is the listbox, so its rows are the options. */\nexport function CommandList({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n role=\"listbox\"\n data-slot=\"command-list\"\n className={cn('flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1.5', className)}\n {...props}\n />\n );\n}\n\n/** A labelled run of rows. */\nexport function CommandGroup({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"command-group\" className={cn('flex flex-col gap-0.5', className)} {...props} />;\n}\n\nexport function CommandGroupLabel({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-group-label\"\n className={cn('px-2 pt-2 pb-1 text-sm font-semibold text-po-dim first-letter:uppercase', className)}\n {...props}\n />\n );\n}\n\n/** One command. Compact by default, since a palette shows many at once. */\nexport function CommandItem({ density = 'compact', ...props }: OptionRowProps) {\n return <OptionRow data-slot=\"command-item\" density={density} {...props} />;\n}\n\n/** A command's name, taking the width the row has left. */\nexport function CommandItemLabel(props: ComponentProps<'span'>) {\n return <OptionLabel data-slot=\"command-item-label\" density=\"compact\" {...props} />;\n}\n\n/** What the palette says when nothing matches. */\nexport function CommandEmpty({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-empty\"\n className={cn('px-2 py-6 text-center text-base text-po-dim', className)}\n {...props}\n />\n );\n}\n\n/** The hint strip along the bottom: what the keys do. */\nexport function CommandFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"command-footer\"\n className={cn(\n 'flex min-h-[30px] shrink-0 items-center justify-between gap-3 border-t border-po-border-soft bg-po-deep px-3 text-sm text-po-dim',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"iQAyBA,SAAgBA,EAAc,CAC5B,OACA,eACA,QACA,eAAe,GACf,YACA,WACA,QAAQ,KACR,GAAGC,GACkB,CACrB,MACE,kBAACC,EAAD,CAAc,OAAoB,eAChC,SAAA,kBAACC,EAAD,CAAe,YAAU,iBAAwB,QAAO,UAAWC,EAAG,eAAgBC,CAAS,EAAG,GAAIJ,EAAtG,SAAA,CACE,kBAACK,EAAD,CAAa,UAAWC,EAAe,IAAA,GAAY,UAAY,SAAAC,CAAmB,CAAA,EACjFC,CACY,GACT,CAAA,CAEZ,CAGA,SAAgBC,EAAc,CAAE,YAAW,GAAGT,GAAgC,CAC5E,MACE,kBAAC,MAAD,CACE,YAAU,iBACV,UAAWG,EAAG,yEAA0EC,CAAS,EACjG,GAAIJ,CACL,CAAA,CAEL,CAGA,SAAgBU,EAAa,CAAE,YAAW,GAAGV,GAAqB,CAChE,MACE,kBAACW,EAAD,CACE,YAAU,gBACV,QAAQ,OACR,UAAA,GACA,aAAa,MACb,UAAWR,EAAG,SAAUC,CAAS,EACjC,GAAIJ,CACL,CAAA,CAEL,CAGA,SAAgBY,EAAY,CAAE,YAAW,GAAGZ,GAAgC,CAC1E,MACE,kBAAC,MAAD,CACE,KAAK,UACL,YAAU,eACV,UAAWG,EAAG,6DAA8DC,CAAS,EACrF,GAAIJ,CACL,CAAA,CAEL,CAGA,SAAgBa,EAAa,CAAE,YAAW,GAAGb,GAAgC,CAC3E,MAAO,kBAAC,MAAD,CAAK,YAAU,gBAAgB,UAAWG,EAAG,wBAAyBC,CAAS,EAAG,GAAIJ,CAAQ,CAAA,CACvG,CAEA,SAAgBc,EAAkB,CAAE,YAAW,GAAGd,GAAgC,CAChF,MACE,kBAAC,MAAD,CACE,YAAU,sBACV,UAAWG,EAAG,0EAA2EC,CAAS,EAClG,GAAIJ,CACL,CAAA,CAEL,CAGA,SAAgBe,EAAY,CAAE,UAAU,UAAW,GAAGf,GAAyB,CAC7E,MAAO,kBAACgB,EAAD,CAAW,YAAU,eAAwB,UAAS,GAAIhB,CAAQ,CAAA,CAC3E,CAGA,SAAgBiB,EAAiB,EAA+B,CAC9D,MAAO,kBAACC,EAAD,CAAa,YAAU,qBAAqB,QAAQ,UAAU,GAAIlB,CAAQ,CAAA,CACnF,CAGA,SAAgBmB,EAAa,CAAE,YAAW,GAAGnB,GAAgC,CAC3E,MACE,kBAAC,MAAD,CACE,YAAU,gBACV,UAAWG,EAAG,8CAA+CC,CAAS,EACtE,GAAIJ,CACL,CAAA,CAEL,CAGA,SAAgBoB,EAAc,CAAE,YAAW,GAAGpB,GAAgC,CAC5E,MACE,kBAAC,MAAD,CACE,YAAU,iBACV,UAAWG,EACT,mIACAC,CACF,EACA,GAAIJ,CACL,CAAA,CAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckIcon as e,CopyIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{Button as r}from"./Button.mjs";import{jsx as i}from"react/jsx-runtime";import{useCallback as a,useEffect as o,useState as s}from"react";const c={idle:`copy`,copied:`copied`,failed:`copying was blocked by the browser`};function l({text:l,className:u}){let[d,f]=s(`idle`);o(()=>{if(d===`idle`)return;let e=setTimeout(()=>f(`idle`),1500);return()=>clearTimeout(e)},[d]);let p=a(()=>{navigator.clipboard.writeText(l).then(()=>f(`copied`),()=>f(`failed`))},[l]),m=c[d];return/* @__PURE__ */ i(r,{type:`button`,variant:`ghost`,size:`icon`,"data-testid":`copy-button`,"data-state":d,title:m,"aria-label":m,onClick:p,className:n(`opacity-60 hover:opacity-100`,u),children:d===`copied`?/* @__PURE__ */ i(e,{className:`size-3 text-
|
|
1
|
+
import{CheckIcon as e,CopyIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{Button as r}from"./Button.mjs";import{jsx as i}from"react/jsx-runtime";import{useCallback as a,useEffect as o,useState as s}from"react";const c={idle:`copy`,copied:`copied`,failed:`copying was blocked by the browser`};function l({text:l,className:u}){let[d,f]=s(`idle`);o(()=>{if(d===`idle`)return;let e=setTimeout(()=>f(`idle`),1500);return()=>clearTimeout(e)},[d]);let p=a(()=>{navigator.clipboard.writeText(l).then(()=>f(`copied`),()=>f(`failed`))},[l]),m=c[d];return/* @__PURE__ */ i(r,{type:`button`,variant:`ghost`,size:`icon`,"data-testid":`copy-button`,"data-state":d,title:m,"aria-label":m,onClick:p,className:n(`opacity-60 hover:opacity-100`,u),children:d===`copied`?/* @__PURE__ */ i(e,{className:`size-3 text-po-green`}):/* @__PURE__ */ i(t,{className:`size-3`})})}export{l as CopyButton};
|
|
2
2
|
//# sourceMappingURL=CopyButton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyButton.mjs","names":["LABELS","CopyButton","state","setState","useState","useEffect","timer","copy","useCallback","text","label","Button","cn","className","CheckIcon","CopyIcon"],"sources":["../../../../../../src/components/CopyButton.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { CheckIcon, CopyIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\n/**\n * Puts a piece of text on the clipboard and says so.\n *\n * DESIGN PATTERNS:\n * - Always visible, dimmed. Half the cockpit's surfaces are touched rather\n * than pointed at, and a control revealed by hover does not exist there.\n * - A refused clipboard is a state, not a crash: the label says the browser\n * blocked it and the text is still there to select by hand.\n */\n\n/** How long the control stays acknowledged before returning to its icon. */\nconst FEEDBACK_MS = 1500;\n\ntype CopyState = 'idle' | 'copied' | 'failed';\n\nconst LABELS: Readonly<Record<CopyState, string>> = {\n idle: 'copy',\n copied: 'copied',\n failed: 'copying was blocked by the browser',\n};\n\nexport interface CopyButtonProps {\n /** What lands on the clipboard. */\n text: string;\n className?: string | undefined;\n}\n\nexport function CopyButton({ text, className }: CopyButtonProps) {\n const [state, setState] = useState<CopyState>('idle');\n\n useEffect(() => {\n if (state === 'idle') return;\n const timer = setTimeout(() => setState('idle'), FEEDBACK_MS);\n return () => clearTimeout(timer);\n }, [state]);\n\n const copy = useCallback(() => {\n void navigator.clipboard.writeText(text).then(\n () => setState('copied'),\n () => setState('failed'),\n );\n }, [text]);\n\n const label = LABELS[state];\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"copy-button\"\n data-state={state}\n title={label}\n aria-label={label}\n onClick={copy}\n className={cn('opacity-60 hover:opacity-100', className)}\n >\n {state === 'copied' ? <CheckIcon className=\"size-3 text-
|
|
1
|
+
{"version":3,"file":"CopyButton.mjs","names":["LABELS","CopyButton","state","setState","useState","useEffect","timer","copy","useCallback","text","label","Button","cn","className","CheckIcon","CopyIcon"],"sources":["../../../../../../src/components/CopyButton.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { CheckIcon, CopyIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\n/**\n * Puts a piece of text on the clipboard and says so.\n *\n * DESIGN PATTERNS:\n * - Always visible, dimmed. Half the cockpit's surfaces are touched rather\n * than pointed at, and a control revealed by hover does not exist there.\n * - A refused clipboard is a state, not a crash: the label says the browser\n * blocked it and the text is still there to select by hand.\n */\n\n/** How long the control stays acknowledged before returning to its icon. */\nconst FEEDBACK_MS = 1500;\n\ntype CopyState = 'idle' | 'copied' | 'failed';\n\nconst LABELS: Readonly<Record<CopyState, string>> = {\n idle: 'copy',\n copied: 'copied',\n failed: 'copying was blocked by the browser',\n};\n\nexport interface CopyButtonProps {\n /** What lands on the clipboard. */\n text: string;\n className?: string | undefined;\n}\n\nexport function CopyButton({ text, className }: CopyButtonProps) {\n const [state, setState] = useState<CopyState>('idle');\n\n useEffect(() => {\n if (state === 'idle') return;\n const timer = setTimeout(() => setState('idle'), FEEDBACK_MS);\n return () => clearTimeout(timer);\n }, [state]);\n\n const copy = useCallback(() => {\n void navigator.clipboard.writeText(text).then(\n () => setState('copied'),\n () => setState('failed'),\n );\n }, [text]);\n\n const label = LABELS[state];\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"copy-button\"\n data-state={state}\n title={label}\n aria-label={label}\n onClick={copy}\n className={cn('opacity-60 hover:opacity-100', className)}\n >\n {state === 'copied' ? <CheckIcon className=\"size-3 text-po-green\" /> : <CopyIcon className=\"size-3\" />}\n </Button>\n );\n}\n"],"mappings":"+OAiBA,MAIMA,EAA8C,CAClD,KAAM,OACN,OAAQ,SACR,OAAQ,oCACV,EAQA,SAAgBC,EAAW,CAAE,OAAM,aAA8B,CAC/D,GAAM,CAACC,EAAOC,GAAYC,EAAoB,MAAM,EAEpDC,MAAgB,CACd,GAAIH,IAAU,OAAQ,OACtB,IAAMI,EAAQ,eAAiBH,EAAS,MAAM,EAAG,IAAW,EAC5D,UAAa,aAAaG,CAAK,CACjC,EAAG,CAACJ,CAAK,CAAC,EAEV,IAAMK,EAAOC,MAAkB,CAC7B,UAAe,UAAU,UAAUC,CAAI,CAAC,CAAC,SACjCN,EAAS,QAAQ,MACjBA,EAAS,QAAQ,CACzB,CACF,EAAG,CAACM,CAAI,CAAC,EAEHC,EAAQV,EAAOE,GACrB,MACE,kBAACS,EAAD,CACE,KAAK,SACL,QAAQ,QACR,KAAK,OACL,cAAY,cACZ,aAAYT,EACZ,MAAOQ,EACP,aAAYA,EACZ,QAASH,EACT,UAAWK,EAAG,+BAAgCC,CAAS,EAEtD,SAAAX,IAAU,SAAW,kBAACY,EAAD,CAAW,UAAU,sBAAwB,CAAA,EAAI,kBAACC,EAAD,CAAU,UAAU,QAAU,CAAA,CAC/F,CAAA,CAEZ"}
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
//#region src/components/Dialog.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,
|
|
7
|
-
* and focus restored to the trigger on close. The frame is the
|
|
7
|
+
* and focus restored to the trigger on close. The frame is the Po panel.
|
|
8
8
|
*/
|
|
9
9
|
declare function Dialog$1(props: ComponentProps<typeof Dialog.Root>): import("react").JSX.Element;
|
|
10
10
|
export declare function DialogTrigger(props: ComponentProps<typeof Dialog.Trigger>): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as o,useContext as s}from"react";import{cva as c}from"class-variance-authority";const l=o(void 0);function u(e){let t=e.onOpenChange===void 0?void 0:t=>e.onOpenChange?.(t);return/* @__PURE__ */ i(l.Provider,{value:t,children:/* @__PURE__ */ i(r.Root,{"data-slot":`dialog`,...e,onOpenChange:t})})}function d(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dialog-trigger`,...e})}function f(e){return/* @__PURE__ */ i(r.Portal,{"data-slot":`dialog-portal`,...e})}function p(e){return/* @__PURE__ */ i(r.Close,{"data-slot":`dialog-close`,...e})}function m({className:e,onPointerDownCapture:n,...a}){let o=s(l);return/* @__PURE__ */ i(r.Overlay,{"data-slot":`dialog-overlay`,className:t(`fixed inset-0 z-40 bg-
|
|
1
|
+
import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as o,useContext as s}from"react";import{cva as c}from"class-variance-authority";const l=o(void 0);function u(e){let t=e.onOpenChange===void 0?void 0:t=>e.onOpenChange?.(t);return/* @__PURE__ */ i(l.Provider,{value:t,children:/* @__PURE__ */ i(r.Root,{"data-slot":`dialog`,...e,onOpenChange:t})})}function d(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dialog-trigger`,...e})}function f(e){return/* @__PURE__ */ i(r.Portal,{"data-slot":`dialog-portal`,...e})}function p(e){return/* @__PURE__ */ i(r.Close,{"data-slot":`dialog-close`,...e})}function m({className:e,onPointerDownCapture:n,...a}){let o=s(l);return/* @__PURE__ */ i(r.Overlay,{"data-slot":`dialog-overlay`,className:t(`fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade`,e),onPointerDownCapture:e=>{if(n?.(e),e.defaultPrevented||o===void 0)return;let t=e.currentTarget.nextElementSibling;if(t?.querySelector(`[data-slot="select-trigger"][data-state="open"]`)==null)return;let r=t?.getBoundingClientRect();r&&e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom||(e.stopPropagation(),o(!1))},...a})}const h={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function g({className:e,children:n,width:o=`md`,...s}){return/* @__PURE__ */ a(f,{children:[/* @__PURE__ */ i(m,{}),/* @__PURE__ */ i(r.Content,{"data-slot":`dialog-content`,className:t(`fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-po-border bg-po-panel shadow-2xl outline-none data-[state=open]:animate-po-pop`,h[o],e),...s,children:n})]})}function _({className:o,dismissible:s=!1,closeLabel:c=`close`,children:l,...u}){return/* @__PURE__ */ a(`div`,{"data-slot":`dialog-header`,className:t(`flex min-w-0 items-center justify-between gap-3 border-b border-po-border px-3 py-3 sm:px-4`,o),...u,children:[l,s?/* @__PURE__ */ i(r.Close,{asChild:!0,children:/* @__PURE__ */ i(n,{variant:`ghost`,size:`icon`,"aria-label":c,className:`text-po-faint hover:text-po-hi`,children:/* @__PURE__ */ i(e,{className:`h-3 w-3`})})}):null]})}function v({className:e,...n}){return/* @__PURE__ */ i(r.Title,{"data-slot":`dialog-title`,className:t(`text-xl font-semibold text-po-hi`,e),...n})}function y({className:e,...n}){return/* @__PURE__ */ i(r.Description,{"data-slot":`dialog-description`,className:t(`text-sm leading-relaxed text-po-dim`,e),...n})}function b({className:e,...n}){return/* @__PURE__ */ i(`div`,{"data-slot":`dialog-body`,className:t(`flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4`,e),...n})}const x=c(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] flex-wrap justify-between border-t border-po-border-soft bg-po-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0`}},defaultVariants:{variant:`plain`}});function S({className:e,variant:n,...r}){return/* @__PURE__ */ i(`div`,{"data-slot":`dialog-footer`,className:t(x({variant:n}),e),...r})}export{u as Dialog,b as DialogBody,p as DialogClose,g as DialogContent,y as DialogDescription,S as DialogFooter,_ as DialogHeader,m as DialogOverlay,f as DialogPortal,v as DialogTitle,d as DialogTrigger,x as dialogFooterVariants};
|
|
2
2
|
//# sourceMappingURL=Dialog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive","DialogOpenChangeContext","createContext","Dialog$1","onOpenChange","props","open","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","useContext","cn","className","onPointerDownCapture","event","dialogContent","bounds","CONTENT_WIDTH","DialogContent","width","DialogHeader","children","dismissible","Button","closeLabel","CloseIcon","DialogTitle","DialogDescription","DialogBody","dialogFooterVariants","cva","DialogFooter"],"sources":["../../../../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { createContext, type ComponentProps, useContext } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\nconst DialogOpenChangeContext = createContext<((open: boolean) => void) | undefined>(undefined);\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Doom panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n const onOpenChange = props.onOpenChange === undefined ? undefined : (open: boolean) => props.onOpenChange?.(open);\n return (\n <DialogOpenChangeContext.Provider value={onOpenChange}>\n <DialogPrimitive.Root data-slot=\"dialog\" {...props} onOpenChange={onOpenChange} />\n </DialogOpenChangeContext.Provider>\n );\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({\n className,\n onPointerDownCapture,\n ...props\n}: ComponentProps<typeof DialogPrimitive.Overlay>) {\n const onOpenChange = useContext(DialogOpenChangeContext);\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade', className)}\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (event.defaultPrevented || onOpenChange === undefined) return;\n const dialogContent = event.currentTarget.nextElementSibling;\n const openSelectTrigger = dialogContent?.querySelector('[data-slot=\"select-trigger\"][data-state=\"open\"]');\n if (openSelectTrigger === null || openSelectTrigger === undefined) return;\n // An open Select disables pointer events on the dialog; an inside press falls through to this overlay.\n const bounds = dialogContent?.getBoundingClientRect();\n if (\n bounds &&\n event.clientX >= bounds.left &&\n event.clientX <= bounds.right &&\n event.clientY >= bounds.top &&\n event.clientY <= bounds.bottom\n )\n return;\n\n // Radix's parent outside listener can lag one render behind a nested\n // modal Select. Own this backdrop press so the complete stack closes.\n event.stopPropagation();\n onOpenChange(false);\n }}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel shadow-2xl outline-none data-[state=open]:animate-doom-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n 'flex min-w-0 items-center justify-between gap-3 border-b border-doom-border px-3 py-3 sm:px-4',\n className,\n )}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-doom-faint hover:text-doom-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-xl font-semibold text-doom-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm leading-relaxed text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] flex-wrap justify-between border-t border-doom-border-soft bg-doom-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive","DialogOpenChangeContext","createContext","Dialog$1","onOpenChange","props","open","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","useContext","cn","className","onPointerDownCapture","event","dialogContent","bounds","CONTENT_WIDTH","DialogContent","width","DialogHeader","children","dismissible","Button","closeLabel","CloseIcon","DialogTitle","DialogDescription","DialogBody","dialogFooterVariants","cva","DialogFooter"],"sources":["../../../../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { createContext, type ComponentProps, useContext } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\nconst DialogOpenChangeContext = createContext<((open: boolean) => void) | undefined>(undefined);\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Po panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n const onOpenChange = props.onOpenChange === undefined ? undefined : (open: boolean) => props.onOpenChange?.(open);\n return (\n <DialogOpenChangeContext.Provider value={onOpenChange}>\n <DialogPrimitive.Root data-slot=\"dialog\" {...props} onOpenChange={onOpenChange} />\n </DialogOpenChangeContext.Provider>\n );\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({\n className,\n onPointerDownCapture,\n ...props\n}: ComponentProps<typeof DialogPrimitive.Overlay>) {\n const onOpenChange = useContext(DialogOpenChangeContext);\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade', className)}\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (event.defaultPrevented || onOpenChange === undefined) return;\n const dialogContent = event.currentTarget.nextElementSibling;\n const openSelectTrigger = dialogContent?.querySelector('[data-slot=\"select-trigger\"][data-state=\"open\"]');\n if (openSelectTrigger === null || openSelectTrigger === undefined) return;\n // An open Select disables pointer events on the dialog; an inside press falls through to this overlay.\n const bounds = dialogContent?.getBoundingClientRect();\n if (\n bounds &&\n event.clientX >= bounds.left &&\n event.clientX <= bounds.right &&\n event.clientY >= bounds.top &&\n event.clientY <= bounds.bottom\n )\n return;\n\n // Radix's parent outside listener can lag one render behind a nested\n // modal Select. Own this backdrop press so the complete stack closes.\n event.stopPropagation();\n onOpenChange(false);\n }}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-po-border bg-po-panel shadow-2xl outline-none data-[state=open]:animate-po-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n 'flex min-w-0 items-center justify-between gap-3 border-b border-po-border px-3 py-3 sm:px-4',\n className,\n )}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-po-faint hover:text-po-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-xl font-semibold text-po-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm leading-relaxed text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] flex-wrap justify-between border-t border-po-border-soft bg-po-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{Button as t}from"./Button.mjs";import{diffGutterWidth as n,diffRangeOf as r}from"../lib/review.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Fragment as o}from"react";const s={"+":`bg-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Button as t}from"./Button.mjs";import{diffGutterWidth as n,diffRangeOf as r}from"../lib/review.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Fragment as o}from"react";const s={"+":`bg-po-tint-green text-po-green`,"-":`bg-po-tint-red text-po-red`," ":`text-po-dim`};function c(e){return e===`+`||e===`-`||e===` `}function l({hunks:l,testId:u,onSelect:d,renderAfterRow:f,className:p}){let m=n(l);return l.length===0?/* @__PURE__ */ i(`p`,{"data-testid":`${u}-empty`,className:`px-2 py-1 text-sm text-po-dim`,children:`no lines changed`}):/* @__PURE__ */ i(`div`,{"data-testid":u,"data-diff-surface":u,onMouseUp:()=>{if(d===void 0)return;let e=globalThis.getSelection?.(),t=e?.toString()??``;if(t.trim()===``)return;let n=[...document.querySelectorAll(`[data-diff-surface="${u}"] [data-diff-line]`)].filter(t=>e?.containsNode(t,!0)===!0).map(e=>({marker:e.dataset.diffMarker,line:Number(e.dataset.diffLine)})).filter(e=>c(e.marker)),i=r(n);i!==void 0&&d({...i,snippet:t})},className:e(`overflow-x-auto font-mono text-sm leading-normal`,p),children:l.map((n,r)=>/* @__PURE__ */ a(`div`,{children:[r>0?/* @__PURE__ */ a(`div`,{className:`flex items-center gap-2 px-2 py-0.5 text-2xs text-po-faint`,children:[/* @__PURE__ */ i(`span`,{className:`h-px flex-1 bg-po-border-soft`}),/* @__PURE__ */ i(`span`,{children:`⋯`}),/* @__PURE__ */ i(`span`,{className:`h-px flex-1 bg-po-border-soft`})]}):null,n.rows.map((n,r)=>/* @__PURE__ */ a(o,{children:[/* @__PURE__ */ a(`div`,{"data-diff-line":n.line,"data-diff-marker":n.marker,className:e(`flex whitespace-pre`,s[n.marker]),children:[d===void 0?/* @__PURE__ */ i(`span`,{"aria-hidden":!0,className:`shrink-0 select-none pr-2 pl-2 text-right text-po-faint`,style:{width:`${m+2}ch`},children:n.line}):/* @__PURE__ */ i(t,{variant:`ghost`,size:`xs`,"data-diff-gutter":n.line,"aria-label":`comment on ${n.marker===`-`?`removed `:``}line ${n.line}`,onClick:()=>d({side:n.marker===`-`?`old`:`new`,startLine:n.line,endLine:n.line,snippet:n.content}),className:`h-auto min-h-0 min-w-0 shrink-0 select-none justify-end rounded-none py-0 pr-2 pl-2 font-normal text-sm text-po-faint hover:bg-transparent hover:text-po-blue`,style:{width:`${m+2}ch`},children:n.line}),/* @__PURE__ */ i(`span`,{className:`shrink-0 select-none pr-1`,children:n.marker}),/* @__PURE__ */ i(`span`,{className:`min-w-0`,children:n.content})]}),f?.(n)]},`${n.marker}-${n.line}-${r}`))]},`${n.start}-${r}`))})}export{l as DiffView};
|
|
2
2
|
//# sourceMappingURL=DiffView.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffView.mjs","names":["Fragment","Fragment$1","ROW_TONE","isMarker","value","DiffView","gutter","diffGutterWidth","hunks","testId","onSelect","selection","text","touched","row","range","diffRangeOf","cn","className","position","hunk","Button","renderAfterRow","offset"],"sources":["../../../../../../src/components/DiffView.tsx"],"sourcesContent":["import { Fragment, type ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { diffGutterWidth, diffRangeOf } from '../lib/review';\nimport type { DiffHunk, DiffMarker, DiffRow, DiffSelection } from '../types/diff';\nimport { Button } from './Button';\n\n/**\n * A diff, drawn the way this cockpit draws every other one: a numbered gutter\n * and a background wash per row, so a change reads at a glance rather than by\n * hunting for leading punctuation.\n *\n * Hunks arrive apart rather than joined by an elision marker, so the gap\n * between two of them is a rule the component draws, not a line it has to\n * recognise in a string.\n *\n * A reader comments two ways: by highlighting text, which reports the lines the\n * highlight touches, or by clicking a line number, which reports that one line.\n * Either way the selection names its side, so a note on a removed line points\n * at the old file rather than at whatever the new file has on that number.\n */\n\nconst ROW_TONE: Readonly<Record<DiffMarker, string>> = {\n '+': 'bg-
|
|
1
|
+
{"version":3,"file":"DiffView.mjs","names":["Fragment","Fragment$1","ROW_TONE","isMarker","value","DiffView","gutter","diffGutterWidth","hunks","testId","onSelect","selection","text","touched","row","range","diffRangeOf","cn","className","position","hunk","Button","renderAfterRow","offset"],"sources":["../../../../../../src/components/DiffView.tsx"],"sourcesContent":["import { Fragment, type ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { diffGutterWidth, diffRangeOf } from '../lib/review';\nimport type { DiffHunk, DiffMarker, DiffRow, DiffSelection } from '../types/diff';\nimport { Button } from './Button';\n\n/**\n * A diff, drawn the way this cockpit draws every other one: a numbered gutter\n * and a background wash per row, so a change reads at a glance rather than by\n * hunting for leading punctuation.\n *\n * Hunks arrive apart rather than joined by an elision marker, so the gap\n * between two of them is a rule the component draws, not a line it has to\n * recognise in a string.\n *\n * A reader comments two ways: by highlighting text, which reports the lines the\n * highlight touches, or by clicking a line number, which reports that one line.\n * Either way the selection names its side, so a note on a removed line points\n * at the old file rather than at whatever the new file has on that number.\n */\n\nconst ROW_TONE: Readonly<Record<DiffMarker, string>> = {\n '+': 'bg-po-tint-green text-po-green',\n '-': 'bg-po-tint-red text-po-red',\n ' ': 'text-po-dim',\n};\n\nexport interface DiffViewProps {\n hunks: readonly DiffHunk[];\n /** Marks the surface so a test and a selection handler can find it. Unique per diff on a page. */\n testId: string;\n /** Called with the selected text, the lines it covers, and their side. Enables line-number clicks. */\n onSelect?: (selection: DiffSelection) => void;\n /** Drawn under one row, full width: inline comments and an open draft go here. */\n renderAfterRow?: (row: DiffRow) => ReactNode;\n className?: string;\n}\n\nfunction isMarker(value: string | undefined): value is DiffMarker {\n return value === '+' || value === '-' || value === ' ';\n}\n\nexport function DiffView({ hunks, testId, onSelect, renderAfterRow, className }: DiffViewProps) {\n const gutter = diffGutterWidth(hunks);\n\n /**\n * Turns whatever the reader highlighted into a line range. The rows carry\n * their own numbers and markers, so the range comes from the rows the\n * selection touches rather than from counting newlines in the rendered text.\n */\n const handleSelect = (): void => {\n if (onSelect === undefined) return;\n const selection = globalThis.getSelection?.();\n const text = selection?.toString() ?? '';\n if (text.trim() === '') return;\n const rows = [...document.querySelectorAll<HTMLElement>(`[data-diff-surface=\"${testId}\"] [data-diff-line]`)];\n const touched = rows\n .filter((row) => selection?.containsNode(row, true) === true)\n .map((row) => ({ marker: row.dataset.diffMarker, line: Number(row.dataset.diffLine) }))\n .filter((row): row is { marker: DiffMarker; line: number } => isMarker(row.marker));\n const range = diffRangeOf(touched);\n if (range !== undefined) onSelect({ ...range, snippet: text });\n };\n\n if (hunks.length === 0) {\n return (\n <p data-testid={`${testId}-empty`} className=\"px-2 py-1 text-sm text-po-dim\">\n no lines changed\n </p>\n );\n }\n\n return (\n <div\n data-testid={testId}\n data-diff-surface={testId}\n onMouseUp={handleSelect}\n className={cn('overflow-x-auto font-mono text-sm leading-normal', className)}\n >\n {hunks.map((hunk, position) => (\n <div key={`${hunk.start}-${position}`}>\n {position > 0 ? (\n <div className=\"flex items-center gap-2 px-2 py-0.5 text-2xs text-po-faint\">\n <span className=\"h-px flex-1 bg-po-border-soft\" />\n <span>⋯</span>\n <span className=\"h-px flex-1 bg-po-border-soft\" />\n </div>\n ) : null}\n {hunk.rows.map((row, offset) => (\n <Fragment key={`${row.marker}-${row.line}-${offset}`}>\n <div\n data-diff-line={row.line}\n data-diff-marker={row.marker}\n className={cn('flex whitespace-pre', ROW_TONE[row.marker])}\n >\n {onSelect === undefined ? (\n <span\n aria-hidden\n className=\"shrink-0 select-none pr-2 pl-2 text-right text-po-faint\"\n style={{ width: `${gutter + 2}ch` }}\n >\n {row.line}\n </span>\n ) : (\n <Button\n variant=\"ghost\"\n size=\"xs\"\n data-diff-gutter={row.line}\n aria-label={`comment on ${row.marker === '-' ? 'removed ' : ''}line ${row.line}`}\n onClick={() =>\n onSelect({\n side: row.marker === '-' ? 'old' : 'new',\n startLine: row.line,\n endLine: row.line,\n snippet: row.content,\n })\n }\n className=\"h-auto min-h-0 min-w-0 shrink-0 select-none justify-end rounded-none py-0 pr-2 pl-2 font-normal text-sm text-po-faint hover:bg-transparent hover:text-po-blue\"\n style={{ width: `${gutter + 2}ch` }}\n >\n {row.line}\n </Button>\n )}\n <span className=\"shrink-0 select-none pr-1\">{row.marker}</span>\n <span className=\"min-w-0\">{row.content}</span>\n </div>\n {renderAfterRow?.(row)}\n </Fragment>\n ))}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":"iOAsBA,MAAME,EAAiD,CACrD,IAAK,iCACL,IAAK,6BACL,IAAK,aACP,EAaA,SAASC,EAAS,EAAgD,CAChE,OAAOC,IAAU,KAAOA,IAAU,KAAOA,IAAU,GACrD,CAEA,SAAgBC,EAAS,CAAE,QAAO,SAAQ,WAAU,iBAAgB,aAA4B,CAC9F,IAAMC,EAASC,EAAgBC,CAAK,EA6BpC,OARIA,EAAM,SAAW,EAEjB,kBAAC,IAAD,CAAG,cAAa,GAAGC,EAAO,QAAS,UAAU,gCAAgC,SAAA,kBAE1E,CAAA,EAKL,kBAAC,MAAD,CACE,cAAaA,EACb,oBAAmBA,EACnB,cA1B6B,CAC/B,GAAIC,IAAa,IAAA,GAAW,OAC5B,IAAMC,EAAY,WAAW,eAAe,EACtCC,EAAOD,GAAW,SAAS,GAAK,GACtC,GAAIC,EAAK,KAAK,IAAM,GAAI,OAExB,IAAMC,EAAU,CADF,GAAG,SAAS,iBAA8B,uBAAuBJ,EAAO,oBAAoB,CACvF,CAAC,CACjB,OAAQ,GAAQE,GAAW,aAAaG,EAAK,EAAI,IAAM,EAAI,CAAC,CAC5D,IAAK,IAAS,CAAE,OAAQA,EAAI,QAAQ,WAAY,KAAM,OAAOA,EAAI,QAAQ,QAAQ,CAAE,EAAE,CAAC,CACtF,OAAQ,GAAqDX,EAASW,EAAI,MAAM,CAAC,EAC9EC,EAAQC,EAAYH,CAAO,EAC7BE,IAAU,IAAA,IAAWL,EAAS,CAAE,GAAGK,EAAO,QAASH,CAAK,CAAC,CAC/D,EAeI,UAAWK,EAAG,mDAAoDC,CAAS,EAE1E,SAAAV,EAAM,KAAK,EAAM,IAChB,kBAAC,MAAD,CAAA,SAAA,CACGW,EAAW,EACV,kBAAC,MAAD,CAAK,UAAU,6DAAf,SAAA,CACE,kBAAC,OAAD,CAAM,UAAU,+BAAiC,CAAA,EACjD,kBAAC,OAAD,CAAA,SAAM,GAAO,CAAA,EACb,kBAAC,OAAD,CAAM,UAAU,+BAAiC,CAAA,CAC9C,CACH,CAAA,EAAA,KACHC,EAAK,KAAK,KAAK,EAAK,IACnB,kBAACpB,EAAD,CAAA,SAAA,CACE,kBAAC,MAAD,CACE,iBAAgBc,EAAI,KACpB,mBAAkBA,EAAI,OACtB,UAAWG,EAAG,sBAAuBf,EAASY,EAAI,OAAO,EAH3D,SAAA,CAKGJ,IAAa,IAAA,GACZ,kBAAC,OAAD,CACE,cAAA,GACA,UAAU,0DACV,MAAO,CAAE,MAAO,GAAGJ,EAAS,EAAE,GAAI,EAEjC,SAAAQ,EAAI,IACD,CAAA,EAEN,kBAACO,EAAD,CACE,QAAQ,QACR,KAAK,KACL,mBAAkBP,EAAI,KACtB,aAAY,cAAcA,EAAI,SAAW,IAAM,WAAa,GAAG,OAAOA,EAAI,OAC1E,YACEJ,EAAS,CACP,KAAMI,EAAI,SAAW,IAAM,MAAQ,MACnC,UAAWA,EAAI,KACf,QAASA,EAAI,KACb,QAASA,EAAI,OACf,CAAC,EAEH,UAAU,gKACV,MAAO,CAAE,MAAO,GAAGR,EAAS,EAAE,GAAI,EAEjC,SAAAQ,EAAI,IACC,CAAA,EAEV,kBAAC,OAAD,CAAM,UAAU,4BAA6B,SAAAA,EAAI,MAAa,CAAA,EAC9D,kBAAC,OAAD,CAAM,UAAU,UAAW,SAAAA,EAAI,OAAc,CAAA,CAC1C,CACJ,CAAA,EAAAQ,IAAiBR,CAAG,CACb,CAAA,EAtCK,GAAGA,EAAI,OAAO,GAAGA,EAAI,KAAK,GAAGS,GAsClC,CACX,CACE,CAAA,EAjDK,GAAGH,EAAK,MAAM,GAAGD,GAiDtB,CACN,CACE,CAAA,CAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-po-faint`,muted:`bg-po-faint/40`,blue:`bg-po-blue`,green:`bg-po-green`,yellow:`bg-po-yellow`,red:`bg-po-red`,magenta:`bg-po-magenta`,violet:`bg-po-violet`,cyan:`bg-po-cyan`,orange:`bg-po-orange`,teal:`bg-po-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function i({className:n,tone:i,size:a,pulse:o,...s}){return/* @__PURE__ */ t(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:e(r({tone:i,size:a,pulse:o}),n),...s})}export{i as Dot,r as dotVariants};
|
|
2
2
|
//# sourceMappingURL=Dot.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dot.mjs","names":["dotVariants","cva","Dot","props","cn","className"],"sources":["../../../../../../src/components/Dot.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\nimport type { DotTone as Tone } from '../types/tone';\n\nexport const dotVariants = cva('inline-block shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-
|
|
1
|
+
{"version":3,"file":"Dot.mjs","names":["dotVariants","cva","Dot","props","cn","className"],"sources":["../../../../../../src/components/Dot.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\nimport type { DotTone as Tone } from '../types/tone';\n\nexport const dotVariants = cva('inline-block shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-po-faint',\n muted: 'bg-po-faint/40',\n blue: 'bg-po-blue',\n green: 'bg-po-green',\n yellow: 'bg-po-yellow',\n red: 'bg-po-red',\n magenta: 'bg-po-magenta',\n violet: 'bg-po-violet',\n cyan: 'bg-po-cyan',\n orange: 'bg-po-orange',\n teal: 'bg-po-teal',\n } satisfies Record<Tone, string>,\n size: {\n xs: 'h-1 w-1',\n sm: 'h-1.5 w-1.5',\n md: 'h-2 w-2',\n lg: 'h-2.5 w-2.5',\n },\n pulse: {\n true: 'animate-pulse',\n false: '',\n },\n },\n defaultVariants: { tone: 'neutral', size: 'sm', pulse: false },\n});\n\nexport type DotTone = Tone;\n\nexport interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}\n\n/** The status dot: a colour and, while something is live, a pulse. */\nexport function Dot({ className, tone, size, pulse, ...props }: DotProps) {\n return <span data-slot=\"dot\" aria-hidden className={cn(dotVariants({ tone, size, pulse }), className)} {...props} />;\n}\n"],"mappings":"0HAMA,MAAaA,EAAcC,EAAI,qCAAsC,CACnE,SAAU,CACR,KAAM,CACJ,QAAS,cACT,MAAO,iBACP,KAAM,aACN,MAAO,cACP,OAAQ,eACR,IAAK,YACL,QAAS,gBACT,OAAQ,eACR,KAAM,aACN,OAAQ,eACR,KAAM,YACR,EACA,KAAM,CACJ,GAAI,UACJ,GAAI,cACJ,GAAI,UACJ,GAAI,aACN,EACA,MAAO,CACL,KAAM,gBACN,MAAO,EACT,CACF,EACA,gBAAiB,CAAE,KAAM,UAAW,KAAM,KAAM,MAAO,EAAM,CAC/D,CAAC,EAOD,SAAgBC,EAAI,CAAE,YAAW,OAAM,OAAM,QAAO,GAAGC,GAAmB,CACxE,MAAO,kBAAC,OAAD,CAAM,YAAU,MAAM,cAAA,GAAY,UAAWC,EAAGJ,EAAY,CAAE,OAAM,OAAM,OAAM,CAAC,EAAGK,CAAS,EAAG,GAAIF,CAAQ,CAAA,CACrH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{Dialog as t,DialogHeader as n,DialogOverlay as r,DialogPortal as i,DialogTitle as a}from"./Dialog.mjs";import{Dialog as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useRef as l}from"react";function u({open:u,onOpenChange:d,side:f,title:p,children:m,className:h,showHeader:g=!0,"data-testid":_,backdropTestId:v}){let y=l(null);return/* @__PURE__ */ s(t,{open:u,onOpenChange:d,children:/* @__PURE__ */ c(i,{children:[/* @__PURE__ */ s(r,{"data-testid":v}),/* @__PURE__ */ c(o.Content,{"aria-describedby":void 0,"data-testid":_,className:e(`fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Dialog as t,DialogHeader as n,DialogOverlay as r,DialogPortal as i,DialogTitle as a}from"./Dialog.mjs";import{Dialog as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useRef as l}from"react";function u({open:u,onOpenChange:d,side:f,title:p,children:m,className:h,showHeader:g=!0,"data-testid":_,backdropTestId:v}){let y=l(null);return/* @__PURE__ */ s(t,{open:u,onOpenChange:d,children:/* @__PURE__ */ c(i,{children:[/* @__PURE__ */ s(r,{"data-testid":v}),/* @__PURE__ */ c(o.Content,{"aria-describedby":void 0,"data-testid":_,className:e(`fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-po-border bg-po-rail outline-none`,f===`left`?`left-0 border-r`:`right-0 border-l`,h),onOpenAutoFocus:()=>{y.current=document.activeElement instanceof HTMLElement?document.activeElement:null},onCloseAutoFocus:e=>{e.preventDefault(),y.current?.isConnected&&y.current.focus()},children:[g?/* @__PURE__ */ s(n,{dismissible:!0,closeLabel:`hide ${p.toLowerCase()}`,children:/* @__PURE__ */ s(a,{children:p})}):/* @__PURE__ */ s(a,{className:`sr-only`,children:p}),m]})]})})}export{u as Drawer};
|
|
2
2
|
//# sourceMappingURL=Drawer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.mjs","names":["Dialog","DialogPrimitive","Dialog$1","Drawer","testId","opener","useRef","DialogPortal","DialogOverlay","backdropTestId","Dialog","cn","side","className","event","showHeader","DialogHeader","title","DialogTitle","children"],"sources":["../../../../../../src/components/Drawer.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from 'radix-ui';\nimport { type ReactNode, useRef } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogHeader, DialogOverlay, DialogPortal, DialogTitle } from './Dialog';\n\nexport interface DrawerProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side: 'left' | 'right';\n title: string;\n children: ReactNode;\n className?: string;\n showHeader?: boolean;\n 'data-testid'?: string;\n backdropTestId?: string;\n}\n\n/** A controlled side panel with a focus trap and restoration for external header buttons. */\nexport function Drawer({\n open,\n onOpenChange,\n side,\n title,\n children,\n className,\n showHeader = true,\n 'data-testid': testId,\n backdropTestId,\n}: DrawerProps) {\n const opener = useRef<HTMLElement | null>(null);\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogPortal>\n <DialogOverlay data-testid={backdropTestId} />\n <DialogPrimitive.Content\n aria-describedby={undefined}\n data-testid={testId}\n className={cn(\n 'fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-
|
|
1
|
+
{"version":3,"file":"Drawer.mjs","names":["Dialog","DialogPrimitive","Dialog$1","Drawer","testId","opener","useRef","DialogPortal","DialogOverlay","backdropTestId","Dialog","cn","side","className","event","showHeader","DialogHeader","title","DialogTitle","children"],"sources":["../../../../../../src/components/Drawer.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from 'radix-ui';\nimport { type ReactNode, useRef } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogHeader, DialogOverlay, DialogPortal, DialogTitle } from './Dialog';\n\nexport interface DrawerProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side: 'left' | 'right';\n title: string;\n children: ReactNode;\n className?: string;\n showHeader?: boolean;\n 'data-testid'?: string;\n backdropTestId?: string;\n}\n\n/** A controlled side panel with a focus trap and restoration for external header buttons. */\nexport function Drawer({\n open,\n onOpenChange,\n side,\n title,\n children,\n className,\n showHeader = true,\n 'data-testid': testId,\n backdropTestId,\n}: DrawerProps) {\n const opener = useRef<HTMLElement | null>(null);\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogPortal>\n <DialogOverlay data-testid={backdropTestId} />\n <DialogPrimitive.Content\n aria-describedby={undefined}\n data-testid={testId}\n className={cn(\n 'fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-po-border bg-po-rail outline-none',\n side === 'left' ? 'left-0 border-r' : 'right-0 border-l',\n className,\n )}\n onOpenAutoFocus={() => {\n opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n }}\n onCloseAutoFocus={(event) => {\n event.preventDefault();\n if (opener.current?.isConnected) opener.current.focus();\n }}\n >\n {showHeader ? (\n <DialogHeader dismissible closeLabel={`hide ${title.toLowerCase()}`}>\n <DialogTitle>{title}</DialogTitle>\n </DialogHeader>\n ) : (\n <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n )}\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n </Dialog>\n );\n}\n"],"mappings":"oQAmBA,SAAgBG,EAAO,CACrB,OACA,eACA,OACA,QACA,WACA,YACA,aAAa,GACb,cAAeC,EACf,kBACc,CACd,IAAMC,EAASC,EAA2B,IAAI,EAC9C,MACE,kBAACN,EAAD,CAAc,OAAoB,eAChC,SAAA,kBAACO,EAAD,CAAA,SAAA,CACE,kBAACC,EAAD,CAAe,cAAaC,CAAiB,CAAA,EAC7C,kBAACR,EAAgB,QAAjB,CACE,mBAAkB,IAAA,GAClB,cAAaG,EACb,UAAWO,EACT,8HACAC,IAAS,OAAS,kBAAoB,mBACtCC,CACF,EACA,oBAAuB,CACrB,EAAO,QAAU,SAAS,yBAAyB,YAAc,SAAS,cAAgB,IAC5F,EACA,iBAAmB,GAAU,CAC3BC,EAAM,eAAe,EACjBT,EAAO,SAAS,aAAaA,EAAO,QAAQ,MAAM,CACxD,EAdF,SAAA,CAgBGU,EACC,kBAACC,EAAD,CAAc,YAAA,GAAY,WAAY,QAAQC,EAAM,YAAY,IAC9D,SAAA,kBAACC,EAAD,CAAA,SAAcD,CAAmB,CAAA,CACrB,CAAA,EAEd,kBAACC,EAAD,CAAa,UAAU,UAAW,SAAAD,CAAmB,CAAA,EAEtDE,CACsB,CACb,CAAA,CAAA,CAAA,CAAA,CACR,CAAA,CAEZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckIcon as e,ChevronRightIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{DropdownMenu as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";function s(e){return/* @__PURE__ */ i(r.Root,{"data-slot":`dropdown-menu`,...e})}function c(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function l(e){return/* @__PURE__ */ i(r.Group,{"data-slot":`dropdown-menu-group`,...e})}const u=`z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-
|
|
1
|
+
import{CheckIcon as e,ChevronRightIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{DropdownMenu as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";function s(e){return/* @__PURE__ */ i(r.Root,{"data-slot":`dropdown-menu`,...e})}function c(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function l(e){return/* @__PURE__ */ i(r.Group,{"data-slot":`dropdown-menu-group`,...e})}const u=`z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-po-border bg-po-panel py-1 shadow-xl outline-none data-[state=open]:animate-po-rise`;function d({className:e,align:t=`end`,sideOffset:a=4,...o}){return/* @__PURE__ */ i(r.Portal,{children:/* @__PURE__ */ i(r.Content,{"data-slot":`dropdown-menu-content`,align:t,sideOffset:a,className:n(u,e),...o})})}const f=o(`flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-base outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-po-deep`,{variants:{variant:{default:`text-po-hi`,destructive:`text-po-red`},indented:{true:`pl-7`,false:``}},defaultVariants:{variant:`default`,indented:!1}});function p({className:e,variant:t,indented:a,...o}){return/* @__PURE__ */ i(r.Item,{"data-slot":`dropdown-menu-item`,"data-variant":t??`default`,className:n(f({variant:t,indented:a}),e),...o})}function m({children:e}){return/* @__PURE__ */ i(`span`,{className:`pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center`,children:/* @__PURE__ */ i(r.ItemIndicator,{children:e})})}function h({className:t,variant:o,children:s,...c}){return/* @__PURE__ */ a(r.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:n(`relative`,f({variant:o,indented:!0}),t),...c,children:[/* @__PURE__ */ i(m,{children:/* @__PURE__ */ i(e,{className:`h-3 w-3 text-po-blue`})}),s]})}function g(e){return/* @__PURE__ */ i(r.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function _({className:e,variant:t,children:o,...s}){return/* @__PURE__ */ a(r.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:n(`relative`,f({variant:t,indented:!0}),e),...s,children:[/* @__PURE__ */ i(m,{children:/* @__PURE__ */ i(`span`,{className:`h-1.5 w-1.5 rounded-full bg-po-blue`})}),o]})}function v(e){return/* @__PURE__ */ i(r.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function y({className:e,children:o,...s}){return/* @__PURE__ */ a(r.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:n(f(),`data-[state=open]:bg-po-deep`,e),...s,children:[/* @__PURE__ */ i(`span`,{className:`min-w-0 flex-1 truncate`,children:o}),/* @__PURE__ */ i(t,{className:`h-3 w-3 shrink-0 text-po-faint`})]})}function b({className:e,sideOffset:t=2,...a}){return/* @__PURE__ */ i(r.Portal,{children:/* @__PURE__ */ i(r.SubContent,{"data-slot":`dropdown-menu-sub-content`,sideOffset:t,className:n(u,e),...a})})}function x({className:e,...t}){return/* @__PURE__ */ i(r.Label,{"data-slot":`dropdown-menu-label`,className:n(`px-2.5 py-1 text-sm font-semibold text-po-dim first-letter:uppercase`,e),...t})}function S({className:e,...t}){return/* @__PURE__ */ i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:n(`ml-auto shrink-0 text-sm text-po-dim`,e),...t})}function C({className:e,...t}){return/* @__PURE__ */ i(r.Separator,{"data-slot":`dropdown-menu-separator`,className:n(`my-1 h-px bg-po-border-soft`,e),...t})}export{s as DropdownMenu,h as DropdownMenuCheckboxItem,d as DropdownMenuContent,l as DropdownMenuGroup,p as DropdownMenuItem,x as DropdownMenuLabel,g as DropdownMenuRadioGroup,_ as DropdownMenuRadioItem,C as DropdownMenuSeparator,S as DropdownMenuShortcut,v as DropdownMenuSub,b as DropdownMenuSubContent,y as DropdownMenuSubTrigger,c as DropdownMenuTrigger,f as dropdownMenuItemVariants};
|
|
2
2
|
//# sourceMappingURL=DropdownMenu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.mjs","names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenu$1","DropdownMenu","props","DropdownMenuTrigger","DropdownMenuGroup","CONTENT_CLASS","DropdownMenuContent","cn","className","dropdownMenuItemVariants","cva","DropdownMenuItem","variant","ItemIndicator","DropdownMenuCheckboxItem","CheckIcon","children","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuLabel","DropdownMenuShortcut","DropdownMenuSeparator"],"sources":["../../../../../../src/components/DropdownMenu.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** shadcn's DropdownMenu on Radix: roving focus, typeahead, outside click, Escape. */\nexport function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/** A run of items under one label, so the separator between groups is structural. */\nexport function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/** The surface every menu and submenu wears. */\nconst CONTENT_CLASS =\n 'z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 shadow-xl outline-none data-[state=open]:animate-doom-rise';\n\nexport function DropdownMenuContent({\n className,\n align = 'end',\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport const dropdownMenuItemVariants = cva(\n 'flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-base outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep',\n {\n variants: {\n variant: {\n default: 'text-doom-hi',\n destructive: 'text-doom-red',\n },\n /** A row that carries a check or bullet keeps a gutter for it, so labels line up whether or not one is set. */\n indented: { true: 'pl-7', false: '' },\n },\n defaultVariants: { variant: 'default', indented: false },\n },\n);\n\nexport interface DropdownMenuItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.Item>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-variant={variant ?? 'default'}\n className={cn(dropdownMenuItemVariants({ variant, indented }), className)}\n {...props}\n />\n );\n}\n\n/** The check or bullet a selectable row shows when it is set; it sits in the row's gutter. */\nfunction ItemIndicator({ children }: { children: ReactNode }) {\n return (\n <span className=\"pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>{children}</DropdownMenuPrimitive.ItemIndicator>\n </span>\n );\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\n/** A row that toggles: the check lives in the gutter so the label never shifts. */\nexport function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <CheckIcon className=\"h-3 w-3 text-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/** The exclusive-choice group; pair it with DropdownMenuRadioItem. */\nexport function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <span className=\"h-1.5 w-1.5 rounded-full bg-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/** The row that opens a submenu; the chevron is part of the row, not the caller's job. */\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger>) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownMenuItemVariants(), 'data-[state=open]:bg-doom-deep', className)}\n {...props}\n >\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronRightIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nexport function DropdownMenuSubContent({\n className,\n sideOffset = 2,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n className={cn('px-2.5 py-1 text-sm font-semibold text-doom-dim first-letter:uppercase', className)}\n {...props}\n />\n );\n}\n\n/** The keystroke printed at the right of a row; the row supplies the gap. */\nexport function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('ml-auto shrink-0 text-sm text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('my-1 h-px bg-doom-border-soft', className)}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.mjs","names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenu$1","DropdownMenu","props","DropdownMenuTrigger","DropdownMenuGroup","CONTENT_CLASS","DropdownMenuContent","cn","className","dropdownMenuItemVariants","cva","DropdownMenuItem","variant","ItemIndicator","DropdownMenuCheckboxItem","CheckIcon","children","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuLabel","DropdownMenuShortcut","DropdownMenuSeparator"],"sources":["../../../../../../src/components/DropdownMenu.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** shadcn's DropdownMenu on Radix: roving focus, typeahead, outside click, Escape. */\nexport function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/** A run of items under one label, so the separator between groups is structural. */\nexport function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/** The surface every menu and submenu wears. */\nconst CONTENT_CLASS =\n 'z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-po-border bg-po-panel py-1 shadow-xl outline-none data-[state=open]:animate-po-rise';\n\nexport function DropdownMenuContent({\n className,\n align = 'end',\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport const dropdownMenuItemVariants = cva(\n 'flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-base outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-po-deep',\n {\n variants: {\n variant: {\n default: 'text-po-hi',\n destructive: 'text-po-red',\n },\n /** A row that carries a check or bullet keeps a gutter for it, so labels line up whether or not one is set. */\n indented: { true: 'pl-7', false: '' },\n },\n defaultVariants: { variant: 'default', indented: false },\n },\n);\n\nexport interface DropdownMenuItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.Item>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-variant={variant ?? 'default'}\n className={cn(dropdownMenuItemVariants({ variant, indented }), className)}\n {...props}\n />\n );\n}\n\n/** The check or bullet a selectable row shows when it is set; it sits in the row's gutter. */\nfunction ItemIndicator({ children }: { children: ReactNode }) {\n return (\n <span className=\"pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>{children}</DropdownMenuPrimitive.ItemIndicator>\n </span>\n );\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\n/** A row that toggles: the check lives in the gutter so the label never shifts. */\nexport function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <CheckIcon className=\"h-3 w-3 text-po-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/** The exclusive-choice group; pair it with DropdownMenuRadioItem. */\nexport function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <span className=\"h-1.5 w-1.5 rounded-full bg-po-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/** The row that opens a submenu; the chevron is part of the row, not the caller's job. */\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger>) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownMenuItemVariants(), 'data-[state=open]:bg-po-deep', className)}\n {...props}\n >\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronRightIcon className=\"h-3 w-3 shrink-0 text-po-faint\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nexport function DropdownMenuSubContent({\n className,\n sideOffset = 2,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n className={cn('px-2.5 py-1 text-sm font-semibold text-po-dim first-letter:uppercase', className)}\n {...props}\n />\n );\n}\n\n/** The keystroke printed at the right of a row; the row supplies the gap. */\nexport function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('ml-auto shrink-0 text-sm text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('my-1 h-px bg-po-border-soft', className)}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({title:i,description:a,children:o,className:s,asChild:c=!1,...l}){let u=c?t.Root:`div`;return/* @__PURE__ */ n(u,{"data-slot":`empty-state`,className:e(`flex min-w-0 flex-1 items-center justify-center px-3 py-4 sm:px-4`,s),...l,children:/* @__PURE__ */ r(`div`,{className:`flex min-w-0 w-full max-w-[520px] flex-col items-center gap-3 text-center`,children:[/* @__PURE__ */ n(`span`,{className:`text-lg font-semibold text-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({title:i,description:a,children:o,className:s,asChild:c=!1,...l}){let u=c?t.Root:`div`;return/* @__PURE__ */ n(u,{"data-slot":`empty-state`,className:e(`flex min-w-0 flex-1 items-center justify-center px-3 py-4 sm:px-4`,s),...l,children:/* @__PURE__ */ r(`div`,{className:`flex min-w-0 w-full max-w-[520px] flex-col items-center gap-3 text-center`,children:[/* @__PURE__ */ n(`span`,{className:`text-lg font-semibold text-po-hi`,children:i}),a?/* @__PURE__ */ n(`span`,{className:`text-base leading-relaxed text-po-dim`,children:a}):null,o]})})}export{i as EmptyState};
|
|
2
2
|
//# sourceMappingURL=EmptyState.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.mjs","names":["EmptyState","props","Component","asChild","Slot","cn","className","title","description","children"],"sources":["../../../../../../src/components/EmptyState.tsx"],"sourcesContent":["import { Slot } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Optional calls to action under the copy. */\n children?: ReactNode;\n /**\n * Render the child element instead of a <div>, so an empty row inside a\n * list stays an <li> and the list keeps its semantics.\n */\n asChild?: boolean;\n}\n\n/** The centred \"nothing here yet\" card every empty panel shares. */\nexport function EmptyState({ title, description, children, className, asChild = false, ...props }: EmptyStateProps) {\n const Component = asChild ? Slot.Root : 'div';\n return (\n <Component\n data-slot=\"empty-state\"\n className={cn('flex min-w-0 flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 w-full max-w-[520px] flex-col items-center gap-3 text-center\">\n <span className=\"text-lg font-semibold text-
|
|
1
|
+
{"version":3,"file":"EmptyState.mjs","names":["EmptyState","props","Component","asChild","Slot","cn","className","title","description","children"],"sources":["../../../../../../src/components/EmptyState.tsx"],"sourcesContent":["import { Slot } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Optional calls to action under the copy. */\n children?: ReactNode;\n /**\n * Render the child element instead of a <div>, so an empty row inside a\n * list stays an <li> and the list keeps its semantics.\n */\n asChild?: boolean;\n}\n\n/** The centred \"nothing here yet\" card every empty panel shares. */\nexport function EmptyState({ title, description, children, className, asChild = false, ...props }: EmptyStateProps) {\n const Component = asChild ? Slot.Root : 'div';\n return (\n <Component\n data-slot=\"empty-state\"\n className={cn('flex min-w-0 flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 w-full max-w-[520px] flex-col items-center gap-3 text-center\">\n <span className=\"text-lg font-semibold text-po-hi\">{title}</span>\n {description ? <span className=\"text-base leading-relaxed text-po-dim\">{description}</span> : null}\n {children}\n </div>\n </Component>\n );\n}\n"],"mappings":"qHAkBA,SAAgBA,EAAW,CAAE,QAAO,cAAa,WAAU,YAAW,UAAU,GAAO,GAAGC,GAA0B,CAClH,IAAMC,EAAYC,EAAUC,EAAK,KAAO,MACxC,MACE,kBAACF,EAAD,CACE,YAAU,cACV,UAAWG,EAAG,oEAAqEC,CAAS,EAC5F,GAAIL,EAEJ,SAAA,kBAAC,MAAD,CAAK,UAAU,4EAAf,SAAA,CACE,kBAAC,OAAD,CAAM,UAAU,mCAAoC,SAAAM,CAAY,CAAA,EAC/DC,EAAc,kBAAC,OAAD,CAAM,UAAU,wCAAyC,SAAAA,CAAkB,CAAA,EAAI,KAC7FC,CACE,GACI,CAAA,CAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{detectGrammar as t,highlightToLines as n}from"../lib/syntaxHighlight.mjs";import{SyntaxLine as r}from"./SyntaxText.mjs";import{hashlineGroups as i,hashlineGroupsKey as a}from"../lib/hashlineHighlight.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useEffect as c,useMemo as l,useState as u}from"react";const d=/* @__PURE__ */ new Map;function f(e){let r=a(e),[i,o]=u(void 0);return c(()=>{let i=!0,a=/* @__PURE__ */ new Map,s=e.map(async e=>{let r=t({path:e.path,text:e.text});if(r===void 0)return;let i=await n(e.text,r);if(i!==void 0)for(let[t,n]of e.indices.entries()){let e=i[t];e!==void 0&&a.set(n,e)}});return Promise.allSettled(s).then(()=>{i&&a.size>0&&o({key:r,spans:a})}),()=>{i=!1}},[r]),i?.key===r?i.spans:d}function p({className:t,lines:n,gutter:a,path:c,...u}){let d=f(l(()=>i(n,c),[n,c])),p={width:`${a}ch`};return/* @__PURE__ */ o(`div`,{"data-slot":`hashline-lines`,className:e(`flex flex-col font-mono`,t),...u,children:n.map((e,t)=>{if(e.type===`file`)return/* @__PURE__ */ o(`span`,{className:`mt-1 truncate text-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{detectGrammar as t,highlightToLines as n}from"../lib/syntaxHighlight.mjs";import{SyntaxLine as r}from"./SyntaxText.mjs";import{hashlineGroups as i,hashlineGroupsKey as a}from"../lib/hashlineHighlight.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useEffect as c,useMemo as l,useState as u}from"react";const d=/* @__PURE__ */ new Map;function f(e){let r=a(e),[i,o]=u(void 0);return c(()=>{let i=!0,a=/* @__PURE__ */ new Map,s=e.map(async e=>{let r=t({path:e.path,text:e.text});if(r===void 0)return;let i=await n(e.text,r);if(i!==void 0)for(let[t,n]of e.indices.entries()){let e=i[t];e!==void 0&&a.set(n,e)}});return Promise.allSettled(s).then(()=>{i&&a.size>0&&o({key:r,spans:a})}),()=>{i=!1}},[r]),i?.key===r?i.spans:d}function p({className:t,lines:n,gutter:a,path:c,...u}){let d=f(l(()=>i(n,c),[n,c])),p={width:`${a}ch`};return/* @__PURE__ */ o(`div`,{"data-slot":`hashline-lines`,className:e(`flex flex-col font-mono`,t),...u,children:n.map((e,t)=>{if(e.type===`file`)return/* @__PURE__ */ o(`span`,{className:`mt-1 truncate text-po-faint first:mt-0`,children:e.path},t);if(e.type===`plain`)return/* @__PURE__ */ o(`span`,{className:`whitespace-pre-wrap break-words text-po-dim`,children:e.text},t);let{value:n}=e;return/* @__PURE__ */ s(`span`,{className:`flex gap-2`,children:[n.marker===void 0?null:/* @__PURE__ */ o(`span`,{className:`w-4 shrink-0 ${n.marker===`match`?`text-po-blue`:`text-po-faint`}`,children:n.marker===`match`?`>>`:``}),/* @__PURE__ */ o(`span`,{className:`shrink-0 text-right text-po-faint`,style:p,children:n.line}),/* @__PURE__ */ o(r,{spans:d.get(t),text:n.content,className:`min-w-0 whitespace-pre-wrap break-words ${n.marker===`match`?`text-po-hi`:`text-po-text`}`})]},t)})})}export{p as HashlineLines};
|
|
2
2
|
//# sourceMappingURL=HashlineLines.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashlineLines.mjs","names":["NO_SPANS","useHashlineSpans","key","hashlineGroupsKey","groups","done","setDone","useState","useEffect","live","next","work","grammar","detectGrammar","group","highlighted","highlightToLines","offset","index","line","HashlineLines","props","spans","useMemo","hashlineGroups","lines","path","gutterStyle","gutter","cn","className","value","SyntaxLine"],"sources":["../../../../../../src/components/HashlineLines.tsx"],"sourcesContent":["import { type ComponentProps, useEffect, useMemo, useState } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { type HashlineGroup, hashlineGroups, hashlineGroupsKey } from '../lib/hashlineHighlight';\nimport type { PresentedLine } from '../lib/hashlineView';\nimport { detectGrammar, highlightToLines, type SyntaxSpan } from '../lib/syntaxHighlight';\nimport { SyntaxLine } from './SyntaxText';\n\n/**\n * The anchored body shared by hashline results: a file heading per group, a\n * right-aligned line-number gutter, and a `>>` marker on grep matches. The\n * gutter width is a style, not a class, because it follows the widest number.\n *\n * The anchored lines are coloured with the editor's grammars when the body\n * names a file, or when `path` names one for a result that does not. Colour\n * arrives a frame or two late and never blocks the text: an unhighlighted body\n * is the same body without the colours.\n */\nexport interface HashlineLinesProps extends ComponentProps<'div'> {\n lines: readonly PresentedLine[];\n /** Width of the line-number column, in characters, from `hashlineBody`. */\n gutter: number;\n /** The file a body of bare anchored lines came from, for highlighting. */\n path?: string | undefined;\n}\n\nconst NO_SPANS: ReadonlyMap<number, readonly SyntaxSpan[]> = new Map();\n\n/**\n * Spans per presented-line index, once every file's run has parsed. The result\n * is stored with the body it belongs to, so a body that has changed since\n * reads as plain rather than wearing the previous body's colours.\n */\nfunction useHashlineSpans(groups: readonly HashlineGroup[]): ReadonlyMap<number, readonly SyntaxSpan[]> {\n const key = hashlineGroupsKey(groups);\n const [done, setDone] = useState<{ key: string; spans: ReadonlyMap<number, readonly SyntaxSpan[]> } | undefined>(\n undefined,\n );\n\n useEffect(() => {\n let live = true;\n const next = new Map<number, readonly SyntaxSpan[]>();\n const work = groups.map(async (group) => {\n const grammar = detectGrammar({ path: group.path, text: group.text });\n if (grammar === undefined) return;\n const highlighted = await highlightToLines(group.text, grammar);\n if (highlighted === undefined) return;\n for (const [offset, index] of group.indices.entries()) {\n const line = highlighted[offset];\n if (line !== undefined) next.set(index, line);\n }\n });\n // One state write for the whole body, so a many-file grep result does not\n // repaint once per file. A grammar that fails to load leaves its run plain.\n void Promise.allSettled(work).then(() => {\n if (live && next.size > 0) setDone({ key, spans: next });\n });\n return () => {\n live = false;\n };\n // The groups are rebuilt every render; their key is what actually changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return done?.key === key ? done.spans : NO_SPANS;\n}\n\nexport function HashlineLines({ className, lines, gutter, path, ...props }: HashlineLinesProps) {\n const groups = useMemo(() => hashlineGroups(lines, path), [lines, path]);\n const spans = useHashlineSpans(groups);\n // Bound to a name rather than written inline: this file ships as a scaffold\n // template too, and an inline style object opens with the same two braces\n // Liquid reads as an output tag, which fails to render.\n const gutterStyle = { width: `${gutter}ch` };\n return (\n <div data-slot=\"hashline-lines\" className={cn('flex flex-col font-mono', className)} {...props}>\n {lines.map((line, index) => {\n if (line.type === 'file') {\n return (\n <span key={index} className=\"mt-1 truncate text-
|
|
1
|
+
{"version":3,"file":"HashlineLines.mjs","names":["NO_SPANS","useHashlineSpans","key","hashlineGroupsKey","groups","done","setDone","useState","useEffect","live","next","work","grammar","detectGrammar","group","highlighted","highlightToLines","offset","index","line","HashlineLines","props","spans","useMemo","hashlineGroups","lines","path","gutterStyle","gutter","cn","className","value","SyntaxLine"],"sources":["../../../../../../src/components/HashlineLines.tsx"],"sourcesContent":["import { type ComponentProps, useEffect, useMemo, useState } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { type HashlineGroup, hashlineGroups, hashlineGroupsKey } from '../lib/hashlineHighlight';\nimport type { PresentedLine } from '../lib/hashlineView';\nimport { detectGrammar, highlightToLines, type SyntaxSpan } from '../lib/syntaxHighlight';\nimport { SyntaxLine } from './SyntaxText';\n\n/**\n * The anchored body shared by hashline results: a file heading per group, a\n * right-aligned line-number gutter, and a `>>` marker on grep matches. The\n * gutter width is a style, not a class, because it follows the widest number.\n *\n * The anchored lines are coloured with the editor's grammars when the body\n * names a file, or when `path` names one for a result that does not. Colour\n * arrives a frame or two late and never blocks the text: an unhighlighted body\n * is the same body without the colours.\n */\nexport interface HashlineLinesProps extends ComponentProps<'div'> {\n lines: readonly PresentedLine[];\n /** Width of the line-number column, in characters, from `hashlineBody`. */\n gutter: number;\n /** The file a body of bare anchored lines came from, for highlighting. */\n path?: string | undefined;\n}\n\nconst NO_SPANS: ReadonlyMap<number, readonly SyntaxSpan[]> = new Map();\n\n/**\n * Spans per presented-line index, once every file's run has parsed. The result\n * is stored with the body it belongs to, so a body that has changed since\n * reads as plain rather than wearing the previous body's colours.\n */\nfunction useHashlineSpans(groups: readonly HashlineGroup[]): ReadonlyMap<number, readonly SyntaxSpan[]> {\n const key = hashlineGroupsKey(groups);\n const [done, setDone] = useState<{ key: string; spans: ReadonlyMap<number, readonly SyntaxSpan[]> } | undefined>(\n undefined,\n );\n\n useEffect(() => {\n let live = true;\n const next = new Map<number, readonly SyntaxSpan[]>();\n const work = groups.map(async (group) => {\n const grammar = detectGrammar({ path: group.path, text: group.text });\n if (grammar === undefined) return;\n const highlighted = await highlightToLines(group.text, grammar);\n if (highlighted === undefined) return;\n for (const [offset, index] of group.indices.entries()) {\n const line = highlighted[offset];\n if (line !== undefined) next.set(index, line);\n }\n });\n // One state write for the whole body, so a many-file grep result does not\n // repaint once per file. A grammar that fails to load leaves its run plain.\n void Promise.allSettled(work).then(() => {\n if (live && next.size > 0) setDone({ key, spans: next });\n });\n return () => {\n live = false;\n };\n // The groups are rebuilt every render; their key is what actually changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return done?.key === key ? done.spans : NO_SPANS;\n}\n\nexport function HashlineLines({ className, lines, gutter, path, ...props }: HashlineLinesProps) {\n const groups = useMemo(() => hashlineGroups(lines, path), [lines, path]);\n const spans = useHashlineSpans(groups);\n // Bound to a name rather than written inline: this file ships as a scaffold\n // template too, and an inline style object opens with the same two braces\n // Liquid reads as an output tag, which fails to render.\n const gutterStyle = { width: `${gutter}ch` };\n return (\n <div data-slot=\"hashline-lines\" className={cn('flex flex-col font-mono', className)} {...props}>\n {lines.map((line, index) => {\n if (line.type === 'file') {\n return (\n <span key={index} className=\"mt-1 truncate text-po-faint first:mt-0\">\n {line.path}\n </span>\n );\n }\n if (line.type === 'plain') {\n return (\n <span key={index} className=\"whitespace-pre-wrap break-words text-po-dim\">\n {line.text}\n </span>\n );\n }\n const { value } = line;\n return (\n <span key={index} className=\"flex gap-2\">\n {value.marker !== undefined ? (\n <span className={`w-4 shrink-0 ${value.marker === 'match' ? 'text-po-blue' : 'text-po-faint'}`}>\n {value.marker === 'match' ? '>>' : ''}\n </span>\n ) : null}\n <span className=\"shrink-0 text-right text-po-faint\" style={gutterStyle}>\n {value.line}\n </span>\n <SyntaxLine\n spans={spans.get(index)}\n text={value.content}\n className={`min-w-0 whitespace-pre-wrap break-words ${value.marker === 'match' ? 'text-po-hi' : 'text-po-text'}`}\n />\n </span>\n );\n })}\n </div>\n );\n}\n"],"mappings":"sWA0BA,MAAMA,kBAAuD,IAAI,IAOjE,SAASC,EAAiB,EAA8E,CACtG,IAAMC,EAAMC,EAAkBC,CAAM,EAC9B,CAACC,EAAMC,GAAWC,EACtB,IAAA,EACF,EA2BA,OAzBAC,MAAgB,CACd,IAAIC,EAAO,GACLC,kBAAO,IAAI,IACXC,EAAOP,EAAO,IAAI,KAAO,IAAU,CACvC,IAAMQ,EAAUC,EAAc,CAAE,KAAMC,EAAM,KAAM,KAAMA,EAAM,IAAK,CAAC,EACpE,GAAIF,IAAY,IAAA,GAAW,OAC3B,IAAMG,EAAc,MAAMC,EAAiBF,EAAM,KAAMF,CAAO,EAC9D,GAAIG,IAAgB,IAAA,GACpB,IAAK,GAAM,CAACE,EAAQC,KAAUJ,EAAM,QAAQ,QAAQ,EAAG,CACrD,IAAMK,EAAOJ,EAAYE,GACrBE,IAAS,IAAA,IAAWT,EAAK,IAAIQ,EAAOC,CAAI,CAC9C,CACF,CAAC,EAMD,OAHA,QAAa,WAAWR,CAAI,CAAC,CAAC,SAAW,CACnCF,GAAQC,EAAK,KAAO,GAAGJ,EAAQ,CAAE,MAAK,MAAOI,CAAK,CAAC,CACzD,CAAC,MACY,CACX,EAAO,EACT,CAGF,EAAG,CAACR,CAAG,CAAC,EAEDG,GAAM,MAAQH,EAAMG,EAAK,MAAQL,CAC1C,CAEA,SAAgBoB,EAAc,CAAE,YAAW,QAAO,SAAQ,OAAM,GAAGC,GAA6B,CAE9F,IAAMC,EAAQrB,EADCsB,MAAcC,EAAeC,EAAOC,CAAI,EAAG,CAACD,EAAOC,CAAI,CAClC,CAAC,EAI/BC,EAAc,CAAE,MAAO,GAAGC,EAAO,GAAI,EAC3C,MACE,kBAAC,MAAD,CAAK,YAAU,iBAAiB,UAAWC,EAAG,0BAA2BC,CAAS,EAAG,GAAIT,EACtF,SAAAI,EAAM,KAAK,EAAM,IAAU,CAC1B,GAAIN,EAAK,OAAS,OAChB,MACE,kBAAC,OAAD,CAAkB,UAAU,yCACzB,SAAAA,EAAK,IACF,EAFKD,CAEL,EAGV,GAAIC,EAAK,OAAS,QAChB,MACE,kBAAC,OAAD,CAAkB,UAAU,8CACzB,SAAAA,EAAK,IACF,EAFKD,CAEL,EAGV,GAAM,CAAE,SAAUC,EAClB,MACE,kBAAC,OAAD,CAAkB,UAAU,aAA5B,SAAA,CACGY,EAAM,SAAW,IAAA,GAId,KAHF,kBAAC,OAAD,CAAM,UAAW,gBAAgBA,EAAM,SAAW,QAAU,eAAiB,kBAC1E,SAAAA,EAAM,SAAW,QAAU,KAAO,EAC/B,CAAA,EAER,kBAAC,OAAD,CAAM,UAAU,oCAAoC,MAAOJ,EACxD,SAAAI,EAAM,IACH,CAAA,EACN,kBAACC,EAAD,CACE,MAAOV,EAAM,IAAIJ,CAAK,EACtB,KAAMa,EAAM,QACZ,UAAW,2CAA2CA,EAAM,SAAW,QAAU,aAAe,gBACjG,CAAA,CACG,CAdK,EAAAb,CAcL,CAEV,CAAC,CACE,CAAA,CAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`min-w-0 text-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`min-w-0 text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red`,{variants:{variant:{default:`rounded border border-po-border bg-po-deep transition-colors focus:border-po-green/60`,bare:`border-0 bg-transparent`},size:{xs:`min-h-6 px-1.5 py-0.5 text-sm`,sm:`min-h-7 px-2 py-1 text-sm`,md:`min-h-8 px-2.5 py-1.5 text-base`,lg:`min-h-9 px-3 py-1.5 text-base`}},compoundVariants:[{variant:`bare`,class:`min-h-0 p-0`}],defaultVariants:{variant:`default`,size:`md`}});function i({className:n,type:i,variant:a,size:o,...s}){return/* @__PURE__ */ t(`input`,{type:i??`text`,"data-slot":`input`,spellCheck:!1,className:e(r({variant:a,size:o}),n),...s})}export{i as Input,r as fieldVariants};
|
|
2
2
|
//# sourceMappingURL=Input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.mjs","names":["fieldVariants","cva","Input","props","type","cn","className"],"sources":["../../../../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 text-
|
|
1
|
+
{"version":3,"file":"Input.mjs","names":["fieldVariants","cva","Input","props","type","cn","className"],"sources":["../../../../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red',\n {\n variants: {\n variant: {\n default: 'rounded border border-po-border bg-po-deep transition-colors focus:border-po-green/60',\n /** No well: a composer or a palette search that draws its own surface. */\n bare: 'border-0 bg-transparent',\n },\n /** The same rungs Button names, so a field and the button beside it line up. */\n size: {\n xs: 'min-h-6 px-1.5 py-0.5 text-sm',\n sm: 'min-h-7 px-2 py-1 text-sm',\n md: 'min-h-8 px-2.5 py-1.5 text-base',\n lg: 'min-h-9 px-3 py-1.5 text-base',\n },\n },\n compoundVariants: [\n // A bare field sits inside a surface that already has its own padding,\n // so it keeps the size's type ramp and gives up the size's box.\n { variant: 'bare', class: 'min-h-0 p-0' },\n ],\n defaultVariants: { variant: 'default', size: 'md' },\n },\n);\n\nexport type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;\nexport type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;\n\nexport interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}\n\n/** The one text field: deep well, quiet border, accent border on focus, red edge when invalid. */\nexport function Input({ className, type, variant, size, ...props }: InputProps) {\n return (\n <input\n type={type ?? 'text'}\n data-slot=\"input\"\n spellCheck={false}\n className={cn(fieldVariants({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"0HAUA,MAAaA,EAAgBC,EAC3B,yIACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,wFAET,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,gCACJ,GAAI,4BACJ,GAAI,kCACJ,GAAI,+BACN,CACF,EACA,iBAAkB,CAGhB,CAAE,QAAS,OAAQ,MAAO,aAAc,CAC1C,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAQA,SAAgBC,EAAM,CAAE,YAAW,OAAM,UAAS,OAAM,GAAGC,GAAqB,CAC9E,MACE,kBAAC,QAAD,CACE,KAAMC,GAAQ,OACd,YAAU,QACV,WAAY,GACZ,UAAWC,EAAGL,EAAc,CAAE,UAAS,MAAK,CAAC,EAAGM,CAAS,EACzD,GAAIH,CACL,CAAA,CAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";function n({className:n,...r}){return/* @__PURE__ */ t(`kbd`,{"data-slot":`kbd`,className:e(`inline-flex items-center rounded bg-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";function n({className:n,...r}){return/* @__PURE__ */ t(`kbd`,{"data-slot":`kbd`,className:e(`inline-flex items-center rounded bg-po-deep px-1.5 py-0.5 font-mono text-xs font-medium text-po-dim`,n),...r})}export{n as Kbd};
|
|
2
2
|
//# sourceMappingURL=Kbd.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kbd.mjs","names":["Kbd","props","cn","className"],"sources":["../../../../../../src/components/Kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** A key or key path, drawn as the leader hints draw them. */\nexport function Kbd({ className, ...props }: ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex items-center rounded bg-
|
|
1
|
+
{"version":3,"file":"Kbd.mjs","names":["Kbd","props","cn","className"],"sources":["../../../../../../src/components/Kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** A key or key path, drawn as the leader hints draw them. */\nexport function Kbd({ className, ...props }: ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex items-center rounded bg-po-deep px-1.5 py-0.5 font-mono text-xs font-medium text-po-dim',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"2EAKA,SAAgBA,EAAI,CAAE,YAAW,GAAGC,GAAgC,CAClE,MACE,kBAAC,MAAD,CACE,YAAU,MACV,UAAWC,EACT,sGACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-1.5 text-base font-medium text-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-1.5 text-base font-medium text-po-text select-none has-[+:disabled]:opacity-50`,r),...i})}export{r as Label};
|
|
2
2
|
//# sourceMappingURL=Label.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.mjs","names":["Label","LabelPrimitive","Label$1","props","Label","cn","className"],"sources":["../../../../../../src/components/Label.tsx"],"sourcesContent":["import { Label as LabelPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** A field's name: clicking it focuses the control, which a bare span never does. */\nexport function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-1.5 text-base font-medium text-
|
|
1
|
+
{"version":3,"file":"Label.mjs","names":["Label","LabelPrimitive","Label$1","props","Label","cn","className"],"sources":["../../../../../../src/components/Label.tsx"],"sourcesContent":["import { Label as LabelPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** A field's name: clicking it focuses the control, which a bare span never does. */\nexport function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-1.5 text-base font-medium text-po-text select-none has-[+:disabled]:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"4GAMA,SAAgBA,EAAM,CAAE,YAAW,GAAGG,GAAqD,CACzF,MACE,kBAACF,EAAe,KAAhB,CACE,YAAU,QACV,UAAWI,EACT,uGACAC,CACF,EACA,GAAIH,CACL,CAAA,CAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../../../../src/components/Markdown.tsx"],"mappings":";;;;;;;;;YA4BY,mBAAmB,cAAc;KAUxC,eAAe,iBAAiB;EAAU;EAAa;;;
|
|
1
|
+
{"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../../../../src/components/Markdown.tsx"],"mappings":";;;;;;;;;YA4BY,mBAAmB,cAAc;KAUxC,eAAe,iBAAiB;EAAU;EAAa;;;wBAoL5C,WACd,MACA,YACA;EAEA;EACA,aAAa;EACb,YAAY;oBACb,IAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{CodeBlock as e}from"./CodeBlock.mjs";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{createContext as r,isValidElement as i,useContext as a,useEffect as o,useState as s}from"react";import c from"react-markdown";import l from"remark-gfm";const u=[l],d=`rounded bg-
|
|
2
|
-
`)?n:void 0,s=o===void 0||e!==void 0?void 0:i?.(o);return s!==void 0&&o!==void 0?/* @__PURE__ */ t(`button`,{type:`button`,"data-testid":`markdown-file-link`,title:`open ${o}`,onClick:s,className:`${d} cursor-pointer underline decoration-
|
|
1
|
+
import{CodeBlock as e}from"./CodeBlock.mjs";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{createContext as r,isValidElement as i,useContext as a,useEffect as o,useState as s}from"react";import c from"react-markdown";import l from"remark-gfm";const u=[l],d=`rounded bg-po-deep px-1 py-px font-mono text-po-green`,f=r(void 0),p=r(void 0);function m({src:e,alt:r}){let i=a(p),c;if(typeof e==`string`&&e!==``&&!/^(?:[a-z][a-z\d+.-]*:|\/\/|#|\?)/i.test(e))try{c=decodeURIComponent(e.split(/[?#]/,1)[0])}catch{c=``}let[l,u]=s();o(()=>{if(i===void 0||c===void 0)return;let e=!0,t;return Promise.resolve().then(()=>{if(e&&u(void 0),c===``)throw Error(`Invalid image path.`);return i(c)}).then(n=>{e?(t=n,u({path:c,loader:i,url:n.url})):n.dispose()}).catch(()=>{e&&u({path:c,loader:i,failed:!0})}),()=>{e=!1,t?.dispose()}},[c,i]);let d=l?.path===c&&l?.loader===i?l:void 0;return i!==void 0&&c!==void 0&&(d?.url===void 0||d.failed)?/* @__PURE__ */ n(`span`,{role:d?.failed?`alert`:`status`,title:c,children:[r||c||`Image`,` (`,d?.failed?`unavailable`:`loading...`,`)`]}):/* @__PURE__ */ t(`img`,{src:i!==void 0&&c!==void 0?d?.url:e,alt:r??``,onError:i!==void 0&&c!==void 0?()=>u({path:c,loader:i,failed:!0}):void 0,className:`max-h-[480px] max-w-full rounded border border-po-border`})}function h({className:e,children:n,...r}){let i=a(f),o=typeof n==`string`&&!n.includes(`
|
|
2
|
+
`)?n:void 0,s=o===void 0||e!==void 0?void 0:i?.(o);return s!==void 0&&o!==void 0?/* @__PURE__ */ t(`button`,{type:`button`,"data-testid":`markdown-file-link`,title:`open ${o}`,onClick:s,className:`${d} cursor-pointer underline decoration-po-green/40 underline-offset-2 hover:text-po-hi hover:decoration-po-hi`,children:o}):/* @__PURE__ */ t(`code`,{...r,className:`${e??``} ${d} [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-po-hi`,children:n})}function g({href:e,children:n}){let r=a(f),i=e;try{i=e===void 0?void 0:decodeURIComponent(e)}catch{i=void 0}let o=i!==void 0&&i!==``&&!/^(?:[a-z][a-z\d+.-]*:|\/\/|#|\?)/i.test(i)?r?.(i,!0):void 0;return o===void 0?/* @__PURE__ */ t(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-po-blue underline decoration-po-blue/50`,children:n}):/* @__PURE__ */ t(`button`,{type:`button`,"data-testid":`markdown-file-link`,title:`open ${i}`,onClick:o,className:`text-po-blue underline decoration-po-blue/50`,children:n})}function _(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>_(e)).join(``):``}function v({children:n}){let r=i(n)?n:void 0;return r===void 0?/* @__PURE__ */ t(`pre`,{className:`overflow-x-auto rounded border border-po-border bg-po-deep p-2.5 text-sm leading-relaxed`,children:n}):/* @__PURE__ */ t(e,{text:_(r.props.children).replace(/\n$/,``),className:r.props.className})}const y={p:({children:e})=>/* @__PURE__ */ t(`p`,{className:`whitespace-pre-wrap break-words`,children:e}),strong:({children:e})=>/* @__PURE__ */ t(`strong`,{className:`font-semibold text-po-hi`,children:e}),em:({children:e})=>/* @__PURE__ */ t(`em`,{className:`italic`,children:e}),del:({children:e})=>/* @__PURE__ */ t(`del`,{className:`text-po-dim line-through`,children:e}),a:g,code:h,pre:v,ul:({children:e})=>/* @__PURE__ */ t(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>/* @__PURE__ */ t(`ol`,{className:`list-decimal pl-5`,children:e}),li:({children:e})=>/* @__PURE__ */ t(`li`,{className:`whitespace-pre-wrap break-words`,children:e}),h1:({children:e})=>/* @__PURE__ */ t(`h1`,{className:`mt-2 text-2xl font-semibold text-po-hi first:mt-0`,children:e}),h2:({children:e})=>/* @__PURE__ */ t(`h2`,{className:`mt-2 text-xl font-semibold text-po-hi first:mt-0`,children:e}),h3:({children:e})=>/* @__PURE__ */ t(`h3`,{className:`mt-1 text-lg font-semibold text-po-hi first:mt-0`,children:e}),h4:({children:e})=>/* @__PURE__ */ t(`h4`,{className:`font-semibold text-po-hi`,children:e}),h5:({children:e})=>/* @__PURE__ */ t(`h5`,{className:`font-semibold text-po-text`,children:e}),h6:({children:e})=>/* @__PURE__ */ t(`h6`,{className:`font-semibold text-po-dim`,children:e}),blockquote:({children:e})=>/* @__PURE__ */ t(`blockquote`,{className:`border-l-2 border-po-border pl-3 text-po-dim`,children:e}),hr:()=>/* @__PURE__ */ t(`hr`,{className:`border-po-border-soft`}),table:({children:e})=>/* @__PURE__ */ t(`div`,{className:`overflow-x-auto`,children:/* @__PURE__ */ t(`table`,{className:`border-collapse`,children:e})}),th:({children:e})=>/* @__PURE__ */ t(`th`,{className:`border border-po-border bg-po-deep px-2 py-1 text-left font-semibold text-po-hi`,children:e}),td:({children:e})=>/* @__PURE__ */ t(`td`,{className:`border border-po-border px-2 py-1 align-top`,children:e}),img:m};function b({text:e,onFileLink:n,loadImage:r}){return/* @__PURE__ */ t(f.Provider,{value:n,children:/* @__PURE__ */ t(p.Provider,{value:r,children:/* @__PURE__ */ t(`div`,{className:`flex min-w-0 flex-col gap-2`,children:/* @__PURE__ */ t(c,{remarkPlugins:u,components:y,children:e})})})})}export{b as Markdown};
|
|
3
3
|
//# sourceMappingURL=Markdown.mjs.map
|