@ghostvue/vue 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +40 -2
  3. package/dist/.registries/component-names.generated.d.ts +3 -0
  4. package/dist/GhostAccordion.vue.d.ts +38 -0
  5. package/dist/GhostAccordionContent.vue.d.ts +26 -0
  6. package/dist/GhostAccordionItem.vue.d.ts +20 -0
  7. package/dist/GhostAccordionTrigger.vue.d.ts +23 -0
  8. package/dist/GhostAvatar.vue.d.ts +27 -0
  9. package/dist/GhostBadge.vue.d.ts +16 -0
  10. package/dist/GhostBreadcrumb.vue.d.ts +28 -0
  11. package/dist/GhostBreadcrumbEllipsis.vue.d.ts +20 -0
  12. package/dist/GhostBreadcrumbItem.vue.d.ts +25 -0
  13. package/dist/GhostBreadcrumbLink.vue.d.ts +25 -0
  14. package/dist/GhostBreadcrumbList.vue.d.ts +25 -0
  15. package/dist/GhostBreadcrumbPage.vue.d.ts +25 -0
  16. package/dist/GhostBreadcrumbSeparator.vue.d.ts +25 -0
  17. package/dist/GhostButton.vue.d.ts +25 -0
  18. package/dist/GhostCalendar.vue.d.ts +57 -0
  19. package/dist/GhostCalendarCell.vue.d.ts +35 -0
  20. package/dist/GhostCalendarGrid.vue.d.ts +19 -0
  21. package/dist/GhostCalendarHeader.vue.d.ts +24 -0
  22. package/dist/GhostCalendarHeading.vue.d.ts +22 -0
  23. package/dist/GhostCalendarNextButton.vue.d.ts +24 -0
  24. package/dist/GhostCalendarPrevButton.vue.d.ts +24 -0
  25. package/dist/GhostCard.vue.d.ts +18 -0
  26. package/dist/GhostCheckbox.vue.d.ts +48 -0
  27. package/dist/GhostCollapsible.vue.d.ts +31 -0
  28. package/dist/GhostCollapsibleContent.vue.d.ts +30 -0
  29. package/dist/GhostCollapsibleTrigger.vue.d.ts +28 -0
  30. package/dist/GhostCombobox.vue.d.ts +69 -0
  31. package/dist/GhostComboboxContent.vue.d.ts +41 -0
  32. package/dist/GhostComboboxEmpty.vue.d.ts +21 -0
  33. package/dist/GhostComboboxGroup.vue.d.ts +21 -0
  34. package/dist/GhostComboboxInput.vue.d.ts +11 -0
  35. package/dist/GhostComboboxLabel.vue.d.ts +21 -0
  36. package/dist/GhostComboboxOption.vue.d.ts +29 -0
  37. package/dist/GhostComboboxTrigger.vue.d.ts +26 -0
  38. package/dist/GhostCommandPalette.vue.d.ts +57 -0
  39. package/dist/GhostCommandPaletteContent.vue.d.ts +47 -0
  40. package/dist/GhostCommandPaletteEmpty.vue.d.ts +25 -0
  41. package/dist/GhostCommandPaletteGroup.vue.d.ts +25 -0
  42. package/dist/GhostCommandPaletteInput.vue.d.ts +13 -0
  43. package/dist/GhostCommandPaletteItem.vue.d.ts +33 -0
  44. package/dist/GhostCommandPaletteLabel.vue.d.ts +25 -0
  45. package/dist/GhostCommandPaletteList.vue.d.ts +25 -0
  46. package/dist/GhostCommandPaletteOverlay.vue.d.ts +32 -0
  47. package/dist/GhostCommandPaletteSeparator.vue.d.ts +10 -0
  48. package/dist/GhostCommandPaletteTitle.vue.d.ts +25 -0
  49. package/dist/GhostCommandPaletteTrigger.vue.d.ts +28 -0
  50. package/dist/GhostContextMenu.vue.d.ts +26 -0
  51. package/dist/GhostContextMenuCheckboxItem.vue.d.ts +63 -0
  52. package/dist/GhostContextMenuContent.vue.d.ts +39 -0
  53. package/dist/GhostContextMenuGroup.vue.d.ts +21 -0
  54. package/dist/GhostContextMenuItem.vue.d.ts +30 -0
  55. package/dist/GhostContextMenuLabel.vue.d.ts +21 -0
  56. package/dist/GhostContextMenuRadioGroup.vue.d.ts +31 -0
  57. package/dist/GhostContextMenuRadioItem.vue.d.ts +31 -0
  58. package/dist/GhostContextMenuSeparator.vue.d.ts +11 -0
  59. package/dist/GhostContextMenuTrigger.vue.d.ts +28 -0
  60. package/dist/GhostDataTable.vue.d.ts +29 -0
  61. package/dist/GhostDataTablePreset.vue.d.ts +21 -0
  62. package/dist/GhostDataTableTable.vue.d.ts +20 -0
  63. package/dist/GhostDatePicker.vue.d.ts +106 -0
  64. package/dist/GhostDatePickerCalendar.vue.d.ts +16 -0
  65. package/dist/GhostDatePickerContent.vue.d.ts +46 -0
  66. package/dist/GhostDatePickerInput.vue.d.ts +19 -0
  67. package/dist/GhostDatePickerTrigger.vue.d.ts +14 -0
  68. package/dist/GhostDialog.vue.d.ts +31 -0
  69. package/dist/GhostDialogClose.vue.d.ts +28 -0
  70. package/dist/GhostDialogContent.vue.d.ts +50 -0
  71. package/dist/GhostDialogDescription.vue.d.ts +25 -0
  72. package/dist/GhostDialogOverlay.vue.d.ts +32 -0
  73. package/dist/GhostDialogTitle.vue.d.ts +25 -0
  74. package/dist/GhostDialogTrigger.vue.d.ts +28 -0
  75. package/dist/GhostDrawer.vue.d.ts +39 -0
  76. package/dist/GhostDrawerClose.vue.d.ts +28 -0
  77. package/dist/GhostDrawerContent.vue.d.ts +47 -0
  78. package/dist/GhostDrawerDescription.vue.d.ts +25 -0
  79. package/dist/GhostDrawerOverlay.vue.d.ts +32 -0
  80. package/dist/GhostDrawerTitle.vue.d.ts +25 -0
  81. package/dist/GhostDrawerTrigger.vue.d.ts +28 -0
  82. package/dist/GhostDropdownMenu.vue.d.ts +26 -0
  83. package/dist/GhostDropdownMenuCheckboxItem.vue.d.ts +63 -0
  84. package/dist/GhostDropdownMenuContent.vue.d.ts +39 -0
  85. package/dist/GhostDropdownMenuGroup.vue.d.ts +21 -0
  86. package/dist/GhostDropdownMenuItem.vue.d.ts +30 -0
  87. package/dist/GhostDropdownMenuLabel.vue.d.ts +21 -0
  88. package/dist/GhostDropdownMenuRadioGroup.vue.d.ts +31 -0
  89. package/dist/GhostDropdownMenuRadioItem.vue.d.ts +31 -0
  90. package/dist/GhostDropdownMenuSeparator.vue.d.ts +11 -0
  91. package/dist/GhostDropdownMenuTrigger.vue.d.ts +26 -0
  92. package/dist/GhostEmptyState.vue.d.ts +19 -0
  93. package/dist/GhostField.vue.d.ts +28 -0
  94. package/dist/GhostFieldControl.vue.d.ts +13 -0
  95. package/dist/GhostFieldDescription.vue.d.ts +21 -0
  96. package/dist/GhostFieldError.vue.d.ts +21 -0
  97. package/dist/GhostFieldLabel.vue.d.ts +30 -0
  98. package/dist/GhostFileUpload.vue.d.ts +64 -0
  99. package/dist/GhostFileUploadDropzone.vue.d.ts +13 -0
  100. package/dist/GhostFileUploadItem.vue.d.ts +17 -0
  101. package/dist/GhostFileUploadItemRemove.vue.d.ts +13 -0
  102. package/dist/GhostFileUploadList.vue.d.ts +13 -0
  103. package/dist/GhostFileUploadTrigger.vue.d.ts +19 -0
  104. package/dist/GhostHoverCard.vue.d.ts +37 -0
  105. package/dist/GhostHoverCardContent.vue.d.ts +47 -0
  106. package/dist/GhostHoverCardTrigger.vue.d.ts +28 -0
  107. package/dist/GhostInlineAlert.vue.d.ts +19 -0
  108. package/dist/GhostInput.vue.d.ts +26 -0
  109. package/dist/GhostInteractiveSurface.vue.d.ts +25 -0
  110. package/dist/GhostKbd.vue.d.ts +25 -0
  111. package/dist/GhostLink.vue.d.ts +25 -0
  112. package/dist/GhostMenubar.vue.d.ts +27 -0
  113. package/dist/GhostMenubarCheckboxItem.vue.d.ts +63 -0
  114. package/dist/GhostMenubarContent.vue.d.ts +39 -0
  115. package/dist/GhostMenubarGroup.vue.d.ts +21 -0
  116. package/dist/GhostMenubarItem.vue.d.ts +30 -0
  117. package/dist/GhostMenubarLabel.vue.d.ts +21 -0
  118. package/dist/GhostMenubarMenu.vue.d.ts +26 -0
  119. package/dist/GhostMenubarRadioGroup.vue.d.ts +31 -0
  120. package/dist/GhostMenubarRadioItem.vue.d.ts +31 -0
  121. package/dist/GhostMenubarSeparator.vue.d.ts +11 -0
  122. package/dist/GhostMenubarTrigger.vue.d.ts +26 -0
  123. package/dist/GhostNumberInput.vue.d.ts +37 -0
  124. package/dist/GhostPagination.vue.d.ts +53 -0
  125. package/dist/GhostPopover.vue.d.ts +28 -0
  126. package/dist/GhostPopoverClose.vue.d.ts +28 -0
  127. package/dist/GhostPopoverContent.vue.d.ts +47 -0
  128. package/dist/GhostPopoverTrigger.vue.d.ts +28 -0
  129. package/dist/GhostPortal.vue.d.ts +28 -0
  130. package/dist/GhostProgress.vue.d.ts +14 -0
  131. package/dist/GhostRadioGroup.vue.d.ts +36 -0
  132. package/dist/GhostRadioGroupItem.vue.d.ts +10 -0
  133. package/dist/GhostScrollArea.vue.d.ts +17 -0
  134. package/dist/GhostScrollSpy.vue.d.ts +57 -0
  135. package/dist/GhostScrollSpyItem.vue.d.ts +26 -0
  136. package/dist/GhostScrollSpyLink.vue.d.ts +27 -0
  137. package/dist/GhostScrollSpyList.vue.d.ts +24 -0
  138. package/dist/GhostSegmentedControl.vue.d.ts +44 -0
  139. package/dist/GhostSegmentedControlIndicator.vue.d.ts +3 -0
  140. package/dist/GhostSegmentedControlItem.vue.d.ts +30 -0
  141. package/dist/GhostSelect.vue.d.ts +51 -0
  142. package/dist/GhostSelectContent.vue.d.ts +41 -0
  143. package/dist/GhostSelectGroup.vue.d.ts +21 -0
  144. package/dist/GhostSelectLabel.vue.d.ts +21 -0
  145. package/dist/GhostSelectOption.vue.d.ts +29 -0
  146. package/dist/GhostSelectTrigger.vue.d.ts +26 -0
  147. package/dist/GhostSelectValue.vue.d.ts +17 -0
  148. package/dist/GhostSeparator.vue.d.ts +7 -0
  149. package/dist/GhostSkeleton.vue.d.ts +18 -0
  150. package/dist/GhostSlider.vue.d.ts +141 -0
  151. package/dist/GhostSpinner.vue.d.ts +8 -0
  152. package/dist/GhostSwitch.vue.d.ts +37 -0
  153. package/dist/GhostTable.vue.d.ts +15 -0
  154. package/dist/GhostTableBody.vue.d.ts +13 -0
  155. package/dist/GhostTableCaption.vue.d.ts +13 -0
  156. package/dist/GhostTableCell.vue.d.ts +13 -0
  157. package/dist/GhostTableFoot.vue.d.ts +13 -0
  158. package/dist/GhostTableHead.vue.d.ts +13 -0
  159. package/dist/GhostTableHeaderCell.vue.d.ts +13 -0
  160. package/dist/GhostTableRow.vue.d.ts +13 -0
  161. package/dist/GhostTabs.vue.d.ts +37 -0
  162. package/dist/GhostTabsContent.vue.d.ts +27 -0
  163. package/dist/GhostTabsList.vue.d.ts +25 -0
  164. package/dist/GhostTabsTrigger.vue.d.ts +30 -0
  165. package/dist/GhostTextarea.vue.d.ts +29 -0
  166. package/dist/GhostToast.vue.d.ts +17 -0
  167. package/dist/GhostToastAction.vue.d.ts +17 -0
  168. package/dist/GhostToastClose.vue.d.ts +16 -0
  169. package/dist/GhostToastDescription.vue.d.ts +12 -0
  170. package/dist/GhostToastProvider.vue.d.ts +24 -0
  171. package/dist/GhostToastTitle.vue.d.ts +12 -0
  172. package/dist/GhostToastViewport.vue.d.ts +25 -0
  173. package/dist/GhostToggleGroup.vue.d.ts +41 -0
  174. package/dist/GhostToggleGroupItem.vue.d.ts +30 -0
  175. package/dist/GhostToolbar.vue.d.ts +29 -0
  176. package/dist/GhostTooltip.vue.d.ts +36 -0
  177. package/dist/GhostTooltipContent.vue.d.ts +47 -0
  178. package/dist/GhostTooltipProvider.vue.d.ts +16 -0
  179. package/dist/GhostTooltipTrigger.vue.d.ts +28 -0
  180. package/dist/GhostTree.vue.d.ts +59 -0
  181. package/dist/GhostTreeGroup.vue.d.ts +22 -0
  182. package/dist/GhostTreeItem.vue.d.ts +27 -0
  183. package/dist/GhostTreeTrigger.vue.d.ts +25 -0
  184. package/dist/GhostVisuallyHidden.vue.d.ts +19 -0
  185. package/dist/accordion-header-keyboard.d.ts +11 -0
  186. package/dist/calendar-date-math.d.ts +16 -0
  187. package/dist/calendar-intl.d.ts +7 -0
  188. package/dist/calendar-public-date.d.ts +1 -0
  189. package/dist/command-palette-context.d.ts +6 -0
  190. package/dist/data-table-interaction.d.ts +57 -0
  191. package/dist/data-table-processing.d.ts +32 -0
  192. package/dist/data-table-render.d.ts +40 -0
  193. package/dist/data-table-slot-bindings.d.ts +21 -0
  194. package/dist/date-picker-calendar-bridge.d.ts +25 -0
  195. package/dist/date-picker-value.d.ts +33 -0
  196. package/dist/define-data-table-columns.d.ts +89 -0
  197. package/dist/dev-codes.d.ts +143 -0
  198. package/dist/dialog-shared.d.ts +169 -0
  199. package/dist/dismissable-layer-stack.d.ts +27 -0
  200. package/dist/form-reset.d.ts +21 -0
  201. package/dist/get-pagination-range.d.ts +24 -0
  202. package/dist/get-tabbable-elements.d.ts +22 -0
  203. package/dist/ghost-accordion.d.ts +120 -0
  204. package/dist/ghost-avatar.d.ts +41 -0
  205. package/dist/ghost-badge.d.ts +11 -0
  206. package/dist/ghost-breadcrumb.d.ts +114 -0
  207. package/dist/ghost-button.d.ts +39 -0
  208. package/dist/ghost-calendar.d.ts +148 -0
  209. package/dist/ghost-card.d.ts +29 -0
  210. package/dist/ghost-checkbox.d.ts +51 -0
  211. package/dist/ghost-collapsible.d.ts +104 -0
  212. package/dist/ghost-combobox.d.ts +217 -0
  213. package/dist/ghost-command-palette.d.ts +377 -0
  214. package/dist/ghost-context-menu.d.ts +226 -0
  215. package/dist/ghost-data-table-preset.d.ts +107 -0
  216. package/dist/ghost-data-table-table.d.ts +76 -0
  217. package/dist/ghost-data-table.d.ts +508 -0
  218. package/dist/ghost-date-picker.d.ts +301 -0
  219. package/dist/ghost-dialog.d.ts +254 -0
  220. package/dist/ghost-drawer.d.ts +268 -0
  221. package/dist/ghost-dropdown-menu.d.ts +226 -0
  222. package/dist/ghost-empty-state.d.ts +26 -0
  223. package/dist/ghost-field.d.ts +151 -0
  224. package/dist/ghost-file-upload-accept.d.ts +32 -0
  225. package/dist/ghost-file-upload-messages.d.ts +14 -0
  226. package/dist/ghost-file-upload.d.ts +325 -0
  227. package/dist/ghost-hover-card.d.ts +192 -0
  228. package/dist/ghost-inline-alert.d.ts +34 -0
  229. package/dist/ghost-input.d.ts +71 -0
  230. package/dist/ghost-interactive-surface.d.ts +41 -0
  231. package/dist/ghost-kbd.d.ts +39 -0
  232. package/dist/ghost-link.d.ts +58 -0
  233. package/dist/ghost-menubar.d.ts +260 -0
  234. package/dist/ghost-number-input.d.ts +88 -0
  235. package/dist/ghost-pagination.d.ts +92 -0
  236. package/dist/ghost-popover.d.ts +188 -0
  237. package/dist/ghost-portal.d.ts +21 -0
  238. package/dist/ghost-progress.d.ts +40 -0
  239. package/dist/ghost-radio-group.d.ts +100 -0
  240. package/dist/ghost-scroll-area.d.ts +46 -0
  241. package/dist/ghost-scroll-spy.d.ts +150 -0
  242. package/dist/ghost-segmented-control.d.ts +124 -0
  243. package/dist/ghost-select.d.ts +131 -0
  244. package/dist/ghost-separator.d.ts +33 -0
  245. package/dist/ghost-skeleton.d.ts +14 -0
  246. package/dist/ghost-slider.d.ts +99 -0
  247. package/dist/ghost-spinner.d.ts +22 -0
  248. package/dist/ghost-switch.d.ts +77 -0
  249. package/dist/ghost-table.d.ts +62 -0
  250. package/dist/ghost-tabs.d.ts +154 -0
  251. package/dist/ghost-textarea.d.ts +78 -0
  252. package/dist/ghost-toast.d.ts +219 -0
  253. package/dist/ghost-toggle-group.d.ts +123 -0
  254. package/dist/ghost-toolbar.d.ts +23 -0
  255. package/dist/ghost-tooltip-provider.d.ts +37 -0
  256. package/dist/ghost-tooltip.d.ts +190 -0
  257. package/dist/ghost-tree.d.ts +355 -0
  258. package/dist/ghost-visually-hidden.d.ts +27 -0
  259. package/dist/ghostvue.js +17534 -0
  260. package/dist/has-tabbable-descendants.d.ts +2 -0
  261. package/dist/index.d.ts +307 -0
  262. package/dist/invoke-attr-handler.d.ts +15 -0
  263. package/dist/is-ime-composing.d.ts +28 -0
  264. package/dist/manifest.json +17098 -0
  265. package/dist/measure-scroll-overflow.d.ts +6 -0
  266. package/dist/menu-item-activation.d.ts +39 -0
  267. package/dist/resolver.d.ts +49 -0
  268. package/dist/resolver.js +14 -0
  269. package/dist/scroll-spy-motion.d.ts +26 -0
  270. package/dist/sort-by-document-order.d.ts +23 -0
  271. package/dist/sync-calendar-focus-tab-stops.d.ts +2 -0
  272. package/dist/sync-segmented-control-item-order.d.ts +5 -0
  273. package/dist/sync-tabs-selection-tab-stops.d.ts +7 -0
  274. package/dist/sync-toggle-group-selection-tab-stops.d.ts +14 -0
  275. package/dist/typeahead-match.d.ts +15 -0
  276. package/dist/use-collapsible-content-hidden.d.ts +28 -0
  277. package/dist/use-controllable-state.d.ts +20 -0
  278. package/dist/use-dismissable-layer.d.ts +40 -0
  279. package/dist/use-floating.d.ts +38 -0
  280. package/dist/use-focus-scope.d.ts +34 -0
  281. package/dist/use-ghost-accordion.d.ts +5 -0
  282. package/dist/use-ghost-avatar.d.ts +28 -0
  283. package/dist/use-ghost-badge.d.ts +13 -0
  284. package/dist/use-ghost-breadcrumb.d.ts +19 -0
  285. package/dist/use-ghost-button.d.ts +18 -0
  286. package/dist/use-ghost-calendar.d.ts +3 -0
  287. package/dist/use-ghost-card.d.ts +15 -0
  288. package/dist/use-ghost-checkbox.d.ts +24 -0
  289. package/dist/use-ghost-collapsible.d.ts +8 -0
  290. package/dist/use-ghost-combobox.d.ts +65 -0
  291. package/dist/use-ghost-command-palette.d.ts +24 -0
  292. package/dist/use-ghost-context-menu.d.ts +14 -0
  293. package/dist/use-ghost-data-table.d.ts +55 -0
  294. package/dist/use-ghost-date-picker.d.ts +11 -0
  295. package/dist/use-ghost-dialog.d.ts +10 -0
  296. package/dist/use-ghost-drawer.d.ts +11 -0
  297. package/dist/use-ghost-dropdown-menu.d.ts +5 -0
  298. package/dist/use-ghost-empty-state.d.ts +18 -0
  299. package/dist/use-ghost-field-part-content.d.ts +15 -0
  300. package/dist/use-ghost-field.d.ts +10 -0
  301. package/dist/use-ghost-file-upload.d.ts +16 -0
  302. package/dist/use-ghost-hover-card.d.ts +8 -0
  303. package/dist/use-ghost-id.d.ts +6 -0
  304. package/dist/use-ghost-inline-alert.d.ts +20 -0
  305. package/dist/use-ghost-input.d.ts +29 -0
  306. package/dist/use-ghost-interactive-surface.d.ts +21 -0
  307. package/dist/use-ghost-kbd.d.ts +35 -0
  308. package/dist/use-ghost-link.d.ts +20 -0
  309. package/dist/use-ghost-menu-collection.d.ts +19 -0
  310. package/dist/use-ghost-menubar-menu.d.ts +3 -0
  311. package/dist/use-ghost-menubar.d.ts +10 -0
  312. package/dist/use-ghost-number-input.d.ts +63 -0
  313. package/dist/use-ghost-pagination.d.ts +22 -0
  314. package/dist/use-ghost-popover.d.ts +8 -0
  315. package/dist/use-ghost-progress.d.ts +33 -0
  316. package/dist/use-ghost-radio-group.d.ts +5 -0
  317. package/dist/use-ghost-scroll-area.d.ts +23 -0
  318. package/dist/use-ghost-scroll-spy.d.ts +25 -0
  319. package/dist/use-ghost-segmented-control.d.ts +6 -0
  320. package/dist/use-ghost-select.d.ts +52 -0
  321. package/dist/use-ghost-separator.d.ts +19 -0
  322. package/dist/use-ghost-skeleton.d.ts +19 -0
  323. package/dist/use-ghost-slider.d.ts +65 -0
  324. package/dist/use-ghost-spinner.d.ts +18 -0
  325. package/dist/use-ghost-switch.d.ts +39 -0
  326. package/dist/use-ghost-table.d.ts +70 -0
  327. package/dist/use-ghost-tabs.d.ts +5 -0
  328. package/dist/use-ghost-textarea.d.ts +44 -0
  329. package/dist/use-ghost-toast.d.ts +56 -0
  330. package/dist/use-ghost-toggle-group.d.ts +6 -0
  331. package/dist/use-ghost-toolbar.d.ts +23 -0
  332. package/dist/use-ghost-tooltip.d.ts +8 -0
  333. package/dist/use-ghost-tree.d.ts +14 -0
  334. package/dist/use-ghost-visually-hidden.d.ts +35 -0
  335. package/dist/use-inert-others.d.ts +20 -0
  336. package/dist/use-roving-focus.d.ts +20 -0
  337. package/dist/use-scroll-lock.d.ts +13 -0
  338. package/package.json +59 -4
@@ -0,0 +1,6 @@
1
+ import type { GhostScrollAreaOrientation, GhostScrollAreaOverflowState } from './ghost-scroll-area.js';
2
+ /**
3
+ * Compares scroll and client metrics for the axes allowed by `orientation`.
4
+ * Callers stub layout in unit tests when jsdom reports zero sizes.
5
+ */
6
+ export declare function measureScrollOverflow(element: HTMLElement, orientation: GhostScrollAreaOrientation): GhostScrollAreaOverflowState;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Internal helpers for the item parts that DropdownMenu, ContextMenu and
3
+ * Menubar implement identically (`*Item`, `*CheckboxItem`, `*RadioItem`).
4
+ *
5
+ * Only the steps that are byte-for-byte the same in every family live here.
6
+ * What happens after the consumer listener runs (emit `select`, toggle the
7
+ * checkbox, select the radio value, close the menu) stays explicit in each
8
+ * part because the ordering differs per item kind: ordinary and radio items
9
+ * emit before checking cancellation, a radio item commits its value even when
10
+ * the click is cancelled, and a checkbox item only toggles when it is not.
11
+ * Not exported from the package entry.
12
+ */
13
+ /**
14
+ * Returns the consumer attrs without the listener the part handles itself, so
15
+ * `v-bind` does not attach a second, unguarded copy of the consumer `onClick`.
16
+ * `class`, `style` and every other attribute pass through untouched for Vue to
17
+ * merge with the part's own bindings.
18
+ */
19
+ export declare function omitMenuItemClickAttr(attrs: Record<string, unknown>): Record<string, unknown>;
20
+ /**
21
+ * Runs the shared, disabled-first prefix of a menu item click and reports
22
+ * whether the part may continue with its own activation.
23
+ *
24
+ * A disabled item cancels the click and never reaches consumer listeners, so a
25
+ * disabled item cannot run consumer side effects (GHO-161). An enabled item
26
+ * runs the consumer `onClick` (function or array) before any library behavior,
27
+ * so a consumer `preventDefault()` is observable by the caller via
28
+ * `event.defaultPrevented`.
29
+ */
30
+ export declare function runMenuItemConsumerClick(event: MouseEvent, disabled: boolean, attrs: Record<string, unknown>): boolean;
31
+ /**
32
+ * Keyboard activation shared by every menu checkbox item: Enter and Space are
33
+ * routed through a synthetic `click()` so the consumer `onClick`, its
34
+ * cancellation and the toggle follow exactly the pointer path (GHO-140).
35
+ *
36
+ * Already-cancelled events, disabled items and IME-owned keys are ignored; an
37
+ * IME Enter/Space confirms a composition, not the item.
38
+ */
39
+ export declare function handleMenuCheckboxItemKeydown(event: KeyboardEvent, disabled: boolean, element: HTMLElement | null): void;
@@ -0,0 +1,49 @@
1
+ /** Package that every name resolved by {@link GhostVueResolver} imports from. */
2
+ export type GhostVueResolverSource = '@ghostvue/vue';
3
+ /**
4
+ * Import instruction for one auto-imported component. Structurally compatible
5
+ * with `ComponentInfo` from `unplugin-vue-components`: the plugin emits
6
+ * `import { <name> } from '<from>'`.
7
+ */
8
+ export interface GhostVueResolvedComponent {
9
+ /** Named export to import, identical to the requested component name. */
10
+ readonly name: string;
11
+ /** Package the named export comes from. */
12
+ readonly from: GhostVueResolverSource;
13
+ }
14
+ /**
15
+ * Component resolver object accepted by `Components({ resolvers: [...] })`.
16
+ * Structurally compatible with `ComponentResolverObject` from
17
+ * `unplugin-vue-components`.
18
+ */
19
+ export interface GhostVueComponentResolver {
20
+ /** Resolves template component names, never directives. */
21
+ readonly type: 'component';
22
+ /**
23
+ * Returns the import for a PascalCase `Ghost*` component exported by
24
+ * `@ghostvue/vue`, or `undefined` so other resolvers and the template
25
+ * compiler's unknown-component warning handle every other name.
26
+ */
27
+ readonly resolve: (name: string) => GhostVueResolvedComponent | undefined;
28
+ }
29
+ /**
30
+ * Creates an `unplugin-vue-components` resolver for headless `Ghost*` components.
31
+ *
32
+ * Names resolve only when `@ghostvue/vue` exports a component with that exact
33
+ * PascalCase name (the plugin normalizes kebab-case template tags first), so an
34
+ * application component that merely shares the `Ghost` prefix is never
35
+ * rewritten into a broken import. The list is generated from the same registry
36
+ * metadata as the package entry, not maintained by hand.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * // vite.config.ts
41
+ * import Components from 'unplugin-vue-components/vite'
42
+ * import { GhostVueResolver } from '@ghostvue/vue/resolver'
43
+ *
44
+ * export default defineConfig({
45
+ * plugins: [vue(), Components({ resolvers: [GhostVueResolver()] })],
46
+ * })
47
+ * ```
48
+ */
49
+ export declare function GhostVueResolver(): GhostVueComponentResolver;
@@ -0,0 +1,14 @@
1
+ // src/.registries/component-names.generated.ts
2
+ var e = /* @__PURE__ */ "GhostAccordion.GhostAccordionContent.GhostAccordionItem.GhostAccordionTrigger.GhostAvatar.GhostBadge.GhostBreadcrumb.GhostBreadcrumbEllipsis.GhostBreadcrumbItem.GhostBreadcrumbLink.GhostBreadcrumbList.GhostBreadcrumbPage.GhostBreadcrumbSeparator.GhostButton.GhostCalendar.GhostCalendarCell.GhostCalendarGrid.GhostCalendarHeader.GhostCalendarHeading.GhostCalendarNextButton.GhostCalendarPrevButton.GhostCard.GhostCheckbox.GhostCollapsible.GhostCollapsibleContent.GhostCollapsibleTrigger.GhostCombobox.GhostComboboxContent.GhostComboboxEmpty.GhostComboboxGroup.GhostComboboxInput.GhostComboboxLabel.GhostComboboxOption.GhostComboboxTrigger.GhostCommandPalette.GhostCommandPaletteContent.GhostCommandPaletteEmpty.GhostCommandPaletteGroup.GhostCommandPaletteInput.GhostCommandPaletteItem.GhostCommandPaletteLabel.GhostCommandPaletteList.GhostCommandPaletteOverlay.GhostCommandPaletteSeparator.GhostCommandPaletteTitle.GhostCommandPaletteTrigger.GhostContextMenu.GhostContextMenuCheckboxItem.GhostContextMenuContent.GhostContextMenuGroup.GhostContextMenuItem.GhostContextMenuLabel.GhostContextMenuRadioGroup.GhostContextMenuRadioItem.GhostContextMenuSeparator.GhostContextMenuTrigger.GhostDataTable.GhostDataTablePreset.GhostDataTableTable.GhostDatePicker.GhostDatePickerCalendar.GhostDatePickerContent.GhostDatePickerInput.GhostDatePickerTrigger.GhostDialog.GhostDialogClose.GhostDialogContent.GhostDialogDescription.GhostDialogOverlay.GhostDialogTitle.GhostDialogTrigger.GhostDrawer.GhostDrawerClose.GhostDrawerContent.GhostDrawerDescription.GhostDrawerOverlay.GhostDrawerTitle.GhostDrawerTrigger.GhostDropdownMenu.GhostDropdownMenuCheckboxItem.GhostDropdownMenuContent.GhostDropdownMenuGroup.GhostDropdownMenuItem.GhostDropdownMenuLabel.GhostDropdownMenuRadioGroup.GhostDropdownMenuRadioItem.GhostDropdownMenuSeparator.GhostDropdownMenuTrigger.GhostEmptyState.GhostField.GhostFieldControl.GhostFieldDescription.GhostFieldError.GhostFieldLabel.GhostFileUpload.GhostFileUploadDropzone.GhostFileUploadItem.GhostFileUploadItemRemove.GhostFileUploadList.GhostFileUploadTrigger.GhostHoverCard.GhostHoverCardContent.GhostHoverCardTrigger.GhostInlineAlert.GhostInput.GhostInteractiveSurface.GhostKbd.GhostLink.GhostMenubar.GhostMenubarCheckboxItem.GhostMenubarContent.GhostMenubarGroup.GhostMenubarItem.GhostMenubarLabel.GhostMenubarMenu.GhostMenubarRadioGroup.GhostMenubarRadioItem.GhostMenubarSeparator.GhostMenubarTrigger.GhostNumberInput.GhostPagination.GhostPopover.GhostPopoverClose.GhostPopoverContent.GhostPopoverTrigger.GhostPortal.GhostProgress.GhostRadioGroup.GhostRadioGroupItem.GhostScrollArea.GhostScrollSpy.GhostScrollSpyItem.GhostScrollSpyLink.GhostScrollSpyList.GhostSegmentedControl.GhostSegmentedControlItem.GhostSelect.GhostSelectContent.GhostSelectGroup.GhostSelectLabel.GhostSelectOption.GhostSelectTrigger.GhostSelectValue.GhostSeparator.GhostSkeleton.GhostSlider.GhostSpinner.GhostSwitch.GhostTable.GhostTableBody.GhostTableCaption.GhostTableCell.GhostTableFoot.GhostTableHead.GhostTableHeaderCell.GhostTableRow.GhostTabs.GhostTabsContent.GhostTabsList.GhostTabsTrigger.GhostTextarea.GhostToast.GhostToastAction.GhostToastClose.GhostToastDescription.GhostToastProvider.GhostToastTitle.GhostToastViewport.GhostToggleGroup.GhostToggleGroupItem.GhostToolbar.GhostTooltip.GhostTooltipContent.GhostTooltipProvider.GhostTooltipTrigger.GhostTree.GhostTreeGroup.GhostTreeItem.GhostTreeTrigger.GhostVisuallyHidden".split(".");
3
+ // src/resolver.ts
4
+ function t() {
5
+ let t = new Set(e);
6
+ return {
7
+ type: "component",
8
+ resolve: (e) => t.has(e) ? {
9
+ name: e,
10
+ from: "@ghostvue/vue"
11
+ } : void 0
12
+ };
13
+ }
14
+ export { t as GhostVueResolver };
@@ -0,0 +1,26 @@
1
+ /** Default activation probe as a fraction of viewport height (see scroll-spy spec). */
2
+ export declare const SCROLL_SPY_DEFAULT_PROBE_OFFSET = 0.4;
3
+ /** Scroll progress at or above which the final target is forced active. */
4
+ export declare const SCROLL_SPY_DEFAULT_END_THRESHOLD = 0.995;
5
+ /** Scroll deltas below this are treated as sub-pixel noise. */
6
+ export declare const SCROLL_SPY_TRAVEL_MIN_DELTA = 0.5;
7
+ /**
8
+ * Resolves the probe line in viewport coordinates. Values in `(0, 1]` are a
9
+ * fraction of `viewportHeight`; `0` or values `> 1` are a pixel offset.
10
+ */
11
+ export declare function resolveScrollSpyProbeY(viewportHeight: number, probeOffset: number): number;
12
+ /** Whether the scroll container has scrollable overflow. */
13
+ export declare function isScrollSpyScrollable(scrollHeight: number, viewportHeight: number): boolean;
14
+ /** Normalized scroll progress in `[0, 1]`, or `0` when not scrollable. */
15
+ export declare function resolveScrollSpyProgress(scrollTop: number, scrollHeight: number, viewportHeight: number): number;
16
+ /**
17
+ * Index of the active section. See {@link docs/components/scroll-spy-spec.md}.
18
+ */
19
+ export declare function resolveScrollSpyActiveIndex(tops: readonly number[], viewportHeight: number, progress: number, probeOffset?: number, endThreshold?: number): number;
20
+ /**
21
+ * Interpolated marker progress for evenly spaced rails (`0..1`).
22
+ * Matches the landing rail interpolation formerly in `resolveRailProgress`.
23
+ */
24
+ export declare function resolveScrollSpySegmentProgress(tops: readonly number[], viewportHeight: number, scrollTop: number, progress: number, probeOffset?: number, endThreshold?: number): number;
25
+ /** Direction of the last scroll movement, or `undefined` when idle / noise. */
26
+ export declare function resolveScrollSpyTravelDirection(previousScrollTop: number, scrollTop: number): 'down' | 'up' | undefined;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Returns a copy of `items` sorted by the document position of each item's
3
+ * element, so keyboard traversal follows the rendered (visual) order rather
4
+ * than the order in which items happened to register.
5
+ *
6
+ * Option registries (Select, Combobox) append on mount, so keyed reordering,
7
+ * insertion before existing options, and filter-then-restore cycles leave the
8
+ * registration order stale. Reading the order from the DOM at traversal time
9
+ * is the same precedent as `getMenuItems` / `useRovingFocus` (query order) and
10
+ * the `compareDocumentPosition` checks in `useFocusScope`; it keeps a single
11
+ * source of truth instead of mirroring Vue's keyed patching into the registry.
12
+ *
13
+ * Items whose element is missing or disconnected (SSR, not yet mounted, or a
14
+ * stale getter during unmount) cannot be placed, so they sort after every
15
+ * connected item and keep their relative input order. `Array.prototype.sort`
16
+ * is stable, which makes that fallback deterministic.
17
+ *
18
+ * Cost is O(n log n) `compareDocumentPosition` calls over the items passed in.
19
+ * Callers should invoke it only for navigation (key presses, open focus), not
20
+ * on every registry change, and with virtualization only the mounted window is
21
+ * registered. Sorting does not make registry bookkeeping itself cheaper.
22
+ */
23
+ export declare function sortByDocumentOrder<T>(items: readonly T[], getElement: (item: T) => Element | null | undefined): T[];
@@ -0,0 +1,2 @@
1
+ /** Apply roving tabindex on the focused calendar cell button. */
2
+ export declare function applyCalendarFocusTabStops(gridRoot: HTMLElement, focusedDateKey: string): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Reads segment item values in DOM order within one group root (same scope as
3
+ * tab-stop sync). Browser-only.
4
+ */
5
+ export declare function getSegmentedControlItemOrderFromDom(groupRoot: HTMLElement): string[];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Applies the tabs selection tab stop: the active enabled tab (or fallback)
3
+ * receives `tabindex="0"`; other enabled tabs receive `-1`. Called after
4
+ * selection changes and when focus leaves the tab list so Tab into the
5
+ * widget lands on the selected tab even after keyboard roving.
6
+ */
7
+ export declare function applyTabsSelectionTabStops(listRoot: HTMLElement, tabStopValue: string | undefined): void;
@@ -0,0 +1,14 @@
1
+ export interface ToggleGroupTabStopSelectors {
2
+ itemClass: string;
3
+ rootClass: string;
4
+ valueDatasetKey: string;
5
+ }
6
+ export declare const segmentedControlTabStopSelectors: ToggleGroupTabStopSelectors;
7
+ /**
8
+ * Applies the toggle-group primary tab stop: the first pressed enabled item in
9
+ * registration order (or the explicit `tabStopValue` match), else the first
10
+ * enabled item, receives `tabindex="0"`. Other enabled items use `-1`.
11
+ */
12
+ export declare function applyToggleGroupSelectionTabStops(groupRoot: HTMLElement, tabStopValue: string | undefined, selectors?: ToggleGroupTabStopSelectors): HTMLElement | undefined;
13
+ /** Segmented control tab stops; same roving contract as toggle groups. */
14
+ export declare function applySegmentedControlSelectionTabStops(groupRoot: HTMLElement, tabStopValue: string | undefined): HTMLElement | undefined;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Shared APG typeahead matching for roving composites (menus, trees).
3
+ *
4
+ * - A one-character query searches from the item after `active`, so repeated
5
+ * presses of different letters move forward through the list.
6
+ * - A longer query keeps `active` when it still matches the extended prefix
7
+ * (typing "ne" then "new" stays on "New file" instead of jumping ahead).
8
+ * - Repeated single-character queries (for example "aa" with no item starting
9
+ * with "aa") cycle through items starting with that character rather than
10
+ * stalling.
11
+ *
12
+ * Matching is case-insensitive on trimmed text. `getText` lets callers supply
13
+ * an explicit label (tree `textValue`) instead of DOM text content.
14
+ */
15
+ export declare function findTypeaheadMatch<Item>(items: readonly Item[], query: string, active: Item | undefined, getText: (item: Item) => string): Item | undefined;
@@ -0,0 +1,28 @@
1
+ import { type MaybeRefOrGetter, type Ref } from 'vue';
2
+ /** Transitions driven by themed collapsible CSS. */
3
+ export declare const COLLAPSIBLE_HEIGHT_TRANSITION_PROPERTIES: readonly ["grid-template-rows", "height"];
4
+ /**
5
+ * Fallback when `transitionend` never fires (for example when transitions are
6
+ * disabled in devtools or the element unmounts mid-close).
7
+ */
8
+ export declare const COLLAPSIBLE_CLOSE_FALLBACK_MS = 400;
9
+ export declare function isThemedCollapsibleSurface(element: HTMLElement | null, hasDataThemed: boolean): boolean;
10
+ export declare function collapsibleHeightAnimationEnabled(options: {
11
+ themedSurface: boolean;
12
+ disableAnimation: boolean;
13
+ dataAnimationOff: boolean;
14
+ prefersReducedMotion: boolean;
15
+ }): boolean;
16
+ export interface UseCollapsibleContentHiddenOptions {
17
+ isOpen: MaybeRefOrGetter<boolean>;
18
+ host: MaybeRefOrGetter<unknown>;
19
+ disableAnimation: MaybeRefOrGetter<boolean>;
20
+ dataAnimationOff: MaybeRefOrGetter<boolean>;
21
+ hasDataThemed: MaybeRefOrGetter<boolean>;
22
+ }
23
+ /**
24
+ * Owns the native `hidden` attribute for disclosure panels. Headless surfaces
25
+ * mirror `isOpen` immediately. Themed surfaces defer `hidden` on close until
26
+ * the height transition finishes so CSS can animate `grid-template-rows`.
27
+ */
28
+ export declare function useCollapsibleContentHidden(options: UseCollapsibleContentHiddenOptions): Ref<boolean>;
@@ -0,0 +1,20 @@
1
+ import { type MaybeRefOrGetter, type WritableComputedRef } from 'vue';
2
+ export interface UseControllableStateOptions<Value> {
3
+ /** Controlled value. `undefined` is uncontrolled; `null` is a defined value. */
4
+ prop: () => Value | undefined;
5
+ /** Initial uncontrolled value. Later changes are ignored. */
6
+ defaultValue?: MaybeRefOrGetter<Value>;
7
+ /** Synchronous write. Emit `update:modelValue` / `update:open` here. */
8
+ onChange?: (value: Value) => void;
9
+ /**
10
+ * Once `prop()` has been defined, keep treating later `undefined` values as
11
+ * controlled empty state instead of falling back to uncontrolled `internal`.
12
+ */
13
+ allowControlledUndefined?: boolean;
14
+ }
15
+ /**
16
+ * Controlled/uncontrolled state as a writable computed, matching `defineModel`
17
+ * assignment and timing. Controlled iff `prop()` is not `undefined` (or was
18
+ * previously defined when `allowControlledUndefined` is enabled).
19
+ */
20
+ export declare function useControllableState<Value>(options: UseControllableStateOptions<Value>): WritableComputedRef<Value>;
@@ -0,0 +1,40 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ /** Why the topmost dismissable layer was asked to close. */
3
+ export type DismissReason = 'escape' | 'outside-pointer';
4
+ /** Element or nullable ref target accepted by {@link useDismissableLayer}. */
5
+ export type DismissableLayerTarget = HTMLElement | null | undefined;
6
+ /** Single element, ref/getter, or list of elements/refs ignored by outside-pointer checks. */
7
+ export type DismissableLayerIgnore = MaybeRefOrGetter<DismissableLayerTarget> | readonly MaybeRefOrGetter<DismissableLayerTarget>[];
8
+ /** Configuration for {@link useDismissableLayer}. */
9
+ export interface UseDismissableLayerOptions {
10
+ /** Called when the topmost layer is dismissed via Escape or outside pointerdown. */
11
+ onDismiss: (reason: DismissReason, event: KeyboardEvent | PointerEvent) => void;
12
+ /** Ignore pointerdown events outside the layer. Default `false`. */
13
+ disableOutsidePointer?: MaybeRefOrGetter<boolean | undefined>;
14
+ /** Ignore Escape keydown events. Default `false`. */
15
+ disableEscape?: MaybeRefOrGetter<boolean | undefined>;
16
+ /**
17
+ * Elements (such as the trigger) treated as part of the layer so pressing
18
+ * them does not trigger outside-pointer dismissal.
19
+ */
20
+ ignore?: MaybeRefOrGetter<DismissableLayerIgnore | undefined>;
21
+ }
22
+ /**
23
+ * Dismisses the topmost active overlay layer on Escape or pointerdown outside
24
+ * `el` and any `ignore` elements.
25
+ *
26
+ * Document listeners attach only after mount and detach completely when no
27
+ * layers remain active, keeping SSR setup pure.
28
+ */
29
+ export declare function useDismissableLayer(el: MaybeRefOrGetter<DismissableLayerTarget>, options: UseDismissableLayerOptions): void;
30
+ /**
31
+ * Internal (not part of the public entry point): joins `el` to the shared
32
+ * layer stack for `Escape` ordering only. Used by `GhostTooltipContent` so one
33
+ * `Escape` closes a tooltip opened above a dialog or popover without also
34
+ * closing that overlay, while the tooltip stays out of outside-pointer
35
+ * dismissal and modal focus ownership (it is not a modal or click-away layer).
36
+ * A separate per-component `document` listener cannot provide that ordering:
37
+ * which listener runs first depends on registration order, so local
38
+ * `preventDefault()` alone is unreliable.
39
+ */
40
+ export declare function useEscapeDismissableLayer(el: MaybeRefOrGetter<DismissableLayerTarget>, onEscape: (event: KeyboardEvent) => void): void;
@@ -0,0 +1,38 @@
1
+ import { type FlipOptions, type OffsetOptions, type Placement, type ReferenceElement, type ShiftOptions, type Strategy } from '@floating-ui/dom';
2
+ import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
3
+ /** Configuration for {@link useFloating}. */
4
+ export interface UseFloatingOptions {
5
+ /** Preferred placement relative to the anchor. Default `'bottom'`. */
6
+ placement?: MaybeRefOrGetter<Placement | undefined>;
7
+ /** Distance or axis offsets between anchor and floating elements. */
8
+ offset?: MaybeRefOrGetter<OffsetOptions | boolean | undefined>;
9
+ /** Flip to an opposite placement when overflowing. Default `true`. */
10
+ flip?: MaybeRefOrGetter<boolean | FlipOptions | undefined>;
11
+ /** Shift along the cross axis to stay within view. Default `true`. */
12
+ shift?: MaybeRefOrGetter<boolean | ShiftOptions | undefined>;
13
+ /** CSS positioning strategy. Default `'absolute'`. */
14
+ strategy?: MaybeRefOrGetter<Strategy | undefined>;
15
+ }
16
+ /** Reactive positioning state returned by {@link useFloating}. */
17
+ export interface UseFloatingReturn {
18
+ /** Computed horizontal coordinate in pixels. */
19
+ x: Readonly<Ref<number>>;
20
+ /** Computed vertical coordinate in pixels. */
21
+ y: Readonly<Ref<number>>;
22
+ /** Resolved placement after collision middleware such as flip. */
23
+ placement: Readonly<Ref<Placement>>;
24
+ /** Active CSS positioning strategy (`'absolute'` or `'fixed'`). */
25
+ strategy: ComputedRef<Strategy>;
26
+ /** True after the first `computePosition` resolves; resets on close or target change. */
27
+ isPositioned: Readonly<Ref<boolean>>;
28
+ /** Recompute the position on demand when mounted. */
29
+ update: () => Promise<void>;
30
+ }
31
+ /**
32
+ * Reactive floating positioning powered by `@floating-ui/dom`.
33
+ *
34
+ * Computes coordinates and tracks scroll/resize via `autoUpdate` only after
35
+ * mount so SSR setup stays pure. Writes `data-placement` onto `floating` and
36
+ * cleans up `autoUpdate` on unmount or target change.
37
+ */
38
+ export declare function useFloating(anchor: MaybeRefOrGetter<ReferenceElement | null | undefined>, floating: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseFloatingOptions): UseFloatingReturn;
@@ -0,0 +1,34 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ export interface UseFocusScopeOptions {
3
+ /** When true, focus and Tab/Shift+Tab cannot leave this container. Default false. */
4
+ trapped?: MaybeRefOrGetter<boolean>;
5
+ /** When trapped, wrap from last to first (and the reverse). Default true. */
6
+ loop?: MaybeRefOrGetter<boolean>;
7
+ /** Focus `[data-autofocus]` or the first tabbable on activate. Default true. */
8
+ autoFocus?: MaybeRefOrGetter<boolean>;
9
+ /** Return focus to the previously focused node on deactivate. Default true. */
10
+ restoreFocus?: MaybeRefOrGetter<boolean>;
11
+ /**
12
+ * Preferred initial focus target, resolved once per activation (after mount)
13
+ * and only when `autoFocus` is enabled. Pass a getter to resolve lazily, for
14
+ * example a target that a descendant registers after it renders. A missing,
15
+ * disconnected, unfocusable, or out-of-scope element falls back to
16
+ * `[data-autofocus]`, then the first tabbable, then the container.
17
+ */
18
+ initialFocus?: MaybeRefOrGetter<HTMLElement | null | undefined>;
19
+ /**
20
+ * Preferred restoration target, resolved once per deactivation and only
21
+ * when `restoreFocus` is enabled. A missing, disconnected, or unfocusable
22
+ * (for example disabled) element falls back to the node that was focused
23
+ * when the scope activated.
24
+ */
25
+ returnFocus?: MaybeRefOrGetter<HTMLElement | null | undefined>;
26
+ }
27
+ /**
28
+ * Focus entry, optional focus/Tab trap, and restoration for overlays.
29
+ *
30
+ * DOM work runs in `onMounted` / event handlers so SSR setup stays pure.
31
+ * Listeners and stack membership are removed on unmount or when the container
32
+ * leaves the document.
33
+ */
34
+ export declare function useFocusScope(container: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseFocusScopeOptions): void;
@@ -0,0 +1,5 @@
1
+ import type { UseGhostAccordionOptions, UseGhostAccordionReturn } from './ghost-accordion.js';
2
+ /**
3
+ * Headless accordion expansion state for single or multiple coordinated panels.
4
+ */
5
+ export declare function useGhostAccordion(options?: UseGhostAccordionOptions): UseGhostAccordionReturn;
@@ -0,0 +1,28 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { GhostAvatarDataState, GhostAvatarImageStatus, UseGhostAvatarOptions } from './ghost-avatar.js';
3
+ export interface GhostAvatarRootProps {
4
+ class: 'ghost-avatar';
5
+ 'data-part': 'root';
6
+ 'data-state': GhostAvatarDataState | undefined;
7
+ }
8
+ export interface GhostAvatarImageProps {
9
+ 'data-part': 'image';
10
+ src: string;
11
+ alt: string;
12
+ onError: () => void;
13
+ }
14
+ /** Derive up to two uppercase initials from a display name. */
15
+ export declare function deriveGhostAvatarInitials(name: string): string;
16
+ /**
17
+ * Avatar bindings, image probe, and initials. Image load is deferred until
18
+ * after mount so SSR and hydration both render the fallback with
19
+ * `data-state="loading"` and no `<img>`.
20
+ */
21
+ export declare function useGhostAvatar(options?: UseGhostAvatarOptions): {
22
+ imageStatus: Ref<GhostAvatarImageStatus>;
23
+ showImage: ComputedRef<boolean>;
24
+ showFallback: ComputedRef<boolean>;
25
+ initials: ComputedRef<string>;
26
+ rootProps: ComputedRef<GhostAvatarRootProps>;
27
+ imageProps: ComputedRef<GhostAvatarImageProps | null>;
28
+ };
@@ -0,0 +1,13 @@
1
+ import { type ComputedRef } from 'vue';
2
+ /** Bindings returned by {@link useGhostBadge} for the unstyled root. */
3
+ export interface GhostBadgeRootProps {
4
+ class: 'ghost-badge';
5
+ 'data-part': 'root';
6
+ }
7
+ /**
8
+ * Styling-hook bindings for a non-interactive badge. No `data-state`: the
9
+ * contract has no behavioral states, and inventing one would pre-empt GHO-38.
10
+ */
11
+ export declare function useGhostBadge(): {
12
+ rootProps: ComputedRef<GhostBadgeRootProps>;
13
+ };
@@ -0,0 +1,19 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
2
+ import type { GhostBreadcrumbProps } from './ghost-breadcrumb.js';
3
+ /** Bindings returned by {@link useGhostBreadcrumb} for the root landmark. */
4
+ export interface GhostBreadcrumbRootProps {
5
+ class: 'ghost-breadcrumb';
6
+ 'data-part': 'root';
7
+ 'data-ghost-breadcrumb': '';
8
+ 'aria-label': string;
9
+ }
10
+ export interface UseGhostBreadcrumbOptions {
11
+ ariaLabel?: MaybeRefOrGetter<string | undefined>;
12
+ }
13
+ /**
14
+ * Styling and accessibility bindings for the breadcrumb navigation root.
15
+ */
16
+ export declare function useGhostBreadcrumb(options?: UseGhostBreadcrumbOptions): {
17
+ rootProps: ComputedRef<GhostBreadcrumbRootProps>;
18
+ };
19
+ export type { GhostBreadcrumbProps };
@@ -0,0 +1,18 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import type { GhostButtonType, UseGhostButtonOptions } from './ghost-button.js';
3
+ export interface GhostButtonRootProps {
4
+ class: 'ghost-button';
5
+ type: GhostButtonType;
6
+ disabled: boolean | undefined;
7
+ 'aria-disabled': 'true' | undefined;
8
+ 'aria-busy': 'true' | undefined;
9
+ 'data-part': 'root';
10
+ 'data-state': 'loading' | 'disabled' | undefined;
11
+ onClickCapture: (event: MouseEvent) => void;
12
+ }
13
+ /** Native type/disabled, loading that stays focusable, `data-part` / `data-state`. */
14
+ export declare function useGhostButton(options?: UseGhostButtonOptions): {
15
+ isDisabled: ComputedRef<boolean>;
16
+ isLoading: ComputedRef<boolean>;
17
+ rootProps: ComputedRef<GhostButtonRootProps>;
18
+ };
@@ -0,0 +1,3 @@
1
+ import { type UseGhostCalendarOptions, type UseGhostCalendarReturn } from './ghost-calendar.js';
2
+ /** Calendar root state: selection, visible month, and keyboard focus. */
3
+ export declare function useGhostCalendar(options: UseGhostCalendarOptions): UseGhostCalendarReturn;
@@ -0,0 +1,15 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import type { GhostCardElement, UseGhostCardOptions } from './ghost-card.js';
3
+ export interface GhostCardRootProps {
4
+ class: 'ghost-card';
5
+ 'data-part': 'root';
6
+ 'data-ghost-card': '';
7
+ }
8
+ /**
9
+ * Root bindings for a card surface. Layout and elevation stay consumer-owned.
10
+ */
11
+ export declare function useGhostCard(options?: UseGhostCardOptions): {
12
+ as: ComputedRef<GhostCardElement>;
13
+ rootProps: ComputedRef<GhostCardRootProps>;
14
+ isActionRoot: ComputedRef<boolean>;
15
+ };
@@ -0,0 +1,24 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import { useControllableState } from './use-controllable-state.js';
3
+ import type { GhostCheckboxDataState, UseGhostCheckboxOptions } from './ghost-checkbox.js';
4
+ export interface GhostCheckboxRootProps {
5
+ class: 'ghost-checkbox';
6
+ type: 'checkbox';
7
+ checked: boolean;
8
+ disabled: boolean | undefined;
9
+ 'data-part': 'root';
10
+ 'data-state': GhostCheckboxDataState | undefined;
11
+ onChange: (event: Event) => void;
12
+ }
13
+ /**
14
+ * Boolean v-model, consumer-owned mixed state, native disabled.
15
+ * Mixed is a DOM property, not `aria-checked="mixed"`: ARIA in HTML ignores
16
+ * that attribute on `input type=checkbox`.
17
+ */
18
+ export declare function useGhostCheckbox(options?: UseGhostCheckboxOptions): {
19
+ isChecked: ReturnType<typeof useControllableState<boolean>>;
20
+ isDisabled: ComputedRef<boolean>;
21
+ isIndeterminate: ComputedRef<boolean>;
22
+ rootProps: ComputedRef<GhostCheckboxRootProps>;
23
+ applyFormReset: () => void;
24
+ };
@@ -0,0 +1,8 @@
1
+ import type { UseGhostCollapsibleOptions, UseGhostCollapsibleReturn } from './ghost-collapsible.js';
2
+ /**
3
+ * Headless collapsible open state and deterministic SSR-safe IDs.
4
+ *
5
+ * Uses {@link useControllableState} so `open` can be either controlled or
6
+ * uncontrolled while calling `onOpenChange` on every user-initiated transition.
7
+ */
8
+ export declare function useGhostCollapsible(options?: UseGhostCollapsibleOptions): UseGhostCollapsibleReturn;
@@ -0,0 +1,65 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { GhostComboboxFormInputProps, GhostComboboxLiveRegionProps, GhostComboboxValue, UseGhostComboboxOptions } from './ghost-combobox.js';
3
+ /** Neutral root class hook (themed recipes may target). */
4
+ export interface GhostComboboxRootProps {
5
+ class?: string;
6
+ }
7
+ /**
8
+ * Selected value, search query, option registry, listbox open state, highlight,
9
+ * and form hidden-input props for {@link GhostCombobox}.
10
+ */
11
+ export declare function useGhostCombobox(options?: UseGhostComboboxOptions): {
12
+ multiple: ComputedRef<boolean>;
13
+ virtualized: ComputedRef<boolean>;
14
+ selectedValue: Ref<GhostComboboxValue>;
15
+ searchValue: Ref<string>;
16
+ isOpen: Ref<boolean>;
17
+ loading: ComputedRef<boolean>;
18
+ open: () => void;
19
+ close: () => void;
20
+ toggleOpen: () => void;
21
+ dismissOnFocusLeave: () => void;
22
+ disabled: ComputedRef<boolean>;
23
+ required: ComputedRef<boolean>;
24
+ invalid: ComputedRef<boolean>;
25
+ allowDeselect: ComputedRef<boolean>;
26
+ placeholder: ComputedRef<string | undefined>;
27
+ defaultInputId: ComputedRef<string>;
28
+ defaultContentId: ComputedRef<string>;
29
+ optionOrder: ComputedRef<string[]>;
30
+ optionCount: ComputedRef<number>;
31
+ registerOption: GhostComboboxRegisterOption;
32
+ unregisterOption: (value: string) => void;
33
+ setOptionDisabled: (value: string, disabled: boolean) => void;
34
+ setOptionTextValue: (value: string, textValue: string) => void;
35
+ select: (value: string) => void;
36
+ isSelected: (value: string) => boolean;
37
+ isOptionDisabled: (value: string) => boolean;
38
+ getOptionText: (value: string) => string | undefined;
39
+ getOptionId: (value: string) => string | undefined;
40
+ activeOptionValue: Ref<string | undefined>;
41
+ activeDescendantId: ComputedRef<string | undefined>;
42
+ moveActive: (direction: 1 | -1) => void;
43
+ setActiveOptionByValue: (value: string | undefined) => void;
44
+ moveActiveFirst: () => void;
45
+ moveActiveLast: () => void;
46
+ onInputSearch: (query: string) => void;
47
+ formMirrorInputs: ComputedRef<GhostComboboxFormInputProps[]>;
48
+ applyFormReset: () => void;
49
+ syncFormValidity: () => void;
50
+ handleFormInputInvalid: () => void;
51
+ labelVersion: Ref<number>;
52
+ announceMessage: Ref<string>;
53
+ liveRegionId: ComputedRef<string>;
54
+ liveRegionProps: ComputedRef<GhostComboboxLiveRegionProps>;
55
+ };
56
+ type GhostComboboxRegisterOption = (value: string, textValue: string, disabled: boolean, optionId: string, getElement: () => HTMLElement | null) => void;
57
+ /**
58
+ * Tracks the latest `search` event `requestId` from {@link GhostCombobox} so
59
+ * async handlers can ignore stale responses without a second id source.
60
+ */
61
+ export declare function useGhostComboboxAsyncSearch(): {
62
+ begin: (requestId: number) => void;
63
+ isLatest: (requestId: number) => boolean;
64
+ };
65
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { UseGhostCommandPaletteAsyncSearchReturn, UseGhostCommandPaletteOptions, UseGhostCommandPaletteReturn } from './ghost-command-palette.js';
2
+ /**
3
+ * Command palette state: a dialog shell (open, modal, part ids) composed with
4
+ * `useGhostCombobox` for the item registry, highlight, loading, and polite
5
+ * announcements. Must run during a component `setup`.
6
+ *
7
+ * The palette deliberately never calls the combobox `select()`: that commits
8
+ * `modelValue`, copies the option label into the query, and closes the list,
9
+ * which is right for a form field but would emit spurious `search` events and
10
+ * leave a stale selection on the next open. Activation goes through
11
+ * {@link UseGhostCommandPaletteReturn.activateCommand} instead.
12
+ *
13
+ * The query is owned here rather than by the combobox so that typing and the
14
+ * reset on close share one monotonic `requestId` sequence; the combobox only
15
+ * sees `open`, `loading`, `disabled`, and `messages`.
16
+ */
17
+ export declare function useGhostCommandPalette(options?: UseGhostCommandPaletteOptions): UseGhostCommandPaletteReturn;
18
+ /**
19
+ * Stale-response guard for async command lists. Call `begin(requestId)` from
20
+ * the palette `search` handler, then apply results only while
21
+ * `isLatest(requestId)` is true. Same contract as
22
+ * `useGhostComboboxAsyncSearch`, tied to the palette's own `requestId`.
23
+ */
24
+ export declare function useGhostCommandPaletteAsyncSearch(): UseGhostCommandPaletteAsyncSearchReturn;