@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
package/dist/module.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
const kit = require('@nuxt/kit');
|
|
4
6
|
const node_fs = require('node:fs');
|
|
5
7
|
const node_path = require('node:path');
|
|
6
8
|
const node_module = require('node:module');
|
|
9
|
+
const node_crypto = require('node:crypto');
|
|
7
10
|
|
|
8
11
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
12
|
const module$1 = kit.defineNuxtModule({
|
|
@@ -12,7 +15,7 @@ const module$1 = kit.defineNuxtModule({
|
|
|
12
15
|
configKey: "katluxToolkit"
|
|
13
16
|
},
|
|
14
17
|
defaults: {
|
|
15
|
-
autoAiReference:
|
|
18
|
+
autoAiReference: false
|
|
16
19
|
},
|
|
17
20
|
async setup(options, nuxt) {
|
|
18
21
|
const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
|
|
@@ -67,6 +70,9 @@ const module$1 = kit.defineNuxtModule({
|
|
|
67
70
|
"CSearchIndex",
|
|
68
71
|
"CWebCryptoStreamCipher",
|
|
69
72
|
"CKeyPinningStore",
|
|
73
|
+
"CMemoryKeyPinningStore",
|
|
74
|
+
"CLocalStorageKeyPinningStore",
|
|
75
|
+
"CIndexedDBKeyPinningStore",
|
|
70
76
|
"isEncrypted",
|
|
71
77
|
"createEncryptionProvider",
|
|
72
78
|
"rewriteEncryptedFilters",
|
|
@@ -106,6 +112,10 @@ const module$1 = kit.defineNuxtModule({
|
|
|
106
112
|
from: providersImportPath
|
|
107
113
|
}))
|
|
108
114
|
);
|
|
115
|
+
nuxt.options.imports = nuxt.options.imports || {};
|
|
116
|
+
nuxt.options.imports.transform = nuxt.options.imports.transform || {};
|
|
117
|
+
nuxt.options.imports.transform.exclude = nuxt.options.imports.transform.exclude || [];
|
|
118
|
+
nuxt.options.imports.transform.exclude.push(/[\\/]packages[\\/]katlux-providers[\\/]/);
|
|
109
119
|
kit.addServerImports(
|
|
110
120
|
providerRuntimeExports.map((name) => ({
|
|
111
121
|
name,
|
|
@@ -237,7 +247,7 @@ export {}
|
|
|
237
247
|
getContents() {
|
|
238
248
|
return `
|
|
239
249
|
import { defineNuxtPlugin } from '#app'
|
|
240
|
-
import { registerPresetComponents } from '#
|
|
250
|
+
import { registerPresetComponents } from '#toolkit/composables/usePresetComponent'
|
|
241
251
|
|
|
242
252
|
export default defineNuxtPlugin(() => {
|
|
243
253
|
const userPresetLoaders = import.meta.glob([
|
|
@@ -273,7 +283,7 @@ export default defineNuxtPlugin(() => {
|
|
|
273
283
|
options2.references.push({ path: "./types/katlux-providers-global.d.ts" });
|
|
274
284
|
}
|
|
275
285
|
});
|
|
276
|
-
if (nuxt.options.dev && options.autoAiReference
|
|
286
|
+
if (nuxt.options.dev && options.autoAiReference === true) {
|
|
277
287
|
try {
|
|
278
288
|
const isMonorepo = node_fs.existsSync(resolve(nuxt.options.rootDir, "packages/katlux-toolkit")) || node_fs.existsSync(resolve(nuxt.options.rootDir, "../../packages/katlux-toolkit"));
|
|
279
289
|
if (!isMonorepo) {
|
|
@@ -285,6 +295,9 @@ export default defineNuxtPlugin(() => {
|
|
|
285
295
|
}
|
|
286
296
|
}
|
|
287
297
|
});
|
|
298
|
+
function hashContent(content) {
|
|
299
|
+
return node_crypto.createHash("sha256").update(content, "utf-8").digest("hex");
|
|
300
|
+
}
|
|
288
301
|
function syncAiReference(rootDir, resolve) {
|
|
289
302
|
const possibleSkillsDirs = [
|
|
290
303
|
resolve("./skills"),
|
|
@@ -309,8 +322,16 @@ function syncAiReference(rootDir, resolve) {
|
|
|
309
322
|
}
|
|
310
323
|
const agentsDir = resolve(rootDir, ".agents");
|
|
311
324
|
const skillsDir = resolve(agentsDir, "skills");
|
|
312
|
-
const
|
|
325
|
+
const manifestFile = resolve(skillsDir, ".katlux-manifest.json");
|
|
313
326
|
const versionFile = resolve(skillsDir, ".katlux-version");
|
|
327
|
+
let manifest = {};
|
|
328
|
+
if (node_fs.existsSync(manifestFile)) {
|
|
329
|
+
try {
|
|
330
|
+
manifest = JSON.parse(node_fs.readFileSync(manifestFile, "utf-8"));
|
|
331
|
+
} catch {
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (!manifest.hashes) manifest.hashes = {};
|
|
314
335
|
if (node_fs.existsSync(versionFile) && node_fs.existsSync(resolve(skillsDir, "KATLUX_INDEX.md"))) {
|
|
315
336
|
try {
|
|
316
337
|
const recordedVersion = node_fs.readFileSync(versionFile, "utf-8").trim();
|
|
@@ -321,91 +342,51 @@ function syncAiReference(rootDir, resolve) {
|
|
|
321
342
|
}
|
|
322
343
|
}
|
|
323
344
|
if (!node_fs.existsSync(skillsDir)) node_fs.mkdirSync(skillsDir, { recursive: true });
|
|
324
|
-
|
|
325
|
-
|
|
345
|
+
let copied = 0;
|
|
346
|
+
let skippedUserModified = 0;
|
|
347
|
+
function syncDirRecursive(src, dest, relBase = "") {
|
|
326
348
|
if (!node_fs.existsSync(dest)) node_fs.mkdirSync(dest, { recursive: true });
|
|
327
349
|
const entries = node_fs.readdirSync(src, { withFileTypes: true });
|
|
328
|
-
let count = 0;
|
|
329
350
|
for (const entry of entries) {
|
|
351
|
+
const relPath = relBase ? `${relBase}/${entry.name}` : entry.name;
|
|
352
|
+
if (!relBase && entry.name !== "KATLUX_INDEX.md" && !entry.name.startsWith("katlux-")) {
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
330
355
|
const srcPath = node_path.join(src, entry.name);
|
|
331
356
|
const destPath = node_path.join(dest, entry.name);
|
|
332
357
|
if (entry.isDirectory()) {
|
|
333
|
-
|
|
358
|
+
syncDirRecursive(srcPath, destPath, relPath);
|
|
334
359
|
} else if (entry.name.endsWith(".md")) {
|
|
335
|
-
|
|
336
|
-
|
|
360
|
+
const srcContent = node_fs.readFileSync(srcPath, "utf-8");
|
|
361
|
+
const newHash = hashContent(srcContent);
|
|
362
|
+
if (node_fs.existsSync(destPath)) {
|
|
363
|
+
const diskContent = node_fs.readFileSync(destPath, "utf-8");
|
|
364
|
+
const diskHash = hashContent(diskContent);
|
|
365
|
+
const prevHash = manifest.hashes?.[relPath];
|
|
366
|
+
if (prevHash && diskHash !== prevHash && diskHash !== newHash) {
|
|
367
|
+
skippedUserModified++;
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
node_fs.writeFileSync(destPath, srcContent, "utf-8");
|
|
372
|
+
if (!manifest.hashes) manifest.hashes = {};
|
|
373
|
+
manifest.hashes[relPath] = newHash;
|
|
374
|
+
copied++;
|
|
337
375
|
}
|
|
338
376
|
}
|
|
339
|
-
return count;
|
|
340
377
|
}
|
|
341
|
-
|
|
378
|
+
syncDirRecursive(packagedSkillsDir, skillsDir);
|
|
379
|
+
manifest.version = packageVersion;
|
|
380
|
+
node_fs.writeFileSync(manifestFile, JSON.stringify(manifest, null, 2), "utf-8");
|
|
342
381
|
node_fs.writeFileSync(versionFile, packageVersion, "utf-8");
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
This file serves as the main entry point for AI agents to understand the workspace structure and guidelines.
|
|
348
|
-
|
|
349
|
-
- [Project Rules](.agents/rules/rules.md)
|
|
350
|
-
- [Katlux Skills Index](.agents/skills/KATLUX_INDEX.md)
|
|
351
|
-
`, "utf-8");
|
|
352
|
-
}
|
|
353
|
-
const rulesMdPath = resolve(rulesDir, "rules.md");
|
|
354
|
-
if (!node_fs.existsSync(rulesMdPath)) {
|
|
355
|
-
node_fs.writeFileSync(rulesMdPath, `# Agent Rules
|
|
356
|
-
|
|
357
|
-
## Project-Specific Rules
|
|
358
|
-
|
|
359
|
-
<!-- Add your own project rules here. -->
|
|
360
|
-
<!-- Example: always use the "users" Pinia store for auth state. -->
|
|
361
|
-
|
|
362
|
-
## Katlux Code Standards
|
|
363
|
-
|
|
364
|
-
1. **Zero-Import Standard**: All \`K*\` components (\`KDatatable\`, \`KModal\`, etc.), \`C*\` provider classes (\`CAPIFlatServerDataProvider\`, \`CFlatClientDataProvider\`, etc.), and \`E*\` enums (\`ECacheStrategy\`, \`EDataFilterOperator\`) are globally auto-imported by the Nuxt module. **DO NOT generate top-level import statements for Katlux components, providers, or enums in Vue SFC files.**
|
|
365
|
-
2. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
|
|
366
|
-
3. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
|
|
367
|
-
4. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
|
|
368
|
-
5. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
|
|
369
|
-
6. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
|
|
370
|
-
`, "utf-8");
|
|
371
|
-
}
|
|
372
|
-
const KATLUX_MCP_SERVER = { command: "npx", args: ["-y", "@katlux/mcp"] };
|
|
373
|
-
function updateMcpConfig(filePath) {
|
|
374
|
-
let config = {};
|
|
375
|
-
if (node_fs.existsSync(filePath)) {
|
|
376
|
-
try {
|
|
377
|
-
config = JSON.parse(node_fs.readFileSync(filePath, "utf-8"));
|
|
378
|
-
} catch {
|
|
379
|
-
config = {};
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
if (!config.mcpServers) config.mcpServers = {};
|
|
383
|
-
config.mcpServers.katlux = KATLUX_MCP_SERVER;
|
|
384
|
-
node_fs.writeFileSync(filePath, JSON.stringify(config, null, 2), "utf-8");
|
|
385
|
-
}
|
|
386
|
-
updateMcpConfig(resolve(agentsDir, "mcp_config.json"));
|
|
387
|
-
const cursorDir = resolve(rootDir, ".cursor");
|
|
388
|
-
if (node_fs.existsSync(cursorDir)) {
|
|
389
|
-
updateMcpConfig(resolve(cursorDir, "mcp.json"));
|
|
390
|
-
}
|
|
391
|
-
const vscodeDir = resolve(rootDir, ".vscode");
|
|
392
|
-
if (node_fs.existsSync(vscodeDir)) {
|
|
393
|
-
updateMcpConfig(resolve(vscodeDir, "mcp.json"));
|
|
394
|
-
}
|
|
395
|
-
const pkgJsonPath = resolve(rootDir, "package.json");
|
|
396
|
-
if (node_fs.existsSync(pkgJsonPath)) {
|
|
397
|
-
try {
|
|
398
|
-
const pkg = JSON.parse(node_fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
399
|
-
if (!pkg.scripts) pkg.scripts = {};
|
|
400
|
-
if (!pkg.scripts["ai:check"]) {
|
|
401
|
-
pkg.scripts["ai:check"] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15";
|
|
402
|
-
node_fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
|
|
403
|
-
}
|
|
404
|
-
} catch {
|
|
382
|
+
if (copied > 0) {
|
|
383
|
+
console.log(`[Katlux] Synced ${copied} AI skill files to .agents/skills/ (enabled via katluxToolkit: { autoAiReference: true })`);
|
|
384
|
+
if (skippedUserModified > 0) {
|
|
385
|
+
console.log(`[Katlux] Preserved ${skippedUserModified} locally modified skill files.`);
|
|
405
386
|
}
|
|
406
387
|
}
|
|
407
|
-
console.log(`[Katlux] Auto-synced ${copied} AI skills and MCP server configuration (v${packageVersion}) to .agents/`);
|
|
408
|
-
console.log(`[Katlux] \u{1F4A1} AI Token Tip: When AI pairing, use compact test reporters (e.g. Vitest --reporter=agent, Jest --reporters=summary) or git-changed flags (-o / --changed) to prevent log noise and save context tokens.`);
|
|
409
388
|
}
|
|
410
389
|
|
|
411
|
-
|
|
390
|
+
exports.default = module$1;
|
|
391
|
+
exports.hashContent = hashContent;
|
|
392
|
+
exports.syncAiReference = syncAiReference;
|
package/dist/module.d.cts
CHANGED
|
@@ -6,5 +6,10 @@ interface ModuleOptions {
|
|
|
6
6
|
}
|
|
7
7
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
8
|
|
|
9
|
+
declare function hashContent(content: string): string;
|
|
10
|
+
declare function syncAiReference(rootDir: string, resolve: (...paths: string[]) => string): void;
|
|
11
|
+
|
|
12
|
+
// @ts-ignore
|
|
9
13
|
export = _default;
|
|
14
|
+
export { hashContent, syncAiReference };
|
|
10
15
|
export type { ModuleOptions };
|
package/dist/module.d.mts
CHANGED
|
@@ -6,5 +6,8 @@ interface ModuleOptions {
|
|
|
6
6
|
}
|
|
7
7
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
declare function hashContent(content: string): string;
|
|
10
|
+
declare function syncAiReference(rootDir: string, resolve: (...paths: string[]) => string): void;
|
|
11
|
+
|
|
12
|
+
export { _default as default, hashContent, syncAiReference };
|
|
10
13
|
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, reso
|
|
|
2
2
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { createRequire } from 'node:module';
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
5
6
|
|
|
6
7
|
const module$1 = defineNuxtModule({
|
|
7
8
|
meta: {
|
|
@@ -9,7 +10,7 @@ const module$1 = defineNuxtModule({
|
|
|
9
10
|
configKey: "katluxToolkit"
|
|
10
11
|
},
|
|
11
12
|
defaults: {
|
|
12
|
-
autoAiReference:
|
|
13
|
+
autoAiReference: false
|
|
13
14
|
},
|
|
14
15
|
async setup(options, nuxt) {
|
|
15
16
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -64,6 +65,9 @@ const module$1 = defineNuxtModule({
|
|
|
64
65
|
"CSearchIndex",
|
|
65
66
|
"CWebCryptoStreamCipher",
|
|
66
67
|
"CKeyPinningStore",
|
|
68
|
+
"CMemoryKeyPinningStore",
|
|
69
|
+
"CLocalStorageKeyPinningStore",
|
|
70
|
+
"CIndexedDBKeyPinningStore",
|
|
67
71
|
"isEncrypted",
|
|
68
72
|
"createEncryptionProvider",
|
|
69
73
|
"rewriteEncryptedFilters",
|
|
@@ -103,6 +107,10 @@ const module$1 = defineNuxtModule({
|
|
|
103
107
|
from: providersImportPath
|
|
104
108
|
}))
|
|
105
109
|
);
|
|
110
|
+
nuxt.options.imports = nuxt.options.imports || {};
|
|
111
|
+
nuxt.options.imports.transform = nuxt.options.imports.transform || {};
|
|
112
|
+
nuxt.options.imports.transform.exclude = nuxt.options.imports.transform.exclude || [];
|
|
113
|
+
nuxt.options.imports.transform.exclude.push(/[\\/]packages[\\/]katlux-providers[\\/]/);
|
|
106
114
|
addServerImports(
|
|
107
115
|
providerRuntimeExports.map((name) => ({
|
|
108
116
|
name,
|
|
@@ -234,7 +242,7 @@ export {}
|
|
|
234
242
|
getContents() {
|
|
235
243
|
return `
|
|
236
244
|
import { defineNuxtPlugin } from '#app'
|
|
237
|
-
import { registerPresetComponents } from '#
|
|
245
|
+
import { registerPresetComponents } from '#toolkit/composables/usePresetComponent'
|
|
238
246
|
|
|
239
247
|
export default defineNuxtPlugin(() => {
|
|
240
248
|
const userPresetLoaders = import.meta.glob([
|
|
@@ -270,7 +278,7 @@ export default defineNuxtPlugin(() => {
|
|
|
270
278
|
options2.references.push({ path: "./types/katlux-providers-global.d.ts" });
|
|
271
279
|
}
|
|
272
280
|
});
|
|
273
|
-
if (nuxt.options.dev && options.autoAiReference
|
|
281
|
+
if (nuxt.options.dev && options.autoAiReference === true) {
|
|
274
282
|
try {
|
|
275
283
|
const isMonorepo = existsSync(resolve(nuxt.options.rootDir, "packages/katlux-toolkit")) || existsSync(resolve(nuxt.options.rootDir, "../../packages/katlux-toolkit"));
|
|
276
284
|
if (!isMonorepo) {
|
|
@@ -282,6 +290,9 @@ export default defineNuxtPlugin(() => {
|
|
|
282
290
|
}
|
|
283
291
|
}
|
|
284
292
|
});
|
|
293
|
+
function hashContent(content) {
|
|
294
|
+
return createHash("sha256").update(content, "utf-8").digest("hex");
|
|
295
|
+
}
|
|
285
296
|
function syncAiReference(rootDir, resolve) {
|
|
286
297
|
const possibleSkillsDirs = [
|
|
287
298
|
resolve("./skills"),
|
|
@@ -306,8 +317,16 @@ function syncAiReference(rootDir, resolve) {
|
|
|
306
317
|
}
|
|
307
318
|
const agentsDir = resolve(rootDir, ".agents");
|
|
308
319
|
const skillsDir = resolve(agentsDir, "skills");
|
|
309
|
-
const
|
|
320
|
+
const manifestFile = resolve(skillsDir, ".katlux-manifest.json");
|
|
310
321
|
const versionFile = resolve(skillsDir, ".katlux-version");
|
|
322
|
+
let manifest = {};
|
|
323
|
+
if (existsSync(manifestFile)) {
|
|
324
|
+
try {
|
|
325
|
+
manifest = JSON.parse(readFileSync(manifestFile, "utf-8"));
|
|
326
|
+
} catch {
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (!manifest.hashes) manifest.hashes = {};
|
|
311
330
|
if (existsSync(versionFile) && existsSync(resolve(skillsDir, "KATLUX_INDEX.md"))) {
|
|
312
331
|
try {
|
|
313
332
|
const recordedVersion = readFileSync(versionFile, "utf-8").trim();
|
|
@@ -318,91 +337,49 @@ function syncAiReference(rootDir, resolve) {
|
|
|
318
337
|
}
|
|
319
338
|
}
|
|
320
339
|
if (!existsSync(skillsDir)) mkdirSync(skillsDir, { recursive: true });
|
|
321
|
-
|
|
322
|
-
|
|
340
|
+
let copied = 0;
|
|
341
|
+
let skippedUserModified = 0;
|
|
342
|
+
function syncDirRecursive(src, dest, relBase = "") {
|
|
323
343
|
if (!existsSync(dest)) mkdirSync(dest, { recursive: true });
|
|
324
344
|
const entries = readdirSync(src, { withFileTypes: true });
|
|
325
|
-
let count = 0;
|
|
326
345
|
for (const entry of entries) {
|
|
346
|
+
const relPath = relBase ? `${relBase}/${entry.name}` : entry.name;
|
|
347
|
+
if (!relBase && entry.name !== "KATLUX_INDEX.md" && !entry.name.startsWith("katlux-")) {
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
327
350
|
const srcPath = join(src, entry.name);
|
|
328
351
|
const destPath = join(dest, entry.name);
|
|
329
352
|
if (entry.isDirectory()) {
|
|
330
|
-
|
|
353
|
+
syncDirRecursive(srcPath, destPath, relPath);
|
|
331
354
|
} else if (entry.name.endsWith(".md")) {
|
|
332
|
-
|
|
333
|
-
|
|
355
|
+
const srcContent = readFileSync(srcPath, "utf-8");
|
|
356
|
+
const newHash = hashContent(srcContent);
|
|
357
|
+
if (existsSync(destPath)) {
|
|
358
|
+
const diskContent = readFileSync(destPath, "utf-8");
|
|
359
|
+
const diskHash = hashContent(diskContent);
|
|
360
|
+
const prevHash = manifest.hashes?.[relPath];
|
|
361
|
+
if (prevHash && diskHash !== prevHash && diskHash !== newHash) {
|
|
362
|
+
skippedUserModified++;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
writeFileSync(destPath, srcContent, "utf-8");
|
|
367
|
+
if (!manifest.hashes) manifest.hashes = {};
|
|
368
|
+
manifest.hashes[relPath] = newHash;
|
|
369
|
+
copied++;
|
|
334
370
|
}
|
|
335
371
|
}
|
|
336
|
-
return count;
|
|
337
372
|
}
|
|
338
|
-
|
|
373
|
+
syncDirRecursive(packagedSkillsDir, skillsDir);
|
|
374
|
+
manifest.version = packageVersion;
|
|
375
|
+
writeFileSync(manifestFile, JSON.stringify(manifest, null, 2), "utf-8");
|
|
339
376
|
writeFileSync(versionFile, packageVersion, "utf-8");
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
This file serves as the main entry point for AI agents to understand the workspace structure and guidelines.
|
|
345
|
-
|
|
346
|
-
- [Project Rules](.agents/rules/rules.md)
|
|
347
|
-
- [Katlux Skills Index](.agents/skills/KATLUX_INDEX.md)
|
|
348
|
-
`, "utf-8");
|
|
349
|
-
}
|
|
350
|
-
const rulesMdPath = resolve(rulesDir, "rules.md");
|
|
351
|
-
if (!existsSync(rulesMdPath)) {
|
|
352
|
-
writeFileSync(rulesMdPath, `# Agent Rules
|
|
353
|
-
|
|
354
|
-
## Project-Specific Rules
|
|
355
|
-
|
|
356
|
-
<!-- Add your own project rules here. -->
|
|
357
|
-
<!-- Example: always use the "users" Pinia store for auth state. -->
|
|
358
|
-
|
|
359
|
-
## Katlux Code Standards
|
|
360
|
-
|
|
361
|
-
1. **Zero-Import Standard**: All \`K*\` components (\`KDatatable\`, \`KModal\`, etc.), \`C*\` provider classes (\`CAPIFlatServerDataProvider\`, \`CFlatClientDataProvider\`, etc.), and \`E*\` enums (\`ECacheStrategy\`, \`EDataFilterOperator\`) are globally auto-imported by the Nuxt module. **DO NOT generate top-level import statements for Katlux components, providers, or enums in Vue SFC files.**
|
|
362
|
-
2. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
|
|
363
|
-
3. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
|
|
364
|
-
4. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
|
|
365
|
-
5. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
|
|
366
|
-
6. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
|
|
367
|
-
`, "utf-8");
|
|
368
|
-
}
|
|
369
|
-
const KATLUX_MCP_SERVER = { command: "npx", args: ["-y", "@katlux/mcp"] };
|
|
370
|
-
function updateMcpConfig(filePath) {
|
|
371
|
-
let config = {};
|
|
372
|
-
if (existsSync(filePath)) {
|
|
373
|
-
try {
|
|
374
|
-
config = JSON.parse(readFileSync(filePath, "utf-8"));
|
|
375
|
-
} catch {
|
|
376
|
-
config = {};
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
if (!config.mcpServers) config.mcpServers = {};
|
|
380
|
-
config.mcpServers.katlux = KATLUX_MCP_SERVER;
|
|
381
|
-
writeFileSync(filePath, JSON.stringify(config, null, 2), "utf-8");
|
|
382
|
-
}
|
|
383
|
-
updateMcpConfig(resolve(agentsDir, "mcp_config.json"));
|
|
384
|
-
const cursorDir = resolve(rootDir, ".cursor");
|
|
385
|
-
if (existsSync(cursorDir)) {
|
|
386
|
-
updateMcpConfig(resolve(cursorDir, "mcp.json"));
|
|
387
|
-
}
|
|
388
|
-
const vscodeDir = resolve(rootDir, ".vscode");
|
|
389
|
-
if (existsSync(vscodeDir)) {
|
|
390
|
-
updateMcpConfig(resolve(vscodeDir, "mcp.json"));
|
|
391
|
-
}
|
|
392
|
-
const pkgJsonPath = resolve(rootDir, "package.json");
|
|
393
|
-
if (existsSync(pkgJsonPath)) {
|
|
394
|
-
try {
|
|
395
|
-
const pkg = JSON.parse(readFileSync(pkgJsonPath, "utf-8"));
|
|
396
|
-
if (!pkg.scripts) pkg.scripts = {};
|
|
397
|
-
if (!pkg.scripts["ai:check"]) {
|
|
398
|
-
pkg.scripts["ai:check"] = "vue-tsc --noEmit --pretty false | grep -E 'error TS' | head -n 15";
|
|
399
|
-
writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
|
|
400
|
-
}
|
|
401
|
-
} catch {
|
|
377
|
+
if (copied > 0) {
|
|
378
|
+
console.log(`[Katlux] Synced ${copied} AI skill files to .agents/skills/ (enabled via katluxToolkit: { autoAiReference: true })`);
|
|
379
|
+
if (skippedUserModified > 0) {
|
|
380
|
+
console.log(`[Katlux] Preserved ${skippedUserModified} locally modified skill files.`);
|
|
402
381
|
}
|
|
403
382
|
}
|
|
404
|
-
console.log(`[Katlux] Auto-synced ${copied} AI skills and MCP server configuration (v${packageVersion}) to .agents/`);
|
|
405
|
-
console.log(`[Katlux] \u{1F4A1} AI Token Tip: When AI pairing, use compact test reporters (e.g. Vitest --reporter=agent, Jest --reporters=summary) or git-changed flags (-o / --changed) to prevent log noise and save context tokens.`);
|
|
406
383
|
}
|
|
407
384
|
|
|
408
|
-
export { module$1 as default };
|
|
385
|
+
export { module$1 as default, hashContent, syncAiReference };
|
|
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
28
28
|
onChange?: ((value: any) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
multiOpen: boolean;
|
|
31
30
|
modelValue: string | number | string[] | number[];
|
|
31
|
+
multiOpen: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
28
28
|
onChange?: ((value: any) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
multiOpen: boolean;
|
|
31
30
|
modelValue: string | number | string[] | number[];
|
|
31
|
+
multiOpen: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import type { IKDatatableAction, TDataRow } from '@katlux/providers';
|
|
1
|
+
import type { IKDatatableAction, TDataRow, IDataFilter, CFlatClientDataProvider } from '@katlux/providers';
|
|
2
2
|
interface Props {
|
|
3
3
|
bulkActions?: IKDatatableAction[];
|
|
4
4
|
selectedRows?: TDataRow[];
|
|
5
5
|
selectAll?: boolean;
|
|
6
6
|
unselectedRows?: TDataRow[];
|
|
7
|
-
|
|
7
|
+
totalCount?: number;
|
|
8
|
+
filter?: IDataFilter | null;
|
|
9
|
+
dataProvider?: CFlatClientDataProvider;
|
|
8
10
|
}
|
|
9
11
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
-
filter:
|
|
12
|
+
filter: IDataFilter | null;
|
|
11
13
|
selectedRows: TDataRow[];
|
|
12
14
|
unselectedRows: TDataRow[];
|
|
13
15
|
bulkActions: IKDatatableAction[];
|
|
14
16
|
selectAll: boolean;
|
|
17
|
+
totalCount: number;
|
|
18
|
+
dataProvider: CFlatClientDataProvider;
|
|
15
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
20
|
declare const _default: typeof __VLS_export;
|
|
17
21
|
export default _default;
|
|
@@ -8,7 +8,9 @@ const props = defineProps({
|
|
|
8
8
|
selectedRows: { type: Array, required: false, default: () => [] },
|
|
9
9
|
selectAll: { type: Boolean, required: false, default: false },
|
|
10
10
|
unselectedRows: { type: Array, required: false, default: () => [] },
|
|
11
|
-
|
|
11
|
+
totalCount: { type: Number, required: false, default: void 0 },
|
|
12
|
+
filter: { type: [Object, null], required: false, default: void 0 },
|
|
13
|
+
dataProvider: { type: Object, required: false, default: void 0 }
|
|
12
14
|
});
|
|
13
15
|
const { selected, dp, doAction, visibleBulkActions } = useKBulkActionsLogic(props);
|
|
14
16
|
const presetComponent = usePresetComponent("KBulkActions", KBulkActionsDefault);
|
|
@@ -17,6 +19,7 @@ const templateProps = computed(() => ({
|
|
|
17
19
|
selectedRows: props.selectedRows,
|
|
18
20
|
selectAll: props.selectAll,
|
|
19
21
|
unselectedRows: props.unselectedRows,
|
|
22
|
+
totalCount: props.totalCount,
|
|
20
23
|
filter: props.filter,
|
|
21
24
|
selected: selected.value,
|
|
22
25
|
dp,
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import type { IKDatatableAction, TDataRow } from '@katlux/providers';
|
|
1
|
+
import type { IKDatatableAction, TDataRow, IDataFilter, CFlatClientDataProvider } from '@katlux/providers';
|
|
2
2
|
interface Props {
|
|
3
3
|
bulkActions?: IKDatatableAction[];
|
|
4
4
|
selectedRows?: TDataRow[];
|
|
5
5
|
selectAll?: boolean;
|
|
6
6
|
unselectedRows?: TDataRow[];
|
|
7
|
-
|
|
7
|
+
totalCount?: number;
|
|
8
|
+
filter?: IDataFilter | null;
|
|
9
|
+
dataProvider?: CFlatClientDataProvider;
|
|
8
10
|
}
|
|
9
11
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
-
filter:
|
|
12
|
+
filter: IDataFilter | null;
|
|
11
13
|
selectedRows: TDataRow[];
|
|
12
14
|
unselectedRows: TDataRow[];
|
|
13
15
|
bulkActions: IKDatatableAction[];
|
|
14
16
|
selectAll: boolean;
|
|
17
|
+
totalCount: number;
|
|
18
|
+
dataProvider: CFlatClientDataProvider;
|
|
15
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
20
|
declare const _default: typeof __VLS_export;
|
|
17
21
|
export default _default;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import type { IKDatatableAction, TDataRow } from '@katlux/providers';
|
|
1
|
+
import type { IKDatatableAction, TDataRow, IDataFilter } from '@katlux/providers';
|
|
2
2
|
import { CFlatClientDataProvider } from '@katlux/providers';
|
|
3
3
|
export interface KBulkActionsProps {
|
|
4
4
|
bulkActions: IKDatatableAction[];
|
|
5
5
|
selectedRows: TDataRow[];
|
|
6
6
|
selectAll: boolean;
|
|
7
7
|
unselectedRows?: TDataRow[];
|
|
8
|
-
|
|
8
|
+
totalCount?: number;
|
|
9
|
+
filter?: IDataFilter | null;
|
|
9
10
|
idKey?: string;
|
|
11
|
+
dataProvider?: CFlatClientDataProvider;
|
|
10
12
|
}
|
|
11
13
|
export declare const KBulkActionsDefaultProps: {};
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the subset of `selectedRows` an action applies to without requiring extra action props
|
|
16
|
+
* or `fn.toString()` parameter-name inspection (which breaks under production minification).
|
|
17
|
+
*
|
|
18
|
+
* - 2-argument `visible(rows, selectAll)` predicates are evaluated directly against the selection.
|
|
19
|
+
* - 1-argument `visible(arg)` predicates are probed with an `Array` Proxy: accessing only `Array`
|
|
20
|
+
* properties/methods evaluates the whole selection; accessing any row property filters per-row.
|
|
21
|
+
*/
|
|
12
22
|
export declare function getApplicableRows(action: IKDatatableAction, selectedRows: TDataRow[], selectAll: boolean): TDataRow[];
|
|
13
23
|
export declare function useKBulkActionsLogic(props: KBulkActionsProps): {
|
|
14
24
|
selected: import("vue").Ref<{
|