@metamorph-labs/polymorph-vue-ui 1.0.16 → 1.0.17
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/CHANGELOG.md +134 -0
- package/dist/ai/ArtifactPane.js.map +1 -1
- package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/archetypes/MasterDetailPage.js.map +1 -1
- package/dist/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/archetypes/app-shell.css +1 -1
- package/dist/archetypes/app-shell.module.js +2 -2
- package/dist/archetypes/app-shell.module.js.map +1 -1
- package/dist/controls/RichTextInput.js +7 -0
- package/dist/controls/RichTextInput.js.map +1 -0
- package/dist/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js +1123 -0
- package/dist/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/controls/rich-text-input.css +1 -0
- package/dist/controls/rich-text-input.module.js +47 -0
- package/dist/controls/rich-text-input.module.js.map +1 -0
- package/dist/controls/selection-bar.css +1 -0
- package/dist/controls/selection-bar.module.js +11 -0
- package/dist/controls/selection-bar.module.js.map +1 -0
- package/dist/index.js +41 -39
- package/dist/index.js.map +1 -1
- package/dist/node/ai/ArtifactPane.js.map +1 -1
- package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/archetypes/MasterDetailPage.js.map +1 -1
- package/dist/node/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/archetypes/app-shell.module.js +2 -2
- package/dist/node/archetypes/app-shell.module.js.map +1 -1
- package/dist/node/controls/RichTextInput.js +7 -0
- package/dist/node/controls/RichTextInput.js.map +1 -0
- package/dist/node/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js +1123 -0
- package/dist/node/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/node/controls/rich-text-input.module.js +46 -0
- package/dist/node/controls/rich-text-input.module.js.map +1 -0
- package/dist/node/controls/selection-bar.module.js +10 -0
- package/dist/node/controls/selection-bar.module.js.map +1 -0
- package/dist/node/index.js +41 -39
- package/dist/node/index.js.map +1 -1
- package/dist/node/overlays/Toast.js.map +1 -1
- package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Accordion.js.map +1 -1
- package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Collapsible.js.map +1 -1
- package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/CursorPagination.js.map +1 -1
- package/dist/node/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js +140 -93
- package/dist/node/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Image.js.map +1 -1
- package/dist/node/structure/Image.vue_vue_type_script_setup_true_lang.js +30 -18
- package/dist/node/structure/Image.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Pagination.js.map +1 -1
- package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js +124 -71
- package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/RichTextContent.js +7 -0
- package/dist/node/structure/RichTextContent.js.map +1 -0
- package/dist/node/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js +298 -0
- package/dist/node/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/node/structure/RichTextContentBlocks.js +7 -0
- package/dist/node/structure/RichTextContentBlocks.js.map +1 -0
- package/dist/node/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/node/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/node/structure/RichTextContentInlines.js +7 -0
- package/dist/node/structure/RichTextContentInlines.js.map +1 -0
- package/dist/node/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/node/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/node/structure/RichTextContentItem.js +7 -0
- package/dist/node/structure/RichTextContentItem.js.map +1 -0
- package/dist/node/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/node/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/node/structure/code-block.module.js +2 -2
- package/dist/node/structure/code-block.module.js.map +1 -1
- package/dist/node/structure/cursor-pagination.module.js +6 -3
- package/dist/node/structure/cursor-pagination.module.js.map +1 -1
- package/dist/node/structure/pagination.module.js +6 -3
- package/dist/node/structure/pagination.module.js.map +1 -1
- package/dist/node/structure/rich-text-content.module.js +18 -0
- package/dist/node/structure/rich-text-content.module.js.map +1 -0
- package/dist/overlays/Toast.js.map +1 -1
- package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Accordion.js.map +1 -1
- package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Collapsible.js.map +1 -1
- package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/CursorPagination.js.map +1 -1
- package/dist/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js +140 -93
- package/dist/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Image.js.map +1 -1
- package/dist/structure/Image.vue_vue_type_script_setup_true_lang.js +30 -18
- package/dist/structure/Image.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Pagination.js.map +1 -1
- package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js +124 -71
- package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/RichTextContent.js +7 -0
- package/dist/structure/RichTextContent.js.map +1 -0
- package/dist/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js +298 -0
- package/dist/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/structure/RichTextContentBlocks.js +7 -0
- package/dist/structure/RichTextContentBlocks.js.map +1 -0
- package/dist/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/structure/RichTextContentInlines.js +7 -0
- package/dist/structure/RichTextContentInlines.js.map +1 -0
- package/dist/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/structure/RichTextContentItem.js +7 -0
- package/dist/structure/RichTextContentItem.js.map +1 -0
- package/dist/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/structure/code-block.css +1 -1
- package/dist/structure/code-block.module.js +2 -2
- package/dist/structure/code-block.module.js.map +1 -1
- package/dist/structure/cursor-pagination.css +1 -1
- package/dist/structure/cursor-pagination.module.js +6 -3
- package/dist/structure/cursor-pagination.module.js.map +1 -1
- package/dist/structure/pagination.css +1 -1
- package/dist/structure/pagination.module.js +6 -3
- package/dist/structure/pagination.module.js.map +1 -1
- package/dist/structure/rich-text-content.css +1 -0
- package/dist/structure/rich-text-content.module.js +19 -0
- package/dist/structure/rich-text-content.module.js.map +1 -0
- package/dist/types/ai/ArtifactPane.vue.d.ts +1 -1
- package/dist/types/ai/AttachmentChip.vue.d.ts +1 -1
- package/dist/types/ai/ToolCall.vue.d.ts +1 -1
- package/dist/types/controls/RichTextInput.vue.d.ts +210 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/overlays/CommandPanel.vue.d.ts +2 -2
- package/dist/types/structure/Accordion.vue.d.ts +7 -0
- package/dist/types/structure/Collapsible.vue.d.ts +7 -0
- package/dist/types/structure/CursorPagination.vue.d.ts +13 -0
- package/dist/types/structure/EmptyState.vue.d.ts +1 -1
- package/dist/types/structure/Image.vue.d.ts +13 -0
- package/dist/types/structure/Pagination.vue.d.ts +8 -0
- package/dist/types/structure/RichTextContent.vue.d.ts +59 -0
- package/dist/types/structure/RichTextContentBlocks.vue.d.ts +7 -0
- package/dist/types/structure/RichTextContentInlines.vue.d.ts +7 -0
- package/dist/types/structure/RichTextContentItem.vue.d.ts +7 -0
- package/package.json +17 -4
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@polymorph/vue-ui`, the closed vocabulary for Vue.\n *\n * Every member is a single-file component generated by `pnpm shells` from its\n * framework-neutral description (`packages/shells/src/members/`), and takes the\n * React member's props, events and slots by the mapping in `docs/frameworks.md`.\n * The base layer is imported for its side effect, as the React vocabulary does.\n *\n * Generated by `pnpm shells`. Never edit it by hand.\n */\n\nimport '@polymorph/recipes/base.css'\n\nexport { gallerySlug, lawfulCells } from '@polymorph/vue'\nexport type {\n ComponentStates,\n StateEntry,\n AvatarTone,\n BrandMarkProps,\n BrandName,\n CartesianChartProps,\n ChartAnnotation,\n ChartBaseline,\n ChartDatum,\n ChartMessages,\n ChartScaleKind,\n ChartSeries,\n ChartSize,\n ChartSlot,\n ChartState,\n ChartTooltipConfig,\n ChartXAxis,\n ChartYAxis,\n ControlKind,\n ControlSize,\n DateGranularity,\n DonutCenter,\n DonutSegment,\n FileRejection,\n FileRejectionReason,\n FunnelStage,\n HeatmapValue,\n HeatmapYAxis,\n HistogramXAxis,\n IconGroup,\n IconRole,\n IconRoleMeta,\n IconSize,\n InitialFocus,\n LawfulVariants,\n LayoutPatch,\n RadarAxis,\n ScatterBubble,\n SeriesTone,\n SpacingProps,\n StateAttributeInput,\n StateAttributes,\n StateName,\n ToastAction,\n ToastOptions,\n ToastPhase,\n ToastPromiseSpec,\n ToastRecord,\n ToastTone,\n ToneOf,\n TooltipIndicator,\n TreemapItem,\n ValueFormat,\n VariantOf,\n} from '@polymorph/vue'\n\nexport { default as Accordion } from './structure/Accordion.vue'\nexport type {\n AccordionHeadingLevel,\n AccordionItem,\n AccordionProps,\n} from './structure/Accordion.vue'\nexport { default as Alert } from './structure/Alert.vue'\nexport type { AlertProps, AlertTone } from './structure/Alert.vue'\nexport { default as ApprovalCard } from './ai/ApprovalCard.vue'\nexport type { ApprovalCardProps, ApprovalDecision, ApprovalTone } from './ai/ApprovalCard.vue'\nimport AppShellRoot from './archetypes/AppShell.vue'\nimport AppShellNavItem from './archetypes/AppShellNavItem.vue'\nimport AppShellNavGroup from './archetypes/AppShellNavGroup.vue'\nimport AppShellUserCard from './archetypes/AppShellUserCard.vue'\nexport const AppShell = /* @__PURE__ */ Object.assign(AppShellRoot, {\n NavItem: AppShellNavItem,\n NavGroup: AppShellNavGroup,\n UserCard: AppShellUserCard,\n})\nexport type { AppShellNavItemProps } from './archetypes/AppShellNavItem.vue'\nexport type { AppShellNavGroupProps } from './archetypes/AppShellNavGroup.vue'\nexport type { AppShellUserCardProps } from './archetypes/AppShellUserCard.vue'\nexport type {\n AppShellProps,\n AppShellTopbar,\n NavGroupProps,\n NavItemProps,\n UserCardProps,\n} from './archetypes/AppShell.vue'\nexport { default as AreaChart } from './charts/AreaChart.vue'\nexport type { AreaChartProps } from './charts/AreaChart.vue'\nexport { default as ArtifactPane } from './ai/ArtifactPane.vue'\nexport type { ArtifactKind, ArtifactPaneProps, ArtifactView } from './ai/ArtifactPane.vue'\nexport { default as AttachmentChip } from './ai/AttachmentChip.vue'\nexport type { AttachmentChipProps, AttachmentStatus } from './ai/AttachmentChip.vue'\nexport { default as AudioPlayer } from './structure/AudioPlayer.vue'\nexport type { AudioPlayerMessages, AudioPlayerProps } from './structure/AudioPlayer.vue'\nexport { default as AuthPage } from './archetypes/AuthPage.vue'\nexport type { AuthPageProps } from './archetypes/AuthPage.vue'\nimport AvatarRoot from './structure/Avatar.vue'\nimport AvatarGroup from './structure/AvatarGroup.vue'\nexport const Avatar = /* @__PURE__ */ Object.assign(AvatarRoot, { Group: AvatarGroup })\nexport type { AvatarGroupProps } from './structure/AvatarGroup.vue'\nexport type { AvatarProps, AvatarSize } from './structure/Avatar.vue'\nexport { default as AvatarButton } from './controls/AvatarButton.vue'\nexport type { AvatarButtonProps } from './controls/AvatarButton.vue'\nexport { default as Badge } from './structure/Badge.vue'\nexport type { BadgeProps, BadgeTone, BadgeVariant } from './structure/Badge.vue'\nexport { default as Banner } from './structure/Banner.vue'\nexport type { BannerProps, BannerTone } from './structure/Banner.vue'\nexport { default as BarChart } from './charts/BarChart.vue'\nexport type { BarChartProps } from './charts/BarChart.vue'\nexport { default as Bespoke } from './exceptions/Bespoke.vue'\nexport type { BespokeProps } from './exceptions/Bespoke.vue'\nexport { default as Breadcrumbs } from './structure/Breadcrumbs.vue'\nexport type { BreadcrumbItem, BreadcrumbsProps } from './structure/Breadcrumbs.vue'\nexport { default as Button } from './controls/Button.vue'\nexport type { ButtonAppearance, ButtonCount, ButtonGrid, ButtonProps } from './controls/Button.vue'\nexport { default as Calendar } from './controls/Calendar.vue'\nexport type {\n CalendarDate,\n CalendarMessages,\n CalendarProps,\n FirstDayOfWeek,\n} from './controls/Calendar.vue'\nexport { default as Card } from './structure/Card.vue'\nexport type { CardElement, CardHeadingLevel, CardPatch, CardProps } from './structure/Card.vue'\nexport { default as Carousel } from './structure/Carousel.vue'\nexport type { CarouselProps, CarouselSlide } from './structure/Carousel.vue'\nexport { default as ChatMessage } from './ai/ChatMessage.vue'\nexport type { ChatMessageProps, ChatMessageStatus, ChatRole } from './ai/ChatMessage.vue'\nexport { default as ChatThread } from './ai/ChatThread.vue'\nexport type { ChatThreadMessages, ChatThreadProps } from './ai/ChatThread.vue'\nexport { default as Checkbox } from './controls/Checkbox.vue'\nexport type { CheckboxProps, CheckedState } from './controls/Checkbox.vue'\nexport { default as CheckboxGroup } from './controls/CheckboxGroup.vue'\nexport type {\n CheckboxGroupOption,\n CheckboxGroupOrientation,\n CheckboxGroupProps,\n} from './controls/CheckboxGroup.vue'\nexport { default as ChoiceCard } from './controls/ChoiceCard.vue'\nexport type { ChoiceCardOption, ChoiceCardProps } from './controls/ChoiceCard.vue'\nexport { default as Citation } from './ai/Citation.vue'\nexport type { CitationProps } from './ai/Citation.vue'\nexport { default as Code } from './structure/Code.vue'\nexport type { CodeProps } from './structure/Code.vue'\nexport { default as CodeBlock } from './structure/CodeBlock.vue'\nexport type { CodeBlockProps } from './structure/CodeBlock.vue'\nexport { default as Collapsible } from './structure/Collapsible.vue'\nexport type { CollapsibleProps } from './structure/Collapsible.vue'\nexport { default as ColorInput } from './controls/ColorInput.vue'\nexport type { ColorInputProps } from './controls/ColorInput.vue'\nexport { default as Combobox } from './controls/Combobox.vue'\nexport type {\n ComboboxFilter,\n ComboboxMessages,\n ComboboxOption,\n ComboboxProps,\n} from './controls/Combobox.vue'\nexport { default as Command } from './overlays/Command.vue'\nexport type { CommandItem, CommandProps } from './overlays/Command.vue'\nimport CommentThreadRoot from './structure/CommentThread.vue'\nimport CommentThreadComment from './structure/CommentThreadComment.vue'\nexport const CommentThread = /* @__PURE__ */ Object.assign(CommentThreadRoot, {\n Comment: CommentThreadComment,\n})\nexport type { CommentThreadCommentProps } from './structure/CommentThreadComment.vue'\nexport type { CommentThreadMessages, CommentThreadProps } from './structure/CommentThread.vue'\nexport { default as ConfirmDialog } from './overlays/ConfirmDialog.vue'\nexport type { ConfirmDialogProps, ConfirmTone } from './overlays/ConfirmDialog.vue'\nexport { default as ContextMenu } from './overlays/ContextMenu.vue'\nexport type { ContextMenuProps } from './overlays/ContextMenu.vue'\nexport { default as ConversationPage } from './archetypes/ConversationPage.vue'\nexport type { ConversationPageProps } from './archetypes/ConversationPage.vue'\nexport { default as CopyButton } from './controls/CopyButton.vue'\nexport type { CopyButtonProps } from './controls/CopyButton.vue'\nexport { default as Countdown } from './structure/Countdown.vue'\nexport type { CountdownMessages, CountdownProps } from './structure/Countdown.vue'\nexport { default as CursorPagination } from './structure/CursorPagination.vue'\nexport type {\n CursorPaginationMessages,\n CursorPaginationProps,\n} from './structure/CursorPagination.vue'\nimport DashboardRoot from './archetypes/Dashboard.vue'\nimport DashboardPanel from './archetypes/DashboardPanel.vue'\nexport const Dashboard = /* @__PURE__ */ Object.assign(DashboardRoot, { Panel: DashboardPanel })\nexport type { DashboardPanelProps } from './archetypes/DashboardPanel.vue'\nexport type { DashboardProps } from './archetypes/Dashboard.vue'\nexport { default as DataTable } from './structure/DataTable.vue'\nexport type {\n DataTableColumn,\n DataTableMessages,\n DataTableProps,\n DataTableRowDetail,\n DataTableSort,\n} from './structure/DataTable.vue'\nexport { default as DatePicker } from './controls/DatePicker.vue'\nexport type { DatePickerMessages, DatePickerProps } from './controls/DatePicker.vue'\nexport { default as DateRangePicker } from './controls/DateRangePicker.vue'\nexport type {\n DateRange,\n DateRangePickerMessages,\n DateRangePickerProps,\n} from './controls/DateRangePicker.vue'\nexport { default as DensityScope } from './exceptions/DensityScope.vue'\nexport type { DensityScopeProps } from './exceptions/DensityScope.vue'\nexport { default as DescriptionList } from './structure/DescriptionList.vue'\nexport type {\n DescriptionListItem,\n DescriptionListOrientation,\n DescriptionListProps,\n} from './structure/DescriptionList.vue'\nexport { default as DetailPage } from './archetypes/DetailPage.vue'\nexport type { DetailPageProps } from './archetypes/DetailPage.vue'\nexport { default as Dialog } from './overlays/Dialog.vue'\nexport type { DialogProps } from './overlays/Dialog.vue'\nexport { default as Diff } from './structure/Diff.vue'\nexport type { DiffMessages, DiffProps } from './structure/Diff.vue'\nexport { default as DonutChart } from './charts/DonutChart.vue'\nexport type { DonutChartProps } from './charts/DonutChart.vue'\nexport { default as Drawer } from './overlays/Drawer.vue'\nexport type { DrawerProps, DrawerSide } from './overlays/Drawer.vue'\nexport { default as DurationInput } from './controls/DurationInput.vue'\nexport type { DurationInputMessages, DurationInputProps } from './controls/DurationInput.vue'\nexport { default as EmptyState } from './structure/EmptyState.vue'\nexport type { EmptyStateProps } from './structure/EmptyState.vue'\nexport { default as ErrorSummary } from './structure/ErrorSummary.vue'\nexport type { ErrorSummaryError, ErrorSummaryProps } from './structure/ErrorSummary.vue'\nexport { default as FileUpload } from './controls/FileUpload.vue'\nexport type { FileUploadItem, FileUploadProps, FileUploadStatus } from './controls/FileUpload.vue'\nexport { default as FilterBar } from './structure/FilterBar.vue'\nexport type {\n FilterBarMessages,\n FilterBarProps,\n FilterResultCount,\n} from './structure/FilterBar.vue'\nexport { default as FormField } from './controls/FormField.vue'\nexport type { FormFieldControlProps, FormFieldProps } from './controls/FormField.vue'\nexport { default as FormPage } from './archetypes/FormPage.vue'\nexport type { FormPageProps } from './archetypes/FormPage.vue'\nexport { default as FunnelChart } from './charts/FunnelChart.vue'\nexport type { FunnelChartProps } from './charts/FunnelChart.vue'\nexport { default as Grid } from './layout/Grid.vue'\nexport type { GridAlign, GridColumns, GridElement, GridProps } from './layout/Grid.vue'\nexport { default as Heading } from './structure/Heading.vue'\nexport type { HeadingLevel, HeadingProps } from './structure/Heading.vue'\nexport { default as Heatmap } from './charts/Heatmap.vue'\nexport type { HeatmapProps } from './charts/Heatmap.vue'\nexport { default as Hero } from './structure/Hero.vue'\nexport type { HeroAlign, HeroProps } from './structure/Hero.vue'\nexport { default as Highlight } from './structure/Highlight.vue'\nexport type { HighlightProps } from './structure/Highlight.vue'\nexport { default as Histogram } from './charts/Histogram.vue'\nexport type { HistogramProps } from './charts/Histogram.vue'\nexport { default as HoverCard } from './overlays/HoverCard.vue'\nexport type { HoverCardAlign, HoverCardProps, HoverCardSide } from './overlays/HoverCard.vue'\nexport { Icon } from '@polymorph/vue'\nexport type { IconProps } from '@polymorph/vue'\nexport { default as Image } from './structure/Image.vue'\nexport type { ImageProps } from './structure/Image.vue'\nexport { default as Inline } from './layout/Inline.vue'\nexport type { InlineAlign, InlineElement, InlineJustify, InlineProps } from './layout/Inline.vue'\nexport { default as InlineEdit } from './controls/InlineEdit.vue'\nexport type { InlineEditMessages, InlineEditProps } from './controls/InlineEdit.vue'\nexport { default as Input } from './controls/Input.vue'\nexport type { InputProps, InputType } from './controls/Input.vue'\nexport { default as JsonTree } from './structure/JsonTree.vue'\nexport type { JsonTreeProps } from './structure/JsonTree.vue'\nexport { default as Kbd } from './structure/Kbd.vue'\nexport type { KbdProps } from './structure/Kbd.vue'\nexport { default as Lightbox } from './overlays/Lightbox.vue'\nexport type { LightboxImage, LightboxMessages, LightboxProps } from './overlays/Lightbox.vue'\nexport { default as LineChart } from './charts/LineChart.vue'\nexport type { LineChartProps } from './charts/LineChart.vue'\nexport { default as Link } from './controls/Link.vue'\nexport type { LinkButtonGrid, LinkProps, LinkVariant } from './controls/Link.vue'\nimport ListRoot from './structure/List.vue'\nimport ListItem from './structure/ListItem.vue'\nexport const List = /* @__PURE__ */ Object.assign(ListRoot, { Item: ListItem })\nexport type { ListItemProps } from './structure/ListItem.vue'\nexport type { ListProps } from './structure/List.vue'\nexport { default as ListPage } from './archetypes/ListPage.vue'\nexport type { ListPageProps } from './archetypes/ListPage.vue'\nexport { default as LogView } from './structure/LogView.vue'\nexport type { LogLine, LogViewMessages, LogViewProps } from './structure/LogView.vue'\nexport { default as Markdown } from './ai/Markdown.vue'\nexport type { MarkdownProps, MarkdownSize } from './ai/Markdown.vue'\nexport { default as MasterDetailPage } from './archetypes/MasterDetailPage.vue'\nexport type { MasterDetailPageProps } from './archetypes/MasterDetailPage.vue'\nexport { default as Menu } from './overlays/Menu.vue'\nexport type {\n MenuAlign,\n MenuCheckboxEntry,\n MenuEntry,\n MenuItemEntry,\n MenuLabelEntry,\n MenuLeafEntry,\n MenuPresentation,\n MenuProps,\n MenuSeparatorEntry,\n MenuSubmenuEntry,\n} from './overlays/Menu.vue'\nexport { default as Menubar } from './overlays/Menubar.vue'\nexport type { MenubarMenu, MenubarProps } from './overlays/Menubar.vue'\nexport { default as Meter } from './structure/Meter.vue'\nexport type { MeterMessages, MeterProps } from './structure/Meter.vue'\nexport { default as ModeSwitch } from './controls/ModeSwitch.vue'\nexport type { ModeSwitchMessages, ModeSwitchProps } from './controls/ModeSwitch.vue'\nexport { default as MonthInput } from './controls/MonthInput.vue'\nexport type { MonthInputMessages, MonthInputProps } from './controls/MonthInput.vue'\nexport { default as MultiSelect } from './controls/MultiSelect.vue'\nexport type {\n MultiSelectMessages,\n MultiSelectOption,\n MultiSelectProps,\n} from './controls/MultiSelect.vue'\nexport { default as NumberInput } from './controls/NumberInput.vue'\nexport type { NumberFormat, NumberInputProps } from './controls/NumberInput.vue'\nexport { default as OTPInput } from './controls/OTPInput.vue'\nexport type { OTPInputProps, OTPLength } from './controls/OTPInput.vue'\nexport { default as PageHeader } from './structure/PageHeader.vue'\nexport type { PageHeaderProps } from './structure/PageHeader.vue'\nexport { default as Pagination } from './structure/Pagination.vue'\nexport type { PaginationMessages, PaginationProps, SiblingCount } from './structure/Pagination.vue'\nexport { default as PasswordInput } from './controls/PasswordInput.vue'\nexport type { PasswordInputProps } from './controls/PasswordInput.vue'\nexport { default as PhoneInput } from './controls/PhoneInput.vue'\nexport type { PhoneInputMessages, PhoneInputProps } from './controls/PhoneInput.vue'\nexport { default as Plan } from './ai/Plan.vue'\nexport type { PlanMessages, PlanProps, PlanStatus, PlanStep } from './ai/Plan.vue'\nexport { default as Popover } from './overlays/Popover.vue'\nexport type { PopoverAlign, PopoverProps, PopoverSide } from './overlays/Popover.vue'\nexport { default as Progress } from './structure/Progress.vue'\nexport type { ProgressProps, ProgressShape, ProgressTone } from './structure/Progress.vue'\nexport { default as PromptInput } from './ai/PromptInput.vue'\nexport type {\n PromptAttachment,\n PromptInputMaxRows,\n PromptInputMessages,\n PromptInputProps,\n PromptTrigger,\n PromptTriggerOption,\n} from './ai/PromptInput.vue'\nexport { default as ProviderButton } from './controls/ProviderButton.vue'\nexport type { ProviderButtonProps, ProviderButtonProvider } from './controls/ProviderButton.vue'\nexport { default as QRCode } from './structure/QRCode.vue'\nexport type { QRCodeErrorCorrection, QRCodeProps, QRCodeSize } from './structure/QRCode.vue'\nexport { default as RadarChart } from './charts/RadarChart.vue'\nexport type { RadarChartProps } from './charts/RadarChart.vue'\nexport { default as RadioGroup } from './controls/RadioGroup.vue'\nexport type { RadioGroupProps, RadioOption, RadioOrientation } from './controls/RadioGroup.vue'\nexport { default as Rating } from './controls/Rating.vue'\nexport type { RatingMessages, RatingProps, RatingSize } from './controls/Rating.vue'\nexport { default as ReasoningDisclosure } from './ai/ReasoningDisclosure.vue'\nexport type { ReasoningDisclosureProps } from './ai/ReasoningDisclosure.vue'\nexport { default as RecordButton } from './controls/RecordButton.vue'\nexport type { RecordButtonProps } from './controls/RecordButton.vue'\nexport { default as RelativeTime } from './structure/RelativeTime.vue'\nexport type { RelativeTimeMessages, RelativeTimeProps } from './structure/RelativeTime.vue'\nexport { default as ScatterChart } from './charts/ScatterChart.vue'\nexport type { ScatterChartProps } from './charts/ScatterChart.vue'\nexport { default as ScrollArea } from './structure/ScrollArea.vue'\nexport type {\n ScrollAreaOrientation,\n ScrollAreaProps,\n ScrollAreaType,\n} from './structure/ScrollArea.vue'\nexport { default as SearchInput } from './controls/SearchInput.vue'\nexport type { SearchInputProps } from './controls/SearchInput.vue'\nexport { default as SearchPage } from './archetypes/SearchPage.vue'\nexport type { SearchPageProps } from './archetypes/SearchPage.vue'\nexport { default as SectionNav } from './structure/SectionNav.vue'\nexport type { SectionNavItem, SectionNavProps } from './structure/SectionNav.vue'\nexport { default as SegmentedControl } from './controls/SegmentedControl.vue'\nexport type {\n SegmentedControlOption,\n SegmentedControlProps,\n SegmentedControlSize,\n} from './controls/SegmentedControl.vue'\nexport { default as Select } from './controls/Select.vue'\nexport type { SelectOption, SelectOptionGroup, SelectProps } from './controls/Select.vue'\nexport { default as Separator } from './structure/Separator.vue'\nexport type { SeparatorOrientation, SeparatorProps } from './structure/Separator.vue'\nexport { default as SettingsPage } from './archetypes/SettingsPage.vue'\nexport type { SettingsPageProps } from './archetypes/SettingsPage.vue'\nimport SettingsRowRoot from './structure/SettingsRow.vue'\nimport SettingsRowGroup from './structure/SettingsRowGroup.vue'\nexport const SettingsRow = /* @__PURE__ */ Object.assign(SettingsRowRoot, {\n Group: SettingsRowGroup,\n})\nexport type { SettingsRowGroupProps } from './structure/SettingsRowGroup.vue'\nexport type { SettingsGroupProps, SettingsRowProps } from './structure/SettingsRow.vue'\nexport { default as Skeleton } from './structure/Skeleton.vue'\nexport type { SkeletonProps, SkeletonShape } from './structure/Skeleton.vue'\nexport { default as Slider } from './controls/Slider.vue'\nexport type { SliderProps } from './controls/Slider.vue'\nexport { default as SourceList } from './ai/SourceList.vue'\nexport type { CitationSource, SourceListProps } from './ai/SourceList.vue'\nexport { default as Sparkline } from './charts/Sparkline.vue'\nexport type { SparklineProps } from './charts/Sparkline.vue'\nexport { default as Spinner } from './structure/Spinner.vue'\nexport type { SpinnerProps } from './structure/Spinner.vue'\nexport { default as SplitButton } from './controls/SplitButton.vue'\nexport type {\n SplitButtonAppearance,\n SplitButtonGrid,\n SplitButtonProps,\n} from './controls/SplitButton.vue'\nexport { default as SplitPane } from './layout/SplitPane.vue'\nexport type { SplitPaneOrientation, SplitPaneProps } from './layout/SplitPane.vue'\nexport { default as Stack } from './layout/Stack.vue'\nexport type { StackAlign, StackElement, StackJustify, StackProps } from './layout/Stack.vue'\nexport { default as Stat } from './structure/Stat.vue'\nexport type {\n DeltaDirection,\n StatDelta,\n StatFooter,\n StatProps,\n StatTrend,\n} from './structure/Stat.vue'\nexport { default as Stepper } from './structure/Stepper.vue'\nexport type {\n Step,\n StepperOrientation,\n StepperProps,\n StepperSpoken,\n StepperSpokenState,\n} from './structure/Stepper.vue'\nexport { default as StreamingText } from './ai/StreamingText.vue'\nexport type { StreamingTextProps, StreamingTextSize } from './ai/StreamingText.vue'\nexport { default as Switch } from './controls/Switch.vue'\nexport type { SwitchProps } from './controls/Switch.vue'\nimport TableRoot from './structure/Table.vue'\nimport TableHead from './structure/TableHead.vue'\nimport TableBody from './structure/TableBody.vue'\nimport TableFoot from './structure/TableFoot.vue'\nimport TableRow from './structure/TableRow.vue'\nimport TableHeader from './structure/TableHeader.vue'\nimport TableCell from './structure/TableCell.vue'\nexport const Table = /* @__PURE__ */ Object.assign(TableRoot, {\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n Header: TableHeader,\n Cell: TableCell,\n})\nexport type { TableHeadProps } from './structure/TableHead.vue'\nexport type { TableBodyProps } from './structure/TableBody.vue'\nexport type { TableFootProps } from './structure/TableFoot.vue'\nexport type { TableRowProps } from './structure/TableRow.vue'\nexport type { TableHeaderProps } from './structure/TableHeader.vue'\nexport type { TableCellProps } from './structure/TableCell.vue'\nexport type {\n CellProps,\n HeaderProps,\n RowProps,\n SortDirection,\n TableProps,\n} from './structure/Table.vue'\nexport { default as TableOfContents } from './structure/TableOfContents.vue'\nexport type { TableOfContentsItem, TableOfContentsProps } from './structure/TableOfContents.vue'\nimport TabsRoot from './overlays/Tabs.vue'\nimport TabsContent from './overlays/TabsContent.vue'\nexport const Tabs = /* @__PURE__ */ Object.assign(TabsRoot, { Content: TabsContent })\nexport type { TabsContentProps } from './overlays/TabsContent.vue'\nexport type { TabDescriptor, TabsOrientation, TabsProps } from './overlays/Tabs.vue'\nexport { default as TagInput } from './controls/TagInput.vue'\nexport type { TagInputProps } from './controls/TagInput.vue'\nexport { default as Text } from './structure/Text.vue'\nexport type { TextProps, TextSize, TextTone } from './structure/Text.vue'\nexport { default as Textarea } from './controls/Textarea.vue'\nexport type { TextareaProps, TextareaResize } from './controls/Textarea.vue'\nexport { default as ThirdParty } from './exceptions/ThirdParty.vue'\nexport type { ThirdPartyProps } from './exceptions/ThirdParty.vue'\nexport { default as TimeInput } from './controls/TimeInput.vue'\nexport type { TimeInputProps } from './controls/TimeInput.vue'\nexport { default as Timeline } from './structure/Timeline.vue'\nexport type { TimelineEvent, TimelineProps, TimelineTone } from './structure/Timeline.vue'\nimport ToastRoot from './overlays/Toast.vue'\nimport ToastViewport from './overlays/ToastViewport.vue'\nexport const Toast = /* @__PURE__ */ Object.assign(ToastRoot, { Viewport: ToastViewport })\nexport type { ToastViewportProps } from './overlays/ToastViewport.vue'\nexport type { ToastProps, ToasterMessages } from './overlays/Toast.vue'\nexport { default as ToneScope } from './exceptions/ToneScope.vue'\nexport type { ScopeElement, Tone, ToneScopeProps } from './exceptions/ToneScope.vue'\nexport { default as ToolCall } from './ai/ToolCall.vue'\nexport type { ToolCallMessages, ToolCallProps, ToolCallStatus } from './ai/ToolCall.vue'\nexport { default as Tooltip } from './overlays/Tooltip.vue'\nexport type { TooltipAlign, TooltipProps, TooltipSide } from './overlays/Tooltip.vue'\nimport TourRoot from './overlays/Tour.vue'\nimport TourTarget from './overlays/TourTarget.vue'\nexport const Tour = /* @__PURE__ */ Object.assign(TourRoot, { Target: TourTarget })\nexport type { TourTargetProps } from './overlays/TourTarget.vue'\nexport type { TourEnd, TourMessages, TourProps, TourStep } from './overlays/Tour.vue'\nexport { default as Tree } from './structure/Tree.vue'\nexport type { TreeItem, TreeMessages, TreeProps } from './structure/Tree.vue'\nexport { default as Treemap } from './charts/Treemap.vue'\nexport type { TreemapProps } from './charts/Treemap.vue'\nexport { default as TreeSelect } from './controls/TreeSelect.vue'\nexport type { TreeSelectProps } from './controls/TreeSelect.vue'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAa,KAA2B,uBAAO,OAAO,GAAc;CAClE,SAAS;CACT,UAAU;CACV,UAAU;AACZ,CAAC,GAuBY,KAAyB,uBAAO,OAAO,GAAY,EAAE,OAAO,EAAY,CAAC,GA+DzE,KAAgC,uBAAO,OAAO,GAAmB,EAC5E,SAAS,GACX,CAAC,GAoBY,KAA4B,uBAAO,OAAO,IAAe,EAAE,OAAO,GAAe,CAAC,GA6FlF,KAAuB,uBAAO,OAAO,IAAU,EAAE,MAAM,GAAS,CAAC,GA6GjE,KAA8B,uBAAO,OAAO,IAAiB,EACxE,OAAO,GACT,CAAC,GAkDY,KAAwB,uBAAO,OAAO,GAAW;CAC5D,MAAM;CACN,MAAM;CACN,MAAM;CACN,KAAK;CACL,QAAQ;CACR,MAAM;AACR,CAAC,GAkBY,KAAuB,uBAAO,OAAO,IAAU,EAAE,SAAS,GAAY,CAAC,GAiBvE,KAAwB,uBAAO,OAAO,IAAW,EAAE,UAAU,GAAc,CAAC,GAW5E,KAAuB,uBAAO,OAAO,IAAU,EAAE,QAAQ,GAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@polymorph/vue-ui`, the closed vocabulary for Vue.\n *\n * Every member is a single-file component generated by `pnpm shells` from its\n * framework-neutral description (`packages/shells/src/members/`), and takes the\n * React member's props, events and slots by the mapping in `docs/frameworks.md`.\n * The base layer is imported for its side effect, as the React vocabulary does.\n *\n * Generated by `pnpm shells`. Never edit it by hand.\n */\n\nimport '@polymorph/recipes/base.css'\n\nexport { gallerySlug, lawfulCells } from '@polymorph/vue'\nexport type {\n ComponentStates,\n StateEntry,\n AvatarTone,\n BrandMarkProps,\n BrandName,\n CartesianChartProps,\n ChartAnnotation,\n ChartBaseline,\n ChartDatum,\n ChartMessages,\n ChartScaleKind,\n ChartSeries,\n ChartSize,\n ChartSlot,\n ChartState,\n ChartTooltipConfig,\n ChartXAxis,\n ChartYAxis,\n ControlKind,\n ControlSize,\n DateGranularity,\n DonutCenter,\n DonutSegment,\n FileRejection,\n FileRejectionReason,\n FunnelStage,\n HeatmapValue,\n HeatmapYAxis,\n HistogramXAxis,\n IconGroup,\n IconRole,\n IconRoleMeta,\n IconSize,\n InitialFocus,\n LawfulVariants,\n LayoutPatch,\n RadarAxis,\n ScatterBubble,\n SeriesTone,\n SpacingProps,\n StateAttributeInput,\n StateAttributes,\n StateName,\n ToastAction,\n ToastOptions,\n ToastPhase,\n ToastPromiseSpec,\n ToastRecord,\n ToastTone,\n ToneOf,\n TooltipIndicator,\n TreemapItem,\n ValueFormat,\n VariantOf,\n} from '@polymorph/vue'\n\nexport { default as Accordion } from './structure/Accordion.vue'\nexport type {\n AccordionHeadingLevel,\n AccordionItem,\n AccordionProps,\n} from './structure/Accordion.vue'\nexport { default as Alert } from './structure/Alert.vue'\nexport type { AlertProps, AlertTone } from './structure/Alert.vue'\nexport { default as ApprovalCard } from './ai/ApprovalCard.vue'\nexport type { ApprovalCardProps, ApprovalDecision, ApprovalTone } from './ai/ApprovalCard.vue'\nimport AppShellRoot from './archetypes/AppShell.vue'\nimport AppShellNavItem from './archetypes/AppShellNavItem.vue'\nimport AppShellNavGroup from './archetypes/AppShellNavGroup.vue'\nimport AppShellUserCard from './archetypes/AppShellUserCard.vue'\nexport const AppShell = /* @__PURE__ */ Object.assign(AppShellRoot, {\n NavItem: AppShellNavItem,\n NavGroup: AppShellNavGroup,\n UserCard: AppShellUserCard,\n})\nexport type { AppShellNavItemProps } from './archetypes/AppShellNavItem.vue'\nexport type { AppShellNavGroupProps } from './archetypes/AppShellNavGroup.vue'\nexport type { AppShellUserCardProps } from './archetypes/AppShellUserCard.vue'\nexport type {\n AppShellProps,\n AppShellTopbar,\n NavGroupProps,\n NavItemProps,\n UserCardProps,\n} from './archetypes/AppShell.vue'\nexport { default as AreaChart } from './charts/AreaChart.vue'\nexport type { AreaChartProps } from './charts/AreaChart.vue'\nexport { default as ArtifactPane } from './ai/ArtifactPane.vue'\nexport type { ArtifactKind, ArtifactPaneProps, ArtifactView } from './ai/ArtifactPane.vue'\nexport { default as AttachmentChip } from './ai/AttachmentChip.vue'\nexport type { AttachmentChipProps, AttachmentStatus } from './ai/AttachmentChip.vue'\nexport { default as AudioPlayer } from './structure/AudioPlayer.vue'\nexport type { AudioPlayerMessages, AudioPlayerProps } from './structure/AudioPlayer.vue'\nexport { default as AuthPage } from './archetypes/AuthPage.vue'\nexport type { AuthPageProps } from './archetypes/AuthPage.vue'\nimport AvatarRoot from './structure/Avatar.vue'\nimport AvatarGroup from './structure/AvatarGroup.vue'\nexport const Avatar = /* @__PURE__ */ Object.assign(AvatarRoot, { Group: AvatarGroup })\nexport type { AvatarGroupProps } from './structure/AvatarGroup.vue'\nexport type { AvatarProps, AvatarSize } from './structure/Avatar.vue'\nexport { default as AvatarButton } from './controls/AvatarButton.vue'\nexport type { AvatarButtonProps } from './controls/AvatarButton.vue'\nexport { default as Badge } from './structure/Badge.vue'\nexport type { BadgeProps, BadgeTone, BadgeVariant } from './structure/Badge.vue'\nexport { default as Banner } from './structure/Banner.vue'\nexport type { BannerProps, BannerTone } from './structure/Banner.vue'\nexport { default as BarChart } from './charts/BarChart.vue'\nexport type { BarChartProps } from './charts/BarChart.vue'\nexport { default as Bespoke } from './exceptions/Bespoke.vue'\nexport type { BespokeProps } from './exceptions/Bespoke.vue'\nexport { default as Breadcrumbs } from './structure/Breadcrumbs.vue'\nexport type { BreadcrumbItem, BreadcrumbsProps } from './structure/Breadcrumbs.vue'\nexport { default as Button } from './controls/Button.vue'\nexport type { ButtonAppearance, ButtonCount, ButtonGrid, ButtonProps } from './controls/Button.vue'\nexport { default as Calendar } from './controls/Calendar.vue'\nexport type {\n CalendarDate,\n CalendarMessages,\n CalendarProps,\n FirstDayOfWeek,\n} from './controls/Calendar.vue'\nexport { default as Card } from './structure/Card.vue'\nexport type { CardElement, CardHeadingLevel, CardPatch, CardProps } from './structure/Card.vue'\nexport { default as Carousel } from './structure/Carousel.vue'\nexport type { CarouselProps, CarouselSlide } from './structure/Carousel.vue'\nexport { default as ChatMessage } from './ai/ChatMessage.vue'\nexport type { ChatMessageProps, ChatMessageStatus, ChatRole } from './ai/ChatMessage.vue'\nexport { default as ChatThread } from './ai/ChatThread.vue'\nexport type { ChatThreadMessages, ChatThreadProps } from './ai/ChatThread.vue'\nexport { default as Checkbox } from './controls/Checkbox.vue'\nexport type { CheckboxProps, CheckedState } from './controls/Checkbox.vue'\nexport { default as CheckboxGroup } from './controls/CheckboxGroup.vue'\nexport type {\n CheckboxGroupOption,\n CheckboxGroupOrientation,\n CheckboxGroupProps,\n} from './controls/CheckboxGroup.vue'\nexport { default as ChoiceCard } from './controls/ChoiceCard.vue'\nexport type { ChoiceCardOption, ChoiceCardProps } from './controls/ChoiceCard.vue'\nexport { default as Citation } from './ai/Citation.vue'\nexport type { CitationProps } from './ai/Citation.vue'\nexport { default as Code } from './structure/Code.vue'\nexport type { CodeProps } from './structure/Code.vue'\nexport { default as CodeBlock } from './structure/CodeBlock.vue'\nexport type { CodeBlockProps } from './structure/CodeBlock.vue'\nexport { default as Collapsible } from './structure/Collapsible.vue'\nexport type { CollapsibleProps } from './structure/Collapsible.vue'\nexport { default as ColorInput } from './controls/ColorInput.vue'\nexport type { ColorInputProps } from './controls/ColorInput.vue'\nexport { default as Combobox } from './controls/Combobox.vue'\nexport type {\n ComboboxFilter,\n ComboboxMessages,\n ComboboxOption,\n ComboboxProps,\n} from './controls/Combobox.vue'\nexport { default as Command } from './overlays/Command.vue'\nexport type { CommandItem, CommandProps } from './overlays/Command.vue'\nimport CommentThreadRoot from './structure/CommentThread.vue'\nimport CommentThreadComment from './structure/CommentThreadComment.vue'\nexport const CommentThread = /* @__PURE__ */ Object.assign(CommentThreadRoot, {\n Comment: CommentThreadComment,\n})\nexport type { CommentThreadCommentProps } from './structure/CommentThreadComment.vue'\nexport type { CommentThreadMessages, CommentThreadProps } from './structure/CommentThread.vue'\nexport { default as ConfirmDialog } from './overlays/ConfirmDialog.vue'\nexport type { ConfirmDialogProps, ConfirmTone } from './overlays/ConfirmDialog.vue'\nexport { default as ContextMenu } from './overlays/ContextMenu.vue'\nexport type { ContextMenuProps } from './overlays/ContextMenu.vue'\nexport { default as ConversationPage } from './archetypes/ConversationPage.vue'\nexport type { ConversationPageProps } from './archetypes/ConversationPage.vue'\nexport { default as CopyButton } from './controls/CopyButton.vue'\nexport type { CopyButtonProps } from './controls/CopyButton.vue'\nexport { default as Countdown } from './structure/Countdown.vue'\nexport type { CountdownMessages, CountdownProps } from './structure/Countdown.vue'\nexport { default as CursorPagination } from './structure/CursorPagination.vue'\nexport type {\n CursorPaginationMessages,\n CursorPaginationProps,\n} from './structure/CursorPagination.vue'\nimport DashboardRoot from './archetypes/Dashboard.vue'\nimport DashboardPanel from './archetypes/DashboardPanel.vue'\nexport const Dashboard = /* @__PURE__ */ Object.assign(DashboardRoot, { Panel: DashboardPanel })\nexport type { DashboardPanelProps } from './archetypes/DashboardPanel.vue'\nexport type { DashboardProps } from './archetypes/Dashboard.vue'\nexport { default as DataTable } from './structure/DataTable.vue'\nexport type {\n DataTableColumn,\n DataTableMessages,\n DataTableProps,\n DataTableRowDetail,\n DataTableSort,\n} from './structure/DataTable.vue'\nexport { default as DatePicker } from './controls/DatePicker.vue'\nexport type { DatePickerMessages, DatePickerProps } from './controls/DatePicker.vue'\nexport { default as DateRangePicker } from './controls/DateRangePicker.vue'\nexport type {\n DateRange,\n DateRangePickerMessages,\n DateRangePickerProps,\n} from './controls/DateRangePicker.vue'\nexport { default as DensityScope } from './exceptions/DensityScope.vue'\nexport type { DensityScopeProps } from './exceptions/DensityScope.vue'\nexport { default as DescriptionList } from './structure/DescriptionList.vue'\nexport type {\n DescriptionListItem,\n DescriptionListOrientation,\n DescriptionListProps,\n} from './structure/DescriptionList.vue'\nexport { default as DetailPage } from './archetypes/DetailPage.vue'\nexport type { DetailPageProps } from './archetypes/DetailPage.vue'\nexport { default as Dialog } from './overlays/Dialog.vue'\nexport type { DialogProps } from './overlays/Dialog.vue'\nexport { default as Diff } from './structure/Diff.vue'\nexport type { DiffMessages, DiffProps } from './structure/Diff.vue'\nexport { default as DonutChart } from './charts/DonutChart.vue'\nexport type { DonutChartProps } from './charts/DonutChart.vue'\nexport { default as Drawer } from './overlays/Drawer.vue'\nexport type { DrawerProps, DrawerSide } from './overlays/Drawer.vue'\nexport { default as DurationInput } from './controls/DurationInput.vue'\nexport type { DurationInputMessages, DurationInputProps } from './controls/DurationInput.vue'\nexport { default as EmptyState } from './structure/EmptyState.vue'\nexport type { EmptyStateProps } from './structure/EmptyState.vue'\nexport { default as ErrorSummary } from './structure/ErrorSummary.vue'\nexport type { ErrorSummaryError, ErrorSummaryProps } from './structure/ErrorSummary.vue'\nexport { default as FileUpload } from './controls/FileUpload.vue'\nexport type { FileUploadItem, FileUploadProps, FileUploadStatus } from './controls/FileUpload.vue'\nexport { default as FilterBar } from './structure/FilterBar.vue'\nexport type {\n FilterBarMessages,\n FilterBarProps,\n FilterResultCount,\n} from './structure/FilterBar.vue'\nexport { default as FormField } from './controls/FormField.vue'\nexport type { FormFieldControlProps, FormFieldProps } from './controls/FormField.vue'\nexport { default as FormPage } from './archetypes/FormPage.vue'\nexport type { FormPageProps } from './archetypes/FormPage.vue'\nexport { default as FunnelChart } from './charts/FunnelChart.vue'\nexport type { FunnelChartProps } from './charts/FunnelChart.vue'\nexport { default as Grid } from './layout/Grid.vue'\nexport type { GridAlign, GridColumns, GridElement, GridProps } from './layout/Grid.vue'\nexport { default as Heading } from './structure/Heading.vue'\nexport type { HeadingLevel, HeadingProps } from './structure/Heading.vue'\nexport { default as Heatmap } from './charts/Heatmap.vue'\nexport type { HeatmapProps } from './charts/Heatmap.vue'\nexport { default as Hero } from './structure/Hero.vue'\nexport type { HeroAlign, HeroProps } from './structure/Hero.vue'\nexport { default as Highlight } from './structure/Highlight.vue'\nexport type { HighlightProps } from './structure/Highlight.vue'\nexport { default as Histogram } from './charts/Histogram.vue'\nexport type { HistogramProps } from './charts/Histogram.vue'\nexport { default as HoverCard } from './overlays/HoverCard.vue'\nexport type { HoverCardAlign, HoverCardProps, HoverCardSide } from './overlays/HoverCard.vue'\nexport { Icon } from '@polymorph/vue'\nexport type { IconProps } from '@polymorph/vue'\nexport { default as Image } from './structure/Image.vue'\nexport type { ImageProps } from './structure/Image.vue'\nexport { default as Inline } from './layout/Inline.vue'\nexport type { InlineAlign, InlineElement, InlineJustify, InlineProps } from './layout/Inline.vue'\nexport { default as InlineEdit } from './controls/InlineEdit.vue'\nexport type { InlineEditMessages, InlineEditProps } from './controls/InlineEdit.vue'\nexport { default as Input } from './controls/Input.vue'\nexport type { InputProps, InputType } from './controls/Input.vue'\nexport { default as JsonTree } from './structure/JsonTree.vue'\nexport type { JsonTreeProps } from './structure/JsonTree.vue'\nexport { default as Kbd } from './structure/Kbd.vue'\nexport type { KbdProps } from './structure/Kbd.vue'\nexport { default as Lightbox } from './overlays/Lightbox.vue'\nexport type { LightboxImage, LightboxMessages, LightboxProps } from './overlays/Lightbox.vue'\nexport { default as LineChart } from './charts/LineChart.vue'\nexport type { LineChartProps } from './charts/LineChart.vue'\nexport { default as Link } from './controls/Link.vue'\nexport type { LinkButtonGrid, LinkProps, LinkVariant } from './controls/Link.vue'\nimport ListRoot from './structure/List.vue'\nimport ListItem from './structure/ListItem.vue'\nexport const List = /* @__PURE__ */ Object.assign(ListRoot, { Item: ListItem })\nexport type { ListItemProps } from './structure/ListItem.vue'\nexport type { ListProps } from './structure/List.vue'\nexport { default as ListPage } from './archetypes/ListPage.vue'\nexport type { ListPageProps } from './archetypes/ListPage.vue'\nexport { default as LogView } from './structure/LogView.vue'\nexport type { LogLine, LogViewMessages, LogViewProps } from './structure/LogView.vue'\nexport { default as Markdown } from './ai/Markdown.vue'\nexport type { MarkdownProps, MarkdownSize } from './ai/Markdown.vue'\nexport { default as MasterDetailPage } from './archetypes/MasterDetailPage.vue'\nexport type { MasterDetailPageProps } from './archetypes/MasterDetailPage.vue'\nexport { default as Menu } from './overlays/Menu.vue'\nexport type {\n MenuAlign,\n MenuCheckboxEntry,\n MenuEntry,\n MenuItemEntry,\n MenuLabelEntry,\n MenuLeafEntry,\n MenuPresentation,\n MenuProps,\n MenuSeparatorEntry,\n MenuSubmenuEntry,\n} from './overlays/Menu.vue'\nexport { default as Menubar } from './overlays/Menubar.vue'\nexport type { MenubarMenu, MenubarProps } from './overlays/Menubar.vue'\nexport { default as Meter } from './structure/Meter.vue'\nexport type { MeterMessages, MeterProps } from './structure/Meter.vue'\nexport { default as ModeSwitch } from './controls/ModeSwitch.vue'\nexport type { ModeSwitchMessages, ModeSwitchProps } from './controls/ModeSwitch.vue'\nexport { default as MonthInput } from './controls/MonthInput.vue'\nexport type { MonthInputMessages, MonthInputProps } from './controls/MonthInput.vue'\nexport { default as MultiSelect } from './controls/MultiSelect.vue'\nexport type {\n MultiSelectMessages,\n MultiSelectOption,\n MultiSelectProps,\n} from './controls/MultiSelect.vue'\nexport { default as NumberInput } from './controls/NumberInput.vue'\nexport type { NumberFormat, NumberInputProps } from './controls/NumberInput.vue'\nexport { default as OTPInput } from './controls/OTPInput.vue'\nexport type { OTPInputProps, OTPLength } from './controls/OTPInput.vue'\nexport { default as PageHeader } from './structure/PageHeader.vue'\nexport type { PageHeaderProps } from './structure/PageHeader.vue'\nexport { default as Pagination } from './structure/Pagination.vue'\nexport type { PaginationMessages, PaginationProps, SiblingCount } from './structure/Pagination.vue'\nexport { default as PasswordInput } from './controls/PasswordInput.vue'\nexport type { PasswordInputProps } from './controls/PasswordInput.vue'\nexport { default as PhoneInput } from './controls/PhoneInput.vue'\nexport type { PhoneInputMessages, PhoneInputProps } from './controls/PhoneInput.vue'\nexport { default as Plan } from './ai/Plan.vue'\nexport type { PlanMessages, PlanProps, PlanStatus, PlanStep } from './ai/Plan.vue'\nexport { default as Popover } from './overlays/Popover.vue'\nexport type { PopoverAlign, PopoverProps, PopoverSide } from './overlays/Popover.vue'\nexport { default as Progress } from './structure/Progress.vue'\nexport type { ProgressProps, ProgressShape, ProgressTone } from './structure/Progress.vue'\nexport { default as PromptInput } from './ai/PromptInput.vue'\nexport type {\n PromptAttachment,\n PromptInputMaxRows,\n PromptInputMessages,\n PromptInputProps,\n PromptTrigger,\n PromptTriggerOption,\n} from './ai/PromptInput.vue'\nexport { default as ProviderButton } from './controls/ProviderButton.vue'\nexport type { ProviderButtonProps, ProviderButtonProvider } from './controls/ProviderButton.vue'\nexport { default as QRCode } from './structure/QRCode.vue'\nexport type { QRCodeErrorCorrection, QRCodeProps, QRCodeSize } from './structure/QRCode.vue'\nexport { default as RadarChart } from './charts/RadarChart.vue'\nexport type { RadarChartProps } from './charts/RadarChart.vue'\nexport { default as RadioGroup } from './controls/RadioGroup.vue'\nexport type { RadioGroupProps, RadioOption, RadioOrientation } from './controls/RadioGroup.vue'\nexport { default as Rating } from './controls/Rating.vue'\nexport type { RatingMessages, RatingProps, RatingSize } from './controls/Rating.vue'\nexport { default as ReasoningDisclosure } from './ai/ReasoningDisclosure.vue'\nexport type { ReasoningDisclosureProps } from './ai/ReasoningDisclosure.vue'\nexport { default as RecordButton } from './controls/RecordButton.vue'\nexport type { RecordButtonProps } from './controls/RecordButton.vue'\nexport { default as RelativeTime } from './structure/RelativeTime.vue'\nexport type { RelativeTimeMessages, RelativeTimeProps } from './structure/RelativeTime.vue'\nexport { default as RichTextContent } from './structure/RichTextContent.vue'\nexport type {\n RichTextContentMessages,\n RichTextContentProps,\n RichTextContentSelection,\n RichTextContentSize,\n} from './structure/RichTextContent.vue'\nexport { default as RichTextInput } from './controls/RichTextInput.vue'\nexport type {\n RichTextEntityOption,\n RichTextEntitySource,\n RichTextInputEditor,\n RichTextInputMaxRows,\n RichTextInputMessages,\n RichTextInputMinRows,\n RichTextInputProps,\n RichTextInputSelection,\n RichTextToolbarPlacement,\n} from './controls/RichTextInput.vue'\nexport { default as ScatterChart } from './charts/ScatterChart.vue'\nexport type { ScatterChartProps } from './charts/ScatterChart.vue'\nexport { default as ScrollArea } from './structure/ScrollArea.vue'\nexport type {\n ScrollAreaOrientation,\n ScrollAreaProps,\n ScrollAreaType,\n} from './structure/ScrollArea.vue'\nexport { default as SearchInput } from './controls/SearchInput.vue'\nexport type { SearchInputProps } from './controls/SearchInput.vue'\nexport { default as SearchPage } from './archetypes/SearchPage.vue'\nexport type { SearchPageProps } from './archetypes/SearchPage.vue'\nexport { default as SectionNav } from './structure/SectionNav.vue'\nexport type { SectionNavItem, SectionNavProps } from './structure/SectionNav.vue'\nexport { default as SegmentedControl } from './controls/SegmentedControl.vue'\nexport type {\n SegmentedControlOption,\n SegmentedControlProps,\n SegmentedControlSize,\n} from './controls/SegmentedControl.vue'\nexport { default as Select } from './controls/Select.vue'\nexport type { SelectOption, SelectOptionGroup, SelectProps } from './controls/Select.vue'\nexport { default as Separator } from './structure/Separator.vue'\nexport type { SeparatorOrientation, SeparatorProps } from './structure/Separator.vue'\nexport { default as SettingsPage } from './archetypes/SettingsPage.vue'\nexport type { SettingsPageProps } from './archetypes/SettingsPage.vue'\nimport SettingsRowRoot from './structure/SettingsRow.vue'\nimport SettingsRowGroup from './structure/SettingsRowGroup.vue'\nexport const SettingsRow = /* @__PURE__ */ Object.assign(SettingsRowRoot, {\n Group: SettingsRowGroup,\n})\nexport type { SettingsRowGroupProps } from './structure/SettingsRowGroup.vue'\nexport type { SettingsGroupProps, SettingsRowProps } from './structure/SettingsRow.vue'\nexport { default as Skeleton } from './structure/Skeleton.vue'\nexport type { SkeletonProps, SkeletonShape } from './structure/Skeleton.vue'\nexport { default as Slider } from './controls/Slider.vue'\nexport type { SliderProps } from './controls/Slider.vue'\nexport { default as SourceList } from './ai/SourceList.vue'\nexport type { CitationSource, SourceListProps } from './ai/SourceList.vue'\nexport { default as Sparkline } from './charts/Sparkline.vue'\nexport type { SparklineProps } from './charts/Sparkline.vue'\nexport { default as Spinner } from './structure/Spinner.vue'\nexport type { SpinnerProps } from './structure/Spinner.vue'\nexport { default as SplitButton } from './controls/SplitButton.vue'\nexport type {\n SplitButtonAppearance,\n SplitButtonGrid,\n SplitButtonProps,\n} from './controls/SplitButton.vue'\nexport { default as SplitPane } from './layout/SplitPane.vue'\nexport type { SplitPaneOrientation, SplitPaneProps } from './layout/SplitPane.vue'\nexport { default as Stack } from './layout/Stack.vue'\nexport type { StackAlign, StackElement, StackJustify, StackProps } from './layout/Stack.vue'\nexport { default as Stat } from './structure/Stat.vue'\nexport type {\n DeltaDirection,\n StatDelta,\n StatFooter,\n StatProps,\n StatTrend,\n} from './structure/Stat.vue'\nexport { default as Stepper } from './structure/Stepper.vue'\nexport type {\n Step,\n StepperOrientation,\n StepperProps,\n StepperSpoken,\n StepperSpokenState,\n} from './structure/Stepper.vue'\nexport { default as StreamingText } from './ai/StreamingText.vue'\nexport type { StreamingTextProps, StreamingTextSize } from './ai/StreamingText.vue'\nexport { default as Switch } from './controls/Switch.vue'\nexport type { SwitchProps } from './controls/Switch.vue'\nimport TableRoot from './structure/Table.vue'\nimport TableHead from './structure/TableHead.vue'\nimport TableBody from './structure/TableBody.vue'\nimport TableFoot from './structure/TableFoot.vue'\nimport TableRow from './structure/TableRow.vue'\nimport TableHeader from './structure/TableHeader.vue'\nimport TableCell from './structure/TableCell.vue'\nexport const Table = /* @__PURE__ */ Object.assign(TableRoot, {\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n Header: TableHeader,\n Cell: TableCell,\n})\nexport type { TableHeadProps } from './structure/TableHead.vue'\nexport type { TableBodyProps } from './structure/TableBody.vue'\nexport type { TableFootProps } from './structure/TableFoot.vue'\nexport type { TableRowProps } from './structure/TableRow.vue'\nexport type { TableHeaderProps } from './structure/TableHeader.vue'\nexport type { TableCellProps } from './structure/TableCell.vue'\nexport type {\n CellProps,\n HeaderProps,\n RowProps,\n SortDirection,\n TableProps,\n} from './structure/Table.vue'\nexport { default as TableOfContents } from './structure/TableOfContents.vue'\nexport type { TableOfContentsItem, TableOfContentsProps } from './structure/TableOfContents.vue'\nimport TabsRoot from './overlays/Tabs.vue'\nimport TabsContent from './overlays/TabsContent.vue'\nexport const Tabs = /* @__PURE__ */ Object.assign(TabsRoot, { Content: TabsContent })\nexport type { TabsContentProps } from './overlays/TabsContent.vue'\nexport type { TabDescriptor, TabsOrientation, TabsProps } from './overlays/Tabs.vue'\nexport { default as TagInput } from './controls/TagInput.vue'\nexport type { TagInputProps } from './controls/TagInput.vue'\nexport { default as Text } from './structure/Text.vue'\nexport type { TextProps, TextSize, TextTone } from './structure/Text.vue'\nexport { default as Textarea } from './controls/Textarea.vue'\nexport type { TextareaProps, TextareaResize } from './controls/Textarea.vue'\nexport { default as ThirdParty } from './exceptions/ThirdParty.vue'\nexport type { ThirdPartyProps } from './exceptions/ThirdParty.vue'\nexport { default as TimeInput } from './controls/TimeInput.vue'\nexport type { TimeInputProps } from './controls/TimeInput.vue'\nexport { default as Timeline } from './structure/Timeline.vue'\nexport type { TimelineEvent, TimelineProps, TimelineTone } from './structure/Timeline.vue'\nimport ToastRoot from './overlays/Toast.vue'\nimport ToastViewport from './overlays/ToastViewport.vue'\nexport const Toast = /* @__PURE__ */ Object.assign(ToastRoot, { Viewport: ToastViewport })\nexport type { ToastViewportProps } from './overlays/ToastViewport.vue'\nexport type { ToastProps, ToasterMessages } from './overlays/Toast.vue'\nexport { default as ToneScope } from './exceptions/ToneScope.vue'\nexport type { ScopeElement, Tone, ToneScopeProps } from './exceptions/ToneScope.vue'\nexport { default as ToolCall } from './ai/ToolCall.vue'\nexport type { ToolCallMessages, ToolCallProps, ToolCallStatus } from './ai/ToolCall.vue'\nexport { default as Tooltip } from './overlays/Tooltip.vue'\nexport type { TooltipAlign, TooltipProps, TooltipSide } from './overlays/Tooltip.vue'\nimport TourRoot from './overlays/Tour.vue'\nimport TourTarget from './overlays/TourTarget.vue'\nexport const Tour = /* @__PURE__ */ Object.assign(TourRoot, { Target: TourTarget })\nexport type { TourTargetProps } from './overlays/TourTarget.vue'\nexport type { TourEnd, TourMessages, TourProps, TourStep } from './overlays/Tour.vue'\nexport { default as Tree } from './structure/Tree.vue'\nexport type { TreeItem, TreeMessages, TreeProps } from './structure/Tree.vue'\nexport { default as Treemap } from './charts/Treemap.vue'\nexport type { TreemapProps } from './charts/Treemap.vue'\nexport { default as TreeSelect } from './controls/TreeSelect.vue'\nexport type { TreeSelectProps } from './controls/TreeSelect.vue'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAa,KAA2B,uBAAO,OAAO,GAAc;CAClE,SAAS;CACT,UAAU;CACV,UAAU;AACZ,CAAC,GAuBY,KAAyB,uBAAO,OAAO,GAAY,EAAE,OAAO,EAAY,CAAC,GA+DzE,KAAgC,uBAAO,OAAO,GAAmB,EAC5E,SAAS,GACX,CAAC,GAoBY,KAA4B,uBAAO,OAAO,IAAe,EAAE,OAAO,GAAe,CAAC,GA6FlF,KAAuB,uBAAO,OAAO,IAAU,EAAE,MAAM,GAAS,CAAC,GAgIjE,KAA8B,uBAAO,OAAO,IAAiB,EACxE,OAAO,GACT,CAAC,GAkDY,KAAwB,uBAAO,OAAO,GAAW;CAC5D,MAAM;CACN,MAAM;CACN,MAAM;CACN,KAAK;CACL,QAAQ;CACR,MAAM;AACR,CAAC,GAkBY,KAAuB,uBAAO,OAAO,IAAU,EAAE,SAAS,GAAY,CAAC,GAiBvE,KAAwB,uBAAO,OAAO,IAAW,EAAE,UAAU,GAAc,CAAC,GAW5E,KAAuB,uBAAO,OAAO,IAAU,EAAE,QAAQ,GAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArtifactPane.js","names":[],"sources":["../../../src/ai/ArtifactPane.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A side pane that shows one artifact a turn produced (`design/components/artifact-pane.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/artifact-pane.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n type VNode,\n} from 'vue'\n\nimport { Icon, agentMember, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/ai/artifact-pane.module.css'\nimport Button from '../controls/Button.vue'\nimport SegmentedControl from '../controls/SegmentedControl.vue'\nimport Spinner from '../structure/Spinner.vue'\n\nexport type ArtifactKind = 'code' | 'document' | 'data' | 'preview'\n\nexport interface ArtifactView {\n id: string\n label: string\n content: VNode | string\n}\n\nexport interface ArtifactPaneProps {\n /**\n * The close button's accessible name (generic default `Close`), which localized hosts replace.\n */\n closeLabel?: string\n defaultView?: string\n /**\n * The artifact's kind, which picks the mark (the tier's `artifact` glyph when absent).\n */\n kind?: '
|
|
1
|
+
{"version":3,"file":"ArtifactPane.js","names":[],"sources":["../../../src/ai/ArtifactPane.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A side pane that shows one artifact a turn produced (`design/components/artifact-pane.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/artifact-pane.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n type VNode,\n} from 'vue'\n\nimport { Icon, agentMember, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/ai/artifact-pane.module.css'\nimport Button from '../controls/Button.vue'\nimport SegmentedControl from '../controls/SegmentedControl.vue'\nimport Spinner from '../structure/Spinner.vue'\n\nexport type ArtifactKind = 'code' | 'document' | 'data' | 'preview'\n\nexport interface ArtifactView {\n id: string\n label: string\n content: VNode | string\n}\n\nexport interface ArtifactPaneProps {\n /**\n * The close button's accessible name (generic default `Close`), which localized hosts replace.\n */\n closeLabel?: string\n defaultView?: string\n /**\n * The artifact's kind, which picks the mark (the tier's `artifact` glyph when absent).\n */\n kind?: 'code' | 'document' | 'data' | 'preview'\n /**\n * One preformatted line under the title, such as \"TypeScript · 142 lines\".\n */\n meta?: string\n /**\n * Whether the artifact is still being written, which shows a spinner and sets `aria-busy`.\n */\n streaming?: boolean\n /**\n * The artifact's name, used as the pane's heading and accessible name.\n */\n title: string\n view?: string\n /**\n * The artifact's views (code, preview). Two or more draw a switch, and a single view is drawn\n * with no switch. When `views` is absent or empty, `children` is the body.\n */\n views?: ArtifactView[]\n /**\n * The switch's accessible name (generic default `View`).\n */\n viewsLabel?: string\n}\n\ndefineOptions({ name: 'ArtifactPane', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ArtifactPaneProps>(), {\n closeLabel: 'Close',\n streaming: false,\n viewsLabel: 'View',\n})\nconst emit = defineEmits<{ close: []; viewChange: [id: string] }>()\ndefineSlots<{\n actions?: (props: Record<string, never>) => unknown\n default?: (props: Record<string, never>) => unknown\n}>()\nconst uid = useId()\nconst listening = useListening()\nconst overflowing = ref(false)\nconst mirror = ref(props.defaultView ?? props.views?.[0]?.id)\nconst body = useTemplateRef<HTMLElement>('body')\nconst closer = useTemplateRef<HTMLElement>('closer')\nconst pane = useTemplateRef<HTMLElement>('pane')\nconst switcher = useTemplateRef<HTMLElement>('switcher')\nconst titleId = computed(() => `${uid}-title`)\nconst current = computed(() => props.view ?? mirror.value)\nconst switching = computed(() => props.views !== undefined && props.views.length > 1)\nconst shown = computed(() =>\n props.views === undefined\n ? undefined\n : (props.views.find((entry) => entry.id === current.value) ?? props.views[0]),\n)\nconst mark = computed(() =>\n props.kind === undefined\n ? 'artifact'\n : ({ code: 'terminal', document: 'document', data: 'table', preview: 'browser' } as const)[\n props.kind\n ],\n)\nconst choices = computed(() =>\n (props.views ?? []).map((entry) => ({ value: entry.id, label: entry.label })),\n)\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value = body.value !== null && body.value.scrollHeight > body.value.clientHeight\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [body.value, body.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nwatch(() => shown.value?.id, effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'ArtifactPane',\n element: () => pane.value,\n state: () => ({\n view: shown.value?.id ?? null,\n views: (props.views ?? []).map((entry) => ({ id: entry.id, label: entry.label })),\n streaming: props.streaming,\n }),\n actions: {\n choose: {\n argument: 'id',\n run: (value) =>\n value !== shown.value?.id && ((mirror.value = value), emit('viewChange', value)),\n },\n close: () =>\n (() => {\n if (!listening.close) throw new Error('The pane has no close control.')\n emit('close')\n })(),\n },\n withholds: () => [switcher.value, closer.value],\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <section\n ref=\"pane\"\n :class=\"styles.pane\"\n :aria-labelledby=\"titleId\"\n :data-kind=\"kind\"\n :data-state=\"streaming ? 'streaming' : undefined\"\n :aria-busy=\"streaming ? true : undefined\"\n data-member=\"artifact-pane\"\n >\n <header :class=\"styles.header\">\n <span :class=\"styles.mark\">\n <Spinner v-if=\"streaming\" size=\"sm\" :label=\"`${title}: still being written`\" />\n <Icon v-else :name=\"mark\" size=\"sm\" />\n </span>\n <div :class=\"styles.heading\">\n <h2 :class=\"styles.title\" :id=\"titleId\">\n {{ title }}\n </h2>\n <p v-if=\"meta !== undefined\" :class=\"styles.meta\">\n {{ meta }}\n </p>\n </div>\n <div v-if=\"switching\" ref=\"switcher\" :class=\"styles.views\">\n <SegmentedControl\n size=\"sm\"\n :label=\"viewsLabel\"\n :options=\"choices\"\n :value=\"current\"\n @change=\"((mirror = $event), emit('viewChange', $event))\"\n />\n </div>\n <div v-if=\"$slots.actions\" :class=\"styles.actions\">\n <slot name=\"actions\" />\n </div>\n <div v-if=\"listening.close\" ref=\"closer\" :class=\"styles.close\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n :iconOnly=\"true\"\n icon=\"close\"\n :label=\"closeLabel\"\n @click=\"emit('close')\"\n />\n </div>\n </header>\n <div\n ref=\"body\"\n :class=\"styles.body\"\n :data-view=\"shown?.id\"\n :tabindex=\"overflowing ? 0 : undefined\"\n :role=\"overflowing ? 'group' : undefined\"\n :aria-labelledby=\"overflowing ? titleId : undefined\"\n >\n <div :class=\"styles.content\">\n <template v-if=\"shown === undefined\">\n <slot />\n </template>\n <template v-else-if=\"typeof shown.content === 'string'\">{{ shown.content }}</template>\n <template v-else>\n <component :is=\"shown.content\" />\n </template>\n </div>\n </div>\n </section>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArtifactPane.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/ai/ArtifactPane.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A side pane that shows one artifact a turn produced (`design/components/artifact-pane.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/artifact-pane.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n type VNode,\n} from 'vue'\n\nimport { Icon, agentMember, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/ai/artifact-pane.module.css'\nimport Button from '../controls/Button.vue'\nimport SegmentedControl from '../controls/SegmentedControl.vue'\nimport Spinner from '../structure/Spinner.vue'\n\nexport type ArtifactKind = 'code' | 'document' | 'data' | 'preview'\n\nexport interface ArtifactView {\n id: string\n label: string\n content: VNode | string\n}\n\nexport interface ArtifactPaneProps {\n /**\n * The close button's accessible name (generic default `Close`), which localized hosts replace.\n */\n closeLabel?: string\n defaultView?: string\n /**\n * The artifact's kind, which picks the mark (the tier's `artifact` glyph when absent).\n */\n kind?: 'document' | 'code' | 'data' | 'preview'\n /**\n * One preformatted line under the title, such as \"TypeScript · 142 lines\".\n */\n meta?: string\n /**\n * Whether the artifact is still being written, which shows a spinner and sets `aria-busy`.\n */\n streaming?: boolean\n /**\n * The artifact's name, used as the pane's heading and accessible name.\n */\n title: string\n view?: string\n /**\n * The artifact's views (code, preview). Two or more draw a switch, and a single view is drawn\n * with no switch. When `views` is absent or empty, `children` is the body.\n */\n views?: ArtifactView[]\n /**\n * The switch's accessible name (generic default `View`).\n */\n viewsLabel?: string\n}\n\ndefineOptions({ name: 'ArtifactPane', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ArtifactPaneProps>(), {\n closeLabel: 'Close',\n streaming: false,\n viewsLabel: 'View',\n})\nconst emit = defineEmits<{ close: []; viewChange: [id: string] }>()\ndefineSlots<{\n actions?: (props: Record<string, never>) => unknown\n default?: (props: Record<string, never>) => unknown\n}>()\nconst uid = useId()\nconst listening = useListening()\nconst overflowing = ref(false)\nconst mirror = ref(props.defaultView ?? props.views?.[0]?.id)\nconst body = useTemplateRef<HTMLElement>('body')\nconst closer = useTemplateRef<HTMLElement>('closer')\nconst pane = useTemplateRef<HTMLElement>('pane')\nconst switcher = useTemplateRef<HTMLElement>('switcher')\nconst titleId = computed(() => `${uid}-title`)\nconst current = computed(() => props.view ?? mirror.value)\nconst switching = computed(() => props.views !== undefined && props.views.length > 1)\nconst shown = computed(() =>\n props.views === undefined\n ? undefined\n : (props.views.find((entry) => entry.id === current.value) ?? props.views[0]),\n)\nconst mark = computed(() =>\n props.kind === undefined\n ? 'artifact'\n : ({ code: 'terminal', document: 'document', data: 'table', preview: 'browser' } as const)[\n props.kind\n ],\n)\nconst choices = computed(() =>\n (props.views ?? []).map((entry) => ({ value: entry.id, label: entry.label })),\n)\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value = body.value !== null && body.value.scrollHeight > body.value.clientHeight\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [body.value, body.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nwatch(() => shown.value?.id, effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'ArtifactPane',\n element: () => pane.value,\n state: () => ({\n view: shown.value?.id ?? null,\n views: (props.views ?? []).map((entry) => ({ id: entry.id, label: entry.label })),\n streaming: props.streaming,\n }),\n actions: {\n choose: {\n argument: 'id',\n run: (value) =>\n value !== shown.value?.id && ((mirror.value = value), emit('viewChange', value)),\n },\n close: () =>\n (() => {\n if (!listening.close) throw new Error('The pane has no close control.')\n emit('close')\n })(),\n },\n withholds: () => [switcher.value, closer.value],\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <section\n ref=\"pane\"\n :class=\"styles.pane\"\n :aria-labelledby=\"titleId\"\n :data-kind=\"kind\"\n :data-state=\"streaming ? 'streaming' : undefined\"\n :aria-busy=\"streaming ? true : undefined\"\n data-member=\"artifact-pane\"\n >\n <header :class=\"styles.header\">\n <span :class=\"styles.mark\">\n <Spinner v-if=\"streaming\" size=\"sm\" :label=\"`${title}: still being written`\" />\n <Icon v-else :name=\"mark\" size=\"sm\" />\n </span>\n <div :class=\"styles.heading\">\n <h2 :class=\"styles.title\" :id=\"titleId\">\n {{ title }}\n </h2>\n <p v-if=\"meta !== undefined\" :class=\"styles.meta\">\n {{ meta }}\n </p>\n </div>\n <div v-if=\"switching\" ref=\"switcher\" :class=\"styles.views\">\n <SegmentedControl\n size=\"sm\"\n :label=\"viewsLabel\"\n :options=\"choices\"\n :value=\"current\"\n @change=\"((mirror = $event), emit('viewChange', $event))\"\n />\n </div>\n <div v-if=\"$slots.actions\" :class=\"styles.actions\">\n <slot name=\"actions\" />\n </div>\n <div v-if=\"listening.close\" ref=\"closer\" :class=\"styles.close\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n :iconOnly=\"true\"\n icon=\"close\"\n :label=\"closeLabel\"\n @click=\"emit('close')\"\n />\n </div>\n </header>\n <div\n ref=\"body\"\n :class=\"styles.body\"\n :data-view=\"shown?.id\"\n :tabindex=\"overflowing ? 0 : undefined\"\n :role=\"overflowing ? 'group' : undefined\"\n :aria-labelledby=\"overflowing ? titleId : undefined\"\n >\n <div :class=\"styles.content\">\n <template v-if=\"shown === undefined\">\n <slot />\n </template>\n <template v-else-if=\"typeof shown.content === 'string'\">{{ shown.content }}</template>\n <template v-else>\n <component :is=\"shown.content\" />\n </template>\n </div>\n </div>\n </section>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqEA,IAAM,IAAQ,GAKR,IAAO,GAKP,IAAM,EAAM,GACZ,IAAY,EAAa,GACzB,IAAc,EAAI,EAAK,GACvB,IAAS,EAAI,EAAM,eAAe,EAAM,QAAQ,EAAE,EAAE,EAAE,GACtD,IAAO,EAA4B,MAAM,GACzC,IAAS,EAA4B,QAAQ,GAC7C,IAAO,EAA4B,MAAM,GACzC,IAAW,EAA4B,UAAU,GACjD,IAAU,QAAe,GAAG,EAAI,OAAO,GACvC,IAAU,QAAe,EAAM,QAAQ,EAAO,KAAK,GACnD,IAAY,QAAe,EAAM,UAAU,KAAA,KAAa,EAAM,MAAM,SAAS,CAAC,GAC9E,IAAQ,QACZ,EAAM,UAAU,KAAA,IACZ,KA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"}
|
|
1
|
+
{"version":3,"file":"ArtifactPane.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/ai/ArtifactPane.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A side pane that shows one artifact a turn produced (`design/components/artifact-pane.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/artifact-pane.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n useTemplateRef,\n watch,\n type VNode,\n} from 'vue'\n\nimport { Icon, agentMember, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/ai/artifact-pane.module.css'\nimport Button from '../controls/Button.vue'\nimport SegmentedControl from '../controls/SegmentedControl.vue'\nimport Spinner from '../structure/Spinner.vue'\n\nexport type ArtifactKind = 'code' | 'document' | 'data' | 'preview'\n\nexport interface ArtifactView {\n id: string\n label: string\n content: VNode | string\n}\n\nexport interface ArtifactPaneProps {\n /**\n * The close button's accessible name (generic default `Close`), which localized hosts replace.\n */\n closeLabel?: string\n defaultView?: string\n /**\n * The artifact's kind, which picks the mark (the tier's `artifact` glyph when absent).\n */\n kind?: 'code' | 'document' | 'data' | 'preview'\n /**\n * One preformatted line under the title, such as \"TypeScript · 142 lines\".\n */\n meta?: string\n /**\n * Whether the artifact is still being written, which shows a spinner and sets `aria-busy`.\n */\n streaming?: boolean\n /**\n * The artifact's name, used as the pane's heading and accessible name.\n */\n title: string\n view?: string\n /**\n * The artifact's views (code, preview). Two or more draw a switch, and a single view is drawn\n * with no switch. When `views` is absent or empty, `children` is the body.\n */\n views?: ArtifactView[]\n /**\n * The switch's accessible name (generic default `View`).\n */\n viewsLabel?: string\n}\n\ndefineOptions({ name: 'ArtifactPane', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ArtifactPaneProps>(), {\n closeLabel: 'Close',\n streaming: false,\n viewsLabel: 'View',\n})\nconst emit = defineEmits<{ close: []; viewChange: [id: string] }>()\ndefineSlots<{\n actions?: (props: Record<string, never>) => unknown\n default?: (props: Record<string, never>) => unknown\n}>()\nconst uid = useId()\nconst listening = useListening()\nconst overflowing = ref(false)\nconst mirror = ref(props.defaultView ?? props.views?.[0]?.id)\nconst body = useTemplateRef<HTMLElement>('body')\nconst closer = useTemplateRef<HTMLElement>('closer')\nconst pane = useTemplateRef<HTMLElement>('pane')\nconst switcher = useTemplateRef<HTMLElement>('switcher')\nconst titleId = computed(() => `${uid}-title`)\nconst current = computed(() => props.view ?? mirror.value)\nconst switching = computed(() => props.views !== undefined && props.views.length > 1)\nconst shown = computed(() =>\n props.views === undefined\n ? undefined\n : (props.views.find((entry) => entry.id === current.value) ?? props.views[0]),\n)\nconst mark = computed(() =>\n props.kind === undefined\n ? 'artifact'\n : ({ code: 'terminal', document: 'document', data: 'table', preview: 'browser' } as const)[\n props.kind\n ],\n)\nconst choices = computed(() =>\n (props.views ?? []).map((entry) => ({ value: entry.id, label: entry.label })),\n)\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value = body.value !== null && body.value.scrollHeight > body.value.clientHeight\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [body.value, body.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nwatch(() => shown.value?.id, effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'ArtifactPane',\n element: () => pane.value,\n state: () => ({\n view: shown.value?.id ?? null,\n views: (props.views ?? []).map((entry) => ({ id: entry.id, label: entry.label })),\n streaming: props.streaming,\n }),\n actions: {\n choose: {\n argument: 'id',\n run: (value) =>\n value !== shown.value?.id && ((mirror.value = value), emit('viewChange', value)),\n },\n close: () =>\n (() => {\n if (!listening.close) throw new Error('The pane has no close control.')\n emit('close')\n })(),\n },\n withholds: () => [switcher.value, closer.value],\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <section\n ref=\"pane\"\n :class=\"styles.pane\"\n :aria-labelledby=\"titleId\"\n :data-kind=\"kind\"\n :data-state=\"streaming ? 'streaming' : undefined\"\n :aria-busy=\"streaming ? true : undefined\"\n data-member=\"artifact-pane\"\n >\n <header :class=\"styles.header\">\n <span :class=\"styles.mark\">\n <Spinner v-if=\"streaming\" size=\"sm\" :label=\"`${title}: still being written`\" />\n <Icon v-else :name=\"mark\" size=\"sm\" />\n </span>\n <div :class=\"styles.heading\">\n <h2 :class=\"styles.title\" :id=\"titleId\">\n {{ title }}\n </h2>\n <p v-if=\"meta !== undefined\" :class=\"styles.meta\">\n {{ meta }}\n </p>\n </div>\n <div v-if=\"switching\" ref=\"switcher\" :class=\"styles.views\">\n <SegmentedControl\n size=\"sm\"\n :label=\"viewsLabel\"\n :options=\"choices\"\n :value=\"current\"\n @change=\"((mirror = $event), emit('viewChange', $event))\"\n />\n </div>\n <div v-if=\"$slots.actions\" :class=\"styles.actions\">\n <slot name=\"actions\" />\n </div>\n <div v-if=\"listening.close\" ref=\"closer\" :class=\"styles.close\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n :iconOnly=\"true\"\n icon=\"close\"\n :label=\"closeLabel\"\n @click=\"emit('close')\"\n />\n </div>\n </header>\n <div\n ref=\"body\"\n :class=\"styles.body\"\n :data-view=\"shown?.id\"\n :tabindex=\"overflowing ? 0 : undefined\"\n :role=\"overflowing ? 'group' : undefined\"\n :aria-labelledby=\"overflowing ? titleId : undefined\"\n >\n <div :class=\"styles.content\">\n <template v-if=\"shown === undefined\">\n <slot />\n </template>\n <template v-else-if=\"typeof shown.content === 'string'\">{{ shown.content }}</template>\n <template v-else>\n <component :is=\"shown.content\" />\n </template>\n </div>\n </div>\n </section>\n</template>\n"],"mappings":";;;;;;;;;;;;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AA;MAE1C,EAQM,OAAA,EARA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,OAAO,EAAA,GAAA,CACT,EAAA,UAAU,KAAA,IACxB,EAAQ,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,OAEkB,EAAA,MAAM,WAAO,YAAA,EAAA,GAAzC,EAAsF,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EAA3B,EAAA,MAAM,OAAO,GAAA,CAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GAEtE,EAAiC,EAAjB,EAAA,MAAM,OAAO,GAAA,EAAA,KAAA,EAAA,CAAA,EAAA,GAAA,CAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasterDetailPage.js","names":[],"sources":["../../../src/archetypes/MasterDetailPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A list beside the selected item's detail (`design/archetypes/master-detail-page.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/master-detail-page.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue'\n\nimport { afterRender, masterDetailFocus, masterDetailHolds, useTrackedSlots } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/archetypes/master-detail-page.module.css'\nimport Button from '../controls/Button.vue'\nimport EmptyState, { type EmptyStateProps } from '../structure/EmptyState.vue'\nimport PageHeader from '../structure/PageHeader.vue'\nimport SplitPane from '../layout/SplitPane.vue'\n\nexport interface MasterDetailPageProps {\n /**\n * The way back to the list while the detail is drawn alone.\n */\n backLabel: string\n description?: string\n /**\n * The detail pane while nothing is selected, in the split. Required so the page always decides\n * it.\n */\n emptyState: EmptyStateProps\n /**\n * Names the list pane's region and the split's separator.\n */\n listLabel: string\n title: string\n}\n\ndefineOptions({ name: 'MasterDetailPage', inheritAttrs: false })\n\ndefineProps<MasterDetailPageProps>()\nconst emit = defineEmits<{ back: [] }>()\nconst callerSlots = defineSlots<{\n actions?: (props: Record<string, never>) => unknown\n detail?: (props: Record<string, never>) => unknown\n list: (props: Record<string, never>) => unknown\n}>()\nconst slots = useTrackedSlots(callerSlots)\nconst narrow = ref(false)\nconst held = ref(false)\nconst selected = ref(
|
|
1
|
+
{"version":3,"file":"MasterDetailPage.js","names":[],"sources":["../../../src/archetypes/MasterDetailPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A list beside the selected item's detail (`design/archetypes/master-detail-page.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/master-detail-page.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue'\n\nimport { afterRender, masterDetailFocus, masterDetailHolds, useTrackedSlots } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/archetypes/master-detail-page.module.css'\nimport Button from '../controls/Button.vue'\nimport EmptyState, { type EmptyStateProps } from '../structure/EmptyState.vue'\nimport PageHeader from '../structure/PageHeader.vue'\nimport SplitPane from '../layout/SplitPane.vue'\n\nexport interface MasterDetailPageProps {\n /**\n * The way back to the list while the detail is drawn alone.\n */\n backLabel: string\n description?: string\n /**\n * The detail pane while nothing is selected, in the split. Required so the page always decides\n * it.\n */\n emptyState: EmptyStateProps\n /**\n * Names the list pane's region and the split's separator.\n */\n listLabel: string\n title: string\n}\n\ndefineOptions({ name: 'MasterDetailPage', inheritAttrs: false })\n\ndefineProps<MasterDetailPageProps>()\nconst emit = defineEmits<{ back: [] }>()\nconst callerSlots = defineSlots<{\n actions?: (props: Record<string, never>) => unknown\n detail?: (props: Record<string, never>) => unknown\n list: (props: Record<string, never>) => unknown\n}>()\nconst slots = useTrackedSlots(callerSlots)\nconst narrow = ref(false)\nconst held = ref(false)\nconst selected = ref(Boolean(slots.detail))\nconst body = useTemplateRef<HTMLElement>('body')\nconst root = useTemplateRef<HTMLElement>('root')\nconst measure = computed(() => () => {\n if (root.value === null) return\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16\n narrow.value = root.value.getBoundingClientRect().width < 48 * rem\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n measure.value()\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [root.value]) if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n selected.value = Boolean(slots.detail)\n}\nonMounted(effect2)\nwatch(() => Boolean(slots.detail), effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const listener = ($event: DocumentEventMap['focusin']) => {\n held.value = masterDetailHolds(body.value, $event)\n }\n document.addEventListener('focusin', listener)\n release3 = () => document.removeEventListener('focusin', listener)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\nconst effect4 = () => {\n afterRender(() => masterDetailFocus(body.value, held.value))\n}\nwatch(\n () =>\n narrow.value ? (selected.value ? 'detail' : 'list') : selected.value ? 'split-detail' : 'split',\n effect4,\n { flush: 'post' },\n)\n</script>\n\n<template>\n <div\n ref=\"root\"\n :class=\"styles.page\"\n :data-layout=\"narrow ? 'single' : 'split'\"\n :data-pane=\"narrow ? (selected ? 'detail' : 'list') : undefined\"\n data-member=\"master-detail-page\"\n >\n <PageHeader :title=\"title\" :description=\"description\">\n <template v-if=\"$slots.actions\" #actions>\n <slot name=\"actions\" />\n </template>\n </PageHeader>\n <!-- body -->\n <div ref=\"body\" :class=\"styles.body\">\n <template v-if=\"narrow\">\n <!-- list -->\n <section\n :class=\"styles.list\"\n :aria-label=\"listLabel\"\n tabindex=\"-1\"\n :hidden=\"selected\"\n data-master-detail-page-part=\"list\"\n >\n <slot name=\"list\" />\n </section>\n <!-- detail -->\n <div v-if=\"selected\" :class=\"styles.detail\" data-master-detail-page-part=\"detail\">\n <!-- back -->\n <div :class=\"styles.back\" data-master-detail-page-part=\"back\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n icon=\"back\"\n :label=\"backLabel\"\n @click=\"emit('back')\"\n />\n </div>\n <!-- scroll -->\n <div :class=\"styles.scroll\">\n <slot name=\"detail\" />\n </div>\n </div>\n </template>\n <SplitPane v-else :label=\"listLabel\" :defaultRatio=\"0.32\" :startMin=\"240\" :endMin=\"420\">\n <template #start>\n <!-- list -->\n <section\n :class=\"styles.list\"\n :aria-label=\"listLabel\"\n tabindex=\"-1\"\n data-master-detail-page-part=\"list\"\n >\n <slot name=\"list\" />\n </section>\n </template>\n <template #end>\n <!-- detail -->\n <div :class=\"styles.detail\" data-master-detail-page-part=\"detail\">\n <!-- scroll -->\n <div v-if=\"selected\" :class=\"styles.scroll\">\n <slot name=\"detail\" />\n </div>\n <!-- empty -->\n <div v-else :class=\"styles.empty\">\n <EmptyState\n :icon=\"emptyState.icon\"\n :title=\"emptyState.title\"\n :description=\"emptyState.description\"\n >\n <template v-if=\"emptyState.action !== undefined\" #action>\n <component :is=\"emptyState.action\" />\n </template>\n <template v-if=\"emptyState.secondaryAction !== undefined\" #secondaryAction>\n <component :is=\"emptyState.secondaryAction\" />\n </template>\n </EmptyState>\n </div>\n </div>\n </template>\n </SplitPane>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -19,7 +19,7 @@ var A = ["data-layout", "data-pane"], j = ["aria-label", "hidden"], M = ["aria-l
|
|
|
19
19
|
},
|
|
20
20
|
emits: ["back"],
|
|
21
21
|
setup(_, { emit: N }) {
|
|
22
|
-
let P = N, F = c(E()), I = S(!1), L = S(!1), R = S(
|
|
22
|
+
let P = N, F = c(E()), I = S(!1), L = S(!1), R = S(!!F.detail), z = D("body"), B = D("root"), V = u(() => () => {
|
|
23
23
|
if (B.value === null) return;
|
|
24
24
|
let e = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
25
25
|
I.value = B.value.getBoundingClientRect().width < 48 * e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasterDetailPage.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/archetypes/MasterDetailPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A list beside the selected item's detail (`design/archetypes/master-detail-page.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/master-detail-page.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue'\n\nimport { afterRender, masterDetailFocus, masterDetailHolds, useTrackedSlots } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/archetypes/master-detail-page.module.css'\nimport Button from '../controls/Button.vue'\nimport EmptyState, { type EmptyStateProps } from '../structure/EmptyState.vue'\nimport PageHeader from '../structure/PageHeader.vue'\nimport SplitPane from '../layout/SplitPane.vue'\n\nexport interface MasterDetailPageProps {\n /**\n * The way back to the list while the detail is drawn alone.\n */\n backLabel: string\n description?: string\n /**\n * The detail pane while nothing is selected, in the split. Required so the page always decides\n * it.\n */\n emptyState: EmptyStateProps\n /**\n * Names the list pane's region and the split's separator.\n */\n listLabel: string\n title: string\n}\n\ndefineOptions({ name: 'MasterDetailPage', inheritAttrs: false })\n\ndefineProps<MasterDetailPageProps>()\nconst emit = defineEmits<{ back: [] }>()\nconst callerSlots = defineSlots<{\n actions?: (props: Record<string, never>) => unknown\n detail?: (props: Record<string, never>) => unknown\n list: (props: Record<string, never>) => unknown\n}>()\nconst slots = useTrackedSlots(callerSlots)\nconst narrow = ref(false)\nconst held = ref(false)\nconst selected = ref(
|
|
1
|
+
{"version":3,"file":"MasterDetailPage.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/archetypes/MasterDetailPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A list beside the selected item's detail (`design/archetypes/master-detail-page.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/master-detail-page.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue'\n\nimport { afterRender, masterDetailFocus, masterDetailHolds, useTrackedSlots } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/archetypes/master-detail-page.module.css'\nimport Button from '../controls/Button.vue'\nimport EmptyState, { type EmptyStateProps } from '../structure/EmptyState.vue'\nimport PageHeader from '../structure/PageHeader.vue'\nimport SplitPane from '../layout/SplitPane.vue'\n\nexport interface MasterDetailPageProps {\n /**\n * The way back to the list while the detail is drawn alone.\n */\n backLabel: string\n description?: string\n /**\n * The detail pane while nothing is selected, in the split. Required so the page always decides\n * it.\n */\n emptyState: EmptyStateProps\n /**\n * Names the list pane's region and the split's separator.\n */\n listLabel: string\n title: string\n}\n\ndefineOptions({ name: 'MasterDetailPage', inheritAttrs: false })\n\ndefineProps<MasterDetailPageProps>()\nconst emit = defineEmits<{ back: [] }>()\nconst callerSlots = defineSlots<{\n actions?: (props: Record<string, never>) => unknown\n detail?: (props: Record<string, never>) => unknown\n list: (props: Record<string, never>) => unknown\n}>()\nconst slots = useTrackedSlots(callerSlots)\nconst narrow = ref(false)\nconst held = ref(false)\nconst selected = ref(Boolean(slots.detail))\nconst body = useTemplateRef<HTMLElement>('body')\nconst root = useTemplateRef<HTMLElement>('root')\nconst measure = computed(() => () => {\n if (root.value === null) return\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16\n narrow.value = root.value.getBoundingClientRect().width < 48 * rem\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n measure.value()\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [root.value]) if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n selected.value = Boolean(slots.detail)\n}\nonMounted(effect2)\nwatch(() => Boolean(slots.detail), effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const listener = ($event: DocumentEventMap['focusin']) => {\n held.value = masterDetailHolds(body.value, $event)\n }\n document.addEventListener('focusin', listener)\n release3 = () => document.removeEventListener('focusin', listener)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\nconst effect4 = () => {\n afterRender(() => masterDetailFocus(body.value, held.value))\n}\nwatch(\n () =>\n narrow.value ? (selected.value ? 'detail' : 'list') : selected.value ? 'split-detail' : 'split',\n effect4,\n { flush: 'post' },\n)\n</script>\n\n<template>\n <div\n ref=\"root\"\n :class=\"styles.page\"\n :data-layout=\"narrow ? 'single' : 'split'\"\n :data-pane=\"narrow ? (selected ? 'detail' : 'list') : undefined\"\n data-member=\"master-detail-page\"\n >\n <PageHeader :title=\"title\" :description=\"description\">\n <template v-if=\"$slots.actions\" #actions>\n <slot name=\"actions\" />\n </template>\n </PageHeader>\n <!-- body -->\n <div ref=\"body\" :class=\"styles.body\">\n <template v-if=\"narrow\">\n <!-- list -->\n <section\n :class=\"styles.list\"\n :aria-label=\"listLabel\"\n tabindex=\"-1\"\n :hidden=\"selected\"\n data-master-detail-page-part=\"list\"\n >\n <slot name=\"list\" />\n </section>\n <!-- detail -->\n <div v-if=\"selected\" :class=\"styles.detail\" data-master-detail-page-part=\"detail\">\n <!-- back -->\n <div :class=\"styles.back\" data-master-detail-page-part=\"back\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n icon=\"back\"\n :label=\"backLabel\"\n @click=\"emit('back')\"\n />\n </div>\n <!-- scroll -->\n <div :class=\"styles.scroll\">\n <slot name=\"detail\" />\n </div>\n </div>\n </template>\n <SplitPane v-else :label=\"listLabel\" :defaultRatio=\"0.32\" :startMin=\"240\" :endMin=\"420\">\n <template #start>\n <!-- list -->\n <section\n :class=\"styles.list\"\n :aria-label=\"listLabel\"\n tabindex=\"-1\"\n data-master-detail-page-part=\"list\"\n >\n <slot name=\"list\" />\n </section>\n </template>\n <template #end>\n <!-- detail -->\n <div :class=\"styles.detail\" data-master-detail-page-part=\"detail\">\n <!-- scroll -->\n <div v-if=\"selected\" :class=\"styles.scroll\">\n <slot name=\"detail\" />\n </div>\n <!-- empty -->\n <div v-else :class=\"styles.empty\">\n <EmptyState\n :icon=\"emptyState.icon\"\n :title=\"emptyState.title\"\n :description=\"emptyState.description\"\n >\n <template v-if=\"emptyState.action !== undefined\" #action>\n <component :is=\"emptyState.action\" />\n </template>\n <template v-if=\"emptyState.secondaryAction !== undefined\" #secondaryAction>\n <component :is=\"emptyState.secondaryAction\" />\n </template>\n </EmptyState>\n </div>\n </div>\n </template>\n </SplitPane>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAsCA,IAAM,IAAO,GAMP,IAAQ,EALM,EAKU,CAAW,GACnC,IAAS,EAAI,EAAK,GAClB,IAAO,EAAI,EAAK,GAChB,IAAW,EAAI,EAAQ,EAAM,MAAO,GACpC,IAAO,EAA4B,MAAM,GACzC,IAAO,EAA4B,MAAM,GACzC,IAAU,cAAqB;GACnC,IAAI,EAAK,UAAU,MAAM;GACzB,IAAM,IAAM,OAAO,WAAW,iBAAiB,SAAS,eAAe,CAAC,CAAC,QAAQ,KAAK;GACtF,EAAO,QAAQ,EAAK,MAAM,sBAAsB,CAAC,CAAC,QAAQ,KAAK;EACjE,CAAC,GACG;EAcJ,AADA,QAZsB;GACpB,IAAW;GACX,IAAM,UAAY;IAChB,EAAQ,MAAM;GAChB,GACM,IAAS,OAAO,iBAAmB,MAAc,KAAA,IAAY,IAAI,eAAe,CAAG;GACzF,KAAK,IAAM,KAAW,CAAC,EAAK,KAAK,GAAG,AAAI,KAAS,GAAQ,QAAQ,CAAO;GAIxE,AAHA,UAA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;IAClB,aAAa,EAAA,WAAW;mBAET,EAAA,WAAW,WAAW,KAAA,aAAA;UAAY;gBACX,EAAA,EAAA,GAArC,EAAqC,EAArB,EAAA,WAAW,MAAM,CAAA,EAAA,CAAA;;MAEnB,EAAA,WAAW,oBAAoB,KAAA,aAAA;UAAY;gBACX,EAAA,EAAA,GAA9C,EAA8C,EAA9B,EAAA,WAAW,eAAe,CAAA,EAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../recipes/src/archetypes/app-shell.module.css
|
|
2
|
-
var e = "
|
|
2
|
+
var e = "_shell_2zlpo_13", t = "_sidebar_2zlpo_9", n = "_railHead_2zlpo_68", r = "_brand_2zlpo_76", i = "_nav_2zlpo_84", a = "_sidebarFooter_2zlpo_93", o = "_navItem_2zlpo_105 _focusRing_1lfnc_15 _stateFeedback_lkjqs_17 _pressable_lkjqs_38", s = "_navGlyph_2zlpo_134 _stateFeedback_lkjqs_17", c = "_navLabel_2zlpo_143", l = "_navEnd_2zlpo_151", u = "_navGroup_2zlpo_163", d = "_navGroupLabel_2zlpo_172", f = "_userCard_2zlpo_193", p = "_userText_2zlpo_204", m = "_userName_2zlpo_211", h = "_userDetail_2zlpo_225", g = "_userEnd_2zlpo_237", _ = "_toggle_2zlpo_269", v = "_banner_2zlpo_276", y = "_topbar_2zlpo_281", b = "_topbarSlot_2zlpo_296", x = "_content_2zlpo_329", S = "_page_2zlpo_340", C = "_dock_2zlpo_368", w = "_skip_2zlpo_387 _focusRing_1lfnc_15", T = "_scrim_2zlpo_507", E = "_drawerToggle_2zlpo_525", D = {
|
|
3
3
|
shell: e,
|
|
4
4
|
sidebar: t,
|
|
5
5
|
railHead: n,
|
|
@@ -26,7 +26,7 @@ var e = "_shell_16r3p_13", t = "_sidebar_16r3p_9", n = "_railHead_16r3p_68", r =
|
|
|
26
26
|
dock: C,
|
|
27
27
|
skip: w,
|
|
28
28
|
scrim: T,
|
|
29
|
-
"shell-scrim-enter": "_shell-scrim-
|
|
29
|
+
"shell-scrim-enter": "_shell-scrim-enter_2zlpo_1",
|
|
30
30
|
drawerToggle: E
|
|
31
31
|
};
|
|
32
32
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.module.js","names":[],"sources":["../../../../recipes/src/archetypes/app-shell.module.css"],"sourcesContent":["/* AppShell — `design/archetypes/app-shell.md`.\n *\n * The `--pm-shell-*` scope is declared here and nowhere else. The values are\n * computed from space tokens, so a compact theme gets a tighter frame with no\n * extra declaration. Changing one of them is a one-line change that no screen\n * needs to know about (the churn test in `pages.test.tsx`).\n *\n * The sidebar collapse is the only animated structural change in the shell.\n * It uses the `appshell.sidebar` binding: `collapse` in persistent mode on the\n * inline axis. Law 2 lets a container animate only its size, and a grid track\n * counts as a container. */\n\n.shell {\n --pm-shell-topbar-height: calc(var(--pm-space-7) + var(--pm-space-6));\n --pm-shell-sidebar-width: calc(var(--pm-space-10) * 2 + var(--pm-space-7));\n --pm-shell-sidebar-width-collapsed: calc(var(--pm-space-7) + var(--pm-space-5));\n\n display: grid;\n grid-template:\n 'banner banner' auto\n 'sidebar topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'sidebar content' minmax(0, 1fr)\n / var(--pm-shell-sidebar-width) minmax(0, 1fr);\n min-inline-size: 0;\n inline-size: 100%;\n\n /* On phones `100vh` includes the collapsed browser chrome, so a `100vh`\n shell puts its bottom edge behind the URL bar (`docs/layout.md`). The\n fallback pattern (app-shell.md's root cell) puts the `vh` base here and\n the `dvh` override in the `@supports` block below. A deduplicating\n minifier would merge two declarations of one property in the same rule,\n and the built CSS would ship with only `dvh`. */\n block-size: 100vh;\n\n /* The texture sits on the page surface it decorates. It is `none` for themes\n whose ornament level disables it, and the colour underneath is exactly\n `bg.app`. */\n background: var(--pm-texture-page) var(--pm-bg-app);\n transition: grid-template-columns var(--pm-motion-duration-surface)\n var(--pm-motion-easing-standard);\n}\n\n@supports (height: 1dvh) {\n .shell {\n block-size: 100dvh;\n }\n}\n\n/* Region surfaces are theme data. The rail is one step off the page, and the\n region borders use the theme's emphasis (a flat system draws them at\n `border.default`, a shadowed one keeps them subtle). So a dark rail on a\n light app is a value a theme sets, not a separate recipe. */\n.sidebar {\n display: flex;\n flex-direction: column;\n grid-area: sidebar;\n gap: var(--pm-space-2);\n min-inline-size: 0;\n min-block-size: 0;\n padding: var(--pm-space-4);\n overflow: hidden;\n background: var(--pm-shell-rail-bg);\n border-inline-end: 1px solid var(--pm-shell-rail-border);\n}\n\n/* The head row: brand and the collapse toggle, at the topbar's height so the\n rail's first row and the frame's first row share a baseline. */\n.railHead {\n display: flex;\n flex: none;\n gap: var(--pm-space-2);\n align-items: center;\n min-block-size: var(--pm-shell-topbar-height);\n}\n\n.brand {\n display: flex;\n flex: 1;\n align-items: center;\n min-inline-size: 0;\n padding-inline: var(--pm-space-3);\n}\n\n.nav {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--pm-space-2);\n min-block-size: 0;\n overflow-y: auto;\n}\n\n.sidebarFooter {\n flex: none;\n}\n\n/* NavItem — `app-shell.md`'s NavItem recipe, cell by cell.\n *\n * It is start-aligned, which is why it exists instead of a stretched ghost\n * Button. The glyph sits at the same x on every row, so the rail reads as a\n * column instead of a stack of centred pills.\n *\n * Colour transitions come from `stateFeedback`. There is no entrance motion,\n * because rails do not animate their nav. */\n.navItem {\n composes: focusRing from '../conventions/focus.module.css';\n composes: stateFeedback pressable from '../conventions/motion.module.css';\n position: relative;\n display: flex;\n gap: var(--pm-space-3);\n align-items: center;\n justify-content: flex-start;\n inline-size: 100%;\n block-size: var(--pm-control-height-md);\n padding-inline: var(--pm-space-3);\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-text-secondary);\n text-align: start;\n\n /* The root swap (`href`) makes the row an <a>. The rail is navigation, not\n prose, so the user agent's link underline is removed. */\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n background: transparent;\n border: 1px solid transparent;\n border-radius: var(--pm-radius-md);\n}\n\n.navGlyph {\n composes: stateFeedback from '../conventions/motion.module.css';\n display: inline-flex;\n flex: none;\n align-items: center;\n color: var(--pm-text-muted);\n}\n\n/* When the rail is narrow, the text truncates, never the glyph or the count. */\n.navLabel {\n flex: 1;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.navEnd {\n display: inline-flex;\n flex: none;\n align-items: center;\n}\n\n/* NavGroup — `app-shell.md`'s NavGroup recipe, cell by cell.\n *\n * The label uses the system's only section-heading recipe (SettingsRow.Group's\n * overline, also used by Dashboard.Panel): `text.xs`, uppercase, muted. Many\n * sidebars use sentence case for group labels. This system styles every\n * section heading the same way, so the rail matches the settings screen. */\n.navGroup {\n display: flex;\n flex-direction: column;\n gap: var(--pm-space-2);\n}\n\n/* The top padding is the space between groups. It is on the label, not the\n group, because it is the space before a heading, and a group whose heading\n is hidden (collapsed) should not reserve it. */\n.navGroupLabel {\n padding: var(--pm-space-4) var(--pm-space-3) var(--pm-space-1);\n font-family: var(--pm-text-xs-family);\n font-size: var(--pm-text-xs-size);\n font-weight: var(--pm-text-xs-weight);\n line-height: var(--pm-text-xs-line-height);\n letter-spacing: var(--pm-text-xs-tracking);\n color: var(--pm-text-muted);\n text-transform: uppercase;\n}\n\n/* The rail's own padding is already above the first group. */\n.navGroup:first-child .navGroupLabel {\n padding-block-start: 0;\n}\n\n/* UserCard — the rail's foot.\n *\n * It is a row, not a control. The control is whatever is in `end`. Its height\n * is the avatar's plus the row's padding. It shares the left edge of every\n * NavItem above it, so it reads as the bottom of the same column. */\n.userCard {\n display: flex;\n gap: var(--pm-space-3);\n align-items: center;\n min-inline-size: 0;\n padding: var(--pm-space-2) var(--pm-space-3);\n border-radius: var(--pm-radius-md);\n}\n\n/* The text truncates, as NavItem's label does, for the same reason: an\n ellipsis shows that text is hidden, and a clipped glyph is a rendering bug. */\n.userText {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-inline-size: 0;\n}\n\n.userName {\n overflow: hidden;\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-text-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* One step smaller and one tone lighter. A composition cannot reach this,\n because `Text` stops at `sm` and its lowest tone is `secondary`. */\n.userDetail {\n overflow: hidden;\n font-family: var(--pm-text-xs-family);\n font-size: var(--pm-text-xs-size);\n font-weight: var(--pm-text-xs-weight);\n line-height: var(--pm-text-xs-line-height);\n letter-spacing: var(--pm-text-xs-tracking);\n color: var(--pm-text-muted);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.userEnd {\n display: inline-flex;\n flex: none;\n align-items: center;\n}\n\n/* The current item uses the selection treatment (`design/components/README.md`),\n not a persistent hover. The selection colours sit one step below the hover\n wash and have their own text colour, so the current location reads as\n chosen, not hovered. */\n.navItem[data-current] {\n color: var(--pm-selection-text);\n background: var(--pm-selection-bg);\n}\n\n.navItem[data-current] .navGlyph {\n color: var(--pm-selection-text);\n}\n\n/* Selection takes precedence over hover, as in Table's law, for the same\n reason: if hover restyled the current row, the current location would\n flicker with the pointer. The hover uses `bg.surface` because the rail\n itself is `bg.subtle`. */\n.navItem:hover:not([data-current]) {\n color: var(--pm-text-primary);\n background: var(--pm-bg-surface);\n}\n\n.navItem:hover:not([data-current]) .navGlyph {\n color: var(--pm-text-secondary);\n}\n\n.toggle {\n display: flex;\n flex: none;\n}\n\n/* The banner's row. It is `auto`, so a shell without a banner gives it no\n height. The rail and the content region start under it. */\n.banner {\n grid-area: banner;\n min-inline-size: 0;\n}\n\n.topbar {\n display: flex;\n flex-wrap: wrap;\n grid-area: topbar;\n gap: var(--pm-space-4);\n align-items: center;\n justify-content: space-between;\n min-inline-size: 0;\n padding-block: var(--pm-space-2);\n padding-inline: var(--pm-space-6);\n background: var(--pm-shell-topbar-bg);\n border-block-end: 1px solid var(--pm-shell-topbar-border);\n box-shadow: var(--pm-shadow-resting);\n}\n\n.topbarSlot {\n display: flex;\n flex-wrap: wrap;\n gap: var(--pm-space-3);\n align-items: center;\n min-inline-size: 0;\n}\n\n/* The content region, and the container the page inside it measures.\n *\n * This is the boundary `docs/layout.md` names for the page archetypes. It must\n * be an ancestor of the page, not the page itself, because a container query\n * is answered by the nearest ancestor container. A page cannot query its own\n * width. The shell already knows how much room is left after the rail (the\n * whole window once the rail becomes a drawer), so the region that provides\n * the width declares the container.\n *\n * It contains both axes, so a page reads the region's visible height as\n * `100cqb`: DetailPage's aside that stays in view is never taller than the\n * region. The region's height is its grid row's, never its content's, so\n * containing its block size changes nothing it draws.\n *\n * It is the only scroll container. The frame stays in place and the page\n * inside it scrolls. The texture also stays in place, because the default\n * background attachment pins it to the region's box, so the page scrolls over\n * a still surface. */\n.content {\n container-type: size;\n grid-area: content;\n min-inline-size: 0;\n min-block-size: 0;\n overflow-wrap: anywhere;\n overflow-y: auto;\n background: var(--pm-texture-page) var(--pm-bg-app);\n}\n\n.page {\n min-inline-size: 0;\n inline-size: 100%;\n max-inline-size: calc(var(--pm-space-10) * 16);\n padding: var(--pm-space-8);\n margin-inline: auto;\n}\n\n@container (width < 40rem) {\n .page {\n padding: var(--pm-space-6);\n }\n}\n\n/* The dock: a floating layer over the content region.\n *\n * It uses the same grid cell as the content instead of a row below it.\n * `align-self: end` makes it float instead of acting as a footer, so the page\n * keeps its full height and the layer sits over its bottom edge. Sharing the\n * cell also keeps it centred when the rail collapses. The cell widens, so the\n * dock re-centres with the page without knowing the rail's width.\n *\n * It is not inside `.content`, because an absolutely positioned child of a\n * scroll container scrolls with it, and a prompt that scrolls away is not a\n * dock.\n *\n * `raise` is the same intra-member lift the skip link uses: above the page,\n * below the frame's own chrome and below every overlay. */\n.dock {\n display: flex;\n grid-area: content;\n align-self: end;\n justify-content: center;\n padding: 0 var(--pm-space-6) var(--pm-space-5);\n pointer-events: none;\n z-index: var(--pm-z-raise);\n}\n\n/* The layer ignores the pointer, so the space around the floating control\n still belongs to the page. The dock's children re-enable it. */\n.dock > * {\n pointer-events: auto;\n}\n\n/* Off-screen until it receives keyboard focus, then clearly visible. `raise` on\n the stacking scale is an intra-member lift over the shell's content, not\n chrome and not an overlay. */\n.skip {\n composes: focusRing from '../conventions/focus.module.css';\n position: absolute;\n inset-block-start: var(--pm-space-3);\n inset-inline-start: var(--pm-space-3);\n z-index: var(--pm-z-raise);\n padding: var(--pm-space-2) var(--pm-space-3);\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-accent-text);\n background: var(--pm-bg-surface);\n border-radius: var(--pm-radius-md);\n transform: translateY(-200%);\n}\n\n.skip:focus-visible {\n transform: translateY(0);\n}\n\n/* collapsed ----------------------------------------------------------------- */\n\n@media (width >= 48rem) {\n .shell[data-collapsed] {\n grid-template-columns: var(--pm-shell-sidebar-width-collapsed) minmax(0, 1fr);\n }\n}\n\n/* The small viewport ----------------------------------------------------------\n *\n * Below the reading width, two columns on a phone leave only a rail and a\n * narrow gutter. So the rail leaves the grid and becomes a drawer over the\n * content, and the topbar gets a `menu` button to open it.\n *\n * `48rem` is a literal, not a token, because a breakpoint belongs to the\n * viewport, not the theme. Scaling it with density would change the layout\n * for a reader who only changed control density. It is the only number in\n * this file that is deliberately not derived. */\n\n@media (width < 48rem) {\n .shell {\n grid-template:\n 'banner' auto\n 'topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'content' minmax(0, 1fr)\n / minmax(0, 1fr);\n }\n\n /* Off-canvas, and closed, not only out of view.\n *\n * `visibility: hidden` handles accessibility. A rail moved off-screen by a\n * transform keeps its tab order, so a keyboard user tabs into a nav they\n * cannot see and the focus ring goes off-screen. Hidden removes it from the\n * tab order and the accessibility tree together. That matches the state below\n * this breakpoint, where the navigation is behind a button.\n *\n * The transition list differs by direction on purpose. Closing transitions\n * `visibility`, which is discrete and changes at the end, so the rail stays\n * rendered while it slides away. Opening does not transition it, and this is\n * required. A transitioned property takes its new computed value only at the\n * style recalculation that starts the transition, which happens after the\n * effect that moves focus into the rail. Focusing a hidden element fails\n * silently, so the change must be immediate when opening. */\n .sidebar {\n position: fixed;\n inset-block: 0;\n inset-inline-start: 0;\n\n /* `shell` on the stacking scale. The drawer-mode rail is shell chrome,\n above the page and its lifts and below every portalled overlay\n (`--pm-z-overlay`). So a sheet's scrim covers the rail instead of the\n rail showing through it. */\n z-index: var(--pm-z-shell);\n inline-size: var(--pm-shell-sidebar-width);\n visibility: hidden;\n box-shadow: var(--pm-shadow-transient);\n transform: translateX(-100%);\n transition:\n transform var(--pm-motion-duration-surface) var(--pm-motion-easing-standard),\n visibility var(--pm-motion-duration-surface);\n }\n\n .shell[data-drawer] .sidebar {\n visibility: visible;\n transform: translateX(0);\n transition-property: transform;\n }\n\n /* Reduced motion (`docs/motion.md`). A slide normally becomes a fade, but a\n sheet held off-screen by a transform cannot fade in place: at opacity 0 it\n would already have to be in its final position. So it appears instantly.\n dialog.md gives the same rule for its scrim and panel. The drawer's scrim\n already complies as written, because its animation is opacity only.\n\n Both selectors are needed, because `.shell[data-drawer] .sidebar` has\n higher specificity than `.sidebar`. Overriding only the closed rule would\n leave the opening transition in place. */\n @media (prefers-reduced-motion: reduce) {\n .sidebar,\n .shell[data-drawer] .sidebar {\n transition: none;\n }\n }\n\n /* No collapse toggle below the breakpoint. Here the rail is a sheet over the\n page, not a column of the frame, and a strip of glyphs floating over the\n content is not a useful state. */\n .toggle {\n display: none;\n }\n\n /* The scrim exists only while the drawer is open. A fixed transparent layer\n over a page with no drawer would capture every click.\n\n It uses `raise`, not `shell`, because of DOM order. The scrim renders after\n the sidebar, so at the same level it would paint over the rail it should\n sit under. One step lower keeps the order page, scrim, rail without\n changing the DOM. */\n .scrim {\n position: fixed;\n inset: 0;\n z-index: var(--pm-z-raise);\n background: var(--pm-bg-scrim);\n border: 0;\n animation: shell-scrim-enter var(--pm-motion-duration-surface) var(--pm-motion-easing-enter);\n }\n\n @keyframes shell-scrim-enter {\n from {\n opacity: 0;\n }\n }\n}\n\n/* At frame widths, the drawer's button and scrim are not used. */\n@media (width >= 48rem) {\n .drawerToggle,\n .scrim {\n display: none;\n }\n}\n\n/* When collapsed, the rail keeps a padding and the item drops its own, so the\n glyph centres in the remaining width instead of in a box offset by the\n sidebar's inset. */\n@media (width >= 48rem) {\n .shell[data-collapsed] .sidebar {\n padding-inline: var(--pm-space-2);\n }\n\n /* The head stacks when the rail narrows. A mark and a control do not fit side\n by side in 48px, and dropping either would lose the brand or the way to\n expand the rail. */\n .shell[data-collapsed] .railHead {\n flex-direction: column;\n min-block-size: auto;\n }\n\n .shell[data-collapsed] .brand {\n flex: none;\n justify-content: center;\n padding-inline: 0;\n }\n\n /* NavItem collapsed: no API, keyed off the shell.\n *\n * The item adapts to the narrow rail because the shell composed it. Everything\n * else in the rail is content the shell did not compose, and there\n * `overflow: hidden` clips what no longer fits instead of squashing it.\n * Adapting that content is the application's job. That division keeps this a\n * rail: the shell owns one item, not the whole nav. */\n .shell[data-collapsed] .navItem {\n gap: 0;\n justify-content: center;\n padding-inline: 0;\n }\n\n /* Visually hidden but still read aloud. The label is the accessible name in\n every mode, so it is clipped, not unmounted or `display: none`. UserCard's\n two lines are clipped too, because they are the card's accessible content,\n and clipping keeps a collapsed rail's foot available to screen readers. */\n .shell[data-collapsed] .navLabel,\n .shell[data-collapsed] .navEnd,\n .shell[data-collapsed] .userText {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n padding: 0;\n overflow: hidden;\n white-space: nowrap;\n border: 0;\n clip-path: inset(50%);\n }\n\n /* Removed, not clipped, for a different reason in each case.\n *\n * A group's title is a heading for a boundary that is no longer drawn. The\n * spec requires removing it, because clipping it would announce a section\n * nobody can see.\n *\n * UserCard's `end` is interactive. A menu trigger clipped to one pixel is a tab\n * stop nobody can find, with its focus ring off-screen. The drawer's\n * `visibility: hidden` follows the same reasoning. So `end` leaves the tab\n * order along with its space. */\n .shell[data-collapsed] .navGroupLabel,\n .shell[data-collapsed] .userEnd {\n display: none;\n }\n\n /* The avatar centres in the remaining width, in the same way as the nav glyph. */\n .shell[data-collapsed] .userCard {\n gap: 0;\n justify-content: center;\n padding-inline: 0;\n }\n}\n\n/* The navigation on top --------------------------------------------------------\n *\n * `navigation: 'top'` lays the rail along the frame's top row: the brand, then\n * the items in a row, and the topbar continues the row with its own slots. It\n * is the same `<nav>` in the same place in the document, before the topbar, so\n * the order a keyboard reaches the row in is the order it is drawn in. Every\n * rule is inside the frame-width query, so below the breakpoint the rail is\n * the drawer it is in the rail layout.\n *\n * The nav's column is as wide as its row needs, and the topbar keeps at least\n * the width its own content needs. When the row is wider than the frame, the\n * items wrap onto a further line, as SectionNav's do, so every destination\n * stays on screen and the frame never scrolls sideways. */\n@media (width >= 48rem) {\n .shell[data-navigation='top'] {\n grid-template:\n 'banner banner' auto\n 'sidebar topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'content content' minmax(0, 1fr)\n / auto minmax(min-content, 1fr);\n }\n\n /* The topbar's surface and lower edge, so the nav and the topbar read as one\n bar. `overflow` is visible because the row ends at the last item, and a\n clipped box would cut that item's focus ring. */\n .shell[data-navigation='top'] .sidebar {\n flex-direction: row;\n align-items: center;\n padding-block: var(--pm-space-2);\n padding-inline: var(--pm-space-4) 0;\n overflow: visible;\n background: var(--pm-shell-topbar-bg);\n border-inline-end: 0;\n border-block-end: 1px solid var(--pm-shell-topbar-border);\n box-shadow: var(--pm-shadow-resting);\n }\n\n /* The head keeps the brand and gives up the toggle: the collapse narrows a\n rail, and a row has no rail to narrow. A head with no brand takes no room. */\n .shell[data-navigation='top'] .railHead {\n min-block-size: auto;\n }\n\n .shell[data-navigation='top'] .railHead:not(:has(.brand)),\n .shell[data-navigation='top'] .toggle {\n display: none;\n }\n\n .shell[data-navigation='top'] .brand {\n flex: none;\n }\n\n /* The items in a row. It is not a scroll container, because a scroll\n container clips the focus ring of an item at its edge. */\n .shell[data-navigation='top'] .nav {\n flex-flow: row wrap;\n align-items: center;\n overflow: visible;\n }\n\n /* An item is as wide as its glyph, label and count. A label wider than the\n whole row still ends in an ellipsis. */\n .shell[data-navigation='top'] .navItem {\n inline-size: auto;\n }\n\n /* The bar is on `bg.surface`, which is the rail's hover fill, so hover steps\n to `bg.subtle` here, as SectionNav's does on its page. */\n .shell[data-navigation='top'] .navItem:hover:not([data-current]) {\n background: var(--pm-bg-subtle);\n }\n\n /* A group's items join the row. The overline is removed, as in the collapsed\n rail, and a rule before the group draws the boundary. The group keeps\n `role=\"group\"` and its name. */\n .shell[data-navigation='top'] .navGroup {\n flex-flow: row wrap;\n align-items: center;\n padding-inline-start: var(--pm-space-2);\n border-inline-start: 1px solid var(--pm-border-subtle);\n }\n\n .shell[data-navigation='top'] .navGroupLabel {\n display: none;\n }\n\n /* A group that starts the row has nothing before it to divide from. It is\n the nav slot's first child, or the first child of an element a renderer\n wraps each part in that draws no box of its own, so a sibling combinator\n between two groups would not reach them. */\n .shell[data-navigation='top'] .nav > .navGroup:first-child,\n .shell[data-navigation='top'] .nav > :first-child > .navGroup {\n padding-inline-start: 0;\n border-inline-start: 0;\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"app-shell.module.js","names":[],"sources":["../../../../recipes/src/archetypes/app-shell.module.css"],"sourcesContent":["/* AppShell — `design/archetypes/app-shell.md`.\n *\n * The `--pm-shell-*` scope is declared here and nowhere else. The values are\n * computed from space tokens, so a compact theme gets a tighter frame with no\n * extra declaration. Changing one of them is a one-line change that no screen\n * needs to know about (the churn test in `pages.test.tsx`).\n *\n * The sidebar collapse is the only animated structural change in the shell.\n * It uses the `appshell.sidebar` binding: `collapse` in persistent mode on the\n * inline axis. Law 2 lets a container animate only its size, and a grid track\n * counts as a container. */\n\n.shell {\n --pm-shell-topbar-height: calc(var(--pm-space-7) + var(--pm-space-6));\n --pm-shell-sidebar-width: calc(var(--pm-space-10) * 2 + var(--pm-space-7));\n --pm-shell-sidebar-width-collapsed: calc(var(--pm-space-7) + var(--pm-space-5));\n\n display: grid;\n grid-template:\n 'banner banner' auto\n 'sidebar topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'sidebar content' minmax(0, 1fr)\n / var(--pm-shell-sidebar-width) minmax(0, 1fr);\n min-inline-size: 0;\n inline-size: 100%;\n\n /* On phones `100vh` includes the collapsed browser chrome, so a `100vh`\n shell puts its bottom edge behind the URL bar (`docs/layout.md`). The\n fallback pattern (app-shell.md's root cell) puts the `vh` base here and\n the `dvh` override in the `@supports` block below. A deduplicating\n minifier would merge two declarations of one property in the same rule,\n and the built CSS would ship with only `dvh`. */\n block-size: 100vh;\n\n /* The texture sits on the page surface it decorates. It is `none` for themes\n whose ornament level disables it, and the colour underneath is exactly\n `bg.app`. */\n background: var(--pm-texture-page) var(--pm-bg-app);\n transition: grid-template-columns var(--pm-motion-duration-surface)\n var(--pm-motion-easing-standard);\n}\n\n@supports (height: 1dvh) {\n .shell {\n block-size: 100dvh;\n }\n}\n\n/* Region surfaces are theme data. The rail is one step off the page, and the\n region borders use the theme's emphasis (a flat system draws them at\n `border.default`, a shadowed one keeps them subtle). So a dark rail on a\n light app is a value a theme sets, not a separate recipe. */\n.sidebar {\n display: flex;\n flex-direction: column;\n grid-area: sidebar;\n gap: var(--pm-space-2);\n min-inline-size: 0;\n min-block-size: 0;\n padding: var(--pm-space-4);\n overflow: hidden;\n background: var(--pm-shell-rail-bg);\n border-inline-end: 1px solid var(--pm-shell-rail-border);\n}\n\n/* The head row: brand and the collapse toggle, at the topbar's height so the\n rail's first row and the frame's first row share a baseline. */\n.railHead {\n display: flex;\n flex: none;\n gap: var(--pm-space-2);\n align-items: center;\n min-block-size: var(--pm-shell-topbar-height);\n}\n\n.brand {\n display: flex;\n flex: 1;\n align-items: center;\n min-inline-size: 0;\n padding-inline: var(--pm-space-3);\n}\n\n.nav {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--pm-space-2);\n min-block-size: 0;\n overflow-y: auto;\n}\n\n.sidebarFooter {\n flex: none;\n}\n\n/* NavItem — `app-shell.md`'s NavItem recipe, cell by cell.\n *\n * It is start-aligned, which is why it exists instead of a stretched ghost\n * Button. The glyph sits at the same x on every row, so the rail reads as a\n * column instead of a stack of centred pills.\n *\n * Colour transitions come from `stateFeedback`. There is no entrance motion,\n * because rails do not animate their nav. */\n.navItem {\n composes: focusRing from '../conventions/focus.module.css';\n composes: stateFeedback pressable from '../conventions/motion.module.css';\n position: relative;\n display: flex;\n gap: var(--pm-space-3);\n align-items: center;\n justify-content: flex-start;\n inline-size: 100%;\n block-size: var(--pm-control-height-md);\n padding-inline: var(--pm-space-3);\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-text-secondary);\n text-align: start;\n\n /* The root swap (`href`) makes the row an <a>. The rail is navigation, not\n prose, so the user agent's link underline is removed. */\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n background: transparent;\n border: 1px solid transparent;\n border-radius: var(--pm-radius-md);\n}\n\n.navGlyph {\n composes: stateFeedback from '../conventions/motion.module.css';\n display: inline-flex;\n flex: none;\n align-items: center;\n color: var(--pm-text-muted);\n}\n\n/* When the rail is narrow, the text truncates, never the glyph or the count. */\n.navLabel {\n flex: 1;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.navEnd {\n display: inline-flex;\n flex: none;\n align-items: center;\n}\n\n/* NavGroup — `app-shell.md`'s NavGroup recipe, cell by cell.\n *\n * The label uses the system's only section-heading recipe (SettingsRow.Group's\n * overline, also used by Dashboard.Panel): `text.xs`, uppercase, muted. Many\n * sidebars use sentence case for group labels. This system styles every\n * section heading the same way, so the rail matches the settings screen. */\n.navGroup {\n display: flex;\n flex-direction: column;\n gap: var(--pm-space-2);\n}\n\n/* The top padding is the space between groups. It is on the label, not the\n group, because it is the space before a heading, and a group whose heading\n is hidden (collapsed) should not reserve it. */\n.navGroupLabel {\n padding: var(--pm-space-4) var(--pm-space-3) var(--pm-space-1);\n font-family: var(--pm-text-xs-family);\n font-size: var(--pm-text-xs-size);\n font-weight: var(--pm-text-xs-weight);\n line-height: var(--pm-text-xs-line-height);\n letter-spacing: var(--pm-text-xs-tracking);\n color: var(--pm-text-muted);\n text-transform: uppercase;\n}\n\n/* The rail's own padding is already above the first group. */\n.navGroup:first-child .navGroupLabel {\n padding-block-start: 0;\n}\n\n/* UserCard — the rail's foot.\n *\n * It is a row, not a control. The control is whatever is in `end`. Its height\n * is the avatar's plus the row's padding. It shares the left edge of every\n * NavItem above it, so it reads as the bottom of the same column. */\n.userCard {\n display: flex;\n gap: var(--pm-space-3);\n align-items: center;\n min-inline-size: 0;\n padding: var(--pm-space-2) var(--pm-space-3);\n border-radius: var(--pm-radius-md);\n}\n\n/* The text truncates, as NavItem's label does, for the same reason: an\n ellipsis shows that text is hidden, and a clipped glyph is a rendering bug. */\n.userText {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-inline-size: 0;\n}\n\n.userName {\n overflow: hidden;\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-text-primary);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* One step smaller and one tone lighter. A composition cannot reach this,\n because `Text` stops at `sm` and its lowest tone is `secondary`. */\n.userDetail {\n overflow: hidden;\n font-family: var(--pm-text-xs-family);\n font-size: var(--pm-text-xs-size);\n font-weight: var(--pm-text-xs-weight);\n line-height: var(--pm-text-xs-line-height);\n letter-spacing: var(--pm-text-xs-tracking);\n color: var(--pm-text-muted);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.userEnd {\n display: inline-flex;\n flex: none;\n align-items: center;\n}\n\n/* The current item uses the selection treatment (`design/components/README.md`),\n not a persistent hover. The selection colours sit one step below the hover\n wash and have their own text colour, so the current location reads as\n chosen, not hovered. */\n.navItem[data-current] {\n color: var(--pm-selection-text);\n background: var(--pm-selection-bg);\n}\n\n.navItem[data-current] .navGlyph {\n color: var(--pm-selection-text);\n}\n\n/* Selection takes precedence over hover, as in Table's law, for the same\n reason: if hover restyled the current row, the current location would\n flicker with the pointer. The hover uses `bg.surface` because the rail\n itself is `bg.subtle`. */\n.navItem:hover:not([data-current]) {\n color: var(--pm-text-primary);\n background: var(--pm-bg-surface);\n}\n\n.navItem:hover:not([data-current]) .navGlyph {\n color: var(--pm-text-secondary);\n}\n\n.toggle {\n display: flex;\n flex: none;\n}\n\n/* The banner's row. It is `auto`, so a shell without a banner gives it no\n height. The rail and the content region start under it. */\n.banner {\n grid-area: banner;\n min-inline-size: 0;\n}\n\n.topbar {\n display: flex;\n flex-wrap: wrap;\n grid-area: topbar;\n gap: var(--pm-space-4);\n align-items: center;\n justify-content: space-between;\n min-inline-size: 0;\n padding-block: var(--pm-space-2);\n padding-inline: var(--pm-space-6);\n background: var(--pm-shell-topbar-bg);\n border-block-end: 1px solid var(--pm-shell-topbar-border);\n box-shadow: var(--pm-shadow-resting);\n}\n\n.topbarSlot {\n display: flex;\n flex-wrap: wrap;\n gap: var(--pm-space-3);\n align-items: center;\n min-inline-size: 0;\n}\n\n/* The content region, and the container the page inside it measures.\n *\n * This is the boundary `docs/layout.md` names for the page archetypes. It must\n * be an ancestor of the page, not the page itself, because a container query\n * is answered by the nearest ancestor container. A page cannot query its own\n * width. The shell already knows how much room is left after the rail (the\n * whole window once the rail becomes a drawer), so the region that provides\n * the width declares the container.\n *\n * It contains both axes, so a page reads the region's visible height as\n * `100cqb`: DetailPage's aside that stays in view is never taller than the\n * region. The region's height is its grid row's, never its content's, so\n * containing its block size changes nothing it draws.\n *\n * It is the only scroll container. The frame stays in place and the page\n * inside it scrolls. The texture also stays in place, because the default\n * background attachment pins it to the region's box, so the page scrolls over\n * a still surface.\n *\n * It is positioned, so it is the containing block of everything it scrolls. A\n * member that hides text from the eye positions it absolutely\n * (`conventions/a11y.module.css`), and an absolutely positioned box belongs to\n * its containing block, not to the scroll container it sits in. Without a\n * positioned region, such a box far down a long page would be laid out against\n * the document and make the document itself scroll, under the frame. */\n.content {\n position: relative;\n container-type: size;\n grid-area: content;\n min-inline-size: 0;\n min-block-size: 0;\n overflow-wrap: anywhere;\n overflow-y: auto;\n background: var(--pm-texture-page) var(--pm-bg-app);\n}\n\n.page {\n min-inline-size: 0;\n inline-size: 100%;\n max-inline-size: calc(var(--pm-space-10) * 16);\n padding: var(--pm-space-8);\n margin-inline: auto;\n}\n\n@container (width < 40rem) {\n .page {\n padding: var(--pm-space-6);\n }\n}\n\n/* The dock: a floating layer over the content region.\n *\n * It uses the same grid cell as the content instead of a row below it.\n * `align-self: end` makes it float instead of acting as a footer, so the page\n * keeps its full height and the layer sits over its bottom edge. Sharing the\n * cell also keeps it centred when the rail collapses. The cell widens, so the\n * dock re-centres with the page without knowing the rail's width.\n *\n * It is not inside `.content`, because an absolutely positioned child of a\n * scroll container scrolls with it, and a prompt that scrolls away is not a\n * dock.\n *\n * `raise` is the same intra-member lift the skip link uses: above the page,\n * below the frame's own chrome and below every overlay. */\n.dock {\n display: flex;\n grid-area: content;\n align-self: end;\n justify-content: center;\n padding: 0 var(--pm-space-6) var(--pm-space-5);\n pointer-events: none;\n z-index: var(--pm-z-raise);\n}\n\n/* The layer ignores the pointer, so the space around the floating control\n still belongs to the page. The dock's children re-enable it. */\n.dock > * {\n pointer-events: auto;\n}\n\n/* Off-screen until it receives keyboard focus, then clearly visible. `raise` on\n the stacking scale is an intra-member lift over the shell's content, not\n chrome and not an overlay. */\n.skip {\n composes: focusRing from '../conventions/focus.module.css';\n position: absolute;\n inset-block-start: var(--pm-space-3);\n inset-inline-start: var(--pm-space-3);\n z-index: var(--pm-z-raise);\n padding: var(--pm-space-2) var(--pm-space-3);\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-accent-text);\n background: var(--pm-bg-surface);\n border-radius: var(--pm-radius-md);\n transform: translateY(-200%);\n}\n\n.skip:focus-visible {\n transform: translateY(0);\n}\n\n/* collapsed ----------------------------------------------------------------- */\n\n@media (width >= 48rem) {\n .shell[data-collapsed] {\n grid-template-columns: var(--pm-shell-sidebar-width-collapsed) minmax(0, 1fr);\n }\n}\n\n/* The small viewport ----------------------------------------------------------\n *\n * Below the reading width, two columns on a phone leave only a rail and a\n * narrow gutter. So the rail leaves the grid and becomes a drawer over the\n * content, and the topbar gets a `menu` button to open it.\n *\n * `48rem` is a literal, not a token, because a breakpoint belongs to the\n * viewport, not the theme. Scaling it with density would change the layout\n * for a reader who only changed control density. It is the only number in\n * this file that is deliberately not derived. */\n\n@media (width < 48rem) {\n .shell {\n grid-template:\n 'banner' auto\n 'topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'content' minmax(0, 1fr)\n / minmax(0, 1fr);\n }\n\n /* Off-canvas, and closed, not only out of view.\n *\n * `visibility: hidden` handles accessibility. A rail moved off-screen by a\n * transform keeps its tab order, so a keyboard user tabs into a nav they\n * cannot see and the focus ring goes off-screen. Hidden removes it from the\n * tab order and the accessibility tree together. That matches the state below\n * this breakpoint, where the navigation is behind a button.\n *\n * The transition list differs by direction on purpose. Closing transitions\n * `visibility`, which is discrete and changes at the end, so the rail stays\n * rendered while it slides away. Opening does not transition it, and this is\n * required. A transitioned property takes its new computed value only at the\n * style recalculation that starts the transition, which happens after the\n * effect that moves focus into the rail. Focusing a hidden element fails\n * silently, so the change must be immediate when opening. */\n .sidebar {\n position: fixed;\n inset-block: 0;\n inset-inline-start: 0;\n\n /* `shell` on the stacking scale. The drawer-mode rail is shell chrome,\n above the page and its lifts and below every portalled overlay\n (`--pm-z-overlay`). So a sheet's scrim covers the rail instead of the\n rail showing through it. */\n z-index: var(--pm-z-shell);\n inline-size: var(--pm-shell-sidebar-width);\n visibility: hidden;\n box-shadow: var(--pm-shadow-transient);\n transform: translateX(-100%);\n transition:\n transform var(--pm-motion-duration-surface) var(--pm-motion-easing-standard),\n visibility var(--pm-motion-duration-surface);\n }\n\n .shell[data-drawer] .sidebar {\n visibility: visible;\n transform: translateX(0);\n transition-property: transform;\n }\n\n /* Reduced motion (`docs/motion.md`). A slide normally becomes a fade, but a\n sheet held off-screen by a transform cannot fade in place: at opacity 0 it\n would already have to be in its final position. So it appears instantly.\n dialog.md gives the same rule for its scrim and panel. The drawer's scrim\n already complies as written, because its animation is opacity only.\n\n Both selectors are needed, because `.shell[data-drawer] .sidebar` has\n higher specificity than `.sidebar`. Overriding only the closed rule would\n leave the opening transition in place. */\n @media (prefers-reduced-motion: reduce) {\n .sidebar,\n .shell[data-drawer] .sidebar {\n transition: none;\n }\n }\n\n /* No collapse toggle below the breakpoint. Here the rail is a sheet over the\n page, not a column of the frame, and a strip of glyphs floating over the\n content is not a useful state. */\n .toggle {\n display: none;\n }\n\n /* The scrim exists only while the drawer is open. A fixed transparent layer\n over a page with no drawer would capture every click.\n\n It uses `raise`, not `shell`, because of DOM order. The scrim renders after\n the sidebar, so at the same level it would paint over the rail it should\n sit under. One step lower keeps the order page, scrim, rail without\n changing the DOM. */\n .scrim {\n position: fixed;\n inset: 0;\n z-index: var(--pm-z-raise);\n background: var(--pm-bg-scrim);\n border: 0;\n animation: shell-scrim-enter var(--pm-motion-duration-surface) var(--pm-motion-easing-enter);\n }\n\n @keyframes shell-scrim-enter {\n from {\n opacity: 0;\n }\n }\n}\n\n/* At frame widths, the drawer's button and scrim are not used. */\n@media (width >= 48rem) {\n .drawerToggle,\n .scrim {\n display: none;\n }\n}\n\n/* When collapsed, the rail keeps a padding and the item drops its own, so the\n glyph centres in the remaining width instead of in a box offset by the\n sidebar's inset. */\n@media (width >= 48rem) {\n .shell[data-collapsed] .sidebar {\n padding-inline: var(--pm-space-2);\n }\n\n /* The head stacks when the rail narrows. A mark and a control do not fit side\n by side in 48px, and dropping either would lose the brand or the way to\n expand the rail. */\n .shell[data-collapsed] .railHead {\n flex-direction: column;\n min-block-size: auto;\n }\n\n .shell[data-collapsed] .brand {\n flex: none;\n justify-content: center;\n padding-inline: 0;\n }\n\n /* NavItem collapsed: no API, keyed off the shell.\n *\n * The item adapts to the narrow rail because the shell composed it. Everything\n * else in the rail is content the shell did not compose, and there\n * `overflow: hidden` clips what no longer fits instead of squashing it.\n * Adapting that content is the application's job. That division keeps this a\n * rail: the shell owns one item, not the whole nav. */\n .shell[data-collapsed] .navItem {\n gap: 0;\n justify-content: center;\n padding-inline: 0;\n }\n\n /* Visually hidden but still read aloud. The label is the accessible name in\n every mode, so it is clipped, not unmounted or `display: none`. UserCard's\n two lines are clipped too, because they are the card's accessible content,\n and clipping keeps a collapsed rail's foot available to screen readers. */\n .shell[data-collapsed] .navLabel,\n .shell[data-collapsed] .navEnd,\n .shell[data-collapsed] .userText {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n padding: 0;\n overflow: hidden;\n white-space: nowrap;\n border: 0;\n clip-path: inset(50%);\n }\n\n /* Removed, not clipped, for a different reason in each case.\n *\n * A group's title is a heading for a boundary that is no longer drawn. The\n * spec requires removing it, because clipping it would announce a section\n * nobody can see.\n *\n * UserCard's `end` is interactive. A menu trigger clipped to one pixel is a tab\n * stop nobody can find, with its focus ring off-screen. The drawer's\n * `visibility: hidden` follows the same reasoning. So `end` leaves the tab\n * order along with its space. */\n .shell[data-collapsed] .navGroupLabel,\n .shell[data-collapsed] .userEnd {\n display: none;\n }\n\n /* The avatar centres in the remaining width, in the same way as the nav glyph. */\n .shell[data-collapsed] .userCard {\n gap: 0;\n justify-content: center;\n padding-inline: 0;\n }\n}\n\n/* The navigation on top --------------------------------------------------------\n *\n * `navigation: 'top'` lays the rail along the frame's top row: the brand, then\n * the items in a row, and the topbar continues the row with its own slots. It\n * is the same `<nav>` in the same place in the document, before the topbar, so\n * the order a keyboard reaches the row in is the order it is drawn in. Every\n * rule is inside the frame-width query, so below the breakpoint the rail is\n * the drawer it is in the rail layout.\n *\n * The nav's column is as wide as its row needs, and the topbar keeps at least\n * the width its own content needs. When the row is wider than the frame, the\n * items wrap onto a further line, as SectionNav's do, so every destination\n * stays on screen and the frame never scrolls sideways. */\n@media (width >= 48rem) {\n .shell[data-navigation='top'] {\n grid-template:\n 'banner banner' auto\n 'sidebar topbar' minmax(var(--pm-shell-topbar-height), auto)\n 'content content' minmax(0, 1fr)\n / auto minmax(min-content, 1fr);\n }\n\n /* The topbar's surface and lower edge, so the nav and the topbar read as one\n bar. `overflow` is visible because the row ends at the last item, and a\n clipped box would cut that item's focus ring. */\n .shell[data-navigation='top'] .sidebar {\n flex-direction: row;\n align-items: center;\n padding-block: var(--pm-space-2);\n padding-inline: var(--pm-space-4) 0;\n overflow: visible;\n background: var(--pm-shell-topbar-bg);\n border-inline-end: 0;\n border-block-end: 1px solid var(--pm-shell-topbar-border);\n box-shadow: var(--pm-shadow-resting);\n }\n\n /* The head keeps the brand and gives up the toggle: the collapse narrows a\n rail, and a row has no rail to narrow. A head with no brand takes no room. */\n .shell[data-navigation='top'] .railHead {\n min-block-size: auto;\n }\n\n .shell[data-navigation='top'] .railHead:not(:has(.brand)),\n .shell[data-navigation='top'] .toggle {\n display: none;\n }\n\n .shell[data-navigation='top'] .brand {\n flex: none;\n }\n\n /* The items in a row. It is not a scroll container, because a scroll\n container clips the focus ring of an item at its edge. */\n .shell[data-navigation='top'] .nav {\n flex-flow: row wrap;\n align-items: center;\n overflow: visible;\n }\n\n /* An item is as wide as its glyph, label and count. A label wider than the\n whole row still ends in an ellipsis. */\n .shell[data-navigation='top'] .navItem {\n inline-size: auto;\n }\n\n /* The bar is on `bg.surface`, which is the rail's hover fill, so hover steps\n to `bg.subtle` here, as SectionNav's does on its page. */\n .shell[data-navigation='top'] .navItem:hover:not([data-current]) {\n background: var(--pm-bg-subtle);\n }\n\n /* A group's items join the row. The overline is removed, as in the collapsed\n rail, and a rule before the group draws the boundary. The group keeps\n `role=\"group\"` and its name. */\n .shell[data-navigation='top'] .navGroup {\n flex-flow: row wrap;\n align-items: center;\n padding-inline-start: var(--pm-space-2);\n border-inline-start: 1px solid var(--pm-border-subtle);\n }\n\n .shell[data-navigation='top'] .navGroupLabel {\n display: none;\n }\n\n /* A group that starts the row has nothing before it to divide from. It is\n the nav slot's first child, or the first child of an element a renderer\n wraps each part in that draws no box of its own, so a sibling combinator\n between two groups would not reach them. */\n .shell[data-navigation='top'] .nav > .navGroup:first-child,\n .shell[data-navigation='top'] .nav > :first-child > .navGroup {\n padding-inline-start: 0;\n border-inline-start: 0;\n }\n}\n"],"mappings":""}
|