@alfakit/vue 0.1.2 → 0.1.7
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/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 +17 -15
- 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/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/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/SliderField.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/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 +1 -1
- 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/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/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/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/TenantMenu.vue_vue_type_script_setup_true_lang.js +35 -35
- 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/SelectCell.vue_vue_type_script_setup_true_lang.js +2 -1
- 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.vue_vue_type_script_setup_true_lang.js +2 -1
- 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/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.css +7 -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/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/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 +6 -1
- package/package.json +2 -2
- package/src/AlfakitRoot.vue +9 -1
- package/src/components/actions/ActionGroupMenu.vue +13 -1
- package/src/components/actions/ActionModal.vue +9 -0
- 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/ImageEditorDialog.vue +7 -3
- package/src/components/fields/KeyValueField.vue +3 -2
- package/src/components/fields/ModalTablePicker.vue +7 -2
- package/src/components/fields/RepeaterField.vue +2 -3
- package/src/components/fields/RichEditorInput.vue +3 -0
- package/src/components/fields/item-actions.ts +31 -10
- package/src/components/form/FormBlock.vue +2 -1
- package/src/components/form/form-context.ts +2 -2
- package/src/components/kanban/KanbanBoard.vue +15 -3
- package/src/components/kanban/KanbanColumnHeader.vue +6 -4
- package/src/components/layout/SectionComponent.vue +10 -4
- package/src/components/panel/GlobalSearchPalette.vue +2 -0
- 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/TableCellContent.vue +4 -2
- package/src/components/table/TablePagination.vue +12 -7
- 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/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/StarterKitImpersonationBanner.vue +57 -0
- package/src/starter-kit/widgets/index.ts +56 -11
- package/src/starter-kit/widgets/loaded.ts +9 -0
- package/src/styles.css +9 -2
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -5,15 +5,17 @@ import { type PropType } from 'vue';
|
|
|
5
5
|
* nothing for guests or without global search and a command palette.
|
|
6
6
|
*/
|
|
7
7
|
export declare const AlfakitSearch: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
-
/** The `starterKit()` panel to use (the first one
|
|
8
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
9
9
|
panel: {
|
|
10
10
|
type: PropType<string | undefined>;
|
|
11
11
|
default: undefined;
|
|
12
12
|
};
|
|
13
13
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
14
|
[key: string]: any;
|
|
15
|
-
}> |
|
|
16
|
-
|
|
15
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
17
19
|
panel: {
|
|
18
20
|
type: PropType<string | undefined>;
|
|
19
21
|
default: undefined;
|
|
@@ -26,15 +28,17 @@ export declare const AlfakitSearch: import("vue").DefineComponent<import("vue").
|
|
|
26
28
|
* realtime updates as in the panel. Renders nothing for guests or without them.
|
|
27
29
|
*/
|
|
28
30
|
export declare const AlfakitNotifications: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
29
|
-
/** The `starterKit()` panel to use (the first one
|
|
31
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
30
32
|
panel: {
|
|
31
33
|
type: PropType<string | undefined>;
|
|
32
34
|
default: undefined;
|
|
33
35
|
};
|
|
34
36
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
37
|
[key: string]: any;
|
|
36
|
-
}> |
|
|
37
|
-
|
|
38
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
38
42
|
panel: {
|
|
39
43
|
type: PropType<string | undefined>;
|
|
40
44
|
default: undefined;
|
|
@@ -47,15 +51,42 @@ export declare const AlfakitNotifications: import("vue").DefineComponent<import(
|
|
|
47
51
|
* to choose one on the host's own pages. Renders nothing for guests or other panels.
|
|
48
52
|
*/
|
|
49
53
|
export declare const AlfakitTenantSwitcher: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
50
|
-
/** The `starterKit()` panel to use (the first one
|
|
54
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
51
55
|
panel: {
|
|
52
56
|
type: PropType<string | undefined>;
|
|
53
57
|
default: undefined;
|
|
54
58
|
};
|
|
55
59
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
56
60
|
[key: string]: any;
|
|
57
|
-
}> |
|
|
58
|
-
|
|
61
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
65
|
+
panel: {
|
|
66
|
+
type: PropType<string | undefined>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{}>, {
|
|
70
|
+
panel: string | undefined;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
|
+
/**
|
|
73
|
+
* The AI copilot of alfasix/alfakit-ai (`AiPlugin::copilot()`): its button and chat
|
|
74
|
+
* slide-over, opened with its key bindings (`mod+j`) from any page. Renders nothing for
|
|
75
|
+
* guests, without the plugin's copilot, for users who may not use it and (tenancy panels)
|
|
76
|
+
* outside a tenant.
|
|
77
|
+
*/
|
|
78
|
+
export declare const AlfakitCopilot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
79
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
80
|
+
panel: {
|
|
81
|
+
type: PropType<string | undefined>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}>[] | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
+
/** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */
|
|
59
90
|
panel: {
|
|
60
91
|
type: PropType<string | undefined>;
|
|
61
92
|
default: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/index.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;AAqGZ;;;;GAIG;AACH,eAAO,MAAM,aAAa;IAhCpB,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;IADrD,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;4EAoC1D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IA3C3B,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;IADrD,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;4EA+C1D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IAtD5B,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;IADrD,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;4EA0D1D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IAnErB,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;IADrD,8HAA8H;;cACrG,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;4EAuE1D,CAAA"}
|
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
import { lazyComponent as e } from "../../lib/lazy.js";
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import r from "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import t from "./CopilotTrigger.js";
|
|
3
|
+
import n from "./NotificationsTrigger.js";
|
|
4
|
+
import r from "./SearchTrigger.js";
|
|
5
|
+
import i from "./TenantSwitcherTrigger.js";
|
|
6
|
+
import { starterKitWidgets as a } from "@alfakit/core";
|
|
7
|
+
import { usePage as o } from "@inertiajs/vue3";
|
|
8
|
+
import { computed as s, defineAsyncComponent as c, defineComponent as l, h as u } from "vue";
|
|
8
9
|
//#region src/starter-kit/widgets/index.ts
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return
|
|
10
|
+
function d(e, t) {
|
|
11
|
+
let n = o();
|
|
12
|
+
return s(() => a(n.props, e(), t));
|
|
12
13
|
}
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
var f = e("AlfakitLoadedSearch", () => import("./loaded.js").then((e) => e.LoadedSearch), r), p = e("AlfakitLoadedNotifications", () => import("./loaded.js").then((e) => e.LoadedNotifications), n), m = e("AlfakitLoadedTenantSwitcher", () => import("./loaded.js").then((e) => e.LoadedTenantSwitcher), i), h = e("AlfakitLoadedCopilot", () => import("./loaded.js").then((e) => e.LoadedCopilot), t), g = c(() => import("./StarterKitImpersonationBanner.js"));
|
|
15
|
+
function _(e, t, n, r) {
|
|
16
|
+
return l({
|
|
16
17
|
name: e,
|
|
17
18
|
props: { panel: {
|
|
18
19
|
type: String,
|
|
19
20
|
default: void 0
|
|
20
21
|
} },
|
|
21
22
|
setup(e) {
|
|
22
|
-
let i =
|
|
23
|
+
let i = d(() => e.panel, n);
|
|
23
24
|
return () => {
|
|
24
|
-
let e = i.value;
|
|
25
|
-
|
|
25
|
+
let e = i.value, a = e?.widgets.impersonation ? u(g, { source: e }) : null;
|
|
26
|
+
if (!e?.widgets[n]) return a;
|
|
27
|
+
let o = u("span", {
|
|
26
28
|
"data-slot": t,
|
|
27
29
|
class: "inline-flex"
|
|
28
|
-
}, [
|
|
30
|
+
}, [u(r, { source: e })]);
|
|
31
|
+
return a ? [a, o] : o;
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
|
-
var
|
|
36
|
+
var v = _("AlfakitSearch", "starter-kit-search", "search", f), y = _("AlfakitNotifications", "starter-kit-notifications", "notifications", p), b = _("AlfakitTenantSwitcher", "starter-kit-tenant-switcher", "tenancy", m), x = _("AlfakitCopilot", "starter-kit-copilot", "copilot", h);
|
|
34
37
|
//#endregion
|
|
35
|
-
export {
|
|
38
|
+
export { x as AlfakitCopilot, y as AlfakitNotifications, v as AlfakitSearch, b as AlfakitTenantSwitcher };
|
|
36
39
|
|
|
37
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SearchTrigger","NotificationsTrigger","TenantSwitcherTrigger","NotificationsTrigger_default","SearchTrigger_default","TenantSwitcherTrigger_default","useStarterKitWidgets","page","usePage","computed","starterKitWidgets","panelId","LoadedSearch","lazyComponent","module","LoadedNotifications","LoadedTenantSwitcher","headerWidget","defineComponent","source","props","value","
|
|
1
|
+
{"version":3,"file":"index.js","names":["SearchTrigger","NotificationsTrigger","TenantSwitcherTrigger","CopilotTrigger","CopilotTrigger_default","NotificationsTrigger_default","SearchTrigger_default","TenantSwitcherTrigger_default","useStarterKitWidgets","page","usePage","computed","starterKitWidgets","panelId","part","LoadedSearch","lazyComponent","module","LoadedNotifications","LoadedTenantSwitcher","LoadedCopilot","StarterKitImpersonationBanner","defineAsyncComponent","headerWidget","defineComponent","source","props","value","banner","h","widget","slot","loaded","AlfakitSearch","AlfakitNotifications","AlfakitTenantSwitcher","AlfakitCopilot"],"sources":["../../../src/starter-kit/widgets/index.ts"],"sourcesContent":["import {\n starterKitWidgets,\n type StarterKitWidgets,\n type StarterKitWidgetsSchema,\n} from '@alfakit/core'\nimport { usePage } from '@inertiajs/vue3'\nimport {\n computed,\n defineAsyncComponent,\n defineComponent,\n h,\n type Component,\n type ComputedRef,\n type PropType,\n} from 'vue'\nimport { lazyComponent } from '../../lib/lazy'\nimport CopilotTrigger from './CopilotTrigger.vue'\nimport NotificationsTrigger from './NotificationsTrigger.vue'\nimport SearchTrigger from './SearchTrigger.vue'\nimport TenantSwitcherTrigger from './TenantSwitcherTrigger.vue'\n\n/**\n * Drop-in header components of starter kit mode (`Panel::starterKit()`): AlfaKit's search,\n * notifications bell and tenant switcher in the host's own header, on every page of the\n * application. They read the shared `alfakitNavigation` prop, render a lightweight trigger\n * straight away, and load their code and the panel data once mounted (never during SSR).\n *\n * ```vue\n * <script setup lang=\"ts\">\n * import { AlfakitCopilot, AlfakitNotifications, AlfakitSearch } from '@alfakit/vue'\n * </script>\n *\n * <template>\n * <AlfakitSearch />\n * <AlfakitNotifications />\n * <AlfakitCopilot />\n * </template>\n * ```\n */\n\n/** The header components' data of a `starterKit()` panel from the shared prop, or null. */\nfunction useStarterKitWidgets(\n panelId: () => string | undefined,\n part: keyof StarterKitWidgetsSchema,\n): ComputedRef<StarterKitWidgets | null> {\n const page = usePage()\n\n return computed(() => starterKitWidgets(page.props, panelId(), part))\n}\n\nconst LoadedSearch = lazyComponent(\n 'AlfakitLoadedSearch',\n () => import('./loaded').then((module) => module.LoadedSearch),\n SearchTrigger,\n)\n\nconst LoadedNotifications = lazyComponent(\n 'AlfakitLoadedNotifications',\n () => import('./loaded').then((module) => module.LoadedNotifications),\n NotificationsTrigger,\n)\n\nconst LoadedTenantSwitcher = lazyComponent(\n 'AlfakitLoadedTenantSwitcher',\n () => import('./loaded').then((module) => module.LoadedTenantSwitcher),\n TenantSwitcherTrigger,\n)\n\nconst LoadedCopilot = lazyComponent(\n 'AlfakitLoadedCopilot',\n () => import('./loaded').then((module) => module.LoadedCopilot),\n CopilotTrigger,\n)\n\n// Only needed while impersonating: its code loads then.\nconst StarterKitImpersonationBanner = defineAsyncComponent(\n () => import('./StarterKitImpersonationBanner.vue'),\n)\n\nfunction headerWidget(\n name: string,\n slot: string,\n part: keyof Omit<StarterKitWidgetsSchema, 'endpoint' | 'impersonation'>,\n loaded: Component,\n) {\n return defineComponent({\n name,\n props: {\n /** The `starterKit()` panel to use (by default the open AlfaKit page's panel, else the first one that has this component). */\n panel: { type: String as PropType<string | undefined>, default: undefined },\n },\n setup(props) {\n const source = useStarterKitWidgets(() => props.panel, part)\n\n return () => {\n const value: StarterKitWidgets | null = source.value\n\n // While impersonating, the first header component shows the banner on host pages.\n const banner = value?.widgets.impersonation\n ? h(StarterKitImpersonationBanner, { source: value })\n : null\n\n if (!value?.widgets[part]) return banner\n\n const widget = h('span', { 'data-slot': slot, class: 'inline-flex' }, [\n h(loaded, { source: value }),\n ])\n\n // A single root unless the banner shows, so attributes from the app still fall through.\n return banner ? [banner, widget] : widget\n }\n },\n })\n}\n\n/**\n * AlfaKit's command palette and global search: the search field opens it, and so do the\n * panel's key bindings (⌘K / Ctrl+K by default), registered once for the page. Renders\n * nothing for guests or without global search and a command palette.\n */\nexport const AlfakitSearch = headerWidget(\n 'AlfakitSearch',\n 'starter-kit-search',\n 'search',\n LoadedSearch,\n)\n\n/**\n * The bell with the user's database notifications (`databaseNotifications()`), polling and\n * realtime updates as in the panel. Renders nothing for guests or without them.\n */\nexport const AlfakitNotifications = headerWidget(\n 'AlfakitNotifications',\n 'starter-kit-notifications',\n 'notifications',\n LoadedNotifications,\n)\n\n/**\n * The tenant switcher of a tenancy panel: the current tenant inside the panel, or a menu\n * to choose one on the host's own pages. Renders nothing for guests or other panels.\n */\nexport const AlfakitTenantSwitcher = headerWidget(\n 'AlfakitTenantSwitcher',\n 'starter-kit-tenant-switcher',\n 'tenancy',\n LoadedTenantSwitcher,\n)\n\n/**\n * The AI copilot of alfasix/alfakit-ai (`AiPlugin::copilot()`): its button and chat\n * slide-over, opened with its key bindings (`mod+j`) from any page. Renders nothing for\n * guests, without the plugin's copilot, for users who may not use it and (tenancy panels)\n * outside a tenant.\n */\nexport const AlfakitCopilot = headerWidget(\n 'AlfakitCopilot',\n 'starter-kit-copilot',\n 'copilot',\n LoadedCopilot,\n)\n"],"mappings":";;;;;;;;;AAyCA,SAASQ,EACP,GACA,GACuC;CACvC,IAAMC,IAAOC,EAAQ;CAErB,OAAOC,QAAeC,EAAkBH,EAAK,OAAOI,EAAQ,GAAGC,CAAI,CAAC;AACtE;AAEA,IAAMC,IAAeC,EACnB,6BACM,OAAO,cAAW,CAAC,MAAM,MAAWC,EAAO,YAAY,GAC7DjB,CACF,GAEMkB,IAAsBF,EAC1B,oCACM,OAAO,cAAW,CAAC,MAAM,MAAWC,EAAO,mBAAmB,GACpEhB,CACF,GAEMkB,IAAuBH,EAC3B,qCACM,OAAO,cAAW,CAAC,MAAM,MAAWC,EAAO,oBAAoB,GACrEf,CACF,GAEMkB,IAAgBJ,EACpB,8BACM,OAAO,cAAW,CAAC,MAAM,MAAWC,EAAO,aAAa,GAC9Dd,CACF,GAGMkB,IAAgCC,QAC9B,OAAO,qCACf;AAEA,SAASC,EACP,GACA,GACA,GACA,GACA;CACA,OAAOC,EAAgB;EACrB;EACA,OAAO,EAEL,OAAO;GAAE,MAAM;GAAwC,SAAS,KAAA;EAAU,EAC5E;EACA,MAAM,GAAO;GACX,IAAMC,IAASjB,QAA2BkB,EAAM,OAAOZ,CAAI;GAE3D,aAAa;IACX,IAAMa,IAAkCF,EAAO,OAGzCG,IAASD,GAAO,QAAQ,gBAC1BE,EAAER,GAA+B,EAAE,QAAQM,EAAM,CAAC,IAClD;IAEJ,IAAI,CAACA,GAAO,QAAQb,IAAO,OAAOc;IAElC,IAAME,IAASD,EAAE,QAAQ;KAAE,aAAaE;KAAM,OAAO;IAAc,GAAG,CACpEF,EAAEG,GAAQ,EAAE,QAAQL,EAAM,CAAC,CAC7B,CAAC;IAGD,OAAOC,IAAS,CAACA,GAAQE,CAAM,IAAIA;GACrC;EACF;CACF,CAAC;AACH;AAOA,IAAaG,IAAgBV,EAC3B,iBACA,sBACA,UACAR,CACF,GAMamB,IAAuBX,EAClC,wBACA,6BACA,iBACAL,CACF,GAMaiB,IAAwBZ,EACnC,yBACA,+BACA,WACAJ,CACF,GAQaiB,IAAiBb,EAC5B,kBACA,uBACA,WACAH,CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The loaded header components, in one module: they mount together in the host's header,
|
|
3
|
+
* so one request brings them all, and a host bundle doesn't pay for a chunk per component.
|
|
4
|
+
* Only loaded in the browser (`import('./loaded')`).
|
|
5
|
+
*/
|
|
6
|
+
export { default as LoadedCopilot } from './LoadedCopilot.vue';
|
|
7
|
+
export { default as LoadedNotifications } from './LoadedNotifications.vue';
|
|
8
|
+
export { default as LoadedSearch } from './LoadedSearch.vue';
|
|
9
|
+
export { default as LoadedTenantSwitcher } from './LoadedTenantSwitcher.vue';
|
|
10
|
+
//# sourceMappingURL=loaded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaded.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/loaded.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
|