@katlux/toolkit 0.1.1-alpha.145 → 0.1.1-alpha.147
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/README.md +32 -22
- package/bin/ai-init.mjs +575 -0
- package/bin/ai-tokens/adapters/antigravityAdapter.mjs +22 -0
- package/bin/ai-tokens/adapters/claudeCodeAdapter.mjs +192 -0
- package/bin/ai-tokens/adapters/codexAdapter.mjs +176 -0
- package/bin/ai-tokens/adapters/cursorAdapter.mjs +202 -0
- package/bin/ai-tokens/adapters/index.mjs +30 -0
- package/bin/ai-tokens/cliViews.mjs +301 -0
- package/bin/ai-tokens/formatAndDates.mjs +89 -0
- package/bin/ai-tokens/reportGenerator.mjs +232 -0
- package/bin/ai-tokens/transcriptParser.mjs +299 -0
- package/bin/ai-tokens.mjs +38 -872
- package/bin/cli.mjs +81 -48
- package/bin/create-preset.mjs +1 -0
- package/bin/preset-contracts.json +2997 -0
- package/dist/compiled/composables/locales/asianAndPacific.mjs +296 -0
- package/dist/compiled/composables/locales/northernAndEasternEuropean.mjs +342 -0
- package/dist/compiled/composables/locales/westernEuropean.mjs +268 -0
- package/dist/compiled/composables/locales.mjs +32 -720
- package/dist/compiled/composables/useDataProvider.mjs +39 -26
- package/dist/compiled/composables/useFilterLogic.mjs +10 -2
- package/dist/compiled/composables/useKatluxForm.mjs +13 -11
- package/dist/compiled/composables/usePresetComponent.mjs +2 -0
- package/dist/compiled/composables/useRequestQueue.mjs +3 -1
- package/dist/compiled/composables/useVirtualDataset.mjs +657 -0
- package/dist/compiled/composables/useVirtualScroll.mjs +93 -66
- package/dist/compiled/composables/virtualDataset/cacheStateHelpers.mjs +76 -0
- package/dist/compiled/composables/virtualDataset/keyboardNavHelpers.mjs +60 -0
- package/dist/compiled/composables/virtualDataset/treeSelectionHelpers.mjs +103 -0
- package/dist/compiled/composables/virtualDataset/types.mjs +0 -0
- package/dist/compiled/utils/deprecation.mjs +44 -0
- package/dist/compiled/utils/dom.mjs +124 -0
- package/dist/module.cjs +58 -77
- package/dist/module.d.cts +5 -0
- package/dist/module.d.mts +4 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +54 -77
- package/dist/runtime/app.config.d.ts +3 -0
- package/dist/runtime/components/KAccordion/KAccordion.global.d.vue.ts +1 -1
- package/dist/runtime/components/KAccordion/KAccordion.global.vue.d.ts +1 -1
- package/dist/runtime/components/KBulkActions/KBulkActions.global.d.vue.ts +7 -3
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue +4 -1
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue.d.ts +7 -3
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +12 -2
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.js +40 -41
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +19 -10
- package/dist/runtime/components/KCalendar/KCalendar.global.vue +7 -2
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +19 -10
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +14 -201
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +67 -14
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.d.vue.ts +25 -5
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue +15 -1
- package/dist/runtime/components/KCalendar/KCalendarMonth.global.vue.d.ts +25 -5
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.d.ts +21 -3
- package/dist/runtime/components/KCalendar/KCalendarMonth.logic.js +136 -7
- package/dist/runtime/components/KCalendar/recurringUtils.js +6 -5
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +2 -2
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +2 -2
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +18 -3
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +9 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +18 -3
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +16 -2
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +32 -13
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +8 -8
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +8 -8
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue +4 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +3 -3
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.d.ts +24 -4
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.js +43 -22
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +38 -11
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue +39 -20
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +38 -11
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +31 -8
- package/dist/runtime/components/KDatatable/KDataIterator.logic.js +69 -24
- package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +10 -14
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +6 -5
- package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +10 -14
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +4 -6
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +32 -24
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +33 -15
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +60 -16
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +33 -15
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +30 -6
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +249 -59
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +2 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +4 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +4 -4
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +3 -2
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +14 -13
- package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +55 -4
- package/dist/runtime/components/KGantt/KGantt.global.vue +18 -3
- package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +55 -4
- package/dist/runtime/components/KGantt/KGantt.logic.d.ts +33 -5
- package/dist/runtime/components/KGantt/KGantt.logic.js +39 -6
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +1 -1
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +1 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
- package/dist/runtime/components/KLayout/KLayout.global.d.vue.ts +4 -1
- package/dist/runtime/components/KLayout/KLayout.global.vue +4 -1
- package/dist/runtime/components/KLayout/KLayout.global.vue.d.ts +4 -1
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +9 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue +3 -0
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +9 -0
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +5 -0
- package/dist/runtime/components/KLoader/KLoader.logic.js +4 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +2 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +2 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +30 -7
- package/dist/runtime/components/KMultiTabs/KMultiTabs.logic.d.ts +1 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.d.vue.ts +23 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.vue +24 -0
- package/dist/runtime/components/KMultiTabs/MultiTabs.global.vue.d.ts +23 -0
- package/dist/runtime/components/KPagination/KPagination.global.d.vue.ts +3 -1
- package/dist/runtime/components/KPagination/KPagination.global.vue +2 -1
- package/dist/runtime/components/KPagination/KPagination.global.vue.d.ts +3 -1
- package/dist/runtime/components/KPagination/KPagination.logic.d.ts +2 -1
- package/dist/runtime/components/KPagination/KPagination.logic.js +74 -14
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTabs/KTabs.logic.js +33 -11
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +2 -2
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +2 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +15 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +8 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +15 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +5 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +4 -0
- package/dist/runtime/components/KTooltip/KTooltip.logic.d.ts +11 -2
- package/dist/runtime/components/KTooltip/KTooltip.logic.js +7 -5
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +4 -4
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +4 -4
- package/dist/runtime/components/KTree/KTree.logic.d.ts +2 -2
- package/dist/runtime/components/KTree/KTree.logic.js +37 -13
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +7 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +4 -6
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +7 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +3 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +10 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +40 -6
- package/dist/runtime/components/KTreeView/KTreeView.global.vue +19 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +40 -6
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +24 -4
- package/dist/runtime/components/KTreeView/KTreeView.logic.js +105 -11
- package/dist/runtime/composables/locales/asianAndPacific.d.ts +11 -0
- package/dist/runtime/composables/locales/asianAndPacific.js +296 -0
- package/dist/runtime/composables/locales/northernAndEasternEuropean.d.ts +12 -0
- package/dist/runtime/composables/locales/northernAndEasternEuropean.js +342 -0
- package/dist/runtime/composables/locales/westernEuropean.d.ts +10 -0
- package/dist/runtime/composables/locales/westernEuropean.js +268 -0
- package/dist/runtime/composables/locales.d.ts +4 -24
- package/dist/runtime/composables/locales.js +32 -720
- package/dist/runtime/composables/useDataProvider.d.ts +5 -3
- package/dist/runtime/composables/useDataProvider.js +39 -26
- package/dist/runtime/composables/useFilterLogic.d.ts +16 -4
- package/dist/runtime/composables/useFilterLogic.js +10 -2
- package/dist/runtime/composables/useKatluxForm.d.ts +4 -4
- package/dist/runtime/composables/useKatluxForm.js +13 -11
- package/dist/runtime/composables/usePresetComponent.js +2 -0
- package/dist/runtime/composables/useRequestQueue.d.ts +2 -0
- package/dist/runtime/composables/useRequestQueue.js +3 -1
- package/dist/runtime/composables/useSortLogic.d.ts +1 -1
- package/dist/runtime/composables/useVirtualDataset.d.ts +9 -0
- package/dist/runtime/composables/useVirtualDataset.js +657 -0
- package/dist/runtime/composables/useVirtualScroll.d.ts +14 -10
- package/dist/runtime/composables/useVirtualScroll.js +93 -66
- package/dist/runtime/composables/virtualDataset/cacheStateHelpers.d.ts +49 -0
- package/dist/runtime/composables/virtualDataset/cacheStateHelpers.js +76 -0
- package/dist/runtime/composables/virtualDataset/keyboardNavHelpers.d.ts +26 -0
- package/dist/runtime/composables/virtualDataset/keyboardNavHelpers.js +60 -0
- package/dist/runtime/composables/virtualDataset/treeSelectionHelpers.d.ts +24 -0
- package/dist/runtime/composables/virtualDataset/treeSelectionHelpers.js +103 -0
- package/dist/runtime/composables/virtualDataset/types.d.ts +113 -0
- package/dist/runtime/composables/virtualDataset/types.js +0 -0
- package/dist/runtime/directives/clickOutside.d.ts +1 -1
- package/dist/runtime/directives/clickOutside.js +41 -13
- package/dist/runtime/plugins/nuxtCompatPlugin.d.ts +2 -1
- package/dist/runtime/plugins/nuxtCompatPlugin.js +16 -1
- package/dist/runtime/plugins/toastPlugin.client.js +2 -2
- package/dist/runtime/presets/default/assets/scss/css-variables.css +3 -0
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +6 -1
- package/dist/runtime/presets/default/assets/scss/index.css +3 -0
- package/dist/runtime/presets/default/assets/svg/katlux-logo.svg +7 -0
- package/dist/runtime/presets/default/assets/svg/katlux.svg +6 -0
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.d.vue.ts +3 -2
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +31 -3
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue.d.ts +3 -2
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +6 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +57 -2
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KCalendar/KCalendarWeek.vue +6 -5
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +27 -17
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +10 -10
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue +67 -22
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.d.vue.ts +41 -8
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +184 -174
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue.d.ts +41 -8
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +17 -10
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +113 -394
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +17 -10
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +71 -4
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +5 -2
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +15 -12
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +5 -2
- package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +11 -2
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +46 -29
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +11 -2
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.d.vue.ts +6 -2
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +23 -8
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue.d.ts +6 -2
- package/dist/runtime/presets/default/components/KLayout/KLayout.vue +2 -2
- package/dist/runtime/presets/default/components/KLoader/KLoader.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +13 -2
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +1 -94
- package/dist/runtime/presets/default/components/KMultiTabs/KMultiTabs.vue +69 -4
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +18 -46
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +11 -23
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +24 -8
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +3 -3
- package/dist/runtime/presets/default/components/KTree/KTree.vue +61 -56
- package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +3 -3
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.vue +12 -2
- package/dist/runtime/presets/default/components/KTree/KTreeNodeItem.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.d.vue.ts +11 -2
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +14 -2
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue.d.ts +11 -2
- package/dist/runtime/server/middleware/session.js +7 -0
- package/dist/runtime/utils/deprecation.d.ts +14 -0
- package/dist/runtime/utils/deprecation.js +44 -0
- package/dist/runtime/utils/dom.d.ts +31 -0
- package/dist/runtime/utils/dom.js +124 -0
- package/dist/skills/KATLUX_INDEX.md +18 -19
- package/dist/skills/katlux-components/SKILL.md +2 -0
- package/dist/skills/katlux-components/components/KBulkActions.md +26 -2
- package/dist/skills/katlux-components/components/KCombobox.md +2 -2
- package/dist/skills/katlux-components/components/KDataIterator.md +17 -4
- package/dist/skills/katlux-components/components/KDatatable.md +38 -0
- package/dist/skills/katlux-components/components/KDatePicker.md +3 -1
- package/dist/skills/katlux-components/components/KGantt.md +9 -0
- package/dist/skills/katlux-components/components/KIcon.md +1 -1
- package/dist/skills/katlux-components/components/KLayout.md +4 -0
- package/dist/skills/katlux-components/components/KLineChart.md +3 -0
- package/dist/skills/katlux-components/components/KLoader.md +3 -0
- package/dist/skills/katlux-components/components/KProductList.md +0 -1
- package/dist/skills/katlux-components/components/KScatterChart.md +3 -0
- package/dist/skills/katlux-components/components/KTextbox.md +1 -0
- package/dist/skills/katlux-components/components/KTreePicker.md +2 -1
- package/dist/skills/katlux-components/components/KTreeView.md +12 -0
- package/dist/skills/katlux-config/SKILL.md +27 -8
- package/dist/skills/katlux-presets/SKILL.md +163 -3
- package/dist/skills/katlux-presets/creating-a-preset.md +67 -0
- package/dist/skills/katlux-providers/SKILL.md +19 -5
- package/dist/skills/katlux-providers/providers/ADataProvider.md +17 -9
- package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +27 -3
- package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +11 -1
- package/dist/skills/katlux-providers/providers/CAPITreeServerDataProvider.md +13 -0
- package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +19 -4
- package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +4 -2
- package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +2 -2
- package/dist/skills/katlux-providers/providers/RequestProvider.md +10 -0
- package/dist/skills/katlux-providers/providers/encryption-field-level.md +67 -20
- package/dist/skills/katlux-providers/providers/encryption-key-management.md +23 -2
- package/dist/skills/katlux-providers/providers/encryption-key-pinning.md +25 -11
- package/dist/skills/katlux-providers/providers/encryption-searchable.md +341 -0
- package/dist/skills/katlux-providers/providers/encryption-symmetric.md +29 -2
- package/dist/skills/katlux-providers/providers/encryption-threat-model.md +70 -1
- package/dist/skills/katlux-providers/providers/encryption.md +26 -1
- package/dist/skills/katlux-providers/providers/types.md +3 -1
- package/dist/skills/katlux-providers/providers/useDataProvider.md +2 -1
- package/dist/skills/katlux-providers/providers/useVirtualDataset.md +154 -0
- package/dist/skills/katlux-tokens/SKILL.md +2 -1
- package/dist/types.d.mts +1 -1
- package/package.json +7 -3
- package/bin/add-ai-reference.mjs +0 -259
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { unref } from "vue";
|
|
2
|
+
function collectVNodeElements(vnode, out) {
|
|
3
|
+
if (!vnode) return;
|
|
4
|
+
if (vnode.el && vnode.anchor && vnode.el.parentNode && vnode.el.parentNode === vnode.anchor.parentNode) {
|
|
5
|
+
let cur = vnode.el;
|
|
6
|
+
while (cur) {
|
|
7
|
+
if (cur.nodeType === 1) {
|
|
8
|
+
out.push(cur);
|
|
9
|
+
}
|
|
10
|
+
if (cur === vnode.anchor) break;
|
|
11
|
+
cur = cur.nextSibling;
|
|
12
|
+
}
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (vnode.el && vnode.el.nodeType === 1) {
|
|
16
|
+
out.push(vnode.el);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (vnode.component?.subTree) {
|
|
20
|
+
collectVNodeElements(vnode.component.subTree, out);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(vnode.children)) {
|
|
24
|
+
for (const child of vnode.children) {
|
|
25
|
+
if (child && typeof child === "object") {
|
|
26
|
+
collectVNodeElements(child, out);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function resolveElements(target) {
|
|
32
|
+
const raw = unref(target);
|
|
33
|
+
if (!raw) return [];
|
|
34
|
+
if (Array.isArray(raw)) {
|
|
35
|
+
const collected = [];
|
|
36
|
+
for (const item of raw) {
|
|
37
|
+
collected.push(...resolveElements(item));
|
|
38
|
+
}
|
|
39
|
+
return collected;
|
|
40
|
+
}
|
|
41
|
+
if (typeof Element !== "undefined" && raw instanceof Element) {
|
|
42
|
+
return [raw];
|
|
43
|
+
}
|
|
44
|
+
if (typeof Node !== "undefined" && raw instanceof Node) {
|
|
45
|
+
return raw.nodeType === 1 ? [raw] : [];
|
|
46
|
+
}
|
|
47
|
+
if (typeof raw === "object") {
|
|
48
|
+
const obj = raw;
|
|
49
|
+
if (obj.$el) {
|
|
50
|
+
if (obj.$el.nodeType === 1) {
|
|
51
|
+
return [obj.$el];
|
|
52
|
+
}
|
|
53
|
+
if (obj.$?.subTree) {
|
|
54
|
+
const out = [];
|
|
55
|
+
collectVNodeElements(obj.$.subTree, out);
|
|
56
|
+
if (out.length > 0) return out;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (obj.$?.subTree) {
|
|
60
|
+
const out = [];
|
|
61
|
+
collectVNodeElements(obj.$.subTree, out);
|
|
62
|
+
if (out.length > 0) return out;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
export function resolveElement(target) {
|
|
68
|
+
const raw = unref(target);
|
|
69
|
+
if (!raw) return null;
|
|
70
|
+
if (typeof raw === "object" && typeof raw.getBoundingClientRect === "function" && !("$el" in raw)) {
|
|
71
|
+
return raw;
|
|
72
|
+
}
|
|
73
|
+
const elements = resolveElements(raw);
|
|
74
|
+
if (elements.length > 0) {
|
|
75
|
+
return elements[0];
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
export function focusTarget(target) {
|
|
80
|
+
const raw = unref(target);
|
|
81
|
+
if (!raw) return false;
|
|
82
|
+
const isDomNode = typeof Node !== "undefined" && raw instanceof Node;
|
|
83
|
+
if (!isDomNode && typeof raw.focus === "function") {
|
|
84
|
+
;
|
|
85
|
+
raw.focus();
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
const elements = resolveElements(raw);
|
|
89
|
+
for (const el of elements) {
|
|
90
|
+
const focusableEl = el;
|
|
91
|
+
if (typeof focusableEl.focus === "function" && (focusableEl.matches?.('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])') || typeof focusableEl.tabIndex === "number" && focusableEl.tabIndex >= 0)) {
|
|
92
|
+
focusableEl.focus();
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
const nested = el.querySelector?.(
|
|
96
|
+
'input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])'
|
|
97
|
+
);
|
|
98
|
+
if (nested && typeof nested.focus === "function") {
|
|
99
|
+
nested.focus();
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (elements.length > 0 && typeof elements[0].focus === "function") {
|
|
104
|
+
;
|
|
105
|
+
elements[0].focus?.();
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
export function resolveModalTeleportTarget(explicitTeleportTo, modalPortalId) {
|
|
111
|
+
if (explicitTeleportTo) return explicitTeleportTo;
|
|
112
|
+
const resolvedId = unref(modalPortalId);
|
|
113
|
+
if (typeof resolvedId === "string" && resolvedId.length > 0) {
|
|
114
|
+
if (typeof document !== "undefined") {
|
|
115
|
+
if (document.getElementById(resolvedId)) {
|
|
116
|
+
const escapedId = typeof CSS !== "undefined" && typeof CSS.escape === "function" ? CSS.escape(resolvedId) : resolvedId;
|
|
117
|
+
return `#${escapedId}`;
|
|
118
|
+
}
|
|
119
|
+
return "body";
|
|
120
|
+
}
|
|
121
|
+
return "body";
|
|
122
|
+
}
|
|
123
|
+
return "body";
|
|
124
|
+
}
|
|
@@ -6,20 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
## Katlux MCP Server (Recommended for AI Agents)
|
|
8
8
|
|
|
9
|
-
When the **Katlux MCP Server** (`katlux` / `@katlux/mcp`) is configured in your agent environment, **always call MCP tools first** instead of loading full `SKILL.md` reference files. MCP tools return exact, atomic schemas on demand, saving up to ~93% context tokens and preventing hallucinations.
|
|
10
|
-
|
|
11
|
-
| MCP Tool | Purpose & Usage | Token Advantage |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `katlux_validate_code` | Self-correction linter checking Pug/Vue code against component APIs, providers, and token rules | Catches errors before user sees them |
|
|
22
|
-
| `katlux_create_preset` | Scaffolds a new visual theme preset with directory structure and CSS token overrides | Automates theming setup |
|
|
9
|
+
When the **Katlux MCP Server** (`katlux` / `@katlux/mcp-core` host auto-discovering installed `@katlux/mcp-helper` and opt-in `@katlux/mcp-workflow` plugins) is configured in your agent environment, **always call MCP tools first** instead of loading full `SKILL.md` reference files. MCP tools return exact, atomic schemas on demand, saving up to ~93% context tokens and preventing hallucinations.
|
|
10
|
+
|
|
11
|
+
| MCP Tool | Provider Plugin | Purpose & Usage | Token Advantage |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `katlux_inspect_project` | `@katlux/mcp-core` (+ enriches from active plugins) | Fast read-only project introspection and bidirectional cross-stack map. Core scopes: `overview`, `stats`, `components`, `types`, `sql`, `slice`, `diff`, `tests`. Helper plugin adds `providers` and `presets` when `@katlux/*` is detected | ~200-500 tokens vs 20k+ reading multiple project files |
|
|
14
|
+
| `katlux_batch` | `@katlux/mcp-core` | Executes multiple MCP tool calls across Core and active plugins in one round-trip | Eliminates redundant turns |
|
|
15
|
+
| `katlux_query` | `@katlux/mcp-helper` | Unified compact lookup (`component:Name`, `component:all`, `prop:Comp.prop`, `provider:Name`, `type:Name`, `token:cat`, `icon:kw`, `crypto:topic`) | ~40-400 tokens vs 28k in skill docs |
|
|
16
|
+
| `katlux_scaffold` | `@katlux/mcp-helper` | Generates clean Pug components, providers, pages, presets, or preset-component overrides | Clean boilerplate with zero prompt bloat |
|
|
17
|
+
| `katlux_validate_code` | `@katlux/mcp-helper` | Self-correction linter checking snippets or workspace files against component APIs, preset contracts, tokens, and deprecated symbols | Catches errors before user sees them |
|
|
18
|
+
| `katlux_workflow_init` | `@katlux/mcp-workflow` (opt-in) | Idempotently bootstraps `todo/tasks/`, `todo/archive/`, and `todo/INDEX.md` | Schema-safe workspace setup |
|
|
19
|
+
| `katlux_workflow_task` | `@katlux/mcp-workflow` (opt-in) | Schema-enforced `create`, `update`, `transition` (with close gate), and `archive` over `todo/` | Zero manual markdown corruption |
|
|
20
|
+
| `katlux_workflow_inspect` | `@katlux/mcp-workflow` (opt-in) | Compact `list` (ID + Title only, with `status`, `priority`, `milestone`, `relatedTask`, `component` filters & `sortBy: "priority"`), full single-task `get`, `archive` history, and `doctor` (`repair: true`) | Automated index & token-lean task discovery |
|
|
23
21
|
|
|
24
22
|
## Available Skills (Fallback & Deep Architectural Context)
|
|
25
23
|
|
|
@@ -35,8 +33,9 @@ If the Katlux MCP server is unavailable in the environment, or when deep archite
|
|
|
35
33
|
|
|
36
34
|
## How to Work Efficiently
|
|
37
35
|
|
|
38
|
-
1. **
|
|
39
|
-
2. **
|
|
40
|
-
3. **
|
|
41
|
-
4. **
|
|
42
|
-
5. **
|
|
36
|
+
1. **Project Introspection First**: Call `katlux_inspect_project` (`scope: 'slice'`, `'overview'`, `'stats'`, `'components'`, `'types'`, `'sql'`, `'diff'`, `'tests'`, `'providers'`, or `'presets'`) **before** running `grep` or reading multiple workspace files to understand how pages, components, providers, server API routes, database models, and types are wired in the consumer app.
|
|
37
|
+
2. **MCP Tools First**: Query `katlux_query` (`component:Name`, `provider:Name`, `prop:Comp.Prop`, `type:Name`) to verify prop types, slots, and events before writing or editing code.
|
|
38
|
+
3. **Icon & Token Lookup**: Use `katlux_query` (`icon:Name`, `token:Category`) to verify icon names and theme variables instead of guessing or hardcoding styles.
|
|
39
|
+
4. **Self-Validation**: Run `katlux_validate_code` (via `code` snippet or workspace `filePath`) on newly generated or modified Vue/Pug templates, preset components, and stylesheets to self-correct issues with line-numbered diagnostics before delivering code.
|
|
40
|
+
5. **Atomic Skills**: Component and Provider skills are divided into atomic, per-component and per-provider markdown files under `components/` and `providers/`. Read only the specific atomic spec required for your task to preserve tokens.
|
|
41
|
+
6. **Never Inspect node_modules**: Never search or open files in `node_modules/@katlux/*` or `node_modules/`. All component APIs, props, slots, events, providers, and types are documented in Katlux MCP tools and atomic skill files.
|
|
@@ -96,6 +96,8 @@ description: Complete Katlux UI component API index. Links to atomic component d
|
|
|
96
96
|
| `KScatterChart` | 2D coordinate plot | Point clusters, custom coordinate scaling | [KScatterChart.md](components/KScatterChart.md) |
|
|
97
97
|
| `KHeatMap` | Activity & matrix heatmap | Color intensity scaling, day-of-week matrices | [KHeatMap.md](components/KHeatMap.md) |
|
|
98
98
|
|
|
99
|
+
> **Server Provider Chart Single-Page Architecture**: By design, server-side data providers draw one page to support future charting features (pagination, zooming/virtual navigation). To fetch the entire dataset or plot aggregated series across all records, configure `pageSize: -1` on the provider or use a client-side provider (`CFlatClientDataProvider`).
|
|
100
|
+
|
|
99
101
|
---
|
|
100
102
|
|
|
101
103
|
## 7. Directives & Semantic Classes
|
|
@@ -7,11 +7,35 @@
|
|
|
7
7
|
| `selectedRows` | `Record<string, unknown>[]` | **Required** | Current selection array |
|
|
8
8
|
| `selectAll` | `boolean` | `false` | Global dataset selection flag |
|
|
9
9
|
| `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded rows when selectAll is true in dataset scope |
|
|
10
|
-
| `filter` | `IDataFilter \|
|
|
10
|
+
| `filter` | `IDataFilter \| null` | `undefined` | Active data provider filter to pass to bulk action callbacks |
|
|
11
11
|
| `idKey` | `string` | `'id'` | Unique identifier field for row key extraction |
|
|
12
12
|
|
|
13
13
|
- **Feature — Interchangeable Row & Bulk Actions & Rich Context**:
|
|
14
|
-
`IKDatatableAction` definitions are interchangeable between row-level actions and bulk actions. When invoked via `KBulkActions`, the callback receives `(payload, selectAll, filter)` where `payload` is the array of applicable rows, augmented with context properties `isAllSelected`, `selectedRows`, `selectedRowKeys`, `unselectedRows`, `unselectedRowKeys`, and `filter`.
|
|
14
|
+
`IKDatatableAction` definitions are interchangeable between row-level actions and bulk actions (`:rowActions` vs. `:bulkActions` on `KDatatable`). For `visible` predicates inside `KBulkActions`, no extra action props are needed: `(rows, selectAll) => boolean` and array-only checks (`rows.length > 0`, `Array.isArray(rows)`, `rows.some(...)`) evaluate against the whole selection, while predicates accessing row fields (`row.status === 'active'`) filter `selectedRows` per-row via minification-safe `Array` Proxy detection. When invoked via `KBulkActions`, the callback receives `(payload, selectAll, filter)` where `payload` is the array of applicable rows, augmented with context properties `isAllSelected`, `selectedRows`, `selectedRowKeys`, `unselectedRows`, `unselectedRowKeys`, and `filter`.
|
|
15
|
+
|
|
16
|
+
- **Architectural Principle — Client/Server Parity & Developer Responsibility**:
|
|
17
|
+
Katlux components are simple, flexible, and free of arbitrary exceptions. Data providers behave identically whether running on client-side or server-side:
|
|
18
|
+
- In dataset-scope selection or virtual scrolling mode, `payload` is passed as `[]` because large datasets cannot and should not be enumerated into client memory.
|
|
19
|
+
- **It is the developer's responsibility** to check `if (isAllSelected)` (or the 2nd `selectAll` argument) and handle query-level mutations using `filter` and `unselectedRows`:
|
|
20
|
+
```ts
|
|
21
|
+
const bulkActions: IKDatatableAction[] = [
|
|
22
|
+
{
|
|
23
|
+
label: 'Delete',
|
|
24
|
+
type: 'danger',
|
|
25
|
+
action: (selectedRows, isAllSelected, filter) => {
|
|
26
|
+
if (isAllSelected) {
|
|
27
|
+
// Dataset/Server mutation: identical contract for client and server APIs
|
|
28
|
+
dataProvider.deleteWhere({ filter, unselected: selectedRows.unselectedRows })
|
|
29
|
+
} else {
|
|
30
|
+
// Explicit item selection
|
|
31
|
+
selectedRows.forEach(row => dataProvider.deleteItem(row.id))
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
```
|
|
37
|
+
- Components do **not** invent artificial DOM "visible rows" slices in virtual mode: "visible" rows are merely temporary viewport DOM nodes that shift upon scrolling.
|
|
38
|
+
- **Filter Boundary Invariant**: When active filters change on the provider, selection state (`selectAll = false`, `selectedRows = []`, `unselectedRows = []`) automatically resets so selections never leak between different queries.
|
|
15
39
|
|
|
16
40
|
---
|
|
17
41
|
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
| `@update:modelValue` | `(val: string \| number \| Record<string, unknown> \| (string \| number \| Record<string, unknown>)[] \| null)` | Emitted when selection changes |
|
|
31
31
|
| `@update:isOptionsOpen` | `(open: boolean)` | Emitted when dropdown visibility changes |
|
|
32
32
|
| `@update:searchtext` | `(text: string)` | Emitted when search input changes (`v-model:searchtext`) |
|
|
33
|
-
| `@
|
|
34
|
-
| `@
|
|
33
|
+
| `@update:scrollState` | `(state: IVirtualScrollState)` | Emitted when virtual scroll window updates (`{ loadedCount, hasMore, lastAppendedPage, totalCount }`) |
|
|
34
|
+
| `@blur` | `(event: FocusEvent)` | Emitted when combobox loses focus |
|
|
35
35
|
- **Exposed Properties (via `ref`)**:
|
|
36
36
|
| Property | Type | Description |
|
|
37
37
|
| --- | --- | --- |
|
|
@@ -9,21 +9,34 @@
|
|
|
9
9
|
| `visibleFields` | `string[]` | `null` | Array of keys to expose |
|
|
10
10
|
| `loading` | `boolean` | `false` | Manual loading state toggle |
|
|
11
11
|
| `v-model:search` / `search` | `string` | `''` | Search string with two-way binding |
|
|
12
|
-
| `v-model:
|
|
13
|
-
| `v-model:
|
|
12
|
+
| `v-model:currentPage` / `currentPage` | `number` | `1` | Current page with two-way binding |
|
|
13
|
+
| `v-model:pageSize` / `pageSize` | `number` | `10` | Items per page with two-way binding |
|
|
14
14
|
| `v-model:selectedRows` / `selectedRows` | `Record<string, unknown>[]` | `[]` | Selected rows array with two-way binding |
|
|
15
15
|
| `v-model:selectAll` / `selectAll` | `boolean` | `false` | Select-all boolean state with two-way binding |
|
|
16
|
+
| `v-model:unselectedRows` / `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded row objects when `selectAll: true` in dataset scope |
|
|
17
|
+
| `selectAllScope` | `'page' \| 'dataset'` | `'page'` | Scope for select-all toggle. Defaults to `'dataset'` when `virtualScroll: true` |
|
|
18
|
+
| `v-model:filter` / `filter` | `IDataFilter \| null` | `undefined` | Active data provider filter with two-way sync |
|
|
19
|
+
| `v-model:layout` / `layout` | `'list' \| 'grid'` | `'list'` | Item layout mode with two-way sync |
|
|
20
|
+
| `v-model:columns` / `columns` | `number \| string` | `3` | Number of grid columns when `layout` is `'grid'` |
|
|
21
|
+
| `showLayoutToggle` | `boolean` | `false` | Renders built-in List / Grid layout switcher controls |
|
|
16
22
|
|
|
17
23
|
- **Events / Emits**:
|
|
18
24
|
| Event | Payload | Description |
|
|
19
25
|
| --- | --- | --- |
|
|
20
|
-
| `@update:page` | `(page: number)` | Emitted when page changes |
|
|
21
26
|
| `@update:currentPage` | `(page: number)` | Emitted when page changes |
|
|
22
|
-
| `@update:itemsPerPage`| `(size: number)` | Emitted when page size changes |
|
|
23
27
|
| `@update:pageSize` | `(size: number)` | Emitted when page size changes |
|
|
24
28
|
| `@update:search` | `(search: string)` | Emitted when search changes |
|
|
25
29
|
| `@update:selectedRows`| `(rows: Record<string, unknown>[])` | Emitted when selection changes |
|
|
26
30
|
| `@update:selectAll` | `(all: boolean)` | Emitted when selectAll toggles |
|
|
31
|
+
| `@update:selectAllScope`| `(scope: 'page' \| 'dataset')` | Emitted when selectAllScope changes |
|
|
32
|
+
| `@update:unselectedRows`| `(rows: any[])` | Emitted when unselectedRows changes |
|
|
33
|
+
| `@update:filter` | `(filter: IDataFilter \| null)` | Emitted when filter changes |
|
|
34
|
+
| `@update:layout` | `(layout: 'list' \| 'grid')` | Emitted when layout switches between `'list'` and `'grid'` |
|
|
35
|
+
| `@update:columns` | `(columns: number)` | Emitted when grid column count changes |
|
|
36
|
+
|
|
37
|
+
- **Selection Contract & Filter Boundary**:
|
|
38
|
+
- Bulk actions receive `(selectedRows, isAllSelected, filter)`. When `isAllSelected` is true, `selectedRows` is `[]`, and the developer is responsible for executing query-level operations using `filter` and `unselectedRows`.
|
|
39
|
+
- When filters update, selection state (`selectAll`, `selectedRows`, `unselectedRows`) resets cleanly to prevent cross-query leakage.
|
|
27
40
|
|
|
28
41
|
- **Slots**:
|
|
29
42
|
| Slot | Scope | Description |
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
> - `'page'` (Default): The header checkbox selects only the visible page rows and adds them to `selectedRows`. Navigating to another page keeps previous selections.
|
|
46
46
|
> - `'dataset'`: The header checkbox sets `selectAll = true` as a fast flag without duplicating thousands/millions of records in memory. Deselected rows are recorded in `unselectedRows`, turning the header checkbox into an indeterminate state (`isIndeterminate: true`). Clicking select-all again clears all selections.
|
|
47
47
|
> - **Virtual Scrolling Incompatibility & Override**: Virtual scrolling renders a continuous window without discrete pages. Therefore, when `virtualScroll: true`, `selectAllScope` automatically defaults to `'dataset'`. If `selectAllScope="page"` is explicitly set with `virtualScroll: true`, `KDatatable` logs a console warning and automatically overrides the scope to `'dataset'`.
|
|
48
|
+
> - **Bulk Actions Contract & Client/Server Parity**: In dataset mode or virtual scrolling, `selectedRows` is passed as `[]` because large datasets cannot be enumerated into client memory. Handlers must inspect `(selectedRows, isAllSelected, filter)`. When `isAllSelected` is true, the developer performs query-level operations (`dataProvider.deleteWhere({ filter, unselected: selectedRows.unselectedRows })`). Usage is identical across client and server providers.
|
|
49
|
+
> - **Filter Boundary Invariant**: When active filters change on the provider, selection state (`selectAll = false`, `selectedRows = []`, `unselectedRows = []`) automatically resets so selections never leak across different queries.
|
|
50
|
+
>
|
|
51
|
+
> - **Virtualization & Preset Architecture**: In both default and modern presets, `KDatatable` delegates viewport calculations, row delivery caching, and selection bridging to the `useVirtualDataset` composable. Custom presets overriding `KDatatable` or `KDataIterator` must consume `useVirtualDataset` from `#toolkit/composables/useVirtualDataset` to maintain zero-copy cascade consistency without duplicating scrolling algorithms.
|
|
48
52
|
>
|
|
49
53
|
> **Mobile Responsiveness**: The datatable container provides native horizontal scrolling with touch scrolling support (`-webkit-overflow-scrolling: touch`) and `white-space: nowrap` on cells to prevent columns from collapsing awkwardly on small screens. Below `768px`, the table footer automatically stacks vertically to keep bulk actions and pagination cleanly separated.
|
|
50
54
|
|
|
@@ -53,3 +57,37 @@
|
|
|
53
57
|
| --- | --- | --- |
|
|
54
58
|
| `#cell-[field]` | `{ row: Record<string, unknown>, value: unknown }` | Custom cell renderer |
|
|
55
59
|
| `#header-[field]`| `{ field: string }` | Custom header renderer |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Example: Progressive Batch Ingestion (`batchSize: 50`)
|
|
64
|
+
Load large datasets progressively in chunks while displaying Batch 1 immediately to ensure zero UI delay:
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<template lang="pug">
|
|
68
|
+
.batch-status-panel(v-if="provider.isBatchLoading")
|
|
69
|
+
span.badge Loading batches in background...
|
|
70
|
+
span.progress {{ provider.batchProgress?.loaded }} / {{ provider.batchProgress?.total }} rows ({{ provider.batchProgress?.percent }}%)
|
|
71
|
+
|
|
72
|
+
KDatatable(
|
|
73
|
+
:dataProvider="provider"
|
|
74
|
+
:visibleFields="['id', 'name', 'email', 'role', 'city']"
|
|
75
|
+
:columnHeaders="{ id: 'ID', name: 'Full Name', email: 'Email', role: 'Role', city: 'City' }"
|
|
76
|
+
)
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script setup lang="ts">
|
|
80
|
+
import { CAPIFlatClientDataProvider, ECacheStrategy } from '@katlux/providers'
|
|
81
|
+
|
|
82
|
+
// Client-side provider with sequential batch streaming
|
|
83
|
+
const provider = new CAPIFlatClientDataProvider({
|
|
84
|
+
pageSize: 10,
|
|
85
|
+
batchSize: 50, // Fetches ?pageNumber=1&pageSize=50 immediately, then streams remaining batches
|
|
86
|
+
cacheStrategy: ECacheStrategy.ServerSession,
|
|
87
|
+
onBatchLoaded: (event) => {
|
|
88
|
+
console.log(`Batch ${event.pageNumber} ingested: ${event.totalLoaded}/${event.rowCount} rows`)
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
provider.setAPIUrl('/api/exampleDataList')
|
|
92
|
+
</script>
|
|
93
|
+
```
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
- **Component Specific Props**:
|
|
19
19
|
| Component | Prop | Type | Default | Description |
|
|
20
20
|
| --- | --- | --- | --- | --- |
|
|
21
|
-
| `KDatePicker` | `
|
|
21
|
+
| `KDatePicker` | `range` | `boolean` | `false` | Enable date range selection mode emitting [startDate, endDate] |
|
|
22
|
+
| `KDatePicker` | `viewCount` | `number` | `1` | Number of calendar months displayed |
|
|
23
|
+
| `KDatePicker` | `v-model:day` | `string \| Date \| number \| [Date, Date] \| null` | `undefined` | Alias for `v-model` |
|
|
22
24
|
| `KHourPicker` | `step` | `number` | `30` | Minute selection interval |
|
|
23
25
|
| `KHourPicker` | `startHour` | `string` | `'00:00'` | Earliest selectable time |
|
|
24
26
|
| `KHourPicker` | `endHour` | `string` | `undefined` | Latest selectable time |
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
| `idKey` | `string` | `'id'` | Unique identifier field |
|
|
22
22
|
| `v-model:selectedRows` / `selectedRows` | `Record<string, unknown>[]` | `[]` | Selected resource rows |
|
|
23
23
|
| `v-model:selectAll` / `selectAll` | `boolean` | `false` | Global select all |
|
|
24
|
+
| `v-model:unselectedRows` / `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded row objects when selectAll is true |
|
|
25
|
+
| `selectAllScope` | `'page' \| 'dataset'` | `'page'` | Scope for select-all toggle. Defaults to `'dataset'` when `virtualScroll: true` |
|
|
26
|
+
| `v-model:filter` / `filter` | `IDataFilter \| null` | `undefined` | Active filter object forwarded down through KTreeView to KDatatable |
|
|
24
27
|
| `v-model:task` | `IGanttTask | null` | `null` | Selected task |
|
|
25
28
|
| `virtualScroll` | `boolean` | `false` | Enables DOM virtualization for large resource datasets |
|
|
26
29
|
| `itemHeight` | `number` | `40` | Fixed height in px for each resource row |
|
|
@@ -44,6 +47,12 @@
|
|
|
44
47
|
| `@update:task` | `{ task: IGanttTask, sourceRow: Record<string, unknown>, targetRow?: Record<string, unknown> }` | Triggered when a task bar is dragged, resized, or moved across rows and dropped |
|
|
45
48
|
| `@update:selectedRows` | `Record<string, unknown>[]` | Triggered when row selection checkboxes change |
|
|
46
49
|
| `@update:selectAll` | `boolean` | Triggered when global select all changes |
|
|
50
|
+
| `@update:selectAllScope`| `'page' \| 'dataset'` | Triggered when select-all scope changes |
|
|
51
|
+
| `@update:unselectedRows`| `Record<string, unknown>[]` | Triggered when excluded rows change |
|
|
52
|
+
| `@update:filter` | `(filter: IDataFilter \| null)` | Triggered when filter changes |
|
|
53
|
+
|
|
54
|
+
- **Hierarchy Prop Forwarding**:
|
|
55
|
+
`KGantt` renders `KTreeView`, which in turn renders `KDatatable`. Selection state (`selectedRows`, `selectAll`, `selectAllScope`, `unselectedRows`) and query context (`filter`) are completely forwarded through the hierarchy to maintain client/server parity and consistent bulk action contracts.
|
|
47
56
|
|
|
48
57
|
- **Opening a Modal or Custom Context Menu on Task Click / Right-Click (Pug)**:
|
|
49
58
|
```pug
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
### `KIcon`
|
|
2
2
|
- **Props**: `iconname` (Required), `width`, `height`, `rotate`.
|
|
3
|
-
- **Available Icons**: `'close'`, `'search'`, `'chevron'`, `'calendar'`, `'folder'`, `'file'`, `'home'`, `'arrow-left'`, `'arrow-right'`, `'arrow-up'`, `'arrow-down'`, `'plus'`, `'minus'`, `'multiply'`, `'divide'`, `'info'`, `'mail'`, `'type'`, `'hash'`, `'user'`, `'check'`, `'settings'`, `'trash'`, `'edit'`, `'menu'`, `'more-vertical'`, `'warning'`, `'eye'`, `'eye-off'`, `'logout'`, `'refresh'`, `'download'`, `'upload'`, `'link'`, `'bell'`, `'phone'`, `'message-square'`, `'star'`, `'heart'`, `'shopping-bag'`, `'share'`, `'lock'`, `'map-pin'`, `'copy'`, `'external-link'`, `'clock'`, `'camera'`, `'image'`.
|
|
3
|
+
- **Available Icons**: `'close'`, `'search'`, `'chevron'`, `'calendar'`, `'folder'`, `'file'`, `'home'`, `'arrow-left'`, `'arrow-right'`, `'arrow-up'`, `'arrow-down'`, `'plus'`, `'minus'`, `'multiply'`, `'divide'`, `'info'`, `'mail'`, `'type'`, `'hash'`, `'user'`, `'check'`, `'settings'`, `'trash'`, `'edit'`, `'menu'`, `'more-vertical'`, `'warning'`, `'eye'`, `'eye-off'`, `'logout'`, `'refresh'`, `'download'`, `'upload'`, `'link'`, `'bell'`, `'phone'`, `'message-square'`, `'star'`, `'heart'`, `'shopping-bag'`, `'share'`, `'lock'`, `'map-pin'`, `'copy'`, `'external-link'`, `'clock'`, `'camera'`, `'image'`, `'katlux'`, `'katlux-logo'`.
|
|
4
4
|
- **Styling**: Icons inherit their primary color from `currentColor` (set via CSS `color`). For complex icons with secondary layers (e.g. `calendar`), define the `--icon-secondary` CSS variable (e.g., `--icon-secondary: var(--primary-900);`).
|
|
5
5
|
- **Testing Note**: `KIcon` resolves SVG components at runtime via Vite's `import.meta.glob`. In headless Vitest test environments, `import.meta.glob` is Vite-specific and resolves empty without a running dev server; unit tests (`KIcon.logic.spec.ts`) therefore validate pure sizing, dimension formatting, and default properties. Full SVG rendering is verified in browser E2E tests.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
### `KLayout`
|
|
2
2
|
- **Purpose**: Unified, slot-driven top-level application layout container. Adapts automatically based on slot presence (`header`, `aside`, `main`, `footer`) and dynamically forwards all slots to preset implementations.
|
|
3
|
+
- **Props**:
|
|
4
|
+
| Prop | Type | Default | Description |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| `scrollMode` | `'window' \| 'container'` | `'window'` | Controls scrolling behavior. `'window'` uses normal document/window scrolling; `'container'` locks the layout to `100dvh` and scrolls `.KLayout__main` internally. |
|
|
3
7
|
- **Slots**:
|
|
4
8
|
| Slot | Scope | Description |
|
|
5
9
|
| --- | --- | --- |
|
|
@@ -16,3 +16,6 @@
|
|
|
16
16
|
| `showLegend` | `boolean` | `true` | Displays color-coded legend |
|
|
17
17
|
| `xAxisTitle` | `string` | `undefined` | Label displayed on X axis |
|
|
18
18
|
| `yAxisTitle` | `string` | `undefined` | Label displayed on Y axis |
|
|
19
|
+
|
|
20
|
+
> **Server Provider Chart Single-Page Architecture**: By design, server-side data providers draw one page to support future charting features (pagination, zooming/virtual navigation). To fetch the entire dataset or plot aggregated series across all records, configure `pageSize: -1` on the provider or use a client-side provider (`CFlatClientDataProvider`).
|
|
21
|
+
|
|
@@ -5,3 +5,6 @@
|
|
|
5
5
|
| `loading` | `boolean` | `false` | `true`, `false` | Toggle visibility |
|
|
6
6
|
| `overlay` | `boolean` | `false` | `true`, `false` | Cover parent container |
|
|
7
7
|
| `size` | `string` | `'medium'` | `'small'`, `'medium'`, `'large'` | Spinner dimensions |
|
|
8
|
+
| `label` | `string` | `undefined` | Any string | Optional status text rendered below the spinner |
|
|
9
|
+
- **Slots**:
|
|
10
|
+
- `default`: Optional custom content rendered below the spinner (overrides `label` prop)
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
| --- | --- | --- |
|
|
19
19
|
| `@update:currentPage` | `(page: number)` | Emitted when page changes |
|
|
20
20
|
| `@update:pageSize` | `(size: number)` | Emitted when page size changes |
|
|
21
|
-
| `@page-change` | `(page: number)` | Emitted on page transition |
|
|
22
21
|
|
|
23
22
|
- **Slots**:
|
|
24
23
|
| Slot | Scope | Description |
|
|
@@ -18,3 +18,6 @@
|
|
|
18
18
|
| `showLegend` | `boolean` | `true` | Displays legend |
|
|
19
19
|
| `xAxisTitle` | `string` | `undefined` | Label on X axis |
|
|
20
20
|
| `yAxisTitle` | `string` | `undefined` | Label on Y axis |
|
|
21
|
+
|
|
22
|
+
> **Server Provider Chart Single-Page Architecture**: By design, server-side data providers draw one page to support future charting features (pagination, zooming/virtual navigation). To fetch the entire dataset or plot aggregated series across all records, configure `pageSize: -1` on the provider or use a client-side provider (`CFlatClientDataProvider`).
|
|
23
|
+
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| `type` | `string` | `'text'` | Input type (`text`, `password`, `email`, etc.) |
|
|
8
8
|
| `placeholder` | `string` | `''` | Ghost text |
|
|
9
9
|
| `showClear` | `boolean` | `false` | (**Textbox only**) Show clear icon |
|
|
10
|
+
| `loading` | `boolean` | `false` | (**Textbox only**) Display inline loading spinner inside the input |
|
|
10
11
|
| `disabled` | `boolean` | `false` | Disable interactions |
|
|
11
12
|
| `readonly` | `boolean` | `false` | Make input read-only |
|
|
12
13
|
| `maxlength` | `number` | `undefined` | Character count limit |
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
| `@update:isOptionsOpen` | `open: boolean` | Emitted when dropdown opens/closes |
|
|
32
32
|
| `@update:searchtext` | `text: string` | Emitted when search changes (`v-model:searchtext`) |
|
|
33
33
|
| `@update:expandedNodes` | `nodes: (string \| number)[]` | Emitted when expansion changes (`v-model:expandedNodes`) |
|
|
34
|
-
| `@
|
|
34
|
+
| `@update:scrollState` | `state: IVirtualScrollState` | Emitted when virtual scroll state updates |
|
|
35
|
+
| `@node-toggle` | `nodeId: string \| number` | Emitted when a tree branch node toggles |
|
|
35
36
|
- **Slots**: Forwards all slots to its internal `KTree` (e.g., `#item`, `#default`).
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
| `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
|
|
14
14
|
| `selectedRows` | `Record<string, unknown>[]` | `[]` | Currently selected rows (supports `v-model:selectedRows`) |
|
|
15
15
|
| `selectAll` | `boolean` | `false` | Header select-all state (supports `v-model:selectAll`) |
|
|
16
|
+
| `selectAllScope` | `'page' \| 'dataset'` | `'page'` | Scope for select-all toggle. Defaults to `'dataset'` when `virtualScroll: true` |
|
|
17
|
+
| `unselectedRows` | `Record<string, unknown>[]` | `[]` | Excluded row objects when selectAll is true (supports `v-model:unselectedRows`) |
|
|
18
|
+
| `v-model:filter` / `filter` | `IDataFilter \| null` | `undefined` | Active filter object forwarded to datatable and bulk actions |
|
|
19
|
+
| `virtualScroll` | `boolean` | `false` | Enables virtual DOM scrolling |
|
|
20
|
+
| `itemHeight` | `number` | `40` | Row height in pixels for virtualization |
|
|
21
|
+
| `viewportHeight` | `number` | `500` | Viewport container height in pixels |
|
|
16
22
|
| `loading` | `boolean` | `false` | Manual loading state toggle |
|
|
17
23
|
| `multiSelect` | `boolean` | `false` | Enable node checkboxes |
|
|
18
24
|
| `selectable` | `boolean` | `false` | Enable node clicking for selection |
|
|
@@ -23,6 +29,12 @@
|
|
|
23
29
|
| `@update:expandedNodes` | `value: (string \| number)[]` | Emitted when node expansion changes (`v-model:expandedNodes`) |
|
|
24
30
|
| `@update:selectedRows` | `value: Record<string, unknown>[]` | Emitted when row selection changes (`v-model:selectedRows`) |
|
|
25
31
|
| `@update:selectAll` | `value: boolean` | Emitted when select-all state toggles (`v-model:selectAll`) |
|
|
32
|
+
| `@update:selectAllScope`| `value: 'page' \| 'dataset'` | Emitted when select-all scope changes |
|
|
33
|
+
| `@update:unselectedRows`| `value: any[]` | Emitted when excluded rows change |
|
|
34
|
+
| `@update:filter` | `(filter: IDataFilter \| null)` | Emitted when filter changes |
|
|
35
|
+
|
|
36
|
+
- **Prop Forwarding to Internal KDatatable**:
|
|
37
|
+
`KTreeView` embeds `KDatatable` under the hood. All selection state (`selectedRows`, `selectAll`, `selectAllScope`, `unselectedRows`) and query context (`filter`) are seamlessly forwarded down to ensure full client/server parity and consistent bulk action contracts.
|
|
26
38
|
- **Slots**:
|
|
27
39
|
| Slot | Scope | Description |
|
|
28
40
|
| --- | --- | --- |
|
|
@@ -27,6 +27,13 @@ description: Katlux Toolkit project configuration, development standards, and in
|
|
|
27
27
|
```typescript
|
|
28
28
|
export default defineNuxtConfig({
|
|
29
29
|
modules: ['@katlux/toolkit'],
|
|
30
|
+
katluxToolkit: {
|
|
31
|
+
// Module Options
|
|
32
|
+
// autoAiReference: Opt-in automatic sync of AI skill references to .agents/skills/katlux-* during `nuxt dev`.
|
|
33
|
+
// Default is false (zero repository side-effects). Set to true to automatically sync skills in dev mode,
|
|
34
|
+
// or initialize once on-demand via `npx @katlux/toolkit ai-init`.
|
|
35
|
+
autoAiReference: false, // Default is false (opt-in)
|
|
36
|
+
},
|
|
30
37
|
runtimeConfig: {
|
|
31
38
|
public: {
|
|
32
39
|
katluxToolkit: {
|
|
@@ -38,6 +45,10 @@ export default defineNuxtConfig({
|
|
|
38
45
|
})
|
|
39
46
|
```
|
|
40
47
|
|
|
48
|
+
> [!NOTE]
|
|
49
|
+
> **AI Skills Auto-Sync (`autoAiReference`)**:
|
|
50
|
+
> By default, `autoAiReference` is `false` to ensure `nuxt dev` never creates unprompted files in consumer repositories. Set `katluxToolkit: { autoAiReference: true }` in `nuxt.config.ts` to automatically synchronize modular skill documentation to `.agents/skills/` during development with cryptographic hash protection (user-modified files are never overwritten). Alternatively, generate references and IDE configurations on demand via `npx @katlux/toolkit ai-init`.
|
|
51
|
+
|
|
41
52
|
> [!NOTE]
|
|
42
53
|
> `@katlux/toolkit` automatically installs `@nuxtjs/i18n` with a minimal English default if it is not already present in the consumer's `modules` array. Katlux components rely on `nuxtApp.$t` for all user-facing labels and ARIA strings. If you need custom locales or translation files, add `'@nuxtjs/i18n'` with your own configuration to `modules` **before** `'@katlux/toolkit'` and the toolkit will skip its default installation.
|
|
43
54
|
|
|
@@ -58,6 +69,11 @@ export default defineAppConfig({
|
|
|
58
69
|
// Priority order: Dark overrides Modern, which overrides Default fallback
|
|
59
70
|
activePreset: ['dark', 'modern'],
|
|
60
71
|
},
|
|
72
|
+
katluxProviders: {
|
|
73
|
+
// Project-level default locale for all ADataProvider instances (Tier 2 in locale resolution)
|
|
74
|
+
// Precedence: instance option/runtime -> app.config.ts / global config -> $i18n.locale -> undefined
|
|
75
|
+
locale: 'en-US',
|
|
76
|
+
},
|
|
61
77
|
})
|
|
62
78
|
```
|
|
63
79
|
|
|
@@ -104,13 +120,15 @@ export default defineAppConfig({
|
|
|
104
120
|
|
|
105
121
|
| Package Name | Current Version | Description | Installation Command |
|
|
106
122
|
| --- | --- | --- | --- |
|
|
107
|
-
| `@katlux/toolkit` | `0.1.1-alpha.
|
|
108
|
-
| `@katlux/providers` | `0.1.1-alpha.
|
|
109
|
-
| `@katlux/preset-modern` | `0.1.1-alpha.
|
|
110
|
-
| `@katlux/preset-dark` | `0.1.1-alpha.
|
|
111
|
-
| `@katlux/block-charts` | `0.1.1-alpha.
|
|
112
|
-
| `@katlux/block-ecommerce` | `0.1.1-alpha.
|
|
113
|
-
| `@katlux/mcp` | `0.1.0-alpha.
|
|
123
|
+
| `@katlux/toolkit` | `0.1.1-alpha.146` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
|
|
124
|
+
| `@katlux/providers` | `0.1.1-alpha.133` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
|
|
125
|
+
| `@katlux/preset-modern` | `0.1.1-alpha.120` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
|
|
126
|
+
| `@katlux/preset-dark` | `0.1.1-alpha.51` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
|
|
127
|
+
| `@katlux/block-charts` | `0.1.1-alpha.120` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
|
|
128
|
+
| `@katlux/block-ecommerce` | `0.1.1-alpha.120` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
|
|
129
|
+
| `@katlux/mcp-core` | `0.1.0-alpha.25` | Katlux-agnostic MCP server host, plugin auto-discovery loader, `katlux_batch`, and workspace introspection | `npm install -D @katlux/mcp-core@alpha` |
|
|
130
|
+
| `@katlux/mcp-helper` | `0.1.0-alpha.25` | Katlux UI & DataProvider MCP plugin (automatically depends on `@katlux/mcp-core`) | `npm install -D @katlux/mcp-helper@alpha` |
|
|
131
|
+
| `@katlux/mcp-workflow` | `0.1.0-alpha.25` | Optional Katlux-agnostic AI `todo/` task & workflow plugin for `@katlux/mcp-core` | `npm install -D @katlux/mcp-workflow@alpha` |
|
|
114
132
|
|
|
115
133
|
> [!NOTE]
|
|
116
134
|
> Katlux packages are currently published under the `@alpha` tag on NPM. Always append `@alpha` or the specific version tag when adding dependencies.
|
|
@@ -138,7 +156,7 @@ cd packages/katlux-providers && npm run build
|
|
|
138
156
|
|
|
139
157
|
```bash
|
|
140
158
|
# Publish packages to the beta npm tag
|
|
141
|
-
node publish
|
|
159
|
+
node publish.mjs
|
|
142
160
|
```
|
|
143
161
|
|
|
144
162
|
---
|
|
@@ -151,6 +169,7 @@ The repository enforces three distinct typecheck scopes to guarantee type safety
|
|
|
151
169
|
| :--- | :--- | :--- | :--- |
|
|
152
170
|
| **Root (Packages & Tests)** | `npm run typecheck` | `vue-tsc --noEmit` | Validates all packages (`packages/**`) and integration tests (`tests/**`), excluding `apps/**`. |
|
|
153
171
|
| **Strict Providers Package** | `npm run typecheck:providers` | `tsc -p packages/katlux-providers/tsconfig.json --noEmit` | Strict mode check on `@katlux/providers` source and unit specs. |
|
|
172
|
+
| **MCP Packages Suite** | `npm run typecheck:mcp` | `tsc` across `katlux-mcp-core`, `katlux-mcp-helper`, `katlux-mcp-workflow` | Strict mode check on the 3-package MCP suite and specs. |
|
|
154
173
|
| **Showcase Application** | `npm run typecheck:showcase` | `npx nuxi prepare apps/showcase && vue-tsc --noEmit -p apps/showcase/tsconfig.json` | Validates the showcase Nuxt app including layouts, pages, and components using generated `.nuxt` types. |
|
|
155
174
|
| **Complete Monorepo Suite** | `npm run typecheck:all` | Runs all three scopes sequentially | Enforced in GitHub Actions CI (`.github/workflows/ci.yml`) on every push and PR. |
|
|
156
175
|
|