@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { AnyComponent } from '../context';
|
|
3
|
+
/**
|
|
4
|
+
* The dashboard widgets of a `starterKit()` panel on the host's own dashboard. Reads the
|
|
5
|
+
* `alfakitWidgets` prop (shared on the panel's `starterKitDashboard()` pages only, the
|
|
6
|
+
* starter kit's `/dashboard` by default) and renders the widgets with the host's theme, as
|
|
7
|
+
* `<AlfakitComponent>` renders standalone widgets: lazy widgets, polling and table widget
|
|
8
|
+
* actions go through the panel's endpoints. Its code loads once mounted; the server render
|
|
9
|
+
* and hydration show placeholders. Renders its default slot (the kit's placeholder boxes)
|
|
10
|
+
* when there are no widgets to show: other pages, guests, users who may not open the panel.
|
|
11
|
+
*
|
|
12
|
+
* ```vue
|
|
13
|
+
* <script setup lang="ts">
|
|
14
|
+
* import { AlfakitWidgets } from '@alfakit/vue'
|
|
15
|
+
* </script>
|
|
16
|
+
*
|
|
17
|
+
* <template>
|
|
18
|
+
* <AlfakitWidgets>
|
|
19
|
+
* <MyEmptyState />
|
|
20
|
+
* </AlfakitWidgets>
|
|
21
|
+
* </template>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const AlfakitWidgets: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
25
|
+
/** The `starterKit()` panel whose widgets to show (the first one by default). */
|
|
26
|
+
panel: {
|
|
27
|
+
type: PropType<string | undefined>;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
/** Frontend components of custom widgets (`{ RevenueWidget }`), as for `<AlfakitComponent>`. */
|
|
31
|
+
components: {
|
|
32
|
+
type: PropType<Record<string, AnyComponent> | undefined>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}>[] | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
/** The `starterKit()` panel whose widgets to show (the first one by default). */
|
|
41
|
+
panel: {
|
|
42
|
+
type: PropType<string | undefined>;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
/** Frontend components of custom widgets (`{ RevenueWidget }`), as for `<AlfakitComponent>`. */
|
|
46
|
+
components: {
|
|
47
|
+
type: PropType<Record<string, AnyComponent> | undefined>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
}>> & Readonly<{}>, {
|
|
51
|
+
components: Record<string, AnyComponent> | undefined;
|
|
52
|
+
panel: string | undefined;
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
//# sourceMappingURL=dashboard-widgets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-widgets.d.ts","sourceRoot":"","sources":["../../src/starter-kit/dashboard-widgets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAqC9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc;IAIvB,iFAAiF;;cACxD,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;IACrD,gGAAgG;;cAE9E,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC;;;;;;;;IAJpE,iFAAiF;;cACxD,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;IACrD,gGAAgG;;cAE9E,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC;;;;;;4EAmBtE,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { lazyComponent as e } from "../lib/lazy.js";
|
|
2
|
+
import { standaloneWidgetCount as t, starterKitDashboardWidgets as n } from "@alfakit/core";
|
|
3
|
+
import { usePage as r } from "@inertiajs/vue3";
|
|
4
|
+
import { computed as i, defineComponent as a, h as o } from "vue";
|
|
5
|
+
//#region src/starter-kit/dashboard-widgets.ts
|
|
6
|
+
var s = a({
|
|
7
|
+
name: "AlfakitWidgetsPlaceholder",
|
|
8
|
+
props: {
|
|
9
|
+
component: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
components: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: void 0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(e) {
|
|
19
|
+
return () => o("div", {
|
|
20
|
+
"data-slot": "starter-kit-widgets-placeholder",
|
|
21
|
+
"aria-busy": "true",
|
|
22
|
+
class: "grid auto-rows-min gap-4 md:grid-cols-2"
|
|
23
|
+
}, Array.from({ length: Math.max(t(e.component), 1) }, (e, t) => o("div", {
|
|
24
|
+
key: t,
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
class: "bg-muted h-28 animate-pulse rounded-xl"
|
|
27
|
+
})));
|
|
28
|
+
}
|
|
29
|
+
}), c = e("AlfakitLoadedWidgets", () => import("../standalone/AlfakitComponent.js").then((e) => e.default), s), l = a({
|
|
30
|
+
name: "AlfakitWidgets",
|
|
31
|
+
inheritAttrs: !1,
|
|
32
|
+
props: {
|
|
33
|
+
panel: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: void 0
|
|
36
|
+
},
|
|
37
|
+
components: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: void 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
setup(e, { attrs: t, slots: a }) {
|
|
43
|
+
let s = r(), l = i(() => n(s.props, e.panel));
|
|
44
|
+
return () => l.value ? o("div", { "data-slot": "starter-kit-widgets" }, [o(c, {
|
|
45
|
+
component: l.value,
|
|
46
|
+
components: e.components,
|
|
47
|
+
class: t.class
|
|
48
|
+
})]) : a.default?.();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { l as AlfakitWidgets };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=dashboard-widgets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-widgets.js","names":["WidgetsPlaceholder","defineComponent","h","standaloneWidgetCount","props","index","LoadedWidgets","lazyComponent","module","AlfakitWidgets","page","usePage","component","computed","starterKitDashboardWidgets","attrs","slots"],"sources":["../../src/starter-kit/dashboard-widgets.ts"],"sourcesContent":["import {\n standaloneWidgetCount,\n starterKitDashboardWidgets,\n type StandaloneComponentSchema,\n} from '@alfakit/core'\nimport { usePage } from '@inertiajs/vue3'\nimport { computed, defineComponent, h, type PropType } from 'vue'\nimport type { AnyComponent } from '../context'\nimport { lazyComponent } from '../lib/lazy'\n\n/** Widget-sized boxes until the widgets' code has loaded (also during SSR). */\nconst WidgetsPlaceholder = defineComponent({\n name: 'AlfakitWidgetsPlaceholder',\n props: {\n component: { type: Object as PropType<StandaloneComponentSchema>, required: true },\n // Declared so it does not fall through as an attribute.\n components: { type: Object as PropType<Record<string, AnyComponent>>, default: undefined },\n },\n setup(props) {\n return () =>\n h(\n 'div',\n {\n 'data-slot': 'starter-kit-widgets-placeholder',\n 'aria-busy': 'true',\n class: 'grid auto-rows-min gap-4 md:grid-cols-2',\n },\n Array.from({ length: Math.max(standaloneWidgetCount(props.component), 1) }, (_, index) =>\n h('div', {\n key: index,\n 'aria-hidden': 'true',\n class: 'bg-muted h-28 animate-pulse rounded-xl',\n }),\n ),\n )\n },\n})\n\nconst LoadedWidgets = lazyComponent(\n 'AlfakitLoadedWidgets',\n () => import('../standalone/AlfakitComponent.vue').then((module) => module.default),\n WidgetsPlaceholder,\n)\n\n/**\n * The dashboard widgets of a `starterKit()` panel on the host's own dashboard. Reads the\n * `alfakitWidgets` prop (shared on the panel's `starterKitDashboard()` pages only, the\n * starter kit's `/dashboard` by default) and renders the widgets with the host's theme, as\n * `<AlfakitComponent>` renders standalone widgets: lazy widgets, polling and table widget\n * actions go through the panel's endpoints. Its code loads once mounted; the server render\n * and hydration show placeholders. Renders its default slot (the kit's placeholder boxes)\n * when there are no widgets to show: other pages, guests, users who may not open the panel.\n *\n * ```vue\n * <script setup lang=\"ts\">\n * import { AlfakitWidgets } from '@alfakit/vue'\n * </script>\n *\n * <template>\n * <AlfakitWidgets>\n * <MyEmptyState />\n * </AlfakitWidgets>\n * </template>\n * ```\n */\nexport const AlfakitWidgets = defineComponent({\n name: 'AlfakitWidgets',\n inheritAttrs: false,\n props: {\n /** The `starterKit()` panel whose widgets to show (the first one by default). */\n panel: { type: String as PropType<string | undefined>, default: undefined },\n /** Frontend components of custom widgets (`{ RevenueWidget }`), as for `<AlfakitComponent>`. */\n components: {\n type: Object as PropType<Record<string, AnyComponent> | undefined>,\n default: undefined,\n },\n },\n setup(props, { attrs, slots }) {\n const page = usePage()\n const component = computed(() => starterKitDashboardWidgets(page.props, props.panel))\n\n return () =>\n component.value\n ? h('div', { 'data-slot': 'starter-kit-widgets' }, [\n h(LoadedWidgets, {\n component: component.value,\n components: props.components,\n class: attrs.class,\n }),\n ])\n : slots.default?.()\n },\n})\n"],"mappings":";;;;;AAWA,IAAMA,IAAqBC,EAAgB;CACzC,MAAM;CACN,OAAO;EACL,WAAW;GAAE,MAAM;GAA+C,UAAU;EAAK;EAEjF,YAAY;GAAE,MAAM;GAAkD,SAAS,KAAA;EAAU;CAC3F;CACA,MAAM,GAAO;EACX,aACEC,EACE,OACA;GACE,aAAa;GACb,aAAa;GACb,OAAO;EACT,GACA,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAIC,EAAsBC,EAAM,SAAS,GAAG,CAAC,EAAE,IAAI,GAAG,MAC9EF,EAAE,OAAO;GACP,KAAKG;GACL,eAAe;GACf,OAAO;EACT,CAAC,CACH,CACF;CACJ;AACF,CAAC,GAEKC,IAAgBC,EACpB,8BACM,OAAO,oCAAqC,CAAC,MAAM,MAAWC,EAAO,OAAO,GAClFR,CACF,GAuBaS,IAAiBR,EAAgB;CAC5C,MAAM;CACN,cAAc;CACd,OAAO;EAEL,OAAO;GAAE,MAAM;GAAwC,SAAS,KAAA;EAAU;EAE1E,YAAY;GACV,MAAM;GACN,SAAS,KAAA;EACX;CACF;CACA,MAAM,GAAO,EAAE,UAAO,YAAS;EAC7B,IAAMS,IAAOC,EAAQ,GACfC,IAAYC,QAAeC,EAA2BJ,EAAK,OAAON,EAAM,KAAK,CAAC;EAEpF,aACEQ,EAAU,QACNV,EAAE,OAAO,EAAE,aAAa,sBAAsB,GAAG,CAC/CA,EAAEI,GAAe;GACf,WAAWM,EAAU;GACrB,YAAYR,EAAM;GAClB,OAAOW,EAAM;EACf,CAAC,CACH,CAAC,IACDC,EAAM,UAAU;CACxB;AACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as AlfakitStarterKitRoot } from './AlfakitStarterKitRoot.vue';
|
|
2
|
+
export { AlfakitWidgets } from './dashboard-widgets';
|
|
2
3
|
export { useAlfakitNavigation, type AlfakitNavigation } from './navigation';
|
|
3
4
|
export { createStarterKitPage, type StarterKitPageOptions } from './starter-kit';
|
|
4
5
|
export { default as StarterKitContentLayout } from './StarterKitContentLayout.vue';
|
|
5
|
-
export { AlfakitNotifications, AlfakitSearch, AlfakitTenantSwitcher } from './widgets';
|
|
6
|
+
export { AlfakitCopilot, AlfakitNotifications, AlfakitSearch, AlfakitTenantSwitcher, } from './widgets';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/starter-kit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/starter-kit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAClF,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,qBAAqB,GACtB,MAAM,WAAW,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import e from "./StarterKitContentLayout.js";
|
|
2
2
|
import t from "./AlfakitStarterKitRoot.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { AlfakitWidgets as n } from "./dashboard-widgets.js";
|
|
4
|
+
import { useAlfakitNavigation as r } from "./navigation.js";
|
|
5
|
+
import { createStarterKitPage as i } from "./starter-kit.js";
|
|
6
|
+
import { AlfakitCopilot as a, AlfakitNotifications as o, AlfakitSearch as s, AlfakitTenantSwitcher as c } from "./widgets/index.js";
|
|
7
|
+
export { a as AlfakitCopilot, o as AlfakitNotifications, s as AlfakitSearch, t as AlfakitStarterKitRoot, c as AlfakitTenantSwitcher, n as AlfakitWidgets, e as StarterKitContentLayout, i as createStarterKitPage, r as useAlfakitNavigation };
|
|
@@ -7,6 +7,12 @@ export interface StarterKitPageOptions extends Pick<AlfakitOptions<AnyComponent>
|
|
|
7
7
|
* `null` renders the pages without a host layout.
|
|
8
8
|
*/
|
|
9
9
|
layout?: AnyComponent | null;
|
|
10
|
+
/**
|
|
11
|
+
* Auto-registered custom components, as for `createAlfakit({ discover })`: pass
|
|
12
|
+
* `import.meta.glob('../../alfakit/{fields,columns,entries,widgets,pages,components,blocks}/**\/*.vue')`
|
|
13
|
+
* from `resources/js/pages/Alfakit/Page.vue` and every file there registers under its name.
|
|
14
|
+
*/
|
|
15
|
+
discover?: AlfakitOptions<AnyComponent>['discover'];
|
|
10
16
|
}
|
|
11
17
|
/** @internal The context of the starter kit root (shared by the browser session). */
|
|
12
18
|
export declare function starterKitContext(options: StarterKitPageOptions): AlfakitContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/starter-kit/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/starter-kit/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AASnE,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,cAAc,CAAC,YAAY,CAAC,EAC5B,YAAY,GAAG,OAAO,GAAG,iBAAiB,GAAG,cAAc,GAAG,sBAAsB,CACrF;IACC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAA;CACpD;AAuCD,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,mBAAmB,CASrF"}
|
|
@@ -1,36 +1,40 @@
|
|
|
1
1
|
import { preloadIcons as e } from "../lib/icons.js";
|
|
2
2
|
import { showToast as t } from "../components/notifications/flash-toasts.js";
|
|
3
|
-
import {
|
|
4
|
-
import r from "../
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
3
|
+
import { discoverComponents as n } from "../lib/discovery.js";
|
|
4
|
+
import { createDefaultRegistry as r } from "../registry.js";
|
|
5
|
+
import i from "../layouts/AuthLayout.js";
|
|
6
|
+
import a from "../pages/AlfakitPage.js";
|
|
7
|
+
import { lazyPanelLayouts as o } from "../layouts/lazy-layouts.js";
|
|
8
|
+
import s from "./StarterKitContentLayout.js";
|
|
9
|
+
import { ActionRunner as c, Translator as l, resolveRequestErrorNotification as u } from "@alfakit/core";
|
|
7
10
|
//#region src/starter-kit/runtime.ts
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
+
var d = null;
|
|
12
|
+
function f(e) {
|
|
13
|
+
let d = n(e.discover), f = r().registerMany(o).register("layout:auth", i).register("layout:app", s).registerMany(d.components).registerMany(e.components ?? {}), p = new l();
|
|
11
14
|
return {
|
|
12
|
-
registry:
|
|
15
|
+
registry: f,
|
|
13
16
|
pages: {
|
|
14
|
-
"Alfakit/Page":
|
|
17
|
+
"Alfakit/Page": a,
|
|
18
|
+
...d.pages,
|
|
15
19
|
...e.pages
|
|
16
20
|
},
|
|
17
|
-
translator:
|
|
18
|
-
actions: new
|
|
21
|
+
translator: p,
|
|
22
|
+
actions: new c({
|
|
19
23
|
endpoints: {
|
|
20
24
|
action: "",
|
|
21
25
|
modal: ""
|
|
22
26
|
},
|
|
23
27
|
onError: (e) => {
|
|
24
|
-
let n =
|
|
28
|
+
let n = u(e, null, (e, t, n) => p.t(e, t, n));
|
|
25
29
|
n && t(n);
|
|
26
30
|
}
|
|
27
31
|
})
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
|
-
function
|
|
31
|
-
return e(), typeof window > "u" ?
|
|
34
|
+
function p(t) {
|
|
35
|
+
return e(), typeof window > "u" ? f(t) : (d ??= f(t), d);
|
|
32
36
|
}
|
|
33
37
|
//#endregion
|
|
34
|
-
export {
|
|
38
|
+
export { p as starterKitContext };
|
|
35
39
|
|
|
36
40
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["StarterKitContentLayout","AlfakitPage","AlfakitPage_default","StarterKitContentLayout_default","browserContext","createStarterKitContext","registry","createDefaultRegistry","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["AuthLayout","StarterKitContentLayout","AlfakitPage","AuthLayout_default","AlfakitPage_default","StarterKitContentLayout_default","browserContext","createStarterKitContext","discovered","discoverComponents","options","registry","createDefaultRegistry","lazyPanelLayouts","translator","Translator","ActionRunner","notification","resolveRequestErrorNotification","error","key","replacements","fallback","showToast","starterKitContext","preloadIcons"],"sources":["../../src/starter-kit/runtime.ts"],"sourcesContent":["import {\n ActionRunner,\n Translator,\n resolveRequestErrorNotification,\n type AlfakitOptions,\n} from '@alfakit/core'\nimport { showToast } from '../components/notifications/flash-toasts'\nimport type { AlfakitContextValue, AnyComponent } from '../context'\nimport AuthLayout from '../layouts/AuthLayout.vue'\nimport { lazyPanelLayouts } from '../layouts/lazy-layouts'\nimport { discoverComponents } from '../lib/discovery'\nimport { preloadIcons } from '../lib/icons'\nimport AlfakitPage from '../pages/AlfakitPage.vue'\nimport { createDefaultRegistry } from '../registry'\nimport StarterKitContentLayout from './StarterKitContentLayout.vue'\n\nexport interface StarterKitPageOptions extends Pick<\n AlfakitOptions<AnyComponent>,\n 'components' | 'pages' | 'chartFormatters' | 'chartPlugins' | 'richEditorExtensions'\n> {\n /**\n * The host layout Alfakit pages render in, usually the starter kit's `AppLayout`\n * (`@/layouts/AppLayout.vue`). It receives the page's breadcrumbs as `{ title, href }`.\n * `null` renders the pages without a host layout.\n */\n layout?: AnyComponent | null\n /**\n * Auto-registered custom components, as for `createAlfakit({ discover })`: pass\n * `import.meta.glob('../../alfakit/{fields,columns,entries,widgets,pages,components,blocks}/**\\/*.vue')`\n * from `resources/js/pages/Alfakit/Page.vue` and every file there registers under its name.\n */\n discover?: AlfakitOptions<AnyComponent>['discover']\n}\n\n// One context for the browser session (it survives navigations between host and Alfakit\n// pages); a server render builds one per request so concurrent renders never share a locale.\nlet browserContext: AlfakitContextValue | null = null\n\nfunction createStarterKitContext(options: StarterKitPageOptions): AlfakitContextValue {\n // The host's layout replaces the panel's. Auth pages (invitations, tenant registration)\n // keep the panel's card; the fullscreen layout loads on demand.\n // Auto-registered files sit between the built-ins and the explicit `components` / `pages`.\n const discovered = discoverComponents(options.discover)\n const registry = createDefaultRegistry()\n .registerMany(lazyPanelLayouts)\n .register('layout:auth', AuthLayout)\n .register('layout:app', StarterKitContentLayout)\n .registerMany(discovered.components)\n .registerMany(options.components ?? {})\n const translator = new Translator()\n\n return {\n registry,\n pages: { 'Alfakit/Page': AlfakitPage, ...discovered.pages, ...options.pages },\n translator,\n actions: new ActionRunner({\n endpoints: { action: '', modal: '' },\n // A failed action request is a toast, never a silent no-op.\n onError: (error) => {\n const notification = resolveRequestErrorNotification(\n error,\n null,\n (key, replacements, fallback) => translator.t(key, replacements, fallback),\n )\n\n if (notification) showToast(notification)\n },\n }),\n }\n}\n\n/** @internal The context of the starter kit root (shared by the browser session). */\nexport function starterKitContext(options: StarterKitPageOptions): AlfakitContextValue {\n // Panel pages draw named icons: fetch the name → chunk map with the page.\n preloadIcons()\n\n if (typeof window === 'undefined') return createStarterKitContext(options)\n\n browserContext ??= createStarterKitContext(options)\n\n return browserContext\n}\n"],"mappings":";;;;;;;;;;AAoCA,IAAIM,IAA6C;AAEjD,SAASC,EAAwB,GAAqD;CAIpF,IAAMC,IAAaC,EAAmBC,EAAQ,QAAQ,GAChDC,IAAWC,EAAsB,CAAC,CACrC,aAAaC,CAAgB,CAAC,CAC9B,SAAS,eAAeb,CAAU,CAAC,CACnC,SAAS,cAAcC,CAAuB,CAAC,CAC/C,aAAaO,EAAW,UAAU,CAAC,CACnC,aAAaE,EAAQ,cAAc,CAAC,CAAC,GAClCI,IAAa,IAAIC,EAAW;CAElC,OAAO;EACL;EACA,OAAO;GAAE,gBAAgBb;GAAa,GAAGM,EAAW;GAAO,GAAGE,EAAQ;EAAM;EAC5E;EACA,SAAS,IAAIM,EAAa;GACxB,WAAW;IAAE,QAAQ;IAAI,OAAO;GAAG;GAEnC,UAAU,MAAU;IAClB,IAAMC,IAAeC,EACnBC,GACA,OACC,GAAK,GAAc,MAAaL,EAAW,EAAEM,GAAKC,GAAcC,CAAQ,CAC3E;IAEA,AAAIL,KAAcM,EAAUN,CAAY;GAC1C;EACF,CAAC;CACH;AACF;AAGA,SAAgBO,EAAkB,GAAqD;CAQrF,OANAC,EAAa,GAET,OAAO,SAAW,MAAoBlB,EAAwBG,CAAO,KAEzE,MAAmBH,EAAwBG,CAAO,GAE3CJ;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter-kit.d.ts","sourceRoot":"","sources":["../../src/starter-kit/starter-kit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"starter-kit.d.ts","sourceRoot":"","sources":["../../src/starter-kit/starter-kit.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B;;;;;;;;;;;;;;;;;;;oBAYpD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;EAO1C"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import e from "../pages/AlfakitPage.js";
|
|
2
2
|
import t from "./AlfakitStarterKitRoot.js";
|
|
3
|
-
import { configureCharts as n, registerRichEditorExtensions as r, starterKitBreadcrumbsFromProps as i } from "@alfakit/core";
|
|
4
|
-
import { defineComponent as
|
|
3
|
+
import { configureCharts as n, registerRichEditorExtensions as r, starterKitBreadcrumbsFromProps as i, usesStarterKitHostLayout as a } from "@alfakit/core";
|
|
4
|
+
import { defineComponent as o, h as s, markRaw as c } from "vue";
|
|
5
5
|
//#region src/starter-kit/starter-kit.ts
|
|
6
|
-
function
|
|
7
|
-
n(
|
|
8
|
-
let
|
|
6
|
+
function l(l = {}) {
|
|
7
|
+
n(l), r(l.richEditorExtensions ?? {});
|
|
8
|
+
let u = o({
|
|
9
9
|
name: "AlfakitStarterKitPage",
|
|
10
|
-
setup: () => () =>
|
|
10
|
+
setup: () => () => s(e)
|
|
11
11
|
});
|
|
12
|
-
return Object.assign(
|
|
12
|
+
return Object.assign(u, { layout: (e) => [...l.layout && a(e) ? [[c(l.layout), { breadcrumbs: i(e) }]] : [], [t, { options: l }]] });
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { l as createStarterKitPage };
|
|
16
16
|
|
|
17
17
|
//# sourceMappingURL=starter-kit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter-kit.js","names":["AlfakitPage","AlfakitStarterKitRoot","AlfakitPage_default","AlfakitStarterKitRoot_default","createStarterKitPage","configureCharts","options","registerRichEditorExtensions","page","defineComponent","h","
|
|
1
|
+
{"version":3,"file":"starter-kit.js","names":["AlfakitPage","AlfakitStarterKitRoot","AlfakitPage_default","AlfakitStarterKitRoot_default","createStarterKitPage","configureCharts","options","registerRichEditorExtensions","page","defineComponent","h","usesStarterKitHostLayout","props","markRaw","starterKitBreadcrumbsFromProps"],"sources":["../../src/starter-kit/starter-kit.ts"],"sourcesContent":["import {\n configureCharts,\n registerRichEditorExtensions,\n starterKitBreadcrumbsFromProps,\n usesStarterKitHostLayout,\n} from '@alfakit/core'\nimport { defineComponent, h, markRaw } from 'vue'\nimport AlfakitPage from '../pages/AlfakitPage.vue'\nimport AlfakitStarterKitRoot from './AlfakitStarterKitRoot.vue'\nimport type { StarterKitPageOptions } from './runtime'\n\nexport type { StarterKitPageOptions } from './runtime'\n\n/**\n * The page component for `Alfakit/Page` in a starter kit app: the host's\n * `resources/js/pages/Alfakit/Page.vue` (written by `alfakit:install --starter-kit`) exports\n * it, so Inertia's page resolution, the root view's page preload and SSR all find it like any\n * other host page.\n *\n * ```vue\n * <script lang=\"ts\">\n * import { createStarterKitPage } from '@alfakit/vue'\n * import AppLayout from '@/layouts/AppLayout.vue'\n *\n * export default createStarterKitPage({ layout: AppLayout })\n * </script>\n * ```\n */\nexport function createStarterKitPage(options: StarterKitPageOptions = {}) {\n // `'js:name'` chart option callbacks, Chart.js plugins and rich editor extensions.\n configureCharts(options)\n registerRichEditorExtensions(options.richEditorExtensions ?? {})\n\n const page = defineComponent({\n name: 'AlfakitStarterKitPage',\n setup: () => () => h(AlfakitPage),\n })\n\n // A layout callback: the host layout (with the page's breadcrumbs), then Alfakit's root.\n return Object.assign(page, {\n layout: (props: Record<string, unknown>) => [\n ...(options.layout && usesStarterKitHostLayout(props)\n ? [[markRaw(options.layout), { breadcrumbs: starterKitBreadcrumbsFromProps(props) }]]\n : []),\n [AlfakitStarterKitRoot, { options }],\n ],\n })\n}\n"],"mappings":";;;;;AA4BA,SAAgBI,EAAqB,IAAiC,CAAC,GAAG;CAGxE,AADAC,EAAgBC,CAAO,GACvBC,EAA6BD,EAAQ,wBAAwB,CAAC,CAAC;CAE/D,IAAME,IAAOC,EAAgB;EAC3B,MAAM;EACN,mBAAmBC,EAAEV,CAAW;CAClC,CAAC;CAGD,OAAO,OAAO,OAAOQ,GAAM,EACzB,SAAS,MAAmC,CAC1C,GAAIF,EAAQ,UAAUK,EAAyBC,CAAK,IAChD,CAAC,CAACC,EAAQP,EAAQ,MAAM,GAAG,EAAE,aAAaQ,EAA+BF,CAAK,EAAE,CAAC,CAAC,IAClF,CAAC,GACL,CAACX,GAAuB,EAAE,WAAQ,CAAC,CACrC,EACF,CAAC;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopilotTrigger.js","names":["_sfc_main","CopilotTrigger_vue_vue_type_script_setup_true_lang_default","CopilotTrigger_default"],"sources":["../../../src/starter-kit/widgets/CopilotTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n registerStarterKitCopilotShortcut,\n requestStarterKitCopilot,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { computed, watch } from 'vue'\n\n/**\n * The AI copilot's button until its code has loaded: the same look, from the shared prop\n * alone (its code loads once mounted). A click and its key bindings (`mod+j`) are\n * remembered and open it once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets }>()\n\nconst copilot = computed(() => props.source.widgets.copilot)\n\nif (typeof window !== 'undefined') {\n watch(\n copilot,\n (value, _old, onCleanup) =>\n onCleanup(registerStarterKitCopilotShortcut(value?.keyBindings ?? [], value?.label ?? '')),\n { immediate: true },\n )\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n data-slot=\"ai-copilot-trigger\"\n :aria-label=\"copilot?.label\"\n aria-haspopup=\"dialog\"\n :title=\"copilot?.label\"\n class=\"hover:bg-accent hover:text-accent-foreground inline-flex size-9 items-center justify-center rounded-md\"\n @click=\"requestStarterKitCopilot()\"\n >\n <!-- Lucide's \"sparkles\", inline: the loaded copilot draws the same icon. -->\n <svg\n class=\"size-4\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\"\n />\n <path d=\"M20 2v4\" />\n <path d=\"M22 4h-4\" />\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </svg>\n </button>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type StarterKitWidgets } from '@alfakit/core';
|
|
2
|
+
/**
|
|
3
|
+
* The AI copilot's button until its code has loaded: the same look, from the shared prop
|
|
4
|
+
* alone (its code loads once mounted). A click and its key bindings (`mod+j`) are
|
|
5
|
+
* remembered and open it once loaded.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
source: StarterKitWidgets;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=CopilotTrigger.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopilotTrigger.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/CopilotTrigger.vue"],"names":[],"mappings":"AA4DA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAA;AAGtB;;;;GAIG;AACH,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AAuFjD,wBAMG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { registerStarterKitCopilotShortcut as e, requestStarterKitCopilot as t } from "@alfakit/core";
|
|
2
|
+
import { computed as n, createElementBlock as r, createStaticVNode as i, defineComponent as a, openBlock as o, unref as s, watch as c } from "vue";
|
|
3
|
+
//#region src/starter-kit/widgets/CopilotTrigger.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var l = ["aria-label", "title"], u = /*@__PURE__*/ a({
|
|
5
|
+
__name: "CopilotTrigger",
|
|
6
|
+
props: { source: {} },
|
|
7
|
+
setup(a) {
|
|
8
|
+
let u = a, d = n(() => u.source.widgets.copilot);
|
|
9
|
+
return typeof window < "u" && c(d, (t, n, r) => r(e(t?.keyBindings ?? [], t?.label ?? "")), { immediate: !0 }), (e, n) => (o(), r("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
"data-slot": "ai-copilot-trigger",
|
|
12
|
+
"aria-label": d.value?.label,
|
|
13
|
+
"aria-haspopup": "dialog",
|
|
14
|
+
title: d.value?.label,
|
|
15
|
+
class: "hover:bg-accent hover:text-accent-foreground inline-flex size-9 items-center justify-center rounded-md",
|
|
16
|
+
onClick: n[0] ||= (e) => s(t)()
|
|
17
|
+
}, [...n[1] ||= [i("<svg class=\"size-4\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\"></path><path d=\"M20 2v4\"></path><path d=\"M22 4h-4\"></path><circle cx=\"4\" cy=\"20\" r=\"2\"></circle></svg>", 1)]], 8, l));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { u as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=CopilotTrigger.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopilotTrigger.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_unref","_createStaticVNode","_hoisted_1","CopilotTrigger_vue_vue_type_script_setup_true_lang_default","props","__props","copilot","computed","watch","onCleanup","registerStarterKitCopilotShortcut","value","openBlock","createElementBlock","_cache","unref","requestStarterKitCopilot","createStaticVNode"],"sources":["../../../src/starter-kit/widgets/CopilotTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n registerStarterKitCopilotShortcut,\n requestStarterKitCopilot,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { computed, watch } from 'vue'\n\n/**\n * The AI copilot's button until its code has loaded: the same look, from the shared prop\n * alone (its code loads once mounted). A click and its key bindings (`mod+j`) are\n * remembered and open it once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets }>()\n\nconst copilot = computed(() => props.source.widgets.copilot)\n\nif (typeof window !== 'undefined') {\n watch(\n copilot,\n (value, _old, onCleanup) =>\n onCleanup(registerStarterKitCopilotShortcut(value?.keyBindings ?? [], value?.label ?? '')),\n { immediate: true },\n )\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n data-slot=\"ai-copilot-trigger\"\n :aria-label=\"copilot?.label\"\n aria-haspopup=\"dialog\"\n :title=\"copilot?.label\"\n class=\"hover:bg-accent hover:text-accent-foreground inline-flex size-9 items-center justify-center rounded-md\"\n @click=\"requestStarterKitCopilot()\"\n >\n <!-- Lucide's \"sparkles\", inline: the loaded copilot draws the same icon. -->\n <svg\n class=\"size-4\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\"\n />\n <path d=\"M20 2v4\" />\n <path d=\"M22 4h-4\" />\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </svg>\n </button>\n</template>\n"],"mappings":";;;;;;;EAaA,IAAMM,IAAQC,GAERC,IAAUC,QAAeH,EAAM,OAAO,QAAQ,OAAO;SAEvD,OAAO,SAAW,OACpBI,EACEF,IACC,GAAO,GAAM,MACZG,EAAUC,EAAkCC,GAAO,eAAe,CAAC,GAAGA,GAAO,SAAS,EAAE,CAAC,GAC3F,EAAE,WAAW,GAAK,CACpB,cAKAb,EAAA,GAAAC,EA4BS,UAAA;GA3BP,MAAK;GACL,aAAU;GACT,cAAYO,EAAA,OAAS;GACtB,iBAAc;GACb,OAAOA,EAAA,OAAS;GACjB,OAAM;GACL,SAAK,AAAAQ,EAAA,QAAA,MAAEd,EAAAgB,CAAA,CAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadedCopilot.js","names":["_sfc_main","LoadedCopilot_vue_vue_type_script_setup_true_lang_default","LoadedCopilot_default"],"sources":["../../../src/starter-kit/widgets/LoadedCopilot.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n starterKitCopilot,\n takeRequestedStarterKitCopilot,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { computed, toRef } from 'vue'\nimport AiCopilot from '../../components/ai/AiCopilot.vue'\nimport CopilotTrigger from './CopilotTrigger.vue'\nimport { useWidgetsPanel } from './use-widgets'\nimport WidgetShell from './WidgetShell.vue'\n\n/** The AI copilot (the panel pages' `topbar.end` slot component), once its data has loaded. */\nconst props = defineProps<{ source: StarterKitWidgets }>()\n\nconst panel = useWidgetsPanel(toRef(props, 'source'))\nconst component = computed(() => (panel.value ? starterKitCopilot(panel.value) : null))\n// A click or the key bindings before the copilot loaded open it at once.\nconst autoOpen = computed(() => component.value !== null && takeRequestedStarterKitCopilot())\n</script>\n\n<template>\n <template v-if=\"panel\">\n <WidgetShell v-if=\"component\" :panel=\"panel\">\n <AiCopilot :component=\"component\" :auto-open=\"autoOpen\" />\n </WidgetShell>\n </template>\n <CopilotTrigger v-else :source=\"props.source\" />\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type StarterKitWidgets } from '@alfakit/core';
|
|
2
|
+
/** The AI copilot (the panel pages' `topbar.end` slot component), once its data has loaded. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
source: StarterKitWidgets;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=LoadedCopilot.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadedCopilot.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/LoadedCopilot.vue"],"names":[],"mappings":"AA+BA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAA;AAOtB,+FAA+F;AAC/F,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AA+EjD,wBAMG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import e from "../../components/ai/AiCopilot.js";
|
|
2
|
+
import t from "./CopilotTrigger.js";
|
|
3
|
+
import { useWidgetsPanel as n } from "./use-widgets.js";
|
|
4
|
+
import r from "./WidgetShell.js";
|
|
5
|
+
import { starterKitCopilot as i, takeRequestedStarterKitCopilot as a } from "@alfakit/core";
|
|
6
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createVNode as d, defineComponent as f, openBlock as p, toRef as m, unref as h, withCtx as g } from "vue";
|
|
7
|
+
//#region src/starter-kit/widgets/LoadedCopilot.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _ = /*@__PURE__*/ f({
|
|
9
|
+
__name: "LoadedCopilot",
|
|
10
|
+
props: { source: {} },
|
|
11
|
+
setup(f) {
|
|
12
|
+
let _ = f, v = n(m(_, "source")), y = s(() => v.value ? i(v.value) : null), b = s(() => y.value !== null && a());
|
|
13
|
+
return (n, i) => h(v) ? (p(), u(o, { key: 0 }, [y.value ? (p(), c(r, {
|
|
14
|
+
key: 0,
|
|
15
|
+
panel: h(v)
|
|
16
|
+
}, {
|
|
17
|
+
default: g(() => [d(e, {
|
|
18
|
+
component: y.value,
|
|
19
|
+
"auto-open": b.value
|
|
20
|
+
}, null, 8, ["component", "auto-open"])]),
|
|
21
|
+
_: 1
|
|
22
|
+
}, 8, ["panel"])) : l("", !0)], 64)) : (p(), c(t, {
|
|
23
|
+
key: 1,
|
|
24
|
+
source: _.source
|
|
25
|
+
}, null, 8, ["source"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { _ as default };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=LoadedCopilot.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadedCopilot.vue_vue_type_script_setup_true_lang.js","names":["_unref","_openBlock","_createElementBlock","_Fragment","_createBlock","WidgetShell","_withCtx","_createVNode","AiCopilot","_createCommentVNode","CopilotTrigger","AiCopilot_default","CopilotTrigger_default","WidgetShell_default","LoadedCopilot_vue_vue_type_script_setup_true_lang_default","props","__props","panel","useWidgetsPanel","toRef","component","computed","starterKitCopilot","autoOpen","takeRequestedStarterKitCopilot","unref","openBlock","createElementBlock","Fragment","createBlock","withCtx","createVNode","createCommentVNode"],"sources":["../../../src/starter-kit/widgets/LoadedCopilot.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n starterKitCopilot,\n takeRequestedStarterKitCopilot,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { computed, toRef } from 'vue'\nimport AiCopilot from '../../components/ai/AiCopilot.vue'\nimport CopilotTrigger from './CopilotTrigger.vue'\nimport { useWidgetsPanel } from './use-widgets'\nimport WidgetShell from './WidgetShell.vue'\n\n/** The AI copilot (the panel pages' `topbar.end` slot component), once its data has loaded. */\nconst props = defineProps<{ source: StarterKitWidgets }>()\n\nconst panel = useWidgetsPanel(toRef(props, 'source'))\nconst component = computed(() => (panel.value ? starterKitCopilot(panel.value) : null))\n// A click or the key bindings before the copilot loaded open it at once.\nconst autoOpen = computed(() => component.value !== null && takeRequestedStarterKitCopilot())\n</script>\n\n<template>\n <template v-if=\"panel\">\n <WidgetShell v-if=\"component\" :panel=\"panel\">\n <AiCopilot :component=\"component\" :auto-open=\"autoOpen\" />\n </WidgetShell>\n </template>\n <CopilotTrigger v-else :source=\"props.source\" />\n</template>\n"],"mappings":";;;;;;;;;;;EAaA,IAAMe,IAAQC,GAERC,IAAQC,EAAgBC,EAAMJ,GAAO,QAAQ,CAAC,GAC9CK,IAAYC,QAAgBJ,EAAM,QAAQK,EAAkBL,EAAM,KAAK,IAAI,IAAK,GAEhFM,IAAWF,QAAeD,EAAU,UAAU,QAAQI,EAA+B,CAAC;mBAI1ExB,EAAAiB,CAAA,KAAhBhB,EAAA,GAAAC,EAIWC,GAAA,EAAA,KAAA,EAAA,GAAA,CAHUiB,EAAA,SAAnBnB,EAAA,GAAAG,EAEcC,GAAA;;GAFiB,OAAOL,EAAAiB,CAAA;;GACpC,SAAAX,QAA0D,CAA1DC,EAA0DC,GAAA;IAA9C,WAAWY,EAAA;IAAY,aAAWG,EAAA;;;EAGlDtB,GAAAA,GAAAA,CAAAA,OAAAA,CAAAA,KAAAA,EAAAA,IAAAA,EAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAA,GAAAG,EAAgDM,GAAA;;GAAxB,QAAQK,EAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTrigger.js","names":["_sfc_main","SearchTrigger_vue_vue_type_script_setup_true_lang_default","SearchTrigger_default"],"sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n formatKeyBinding,\n registerStarterKitSearchShortcut,\n requestStarterKitSearch,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, watch } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\n\n/**\n * The search field until the palette has loaded: the same look, from the shared prop\n * alone. Its key bindings and a click are remembered and open the palette once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets; onLoad?: () => void }>()\n\nconst hydrated = useHydrated()\nconst search = computed(() => props.source.widgets.search)\nconst placeholder = computed(() => search.value?.placeholder ?? '')\nconst binding = computed(() => search.value?.keyBindings[0])\n\nif (typeof window !== 'undefined') {\n watch(\n () => [JSON.stringify(search.value?.keyBindings ?? ['mod+k']), placeholder.value] as const,\n ([keys, label], _old, onCleanup) =>\n onCleanup(\n registerStarterKitSearchShortcut(JSON.parse(keys) as string[], label, () =>\n props.onLoad?.(),\n ),\n ),\n { immediate: true },\n )\n}\n\nfunction request() {\n requestStarterKitSearch()\n props.onLoad?.()\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-input bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 focus-visible:ring-ring/50 text-muted-foreground inline-flex size-8 h-8 shrink-0 items-center justify-center gap-2 rounded-md border px-0 text-sm font-normal shadow-xs outline-none focus-visible:ring-[3px] sm:w-56 sm:justify-start sm:px-2.5\"\n @pointerenter=\"props.onLoad?.()\"\n @click=\"request\"\n >\n <SearchIcon class=\"size-4\" aria-hidden=\"true\" />\n <span class=\"sr-only sm:not-sr-only sm:flex-1 sm:text-start\">{{ placeholder }}</span>\n <kbd\n v-if=\"hydrated && binding\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(binding) }}</kbd\n >\n </button>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"SearchTrigger.js","names":["_sfc_main","SearchTrigger_vue_vue_type_script_setup_true_lang_default","SearchTrigger_default"],"sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n formatKeyBinding,\n registerStarterKitSearchShortcut,\n requestStarterKitSearch,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, watch } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\n\n/**\n * The search field until the palette has loaded: the same look, from the shared prop\n * alone. Its key bindings and a click are remembered and open the palette once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets; onLoad?: () => void }>()\n\nconst hydrated = useHydrated()\nconst search = computed(() => props.source.widgets.search)\nconst placeholder = computed(() => search.value?.placeholder ?? '')\nconst binding = computed(() => search.value?.keyBindings[0])\n\nif (typeof window !== 'undefined') {\n watch(\n () => [JSON.stringify(search.value?.keyBindings ?? ['mod+k']), placeholder.value] as const,\n ([keys, label], _old, onCleanup) =>\n onCleanup(\n registerStarterKitSearchShortcut(JSON.parse(keys) as string[], label, () =>\n props.onLoad?.(),\n ),\n ),\n { immediate: true },\n )\n}\n\nfunction request() {\n requestStarterKitSearch()\n props.onLoad?.()\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-input bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 focus-visible:ring-ring/50 text-muted-foreground inline-flex size-8 h-8 shrink-0 items-center justify-center gap-2 rounded-md border px-0 text-sm font-normal shadow-xs outline-none focus-visible:ring-[3px] sm:w-56 sm:justify-start sm:px-2.5\"\n @pointerenter=\"props.onLoad?.()\"\n @click=\"request\"\n >\n <SearchIcon class=\"size-4\" aria-hidden=\"true\" />\n <span class=\"sr-only sm:not-sr-only sm:flex-1 sm:text-start\">{{ placeholder }}</span>\n <kbd\n v-if=\"hydrated && binding\"\n dir=\"ltr\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(binding) }}</kbd\n >\n </button>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTrigger.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchTrigger.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"names":[],"mappings":"AA4DA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAA;AAKtB;;;GAGG;AACH,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;;AAgItE,wBAMG"}
|
|
@@ -5,6 +5,7 @@ import { SearchIcon as m } from "@lucide/vue";
|
|
|
5
5
|
//#region src/starter-kit/widgets/SearchTrigger.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var h = { class: "sr-only sm:not-sr-only sm:flex-1 sm:text-start" }, g = {
|
|
7
7
|
key: 0,
|
|
8
|
+
dir: "ltr",
|
|
8
9
|
class: "bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline"
|
|
9
10
|
}, _ = /*@__PURE__*/ l({
|
|
10
11
|
__name: "SearchTrigger",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTrigger.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_unref","_createElementVNode","_toDisplayString","_createCommentVNode","_hoisted_1","_hoisted_2","SearchTrigger_vue_vue_type_script_setup_true_lang_default","props","__props","hydrated","useHydrated","search","computed","placeholder","binding","watch","keys","label","onCleanup","registerStarterKitSearchShortcut","request","requestStarterKitSearch","openBlock","createElementBlock","_cache","createVNode","unref","SearchIcon","createElementVNode","toDisplayString","formatKeyBinding","createCommentVNode"],"sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n formatKeyBinding,\n registerStarterKitSearchShortcut,\n requestStarterKitSearch,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, watch } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\n\n/**\n * The search field until the palette has loaded: the same look, from the shared prop\n * alone. Its key bindings and a click are remembered and open the palette once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets; onLoad?: () => void }>()\n\nconst hydrated = useHydrated()\nconst search = computed(() => props.source.widgets.search)\nconst placeholder = computed(() => search.value?.placeholder ?? '')\nconst binding = computed(() => search.value?.keyBindings[0])\n\nif (typeof window !== 'undefined') {\n watch(\n () => [JSON.stringify(search.value?.keyBindings ?? ['mod+k']), placeholder.value] as const,\n ([keys, label], _old, onCleanup) =>\n onCleanup(\n registerStarterKitSearchShortcut(JSON.parse(keys) as string[], label, () =>\n props.onLoad?.(),\n ),\n ),\n { immediate: true },\n )\n}\n\nfunction request() {\n requestStarterKitSearch()\n props.onLoad?.()\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-input bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 focus-visible:ring-ring/50 text-muted-foreground inline-flex size-8 h-8 shrink-0 items-center justify-center gap-2 rounded-md border px-0 text-sm font-normal shadow-xs outline-none focus-visible:ring-[3px] sm:w-56 sm:justify-start sm:px-2.5\"\n @pointerenter=\"props.onLoad?.()\"\n @click=\"request\"\n >\n <SearchIcon class=\"size-4\" aria-hidden=\"true\" />\n <span class=\"sr-only sm:not-sr-only sm:flex-1 sm:text-start\">{{ placeholder }}</span>\n <kbd\n v-if=\"hydrated && binding\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(binding) }}</kbd\n >\n </button>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchTrigger.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_unref","_createElementVNode","_toDisplayString","_createCommentVNode","_hoisted_1","_hoisted_2","SearchTrigger_vue_vue_type_script_setup_true_lang_default","props","__props","hydrated","useHydrated","search","computed","placeholder","binding","watch","keys","label","onCleanup","registerStarterKitSearchShortcut","request","requestStarterKitSearch","openBlock","createElementBlock","_cache","createVNode","unref","SearchIcon","createElementVNode","toDisplayString","formatKeyBinding","createCommentVNode"],"sources":["../../../src/starter-kit/widgets/SearchTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n formatKeyBinding,\n registerStarterKitSearchShortcut,\n requestStarterKitSearch,\n type StarterKitWidgets,\n} from '@alfakit/core'\nimport { SearchIcon } from '@lucide/vue'\nimport { computed, watch } from 'vue'\nimport { useHydrated } from '../../composables/use-hydrated'\n\n/**\n * The search field until the palette has loaded: the same look, from the shared prop\n * alone. Its key bindings and a click are remembered and open the palette once loaded.\n */\nconst props = defineProps<{ source: StarterKitWidgets; onLoad?: () => void }>()\n\nconst hydrated = useHydrated()\nconst search = computed(() => props.source.widgets.search)\nconst placeholder = computed(() => search.value?.placeholder ?? '')\nconst binding = computed(() => search.value?.keyBindings[0])\n\nif (typeof window !== 'undefined') {\n watch(\n () => [JSON.stringify(search.value?.keyBindings ?? ['mod+k']), placeholder.value] as const,\n ([keys, label], _old, onCleanup) =>\n onCleanup(\n registerStarterKitSearchShortcut(JSON.parse(keys) as string[], label, () =>\n props.onLoad?.(),\n ),\n ),\n { immediate: true },\n )\n}\n\nfunction request() {\n requestStarterKitSearch()\n props.onLoad?.()\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-input bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 focus-visible:ring-ring/50 text-muted-foreground inline-flex size-8 h-8 shrink-0 items-center justify-center gap-2 rounded-md border px-0 text-sm font-normal shadow-xs outline-none focus-visible:ring-[3px] sm:w-56 sm:justify-start sm:px-2.5\"\n @pointerenter=\"props.onLoad?.()\"\n @click=\"request\"\n >\n <SearchIcon class=\"size-4\" aria-hidden=\"true\" />\n <span class=\"sr-only sm:not-sr-only sm:flex-1 sm:text-start\">{{ placeholder }}</span>\n <kbd\n v-if=\"hydrated && binding\"\n dir=\"ltr\"\n class=\"bg-muted hidden rounded px-1 font-mono text-[10px] sm:inline\"\n >{{ formatKeyBinding(binding) }}</kbd\n >\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAeA,IAAMU,IAAQC,GAERC,IAAWC,EAAY,GACvBC,IAASC,QAAeL,EAAM,OAAO,QAAQ,MAAM,GACnDM,IAAcD,QAAeD,EAAO,OAAO,eAAe,EAAE,GAC5DG,IAAUF,QAAeD,EAAO,OAAO,YAAY,EAAE;EAE3D,AAAI,OAAO,SAAW,OACpBI,QACQ,CAAC,KAAK,UAAUJ,EAAO,OAAO,eAAe,CAAC,OAAO,CAAC,GAAGE,EAAY,KAAK,IAC/E,CAACG,GAAMC,IAAQ,GAAM,MACpBC,EACEC,EAAiC,KAAK,MAAMH,CAAI,GAAeC,SAC7DV,EAAM,SAAS,CACjB,CACF,GACF,EAAE,WAAW,GAAK,CACpB;EAGF,SAASa,IAAU;GAEjB,AADAC,EAAwB,GACxBd,EAAM,SAAS;EACjB;oBAIEV,EAAA,GAAAC,EAcS,UAAA;GAbP,MAAK;GACL,OAAM;GACL,gBAAY,AAAA0B,EAAA,QAAA,MAAEjB,EAAM,SAAM;GAC1B,SAAOa;;GAERrB,EAAgDC,EAAA2B,CAAA,GAAA;IAApC,OAAM;IAAS,eAAY;;GACvC1B,EAAqF,QAArFG,GAAqFF,EAArBW,EAAA,KAAW,GAAA,CAAA;GAEnEb,EAAAS,CAAA,KAAYK,EAAA,SADpBjB,EAAA,GAAAC,EAKC,OALDO,GAKCH,EADKF,EAAA8B,CAAA,CAAgB,CAAChB,EAAA,KAAO,CAAA,GAAA,CAAA,KAAAiB,EAAA,IAAA,EAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./StarterKitImpersonationBanner.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/starter-kit/widgets/StarterKitImpersonationBanner.vue
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=StarterKitImpersonationBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarterKitImpersonationBanner.js","names":["_sfc_main","StarterKitImpersonationBanner_vue_vue_type_script_setup_true_lang_default","StarterKitImpersonationBanner_default"],"sources":["../../../src/starter-kit/widgets/StarterKitImpersonationBanner.vue"],"sourcesContent":["<script lang=\"ts\">\n// The header components appear in both header layouts and next to each other: the first\n// one mounted shows the banner, the others render nothing.\nlet owner: symbol | null = null\n</script>\n\n<script setup lang=\"ts\">\nimport { isAlfakitPage, type StarterKitWidgets } from '@alfakit/core'\nimport { usePage } from '@inertiajs/vue3'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport ImpersonationBanner from '../../components/panel/ImpersonationBanner.vue'\n\n/**\n * The impersonation banner (who you are signed in as, **Leave**) on the host's own pages,\n * rendered by the header components. AlfaKit's pages render their own (`AlfakitRoot`).\n */\nconst props = defineProps<{ source: StarterKitWidgets | null }>()\nconst page = usePage()\nconst id = Symbol('impersonation-banner')\nconst owns = ref(false)\nconst impersonation = computed(() => props.source?.widgets.impersonation)\nconst active = computed(() => impersonation.value !== undefined && !isAlfakitPage(page.props))\n\nfunction release(): void {\n if (owner === id) owner = null\n owns.value = false\n}\n\n// Claimed once mounted, so the server render and hydration never include it.\nlet stop: (() => void) | null = null\n\nonMounted(() => {\n stop = watch(\n active,\n (value) => {\n if (!value) {\n release()\n\n return\n }\n\n if (owner === null) owner = id\n owns.value = owner === id\n },\n { immediate: true },\n )\n})\n\nonBeforeUnmount(() => {\n stop?.()\n release()\n})\n</script>\n\n<template>\n <ImpersonationBanner v-if=\"active && owns\" :impersonation=\"impersonation\" />\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type StarterKitWidgets } from '@alfakit/core';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
source: StarterKitWidgets | null;
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
5
|
+
source: StarterKitWidgets | null;
|
|
6
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=StarterKitImpersonationBanner.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarterKitImpersonationBanner.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/StarterKitImpersonationBanner.vue"],"names":[],"mappings":"AA2DA,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;;YAexC,iBAAiB,GAAG,IAAI;;YAAxB,iBAAiB,GAAG,IAAI;;AALrD,wBA6FK"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import e from "../../components/panel/ImpersonationBanner.js";
|
|
2
|
+
import { isAlfakitPage as t } from "@alfakit/core";
|
|
3
|
+
import { usePage as n } from "@inertiajs/vue3";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, defineComponent as o, onBeforeUnmount as s, onMounted as c, openBlock as l, ref as u, watch as d } from "vue";
|
|
5
|
+
//#region src/starter-kit/widgets/StarterKitImpersonationBanner.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = null, p = /*@__PURE__*/ o({
|
|
7
|
+
__name: "StarterKitImpersonationBanner",
|
|
8
|
+
props: { source: {} },
|
|
9
|
+
setup(o) {
|
|
10
|
+
let p = o, m = n(), h = Symbol("impersonation-banner"), g = u(!1), _ = r(() => p.source?.widgets.impersonation), v = r(() => _.value !== void 0 && !t(m.props));
|
|
11
|
+
function y() {
|
|
12
|
+
f === h && (f = null), g.value = !1;
|
|
13
|
+
}
|
|
14
|
+
let b = null;
|
|
15
|
+
return c(() => {
|
|
16
|
+
b = d(v, (e) => {
|
|
17
|
+
if (!e) {
|
|
18
|
+
y();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
f === null && (f = h), g.value = f === h;
|
|
22
|
+
}, { immediate: !0 });
|
|
23
|
+
}), s(() => {
|
|
24
|
+
b?.(), y();
|
|
25
|
+
}), (t, n) => v.value && g.value ? (l(), i(e, {
|
|
26
|
+
key: 0,
|
|
27
|
+
impersonation: _.value
|
|
28
|
+
}, null, 8, ["impersonation"])) : a("", !0);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { p as default };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=StarterKitImpersonationBanner.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarterKitImpersonationBanner.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","ImpersonationBanner","_createCommentVNode","ImpersonationBanner_default","owner","StarterKitImpersonationBanner_vue_vue_type_script_setup_true_lang_default","props","__props","page","usePage","id","owns","ref","impersonation","computed","active","isAlfakitPage","release","stop","onMounted","watch","value","onBeforeUnmount","openBlock","createBlock","createCommentVNode"],"sources":["../../../src/starter-kit/widgets/StarterKitImpersonationBanner.vue"],"sourcesContent":["<script lang=\"ts\">\n// The header components appear in both header layouts and next to each other: the first\n// one mounted shows the banner, the others render nothing.\nlet owner: symbol | null = null\n</script>\n\n<script setup lang=\"ts\">\nimport { isAlfakitPage, type StarterKitWidgets } from '@alfakit/core'\nimport { usePage } from '@inertiajs/vue3'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport ImpersonationBanner from '../../components/panel/ImpersonationBanner.vue'\n\n/**\n * The impersonation banner (who you are signed in as, **Leave**) on the host's own pages,\n * rendered by the header components. AlfaKit's pages render their own (`AlfakitRoot`).\n */\nconst props = defineProps<{ source: StarterKitWidgets | null }>()\nconst page = usePage()\nconst id = Symbol('impersonation-banner')\nconst owns = ref(false)\nconst impersonation = computed(() => props.source?.widgets.impersonation)\nconst active = computed(() => impersonation.value !== undefined && !isAlfakitPage(page.props))\n\nfunction release(): void {\n if (owner === id) owner = null\n owns.value = false\n}\n\n// Claimed once mounted, so the server render and hydration never include it.\nlet stop: (() => void) | null = null\n\nonMounted(() => {\n stop = watch(\n active,\n (value) => {\n if (!value) {\n release()\n\n return\n }\n\n if (owner === null) owner = id\n owns.value = owner === id\n },\n { immediate: true },\n )\n})\n\nonBeforeUnmount(() => {\n stop?.()\n release()\n})\n</script>\n\n<template>\n <ImpersonationBanner v-if=\"active && owns\" :impersonation=\"impersonation\" />\n</template>\n"],"mappings":";;;;;AAGA,IAAIK,IAAuB;;;;EAa3B,IAAME,IAAQC,GACRC,IAAOC,EAAQ,GACfC,IAAK,OAAO,sBAAsB,GAClCC,IAAOC,EAAI,EAAK,GAChBC,IAAgBC,QAAeR,EAAM,QAAQ,QAAQ,aAAa,GAClES,IAASD,QAAeD,EAAc,UAAU,KAAA,KAAa,CAACG,EAAcR,EAAK,KAAK,CAAC;EAE7F,SAASS,IAAgB;GAEvB,AADIb,MAAUM,MAAI,IAAQ,OAC1B,EAAK,QAAQ;EACf;EAGA,IAAIQ,IAA4B;SAEhCC,QAAgB;GACd,IAAOC,EACLL,IACC,MAAU;IACT,IAAI,CAACM,GAAO;KACV,EAAQ;KAER;IACF;IAGA,AADIjB,MAAU,SAAM,IAAQM,IAC5B,EAAK,QAAQN,MAAUM;GACzB,GACA,EAAE,WAAW,GAAK,CACpB;EACF,CAAC,GAEDY,QAAsB;GAEpB,AADAJ,IAAO,GACPD,EAAQ;EACV,CAAC,aAI4BF,EAAA,SAAUJ,EAAA,SAArCZ,EAAA,GAAAC,EAA4EC,GAAA;;GAAhC,eAAeY,EAAA"}
|