@alfakit/vue 0.1.1 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/AlfakitRoot.js.map +1 -1
- package/dist/AlfakitRoot.vue.d.ts.map +1 -1
- package/dist/AlfakitRoot.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/AlfakitRoot.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/actions/ActionButton.js.map +1 -1
- package/dist/components/actions/ActionButton.vue.d.ts.map +1 -1
- package/dist/components/actions/ActionButton.vue_vue_type_script_setup_true_lang.js +160 -159
- package/dist/components/actions/ActionButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/actions/ActionGroupMenu.js.map +1 -1
- package/dist/components/actions/ActionGroupMenu.vue.d.ts.map +1 -1
- package/dist/components/actions/ActionGroupMenu.vue_vue_type_script_setup_true_lang.js +69 -65
- package/dist/components/actions/ActionGroupMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/actions/ActionModal.js.map +1 -1
- package/dist/components/actions/ActionModal.vue.d.ts.map +1 -1
- package/dist/components/actions/ActionModal.vue_vue_type_script_setup_true_lang.js +221 -219
- package/dist/components/actions/ActionModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ai/AiCopilot.js.map +1 -1
- package/dist/components/ai/AiCopilot.vue.d.ts +2 -0
- package/dist/components/ai/AiCopilot.vue.d.ts.map +1 -1
- package/dist/components/ai/AiCopilot.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/ai/AiCopilot.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/cms/CmsPage.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/components/cms/CmsPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/cms/LivePreview.js.map +1 -1
- package/dist/components/cms/LivePreview.vue.d.ts.map +1 -1
- package/dist/components/cms/LivePreview.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/cms/LivePreview.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/BuilderField.js.map +1 -1
- package/dist/components/fields/BuilderField.vue.d.ts.map +1 -1
- package/dist/components/fields/BuilderField.vue_vue_type_script_setup_true_lang.js +162 -157
- package/dist/components/fields/BuilderField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ColorPickerField.js.map +1 -1
- package/dist/components/fields/ColorPickerField.vue.d.ts.map +1 -1
- package/dist/components/fields/ColorPickerField.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/fields/ColorPickerField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ComboboxSelect.js.map +1 -1
- package/dist/components/fields/ComboboxSelect.vue.d.ts.map +1 -1
- package/dist/components/fields/ComboboxSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/fields/ComboboxSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/FileUploadField.js.map +1 -1
- package/dist/components/fields/FileUploadField.vue.d.ts.map +1 -1
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js +183 -183
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ImageEditorDialog.js.map +1 -1
- package/dist/components/fields/ImageEditorDialog.vue.d.ts.map +1 -1
- package/dist/components/fields/ImageEditorDialog.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/fields/ImageEditorDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/KeyValueField.js.map +1 -1
- package/dist/components/fields/KeyValueField.vue.d.ts.map +1 -1
- package/dist/components/fields/KeyValueField.vue_vue_type_script_setup_true_lang.js +66 -66
- package/dist/components/fields/KeyValueField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ModalTablePicker.js.map +1 -1
- package/dist/components/fields/ModalTablePicker.vue.d.ts.map +1 -1
- package/dist/components/fields/ModalTablePicker.vue_vue_type_script_setup_true_lang.js +113 -113
- package/dist/components/fields/ModalTablePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/OneTimeCodeInputField.js.map +1 -1
- package/dist/components/fields/OneTimeCodeInputField.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/fields/OneTimeCodeInputField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/RepeaterField.js.map +1 -1
- package/dist/components/fields/RepeaterField.vue.d.ts.map +1 -1
- package/dist/components/fields/RepeaterField.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/fields/RepeaterField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/RichEditorInput.js.map +1 -1
- package/dist/components/fields/RichEditorInput.vue.d.ts.map +1 -1
- package/dist/components/fields/RichEditorInput.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/fields/RichEditorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/SelectField.js.map +1 -1
- package/dist/components/fields/SelectField.vue.d.ts.map +1 -1
- package/dist/components/fields/SelectField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/fields/SelectField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/SliderField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/TableColumnHeaders.js.map +1 -1
- package/dist/components/fields/TableColumnHeaders.vue.d.ts.map +1 -1
- package/dist/components/fields/TableColumnHeaders.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/components/fields/TableColumnHeaders.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/item-actions.d.ts +2 -2
- package/dist/components/fields/item-actions.d.ts.map +1 -1
- package/dist/components/fields/item-actions.js +31 -31
- package/dist/components/fields/item-actions.js.map +1 -1
- package/dist/components/file-manager/FileManagerView.js.map +1 -1
- package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/FormBlock.js.map +1 -1
- package/dist/components/form/FormBlock.vue.d.ts.map +1 -1
- package/dist/components/form/FormBlock.vue_vue_type_script_setup_true_lang.js +81 -77
- package/dist/components/form/FormBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/form-context.js +25 -25
- package/dist/components/form/form-context.js.map +1 -1
- package/dist/components/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/kanban/KanbanBoard.vue.d.ts.map +1 -1
- package/dist/components/kanban/KanbanBoard.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/kanban/KanbanBoard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/kanban/KanbanColumnHeader.js.map +1 -1
- package/dist/components/kanban/KanbanColumnHeader.vue.d.ts.map +1 -1
- package/dist/components/kanban/KanbanColumnHeader.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/kanban/KanbanColumnHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/layout/FusedGroupComponent.js.map +1 -1
- package/dist/components/layout/FusedGroupComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/FusedGroupComponent.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/layout/FusedGroupComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/layout/SectionComponent.js.map +1 -1
- package/dist/components/layout/SectionComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/SectionComponent.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/components/layout/SectionComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/layout/TabsComponent.js.map +1 -1
- package/dist/components/layout/TabsComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/TabsComponent.vue_vue_type_script_setup_true_lang.js +76 -55
- package/dist/components/layout/TabsComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/notifications/NotificationsMenu.js.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue.d.ts.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js +44 -42
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/DebugPanel.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/panel/DebugPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/GlobalSearch.js.map +1 -1
- package/dist/components/panel/GlobalSearch.vue.d.ts.map +1 -1
- package/dist/components/panel/GlobalSearch.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/panel/GlobalSearch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/GlobalSearchPalette.js.map +1 -1
- package/dist/components/panel/GlobalSearchPalette.vue.d.ts.map +1 -1
- package/dist/components/panel/GlobalSearchPalette.vue_vue_type_script_setup_true_lang.js +102 -96
- package/dist/components/panel/GlobalSearchPalette.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/NavGroup.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/panel/NavGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/NavGroupFlyout.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/panel/NavGroupFlyout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/NavItem.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/components/panel/NavItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/NavSubItem.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/panel/NavSubItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/ShortcutKeys.js.map +1 -1
- package/dist/components/panel/ShortcutKeys.vue.d.ts.map +1 -1
- package/dist/components/panel/ShortcutKeys.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/panel/ShortcutKeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/TenantMenu.js.map +1 -1
- package/dist/components/panel/TenantMenu.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/panel/TenantMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/Topbar.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/panel/Topbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/realtime/use-live-updates.d.ts.map +1 -1
- package/dist/components/realtime/use-live-updates.js +24 -23
- package/dist/components/realtime/use-live-updates.js.map +1 -1
- package/dist/components/table/BooleanCell.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/table/BooleanCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/ColumnHeader.js.map +1 -1
- package/dist/components/table/ColumnHeader.vue.d.ts.map +1 -1
- package/dist/components/table/ColumnHeader.vue_vue_type_script_setup_true_lang.js +55 -49
- package/dist/components/table/ColumnHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/ColumnManager.js.map +1 -1
- package/dist/components/table/ColumnManager.vue.d.ts.map +1 -1
- package/dist/components/table/ColumnManager.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/components/table/ColumnManager.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/ContentLayoutSort.js.map +1 -1
- package/dist/components/table/ContentLayoutSort.vue.d.ts.map +1 -1
- package/dist/components/table/ContentLayoutSort.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/table/ContentLayoutSort.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/GroupHeaderRow.js.map +1 -1
- package/dist/components/table/GroupHeaderRow.vue.d.ts.map +1 -1
- package/dist/components/table/GroupHeaderRow.vue_vue_type_script_setup_true_lang.js +55 -34
- package/dist/components/table/GroupHeaderRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/SelectCell.js.map +1 -1
- package/dist/components/table/SelectCell.vue.d.ts.map +1 -1
- package/dist/components/table/SelectCell.vue_vue_type_script_setup_true_lang.js +26 -20
- package/dist/components/table/SelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/SelectComboboxCell.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/table/SelectComboboxCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/TableCellContent.js.map +1 -1
- package/dist/components/table/TableCellContent.vue.d.ts.map +1 -1
- package/dist/components/table/TableCellContent.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/components/table/TableCellContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/TablePagination.js.map +1 -1
- package/dist/components/table/TablePagination.vue.d.ts.map +1 -1
- package/dist/components/table/TablePagination.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/components/table/TablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/TextInputCell.js.map +1 -1
- package/dist/components/table/TextInputCell.vue.d.ts.map +1 -1
- package/dist/components/table/TextInputCell.vue_vue_type_script_setup_true_lang.js +40 -34
- package/dist/components/table/TextInputCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/cell-update.d.ts +6 -0
- package/dist/components/table/cell-update.d.ts.map +1 -1
- package/dist/components/table/cell-update.js.map +1 -1
- package/dist/components/translation-manager/TranslationManagerView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/translation-manager/TranslationManagerView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ui/CommandAutoHighlight.js +7 -0
- package/dist/components/ui/CommandAutoHighlight.js.map +1 -0
- package/dist/components/ui/CommandAutoHighlight.vue.d.ts +21 -0
- package/dist/components/ui/CommandAutoHighlight.vue.d.ts.map +1 -0
- package/dist/components/ui/CommandAutoHighlight.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/components/ui/CommandAutoHighlight.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/ui/DialogContent.js.map +1 -1
- package/dist/components/ui/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/ui/DialogContent.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/components/ui/DialogContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ui/PopoverContent.js.map +1 -1
- package/dist/components/ui/PopoverContent.vue.d.ts.map +1 -1
- package/dist/components/ui/PopoverContent.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/ui/PopoverContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ui/SheetContent.js.map +1 -1
- package/dist/components/ui/SheetContent.vue.d.ts.map +1 -1
- package/dist/components/ui/SheetContent.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/components/ui/SheetContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/ui/TooltipContent.js.map +1 -1
- package/dist/components/ui/TooltipContent.vue.d.ts.map +1 -1
- package/dist/components/ui/TooltipContent.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/ui/TooltipContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components.css +347 -0
- package/dist/context.d.ts +7 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +29 -26
- package/dist/context.js.map +1 -1
- package/dist/create-alfakit.d.ts.map +1 -1
- package/dist/create-alfakit.js +33 -31
- package/dist/create-alfakit.js.map +1 -1
- package/dist/eject-manifest.json +11 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +219 -217
- package/dist/layouts/AppLayout.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/layouts/AppLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/layouts/AuthLayout.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/layouts/FullscreenLayout.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/layouts/FullscreenLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/layouts/TopNavLayout.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/layouts/TopNavLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/layouts/lazy-layouts.d.ts +10 -0
- package/dist/layouts/lazy-layouts.d.ts.map +1 -0
- package/dist/layouts/lazy-layouts.js +8 -0
- package/dist/layouts/lazy-layouts.js.map +1 -0
- package/dist/layouts/panel-layouts.d.ts +8 -0
- package/dist/layouts/panel-layouts.d.ts.map +1 -0
- package/dist/layouts/panel-layouts.js +15 -0
- package/dist/layouts/panel-layouts.js.map +1 -0
- package/dist/lib/lazy.d.ts.map +1 -1
- package/dist/lib/lazy.js +2 -2
- package/dist/lib/lazy.js.map +1 -1
- package/dist/pages/PageShell.js.map +1 -1
- package/dist/pages/PageShell.vue.d.ts.map +1 -1
- package/dist/pages/PageShell.vue_vue_type_script_setup_true_lang.js +39 -42
- package/dist/pages/PageShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone/AlfakitComponent.js.map +1 -1
- package/dist/standalone/AlfakitComponent.vue.d.ts.map +1 -1
- package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js +56 -52
- package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone/AlfakitToaster.js.map +1 -1
- package/dist/standalone/AlfakitToaster.vue.d.ts.map +1 -1
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js +23 -15
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone.css +54 -0
- package/dist/starter-kit/AlfakitStarterKitRoot.js.map +1 -1
- package/dist/starter-kit/AlfakitStarterKitRoot.vue.d.ts +2 -2
- package/dist/starter-kit/AlfakitStarterKitRoot.vue.d.ts.map +1 -1
- package/dist/starter-kit/AlfakitStarterKitRoot.vue_vue_type_script_setup_true_lang.js +17 -12
- package/dist/starter-kit/AlfakitStarterKitRoot.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/starter-kit/dashboard-widgets.d.ts +54 -0
- package/dist/starter-kit/dashboard-widgets.d.ts.map +1 -0
- package/dist/starter-kit/dashboard-widgets.js +54 -0
- package/dist/starter-kit/dashboard-widgets.js.map +1 -0
- package/dist/starter-kit/index.d.ts +2 -1
- package/dist/starter-kit/index.d.ts.map +1 -1
- package/dist/starter-kit/index.js +5 -4
- package/dist/starter-kit/runtime.d.ts +6 -0
- package/dist/starter-kit/runtime.d.ts.map +1 -1
- package/dist/starter-kit/runtime.js +19 -15
- package/dist/starter-kit/runtime.js.map +1 -1
- package/dist/starter-kit/starter-kit.d.ts.map +1 -1
- package/dist/starter-kit/starter-kit.js +8 -8
- package/dist/starter-kit/starter-kit.js.map +1 -1
- package/dist/starter-kit/widgets/CopilotTrigger.js +7 -0
- package/dist/starter-kit/widgets/CopilotTrigger.js.map +1 -0
- package/dist/starter-kit/widgets/CopilotTrigger.vue.d.ts +12 -0
- package/dist/starter-kit/widgets/CopilotTrigger.vue.d.ts.map +1 -0
- package/dist/starter-kit/widgets/CopilotTrigger.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/starter-kit/widgets/CopilotTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/starter-kit/widgets/LoadedCopilot.js +7 -0
- package/dist/starter-kit/widgets/LoadedCopilot.js.map +1 -0
- package/dist/starter-kit/widgets/LoadedCopilot.vue.d.ts +8 -0
- package/dist/starter-kit/widgets/LoadedCopilot.vue.d.ts.map +1 -0
- package/dist/starter-kit/widgets/LoadedCopilot.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/starter-kit/widgets/LoadedCopilot.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/starter-kit/widgets/SearchTrigger.js.map +1 -1
- package/dist/starter-kit/widgets/SearchTrigger.vue.d.ts.map +1 -1
- package/dist/starter-kit/widgets/SearchTrigger.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/starter-kit/widgets/SearchTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.js +7 -0
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.js.map +1 -0
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.vue.d.ts +8 -0
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.vue.d.ts.map +1 -0
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/starter-kit/widgets/StarterKitImpersonationBanner.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/starter-kit/widgets/TenantChooser.js.map +1 -1
- package/dist/starter-kit/widgets/TenantChooser.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/starter-kit/widgets/TenantChooser.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/starter-kit/widgets/index.d.ts +40 -9
- package/dist/starter-kit/widgets/index.d.ts.map +1 -1
- package/dist/starter-kit/widgets/index.js +21 -18
- package/dist/starter-kit/widgets/index.js.map +1 -1
- package/dist/starter-kit/widgets/loaded.d.ts +10 -0
- package/dist/starter-kit/widgets/loaded.d.ts.map +1 -0
- package/dist/starter-kit/widgets/loaded.js +5 -0
- package/dist/styles.css +9 -2
- package/dist/themes.css +8 -335
- package/package.json +3 -3
- package/src/AlfakitRoot.vue +9 -1
- package/src/components/actions/ActionButton.vue +14 -6
- package/src/components/actions/ActionGroupMenu.vue +13 -1
- package/src/components/actions/ActionModal.vue +12 -1
- package/src/components/ai/AiCopilot.vue +7 -1
- package/src/components/cms/LivePreview.vue +8 -2
- package/src/components/fields/BuilderField.vue +15 -2
- package/src/components/fields/ColorPickerField.vue +1 -0
- package/src/components/fields/ComboboxSelect.vue +1 -1
- package/src/components/fields/FileUploadField.vue +14 -11
- package/src/components/fields/ImageEditorDialog.vue +7 -3
- package/src/components/fields/KeyValueField.vue +3 -2
- package/src/components/fields/ModalTablePicker.vue +7 -2
- package/src/components/fields/OneTimeCodeInputField.vue +1 -1
- package/src/components/fields/RepeaterField.vue +2 -3
- package/src/components/fields/RichEditorInput.vue +3 -0
- package/src/components/fields/SelectField.vue +4 -2
- package/src/components/fields/TableColumnHeaders.vue +6 -1
- package/src/components/fields/item-actions.ts +31 -10
- package/src/components/file-manager/FileManagerView.vue +1 -1
- package/src/components/form/FormBlock.vue +26 -1
- package/src/components/form/form-context.ts +3 -3
- package/src/components/kanban/KanbanBoard.vue +15 -3
- package/src/components/kanban/KanbanColumnHeader.vue +6 -4
- package/src/components/layout/FusedGroupComponent.vue +1 -0
- package/src/components/layout/SectionComponent.vue +10 -4
- package/src/components/layout/TabsComponent.vue +61 -5
- package/src/components/notifications/NotificationsMenu.vue +11 -0
- package/src/components/panel/GlobalSearch.vue +1 -0
- package/src/components/panel/GlobalSearchPalette.vue +2 -0
- package/src/components/panel/ShortcutKeys.vue +1 -0
- package/src/components/panel/TenantMenu.vue +2 -2
- package/src/components/realtime/use-live-updates.ts +3 -1
- package/src/components/table/ColumnHeader.vue +23 -12
- package/src/components/table/ColumnManager.vue +12 -8
- package/src/components/table/ContentLayoutSort.vue +7 -1
- package/src/components/table/GroupHeaderRow.vue +27 -0
- package/src/components/table/SelectCell.vue +5 -2
- package/src/components/table/TableCellContent.vue +4 -2
- package/src/components/table/TablePagination.vue +12 -7
- package/src/components/table/TextInputCell.vue +11 -5
- package/src/components/table/cell-update.ts +6 -0
- package/src/components/ui/CommandAutoHighlight.vue +27 -0
- package/src/components/ui/DialogContent.vue +5 -1
- package/src/components/ui/PopoverContent.vue +5 -1
- package/src/components/ui/SheetContent.vue +5 -1
- package/src/components/ui/TooltipContent.vue +5 -1
- package/src/context.ts +10 -0
- package/src/create-alfakit.ts +5 -0
- package/src/index.ts +2 -0
- package/src/layouts/lazy-layouts.ts +14 -0
- package/src/layouts/panel-layouts.ts +17 -0
- package/src/lib/lazy.ts +11 -1
- package/src/pages/PageShell.vue +5 -6
- package/src/standalone/AlfakitComponent.vue +17 -6
- package/src/standalone/AlfakitToaster.vue +12 -2
- package/src/starter-kit/AlfakitStarterKitRoot.vue +12 -3
- package/src/starter-kit/dashboard-widgets.ts +93 -0
- package/src/starter-kit/index.ts +7 -1
- package/src/starter-kit/runtime.ts +17 -1
- package/src/starter-kit/starter-kit.ts +2 -1
- package/src/starter-kit/widgets/CopilotTrigger.vue +58 -0
- package/src/starter-kit/widgets/LoadedCopilot.vue +29 -0
- package/src/starter-kit/widgets/SearchTrigger.vue +1 -0
- package/src/starter-kit/widgets/StarterKitImpersonationBanner.vue +57 -0
- package/src/starter-kit/widgets/TenantChooser.vue +1 -1
- package/src/starter-kit/widgets/index.ts +56 -11
- package/src/starter-kit/widgets/loaded.ts +9 -0
- package/src/styles.css +9 -2
package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDirection as e, useFormatter as t, usePanel as ee, useT as te } from "../../context.js";
|
|
2
2
|
import { cn as n } from "../../lib/utils.js";
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { cssColor as
|
|
3
|
+
import { useStore as ne } from "../../composables/use-store.js";
|
|
4
|
+
import { cssColor as r, textColorClasses as i } from "../../lib/colors.js";
|
|
5
5
|
import a from "../../lib/Icon.js";
|
|
6
6
|
import o from "../ui/Button2.js";
|
|
7
7
|
import s from "../ui/Spinner.js";
|
|
@@ -10,8 +10,8 @@ import c from "../ui/Popover.js";
|
|
|
10
10
|
import l from "../ui/PopoverContent.js";
|
|
11
11
|
import u from "../ui/PopoverTrigger.js";
|
|
12
12
|
import d from "../ui/ScrollArea.js";
|
|
13
|
-
import { NotificationCenter as
|
|
14
|
-
import { Fragment as
|
|
13
|
+
import { NotificationCenter as f, notificationTintStyles as ie, onDatabaseNotificationsSent as ae, onOpenDatabaseNotifications as oe } from "@alfakit/core";
|
|
14
|
+
import { Fragment as p, computed as se, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, normalizeClass as x, normalizeStyle as ce, onMounted as S, onScopeDispose as C, openBlock as w, ref as le, renderList as T, toDisplayString as E, unref as D, watch as O, withCtx as k } from "vue";
|
|
15
15
|
import { BellIcon as A, CheckCheckIcon as j, Trash2Icon as M } from "@lucide/vue";
|
|
16
16
|
//#region src/components/notifications/NotificationsMenu.vue?vue&type=script&setup=true&lang.ts
|
|
17
17
|
var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P = {
|
|
@@ -38,15 +38,15 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
38
38
|
}, ge = {
|
|
39
39
|
key: 3,
|
|
40
40
|
class: "flex justify-center border-t p-2"
|
|
41
|
-
}, W = /*@__PURE__*/
|
|
41
|
+
}, W = /*@__PURE__*/ b({
|
|
42
42
|
__name: "NotificationsMenu",
|
|
43
43
|
props: { variant: { default: "topbar" } },
|
|
44
|
-
setup(
|
|
45
|
-
let W =
|
|
44
|
+
setup(b) {
|
|
45
|
+
let W = b, G = te(), _e = e(), K = ee(), q = se(() => K.value.databaseNotifications), J = K.value.endpoints, Y = J.notifications && J.notificationsReadAll && J.notificationsDestroyAll ? new f({
|
|
46
46
|
notifications: J.notifications,
|
|
47
47
|
notificationsReadAll: J.notificationsReadAll,
|
|
48
48
|
notificationsDestroyAll: J.notificationsDestroyAll
|
|
49
|
-
}, q.value?.unreadCount ?? 0) : null, X = le(!1), Z =
|
|
49
|
+
}, q.value?.unreadCount ?? 0) : null, X = le(!1), Z = ne(Y?.store ?? {
|
|
50
50
|
get: () => ({
|
|
51
51
|
notifications: [],
|
|
52
52
|
unreadCount: 0,
|
|
@@ -60,23 +60,25 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
60
60
|
O(() => q.value?.pollingInterval, (e) => Y?.startPolling(e), { immediate: !0 });
|
|
61
61
|
}), O(X, (e) => {
|
|
62
62
|
e && Y?.load();
|
|
63
|
+
}), O(() => q.value?.unreadCount, (e) => {
|
|
64
|
+
Y && typeof e == "number" && e !== Y.store.get().unreadCount && Y.store.update({ unreadCount: e });
|
|
63
65
|
});
|
|
64
66
|
let Q = null;
|
|
65
67
|
S(() => {
|
|
66
|
-
Q = Y ?
|
|
68
|
+
Q = Y ? ae(() => void Y.load()) : null;
|
|
67
69
|
}), C(() => Q?.());
|
|
68
70
|
let $ = null;
|
|
69
71
|
S(() => {
|
|
70
|
-
$ =
|
|
72
|
+
$ = oe(() => X.value = !0);
|
|
71
73
|
}), C(() => $?.()), C(() => Y?.stopPolling());
|
|
72
74
|
let ve = t();
|
|
73
|
-
return (e, t) => q.value && D(Y) ? (w(),
|
|
75
|
+
return (e, t) => q.value && D(Y) ? (w(), m(c, {
|
|
74
76
|
key: 0,
|
|
75
77
|
open: X.value,
|
|
76
78
|
"onUpdate:open": t[3] ||= (e) => X.value = e
|
|
77
79
|
}, {
|
|
78
|
-
default: k(() => [
|
|
79
|
-
default: k(() => [W.variant === "sidebar" ? (w(),
|
|
80
|
+
default: k(() => [y(u, { "as-child": "" }, {
|
|
81
|
+
default: k(() => [W.variant === "sidebar" ? (w(), m(o, {
|
|
80
82
|
key: 0,
|
|
81
83
|
type: "button",
|
|
82
84
|
variant: "ghost",
|
|
@@ -85,15 +87,15 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
85
87
|
"data-variant": "sidebar"
|
|
86
88
|
}, {
|
|
87
89
|
default: k(() => [
|
|
88
|
-
|
|
90
|
+
y(D(a), {
|
|
89
91
|
name: "alfakit::panels.topbar.open-database-notifications-button",
|
|
90
92
|
fallback: D(A)
|
|
91
93
|
}, null, 8, ["fallback"]),
|
|
92
|
-
|
|
93
|
-
D(Z).unreadCount > 0 ? (w(),
|
|
94
|
+
_("span", N, E(D(G)("notifications", {}, "Notifications")), 1),
|
|
95
|
+
D(Z).unreadCount > 0 ? (w(), g("span", P, [v(E(D(Z).unreadCount > 99 ? "99+" : D(Z).unreadCount) + " ", 1), _("span", F, E(D(G)("unread_notifications", {}, "unread")), 1)])) : h("", !0)
|
|
94
96
|
]),
|
|
95
97
|
_: 1
|
|
96
|
-
})) : (w(),
|
|
98
|
+
})) : (w(), m(o, {
|
|
97
99
|
key: 1,
|
|
98
100
|
type: "button",
|
|
99
101
|
variant: "ghost",
|
|
@@ -102,19 +104,19 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
102
104
|
"data-slot": "notifications-trigger",
|
|
103
105
|
"aria-label": D(G)("notifications", {}, "Notifications")
|
|
104
106
|
}, {
|
|
105
|
-
default: k(() => [
|
|
107
|
+
default: k(() => [y(D(a), {
|
|
106
108
|
name: "alfakit::panels.topbar.open-database-notifications-button",
|
|
107
109
|
fallback: D(A)
|
|
108
|
-
}, null, 8, ["fallback"]), D(Z).unreadCount > 0 ? (w(),
|
|
110
|
+
}, null, 8, ["fallback"]), D(Z).unreadCount > 0 ? (w(), g("span", I, E(D(Z).unreadCount > 99 ? "99+" : D(Z).unreadCount), 1)) : h("", !0)]),
|
|
109
111
|
_: 1
|
|
110
112
|
}, 8, ["aria-label"]))]),
|
|
111
113
|
_: 1
|
|
112
|
-
}),
|
|
114
|
+
}), y(l, {
|
|
113
115
|
align: W.variant === "sidebar" ? "start" : "end",
|
|
114
116
|
side: W.variant === "sidebar" ? D(_e) === "rtl" ? "left" : "right" : "bottom",
|
|
115
117
|
class: "w-80 p-0 sm:w-96"
|
|
116
118
|
}, {
|
|
117
|
-
default: k(() => [
|
|
119
|
+
default: k(() => [_("div", L, [_("span", R, E(D(G)("notifications", {}, "Notifications")), 1), _("div", z, [D(Z).unreadCount > 0 ? (w(), m(o, {
|
|
118
120
|
key: 0,
|
|
119
121
|
type: "button",
|
|
120
122
|
variant: "ghost",
|
|
@@ -122,9 +124,9 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
122
124
|
title: D(G)("mark_all_read", {}, "Mark all as read"),
|
|
123
125
|
onClick: t[0] ||= (e) => void D(Y).markAllAsRead()
|
|
124
126
|
}, {
|
|
125
|
-
default: k(() => [
|
|
127
|
+
default: k(() => [y(D(j))]),
|
|
126
128
|
_: 1
|
|
127
|
-
}, 8, ["title"])) :
|
|
129
|
+
}, 8, ["title"])) : h("", !0), D(Z).notifications.length > 0 ? (w(), m(o, {
|
|
128
130
|
key: 1,
|
|
129
131
|
type: "button",
|
|
130
132
|
variant: "ghost",
|
|
@@ -132,35 +134,35 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
132
134
|
title: D(G)("clear_notifications", {}, "Clear notifications"),
|
|
133
135
|
onClick: t[1] ||= (e) => void D(Y).clear()
|
|
134
136
|
}, {
|
|
135
|
-
default: k(() => [
|
|
137
|
+
default: k(() => [y(D(M))]),
|
|
136
138
|
_: 1
|
|
137
|
-
}, 8, ["title"])) :
|
|
138
|
-
default: k(() => [D(Z).loading && D(Z).notifications.length === 0 ? (w(),
|
|
139
|
+
}, 8, ["title"])) : h("", !0)])]), y(d, { class: "max-h-96" }, {
|
|
140
|
+
default: k(() => [D(Z).loading && D(Z).notifications.length === 0 ? (w(), g("div", B, [y(s)])) : D(Z).notifications.length === 0 ? (w(), g("p", ue, E(D(G)("no_notifications", {}, "You have no notifications.")), 1)) : (w(), g("ul", V, [(w(!0), g(p, null, T(D(Z).notifications, (e) => (w(), g("li", {
|
|
139
141
|
key: e.id,
|
|
140
|
-
class:
|
|
141
|
-
style:
|
|
142
|
-
}, [e.icon ? (w(),
|
|
142
|
+
class: x(D(n)("flex gap-3 px-3 py-3", !e.readAt && "bg-primary/5")),
|
|
143
|
+
style: ce(e.color ? D(ie)(D(r)(e.color)).item : void 0)
|
|
144
|
+
}, [e.icon ? (w(), m(D(a), {
|
|
143
145
|
key: 0,
|
|
144
146
|
name: e.icon,
|
|
145
|
-
class:
|
|
146
|
-
}, null, 8, ["name", "class"])) :
|
|
147
|
-
|
|
147
|
+
class: x(D(n)("mt-0.5 size-5 shrink-0", e.iconColor && D(i)[e.iconColor]))
|
|
148
|
+
}, null, 8, ["name", "class"])) : h("", !0), _("div", H, [
|
|
149
|
+
_("div", U, [_("p", de, E(e.title), 1), e.readAt ? h("", !0) : (w(), g("button", {
|
|
148
150
|
key: 0,
|
|
149
151
|
type: "button",
|
|
150
152
|
class: "focus-visible:ring-ring/50 -me-2 -mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full outline-none focus-visible:ring-[3px]",
|
|
151
153
|
"aria-label": D(G)("mark_as_read", {}, "Mark as read"),
|
|
152
154
|
onClick: (t) => void D(Y).markAsRead(e.id)
|
|
153
|
-
}, [...t[4] ||= [
|
|
155
|
+
}, [...t[4] ||= [_("span", {
|
|
154
156
|
class: "bg-primary size-2 rounded-full",
|
|
155
157
|
"aria-hidden": "true"
|
|
156
158
|
}, null, -1)]], 8, fe))]),
|
|
157
|
-
e.body ? (w(),
|
|
159
|
+
e.body ? (w(), g("p", {
|
|
158
160
|
key: 0,
|
|
159
161
|
class: "text-muted-foreground text-sm",
|
|
160
162
|
innerHTML: e.body
|
|
161
|
-
}, null, 8, pe)) :
|
|
162
|
-
e.date ? (w(),
|
|
163
|
-
e.actions ? (w(),
|
|
163
|
+
}, null, 8, pe)) : h("", !0),
|
|
164
|
+
e.date ? (w(), g("time", me, E(D(ve).relative(e.date)), 1)) : h("", !0),
|
|
165
|
+
e.actions ? (w(), g("div", he, [(w(!0), g(p, null, T(e.actions, (t) => (w(), m(re, {
|
|
164
166
|
key: t.name,
|
|
165
167
|
action: t,
|
|
166
168
|
"on-mark-as-read": () => void D(Y).markAsRead(e.id),
|
|
@@ -169,23 +171,23 @@ var N = { class: "flex-1 text-start group-data-[collapsible=icon]:sr-only" }, P
|
|
|
169
171
|
"action",
|
|
170
172
|
"on-mark-as-read",
|
|
171
173
|
"on-mark-as-unread"
|
|
172
|
-
]))), 128))])) :
|
|
173
|
-
])], 6))), 128))])), D(Z).hasMore && D(Z).notifications.length > 0 ? (w(),
|
|
174
|
+
]))), 128))])) : h("", !0)
|
|
175
|
+
])], 6))), 128))])), D(Z).hasMore && D(Z).notifications.length > 0 ? (w(), g("div", ge, [y(o, {
|
|
174
176
|
type: "button",
|
|
175
177
|
variant: "ghost",
|
|
176
178
|
size: "sm",
|
|
177
179
|
disabled: D(Z).loading,
|
|
178
180
|
onClick: t[2] ||= (e) => void D(Y).loadMore()
|
|
179
181
|
}, {
|
|
180
|
-
default: k(() => [D(Z).loading ? (w(),
|
|
182
|
+
default: k(() => [D(Z).loading ? (w(), m(s, { key: 0 })) : h("", !0), v(" " + E(D(G)("load_more", {}, "Load more")), 1)]),
|
|
181
183
|
_: 1
|
|
182
|
-
}, 8, ["disabled"])])) :
|
|
184
|
+
}, 8, ["disabled"])])) : h("", !0)]),
|
|
183
185
|
_: 1
|
|
184
186
|
})]),
|
|
185
187
|
_: 1
|
|
186
188
|
}, 8, ["align", "side"])]),
|
|
187
189
|
_: 1
|
|
188
|
-
}, 8, ["open"])) :
|
|
190
|
+
}, 8, ["open"])) : h("", !0);
|
|
189
191
|
}
|
|
190
192
|
});
|
|
191
193
|
//#endregion
|
package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsMenu.vue_vue_type_script_setup_true_lang.js","names":["_unref","_openBlock","_createBlock","Popover","_withCtx","_createVNode","PopoverTrigger","Button","Icon","_createElementVNode","_toDisplayString","_createElementBlock","_createTextVNode","_createCommentVNode","PopoverContent","ScrollArea","Spinner","_Fragment","_renderList","_normalizeClass","_normalizeStyle","NotificationActionButton","Icon_default","Button_default","Spinner_default","NotificationActionButton_default","Popover_default","PopoverContent_default","PopoverTrigger_default","ScrollArea_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","NotificationsMenu_vue_vue_type_script_setup_true_lang_default","props","__props","t","useT","direction","useDirection","panel","usePanel","config","computed","endpoints","center","NotificationCenter","open","ref","state","useStore","onMounted","interval","watch","isOpen","stopListening","onDatabaseNotificationsSent","onScopeDispose","stopOpenListener","onOpenDatabaseNotifications","format","useFormatter","unref","openBlock","createBlock","_cache","$event","withCtx","createVNode","BellIcon","createElementVNode","toDisplayString","createElementBlock","createTextVNode","createCommentVNode","CheckCheckIcon","Trash2Icon","Fragment","renderList","notification","normalizeClass","cn","normalizeStyle","notificationTintStyles","cssColor","textColorClasses","action"],"sources":["../../../src/components/notifications/NotificationsMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n NotificationCenter,\n notificationTintStyles,\n onDatabaseNotificationsSent,\n onOpenDatabaseNotifications,\n} from '@alfakit/core'\nimport { BellIcon, CheckCheckIcon, Trash2Icon } from '@lucide/vue'\nimport { computed, onMounted, onScopeDispose, ref, watch } from 'vue'\nimport { useStore } from '../../composables/use-store'\nimport { useDirection, useFormatter, usePanel, useT } from '../../context'\nimport { cssColor, textColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport Button from '../ui/Button.vue'\nimport Popover from '../ui/Popover.vue'\nimport PopoverContent from '../ui/PopoverContent.vue'\nimport PopoverTrigger from '../ui/PopoverTrigger.vue'\nimport ScrollArea from '../ui/ScrollArea.vue'\nimport Spinner from '../ui/Spinner.vue'\nimport NotificationActionButton from './NotificationActionButton.vue'\n\n/**\n * Bell menu for database notifications. It also opens when something calls\n * `openDatabaseNotifications()` (or an action with `->openDatabaseNotifications()`).\n * `variant=\"sidebar\"`: a full-width row with a label, for layouts that put it in the sidebar.\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), {\n variant: 'topbar',\n})\nconst t = useT()\nconst direction = useDirection()\nconst panel = usePanel()\nconst config = computed(() => panel.value.databaseNotifications)\nconst endpoints = panel.value.endpoints\n\nconst center =\n endpoints.notifications && endpoints.notificationsReadAll && endpoints.notificationsDestroyAll\n ? new NotificationCenter(\n {\n notifications: endpoints.notifications,\n notificationsReadAll: endpoints.notificationsReadAll,\n notificationsDestroyAll: endpoints.notificationsDestroyAll,\n },\n config.value?.unreadCount ?? 0,\n )\n : null\n\nconst open = ref(false)\nconst state = useStore(\n center?.store ?? {\n get: () => ({ notifications: [], unreadCount: 0, loading: false, hasMore: false, page: 0 }),\n subscribe: () => () => {},\n },\n)\n\n// Polling starts in the browser only: a server render must not leave timers behind.\nonMounted(() => {\n watch(\n () => config.value?.pollingInterval,\n (interval) => center?.startPolling(interval),\n { immediate: true },\n )\n})\n\nwatch(open, (isOpen) => {\n if (isOpen) void center?.load()\n})\n\n// Realtime notifications announce stored ones, so the unread count updates right away.\nlet stopListening: (() => void) | null = null\nonMounted(() => {\n stopListening = center ? onDatabaseNotificationsSent(() => void center.load()) : null\n})\nonScopeDispose(() => stopListening?.())\n\n// `openDatabaseNotifications()`: opened from code or an action.\nlet stopOpenListener: (() => void) | null = null\nonMounted(() => {\n stopOpenListener = onOpenDatabaseNotifications(() => (open.value = true))\n})\nonScopeDispose(() => stopOpenListener?.())\n\nonScopeDispose(() => center?.stopPolling())\nconst format = useFormatter()\n</script>\n\n<template>\n <Popover v-if=\"config && center\" :open=\"open\" @update:open=\"open = $event\">\n <PopoverTrigger as-child>\n <Button\n v-if=\"props.variant === 'sidebar'\"\n type=\"button\"\n variant=\"ghost\"\n class=\"relative w-full justify-start gap-2 group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-0\"\n data-slot=\"notifications-trigger\"\n data-variant=\"sidebar\"\n >\n <!-- In a collapsed (icon) sidebar only the bell and its badge stay visible. -->\n <Icon\n name=\"alfakit::panels.topbar.open-database-notifications-button\"\n :fallback=\"BellIcon\"\n />\n <span class=\"flex-1 text-start group-data-[collapsible=icon]:sr-only\">{{\n t('notifications', {}, 'Notifications')\n }}</span>\n <span\n v-if=\"state.unreadCount > 0\"\n class=\"bg-primary text-primary-foreground flex h-5 min-w-5 items-center justify-center rounded-full px-1 text-xs font-medium group-data-[collapsible=icon]:absolute group-data-[collapsible=icon]:-end-1 group-data-[collapsible=icon]:-top-1 group-data-[collapsible=icon]:h-4 group-data-[collapsible=icon]:min-w-4 group-data-[collapsible=icon]:text-[10px]\"\n >{{ state.unreadCount > 99 ? '99+' : state.unreadCount }}\n <span class=\"sr-only\">{{ t('unread_notifications', {}, 'unread') }}</span></span\n >\n </Button>\n <Button\n v-else\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n class=\"relative\"\n data-slot=\"notifications-trigger\"\n :aria-label=\"t('notifications', {}, 'Notifications')\"\n >\n <Icon\n name=\"alfakit::panels.topbar.open-database-notifications-button\"\n :fallback=\"BellIcon\"\n />\n <span\n v-if=\"state.unreadCount > 0\"\n class=\"bg-primary text-primary-foreground absolute -end-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-medium\"\n >{{ state.unreadCount > 99 ? '99+' : state.unreadCount }}</span\n >\n </Button>\n </PopoverTrigger>\n <PopoverContent\n :align=\"props.variant === 'sidebar' ? 'start' : 'end'\"\n :side=\"props.variant === 'sidebar' ? (direction === 'rtl' ? 'left' : 'right') : 'bottom'\"\n class=\"w-80 p-0 sm:w-96\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <span class=\"text-sm font-semibold\">{{ t('notifications', {}, 'Notifications') }}</span>\n <div class=\"flex items-center gap-1\">\n <Button\n v-if=\"state.unreadCount > 0\"\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :title=\"t('mark_all_read', {}, 'Mark all as read')\"\n @click=\"void center.markAllAsRead()\"\n ><CheckCheckIcon\n /></Button>\n <Button\n v-if=\"state.notifications.length > 0\"\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :title=\"t('clear_notifications', {}, 'Clear notifications')\"\n @click=\"void center.clear()\"\n ><Trash2Icon\n /></Button>\n </div>\n </div>\n <ScrollArea class=\"max-h-96\">\n <div\n v-if=\"state.loading && state.notifications.length === 0\"\n class=\"flex justify-center py-8\"\n >\n <Spinner />\n </div>\n <p\n v-else-if=\"state.notifications.length === 0\"\n class=\"text-muted-foreground px-3 py-8 text-center text-sm\"\n >\n {{ t('no_notifications', {}, 'You have no notifications.') }}\n </p>\n <ul v-else class=\"divide-y\">\n <li\n v-for=\"notification in state.notifications\"\n :key=\"notification.id\"\n :class=\"cn('flex gap-3 px-3 py-3', !notification.readAt && 'bg-primary/5')\"\n :style=\"\n notification.color\n ? notificationTintStyles(cssColor(notification.color)).item\n : undefined\n \"\n >\n <Icon\n v-if=\"notification.icon\"\n :name=\"notification.icon\"\n :class=\"\n cn(\n 'mt-0.5 size-5 shrink-0',\n notification.iconColor && textColorClasses[notification.iconColor],\n )\n \"\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex items-start justify-between gap-2\">\n <p class=\"text-sm font-medium\">{{ notification.title }}</p>\n <button\n v-if=\"!notification.readAt\"\n type=\"button\"\n class=\"focus-visible:ring-ring/50 -me-2 -mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full outline-none focus-visible:ring-[3px]\"\n :aria-label=\"t('mark_as_read', {}, 'Mark as read')\"\n @click=\"void center.markAsRead(notification.id)\"\n >\n <span class=\"bg-primary size-2 rounded-full\" aria-hidden=\"true\" />\n </button>\n </div>\n <p\n v-if=\"notification.body\"\n class=\"text-muted-foreground text-sm\"\n v-html=\"notification.body\"\n />\n <time v-if=\"notification.date\" class=\"text-muted-foreground text-xs\">{{\n format.relative(notification.date)\n }}</time>\n <div v-if=\"notification.actions\" class=\"flex flex-wrap gap-1\">\n <NotificationActionButton\n v-for=\"action in notification.actions\"\n :key=\"action.name\"\n :action=\"action\"\n :on-mark-as-read=\"() => void center!.markAsRead(notification.id)\"\n :on-mark-as-unread=\"() => void center!.markAsUnread(notification.id)\"\n />\n </div>\n </div>\n </li>\n </ul>\n <div\n v-if=\"state.hasMore && state.notifications.length > 0\"\n class=\"flex justify-center border-t p-2\"\n >\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n :disabled=\"state.loading\"\n @click=\"void center!.loadMore()\"\n >\n <Spinner v-if=\"state.loading\" />\n {{ t('load_more', {}, 'Load more') }}\n </Button>\n </div>\n </ScrollArea>\n </PopoverContent>\n </Popover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,IAAMiD,IAAQC,GAGRC,IAAIC,GAAK,GACTC,KAAYC,EAAa,GACzBC,IAAQC,GAAS,GACjBC,IAASC,SAAeH,EAAM,MAAM,qBAAqB,GACzDI,IAAYJ,EAAM,MAAM,WAExBK,IACJD,EAAU,iBAAiBA,EAAU,wBAAwBA,EAAU,0BACnE,IAAIE,GACF;GACE,eAAeF,EAAU;GACzB,sBAAsBA,EAAU;GAChC,yBAAyBA,EAAU;EACrC,GACAF,EAAO,OAAO,eAAe,CAC/B,IACA,MAEAK,IAAOC,GAAI,EAAK,GAChBC,IAAQC,EACZL,GAAQ,SAAS;GACf,YAAY;IAAE,eAAe,CAAC;IAAG,aAAa;IAAG,SAAS;IAAO,SAAS;IAAO,MAAM;GAAE;GACzF,uBAAuB,CAAC;EAC1B,CACF;EAWA,AARAM,QAAgB;GACd,QACQT,EAAO,OAAO,kBACnB,MAAaG,GAAQ,aAAaO,CAAQ,GAC3C,EAAE,WAAW,GAAK,CACpB;EACF,CAAC,GAEDC,EAAMN,IAAO,MAAW;GACtB,AAAIO,KAAQT,GAAa,KAAK;EAChC,CAAC;EAGD,IAAIU,IAAqC;EAIzC,AAHAJ,QAAgB;GACd,IAAgBN,IAASW,SAAkC,KAAKX,EAAO,KAAK,CA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AE,WAAWkC,EAAa,EAAE;OAC9D,2BAAiB,KAAa9F,EAAA4D,CAAA,CAAM,CAAE,aAAakC,EAAa,EAAE;;;;;;aAOrE9F,GAAAA,GAAAA,EAAAA,CAAAA,IAAAA,EAAAgE,CAAA,CAAK,CAAC,WAAWhE,EAAAgE,CAAA,CAAK,CAAC,cAAc,SAAM,KADnD/D,EAAA,GAAAU,EAcM,OAdNoC,IAcM,CAVJ1C,EASSE,GAAA;MARP,MAAK;MACL,SAAQ;MACR,MAAK;MACJ,UAAUP,EAAAgE,CAAA,CAAK,CAAC;MAChB,SAAK,AAAAgB,EAAA,QAAA,MAAA,KAAOhF,EAAA4D,CAAA,CAAM,CAAE,SAAQ;;MAE7B,SAAAxD,QAAgC,CAAjBJ,EAAAgE,CAAA,CAAK,CAAC,WAArB/D,EAAA,GAAAC,EAAgCc,GAAA,EAAA,KAAA,EAAA,CAAA,KAAAyE,EAAA,IAAA,EAAA,GAAA7E,EAAA,MAChCF,EAAGV,EAAAmD,CAAA,CAAC,CAAA,aAAA,CAAA,GAAA,WAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"NotificationsMenu.vue_vue_type_script_setup_true_lang.js","names":["_unref","_openBlock","_createBlock","Popover","_withCtx","_createVNode","PopoverTrigger","Button","Icon","_createElementVNode","_toDisplayString","_createElementBlock","_createTextVNode","_createCommentVNode","PopoverContent","ScrollArea","Spinner","_Fragment","_renderList","_normalizeClass","_normalizeStyle","NotificationActionButton","Icon_default","Button_default","Spinner_default","NotificationActionButton_default","Popover_default","PopoverContent_default","PopoverTrigger_default","ScrollArea_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","NotificationsMenu_vue_vue_type_script_setup_true_lang_default","props","__props","t","useT","direction","useDirection","panel","usePanel","config","computed","endpoints","center","NotificationCenter","open","ref","state","useStore","onMounted","interval","watch","isOpen","count","stopListening","onDatabaseNotificationsSent","onScopeDispose","stopOpenListener","onOpenDatabaseNotifications","format","useFormatter","unref","openBlock","createBlock","_cache","$event","withCtx","createVNode","BellIcon","createElementVNode","toDisplayString","createElementBlock","createTextVNode","createCommentVNode","CheckCheckIcon","Trash2Icon","Fragment","renderList","notification","normalizeClass","cn","normalizeStyle","notificationTintStyles","cssColor","textColorClasses","action"],"sources":["../../../src/components/notifications/NotificationsMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n NotificationCenter,\n notificationTintStyles,\n onDatabaseNotificationsSent,\n onOpenDatabaseNotifications,\n} from '@alfakit/core'\nimport { BellIcon, CheckCheckIcon, Trash2Icon } from '@lucide/vue'\nimport { computed, onMounted, onScopeDispose, ref, watch } from 'vue'\nimport { useStore } from '../../composables/use-store'\nimport { useDirection, useFormatter, usePanel, useT } from '../../context'\nimport { cssColor, textColorClasses } from '../../lib/colors'\nimport { Icon } from '../../lib/icons'\nimport { cn } from '../../lib/utils'\nimport Button from '../ui/Button.vue'\nimport Popover from '../ui/Popover.vue'\nimport PopoverContent from '../ui/PopoverContent.vue'\nimport PopoverTrigger from '../ui/PopoverTrigger.vue'\nimport ScrollArea from '../ui/ScrollArea.vue'\nimport Spinner from '../ui/Spinner.vue'\nimport NotificationActionButton from './NotificationActionButton.vue'\n\n/**\n * Bell menu for database notifications. It also opens when something calls\n * `openDatabaseNotifications()` (or an action with `->openDatabaseNotifications()`).\n * `variant=\"sidebar\"`: a full-width row with a label, for layouts that put it in the sidebar.\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), {\n variant: 'topbar',\n})\nconst t = useT()\nconst direction = useDirection()\nconst panel = usePanel()\nconst config = computed(() => panel.value.databaseNotifications)\nconst endpoints = panel.value.endpoints\n\nconst center =\n endpoints.notifications && endpoints.notificationsReadAll && endpoints.notificationsDestroyAll\n ? new NotificationCenter(\n {\n notifications: endpoints.notifications,\n notificationsReadAll: endpoints.notificationsReadAll,\n notificationsDestroyAll: endpoints.notificationsDestroyAll,\n },\n config.value?.unreadCount ?? 0,\n )\n : null\n\nconst open = ref(false)\nconst state = useStore(\n center?.store ?? {\n get: () => ({ notifications: [], unreadCount: 0, loading: false, hasMore: false, page: 0 }),\n subscribe: () => () => {},\n },\n)\n\n// Polling starts in the browser only: a server render must not leave timers behind.\nonMounted(() => {\n watch(\n () => config.value?.pollingInterval,\n (interval) => center?.startPolling(interval),\n { immediate: true },\n )\n})\n\nwatch(open, (isOpen) => {\n if (isOpen) void center?.load()\n})\n\n// Every visit brings the server's unread count (another user after impersonating, or\n// notifications read in another tab): follow it instead of waiting for the next poll.\nwatch(\n () => config.value?.unreadCount,\n (count) => {\n if (center && typeof count === 'number' && count !== center.store.get().unreadCount) {\n center.store.update({ unreadCount: count })\n }\n },\n)\n\n// Realtime notifications announce stored ones, so the unread count updates right away.\nlet stopListening: (() => void) | null = null\nonMounted(() => {\n stopListening = center ? onDatabaseNotificationsSent(() => void center.load()) : null\n})\nonScopeDispose(() => stopListening?.())\n\n// `openDatabaseNotifications()`: opened from code or an action.\nlet stopOpenListener: (() => void) | null = null\nonMounted(() => {\n stopOpenListener = onOpenDatabaseNotifications(() => (open.value = true))\n})\nonScopeDispose(() => stopOpenListener?.())\n\nonScopeDispose(() => center?.stopPolling())\nconst format = useFormatter()\n</script>\n\n<template>\n <Popover v-if=\"config && center\" :open=\"open\" @update:open=\"open = $event\">\n <PopoverTrigger as-child>\n <Button\n v-if=\"props.variant === 'sidebar'\"\n type=\"button\"\n variant=\"ghost\"\n class=\"relative w-full justify-start gap-2 group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:p-0\"\n data-slot=\"notifications-trigger\"\n data-variant=\"sidebar\"\n >\n <!-- In a collapsed (icon) sidebar only the bell and its badge stay visible. -->\n <Icon\n name=\"alfakit::panels.topbar.open-database-notifications-button\"\n :fallback=\"BellIcon\"\n />\n <span class=\"flex-1 text-start group-data-[collapsible=icon]:sr-only\">{{\n t('notifications', {}, 'Notifications')\n }}</span>\n <span\n v-if=\"state.unreadCount > 0\"\n class=\"bg-primary text-primary-foreground flex h-5 min-w-5 items-center justify-center rounded-full px-1 text-xs font-medium group-data-[collapsible=icon]:absolute group-data-[collapsible=icon]:-end-1 group-data-[collapsible=icon]:-top-1 group-data-[collapsible=icon]:h-4 group-data-[collapsible=icon]:min-w-4 group-data-[collapsible=icon]:text-[10px]\"\n >{{ state.unreadCount > 99 ? '99+' : state.unreadCount }}\n <span class=\"sr-only\">{{ t('unread_notifications', {}, 'unread') }}</span></span\n >\n </Button>\n <Button\n v-else\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n class=\"relative\"\n data-slot=\"notifications-trigger\"\n :aria-label=\"t('notifications', {}, 'Notifications')\"\n >\n <Icon\n name=\"alfakit::panels.topbar.open-database-notifications-button\"\n :fallback=\"BellIcon\"\n />\n <span\n v-if=\"state.unreadCount > 0\"\n class=\"bg-primary text-primary-foreground absolute -end-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-medium\"\n >{{ state.unreadCount > 99 ? '99+' : state.unreadCount }}</span\n >\n </Button>\n </PopoverTrigger>\n <PopoverContent\n :align=\"props.variant === 'sidebar' ? 'start' : 'end'\"\n :side=\"props.variant === 'sidebar' ? (direction === 'rtl' ? 'left' : 'right') : 'bottom'\"\n class=\"w-80 p-0 sm:w-96\"\n >\n <div class=\"flex items-center justify-between border-b px-3 py-2\">\n <span class=\"text-sm font-semibold\">{{ t('notifications', {}, 'Notifications') }}</span>\n <div class=\"flex items-center gap-1\">\n <Button\n v-if=\"state.unreadCount > 0\"\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :title=\"t('mark_all_read', {}, 'Mark all as read')\"\n @click=\"void center.markAllAsRead()\"\n ><CheckCheckIcon\n /></Button>\n <Button\n v-if=\"state.notifications.length > 0\"\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n :title=\"t('clear_notifications', {}, 'Clear notifications')\"\n @click=\"void center.clear()\"\n ><Trash2Icon\n /></Button>\n </div>\n </div>\n <ScrollArea class=\"max-h-96\">\n <div\n v-if=\"state.loading && state.notifications.length === 0\"\n class=\"flex justify-center py-8\"\n >\n <Spinner />\n </div>\n <p\n v-else-if=\"state.notifications.length === 0\"\n class=\"text-muted-foreground px-3 py-8 text-center text-sm\"\n >\n {{ t('no_notifications', {}, 'You have no notifications.') }}\n </p>\n <ul v-else class=\"divide-y\">\n <li\n v-for=\"notification in state.notifications\"\n :key=\"notification.id\"\n :class=\"cn('flex gap-3 px-3 py-3', !notification.readAt && 'bg-primary/5')\"\n :style=\"\n notification.color\n ? notificationTintStyles(cssColor(notification.color)).item\n : undefined\n \"\n >\n <Icon\n v-if=\"notification.icon\"\n :name=\"notification.icon\"\n :class=\"\n cn(\n 'mt-0.5 size-5 shrink-0',\n notification.iconColor && textColorClasses[notification.iconColor],\n )\n \"\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex items-start justify-between gap-2\">\n <p class=\"text-sm font-medium\">{{ notification.title }}</p>\n <button\n v-if=\"!notification.readAt\"\n type=\"button\"\n class=\"focus-visible:ring-ring/50 -me-2 -mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full outline-none focus-visible:ring-[3px]\"\n :aria-label=\"t('mark_as_read', {}, 'Mark as read')\"\n @click=\"void center.markAsRead(notification.id)\"\n >\n <span class=\"bg-primary size-2 rounded-full\" aria-hidden=\"true\" />\n </button>\n </div>\n <p\n v-if=\"notification.body\"\n class=\"text-muted-foreground text-sm\"\n v-html=\"notification.body\"\n />\n <time v-if=\"notification.date\" class=\"text-muted-foreground text-xs\">{{\n format.relative(notification.date)\n }}</time>\n <div v-if=\"notification.actions\" class=\"flex flex-wrap gap-1\">\n <NotificationActionButton\n v-for=\"action in notification.actions\"\n :key=\"action.name\"\n :action=\"action\"\n :on-mark-as-read=\"() => void center!.markAsRead(notification.id)\"\n :on-mark-as-unread=\"() => void center!.markAsUnread(notification.id)\"\n />\n </div>\n </div>\n </li>\n </ul>\n <div\n v-if=\"state.hasMore && state.notifications.length > 0\"\n class=\"flex justify-center border-t p-2\"\n >\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n :disabled=\"state.loading\"\n @click=\"void center!.loadMore()\"\n >\n <Spinner v-if=\"state.loading\" />\n {{ t('load_more', {}, 'Load more') }}\n </Button>\n </div>\n </ScrollArea>\n </PopoverContent>\n </Popover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BA,IAAMiD,IAAQC,GAGRC,IAAIC,GAAK,GACTC,KAAYC,EAAa,GACzBC,IAAQC,GAAS,GACjBC,IAASC,SAAeH,EAAM,MAAM,qBAAqB,GACzDI,IAAYJ,EAAM,MAAM,WAExBK,IACJD,EAAU,iBAAiBA,EAAU,wBAAwBA,EAAU,0BACnE,IAAIE,EACF;GACE,eAAeF,EAAU;GACzB,sBAAsBA,EAAU;GAChC,yBAAyBA,EAAU;EACrC,GACAF,EAAO,OAAO,eAAe,CAC/B,IACA,MAEAK,IAAOC,GAAI,EAAK,GAChBC,IAAQC,GACZL,GAAQ,SAAS;GACf,YAAY;IAAE,eAAe,CAAC;IAAG,aAAa;IAAG,SAAS;IAAO,SAAS;IAAO,MAAM;GAAE;GACzF,uBAAuB,CAAC;EAC1B,CACF;EAiBA,AAdAM,QAAgB;GACd,QACQT,EAAO,OAAO,kBACnB,MAAaG,GAAQ,aAAaO,CAAQ,GAC3C,EAAE,WAAW,GAAK,CACpB;EACF,CAAC,GAEDC,EAAMN,IAAO,MAAW;GACtB,AAAIO,KAAQT,GAAa,KAAK;EAChC,CAAC,GAIDQ,QACQX,EAAO,OAAO,cACnB,MAAU;GACT,AAAIG,KAAU,OAAOU,KAAU,YAAYA,MAAUV,EAA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AQM,EAPJ7C,EAAA,EAAA,GAAAU,EAMEM,GAAA,MAAAC,EALiB6E,EAAa,UAAvB,OADT9F,EAAA,GAAAC,EAMEmB,IAAA;OAJC,KAAKiF,EAAO;OACJ;OACR,yBAAe,KAAatG,EAAA4D,CAAA,CAAM,CAAE,WAAWmC,EAAa,EAAE;OAC9D,2BAAiB,KAAa/F,EAAA4D,CAAA,CAAM,CAAE,aAAamC,EAAa,EAAE;;;;;;aAOrE/F,GAAAA,GAAAA,EAAAA,CAAAA,IAAAA,EAAAgE,CAAA,CAAK,CAAC,WAAWhE,EAAAgE,CAAA,CAAK,CAAC,cAAc,SAAM,KADnD/D,EAAA,GAAAU,EAcM,OAdNoC,IAcM,CAVJ1C,EASSE,GAAA;MARP,MAAK;MACL,SAAQ;MACR,MAAK;MACJ,UAAUP,EAAAgE,CAAA,CAAK,CAAC;MAChB,SAAK,AAAAiB,EAAA,QAAA,MAAA,KAAOjF,EAAA4D,CAAA,CAAM,CAAE,SAAQ;;MAE7B,SAAAxD,QAAgC,CAAjBJ,EAAAgE,CAAA,CAAK,CAAC,WAArB/D,EAAA,GAAAC,EAAgCc,GAAA,EAAA,KAAA,EAAA,CAAA,KAAA0E,EAAA,IAAA,EAAA,GAAA9E,EAAA,MAChCF,EAAGV,EAAAmD,CAAA,CAAC,CAAA,aAAA,CAAA,GAAA,WAAA,CAAA,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -12,10 +12,10 @@ import oe from "../ui/Tabs.js";
|
|
|
12
12
|
import o from "../ui/TabsContent.js";
|
|
13
13
|
import s from "../ui/TabsList.js";
|
|
14
14
|
import c from "../ui/TabsTrigger.js";
|
|
15
|
-
import l from "../ui/
|
|
16
|
-
import u from "../ui/
|
|
17
|
-
import d from "../ui/
|
|
18
|
-
import f from "../ui/
|
|
15
|
+
import l from "../ui/Collapsible.js";
|
|
16
|
+
import u from "../ui/CollapsibleContent.js";
|
|
17
|
+
import d from "../ui/CollapsibleTrigger.js";
|
|
18
|
+
import f from "../ui/ScrollArea.js";
|
|
19
19
|
import p from "./DebugFormState.js";
|
|
20
20
|
import m from "./DebugTreeNode.js";
|
|
21
21
|
import { byteLength as se, debugRecorder as h, formatBytes as g } from "@alfakit/core";
|
|
@@ -132,7 +132,7 @@ var N = {
|
|
|
132
132
|
})
|
|
133
133
|
]),
|
|
134
134
|
_: 1
|
|
135
|
-
}), w(
|
|
135
|
+
}), w(f, { class: "min-h-0 flex-1" }, {
|
|
136
136
|
default: A(() => [
|
|
137
137
|
w(o, {
|
|
138
138
|
value: "schema",
|
|
@@ -167,11 +167,11 @@ var N = {
|
|
|
167
167
|
}, {
|
|
168
168
|
default: A(() => [C(O(k(J)("debug.clear", {}, "Clear")), 1)]),
|
|
169
169
|
_: 1
|
|
170
|
-
})]), (E(!0), x(_, null, D(k(Z).requests, (e) => (E(), y(
|
|
170
|
+
})]), (E(!0), x(_, null, D(k(Z).requests, (e) => (E(), y(l, {
|
|
171
171
|
key: e.id,
|
|
172
172
|
class: "rounded-md border"
|
|
173
173
|
}, {
|
|
174
|
-
default: A(() => [w(
|
|
174
|
+
default: A(() => [w(d, { class: "flex w-full items-center gap-2 px-3 py-2 text-start [&[data-state=open]>svg]:rotate-90" }, {
|
|
175
175
|
default: A(() => [
|
|
176
176
|
w(k(M), { class: "text-muted-foreground size-3.5 shrink-0 transition-transform rtl:rotate-180" }),
|
|
177
177
|
S("span", V, O(e.method), 1),
|
|
@@ -189,7 +189,7 @@ var N = {
|
|
|
189
189
|
S("span", U, O(e.duration) + " ms", 1)
|
|
190
190
|
]),
|
|
191
191
|
_: 2
|
|
192
|
-
}, 1024), w(
|
|
192
|
+
}, 1024), w(u, { class: "space-y-2 border-t px-3 py-2" }, {
|
|
193
193
|
default: A(() => [
|
|
194
194
|
S("dl", W, [
|
|
195
195
|
S("dt", null, O(k(J)("debug.duration", {}, "Duration")), 1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugPanel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Sheet","_withCtx","_createVNode","SheetTrigger","Button","_unref","SheetContent","_createElementVNode","SheetHeader","SheetTitle","_createTextVNode","_toDisplayString","SheetDescription","Tabs","TabsList","TabsTrigger","_createElementBlock","_createCommentVNode","ScrollArea","TabsContent","_Fragment","_renderList","DebugTreeNode","DebugFormState","Collapsible","CollapsibleTrigger","Badge","CollapsibleContent","Badge_default","Button_default","Sheet_default","SheetContent_default","SheetDescription_default","SheetHeader_default","SheetTitle_default","SheetTrigger_default","Tabs_default","TabsContent_default","TabsList_default","TabsTrigger_default","ScrollArea_default","Collapsible_default","CollapsibleContent_default","CollapsibleTrigger_default","DebugFormState_default","DebugTreeNode_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","DebugPanel_vue_vue_type_script_setup_true_lang_default","t","useT","props","useAlfakitProps","direction","useDirection","debug","computed","state","useStore","debugRecorder","payloadBytes","byteLength","json","value","pathOf","parsed","url","forms","openBlock","createBlock","withCtx","createVNode","unref","BugIcon","createElementVNode","createTextVNode","toDisplayString","createElementBlock","createCommentVNode","Fragment","renderList","node","index","_cache","request","ChevronRightIcon","formatBytes","closure","item"],"sources":["../../../src/components/panel/DebugPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { FormStore } from '@alfakit/core'\nimport { byteLength, debugRecorder, formatBytes } from '@alfakit/core'\nimport { BugIcon, ChevronRightIcon } from '@lucide/vue'\nimport { computed } from 'vue'\nimport { useStore } from '../../composables/use-store'\nimport { useAlfakitProps, useDirection, useT } from '../../context'\nimport Badge from '../ui/Badge.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport ScrollArea from '../ui/ScrollArea.vue'\nimport Sheet from '../ui/Sheet.vue'\nimport SheetContent from '../ui/SheetContent.vue'\nimport SheetDescription from '../ui/SheetDescription.vue'\nimport SheetHeader from '../ui/SheetHeader.vue'\nimport SheetTitle from '../ui/SheetTitle.vue'\nimport SheetTrigger from '../ui/SheetTrigger.vue'\nimport Tabs from '../ui/Tabs.vue'\nimport TabsContent from '../ui/TabsContent.vue'\nimport TabsList from '../ui/TabsList.vue'\nimport TabsTrigger from '../ui/TabsTrigger.vue'\nimport DebugFormState from './DebugFormState.vue'\nimport DebugTreeNode from './DebugTreeNode.vue'\n\n/**\n * The developer debug panel: a top bar toggle that opens a drawer with the page's resolved\n * schema tree (visibility and authorisation per component, closures evaluated), the live\n * form state, the internal requests captured by `requestJson()` and timings. Rendered only\n * when the page carries the `alfakitDebug` prop, which PHP adds while `Panel::debugPanel()`\n * is active and `app.debug` is on. Replace it with `components: { 'panel:debug-panel': … }`.\n */\nconst t = useT()\nconst props = useAlfakitProps()\nconst direction = useDirection()\nconst debug = computed(() => props.value.alfakitDebug)\nconst state = useStore(debugRecorder.store)\nconst payloadBytes = computed(() => byteLength(props.value))\n\nconst json = (value: unknown): string => {\n try {\n return typeof value === 'string' ? value : JSON.stringify(value, null, 2)\n } catch {\n return String(value)\n }\n}\n\nconst pathOf = (url: string): string => {\n try {\n const parsed = new URL(url, 'http://localhost')\n\n return parsed.pathname + parsed.search\n } catch {\n return url\n }\n}\n\nconst forms = computed(() => state.value.forms as FormStore[])\n</script>\n\n<template>\n <Sheet v-if=\"debug\">\n <SheetTrigger as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n :aria-label=\"t('debug.open', {}, 'Open debug panel')\"\n data-slot=\"debug-toggle\"\n >\n <BugIcon />\n </Button>\n </SheetTrigger>\n <SheetContent\n :side=\"direction === 'rtl' ? 'left' : 'right'\"\n class=\"flex w-full flex-col gap-0 p-0 sm:max-w-xl\"\n >\n <div data-slot=\"debug-panel\" class=\"flex min-h-0 flex-1 flex-col\">\n <SheetHeader class=\"border-b\">\n <SheetTitle class=\"flex items-center gap-2\">\n <BugIcon class=\"size-4\" />\n {{ t('debug.title', {}, 'Debug') }}\n </SheetTitle>\n <SheetDescription class=\"truncate font-mono text-xs\" :title=\"debug.page\">\n {{ debug.page }}\n </SheetDescription>\n </SheetHeader>\n <Tabs default-value=\"schema\" class=\"flex min-h-0 flex-1 flex-col gap-0\">\n <TabsList class=\"mx-4 mt-3 grid w-auto grid-cols-4\">\n <TabsTrigger value=\"schema\">{{ t('debug.schema', {}, 'Schema') }}</TabsTrigger>\n <TabsTrigger value=\"form\">\n {{ t('debug.form', {}, 'Form') }}\n <span\n v-if=\"forms.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ forms.length }}</span\n >\n </TabsTrigger>\n <TabsTrigger value=\"requests\">\n {{ t('debug.requests', {}, 'Requests') }}\n <span\n v-if=\"state.requests.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ state.requests.length }}</span\n >\n </TabsTrigger>\n <TabsTrigger value=\"timings\">{{ t('debug.timings', {}, 'Timings') }}</TabsTrigger>\n </TabsList>\n <ScrollArea class=\"min-h-0 flex-1\">\n <TabsContent value=\"schema\" class=\"p-4 text-sm\">\n <p v-if=\"debug.tree.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_tree', {}, 'The server sent no schema tree for this page.') }}\n </p>\n <ul v-else class=\"space-y-0.5 font-mono text-xs\">\n <DebugTreeNode\n v-for=\"(node, index) in debug.tree\"\n :key=\"`${node.key ?? node.type}-${index}`\"\n :node=\"node\"\n :depth=\"0\"\n />\n </ul>\n </TabsContent>\n <TabsContent value=\"form\" class=\"space-y-4 p-4 text-sm\">\n <p v-if=\"forms.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_forms', {}, 'No forms on this page.') }}\n </p>\n <DebugFormState v-for=\"(form, index) in forms\" :key=\"index\" :form=\"form\" />\n </TabsContent>\n <TabsContent value=\"requests\" class=\"space-y-2 p-4 text-sm\">\n <p v-if=\"state.requests.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_requests', {}, 'No internal requests yet.') }}\n </p>\n <template v-else>\n <div class=\"flex justify-end\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n @click=\"debugRecorder.clearRequests()\"\n >\n {{ t('debug.clear', {}, 'Clear') }}\n </Button>\n </div>\n <Collapsible\n v-for=\"request in state.requests\"\n :key=\"request.id\"\n class=\"rounded-md border\"\n >\n <CollapsibleTrigger\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start [&[data-state=open]>svg]:rotate-90\"\n >\n <ChevronRightIcon\n class=\"text-muted-foreground size-3.5 shrink-0 transition-transform rtl:rotate-180\"\n />\n <span class=\"font-mono text-xs font-semibold\">{{ request.method }}</span>\n <span class=\"min-w-0 flex-1 truncate font-mono text-xs\" :title=\"request.url\">{{\n pathOf(request.url)\n }}</span>\n <Badge\n :variant=\"\n request.status === 0 || request.status >= 400 ? 'destructive' : 'secondary'\n \"\n class=\"font-mono\"\n >{{\n request.status === 0 ? t('debug.failed', {}, 'failed') : request.status\n }}</Badge\n >\n <span class=\"text-muted-foreground font-mono text-xs tabular-nums\"\n >{{ request.duration }} ms</span\n >\n </CollapsibleTrigger>\n <CollapsibleContent class=\"space-y-2 border-t px-3 py-2\">\n <dl\n class=\"text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-xs\"\n >\n <dt>{{ t('debug.duration', {}, 'Duration') }}</dt>\n <dd class=\"font-mono tabular-nums\">\n {{ request.duration }} ms\n <template v-if=\"request.serverDuration !== null\">\n ({{ t('debug.server_time', {}, 'Server time') }}:\n {{ request.serverDuration }} ms)\n </template>\n </dd>\n <dt>{{ t('debug.size', {}, 'Size') }}</dt>\n <dd class=\"font-mono tabular-nums\">\n ↑ {{ formatBytes(request.requestBytes) }} · ↓\n {{ formatBytes(request.responseBytes) }}\n </dd>\n </dl>\n <pre\n v-if=\"request.request !== undefined && request.request !== null\"\n dir=\"ltr\"\n class=\"bg-muted/50 max-h-72 overflow-auto rounded-md p-2 text-start font-mono text-xs leading-relaxed\"\n >{{ json(request.request) }}</pre>\n <pre\n dir=\"ltr\"\n class=\"bg-muted/50 max-h-72 overflow-auto rounded-md p-2 text-start font-mono text-xs leading-relaxed\"\n >{{ json(request.response) }}</pre>\n </CollapsibleContent>\n </Collapsible>\n </template>\n </TabsContent>\n <TabsContent value=\"timings\" class=\"space-y-4 p-4 text-sm\">\n <dl class=\"grid grid-cols-2 gap-3\">\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.server_time', {}, 'Server time') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ debug.server.duration }} ms\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.queries', {}, 'Queries') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ debug.server.queries }} · {{ debug.server.queryTime }} ms\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.memory', {}, 'Peak memory') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ formatBytes(debug.server.memory) }}\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.payload', {}, 'Page payload') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ formatBytes(payloadBytes) }}\n </dd>\n </div>\n </dl>\n <p class=\"text-muted-foreground font-mono text-xs\">\n PHP {{ debug.server.php }} · Laravel {{ debug.server.laravel }}\n </p>\n <section>\n <h3 class=\"mb-2 text-sm font-medium\">\n {{ t('debug.closures', {}, 'Closures evaluated') }}\n <span\n v-if=\"debug.closures.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ debug.closures.length }}</span\n >\n </h3>\n <p v-if=\"debug.closures.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_closures', {}, 'No closures were evaluated.') }}\n </p>\n <ul v-else class=\"divide-y rounded-md border font-mono text-xs\">\n <li\n v-for=\"(closure, index) in debug.closures\"\n :key=\"index\"\n class=\"flex items-center gap-2 px-3 py-1.5\"\n >\n <span class=\"font-semibold\">{{ closure.owner }}</span>\n <span\n class=\"text-muted-foreground min-w-0 flex-1 truncate\"\n :title=\"closure.file\"\n >{{ closure.file }}:{{ closure.line }}</span\n >\n <Badge v-if=\"closure.count > 1\" variant=\"secondary\">{{\n t('debug.times', { count: closure.count }, '×:count')\n }}</Badge>\n </li>\n </ul>\n </section>\n <section v-if=\"(debug.deprecations ?? []).length > 0\">\n <h3 class=\"mb-2 text-sm font-medium\">\n {{ t('debug.deprecations', {}, 'Deprecations') }}\n <span class=\"bg-muted ms-1 rounded px-1.5 py-0.5 font-mono text-xs\">{{\n debug.deprecations?.length\n }}</span>\n </h3>\n <ul class=\"divide-y rounded-md border text-xs\">\n <li\n v-for=\"item in debug.deprecations\"\n :key=\"item.subject\"\n class=\"flex flex-col gap-0.5 px-3 py-1.5\"\n >\n <span class=\"font-mono font-semibold\"\n >{{ item.subject\n }}<span v-if=\"item.since\" class=\"text-muted-foreground font-normal\">\n · {{ item.since }}</span\n ></span\n >\n <span class=\"text-muted-foreground\">{{ item.message }}</span>\n </li>\n </ul>\n </section>\n </TabsContent>\n </ScrollArea>\n </Tabs>\n </div>\n </SheetContent>\n </Sheet>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCA,IAAM4F,IAAIC,EAAK,GACTC,IAAQC,EAAgB,GACxBC,KAAYC,EAAa,GACzBC,IAAQC,QAAeL,EAAM,MAAM,YAAY,GAC/CM,IAAQC,EAASC,EAAc,KAAK,GACpCC,KAAeJ,QAAeK,GAAWV,EAAM,KAAK,CAAC,GAErDW,KAAQ,MAA2B;GACvC,IAAI;IACF,OAAO,OAAOC,KAAU,WAAWA,IAAQ,KAAK,UAAUA,GAAO,MAAM,CAAC;GAC1E,QAAQ;IACN,OAAO,OAAOA,CAAK;GACrB;EACF,GAEMC,MAAU,MAAwB;GACtC,IAAI;IACF,IAAMC,IAAS,IAAI,IAAIC,GAAK,kBAAkB;IAE9C,OAAOD,EAAO,WAAWA,EAAO;GAClC,QAAQ;IACN,OAAOC;GACT;EACF,GAEMC,IAAQX,QAAeC,EAAM,MAAM,KAAoB;mBAI9CF,EAAA,SAAblG,EAAA,GAAAC,EA6OQC,IAAA,EAAA,KAAA,EAAA,GAAA;GA5ON,SAAAC,QAUe,CAVfC,EAUeC,IAAA,EAVD,YAAA,GAAQ,GAAA;IACpB,SAAAF,QAQS,CARTC,EAQSE,GAAA;KAPP,MAAK;KACL,SAAQ;KACR,MAAK;KACJ,cAAYC,EAAAqF,CAAA,CAAC,CAAA,cAAA,CAAA,GAAA,kBAAA;KACd,aAAU;;KAEV,SAAAzF,QAAW,CAAXC,EAAWG,EAAA6G,CAAA,CAAA,CAAA,CAAA;;;;GAGfhH,CAAAA,GAAAA,EAgOeI,IAAA;IA/NZ,MAAMD,EAAAyF,EAAA,MAAS,QAAA,SAAA;IAChB,OAAM;;IAEN,SAAA7F,QA2NM,CA3NNM,EA2N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AAA;;WAFsB,SAAQ;;WAAY,SAAAzB,QAElD,CADAS,EAAAC,EAAAN,EAAAqF,CAAA,CAAC,CAAA,eAAA,EAAA,OAAyBsC,EAAQ,MAAK,GAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;;;UAK/BhC,EAAA,MAAM,gBAAY,CAAA,EAAA,CAAQ,SAAM,KAAhDlG,EAAA,GAAAkB,EAsBU,WAAAkE,IAAA,CArBR3E,EAKK,MALL4E,IAKK,CAJAzE,EAAAC,EAAAN,EAAAqF,CAAA,CAAC,CAAA,sBAAA,CAAA,GAAA,cAAA,CAAA,IAA6C,KACjD,CAAA,GAAAnF,EAES,QAFT6E,IAESzE,EADPqF,EAAA,MAAM,cAAc,MAAM,GAAA,CAAA,CAAA,CAAA,GAG9BzF,EAcK,MAdL8E,IAcK,EAbHvF,EAAA,EAAA,GAAAkB,EAYKI,GAAA,MAAAC,EAXY2E,EAAA,MAAM,eAAd,OADTlG,EAAA,GAAAkB,EAYK,MAAA;UAVF,KAAKiH,EAAK;UACX,OAAM;SAEN1H,GAAAA,CAAAA,EAKC,QALD+E,GAKC,CAJK5E,EAAAC,EAAAsH,EAAK,OAAO,GAAA,CAAA,GACFA,EAAK,SAAjBnI,EAAA,GAAAkB,EAED,QAFCuE,IAAkE,QAChE5E,EAAGsH,EAAK,KAAK,GAAA,CAAA,KAAAV,EAAA,IAAA,EAAA,CAAA,CAAA,GAGnBhH,EAA6D,QAA7DiF,IAA6D7E,EAAtBsH,EAAK,OAAO,GAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"DebugPanel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Sheet","_withCtx","_createVNode","SheetTrigger","Button","_unref","SheetContent","_createElementVNode","SheetHeader","SheetTitle","_createTextVNode","_toDisplayString","SheetDescription","Tabs","TabsList","TabsTrigger","_createElementBlock","_createCommentVNode","ScrollArea","TabsContent","_Fragment","_renderList","DebugTreeNode","DebugFormState","Collapsible","CollapsibleTrigger","Badge","CollapsibleContent","Badge_default","Button_default","Sheet_default","SheetContent_default","SheetDescription_default","SheetHeader_default","SheetTitle_default","SheetTrigger_default","Tabs_default","TabsContent_default","TabsList_default","TabsTrigger_default","Collapsible_default","CollapsibleContent_default","CollapsibleTrigger_default","ScrollArea_default","DebugFormState_default","DebugTreeNode_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","DebugPanel_vue_vue_type_script_setup_true_lang_default","t","useT","props","useAlfakitProps","direction","useDirection","debug","computed","state","useStore","debugRecorder","payloadBytes","byteLength","json","value","pathOf","parsed","url","forms","openBlock","createBlock","withCtx","createVNode","unref","BugIcon","createElementVNode","createTextVNode","toDisplayString","createElementBlock","createCommentVNode","Fragment","renderList","node","index","_cache","request","ChevronRightIcon","formatBytes","closure","item"],"sources":["../../../src/components/panel/DebugPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { FormStore } from '@alfakit/core'\nimport { byteLength, debugRecorder, formatBytes } from '@alfakit/core'\nimport { BugIcon, ChevronRightIcon } from '@lucide/vue'\nimport { computed } from 'vue'\nimport { useStore } from '../../composables/use-store'\nimport { useAlfakitProps, useDirection, useT } from '../../context'\nimport Badge from '../ui/Badge.vue'\nimport Button from '../ui/Button.vue'\nimport Collapsible from '../ui/Collapsible.vue'\nimport CollapsibleContent from '../ui/CollapsibleContent.vue'\nimport CollapsibleTrigger from '../ui/CollapsibleTrigger.vue'\nimport ScrollArea from '../ui/ScrollArea.vue'\nimport Sheet from '../ui/Sheet.vue'\nimport SheetContent from '../ui/SheetContent.vue'\nimport SheetDescription from '../ui/SheetDescription.vue'\nimport SheetHeader from '../ui/SheetHeader.vue'\nimport SheetTitle from '../ui/SheetTitle.vue'\nimport SheetTrigger from '../ui/SheetTrigger.vue'\nimport Tabs from '../ui/Tabs.vue'\nimport TabsContent from '../ui/TabsContent.vue'\nimport TabsList from '../ui/TabsList.vue'\nimport TabsTrigger from '../ui/TabsTrigger.vue'\nimport DebugFormState from './DebugFormState.vue'\nimport DebugTreeNode from './DebugTreeNode.vue'\n\n/**\n * The developer debug panel: a top bar toggle that opens a drawer with the page's resolved\n * schema tree (visibility and authorisation per component, closures evaluated), the live\n * form state, the internal requests captured by `requestJson()` and timings. Rendered only\n * when the page carries the `alfakitDebug` prop, which PHP adds while `Panel::debugPanel()`\n * is active and `app.debug` is on. Replace it with `components: { 'panel:debug-panel': … }`.\n */\nconst t = useT()\nconst props = useAlfakitProps()\nconst direction = useDirection()\nconst debug = computed(() => props.value.alfakitDebug)\nconst state = useStore(debugRecorder.store)\nconst payloadBytes = computed(() => byteLength(props.value))\n\nconst json = (value: unknown): string => {\n try {\n return typeof value === 'string' ? value : JSON.stringify(value, null, 2)\n } catch {\n return String(value)\n }\n}\n\nconst pathOf = (url: string): string => {\n try {\n const parsed = new URL(url, 'http://localhost')\n\n return parsed.pathname + parsed.search\n } catch {\n return url\n }\n}\n\nconst forms = computed(() => state.value.forms as FormStore[])\n</script>\n\n<template>\n <Sheet v-if=\"debug\">\n <SheetTrigger as-child>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n :aria-label=\"t('debug.open', {}, 'Open debug panel')\"\n data-slot=\"debug-toggle\"\n >\n <BugIcon />\n </Button>\n </SheetTrigger>\n <SheetContent\n :side=\"direction === 'rtl' ? 'left' : 'right'\"\n class=\"flex w-full flex-col gap-0 p-0 sm:max-w-xl\"\n >\n <div data-slot=\"debug-panel\" class=\"flex min-h-0 flex-1 flex-col\">\n <SheetHeader class=\"border-b\">\n <SheetTitle class=\"flex items-center gap-2\">\n <BugIcon class=\"size-4\" />\n {{ t('debug.title', {}, 'Debug') }}\n </SheetTitle>\n <SheetDescription class=\"truncate font-mono text-xs\" :title=\"debug.page\">\n {{ debug.page }}\n </SheetDescription>\n </SheetHeader>\n <Tabs default-value=\"schema\" class=\"flex min-h-0 flex-1 flex-col gap-0\">\n <TabsList class=\"mx-4 mt-3 grid w-auto grid-cols-4\">\n <TabsTrigger value=\"schema\">{{ t('debug.schema', {}, 'Schema') }}</TabsTrigger>\n <TabsTrigger value=\"form\">\n {{ t('debug.form', {}, 'Form') }}\n <span\n v-if=\"forms.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ forms.length }}</span\n >\n </TabsTrigger>\n <TabsTrigger value=\"requests\">\n {{ t('debug.requests', {}, 'Requests') }}\n <span\n v-if=\"state.requests.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ state.requests.length }}</span\n >\n </TabsTrigger>\n <TabsTrigger value=\"timings\">{{ t('debug.timings', {}, 'Timings') }}</TabsTrigger>\n </TabsList>\n <ScrollArea class=\"min-h-0 flex-1\">\n <TabsContent value=\"schema\" class=\"p-4 text-sm\">\n <p v-if=\"debug.tree.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_tree', {}, 'The server sent no schema tree for this page.') }}\n </p>\n <ul v-else class=\"space-y-0.5 font-mono text-xs\">\n <DebugTreeNode\n v-for=\"(node, index) in debug.tree\"\n :key=\"`${node.key ?? node.type}-${index}`\"\n :node=\"node\"\n :depth=\"0\"\n />\n </ul>\n </TabsContent>\n <TabsContent value=\"form\" class=\"space-y-4 p-4 text-sm\">\n <p v-if=\"forms.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_forms', {}, 'No forms on this page.') }}\n </p>\n <DebugFormState v-for=\"(form, index) in forms\" :key=\"index\" :form=\"form\" />\n </TabsContent>\n <TabsContent value=\"requests\" class=\"space-y-2 p-4 text-sm\">\n <p v-if=\"state.requests.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_requests', {}, 'No internal requests yet.') }}\n </p>\n <template v-else>\n <div class=\"flex justify-end\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n @click=\"debugRecorder.clearRequests()\"\n >\n {{ t('debug.clear', {}, 'Clear') }}\n </Button>\n </div>\n <Collapsible\n v-for=\"request in state.requests\"\n :key=\"request.id\"\n class=\"rounded-md border\"\n >\n <CollapsibleTrigger\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start [&[data-state=open]>svg]:rotate-90\"\n >\n <ChevronRightIcon\n class=\"text-muted-foreground size-3.5 shrink-0 transition-transform rtl:rotate-180\"\n />\n <span class=\"font-mono text-xs font-semibold\">{{ request.method }}</span>\n <span class=\"min-w-0 flex-1 truncate font-mono text-xs\" :title=\"request.url\">{{\n pathOf(request.url)\n }}</span>\n <Badge\n :variant=\"\n request.status === 0 || request.status >= 400 ? 'destructive' : 'secondary'\n \"\n class=\"font-mono\"\n >{{\n request.status === 0 ? t('debug.failed', {}, 'failed') : request.status\n }}</Badge\n >\n <span class=\"text-muted-foreground font-mono text-xs tabular-nums\"\n >{{ request.duration }} ms</span\n >\n </CollapsibleTrigger>\n <CollapsibleContent class=\"space-y-2 border-t px-3 py-2\">\n <dl\n class=\"text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-xs\"\n >\n <dt>{{ t('debug.duration', {}, 'Duration') }}</dt>\n <dd class=\"font-mono tabular-nums\">\n {{ request.duration }} ms\n <template v-if=\"request.serverDuration !== null\">\n ({{ t('debug.server_time', {}, 'Server time') }}:\n {{ request.serverDuration }} ms)\n </template>\n </dd>\n <dt>{{ t('debug.size', {}, 'Size') }}</dt>\n <dd class=\"font-mono tabular-nums\">\n ↑ {{ formatBytes(request.requestBytes) }} · ↓\n {{ formatBytes(request.responseBytes) }}\n </dd>\n </dl>\n <pre\n v-if=\"request.request !== undefined && request.request !== null\"\n dir=\"ltr\"\n class=\"bg-muted/50 max-h-72 overflow-auto rounded-md p-2 text-start font-mono text-xs leading-relaxed\"\n >{{ json(request.request) }}</pre>\n <pre\n dir=\"ltr\"\n class=\"bg-muted/50 max-h-72 overflow-auto rounded-md p-2 text-start font-mono text-xs leading-relaxed\"\n >{{ json(request.response) }}</pre>\n </CollapsibleContent>\n </Collapsible>\n </template>\n </TabsContent>\n <TabsContent value=\"timings\" class=\"space-y-4 p-4 text-sm\">\n <dl class=\"grid grid-cols-2 gap-3\">\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.server_time', {}, 'Server time') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ debug.server.duration }} ms\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.queries', {}, 'Queries') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ debug.server.queries }} · {{ debug.server.queryTime }} ms\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.memory', {}, 'Peak memory') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ formatBytes(debug.server.memory) }}\n </dd>\n </div>\n <div class=\"rounded-md border p-3\">\n <dt class=\"text-muted-foreground text-xs\">\n {{ t('debug.payload', {}, 'Page payload') }}\n </dt>\n <dd class=\"font-mono text-sm font-semibold tabular-nums\">\n {{ formatBytes(payloadBytes) }}\n </dd>\n </div>\n </dl>\n <p class=\"text-muted-foreground font-mono text-xs\">\n PHP {{ debug.server.php }} · Laravel {{ debug.server.laravel }}\n </p>\n <section>\n <h3 class=\"mb-2 text-sm font-medium\">\n {{ t('debug.closures', {}, 'Closures evaluated') }}\n <span\n v-if=\"debug.closures.length > 0\"\n class=\"bg-muted text-muted-foreground ms-1.5 rounded-full px-1.5 font-mono text-[10px] tabular-nums\"\n >{{ debug.closures.length }}</span\n >\n </h3>\n <p v-if=\"debug.closures.length === 0\" class=\"text-muted-foreground text-sm\">\n {{ t('debug.no_closures', {}, 'No closures were evaluated.') }}\n </p>\n <ul v-else class=\"divide-y rounded-md border font-mono text-xs\">\n <li\n v-for=\"(closure, index) in debug.closures\"\n :key=\"index\"\n class=\"flex items-center gap-2 px-3 py-1.5\"\n >\n <span class=\"font-semibold\">{{ closure.owner }}</span>\n <span\n class=\"text-muted-foreground min-w-0 flex-1 truncate\"\n :title=\"closure.file\"\n >{{ closure.file }}:{{ closure.line }}</span\n >\n <Badge v-if=\"closure.count > 1\" variant=\"secondary\">{{\n t('debug.times', { count: closure.count }, '×:count')\n }}</Badge>\n </li>\n </ul>\n </section>\n <section v-if=\"(debug.deprecations ?? []).length > 0\">\n <h3 class=\"mb-2 text-sm font-medium\">\n {{ t('debug.deprecations', {}, 'Deprecations') }}\n <span class=\"bg-muted ms-1 rounded px-1.5 py-0.5 font-mono text-xs\">{{\n debug.deprecations?.length\n }}</span>\n </h3>\n <ul class=\"divide-y rounded-md border text-xs\">\n <li\n v-for=\"item in debug.deprecations\"\n :key=\"item.subject\"\n class=\"flex flex-col gap-0.5 px-3 py-1.5\"\n >\n <span class=\"font-mono font-semibold\"\n >{{ item.subject\n }}<span v-if=\"item.since\" class=\"text-muted-foreground font-normal\">\n · {{ item.since }}</span\n ></span\n >\n <span class=\"text-muted-foreground\">{{ item.message }}</span>\n </li>\n </ul>\n </section>\n </TabsContent>\n </ScrollArea>\n </Tabs>\n </div>\n </SheetContent>\n </Sheet>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCA,IAA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,SAAM,KAAhDlG,EAAA,GAAAkB,EAsBU,WAAAkE,IAAA,CArBR3E,EAKK,MALL4E,IAKK,CAJAzE,EAAAC,EAAAN,EAAAqF,CAAA,CAAC,CAAA,sBAAA,CAAA,GAAA,cAAA,CAAA,IAA6C,KACjD,CAAA,GAAAnF,EAES,QAFT6E,IAESzE,EADPqF,EAAA,MAAM,cAAc,MAAM,GAAA,CAAA,CAAA,CAAA,GAG9BzF,EAcK,MAdL8E,IAcK,EAbHvF,EAAA,EAAA,GAAAkB,EAYKI,GAAA,MAAAC,EAXY2E,EAAA,MAAM,eAAd,OADTlG,EAAA,GAAAkB,EAYK,MAAA;UAVF,KAAKiH,EAAK;UACX,OAAM;SAEN1H,GAAAA,CAAAA,EAKC,QALD+E,GAKC,CAJK5E,EAAAC,EAAAsH,EAAK,OAAO,GAAA,CAAA,GACFA,EAAK,SAAjBnI,EAAA,GAAAkB,EAED,QAFCuE,IAAkE,QAChE5E,EAAGsH,EAAK,KAAK,GAAA,CAAA,KAAAV,EAAA,IAAA,EAAA,CAAA,CAAA,GAGnBhH,EAA6D,QAA7DiF,IAA6D7E,EAAtBsH,EAAK,OAAO,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalSearch.js","names":["_sfc_main","GlobalSearch_vue_vue_type_script_setup_true_lang_default","GlobalSearch_default"],"sources":["../../../src/components/panel/GlobalSearch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { formatKeyBinding, globalSearchSuffix, SHORTCUT_IDS, shortcuts } from '@alfakit/core'\nimport { router } from '@inertiajs/vue3'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch, type Component } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\nimport { usePanel, useT } from '../../context'\nimport Button from '../ui/Button.vue'\nimport Slot from './Slot.vue'\nimport { Icon } from '../../lib/icons'\nimport { globalSearchPalette } from './lazy-chrome'\n\n/**\n * The search field and its command palette (`GlobalSearchPalette`, loaded on first open):\n * global search results plus (with `alfakit.commandPalette`) the page's header actions,\n * panel commands, navigation, \"create\" links, recent records, theme switching and the\n * shortcuts overlay. `variant=\"sidebar\"`: the full-width field in the sidebar header\n * (`globalSearch(position: Sidebar)`).\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), { variant: 'topbar' })\n\nconst t = useT()\nconst panel = usePanel()\n// The shortcut hint depends on the visitor's platform (⌘ or Ctrl): rendered after hydration.\nconst hydrated = useHydrated()\nconst open = ref(false)\n// Null on the server and during hydration (nothing loads there), so the markup matches.\nconst Palette = shallowRef<Component | null>(globalSearchPalette.current)\nconst config = computed(() => panel.value.globalSearch)\nconst palette = computed(() => panel.value.commandPalette)\nconst endpoint = computed(() => (config.value ? panel.value.endpoints.globalSearch : undefined))\nconst placeholder = computed(\n () =>\n config.value?.placeholder ??\n palette.value?.placeholder ??\n t('palette.placeholder', {}, 'Type a command or search…'),\n)\n// `globalSearchFieldSuffix()`, or the first key binding (default); ⌘K / Ctrl+K without global search.\nconst suffix = computed(() =>\n globalSearchSuffix(\n config.value ??\n (palette.value ? { keyBindings: ['mod+k'], placeholder: placeholder.value } : undefined),\n ),\n)\nconst keys = computed(() =>\n config.value || palette.value ? JSON.stringify(config.value?.keyBindings ?? ['mod+k']) : '',\n)\n\n// The palette's key bindings: essential, so they keep working with `keyboardShortcuts(false)`.\nwatch(\n keys,\n (value, _old, onCleanup) => {\n // Never during a server render: the registry is shared by every request there.\n if (!value || typeof window === 'undefined') return\n\n onCleanup(\n shortcuts.register({\n id: SHORTCUT_IDS.palette,\n keys: JSON.parse(value) as string[],\n label: t('shortcuts.open_palette', {}, 'Open the command palette'),\n group: 'general',\n essential: true,\n handler: () => {\n open.value = true\n },\n }),\n )\n },\n { immediate: true },\n)\n\n// Opening before the code has arrived (a click or `mod+k` right after the page loads)\n// keeps `open` set; the palette mounts open once it has loaded.\nwatch(open, (value, _old, onCleanup) => {\n if (!value) return\n\n // Already loaded (by another instance): mount it straight away.\n if (globalSearchPalette.current) {\n Palette.value = globalSearchPalette.current\n\n return\n }\n\n let active = true\n onCleanup(() => {\n active = false\n })\n\n globalSearchPalette.load().then(\n (component) => {\n if (active) Palette.value = component\n },\n () => {\n if (active) open.value = false\n },\n )\n})\n\nconst preload = () => void globalSearchPalette.load().catch(() => undefined)\n\n// A palette opened while its code was still loading closes when the page changes.\nlet stopListening: (() => void) | undefined\n\nonMounted(() => {\n stopListening = router.on('navigate', () => {\n open.value = false\n })\n})\n\nonBeforeUnmount(() => stopListening?.())\n</script>\n\n<template>\n <template v-if=\"(config && endpoint) || palette\">\n <Slot name=\"global-search.before\" />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n :data-variant=\"props.variant\"\n :class=\"\n props.variant === 'sidebar'\n ? 'text-muted-foreground w-full justify-start gap-2 px-2.5 font-normal group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0'\n : 'text-muted-foreground size-8 justify-center gap-2 px-0 font-normal sm:w-56 sm:justify-start sm:px-2.5'\n \"\n @click=\"open = true\"\n @pointerenter=\"preload\"\n @focus=\"preload\"\n >\n <Icon name=\"alfakit::panels.global-search.field\" :fallback=\"SearchIcon\" class=\"size-4\" />\n <span\n :class=\"\n props.variant === 'sidebar'\n ? 'flex-1 truncate text-start group-data-[collapsible=icon]:sr-only'\n : 'sr-only sm:not-sr-only sm:flex-1 sm:text-start'\n \"\n >{{ placeholder }}</span\n >\n <span\n v-if=\"suffix?.type === 'text'\"\n data-slot=\"global-search-suffix\"\n class=\"text-muted-foreground hidden text-[10px] sm:inline\"\n >{{ suffix.text }}</span\n >\n <kbd\n v-if=\"hydrated && suffix?.type === 'keyBinding'\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(suffix.keyBinding) }}</kbd\n >\n </Button>\n <Slot name=\"global-search.after\" />\n <!-- The dialog's code loads on first open (click or shortcut); hovering or focusing the\n field fetches it ahead. Not rendered on the server, like the closed dialog before it. -->\n <component :is=\"Palette\" v-if=\"Palette\" v-model:open=\"open\" />\n </template>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"GlobalSearch.js","names":["_sfc_main","GlobalSearch_vue_vue_type_script_setup_true_lang_default","GlobalSearch_default"],"sources":["../../../src/components/panel/GlobalSearch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { formatKeyBinding, globalSearchSuffix, SHORTCUT_IDS, shortcuts } from '@alfakit/core'\nimport { router } from '@inertiajs/vue3'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch, type Component } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\nimport { usePanel, useT } from '../../context'\nimport Button from '../ui/Button.vue'\nimport Slot from './Slot.vue'\nimport { Icon } from '../../lib/icons'\nimport { globalSearchPalette } from './lazy-chrome'\n\n/**\n * The search field and its command palette (`GlobalSearchPalette`, loaded on first open):\n * global search results plus (with `alfakit.commandPalette`) the page's header actions,\n * panel commands, navigation, \"create\" links, recent records, theme switching and the\n * shortcuts overlay. `variant=\"sidebar\"`: the full-width field in the sidebar header\n * (`globalSearch(position: Sidebar)`).\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), { variant: 'topbar' })\n\nconst t = useT()\nconst panel = usePanel()\n// The shortcut hint depends on the visitor's platform (⌘ or Ctrl): rendered after hydration.\nconst hydrated = useHydrated()\nconst open = ref(false)\n// Null on the server and during hydration (nothing loads there), so the markup matches.\nconst Palette = shallowRef<Component | null>(globalSearchPalette.current)\nconst config = computed(() => panel.value.globalSearch)\nconst palette = computed(() => panel.value.commandPalette)\nconst endpoint = computed(() => (config.value ? panel.value.endpoints.globalSearch : undefined))\nconst placeholder = computed(\n () =>\n config.value?.placeholder ??\n palette.value?.placeholder ??\n t('palette.placeholder', {}, 'Type a command or search…'),\n)\n// `globalSearchFieldSuffix()`, or the first key binding (default); ⌘K / Ctrl+K without global search.\nconst suffix = computed(() =>\n globalSearchSuffix(\n config.value ??\n (palette.value ? { keyBindings: ['mod+k'], placeholder: placeholder.value } : undefined),\n ),\n)\nconst keys = computed(() =>\n config.value || palette.value ? JSON.stringify(config.value?.keyBindings ?? ['mod+k']) : '',\n)\n\n// The palette's key bindings: essential, so they keep working with `keyboardShortcuts(false)`.\nwatch(\n keys,\n (value, _old, onCleanup) => {\n // Never during a server render: the registry is shared by every request there.\n if (!value || typeof window === 'undefined') return\n\n onCleanup(\n shortcuts.register({\n id: SHORTCUT_IDS.palette,\n keys: JSON.parse(value) as string[],\n label: t('shortcuts.open_palette', {}, 'Open the command palette'),\n group: 'general',\n essential: true,\n handler: () => {\n open.value = true\n },\n }),\n )\n },\n { immediate: true },\n)\n\n// Opening before the code has arrived (a click or `mod+k` right after the page loads)\n// keeps `open` set; the palette mounts open once it has loaded.\nwatch(open, (value, _old, onCleanup) => {\n if (!value) return\n\n // Already loaded (by another instance): mount it straight away.\n if (globalSearchPalette.current) {\n Palette.value = globalSearchPalette.current\n\n return\n }\n\n let active = true\n onCleanup(() => {\n active = false\n })\n\n globalSearchPalette.load().then(\n (component) => {\n if (active) Palette.value = component\n },\n () => {\n if (active) open.value = false\n },\n )\n})\n\nconst preload = () => void globalSearchPalette.load().catch(() => undefined)\n\n// A palette opened while its code was still loading closes when the page changes.\nlet stopListening: (() => void) | undefined\n\nonMounted(() => {\n stopListening = router.on('navigate', () => {\n open.value = false\n })\n})\n\nonBeforeUnmount(() => stopListening?.())\n</script>\n\n<template>\n <template v-if=\"(config && endpoint) || palette\">\n <Slot name=\"global-search.before\" />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n :data-variant=\"props.variant\"\n :class=\"\n props.variant === 'sidebar'\n ? 'text-muted-foreground w-full justify-start gap-2 px-2.5 font-normal group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0'\n : 'text-muted-foreground size-8 justify-center gap-2 px-0 font-normal sm:w-56 sm:justify-start sm:px-2.5'\n \"\n @click=\"open = true\"\n @pointerenter=\"preload\"\n @focus=\"preload\"\n >\n <Icon name=\"alfakit::panels.global-search.field\" :fallback=\"SearchIcon\" class=\"size-4\" />\n <span\n :class=\"\n props.variant === 'sidebar'\n ? 'flex-1 truncate text-start group-data-[collapsible=icon]:sr-only'\n : 'sr-only sm:not-sr-only sm:flex-1 sm:text-start'\n \"\n >{{ placeholder }}</span\n >\n <span\n v-if=\"suffix?.type === 'text'\"\n data-slot=\"global-search-suffix\"\n class=\"text-muted-foreground hidden text-[10px] sm:inline\"\n >{{ suffix.text }}</span\n >\n <kbd\n v-if=\"hydrated && suffix?.type === 'keyBinding'\"\n dir=\"ltr\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(suffix.keyBinding) }}</kbd\n >\n </Button>\n <Slot name=\"global-search.after\" />\n <!-- The dialog's code loads on first open (click or shortcut); hovering or focusing the\n field fetches it ahead. Not rendered on the server, like the closed dialog before it. -->\n <component :is=\"Palette\" v-if=\"Palette\" v-model:open=\"open\" />\n </template>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalSearch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panel/GlobalSearch.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlobalSearch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/panel/GlobalSearch.vue"],"names":[],"mappings":"AA0KA;;;;;;GAMG;AACH,KAAK,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,CAAC;;aAAvB,QAAQ,GAAG,SAAS;;AA8PnD,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalSearch.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_createVNode","Slot","Button","_normalizeClass","_withCtx","_unref","Icon","_createElementVNode","_toDisplayString","_createCommentVNode","_createBlock","_resolveDynamicComponent","Icon_default","Button_default","Slot_default","_hoisted_1","_hoisted_2","GlobalSearch_vue_vue_type_script_setup_true_lang_default","props","__props","t","useT","panel","usePanel","hydrated","useHydrated","open","ref","Palette","shallowRef","globalSearchPalette","config","computed","palette","endpoint","placeholder","suffix","globalSearchSuffix","keys","watch","value","onCleanup","shortcuts","SHORTCUT_IDS","active","component","preload","stopListening","onMounted","router","onBeforeUnmount","openBlock","createElementBlock","Fragment","createVNode","normalizeClass","_cache","withCtx","unref","SearchIcon","createElementVNode","toDisplayString","createCommentVNode","formatKeyBinding","createBlock","resolveDynamicComponent","$event"],"sources":["../../../src/components/panel/GlobalSearch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { formatKeyBinding, globalSearchSuffix, SHORTCUT_IDS, shortcuts } from '@alfakit/core'\nimport { router } from '@inertiajs/vue3'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch, type Component } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\nimport { usePanel, useT } from '../../context'\nimport Button from '../ui/Button.vue'\nimport Slot from './Slot.vue'\nimport { Icon } from '../../lib/icons'\nimport { globalSearchPalette } from './lazy-chrome'\n\n/**\n * The search field and its command palette (`GlobalSearchPalette`, loaded on first open):\n * global search results plus (with `alfakit.commandPalette`) the page's header actions,\n * panel commands, navigation, \"create\" links, recent records, theme switching and the\n * shortcuts overlay. `variant=\"sidebar\"`: the full-width field in the sidebar header\n * (`globalSearch(position: Sidebar)`).\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), { variant: 'topbar' })\n\nconst t = useT()\nconst panel = usePanel()\n// The shortcut hint depends on the visitor's platform (⌘ or Ctrl): rendered after hydration.\nconst hydrated = useHydrated()\nconst open = ref(false)\n// Null on the server and during hydration (nothing loads there), so the markup matches.\nconst Palette = shallowRef<Component | null>(globalSearchPalette.current)\nconst config = computed(() => panel.value.globalSearch)\nconst palette = computed(() => panel.value.commandPalette)\nconst endpoint = computed(() => (config.value ? panel.value.endpoints.globalSearch : undefined))\nconst placeholder = computed(\n () =>\n config.value?.placeholder ??\n palette.value?.placeholder ??\n t('palette.placeholder', {}, 'Type a command or search…'),\n)\n// `globalSearchFieldSuffix()`, or the first key binding (default); ⌘K / Ctrl+K without global search.\nconst suffix = computed(() =>\n globalSearchSuffix(\n config.value ??\n (palette.value ? { keyBindings: ['mod+k'], placeholder: placeholder.value } : undefined),\n ),\n)\nconst keys = computed(() =>\n config.value || palette.value ? JSON.stringify(config.value?.keyBindings ?? ['mod+k']) : '',\n)\n\n// The palette's key bindings: essential, so they keep working with `keyboardShortcuts(false)`.\nwatch(\n keys,\n (value, _old, onCleanup) => {\n // Never during a server render: the registry is shared by every request there.\n if (!value || typeof window === 'undefined') return\n\n onCleanup(\n shortcuts.register({\n id: SHORTCUT_IDS.palette,\n keys: JSON.parse(value) as string[],\n label: t('shortcuts.open_palette', {}, 'Open the command palette'),\n group: 'general',\n essential: true,\n handler: () => {\n open.value = true\n },\n }),\n )\n },\n { immediate: true },\n)\n\n// Opening before the code has arrived (a click or `mod+k` right after the page loads)\n// keeps `open` set; the palette mounts open once it has loaded.\nwatch(open, (value, _old, onCleanup) => {\n if (!value) return\n\n // Already loaded (by another instance): mount it straight away.\n if (globalSearchPalette.current) {\n Palette.value = globalSearchPalette.current\n\n return\n }\n\n let active = true\n onCleanup(() => {\n active = false\n })\n\n globalSearchPalette.load().then(\n (component) => {\n if (active) Palette.value = component\n },\n () => {\n if (active) open.value = false\n },\n )\n})\n\nconst preload = () => void globalSearchPalette.load().catch(() => undefined)\n\n// A palette opened while its code was still loading closes when the page changes.\nlet stopListening: (() => void) | undefined\n\nonMounted(() => {\n stopListening = router.on('navigate', () => {\n open.value = false\n })\n})\n\nonBeforeUnmount(() => stopListening?.())\n</script>\n\n<template>\n <template v-if=\"(config && endpoint) || palette\">\n <Slot name=\"global-search.before\" />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n :data-variant=\"props.variant\"\n :class=\"\n props.variant === 'sidebar'\n ? 'text-muted-foreground w-full justify-start gap-2 px-2.5 font-normal group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0'\n : 'text-muted-foreground size-8 justify-center gap-2 px-0 font-normal sm:w-56 sm:justify-start sm:px-2.5'\n \"\n @click=\"open = true\"\n @pointerenter=\"preload\"\n @focus=\"preload\"\n >\n <Icon name=\"alfakit::panels.global-search.field\" :fallback=\"SearchIcon\" class=\"size-4\" />\n <span\n :class=\"\n props.variant === 'sidebar'\n ? 'flex-1 truncate text-start group-data-[collapsible=icon]:sr-only'\n : 'sr-only sm:not-sr-only sm:flex-1 sm:text-start'\n \"\n >{{ placeholder }}</span\n >\n <span\n v-if=\"suffix?.type === 'text'\"\n data-slot=\"global-search-suffix\"\n class=\"text-muted-foreground hidden text-[10px] sm:inline\"\n >{{ suffix.text }}</span\n >\n <kbd\n v-if=\"hydrated && suffix?.type === 'keyBinding'\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(suffix.keyBinding) }}</kbd\n >\n </Button>\n <Slot name=\"global-search.after\" />\n <!-- The dialog's code loads on first open (click or shortcut); hovering or focusing the\n field fetches it ahead. Not rendered on the server, like the closed dialog before it. -->\n <component :is=\"Palette\" v-if=\"Palette\" v-model:open=\"open\" />\n </template>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlobalSearch.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_createVNode","Slot","Button","_normalizeClass","_withCtx","_unref","Icon","_createElementVNode","_toDisplayString","_createCommentVNode","_createBlock","_resolveDynamicComponent","Icon_default","Button_default","Slot_default","_hoisted_1","_hoisted_2","GlobalSearch_vue_vue_type_script_setup_true_lang_default","props","__props","t","useT","panel","usePanel","hydrated","useHydrated","open","ref","Palette","shallowRef","globalSearchPalette","config","computed","palette","endpoint","placeholder","suffix","globalSearchSuffix","keys","watch","value","onCleanup","shortcuts","SHORTCUT_IDS","active","component","preload","stopListening","onMounted","router","onBeforeUnmount","openBlock","createElementBlock","Fragment","createVNode","normalizeClass","_cache","withCtx","unref","SearchIcon","createElementVNode","toDisplayString","createCommentVNode","formatKeyBinding","createBlock","resolveDynamicComponent","$event"],"sources":["../../../src/components/panel/GlobalSearch.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { formatKeyBinding, globalSearchSuffix, SHORTCUT_IDS, shortcuts } from '@alfakit/core'\nimport { router } from '@inertiajs/vue3'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch, type Component } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\nimport { usePanel, useT } from '../../context'\nimport Button from '../ui/Button.vue'\nimport Slot from './Slot.vue'\nimport { Icon } from '../../lib/icons'\nimport { globalSearchPalette } from './lazy-chrome'\n\n/**\n * The search field and its command palette (`GlobalSearchPalette`, loaded on first open):\n * global search results plus (with `alfakit.commandPalette`) the page's header actions,\n * panel commands, navigation, \"create\" links, recent records, theme switching and the\n * shortcuts overlay. `variant=\"sidebar\"`: the full-width field in the sidebar header\n * (`globalSearch(position: Sidebar)`).\n */\nconst props = withDefaults(defineProps<{ variant?: 'topbar' | 'sidebar' }>(), { variant: 'topbar' })\n\nconst t = useT()\nconst panel = usePanel()\n// The shortcut hint depends on the visitor's platform (⌘ or Ctrl): rendered after hydration.\nconst hydrated = useHydrated()\nconst open = ref(false)\n// Null on the server and during hydration (nothing loads there), so the markup matches.\nconst Palette = shallowRef<Component | null>(globalSearchPalette.current)\nconst config = computed(() => panel.value.globalSearch)\nconst palette = computed(() => panel.value.commandPalette)\nconst endpoint = computed(() => (config.value ? panel.value.endpoints.globalSearch : undefined))\nconst placeholder = computed(\n () =>\n config.value?.placeholder ??\n palette.value?.placeholder ??\n t('palette.placeholder', {}, 'Type a command or search…'),\n)\n// `globalSearchFieldSuffix()`, or the first key binding (default); ⌘K / Ctrl+K without global search.\nconst suffix = computed(() =>\n globalSearchSuffix(\n config.value ??\n (palette.value ? { keyBindings: ['mod+k'], placeholder: placeholder.value } : undefined),\n ),\n)\nconst keys = computed(() =>\n config.value || palette.value ? JSON.stringify(config.value?.keyBindings ?? ['mod+k']) : '',\n)\n\n// The palette's key bindings: essential, so they keep working with `keyboardShortcuts(false)`.\nwatch(\n keys,\n (value, _old, onCleanup) => {\n // Never during a server render: the registry is shared by every request there.\n if (!value || typeof window === 'undefined') return\n\n onCleanup(\n shortcuts.register({\n id: SHORTCUT_IDS.palette,\n keys: JSON.parse(value) as string[],\n label: t('shortcuts.open_palette', {}, 'Open the command palette'),\n group: 'general',\n essential: true,\n handler: () => {\n open.value = true\n },\n }),\n )\n },\n { immediate: true },\n)\n\n// Opening before the code has arrived (a click or `mod+k` right after the page loads)\n// keeps `open` set; the palette mounts open once it has loaded.\nwatch(open, (value, _old, onCleanup) => {\n if (!value) return\n\n // Already loaded (by another instance): mount it straight away.\n if (globalSearchPalette.current) {\n Palette.value = globalSearchPalette.current\n\n return\n }\n\n let active = true\n onCleanup(() => {\n active = false\n })\n\n globalSearchPalette.load().then(\n (component) => {\n if (active) Palette.value = component\n },\n () => {\n if (active) open.value = false\n },\n )\n})\n\nconst preload = () => void globalSearchPalette.load().catch(() => undefined)\n\n// A palette opened while its code was still loading closes when the page changes.\nlet stopListening: (() => void) | undefined\n\nonMounted(() => {\n stopListening = router.on('navigate', () => {\n open.value = false\n })\n})\n\nonBeforeUnmount(() => stopListening?.())\n</script>\n\n<template>\n <template v-if=\"(config && endpoint) || palette\">\n <Slot name=\"global-search.before\" />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n :data-variant=\"props.variant\"\n :class=\"\n props.variant === 'sidebar'\n ? 'text-muted-foreground w-full justify-start gap-2 px-2.5 font-normal group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0'\n : 'text-muted-foreground size-8 justify-center gap-2 px-0 font-normal sm:w-56 sm:justify-start sm:px-2.5'\n \"\n @click=\"open = true\"\n @pointerenter=\"preload\"\n @focus=\"preload\"\n >\n <Icon name=\"alfakit::panels.global-search.field\" :fallback=\"SearchIcon\" class=\"size-4\" />\n <span\n :class=\"\n props.variant === 'sidebar'\n ? 'flex-1 truncate text-start group-data-[collapsible=icon]:sr-only'\n : 'sr-only sm:not-sr-only sm:flex-1 sm:text-start'\n \"\n >{{ placeholder }}</span\n >\n <span\n v-if=\"suffix?.type === 'text'\"\n data-slot=\"global-search-suffix\"\n class=\"text-muted-foreground hidden text-[10px] sm:inline\"\n >{{ suffix.text }}</span\n >\n <kbd\n v-if=\"hydrated && suffix?.type === 'keyBinding'\"\n dir=\"ltr\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(suffix.keyBinding) }}</kbd\n >\n </Button>\n <Slot name=\"global-search.after\" />\n <!-- The dialog's code loads on first open (click or shortcut); hovering or focusing the\n field fetches it ahead. Not rendered on the server, like the closed dialog before it. -->\n <component :is=\"Palette\" v-if=\"Palette\" v-model:open=\"open\" />\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAmBA,IAAMqB,IAAQC,GAERC,IAAIC,EAAK,GACTC,IAAQC,EAAS,GAEjBC,IAAWC,EAAY,GACvBC,IAAOC,EAAI,EAAK,GAEhBC,IAAUC,EAA6BC,EAAoB,OAAO,GAClEC,IAASC,QAAeV,EAAM,MAAM,YAAY,GAChDW,IAAUD,QAAeV,EAAM,MAAM,cAAc,GACnDY,IAAWF,QAAgBD,EAAO,QAAQT,EAAM,MAAM,UAAU,eAAe,KAAA,CAAU,GACzFa,IAAcH,QAEhBD,EAAO,OAAO,eACdE,EAAQ,OAAO,eACfb,EAAE,uBAAuB,CAAC,GAA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