@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.
Files changed (143) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/dist/ai/ArtifactPane.js.map +1 -1
  3. package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
  4. package/dist/archetypes/MasterDetailPage.js.map +1 -1
  5. package/dist/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/dist/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/archetypes/app-shell.css +1 -1
  8. package/dist/archetypes/app-shell.module.js +2 -2
  9. package/dist/archetypes/app-shell.module.js.map +1 -1
  10. package/dist/controls/RichTextInput.js +7 -0
  11. package/dist/controls/RichTextInput.js.map +1 -0
  12. package/dist/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js +1123 -0
  13. package/dist/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  14. package/dist/controls/rich-text-input.css +1 -0
  15. package/dist/controls/rich-text-input.module.js +47 -0
  16. package/dist/controls/rich-text-input.module.js.map +1 -0
  17. package/dist/controls/selection-bar.css +1 -0
  18. package/dist/controls/selection-bar.module.js +11 -0
  19. package/dist/controls/selection-bar.module.js.map +1 -0
  20. package/dist/index.js +41 -39
  21. package/dist/index.js.map +1 -1
  22. package/dist/node/ai/ArtifactPane.js.map +1 -1
  23. package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/node/archetypes/MasterDetailPage.js.map +1 -1
  25. package/dist/node/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/node/archetypes/MasterDetailPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/node/archetypes/app-shell.module.js +2 -2
  28. package/dist/node/archetypes/app-shell.module.js.map +1 -1
  29. package/dist/node/controls/RichTextInput.js +7 -0
  30. package/dist/node/controls/RichTextInput.js.map +1 -0
  31. package/dist/node/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js +1123 -0
  32. package/dist/node/controls/RichTextInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  33. package/dist/node/controls/rich-text-input.module.js +46 -0
  34. package/dist/node/controls/rich-text-input.module.js.map +1 -0
  35. package/dist/node/controls/selection-bar.module.js +10 -0
  36. package/dist/node/controls/selection-bar.module.js.map +1 -0
  37. package/dist/node/index.js +41 -39
  38. package/dist/node/index.js.map +1 -1
  39. package/dist/node/overlays/Toast.js.map +1 -1
  40. package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js +27 -27
  41. package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/node/structure/Accordion.js.map +1 -1
  43. package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js +4 -0
  44. package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/node/structure/Collapsible.js.map +1 -1
  46. package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +4 -0
  47. package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/node/structure/CursorPagination.js.map +1 -1
  49. package/dist/node/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js +140 -93
  50. package/dist/node/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/node/structure/Image.js.map +1 -1
  52. package/dist/node/structure/Image.vue_vue_type_script_setup_true_lang.js +30 -18
  53. package/dist/node/structure/Image.vue_vue_type_script_setup_true_lang.js.map +1 -1
  54. package/dist/node/structure/Pagination.js.map +1 -1
  55. package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js +124 -71
  56. package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/node/structure/RichTextContent.js +7 -0
  58. package/dist/node/structure/RichTextContent.js.map +1 -0
  59. package/dist/node/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js +298 -0
  60. package/dist/node/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js.map +1 -0
  61. package/dist/node/structure/RichTextContentBlocks.js +7 -0
  62. package/dist/node/structure/RichTextContentBlocks.js.map +1 -0
  63. package/dist/node/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js +94 -0
  64. package/dist/node/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js.map +1 -0
  65. package/dist/node/structure/RichTextContentInlines.js +7 -0
  66. package/dist/node/structure/RichTextContentInlines.js.map +1 -0
  67. package/dist/node/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js +69 -0
  68. package/dist/node/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js.map +1 -0
  69. package/dist/node/structure/RichTextContentItem.js +7 -0
  70. package/dist/node/structure/RichTextContentItem.js.map +1 -0
  71. package/dist/node/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js +94 -0
  72. package/dist/node/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  73. package/dist/node/structure/code-block.module.js +2 -2
  74. package/dist/node/structure/code-block.module.js.map +1 -1
  75. package/dist/node/structure/cursor-pagination.module.js +6 -3
  76. package/dist/node/structure/cursor-pagination.module.js.map +1 -1
  77. package/dist/node/structure/pagination.module.js +6 -3
  78. package/dist/node/structure/pagination.module.js.map +1 -1
  79. package/dist/node/structure/rich-text-content.module.js +18 -0
  80. package/dist/node/structure/rich-text-content.module.js.map +1 -0
  81. package/dist/overlays/Toast.js.map +1 -1
  82. package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js +27 -27
  83. package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  84. package/dist/structure/Accordion.js.map +1 -1
  85. package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js +4 -0
  86. package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  87. package/dist/structure/Collapsible.js.map +1 -1
  88. package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +4 -0
  89. package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/structure/CursorPagination.js.map +1 -1
  91. package/dist/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js +140 -93
  92. package/dist/structure/CursorPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/structure/Image.js.map +1 -1
  94. package/dist/structure/Image.vue_vue_type_script_setup_true_lang.js +30 -18
  95. package/dist/structure/Image.vue_vue_type_script_setup_true_lang.js.map +1 -1
  96. package/dist/structure/Pagination.js.map +1 -1
  97. package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js +124 -71
  98. package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  99. package/dist/structure/RichTextContent.js +7 -0
  100. package/dist/structure/RichTextContent.js.map +1 -0
  101. package/dist/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js +298 -0
  102. package/dist/structure/RichTextContent.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/structure/RichTextContentBlocks.js +7 -0
  104. package/dist/structure/RichTextContentBlocks.js.map +1 -0
  105. package/dist/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js +94 -0
  106. package/dist/structure/RichTextContentBlocks.vue_vue_type_script_setup_true_lang.js.map +1 -0
  107. package/dist/structure/RichTextContentInlines.js +7 -0
  108. package/dist/structure/RichTextContentInlines.js.map +1 -0
  109. package/dist/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js +69 -0
  110. package/dist/structure/RichTextContentInlines.vue_vue_type_script_setup_true_lang.js.map +1 -0
  111. package/dist/structure/RichTextContentItem.js +7 -0
  112. package/dist/structure/RichTextContentItem.js.map +1 -0
  113. package/dist/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js +94 -0
  114. package/dist/structure/RichTextContentItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  115. package/dist/structure/code-block.css +1 -1
  116. package/dist/structure/code-block.module.js +2 -2
  117. package/dist/structure/code-block.module.js.map +1 -1
  118. package/dist/structure/cursor-pagination.css +1 -1
  119. package/dist/structure/cursor-pagination.module.js +6 -3
  120. package/dist/structure/cursor-pagination.module.js.map +1 -1
  121. package/dist/structure/pagination.css +1 -1
  122. package/dist/structure/pagination.module.js +6 -3
  123. package/dist/structure/pagination.module.js.map +1 -1
  124. package/dist/structure/rich-text-content.css +1 -0
  125. package/dist/structure/rich-text-content.module.js +19 -0
  126. package/dist/structure/rich-text-content.module.js.map +1 -0
  127. package/dist/types/ai/ArtifactPane.vue.d.ts +1 -1
  128. package/dist/types/ai/AttachmentChip.vue.d.ts +1 -1
  129. package/dist/types/ai/ToolCall.vue.d.ts +1 -1
  130. package/dist/types/controls/RichTextInput.vue.d.ts +210 -0
  131. package/dist/types/index.d.ts +4 -0
  132. package/dist/types/overlays/CommandPanel.vue.d.ts +2 -2
  133. package/dist/types/structure/Accordion.vue.d.ts +7 -0
  134. package/dist/types/structure/Collapsible.vue.d.ts +7 -0
  135. package/dist/types/structure/CursorPagination.vue.d.ts +13 -0
  136. package/dist/types/structure/EmptyState.vue.d.ts +1 -1
  137. package/dist/types/structure/Image.vue.d.ts +13 -0
  138. package/dist/types/structure/Pagination.vue.d.ts +8 -0
  139. package/dist/types/structure/RichTextContent.vue.d.ts +59 -0
  140. package/dist/types/structure/RichTextContentBlocks.vue.d.ts +7 -0
  141. package/dist/types/structure/RichTextContentInlines.vue.d.ts +7 -0
  142. package/dist/types/structure/RichTextContentItem.vue.d.ts +7 -0
  143. package/package.json +17 -4
@@ -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":"Toast.js","names":[],"sources":["../../../src/overlays/Toast.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifications that report the outcome of an action (`design/components/toast.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.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, useId, watch } from 'vue'\n\nimport {\n devWarning,\n getToasts,\n removeToast,\n slotNode,\n toast,\n useTrackedSlots,\n type ToastAction,\n} from '@polymorph/vue'\n\nexport interface ToasterMessages {\n dismiss: string\n notification: string\n viewport: string\n}\n\nexport interface ToastProps {\n /**\n * At most one; a shortcut, never the only way to do what it does.\n */\n action?: ToastAction\n description?: string\n /**\n * Required recovery actions stay reachable until their owning state resolves.\n */\n dismissible?: boolean\n /**\n * `Infinity` pins the toast until it is dismissed. A call that sets neither this nor\n * `retained` takes its tone's lifetime (see `retained`); one that sets only `retained` gets\n * `TOAST_DEFAULT_DURATION_MS`.\n */\n durationMs?: number\n /**\n * A live toast's id updates it in place: same card and position, new content, timer restarted.\n * An unknown id raises a new toast. `toast.promise` uses this, not a special path.\n */\n id?: string\n /**\n * State-owned notices are removed by their owner, never evicted by another notification. A\n * call that sets neither this nor `durationMs` takes its tone's lifetime: danger and warning\n * are retained and pinned, and the other tones leave after the default duration.\n */\n retained?: boolean\n title: string\n tone?: 'info' | 'warning' | 'success' | 'danger' | 'neutral'\n}\n\ndefineOptions({ name: 'Toast', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ToastProps>(), {\n dismissible: undefined,\n retained: undefined,\n})\nconst emit = defineEmits<{ dismiss: [] }>()\nconst callerSlots = defineSlots<{ content?: (props: Record<string, never>) => unknown }>()\nconst slots = useTrackedSlots(callerSlots)\nconst uid = useId()\nconst toastId = computed(() => props.id ?? uid)\nconst options = computed(() => ({\n id: toastId.value,\n title: props.title,\n description: props.description,\n tone: props.tone,\n action: props.action,\n durationMs: props.durationMs,\n dismissible: props.dismissible,\n retained: props.retained,\n content: slotNode(slots.content),\n onDismiss: () => emit('dismiss'),\n}))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = toast(options.value)\n release1 = () => {\n removeToast(ran)\n }\n}\nonMounted(effect1)\nwatch(() => [toastId.value, props.title], effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n getToasts().some((record) => record.id === toastId.value && record.closing !== true) &&\n toast(options.value)\n}\nwatch(() => options.value, effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const timer = setTimeout(() => {\n devWarning(\n document.querySelector('[data-toast-part=\"list\"]') === null,\n `Toast \"${props.title}\" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`,\n )\n }, 0)\n release3 = () => clearTimeout(timer)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template></template>\n"],"mappings":""}
1
+ {"version":3,"file":"Toast.js","names":[],"sources":["../../../src/overlays/Toast.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifications that report the outcome of an action (`design/components/toast.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.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, useId, watch } from 'vue'\n\nimport {\n devWarning,\n getToasts,\n removeToast,\n slotNode,\n toast,\n useTrackedSlots,\n type ToastAction,\n} from '@polymorph/vue'\n\nexport interface ToasterMessages {\n dismiss: string\n notification: string\n viewport: string\n}\n\nexport interface ToastProps {\n /**\n * At most one; a shortcut, never the only way to do what it does.\n */\n action?: ToastAction\n description?: string\n /**\n * Required recovery actions stay reachable until their owning state resolves.\n */\n dismissible?: boolean\n /**\n * `Infinity` pins the toast until it is dismissed. A call that sets neither this nor\n * `retained` takes its tone's lifetime (see `retained`); one that sets only `retained` gets\n * `TOAST_DEFAULT_DURATION_MS`.\n */\n durationMs?: number\n /**\n * A live toast's id updates it in place: same card and position, new content, timer restarted.\n * An unknown id raises a new toast. `toast.promise` uses this, not a special path.\n */\n id?: string\n /**\n * State-owned notices are removed by their owner, never evicted by another notification. A\n * call that sets neither this nor `durationMs` takes its tone's lifetime: danger and warning\n * are retained and pinned, and the other tones leave after the default duration.\n */\n retained?: boolean\n title: string\n tone?: 'info' | 'warning' | 'success' | 'danger' | 'neutral'\n}\n\ndefineOptions({ name: 'Toast', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ToastProps>(), {\n dismissible: undefined,\n retained: undefined,\n})\nconst emit = defineEmits<{ dismiss: [] }>()\nconst callerSlots = defineSlots<{ content?: (props: Record<string, never>) => unknown }>()\nconst slots = useTrackedSlots(callerSlots)\nconst uid = useId()\nconst toastId = computed(() => props.id ?? uid)\nconst options = computed(() => ({\n id: toastId.value,\n title: props.title,\n description: props.description,\n tone: props.tone,\n action: props.action,\n durationMs: props.durationMs,\n dismissible: props.dismissible,\n retained: props.retained,\n content: slotNode(slots.content),\n onDismiss: () => emit('dismiss'),\n}))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = toast(options.value)\n release1 = () => {\n removeToast(ran)\n }\n}\nonMounted(effect1)\nwatch(() => [toastId.value, props.title], effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n getToasts().some((record) => record.id === toastId.value && record.closing !== true) &&\n toast(options.value)\n}\nwatch(() => options.value, effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const timer = setTimeout(() => {\n devWarning(\n document.querySelector('[data-toast-part=\"list\"]') === null,\n `Toast \"${props.title}\" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`,\n )\n }, 0)\n release3 = () => clearTimeout(timer)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <template v-if=\"false\" />\n</template>\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import { devWarning as e, getToasts as t, removeToast as n, slotNode as r, toast as i, useTrackedSlots as a } from "@polymorph/vue";
2
- import { computed as o, defineComponent as s, onBeforeUnmount as c, onMounted as l, useId as u, useSlots as d, watch as f } from "vue";
2
+ import { computed as o, createCommentVNode as s, defineComponent as c, onBeforeUnmount as l, onMounted as u, useId as d, useSlots as f, watch as p } from "vue";
3
3
  //#region src/overlays/Toast.vue?vue&type=script&setup=true&lang.ts
4
- var p = /*@__PURE__*/ s({
4
+ var m = /*@__PURE__*/ c({
5
5
  name: "Toast",
6
6
  inheritAttrs: !1,
7
7
  __name: "Toast",
@@ -22,39 +22,39 @@ var p = /*@__PURE__*/ s({
22
22
  tone: {}
23
23
  },
24
24
  emits: ["dismiss"],
25
- setup(s, { emit: p }) {
26
- let m = s, h = p, g = a(d()), _ = u(), v = o(() => m.id ?? _), y = o(() => ({
27
- id: v.value,
28
- title: m.title,
29
- description: m.description,
30
- tone: m.tone,
31
- action: m.action,
32
- durationMs: m.durationMs,
33
- dismissible: m.dismissible,
34
- retained: m.retained,
35
- content: r(g.content),
36
- onDismiss: () => h("dismiss")
37
- })), b, x = () => {
38
- b?.();
39
- let e = i(y.value);
40
- b = () => {
25
+ setup(c, { emit: m }) {
26
+ let h = c, g = m, _ = a(f()), v = d(), y = o(() => h.id ?? v), b = o(() => ({
27
+ id: y.value,
28
+ title: h.title,
29
+ description: h.description,
30
+ tone: h.tone,
31
+ action: h.action,
32
+ durationMs: h.durationMs,
33
+ dismissible: h.dismissible,
34
+ retained: h.retained,
35
+ content: r(_.content),
36
+ onDismiss: () => g("dismiss")
37
+ })), x, S = () => {
38
+ x?.();
39
+ let e = i(b.value);
40
+ x = () => {
41
41
  n(e);
42
42
  };
43
43
  };
44
- l(x), f(() => [v.value, m.title], x, { flush: "post" }), c(() => b?.()), f(() => y.value, () => {
45
- t().some((e) => e.id === v.value && e.closing !== !0) && i(y.value);
44
+ u(S), p(() => [y.value, h.title], S, { flush: "post" }), l(() => x?.()), p(() => b.value, () => {
45
+ t().some((e) => e.id === y.value && e.closing !== !0) && i(b.value);
46
46
  }, { flush: "post" });
47
- let S;
48
- return l(() => {
49
- S?.();
47
+ let C;
48
+ return u(() => {
49
+ C?.();
50
50
  let t = setTimeout(() => {
51
- e(document.querySelector("[data-toast-part=\"list\"]") === null, `Toast "${m.title}" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`);
51
+ e(document.querySelector("[data-toast-part=\"list\"]") === null, `Toast "${h.title}" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`);
52
52
  }, 0);
53
- S = () => clearTimeout(t);
54
- }), c(() => S?.()), (e, t) => null;
53
+ C = () => clearTimeout(t);
54
+ }), l(() => C?.()), (e, t) => s("", !0);
55
55
  }
56
56
  });
57
57
  //#endregion
58
- export { p as default };
58
+ export { m as default };
59
59
 
60
60
  //# sourceMappingURL=Toast.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/overlays/Toast.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifications that report the outcome of an action (`design/components/toast.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.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, useId, watch } from 'vue'\n\nimport {\n devWarning,\n getToasts,\n removeToast,\n slotNode,\n toast,\n useTrackedSlots,\n type ToastAction,\n} from '@polymorph/vue'\n\nexport interface ToasterMessages {\n dismiss: string\n notification: string\n viewport: string\n}\n\nexport interface ToastProps {\n /**\n * At most one; a shortcut, never the only way to do what it does.\n */\n action?: ToastAction\n description?: string\n /**\n * Required recovery actions stay reachable until their owning state resolves.\n */\n dismissible?: boolean\n /**\n * `Infinity` pins the toast until it is dismissed. A call that sets neither this nor\n * `retained` takes its tone's lifetime (see `retained`); one that sets only `retained` gets\n * `TOAST_DEFAULT_DURATION_MS`.\n */\n durationMs?: number\n /**\n * A live toast's id updates it in place: same card and position, new content, timer restarted.\n * An unknown id raises a new toast. `toast.promise` uses this, not a special path.\n */\n id?: string\n /**\n * State-owned notices are removed by their owner, never evicted by another notification. A\n * call that sets neither this nor `durationMs` takes its tone's lifetime: danger and warning\n * are retained and pinned, and the other tones leave after the default duration.\n */\n retained?: boolean\n title: string\n tone?: 'info' | 'warning' | 'success' | 'danger' | 'neutral'\n}\n\ndefineOptions({ name: 'Toast', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ToastProps>(), {\n dismissible: undefined,\n retained: undefined,\n})\nconst emit = defineEmits<{ dismiss: [] }>()\nconst callerSlots = defineSlots<{ content?: (props: Record<string, never>) => unknown }>()\nconst slots = useTrackedSlots(callerSlots)\nconst uid = useId()\nconst toastId = computed(() => props.id ?? uid)\nconst options = computed(() => ({\n id: toastId.value,\n title: props.title,\n description: props.description,\n tone: props.tone,\n action: props.action,\n durationMs: props.durationMs,\n dismissible: props.dismissible,\n retained: props.retained,\n content: slotNode(slots.content),\n onDismiss: () => emit('dismiss'),\n}))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = toast(options.value)\n release1 = () => {\n removeToast(ran)\n }\n}\nonMounted(effect1)\nwatch(() => [toastId.value, props.title], effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n getToasts().some((record) => record.id === toastId.value && record.closing !== true) &&\n toast(options.value)\n}\nwatch(() => options.value, effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const timer = setTimeout(() => {\n devWarning(\n document.querySelector('[data-toast-part=\"list\"]') === null,\n `Toast \"${props.title}\" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`,\n )\n }, 0)\n release3 = () => clearTimeout(timer)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template></template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,IAAM,IAAQ,GAIR,IAAO,GAEP,IAAQ,EADM,EACU,CAAW,GACnC,IAAM,EAAM,GACZ,IAAU,QAAe,EAAM,MAAM,CAAG,GACxC,IAAU,SAAgB;GAC9B,IAAI,EAAQ;GACZ,OAAO,EAAM;GACb,aAAa,EAAM;GACnB,MAAM,EAAM;GACZ,QAAQ,EAAM;GACd,YAAY,EAAM;GAClB,aAAa,EAAM;GACnB,UAAU,EAAM;GAChB,SAAS,EAAS,EAAM,OAAO;GAC/B,iBAAiB,EAAK,SAAS;EACjC,EAAE,GACE,GACE,UAAgB;GACpB,IAAW;GACX,IAAM,IAAM,EAAM,EAAQ,KAAK;GAC/B,UAAiB;IACf,EAAY,CAAG;GACjB;EACF;EAQA,AAPA,EAAU,CAAO,GACjB,QAAY,CAAC,EAAQ,OAAO,EAAM,KAAK,GAAG,GAAS,EAAE,OAAO,OAAO,CAAC,GACpE,QAAsB,IAAW,CAAC,GAKlC,QAAY,EAAQ,aAJE;GACpB,EAAU,CAAC,CAAC,MAAM,MAAW,EAAO,OAAO,EAAQ,SAAS,EAAO,YAAY,EAAI,KACjF,EAAM,EAAQ,KAAK;EACvB,GACoC,EAAE,OAAO,OAAO,CAAC;EACrD,IAAI;SAWJ,QAVsB;GACpB,IAAW;GACX,IAAM,IAAQ,iBAAiB;IAC7B,EACE,SAAS,cAAc,4BAA0B,MAAM,MACvD,UAAU,EAAM,MAAM,4KACxB;GACF,GAAG,CAAC;GACJ,UAAiB,aAAa,CAAK;EACrC,CACiB,GACjB,QAAsB,IAAW,CAAC"}
1
+ {"version":3,"file":"Toast.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/overlays/Toast.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Notifications that report the outcome of an action (`design/components/toast.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.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, useId, watch } from 'vue'\n\nimport {\n devWarning,\n getToasts,\n removeToast,\n slotNode,\n toast,\n useTrackedSlots,\n type ToastAction,\n} from '@polymorph/vue'\n\nexport interface ToasterMessages {\n dismiss: string\n notification: string\n viewport: string\n}\n\nexport interface ToastProps {\n /**\n * At most one; a shortcut, never the only way to do what it does.\n */\n action?: ToastAction\n description?: string\n /**\n * Required recovery actions stay reachable until their owning state resolves.\n */\n dismissible?: boolean\n /**\n * `Infinity` pins the toast until it is dismissed. A call that sets neither this nor\n * `retained` takes its tone's lifetime (see `retained`); one that sets only `retained` gets\n * `TOAST_DEFAULT_DURATION_MS`.\n */\n durationMs?: number\n /**\n * A live toast's id updates it in place: same card and position, new content, timer restarted.\n * An unknown id raises a new toast. `toast.promise` uses this, not a special path.\n */\n id?: string\n /**\n * State-owned notices are removed by their owner, never evicted by another notification. A\n * call that sets neither this nor `durationMs` takes its tone's lifetime: danger and warning\n * are retained and pinned, and the other tones leave after the default duration.\n */\n retained?: boolean\n title: string\n tone?: 'info' | 'warning' | 'success' | 'danger' | 'neutral'\n}\n\ndefineOptions({ name: 'Toast', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<ToastProps>(), {\n dismissible: undefined,\n retained: undefined,\n})\nconst emit = defineEmits<{ dismiss: [] }>()\nconst callerSlots = defineSlots<{ content?: (props: Record<string, never>) => unknown }>()\nconst slots = useTrackedSlots(callerSlots)\nconst uid = useId()\nconst toastId = computed(() => props.id ?? uid)\nconst options = computed(() => ({\n id: toastId.value,\n title: props.title,\n description: props.description,\n tone: props.tone,\n action: props.action,\n durationMs: props.durationMs,\n dismissible: props.dismissible,\n retained: props.retained,\n content: slotNode(slots.content),\n onDismiss: () => emit('dismiss'),\n}))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = toast(options.value)\n release1 = () => {\n removeToast(ran)\n }\n}\nonMounted(effect1)\nwatch(() => [toastId.value, props.title], effect1, { flush: 'post' })\nonBeforeUnmount(() => release1?.())\nconst effect2 = () => {\n getToasts().some((record) => record.id === toastId.value && record.closing !== true) &&\n toast(options.value)\n}\nwatch(() => options.value, effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const timer = setTimeout(() => {\n devWarning(\n document.querySelector('[data-toast-part=\"list\"]') === null,\n `Toast \"${props.title}\" rendered with no Toast viewport mounted, so nothing draws it. Mount the viewport once at the application root, outside any error boundary whose fallback renders a Toast.`,\n )\n }, 0)\n release3 = () => clearTimeout(timer)\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <template v-if=\"false\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,IAAM,IAAQ,GAIR,IAAO,GAEP,IAAQ,EADM,EACU,CAAW,GACnC,IAAM,EAAM,GACZ,IAAU,QAAe,EAAM,MAAM,CAAG,GACxC,IAAU,SAAgB;GAC9B,IAAI,EAAQ;GACZ,OAAO,EAAM;GACb,aAAa,EAAM;GACnB,MAAM,EAAM;GACZ,QAAQ,EAAM;GACd,YAAY,EAAM;GAClB,aAAa,EAAM;GACnB,UAAU,EAAM;GAChB,SAAS,EAAS,EAAM,OAAO;GAC/B,iBAAiB,EAAK,SAAS;EACjC,EAAE,GACE,GACE,UAAgB;GACpB,IAAW;GACX,IAAM,IAAM,EAAM,EAAQ,KAAK;GAC/B,UAAiB;IACf,EAAY,CAAG;GACjB;EACF;EAQA,AAPA,EAAU,CAAO,GACjB,QAAY,CAAC,EAAQ,OAAO,EAAM,KAAK,GAAG,GAAS,EAAE,OAAO,OAAO,CAAC,GACpE,QAAsB,IAAW,CAAC,GAKlC,QAAY,EAAQ,aAJE;GACpB,EAAU,CAAC,CAAC,MAAM,MAAW,EAAO,OAAO,EAAQ,SAAS,EAAO,YAAY,EAAI,KACjF,EAAM,EAAQ,KAAK;EACvB,GACoC,EAAE,OAAO,OAAO,CAAC;EACrD,IAAI;SAWJ,QAVsB;GACpB,IAAW;GACX,IAAM,IAAQ,iBAAiB;IAC7B,EACE,SAAS,cAAc,4BAA0B,MAAM,MACvD,UAAU,EAAM,MAAM,4KACxB;GACF,GAAG,CAAC;GACJ,UAAiB,aAAa,CAAK;EACrC,CACiB,GACjB,QAAsB,IAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":[],"sources":["../../../src/structure/Accordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Disclosure list (`design/components/accordion.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/accordion.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 * as zag from '@zag-js/accordion'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport { useKeyedPresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/structure/accordion.module.css'\n\nexport type AccordionHeadingLevel = NonNullable<AccordionProps['headingLevel']>\n\nexport interface AccordionItem {\n value: string\n label: string\n content: VNode | string\n disabled?: boolean\n}\n\nexport interface AccordionProps {\n /**\n * The open item may be closed again, leaving the list shut.\n */\n collapsible?: boolean\n defaultValue?: string | string[]\n headingLevel?: 3 | 4\n items: AccordionItem[]\n type?: 'single' | 'multiple'\n value?: string | string[]\n}\n\ndefineOptions({ name: 'Accordion', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n collapsible: undefined,\n headingLevel: 3,\n type: 'single',\n})\nconst emit = defineEmits<{ valueChange: [value: string | string[]] }>()\nconst uid = useId()\nconst heights = ref(new Map())\nconst regions = useTemplateRef<HTMLElement[]>('regions')\nconst root = useTemplateRef<HTMLElement>('root')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n multiple: props.type === 'multiple',\n collapsible: props.type === 'multiple' || (props.collapsible ?? true),\n value:\n props.value === undefined\n ? undefined\n : Array.isArray(props.value)\n ? props.value\n : props.value === ''\n ? []\n : [props.value],\n defaultValue:\n props.defaultValue === undefined\n ? undefined\n : Array.isArray(props.defaultValue)\n ? props.defaultValue\n : [props.defaultValue],\n onValueChange: (details) => {\n emit('valueChange', props.type === 'multiple' ? details.value : (details.value[0] ?? ''))\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst regionPresent = useKeyedPresence(\n () => api.value.value,\n regions,\n (element) =>\n props.items.find(\n (item) => api.value.getItemContentProps({ value: item.value }).id === element.id,\n )?.value,\n)\nconst effect1 = () => {\n heights.value = new Map(\n (regions.value ?? []).map((region) => [region.id, region.scrollHeight + 'px']),\n )\n}\nonMounted(effect1)\nwatch(() => api.value.value, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'Accordion',\n element: () => root.value,\n state: () => ({\n value: api.value.value,\n items: props.items.map((item) => ({\n id: item.value,\n label: item.label,\n ...(item.disabled === true ? { disabled: true } : {}),\n })),\n }),\n actions: {\n expand: {\n argument: 'id',\n run: (value) =>\n api.value.value.includes(value) ||\n api.value.setValue(props.type === 'multiple' ? [...api.value.value, value] : [value]),\n },\n collapse: {\n argument: 'id',\n run: (value) =>\n (() => {\n if (!api.value.value.includes(value)) return\n if (props.type !== 'multiple' && !(props.collapsible ?? true)) {\n throw new Error('This accordion keeps one item open; expand another item instead.')\n }\n api.value.setValue(api.value.value.filter((shown) => shown !== value))\n })(),\n },\n },\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <div ref=\"root\" v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"accordion\">\n <template v-for=\"item in items\" :key=\"item.value\">\n <!-- item -->\n <div\n v-bind=\"api.getItemProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.item\"\n >\n <component :is=\"headingLevel === 4 ? 'h4' : 'h3'\" :class=\"styles.header\">\n <!-- trigger -->\n <button\n v-bind=\"api.getItemTriggerProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.trigger\"\n data-accordion-part=\"trigger\"\n >\n <span :class=\"styles.label\">\n {{ item.label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" />\n </span>\n </button>\n </component>\n <!-- region -->\n <div\n ref=\"regions\"\n v-bind=\"api.getItemContentProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-accordion-content-height': heights.get(\n api.getItemContentProps({ value: item.value, disabled: item.disabled }).id,\n ),\n }\"\n :hidden=\"!regionPresent.has(item.value)\"\n data-accordion-part=\"region\"\n >\n <div :class=\"styles.inner\">\n <template v-if=\"typeof item.content === 'string'\">{{ item.content }}</template>\n <template v-else>\n <component :is=\"item.content\" />\n </template>\n </div>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Accordion.js","names":[],"sources":["../../../src/structure/Accordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Disclosure list (`design/components/accordion.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/accordion.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 * as zag from '@zag-js/accordion'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport { useKeyedPresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/structure/accordion.module.css'\n\nexport type AccordionHeadingLevel = NonNullable<AccordionProps['headingLevel']>\n\nexport interface AccordionItem {\n value: string\n label: string\n content: VNode | string\n disabled?: boolean\n}\n\nexport interface AccordionProps {\n /**\n * The open item may be closed again, leaving the list shut.\n */\n collapsible?: boolean\n defaultValue?: string | string[]\n headingLevel?: 3 | 4\n items: AccordionItem[]\n /**\n * Keeps a closed item's content in the document and `hidden`, so a page's server markup\n * carries it and its state survives a close. Without it the React member leaves closed content\n * out. The generated members keep it in every case.\n */\n keepMounted?: boolean\n type?: 'single' | 'multiple'\n value?: string | string[]\n}\n\ndefineOptions({ name: 'Accordion', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n collapsible: undefined,\n headingLevel: 3,\n keepMounted: undefined,\n type: 'single',\n})\nconst emit = defineEmits<{ valueChange: [value: string | string[]] }>()\nconst uid = useId()\nconst heights = ref(new Map())\nconst regions = useTemplateRef<HTMLElement[]>('regions')\nconst root = useTemplateRef<HTMLElement>('root')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n multiple: props.type === 'multiple',\n collapsible: props.type === 'multiple' || (props.collapsible ?? true),\n value:\n props.value === undefined\n ? undefined\n : Array.isArray(props.value)\n ? props.value\n : props.value === ''\n ? []\n : [props.value],\n defaultValue:\n props.defaultValue === undefined\n ? undefined\n : Array.isArray(props.defaultValue)\n ? props.defaultValue\n : [props.defaultValue],\n onValueChange: (details) => {\n emit('valueChange', props.type === 'multiple' ? details.value : (details.value[0] ?? ''))\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst regionPresent = useKeyedPresence(\n () => api.value.value,\n regions,\n (element) =>\n props.items.find(\n (item) => api.value.getItemContentProps({ value: item.value }).id === element.id,\n )?.value,\n)\nconst effect1 = () => {\n heights.value = new Map(\n (regions.value ?? []).map((region) => [region.id, region.scrollHeight + 'px']),\n )\n}\nonMounted(effect1)\nwatch(() => api.value.value, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'Accordion',\n element: () => root.value,\n state: () => ({\n value: api.value.value,\n items: props.items.map((item) => ({\n id: item.value,\n label: item.label,\n ...(item.disabled === true ? { disabled: true } : {}),\n })),\n }),\n actions: {\n expand: {\n argument: 'id',\n run: (value) =>\n api.value.value.includes(value) ||\n api.value.setValue(props.type === 'multiple' ? [...api.value.value, value] : [value]),\n },\n collapse: {\n argument: 'id',\n run: (value) =>\n (() => {\n if (!api.value.value.includes(value)) return\n if (props.type !== 'multiple' && !(props.collapsible ?? true)) {\n throw new Error('This accordion keeps one item open; expand another item instead.')\n }\n api.value.setValue(api.value.value.filter((shown) => shown !== value))\n })(),\n },\n },\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <div ref=\"root\" v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"accordion\">\n <template v-for=\"item in items\" :key=\"item.value\">\n <!-- item -->\n <div\n v-bind=\"api.getItemProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.item\"\n >\n <component :is=\"headingLevel === 4 ? 'h4' : 'h3'\" :class=\"styles.header\">\n <!-- trigger -->\n <button\n v-bind=\"api.getItemTriggerProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.trigger\"\n data-accordion-part=\"trigger\"\n >\n <span :class=\"styles.label\">\n {{ item.label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" />\n </span>\n </button>\n </component>\n <!-- region -->\n <div\n ref=\"regions\"\n v-bind=\"api.getItemContentProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-accordion-content-height': heights.get(\n api.getItemContentProps({ value: item.value, disabled: item.disabled }).id,\n ),\n }\"\n :hidden=\"!regionPresent.has(item.value)\"\n data-accordion-part=\"region\"\n >\n <div :class=\"styles.inner\">\n <template v-if=\"typeof item.content === 'string'\">{{ item.content }}</template>\n <template v-else>\n <component :is=\"item.content\" />\n </template>\n </div>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -17,6 +17,10 @@ var A = ["hidden"], j = /*@__PURE__*/ d({
17
17
  defaultValue: {},
18
18
  headingLevel: { default: 3 },
19
19
  items: {},
20
+ keepMounted: {
21
+ type: Boolean,
22
+ default: void 0
23
+ },
20
24
  type: { default: "single" },
21
25
  value: {}
22
26
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/structure/Accordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Disclosure list (`design/components/accordion.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/accordion.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 * as zag from '@zag-js/accordion'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport { useKeyedPresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/structure/accordion.module.css'\n\nexport type AccordionHeadingLevel = NonNullable<AccordionProps['headingLevel']>\n\nexport interface AccordionItem {\n value: string\n label: string\n content: VNode | string\n disabled?: boolean\n}\n\nexport interface AccordionProps {\n /**\n * The open item may be closed again, leaving the list shut.\n */\n collapsible?: boolean\n defaultValue?: string | string[]\n headingLevel?: 3 | 4\n items: AccordionItem[]\n type?: 'single' | 'multiple'\n value?: string | string[]\n}\n\ndefineOptions({ name: 'Accordion', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n collapsible: undefined,\n headingLevel: 3,\n type: 'single',\n})\nconst emit = defineEmits<{ valueChange: [value: string | string[]] }>()\nconst uid = useId()\nconst heights = ref(new Map())\nconst regions = useTemplateRef<HTMLElement[]>('regions')\nconst root = useTemplateRef<HTMLElement>('root')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n multiple: props.type === 'multiple',\n collapsible: props.type === 'multiple' || (props.collapsible ?? true),\n value:\n props.value === undefined\n ? undefined\n : Array.isArray(props.value)\n ? props.value\n : props.value === ''\n ? []\n : [props.value],\n defaultValue:\n props.defaultValue === undefined\n ? undefined\n : Array.isArray(props.defaultValue)\n ? props.defaultValue\n : [props.defaultValue],\n onValueChange: (details) => {\n emit('valueChange', props.type === 'multiple' ? details.value : (details.value[0] ?? ''))\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst regionPresent = useKeyedPresence(\n () => api.value.value,\n regions,\n (element) =>\n props.items.find(\n (item) => api.value.getItemContentProps({ value: item.value }).id === element.id,\n )?.value,\n)\nconst effect1 = () => {\n heights.value = new Map(\n (regions.value ?? []).map((region) => [region.id, region.scrollHeight + 'px']),\n )\n}\nonMounted(effect1)\nwatch(() => api.value.value, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'Accordion',\n element: () => root.value,\n state: () => ({\n value: api.value.value,\n items: props.items.map((item) => ({\n id: item.value,\n label: item.label,\n ...(item.disabled === true ? { disabled: true } : {}),\n })),\n }),\n actions: {\n expand: {\n argument: 'id',\n run: (value) =>\n api.value.value.includes(value) ||\n api.value.setValue(props.type === 'multiple' ? [...api.value.value, value] : [value]),\n },\n collapse: {\n argument: 'id',\n run: (value) =>\n (() => {\n if (!api.value.value.includes(value)) return\n if (props.type !== 'multiple' && !(props.collapsible ?? true)) {\n throw new Error('This accordion keeps one item open; expand another item instead.')\n }\n api.value.setValue(api.value.value.filter((shown) => shown !== value))\n })(),\n },\n },\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <div ref=\"root\" v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"accordion\">\n <template v-for=\"item in items\" :key=\"item.value\">\n <!-- item -->\n <div\n v-bind=\"api.getItemProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.item\"\n >\n <component :is=\"headingLevel === 4 ? 'h4' : 'h3'\" :class=\"styles.header\">\n <!-- trigger -->\n <button\n v-bind=\"api.getItemTriggerProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.trigger\"\n data-accordion-part=\"trigger\"\n >\n <span :class=\"styles.label\">\n {{ item.label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" />\n </span>\n </button>\n </component>\n <!-- region -->\n <div\n ref=\"regions\"\n v-bind=\"api.getItemContentProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-accordion-content-height': heights.get(\n api.getItemContentProps({ value: item.value, disabled: item.disabled }).id,\n ),\n }\"\n :hidden=\"!regionPresent.has(item.value)\"\n data-accordion-part=\"region\"\n >\n <div :class=\"styles.inner\">\n <template v-if=\"typeof item.content === 'string'\">{{ item.content }}</template>\n <template v-else>\n <component :is=\"item.content\" />\n </template>\n </div>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAiDA,IAAM,IAAQ,GAKR,IAAO,GACP,IAAM,EAAM,GACZ,IAAU,kBAAI,IAAI,IAAI,CAAC,GACvB,IAAU,EAA8B,SAAS,GACjD,IAAO,EAA4B,MAAM,GACzC,IAAoB,EAAa,GACjC,IAAU,EACd,EAAI,SACJ,SAAgB;GACd,IAAI;GACJ,KAAK,EAAkB;GACvB,UAAU,EAAM,SAAS;GACzB,aAAa,EAAM,SAAS,eAAe,EAAM,eAAe;GAChE,OACE,EAAM,UAAU,KAAA,IACZ,KAAA,IACA,MAAM,QAAQ,EAAM,KAAK,IACvB,EAAM,QACN,EAAM,UAAU,KACd,CAAC,IACD,CAAC,EAAM,KAAK;GACtB,cACE,EAAM,iBAAiB,KAAA,IACnB,KAAA,IACA,MAAM,QAAQ,EAAM,YAAY,IAC9B,EAAM,eACN,CAAC,EAAM,YAAY;GAC3B,gBAAgB,MAAY;IAC1B,EAAK,eAAe,EAAM,SAAS,aAAa,EAAQ,QAAS,EAAQ,MAAM,MAAM,EAAG;GAC1F;EACF,EAAE,CACJ,GACM,IAAM,QAAe,EAAI,QAAQ,GAAS,CAAc,CAAC,GACzD,IAAgB,QACd,EAAI,MAAM,OAChB,IACC,MACC,EAAM,MAAM,MACT,MAAS,EAAI,MAAM,oBAAoB,EAAE,OAAO,EAAK,MAAM,CAAC,CAAC,CAAC,OAAO,EAAQ,EAChF,CAAC,EAAE,KACP,GACM,UAAgB;GACpB,EAAQ,QAAQ,IAAI,KACjB,EAAQ,SAAS,CAAC,EAAA,CAAG,KAAK,MAAW,CAAC,EAAO,IAAI,EAAO,eAAe,IAAI,CAAC,CAC/E;EACF;EAEA,AADA,EAAU,CAAO,GACjB,QAAY,EAAI,MAAM,OAAO,GAAS,EAAE,OAAO,OAAO,CAAC;EACvD,IAAI;SAsCJ,QArCsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAY;IACtB,QAAQ;IACR,eAAe,EAAK;IACpB,cAAc;KACZ,OAAO,EAAI,MAAM;KACjB,OAAO,EAAM,MAAM,KAAK,OAAU;MAChC,IAAI,EAAK;MACT,OAAO,EAAK;MACZ,GAAI,EAAK,aAAa,KAAO,EAAE,UAAU,GAAK,IAAI,CAAC;KACrD,EAAE;IACJ;IACA,SAAS;KACP,QAAQ;MACN,UAAU;MACV,MAAM,MACJ,EAAI,MAAM,MAAM,SAAS,CAAK,KAC9B,EAAI,MAAM,SAAS,EAAM,SAAS,aAAa,CAAC,GAAG,EAAI,MAAM,OAAO,CAAK,IAAI,CAAC,CAAK,CAAC;KACxF;KACA,UAAU;MACR,UAAU;MACV,MAAM,aACG;OACA,MAAI,MAAM,MAAM,SAAS,CAAK,GACnC;YAAI,EAAM,SAAS,cAAc,EAAE,EAAM,eAAe,KACtD,MAAU,MAAM,kEAAkE;QAEpF,EAAI,MAAM,SAAS,EAAI,MAAM,MAAM,QAAQ,MAAU,MAAU,CAAK,CAAC;OAFe;MAGtF,EAAA,CAAG;KACP;IACF;GACF,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,mBAIhC,EA4CM,OA5CN,EA4CM;YA5CG;GAAJ,KAAI;KAAe,EAAA,MAAI,aAAY,GAAA;GAAK,OAAO,EAAA,CAAA,CAAM,CAAC;GAAM,eAAY;eAC3E,EA0CW,GAAA,MAAA,EA1Cc,EAAA,QAAR,YAEf,EAuCM,OAvCN,EAuCM;QAzC8B,EAAK;;KAG/B,EAAA,MAAI,aAAY;GAAA,OAAU,EAAK;GAAK,UAAY,EAAK;EAAQ,CAAA,GAAA,EACpE,OAAO,EAAA,CAAA,CAAM,CAAC,KAAA,CAAA,GAAA,EAAA,EAAA,GAEf,EAcY,EAdI,EAAA,iBAAY,IAAA,OAAA,IAAA,GAAA,EAAuB,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,MAAM,EAAA,GAAA;oBAa5D,CAXT,EAWS,UAXT,EAWS,EAAA,SAAA,GAAA,GAVC,EAAA,MAAI,oBAAmB;IAAA,OAAU,EAAK;IAAK,UAAY,EAAK;GAAQ,CAAA,GAAA;IAC3E,OAAO,EAAA,CAAA,CAAM,CAAC;IACf,uBAAoB;QAEpB,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,EACrB,EAAK,KAAK,GAAA,CAAA,GAEf,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,OAAO,EAAA,GAAA,CAC1B,EAAoB,EAAA,CAAA,GAAA,EAAd,MAAK,OAAM,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA;;wBAKvB,EAkBM,OAlBN,EAkBM;;YAjBA;GAAJ,KAAI;sBACI,EAAA,MAAI,oBAAmB;GAAA,OAAU,EAAK;GAAK,UAAY,EAAK;EAAQ,CAAA,GAAA;GAC3E,OAAO,EAAA,CAAA,CAAM,CAAC;GACd,OAAK,EAAA,oCAAoD,EAAA,MAAQ,IAAmB,EAAA,MAAI,oBAAmB;IAAA,OAAU,EAAK;IAAK,UAAY,EAAK;GAAQ,CAAA,CAAA,CAAI,EAAA,EAAA;GAK5J,QAAM,CAAG,EAAA,CAAA,CAAa,CAAC,IAAI,EAAK,KAAK;GACtC,uBAAoB;OAEpB,EAKM,OAAA,EALA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,CAAA,OACA,EAAK,WAAO,YAAA,EAAA,GAAnC,EAA+E,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EAA1B,EAAK,OAAO,GAAA,CAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GAE/D,EAAgC,EAAhB,EAAK,OAAO,GAAA,EAAA,KAAA,EAAA,CAAA,EAAA,GAAA,CAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"Accordion.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/structure/Accordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Disclosure list (`design/components/accordion.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/accordion.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 * as zag from '@zag-js/accordion'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport { useKeyedPresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/structure/accordion.module.css'\n\nexport type AccordionHeadingLevel = NonNullable<AccordionProps['headingLevel']>\n\nexport interface AccordionItem {\n value: string\n label: string\n content: VNode | string\n disabled?: boolean\n}\n\nexport interface AccordionProps {\n /**\n * The open item may be closed again, leaving the list shut.\n */\n collapsible?: boolean\n defaultValue?: string | string[]\n headingLevel?: 3 | 4\n items: AccordionItem[]\n /**\n * Keeps a closed item's content in the document and `hidden`, so a page's server markup\n * carries it and its state survives a close. Without it the React member leaves closed content\n * out. The generated members keep it in every case.\n */\n keepMounted?: boolean\n type?: 'single' | 'multiple'\n value?: string | string[]\n}\n\ndefineOptions({ name: 'Accordion', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n collapsible: undefined,\n headingLevel: 3,\n keepMounted: undefined,\n type: 'single',\n})\nconst emit = defineEmits<{ valueChange: [value: string | string[]] }>()\nconst uid = useId()\nconst heights = ref(new Map())\nconst regions = useTemplateRef<HTMLElement[]>('regions')\nconst root = useTemplateRef<HTMLElement>('root')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n multiple: props.type === 'multiple',\n collapsible: props.type === 'multiple' || (props.collapsible ?? true),\n value:\n props.value === undefined\n ? undefined\n : Array.isArray(props.value)\n ? props.value\n : props.value === ''\n ? []\n : [props.value],\n defaultValue:\n props.defaultValue === undefined\n ? undefined\n : Array.isArray(props.defaultValue)\n ? props.defaultValue\n : [props.defaultValue],\n onValueChange: (details) => {\n emit('valueChange', props.type === 'multiple' ? details.value : (details.value[0] ?? ''))\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst regionPresent = useKeyedPresence(\n () => api.value.value,\n regions,\n (element) =>\n props.items.find(\n (item) => api.value.getItemContentProps({ value: item.value }).id === element.id,\n )?.value,\n)\nconst effect1 = () => {\n heights.value = new Map(\n (regions.value ?? []).map((region) => [region.id, region.scrollHeight + 'px']),\n )\n}\nonMounted(effect1)\nwatch(() => api.value.value, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = agentMember({\n member: 'Accordion',\n element: () => root.value,\n state: () => ({\n value: api.value.value,\n items: props.items.map((item) => ({\n id: item.value,\n label: item.label,\n ...(item.disabled === true ? { disabled: true } : {}),\n })),\n }),\n actions: {\n expand: {\n argument: 'id',\n run: (value) =>\n api.value.value.includes(value) ||\n api.value.setValue(props.type === 'multiple' ? [...api.value.value, value] : [value]),\n },\n collapse: {\n argument: 'id',\n run: (value) =>\n (() => {\n if (!api.value.value.includes(value)) return\n if (props.type !== 'multiple' && !(props.collapsible ?? true)) {\n throw new Error('This accordion keeps one item open; expand another item instead.')\n }\n api.value.setValue(api.value.value.filter((shown) => shown !== value))\n })(),\n },\n },\n })\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\n</script>\n\n<template>\n <div ref=\"root\" v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"accordion\">\n <template v-for=\"item in items\" :key=\"item.value\">\n <!-- item -->\n <div\n v-bind=\"api.getItemProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.item\"\n >\n <component :is=\"headingLevel === 4 ? 'h4' : 'h3'\" :class=\"styles.header\">\n <!-- trigger -->\n <button\n v-bind=\"api.getItemTriggerProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.trigger\"\n data-accordion-part=\"trigger\"\n >\n <span :class=\"styles.label\">\n {{ item.label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" />\n </span>\n </button>\n </component>\n <!-- region -->\n <div\n ref=\"regions\"\n v-bind=\"api.getItemContentProps({ value: item.value, disabled: item.disabled })\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-accordion-content-height': heights.get(\n api.getItemContentProps({ value: item.value, disabled: item.disabled }).id,\n ),\n }\"\n :hidden=\"!regionPresent.has(item.value)\"\n data-accordion-part=\"region\"\n >\n <div :class=\"styles.inner\">\n <template v-if=\"typeof item.content === 'string'\">{{ item.content }}</template>\n <template v-else>\n <component :is=\"item.content\" />\n </template>\n </div>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"Collapsible.js","names":[],"sources":["../../../src/structure/Collapsible.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A single show-or-hide section with one trigger (`design/components/collapsible.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/collapsible.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, useId, useTemplateRef } from 'vue'\n\nimport * as zag from '@zag-js/collapsible'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/collapsible.module.css'\n\nexport interface CollapsibleProps {\n /**\n * Closed by default, because a disclosure that starts open hides nothing.\n */\n defaultOpen?: boolean\n /**\n * The trigger's text, naming what is disclosed in the product's words.\n */\n label: string\n /**\n * Controlled state, paired with `onOpenChange` as in Radix.\n */\n open?: boolean\n}\n\ndefineOptions({ name: 'Collapsible', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CollapsibleProps>(), { defaultOpen: false, open: undefined })\nconst emit = defineEmits<{ openChange: [open: boolean] }>()\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst trigger = useTemplateRef<HTMLElement>('trigger')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: (details) => {\n emit('openChange', details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = agentMember({\n member: 'Collapsible',\n element: () => trigger.value,\n state: () => ({ open: api.value.open }),\n actions: {\n open: () => api.value.open || api.value.setOpen(true),\n close: () => api.value.open && api.value.setOpen(false),\n },\n })\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\n</script>\n\n<template>\n <div v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"collapsible\">\n <!-- trigger -->\n <button ref=\"trigger\" v-bind=\"api.getTriggerProps()\" :class=\"styles.trigger\">\n <span :class=\"styles.label\">\n {{ label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" size=\"sm\" />\n </span>\n </button>\n <!-- content -->\n <div\n v-bind=\"api.getContentProps()\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-collapsible-content-height': Object(api.getContentProps().style)['--height'],\n }\"\n >\n <div :class=\"styles.inner\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Collapsible.js","names":[],"sources":["../../../src/structure/Collapsible.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A single show-or-hide section with one trigger (`design/components/collapsible.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/collapsible.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, useId, useTemplateRef } from 'vue'\n\nimport * as zag from '@zag-js/collapsible'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/collapsible.module.css'\n\nexport interface CollapsibleProps {\n /**\n * Closed by default, because a disclosure that starts open hides nothing.\n */\n defaultOpen?: boolean\n /**\n * Keeps the closed region's content in the document and `hidden`, so a page's server markup\n * carries it and its state survives a close. Without it the React member leaves closed content\n * out. The generated members keep it in every case.\n */\n keepMounted?: boolean\n /**\n * The trigger's text, naming what is disclosed in the product's words.\n */\n label: string\n /**\n * Controlled state, paired with `onOpenChange` as in Radix.\n */\n open?: boolean\n}\n\ndefineOptions({ name: 'Collapsible', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CollapsibleProps>(), {\n defaultOpen: false,\n keepMounted: undefined,\n open: undefined,\n})\nconst emit = defineEmits<{ openChange: [open: boolean] }>()\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst trigger = useTemplateRef<HTMLElement>('trigger')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: (details) => {\n emit('openChange', details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = agentMember({\n member: 'Collapsible',\n element: () => trigger.value,\n state: () => ({ open: api.value.open }),\n actions: {\n open: () => api.value.open || api.value.setOpen(true),\n close: () => api.value.open && api.value.setOpen(false),\n },\n })\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\n</script>\n\n<template>\n <div v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"collapsible\">\n <!-- trigger -->\n <button ref=\"trigger\" v-bind=\"api.getTriggerProps()\" :class=\"styles.trigger\">\n <span :class=\"styles.label\">\n {{ label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" size=\"sm\" />\n </span>\n </button>\n <!-- content -->\n <div\n v-bind=\"api.getContentProps()\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-collapsible-content-height': Object(api.getContentProps().style)['--height'],\n }\"\n >\n <div :class=\"styles.inner\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":""}
@@ -13,6 +13,10 @@ var S = /*@__PURE__*/ c({
13
13
  type: Boolean,
14
14
  default: !1
15
15
  },
16
+ keepMounted: {
17
+ type: Boolean,
18
+ default: void 0
19
+ },
16
20
  label: {},
17
21
  open: {
18
22
  type: Boolean,
@@ -1 +1 @@
1
- {"version":3,"file":"Collapsible.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/structure/Collapsible.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A single show-or-hide section with one trigger (`design/components/collapsible.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/collapsible.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, useId, useTemplateRef } from 'vue'\n\nimport * as zag from '@zag-js/collapsible'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/collapsible.module.css'\n\nexport interface CollapsibleProps {\n /**\n * Closed by default, because a disclosure that starts open hides nothing.\n */\n defaultOpen?: boolean\n /**\n * The trigger's text, naming what is disclosed in the product's words.\n */\n label: string\n /**\n * Controlled state, paired with `onOpenChange` as in Radix.\n */\n open?: boolean\n}\n\ndefineOptions({ name: 'Collapsible', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CollapsibleProps>(), { defaultOpen: false, open: undefined })\nconst emit = defineEmits<{ openChange: [open: boolean] }>()\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst trigger = useTemplateRef<HTMLElement>('trigger')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: (details) => {\n emit('openChange', details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = agentMember({\n member: 'Collapsible',\n element: () => trigger.value,\n state: () => ({ open: api.value.open }),\n actions: {\n open: () => api.value.open || api.value.setOpen(true),\n close: () => api.value.open && api.value.setOpen(false),\n },\n })\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\n</script>\n\n<template>\n <div v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"collapsible\">\n <!-- trigger -->\n <button ref=\"trigger\" v-bind=\"api.getTriggerProps()\" :class=\"styles.trigger\">\n <span :class=\"styles.label\">\n {{ label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" size=\"sm\" />\n </span>\n </button>\n <!-- content -->\n <div\n v-bind=\"api.getContentProps()\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-collapsible-content-height': Object(api.getContentProps().style)['--height'],\n }\"\n >\n <div :class=\"styles.inner\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAiCA,IAAM,IAAQ,GACR,IAAO,GAEP,IAAM,EAAM,GACZ,IAAU,EAA4B,SAAS,GAC/C,IAAoB,EAAa,GACjC,IAAU,EACd,EAAI,SACJ,SAAgB;GACd,IAAI;GACJ,KAAK,EAAkB;GACvB,MAAM,EAAM;GACZ,aAAa,EAAM;GACnB,eAAe,MAAY;IACzB,EAAK,cAAc,EAAQ,IAAI;GACjC;EACF,EAAE,CACJ,GACM,IAAM,QAAe,EAAI,QAAQ,GAAS,CAAc,CAAC,GAC3D;SAgBJ,QAfsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAY;IACtB,QAAQ;IACR,eAAe,EAAQ;IACvB,cAAc,EAAE,MAAM,EAAI,MAAM,KAAK;IACrC,SAAS;KACP,YAAY,EAAI,MAAM,QAAQ,EAAI,MAAM,QAAQ,EAAI;KACpD,aAAa,EAAI,MAAM,QAAQ,EAAI,MAAM,QAAQ,EAAK;IACxD;GACF,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,mBAIhC,EAsBM,OAtBN,EAAa,EAsBP,MAtBW,aAAY,GAAA;GAAK,OAAO,EAAA,CAAA,CAAM,CAAC;GAAM,eAAY;OAEhE,EAOS,UAPT,EAOS;YAPG;GAAJ,KAAI;KAAkB,EAAA,MAAI,gBAAe,GAAA,EAAK,OAAO,EAAA,CAAA,CAAM,CAAC,QAAA,CAAA,GAAA,CAClE,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,EACrB,EAAA,KAAK,GAAA,CAAA,GAEV,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,OAAO,EAAA,GAAA,CAC1B,EAA8B,EAAA,CAAA,GAAA;GAAxB,MAAK;GAAO,MAAK;iBAI3B,EAUM,OAVN,EACU,EASJ,MATQ,gBAAe,GAAA;GAC1B,OAAO,EAAA,CAAA,CAAM,CAAC;GACd,OAAK,EAAA,sCAAkD,OAAO,EAAA,MAAI,gBAAe,CAAA,CAAG,KAAK,CAAA,CAAA,YAAA;OAI1F,EAEM,OAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,CACvB,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,EAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"Collapsible.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/structure/Collapsible.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A single show-or-hide section with one trigger (`design/components/collapsible.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/collapsible.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, useId, useTemplateRef } from 'vue'\n\nimport * as zag from '@zag-js/collapsible'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport { Icon, agentMember, useDirection } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/collapsible.module.css'\n\nexport interface CollapsibleProps {\n /**\n * Closed by default, because a disclosure that starts open hides nothing.\n */\n defaultOpen?: boolean\n /**\n * Keeps the closed region's content in the document and `hidden`, so a page's server markup\n * carries it and its state survives a close. Without it the React member leaves closed content\n * out. The generated members keep it in every case.\n */\n keepMounted?: boolean\n /**\n * The trigger's text, naming what is disclosed in the product's words.\n */\n label: string\n /**\n * Controlled state, paired with `onOpenChange` as in Radix.\n */\n open?: boolean\n}\n\ndefineOptions({ name: 'Collapsible', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CollapsibleProps>(), {\n defaultOpen: false,\n keepMounted: undefined,\n open: undefined,\n})\nconst emit = defineEmits<{ openChange: [open: boolean] }>()\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst trigger = useTemplateRef<HTMLElement>('trigger')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open,\n defaultOpen: props.defaultOpen,\n onOpenChange: (details) => {\n emit('openChange', details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran = agentMember({\n member: 'Collapsible',\n element: () => trigger.value,\n state: () => ({ open: api.value.open }),\n actions: {\n open: () => api.value.open || api.value.setOpen(true),\n close: () => api.value.open && api.value.setOpen(false),\n },\n })\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\n</script>\n\n<template>\n <div v-bind=\"api.getRootProps()\" :class=\"styles.root\" data-member=\"collapsible\">\n <!-- trigger -->\n <button ref=\"trigger\" v-bind=\"api.getTriggerProps()\" :class=\"styles.trigger\">\n <span :class=\"styles.label\">\n {{ label }}\n </span>\n <span :class=\"styles.chevron\">\n <Icon name=\"down\" size=\"sm\" />\n </span>\n </button>\n <!-- content -->\n <div\n v-bind=\"api.getContentProps()\"\n :class=\"styles.content\"\n :style=\"{\n '--radix-collapsible-content-height': Object(api.getContentProps().style)['--height'],\n }\"\n >\n <div :class=\"styles.inner\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,IAAM,IAAQ,GAKR,IAAO,GAEP,IAAM,EAAM,GACZ,IAAU,EAA4B,SAAS,GAC/C,IAAoB,EAAa,GACjC,IAAU,EACd,EAAI,SACJ,SAAgB;GACd,IAAI;GACJ,KAAK,EAAkB;GACvB,MAAM,EAAM;GACZ,aAAa,EAAM;GACnB,eAAe,MAAY;IACzB,EAAK,cAAc,EAAQ,IAAI;GACjC;EACF,EAAE,CACJ,GACM,IAAM,QAAe,EAAI,QAAQ,GAAS,CAAc,CAAC,GAC3D;SAgBJ,QAfsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAY;IACtB,QAAQ;IACR,eAAe,EAAQ;IACvB,cAAc,EAAE,MAAM,EAAI,MAAM,KAAK;IACrC,SAAS;KACP,YAAY,EAAI,MAAM,QAAQ,EAAI,MAAM,QAAQ,EAAI;KACpD,aAAa,EAAI,MAAM,QAAQ,EAAI,MAAM,QAAQ,EAAK;IACxD;GACF,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,mBAIhC,EAsBM,OAtBN,EAAa,EAsBP,MAtBW,aAAY,GAAA;GAAK,OAAO,EAAA,CAAA,CAAM,CAAC;GAAM,eAAY;OAEhE,EAOS,UAPT,EAOS;YAPG;GAAJ,KAAI;KAAkB,EAAA,MAAI,gBAAe,GAAA,EAAK,OAAO,EAAA,CAAA,CAAM,CAAC,QAAA,CAAA,GAAA,CAClE,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,EACrB,EAAA,KAAK,GAAA,CAAA,GAEV,EAEO,QAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,OAAO,EAAA,GAAA,CAC1B,EAA8B,EAAA,CAAA,GAAA;GAAxB,MAAK;GAAO,MAAK;iBAI3B,EAUM,OAVN,EACU,EASJ,MATQ,gBAAe,GAAA;GAC1B,OAAO,EAAA,CAAA,CAAM,CAAC;GACd,OAAK,EAAA,sCAAkD,OAAO,EAAA,MAAI,gBAAe,CAAA,CAAG,KAAK,CAAA,CAAA,YAAA;OAI1F,EAEM,OAAA,EAFA,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,KAAK,EAAA,GAAA,CACvB,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,EAAA,CAAA,GAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPagination.js","names":[],"sources":["../../../src/structure/CursorPagination.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Previous and next controls for a cursor-paged list (`design/components/cursor-pagination.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/cursor-pagination.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 { agentMember, devWarning, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/cursor-pagination.module.css'\nimport Button from '../controls/Button.vue'\nimport Inline from '../layout/Inline.vue'\n\nexport interface CursorPaginationMessages {\n previous: string\n next: string\n more?: string\n end?: string\n}\n\nexport interface CursorPaginationProps {\n /**\n * The app holds the pager while it does something else to the list: every control is disabled\n * and none shows busy. Not `pending`, which says the pager's own request is in flight.\n */\n disabled?: boolean\n hasNext: boolean\n /**\n * Whether the list returned a cursor that way; controlled, as cursors belong to the list. The\n * append form does not read it: it has no previous direction.\n */\n hasPrevious: boolean\n label?: string\n /**\n * Omit for the generic English defaults; localized hosts pass their own.\n */\n messages?: CursorPaginationMessages\n /**\n * `replace` (the default) swaps the window for its neighbour, so the list stays bounded.\n * `append` is \"Load more\": one action that adds the next window below the ones on screen, for\n * a feed or a log read from the top.\n */\n mode?: 'replace' | 'append'\n /**\n * The requested window has not arrived: the pressed direction shows busy and the other is\n * disabled, so a slow fetch cannot be followed by a second request.\n */\n pending?: boolean\n /**\n * The current window in the app's words, such as \"26–50\" or \"Newest first, page 2\"; never a\n * total, because the list does not return one.\n */\n position?: string\n}\n\ndefineOptions({ name: 'CursorPagination', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CursorPaginationProps>(), {\n disabled: false,\n label: 'Pagination',\n messages: () => ({\n previous: 'Previous',\n next: 'Next',\n more: 'Load more',\n end: 'No more to load',\n }),\n mode: 'replace',\n pending: false,\n})\nconst emit = defineEmits<{ next: []; previous: [] }>()\nconst listening = useListening()\nconst focused = ref(null as HTMLElement | null)\nconst taken = ref(null as string | number | null)\nconst asked = ref(null as 'previous' | 'next' | null)\nconst paged = ref(false)\nconst root = useTemplateRef<HTMLElement>('root')\nconst more = computed(() => props.messages.more ?? 'Load more')\nconst end = computed(() => props.messages.end ?? 'No more to load')\nconst ended = computed(() => !props.hasNext && !props.pending)\nconst controls = computed(() =>\n props.mode === 'append' ? (props.hasNext || props.pending ? ['more'] : []) : ['previous', 'next'],\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n focused.value = event.target as HTMLElement\n})\nconst focusOut = computed(() => (event: FocusEvent) => {\n if (!(event.target as HTMLElement).matches(':disabled')) focused.value = null\n})\nconst keepPlace = computed(() => () => {\n const pager = root.value as HTMLElement | null\n if (pager === null) return\n const names: readonly (string | number)[] = controls.value\n if (!props.disabled) {\n const control = taken.value\n taken.value = null\n if (control === null || document.activeElement !== pager) return\n const button = [...pager.querySelectorAll('button')][names.indexOf(control)]\n if (button !== undefined && !button.matches(':disabled')) button.focus()\n return\n }\n const from = focused.value as HTMLElement | null\n if (from === null || !from.isConnected || !from.matches(':disabled')) return\n const active = document.activeElement\n if (active !== from && active !== null && active !== document.body) return\n taken.value =\n names[[...pager.querySelectorAll('button')].indexOf(from as HTMLButtonElement)] ?? null\n pager.focus()\n})\nconst effect1 = () => {\n props.pending || (asked.value = null)\n}\nwatch(() => props.pending, effect1, { flush: 'post' })\nconst effect2 = () => {\n devWarning(\n props.mode !== 'append' && props.hasPrevious && !listening.previous,\n 'CursorPagination: `hasPrevious` with no `onPrevious` draws a previous button that does nothing.',\n )\n}\nonMounted(effect2)\nwatch(() => props.mode !== 'append' && props.hasPrevious && !listening.previous, effect2, {\n flush: 'post',\n})\nconst effect3 = () => {\n devWarning(\n props.mode === 'append' &&\n (props.messages.more === undefined || props.messages.end === undefined),\n 'CursorPagination: the append form shows `messages.more` and `messages.end`; pass them with the others, so one control never mixes two languages.',\n )\n}\nonMounted(effect3)\nwatch(\n () =>\n props.mode === 'append' &&\n (props.messages.more === undefined || props.messages.end === undefined),\n effect3,\n { flush: 'post' },\n)\nlet release4: (() => void) | undefined\nconst effect4 = () => {\n release4?.()\n const run = () => {\n keepPlace.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [root.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release4 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect4)\nwatch(\n () =>\n props.mode === 'append'\n ? props.hasNext || props.pending || paged.value\n : props.hasPrevious || props.hasNext || props.pending,\n effect4,\n { flush: 'post' },\n)\nonBeforeUnmount(() => release4?.())\nconst effect5 = () => {\n keepPlace.value()\n}\nwatch(() => props.disabled, effect5, { flush: 'post' })\nlet release6: (() => void) | undefined\nconst effect6 = () => {\n release6?.()\n const ran = agentMember({\n member: 'CursorPagination',\n element: () => root.value,\n state: () => ({\n 'has-previous': props.mode !== 'append' && props.hasPrevious,\n 'has-next': props.hasNext,\n position: props.position ?? '',\n pending: props.pending,\n disabled: props.disabled,\n }),\n actions: {\n previous: () =>\n (() => {\n if (props.mode === 'append') throw new Error('The append form has no previous window.')\n if (!props.hasPrevious) throw new Error('There is no previous window.')\n if (props.pending) throw new Error('A window is in flight; wait for it to arrive.')\n asked.value = 'previous'\n emit('previous')\n })(),\n next: () =>\n (() => {\n if (!props.hasNext) throw new Error('There is no next window.')\n if (props.pending) throw new Error('A window is in flight; wait for it to arrive.')\n asked.value = 'next'\n if (props.mode === 'append') paged.value = true\n emit('next')\n })(),\n },\n withholds: () => root.value,\n })\n release6 = () => {\n ran()\n }\n}\nonMounted(effect6)\nonBeforeUnmount(() => release6?.())\n</script>\n\n<template>\n <nav\n v-if=\"mode === 'append' ? hasNext || pending || paged : hasPrevious || hasNext || pending\"\n ref=\"root\"\n :class=\"styles.pagination\"\n :aria-label=\"label\"\n :aria-busy=\"pending ? true : undefined\"\n :data-pending=\"pending ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n tabindex=\"-1\"\n data-member=\"cursor-pagination\"\n @focusin=\"focusIn($event)\"\n @focusout=\"focusOut($event)\"\n >\n <Inline :gap=\"2\" align=\"center\" :wrap=\"true\">\n <template v-if=\"mode === 'append'\">\n <!-- position -->\n <span v-if=\"position !== undefined\" :class=\"styles.position\" aria-live=\"polite\">\n {{ position }}\n </span>\n <Button\n v-if=\"!ended\"\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n :label=\"more\"\n :loading=\"pending\"\n :disabled=\"disabled && !pending\"\n @click=\"((asked = 'next'), (paged = true), emit('next'))\"\n />\n </template>\n <template v-else>\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n icon=\"previous\"\n :label=\"messages.previous\"\n :loading=\"pending && asked === 'previous'\"\n :disabled=\"!hasPrevious || (pending ? asked !== 'previous' : disabled)\"\n @click=\"((asked = 'previous'), emit('previous'))\"\n />\n <!-- position -->\n <span v-if=\"position !== undefined\" :class=\"styles.position\" aria-live=\"polite\">\n {{ position }}\n </span>\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n trailingIcon=\"next\"\n :label=\"messages.next\"\n :loading=\"pending && asked === 'next'\"\n :disabled=\"!hasNext || (pending ? asked !== 'next' : disabled)\"\n @click=\"((asked = 'next'), emit('next'))\"\n />\n </template>\n </Inline>\n <!-- end -->\n <span v-if=\"mode === 'append'\" :class=\"styles.end\" role=\"status\">\n <template v-if=\"ended\">{{ end }}</template>\n </span>\n </nav>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"CursorPagination.js","names":[],"sources":["../../../src/structure/CursorPagination.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Previous and next controls for a cursor-paged list (`design/components/cursor-pagination.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/cursor-pagination.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 { Icon, agentMember, devWarning, useListening } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/cursor-pagination.module.css'\nimport Button from '../controls/Button.vue'\nimport Inline from '../layout/Inline.vue'\n\nexport interface CursorPaginationMessages {\n previous: string\n next: string\n more?: string\n end?: string\n}\n\nexport interface CursorPaginationProps {\n /**\n * The app holds the pager while it does something else to the list: every control is disabled\n * and none shows busy. Not `pending`, which says the pager's own request is in flight.\n */\n disabled?: boolean\n hasNext: boolean\n /**\n * Whether the list returned a cursor that way; controlled, as cursors belong to the list. The\n * append form does not read it: it has no previous direction.\n */\n hasPrevious: boolean\n label?: string\n /**\n * Omit for the generic English defaults; localized hosts pass their own.\n */\n messages?: CursorPaginationMessages\n /**\n * `replace` (the default) swaps the window for its neighbour, so the list stays bounded.\n * `append` is \"Load more\": one action that adds the next window below the ones on screen, for\n * a feed or a log read from the top.\n */\n mode?: 'replace' | 'append'\n /**\n * The next window's address, as `previousHref` is the previous one's: next, or in the append\n * form its action, is a link to it while it can be pressed, and a plain click calls `onNext`.\n */\n nextHref?: string\n /**\n * The requested window has not arrived: the pressed direction shows busy and the other is\n * disabled, so a slow fetch cannot be followed by a second request.\n */\n pending?: boolean\n /**\n * The current window in the app's words, such as \"26–50\" or \"Newest first, page 2\"; never a\n * total, because the list does not return one.\n */\n position?: string\n /**\n * The previous window's address, such as `?before=c25`. Given, previous is a link to it while\n * it can be pressed, so a crawler, a new tab and a reader whose script has not loaded can\n * follow it. A click the browser would follow in this tab calls `onPrevious` in place of the\n * navigation; a click with a modifier key opens the address. The append form does not read it:\n * it has no previous direction.\n */\n previousHref?: string\n}\n\ndefineOptions({ name: 'CursorPagination', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<CursorPaginationProps>(), {\n disabled: false,\n label: 'Pagination',\n messages: () => ({\n previous: 'Previous',\n next: 'Next',\n more: 'Load more',\n end: 'No more to load',\n }),\n mode: 'replace',\n pending: false,\n})\nconst emit = defineEmits<{ next: []; previous: [] }>()\nconst listening = useListening()\nconst focused = ref(null as HTMLElement | null)\nconst focusedControl = ref(null as string | number | null)\nconst taken = ref(null as string | number | null)\nconst asked = ref(null as 'previous' | 'next' | null)\nconst paged = ref(false)\nconst root = useTemplateRef<HTMLElement>('root')\nconst more = computed(() => props.messages.more ?? 'Load more')\nconst end = computed(() => props.messages.end ?? 'No more to load')\nconst ended = computed(() => !props.hasNext && !props.pending)\nconst controls = computed(() =>\n props.mode === 'append' ? (props.hasNext || props.pending ? ['more'] : []) : ['previous', 'next'],\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n const target = event.target as HTMLElement\n const pager = root.value as HTMLElement | null\n const names: readonly (string | number)[] = controls.value\n const at = pager === null ? -1 : [...pager.querySelectorAll('button, a[href]')].indexOf(target)\n focused.value = target\n focusedControl.value = at < 0 ? null : (names[at] ?? null)\n})\nconst focusOut = computed(() => (event: FocusEvent) => {\n const target = event.target as HTMLElement\n if (target.matches(':disabled')) return\n queueMicrotask(() => {\n if (focused.value === target && target.isConnected) focused.value = null\n })\n})\nconst keepPlace = computed(() => () => {\n const pager = root.value as HTMLElement | null\n if (pager === null) return\n const names: readonly (string | number)[] = controls.value\n const drawn = () => [...pager.querySelectorAll<HTMLElement>('button, a[href]')]\n const onPage = () => document.activeElement === null || document.activeElement === document.body\n const left = focused.value as HTMLElement | null\n if (left !== null && !left.isConnected) {\n focused.value = null\n const name = focusedControl.value\n const now = name === null ? undefined : drawn()[names.indexOf(name)]\n if (now !== undefined && onPage()) {\n if (now.matches(':disabled')) focused.value = now\n else now.focus()\n }\n }\n if (!props.disabled) {\n const control = taken.value\n taken.value = null\n if (control === null || document.activeElement !== pager) return\n const element = drawn()[names.indexOf(control)]\n if (element !== undefined && !element.matches(':disabled')) element.focus()\n return\n }\n const from = focused.value as HTMLElement | null\n if (from === null || !from.isConnected || !from.matches(':disabled')) return\n const active = document.activeElement\n if (active !== from && active !== null && active !== document.body) return\n taken.value = names[drawn().indexOf(from)] ?? null\n pager.focus()\n})\nconst previousLink = computed(\n () => props.previousHref !== undefined && props.hasPrevious && !props.pending && !props.disabled,\n)\nconst nextLink = computed(\n () => props.nextHref !== undefined && props.hasNext && !props.pending && !props.disabled,\n)\nconst navigatesHere = computed(\n () =>\n (event: MouseEvent): boolean =>\n !event.defaultPrevented &&\n event.button === 0 &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey &&\n !event.altKey,\n)\nconst followPrevious = computed(() => (event: MouseEvent): void => {\n if (!navigatesHere.value(event)) return\n event.preventDefault()\n asked.value = 'previous'\n emit('previous')\n})\nconst followNext = computed(() => (event: MouseEvent): void => {\n if (!navigatesHere.value(event)) return\n event.preventDefault()\n asked.value = 'next'\n if (props.mode === 'append') paged.value = true\n emit('next')\n})\nconst effect1 = () => {\n props.pending || (asked.value = null)\n}\nwatch(() => props.pending, effect1, { flush: 'post' })\nconst effect2 = () => {\n devWarning(\n props.mode !== 'append' && props.hasPrevious && !listening.previous,\n 'CursorPagination: `hasPrevious` with no `onPrevious` draws a previous button that does nothing.',\n )\n}\nonMounted(effect2)\nwatch(() => props.mode !== 'append' && props.hasPrevious && !listening.previous, effect2, {\n flush: 'post',\n})\nconst effect3 = () => {\n devWarning(\n props.mode === 'append' &&\n (props.messages.more === undefined || props.messages.end === undefined),\n 'CursorPagination: the append form shows `messages.more` and `messages.end`; pass them with the others, so one control never mixes two languages.',\n )\n}\nonMounted(effect3)\nwatch(\n () =>\n props.mode === 'append' &&\n (props.messages.more === undefined || props.messages.end === undefined),\n effect3,\n { flush: 'post' },\n)\nlet release4: (() => void) | undefined\nconst effect4 = () => {\n release4?.()\n const run = () => {\n keepPlace.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [root.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release4 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect4)\nwatch(\n () =>\n props.mode === 'append'\n ? props.hasNext || props.pending || paged.value\n : props.hasPrevious || props.hasNext || props.pending,\n effect4,\n { flush: 'post' },\n)\nonBeforeUnmount(() => release4?.())\nconst effect5 = () => {\n keepPlace.value()\n}\nwatch(() => props.disabled, effect5, { flush: 'post' })\nlet release6: (() => void) | undefined\nconst effect6 = () => {\n release6?.()\n const ran = agentMember({\n member: 'CursorPagination',\n element: () => root.value,\n state: () => ({\n 'has-previous': props.mode !== 'append' && props.hasPrevious,\n 'has-next': props.hasNext,\n position: props.position ?? '',\n pending: props.pending,\n disabled: props.disabled,\n }),\n actions: {\n previous: () =>\n (() => {\n if (props.mode === 'append') throw new Error('The append form has no previous window.')\n if (!props.hasPrevious) throw new Error('There is no previous window.')\n if (props.pending) throw new Error('A window is in flight; wait for it to arrive.')\n asked.value = 'previous'\n emit('previous')\n })(),\n next: () =>\n (() => {\n if (!props.hasNext) throw new Error('There is no next window.')\n if (props.pending) throw new Error('A window is in flight; wait for it to arrive.')\n asked.value = 'next'\n if (props.mode === 'append') paged.value = true\n emit('next')\n })(),\n },\n withholds: () => root.value,\n })\n release6 = () => {\n ran()\n }\n}\nonMounted(effect6)\nonBeforeUnmount(() => release6?.())\n</script>\n\n<template>\n <nav\n v-if=\"mode === 'append' ? hasNext || pending || paged : hasPrevious || hasNext || pending\"\n ref=\"root\"\n :class=\"styles.pagination\"\n :aria-label=\"label\"\n :aria-busy=\"pending ? true : undefined\"\n :data-pending=\"pending ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n tabindex=\"-1\"\n data-member=\"cursor-pagination\"\n @focusin=\"focusIn($event)\"\n @focusout=\"focusOut($event)\"\n >\n <Inline :gap=\"2\" align=\"center\" :wrap=\"true\">\n <template v-if=\"mode === 'append'\">\n <!-- position -->\n <span v-if=\"position !== undefined\" :class=\"styles.position\" aria-live=\"polite\">\n {{ position }}\n </span>\n <!-- link -->\n <a\n v-if=\"!ended && nextLink\"\n :class=\"styles.link\"\n :href=\"nextHref\"\n data-variant=\"outline\"\n data-size=\"sm\"\n data-tone=\"neutral\"\n @click=\"followNext($event)\"\n >\n <!-- label -->\n <span :class=\"styles.linkLabel\">\n {{ more }}\n </span>\n </a>\n <Button\n v-else-if=\"!ended\"\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n :label=\"more\"\n :loading=\"pending\"\n :disabled=\"disabled && !pending\"\n @click=\"((asked = 'next'), (paged = true), emit('next'))\"\n />\n </template>\n <template v-else>\n <!-- link -->\n <a\n v-if=\"previousLink\"\n :class=\"styles.link\"\n :href=\"previousHref\"\n data-variant=\"ghost\"\n data-size=\"sm\"\n data-tone=\"neutral\"\n @click=\"followPrevious($event)\"\n >\n <!-- glyph -->\n <span :class=\"styles.linkGlyph\">\n <Icon name=\"previous\" size=\"sm\" />\n </span>\n <!-- label -->\n <span :class=\"styles.linkLabel\">\n {{ messages.previous }}\n </span>\n </a>\n <Button\n v-else\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n icon=\"previous\"\n :label=\"messages.previous\"\n :loading=\"pending && asked === 'previous'\"\n :disabled=\"!hasPrevious || (pending ? asked !== 'previous' : disabled)\"\n @click=\"((asked = 'previous'), emit('previous'))\"\n />\n <!-- position -->\n <span v-if=\"position !== undefined\" :class=\"styles.position\" aria-live=\"polite\">\n {{ position }}\n </span>\n <!-- link -->\n <a\n v-if=\"nextLink\"\n :class=\"styles.link\"\n :href=\"nextHref\"\n data-variant=\"ghost\"\n data-size=\"sm\"\n data-tone=\"neutral\"\n @click=\"followNext($event)\"\n >\n <!-- label -->\n <span :class=\"styles.linkLabel\">\n {{ messages.next }}\n </span>\n <!-- glyph -->\n <span :class=\"styles.linkGlyph\">\n <Icon name=\"next\" size=\"sm\" />\n </span>\n </a>\n <Button\n v-else\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n trailingIcon=\"next\"\n :label=\"messages.next\"\n :loading=\"pending && asked === 'next'\"\n :disabled=\"!hasNext || (pending ? asked !== 'next' : disabled)\"\n @click=\"((asked = 'next'), emit('next'))\"\n />\n </template>\n </Inline>\n <!-- end -->\n <span v-if=\"mode === 'append'\" :class=\"styles.end\" role=\"status\">\n <template v-if=\"ended\">{{ end }}</template>\n </span>\n </nav>\n</template>\n"],"mappings":""}