@katlux/toolkit 0.1.1-alpha.141 → 0.1.1-alpha.143

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.
Files changed (56) hide show
  1. package/bin/add-ai-reference.mjs +17 -0
  2. package/bin/create-preset.mjs +20 -1
  3. package/dist/compiled/composables/useKatluxForm.mjs +29 -21
  4. package/dist/module.cjs +168 -5
  5. package/dist/module.json +1 -1
  6. package/dist/module.mjs +169 -6
  7. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
  8. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
  9. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +1 -1
  10. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +1 -1
  11. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +1 -1
  12. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
  13. package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
  14. package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
  15. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  16. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  17. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +1 -1
  18. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +1 -1
  19. package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
  20. package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
  21. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
  22. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
  23. package/dist/runtime/composables/useKatluxForm.d.ts +11 -11
  24. package/dist/runtime/composables/useKatluxForm.js +29 -21
  25. package/dist/skills/katlux-components/components/KAreaChart.md +1 -1
  26. package/dist/skills/katlux-components/components/KBarChart.md +1 -1
  27. package/dist/skills/katlux-components/components/KBulkActions.md +3 -3
  28. package/dist/skills/katlux-components/components/KCheckbox.md +2 -2
  29. package/dist/skills/katlux-components/components/KCombobox.md +3 -3
  30. package/dist/skills/katlux-components/components/KCompositeInput.md +4 -4
  31. package/dist/skills/katlux-components/components/KDataIterator.md +3 -3
  32. package/dist/skills/katlux-components/components/KDatatable.md +7 -7
  33. package/dist/skills/katlux-components/components/KDatePicker.md +3 -3
  34. package/dist/skills/katlux-components/components/KGantt.md +12 -12
  35. package/dist/skills/katlux-components/components/KHeatMap.md +1 -1
  36. package/dist/skills/katlux-components/components/KLineChart.md +1 -1
  37. package/dist/skills/katlux-components/components/KPieChart.md +1 -1
  38. package/dist/skills/katlux-components/components/KScatterChart.md +1 -1
  39. package/dist/skills/katlux-components/components/KTree.md +8 -8
  40. package/dist/skills/katlux-components/components/KTreePicker.md +3 -3
  41. package/dist/skills/katlux-components/components/KTreeView.md +3 -3
  42. package/dist/skills/katlux-config/SKILL.md +7 -7
  43. package/dist/skills/katlux-presets/SKILL.md +1 -1
  44. package/dist/skills/katlux-presets/creating-a-preset.md +1 -1
  45. package/dist/skills/katlux-providers/providers/ADataProvider.md +3 -3
  46. package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +3 -3
  47. package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +3 -3
  48. package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +4 -4
  49. package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +1 -1
  50. package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +2 -2
  51. package/dist/skills/katlux-providers/providers/RequestProvider.md +4 -4
  52. package/dist/skills/katlux-providers/providers/caching.md +11 -11
  53. package/dist/skills/katlux-providers/providers/encryption-threat-model.md +2 -2
  54. package/dist/skills/katlux-providers/providers/types.md +5 -5
  55. package/dist/skills/katlux-providers/providers/useDataProvider.md +1 -1
  56. package/package.json +2 -2
@@ -11,7 +11,7 @@
11
11
  | `v-model:expandedNodes` / `expandedNodes` | `(string \| number)[]` | `[]` | Array of expanded node IDs with two-way binding |
12
12
  | `rowActions` | `IKDatatableAction[]` | `[]` | Per-row action menu |
13
13
  | `bulkActions` | `IKDatatableAction[]` | `[]` | Global actions for selected rows |
14
- | `selectedRows` | `any[]` | `[]` | Currently selected rows (supports `v-model:selectedRows`) |
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
16
  | `loading` | `boolean` | `false` | Manual loading state toggle |
17
17
  | `multiSelect` | `boolean` | `false` | Enable node checkboxes |
@@ -21,10 +21,10 @@
21
21
  | Event | Payload | Description |
22
22
  | --- | --- | --- |
23
23
  | `@update:expandedNodes` | `value: (string \| number)[]` | Emitted when node expansion changes (`v-model:expandedNodes`) |
24
- | `@update:selectedRows` | `value: any[]` | Emitted when row selection changes (`v-model:selectedRows`) |
24
+ | `@update:selectedRows` | `value: Record<string, unknown>[]` | Emitted when row selection changes (`v-model:selectedRows`) |
25
25
  | `@update:selectAll` | `value: boolean` | Emitted when select-all state toggles (`v-model:selectAll`) |
26
26
  - **Slots**:
27
27
  | Slot | Scope | Description |
28
28
  | --- | --- | --- |
29
- | `#cell-[field]` | `{ row: any, field: string, value: any }` | Custom cell renderer for a column |
29
+ | `#cell-[field]` | `{ row: Record<string, unknown>, field: string, value: unknown }` | Custom cell renderer for a column |
30
30
  | `#header-[field]` | `{ field: string }` | Custom header renderer for a column |
@@ -104,13 +104,13 @@ export default defineAppConfig({
104
104
 
105
105
  | Package Name | Current Version | Description | Installation Command |
106
106
  | --- | --- | --- | --- |
107
- | `@katlux/toolkit` | `0.1.1-alpha.140` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
108
- | `@katlux/providers` | `0.1.1-alpha.128` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
109
- | `@katlux/preset-modern` | `0.1.1-alpha.115` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
110
- | `@katlux/preset-dark` | `0.1.1-alpha.46` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
111
- | `@katlux/block-charts` | `0.1.1-alpha.115` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
112
- | `@katlux/block-ecommerce` | `0.1.1-alpha.115` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
113
- | `@katlux/mcp` | `0.1.0-alpha.20` | Model Context Protocol server for AI assistant integration | `npm install @katlux/mcp@alpha` |
107
+ | `@katlux/toolkit` | `0.1.1-alpha.142` | Core Nuxt module, UI toolkit, presets, and components | `npm install @katlux/toolkit@alpha` |
108
+ | `@katlux/providers` | `0.1.1-alpha.130` | Core data providers, client caching, and state structures | `npm install @katlux/providers@alpha` |
109
+ | `@katlux/preset-modern` | `0.1.1-alpha.117` | Modern design preset and styling variables | `npm install @katlux/preset-modern@alpha` |
110
+ | `@katlux/preset-dark` | `0.1.1-alpha.48` | Sleek Dark Mode design preset | `npm install @katlux/preset-dark@alpha` |
111
+ | `@katlux/block-charts` | `0.1.1-alpha.117` | Pre-built charting block components | `npm install @katlux/block-charts@alpha` |
112
+ | `@katlux/block-ecommerce` | `0.1.1-alpha.117` | Pre-built eCommerce block components | `npm install @katlux/block-ecommerce@alpha` |
113
+ | `@katlux/mcp` | `0.1.0-alpha.22` | Model Context Protocol server for AI assistant integration | `npm install @katlux/mcp@alpha` |
114
114
 
115
115
  > [!NOTE]
116
116
  > Katlux packages are currently published under the `@alpha` tag on NPM. Always append `@alpha` or the specific version tag when adding dependencies.
@@ -163,7 +163,7 @@ button.KButton.my-brand(:class="buttonClasses" @click="onClick")
163
163
 
164
164
  <script lang="ts" setup>
165
165
  defineProps<{
166
- buttonClasses: any
166
+ buttonClasses: string | string[] | Record<string, boolean>
167
167
  onClick: (e: MouseEvent) => void
168
168
  // ... same props as the default KButton template
169
169
  }>()
@@ -127,7 +127,7 @@ button.KButton.my-brand(
127
127
  <script lang="ts" setup>
128
128
  interface ButtonProps {
129
129
  type?: 'button' | 'submit' | 'reset'
130
- buttonClasses?: any
130
+ buttonClasses?: string | string[] | Record<string, boolean>
131
131
  disabled?: boolean
132
132
  loading?: boolean
133
133
  customClasses?: string
@@ -23,15 +23,15 @@
23
23
  | `cacheLifetime` | `number` | `undefined` | Cache expiration in milliseconds |
24
24
  | `filterDebounce` | `number` | `300` | Debounce time in ms for `setFilter` |
25
25
  | `sortDebounce` | `number` | `200` | Debounce time in ms for `setSortList` |
26
- | `context` | `any` | `undefined` | Framework-agnostic SSR context (React SSR state, Next.js context, or Nuxt app instance) |
27
- | `nuxtApp` | `any` | `undefined` | *(Deprecated, use `context`)* Nuxt app instance for backward compatibility |
26
+ | `context` | `Record<string, unknown>` | `undefined` | Framework-agnostic SSR context (React SSR state, Next.js context, or Nuxt app instance) |
27
+ | `nuxtApp` | `unknown` | `undefined` | *(Deprecated, use `context`)* Nuxt app instance for backward compatibility |
28
28
  | `refreshOnMutation` | `boolean` | `true` | Reload data after `create`/`update`/`delete` |
29
29
 
30
30
  ### State Properties (Pure native TypeScript properties)
31
31
  - **`pageData`**: `T[]` - Current visible slice of data.
32
32
  - **`rowCount`**: `number` - Total results (filtered count or server total).
33
33
  - **`loading`**: `boolean` - Active data operation status.
34
- - **`error`**: `any` - Last error encountered during fetch.
34
+ - **`error`**: `Error | unknown` - Last error encountered during fetch.
35
35
  - **`currentPage`**: `number` - Active page index (1-based).
36
36
  - **`pageSize`**: `number` - Items per page.
37
37
  - **`filter`**: `IDataFilter | null` - Active filter configuration.
@@ -7,9 +7,9 @@ Specialized versions that fetch a dataset **once** from an API and then manage i
7
7
  | `setAPIUrl(url)` | `string` | Sets endpoint and triggers initial fetch |
8
8
  | `refresh(hardRefresh?)`| `boolean` | Manually refetch the entire dataset. Cache will only be overridden if `hardRefresh` parameter is true. |
9
9
  | `setFilter(filter)` | `IDataFilter \| null` | Applies a structured filter to the locally cached dataset. Filtering runs client-side via `useFilterLogic()`. Resets to page 1. |
10
- | `create(item)` | `any` | POST to API and update local state |
11
- | `update(item)` | `any` | PUT to API and update local item |
12
- | `delete(items)` | `any[]` | DELETE from API and remove locally |
10
+ | `create(item)` | `TRow` | POST to API and update local state |
11
+ | `update(item)` | `TRow` | PUT to API and update local item |
12
+ | `delete(items)` | `TRow[]` | DELETE from API and remove locally |
13
13
  - **`filter`**: `Ref<IDataFilter | null>` - The currently active filter configuration.
14
14
 
15
15
  ### Tree-Specific methods (Client Providers)
@@ -16,9 +16,9 @@ Handle full API integration with automatic query generation. Pagination, filteri
16
16
  | --- | --- | --- |
17
17
  | `refresh(hardRefresh?)`| `boolean` | Manual trigger for reload. Cache will only be overridden if `hardRefresh` parameter is true. |
18
18
  | `loadPageData(opts)` | `{ disableCache?: boolean }` | Core logic for data retrieval |
19
- | `create(item)` | `any` | Async POST request to creation endpoint |
20
- | `update(item)` | `any` | Async PUT request to update endpoint |
21
- | `delete(items)` | `any[]` | Async batch deletion via endpoint |
19
+ | `create(item)` | `TRow` | Async POST request to creation endpoint |
20
+ | `update(item)` | `TRow` | Async PUT request to update endpoint |
21
+ | `delete(items)` | `TRow[]` | Async batch deletion via endpoint |
22
22
 
23
23
  #### Server-Side Encrypted Datatable & Search Integration
24
24
  When querying backend persistence endpoints (e.g. server-side datatable backends or Cloudflare stateless edge workers) that store and return encrypted records:
@@ -1,10 +1,10 @@
1
1
  ### `CFlatClientDataProvider`
2
2
  Manages local arrays with client-side logic, extending `AEncryptedClientProvider`.
3
- - **`setData(data: any[]): Promise<void> | void`**: Ingests dataset into provider. When encryption is enabled, eagerly encrypts designated `fields` before storing in `allData`. Plaintext never persists in `allData`. Pre-encrypted envelopes (`__encrypted: true`) pass through unchanged (idempotent). Zero overhead synchronous fast-path when encryption is disabled.
4
- - **`setDataChunked(data: any[], options?: ISetDataChunkedOptions): Promise<void>`**: Ingests massive datasets in batches, yielding to the event loop between chunks to keep the browser UI responsive (`chunkSize`, `onProgress`, `yieldStrategy`).
3
+ - **`setData(data: TRow[]): Promise<void> | void`**: Ingests dataset into provider. When encryption is enabled, eagerly encrypts designated `fields` before storing in `allData`. Plaintext never persists in `allData`. Pre-encrypted envelopes (`__encrypted: true`) pass through unchanged (idempotent). Zero overhead synchronous fast-path when encryption is disabled.
4
+ - **`setDataChunked(data: TRow[], options?: ISetDataChunkedOptions): Promise<void>`**: Ingests massive datasets in batches, yielding to the event loop between chunks to keep the browser UI responsive (`chunkSize`, `onProgress`, `yieldStrategy`).
5
5
  - **`setEncryption(options)` / `clearEncryption()`**: Dynamically updates, rotates, or wipes cryptographic keys and cached ciphers at runtime.
6
- - **`allData`**: `Ref<any[]>` - The complete source dataset (holds ciphertext for encrypted fields in JS memory).
7
- - **`pageData`**: `Ref<any[]>` - Active visible page slice (lazily decrypted into plaintext on active page render). Only `pageSize` rows are plaintext in JS memory.
6
+ - **`allData`**: `Ref<TRow[]>` - The complete source dataset (holds ciphertext for encrypted fields in JS memory).
7
+ - **`pageData`**: `Ref<TRow[]>` - Active visible page slice (lazily decrypted into plaintext on active page render). Only `pageSize` rows are plaintext in JS memory.
8
8
  - **`rowMap`**: `readonly TRow[]` - Reference map array maintaining the active filtered & sorted row references. When a page is requested, a portion of this array is served directly in $O(1)$ without re-evaluating filters or sorts.
9
9
  - **`updateMap()`**: Explicitly forces recalculation of the `rowMap` if items inside `allData` were modified in-place.
10
10
  - **`setFilter(filter: IDataFilter | null, immediate: boolean = false)`**: Applies a structured filter. When `encryption.searchIndex: true`, performs exact match (`==`, `!=`) and substring search (`in`) on encrypted fields using HMAC-SHA256 blind index tokens and trigram sets via `CSearchIndex`. Resets to page 1.
@@ -15,7 +15,7 @@ Handler-based server-side flat data provider that delegates pagination, filterin
15
15
  - **Reactive Properties**:
16
16
  | Property | Type | Description |
17
17
  | --- | --- | --- |
18
- | `pageData` | `Ref<any[]>` | Current page slice of records |
18
+ | `pageData` | `Ref<TRow[]>` | Current page slice of records |
19
19
  | `rowCount` | `Ref<number>` | Total matching record count returned by the handler |
20
20
  | `loading` | `Ref<boolean>` | Reactive fetching indicator |
21
21
  | `currentPage` | `Ref<number>` | Current page index (triggers reload when modified) |
@@ -1,7 +1,7 @@
1
1
  ### `CTreeClientDataProvider`
2
2
  Builds and manages reactive trees from flat arrays, extending `CFlatClientDataProvider`.
3
- - **`setData(data: any[]): Promise<void> | void`**: Ingests hierarchical items. Encrypts sensitive fields eagerly while preserving structural keys (`idKey`, `parentKey`) in plaintext.
4
- - **`setDataChunked(data: any[], options?)`**: Non-blocking chunked ingestion for large trees.
3
+ - **`setData(data: TRow[]): Promise<void> | void`**: Ingests hierarchical items. Encrypts sensitive fields eagerly while preserving structural keys (`idKey`, `parentKey`) in plaintext.
4
+ - **`setDataChunked(data: TRow[], options?: ISetDataChunkedOptions)`**: Non-blocking chunked ingestion for large trees.
5
5
  - **Constructor Options (`ITreeDataProviderOptions`)**:
6
6
  | Option | Type | Default | Description |
7
7
  | --- | --- | --- | --- |
@@ -7,7 +7,7 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
7
7
  | `setCacheProvider(provider)` | `ACacheProvider \| ECacheStrategy` | Configures global caching strategy |
8
8
  | `setCacheLifetime(ms)` | `number` | Sets default global expiration (milliseconds) |
9
9
  | `setDeduplicate(bool)` | `boolean` | Toggle request deduplication |
10
- | `onDataReceived(cb)` | `(data: any, generation?: number) => void` | Registers a callback triggered when data is successfully received (passes request generation if available) |
10
+ | `onDataReceived(cb)` | `<T = unknown>(data: T, generation?: number) => void` | Registers a callback triggered when data is successfully received (passes request generation if available) |
11
11
  | `refresh(hardRefresh)` | `boolean` | Re-runs the last request. Cache will only be overridden if `hardRefresh` parameter is true. |
12
12
 
13
13
  - **Constructor**: `new RequestProvider(provider?, lifetime?, deduplicate?, tags?)`
@@ -20,8 +20,8 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
20
20
  | Property | Type | Description |
21
21
  | --- | --- | --- |
22
22
  | `method` | `string` | HTTP method (`'GET'`, `'POST'`, `'PUT'`, `'DELETE'`, `'PATCH'`. Default: `'GET'`) |
23
- | `body` | `any` | Request body data |
24
- | `query` | `Record<string, any>` | URL query parameters |
23
+ | `body` | `any` | Request body data (transport payload) |
24
+ | `query` | `Record<string, unknown>` | URL query parameters |
25
25
  | `headers` | `Record<string, string>` | Custom HTTP headers |
26
26
  | `cacheStrategy` | `ECacheStrategy` | Override global strategy for this request |
27
27
  | `lifetime` | `number` | Override global expiration for this request |
@@ -32,7 +32,7 @@ The core engine for all HTTP communication, supporting deduplication, tag-based
32
32
  | `tags` | `string[]` | Associated tags for invalidation / auto-refresh upon mutation |
33
33
  | `queue` | `boolean` | When true (for non-GET requests), enqueues the mutation into `RequestQueue` instead of dispatching immediately |
34
34
  | `label` | `string` | Human-readable description for queued mutation display in UI |
35
- | `nuxtApp` | `any` | Nuxt app instance — enables SSR cookie forwarding via h3 |
35
+ | `nuxtApp` | `unknown` | Nuxt app instance — enables SSR cookie forwarding via h3 |
36
36
  | `_generation` | `number` | Internal request generation counter to discard stale responses |
37
37
 
38
38
  ### `RequestProviderRegistry`
@@ -25,7 +25,7 @@ Standard interface for persistence strategies. **Note**: `ACacheProvider` is an
25
25
  | Method | Params | Description |
26
26
  | --- | --- | --- |
27
27
  | `get<T>(key)` | `string` | Retrieves cached value |
28
- | `set<T>(key, val, life)`| `string, any, number`| Persists value with lifetime (ms) |
28
+ | `set<T>(key, val, life)`| `string, T, number`| Persists value with lifetime (ms) |
29
29
  | `remove(key)` | `string` | Evicts specific entry |
30
30
  | `removeByPrefix(pre)`| `string` | Bulk eviction (e.g., by resource URL) |
31
31
  | `getRemainingTime(key)`| `string` | Returns remaining TTL in ms |
@@ -66,7 +66,7 @@ import { ACacheProvider, type ICacheEntry } from '@katlux/providers'
66
66
 
67
67
  export class CMyCustomCache extends ACacheProvider {
68
68
  private static instance: CMyCustomCache | null = null
69
- private storage = new Map<string, ICacheEntry<any>>()
69
+ private storage = new Map<string, ICacheEntry<unknown>>()
70
70
 
71
71
  public static getInstance(): CMyCustomCache {
72
72
  if (!this.instance) {
@@ -75,11 +75,11 @@ export class CMyCustomCache extends ACacheProvider {
75
75
  return this.instance
76
76
  }
77
77
 
78
- async getKeyList(nuxtApp?: any): Promise<string[]> {
78
+ async getKeyList(nuxtApp?: unknown): Promise<string[]> {
79
79
  return Array.from(this.storage.keys())
80
80
  }
81
81
 
82
- async get<T>(key: string, nuxtApp?: any): Promise<T | null> {
82
+ async get<T>(key: string, nuxtApp?: unknown): Promise<T | null> {
83
83
  const entry = this.storage.get(key)
84
84
  if (!entry) return null
85
85
  if (Date.now() > entry.timestamp + entry.lifetime) {
@@ -89,21 +89,21 @@ export class CMyCustomCache extends ACacheProvider {
89
89
  return entry.data as T
90
90
  }
91
91
 
92
- async set<T>(key: string, data: T, lifetime: number, nuxtApp?: any): Promise<void> {
92
+ async set<T>(key: string, data: T, lifetime: number, nuxtApp?: unknown): Promise<void> {
93
93
  this.storage.set(key, { data, timestamp: Date.now(), lifetime })
94
94
  }
95
95
 
96
- async remove(key: string, nuxtApp?: any): Promise<void> {
96
+ async remove(key: string, nuxtApp?: unknown): Promise<void> {
97
97
  this.storage.delete(key)
98
98
  }
99
99
 
100
- async removeByPrefix(prefix: string, nuxtApp?: any): Promise<void> {
100
+ async removeByPrefix(prefix: string, nuxtApp?: unknown): Promise<void> {
101
101
  for (const key of this.storage.keys()) {
102
102
  if (key.startsWith(prefix)) this.storage.delete(key)
103
103
  }
104
104
  }
105
105
 
106
- async getRemainingTime(key: string, nuxtApp?: any): Promise<number | null> {
106
+ async getRemainingTime(key: string, nuxtApp?: unknown): Promise<number | null> {
107
107
  const entry = this.storage.get(key)
108
108
  if (!entry) return null
109
109
  const remaining = (entry.timestamp + entry.lifetime) - Date.now()
@@ -151,14 +151,14 @@ Pass the strategy name to any provider or fetch directly via `CacheProviderFacto
151
151
 
152
152
  ```typescript
153
153
  // 1. With RequestProvider:
154
- const request = new RequestProvider('MyCustom' as any, 60_000)
154
+ const request = new RequestProvider('MyCustom' as unknown as ECacheStrategy, 60_000)
155
155
  // or dynamically:
156
- request.setCacheProvider('MyCustom' as any)
156
+ request.setCacheProvider('MyCustom' as unknown as ECacheStrategy)
157
157
 
158
158
  // 2. With Data Providers:
159
159
  const dataProvider = new CAPIFlatServerDataProvider({
160
160
  pageSize: 20,
161
- cacheStrategy: 'MyCustom' as any,
161
+ cacheStrategy: 'MyCustom' as unknown as ECacheStrategy,
162
162
  cacheLifetime: 300_000
163
163
  })
164
164
 
@@ -56,7 +56,7 @@ export interface IProviderEncryptionOptions {
56
56
  keys?: Record<string, TKeyProvider | IKeyPair> // Built-in Keyring dictionary mapping kid to keys
57
57
  activeKid?: string // Active key identifier from keys to use for outbound encryption
58
58
  kid?: string // Key identifier / version (e.g. 'v1', 'tenant-a-key-2026')
59
- aad?: string | Uint8Array | ArrayBuffer | ((record: any, field: string) => string | Uint8Array | ArrayBuffer) // AEAD Additional Data or dynamic callback
59
+ aad?: string | Uint8Array | ArrayBuffer | ((record: Record<string, unknown>, field: string) => string | Uint8Array | ArrayBuffer) // AEAD Additional Data or dynamic callback
60
60
  aadFields?: string[] // Sibling record fields to deterministically bind into AAD (e.g. ['contact_id', 'version'])
61
61
  baseAad?: string // Optional base prefix for AAD context binding
62
62
  decryptOnSSR?: boolean // default: false. Prevents SSR decryption unless explicitly enabled with server secrets
@@ -64,7 +64,7 @@ export interface IProviderEncryptionOptions {
64
64
  strict?: boolean // Enforces strict decryption: unencrypted plaintext in `fields` triggers injection violation; defaults allowedAlgorithms to ['AES-GCM']
65
65
  allowedAlgorithms?: string[] // Whitelist of permitted cipher algorithms (e.g. ['AES-GCM'])
66
66
  allowedKids?: string[] // Whitelist of permitted Key Identifiers (kid); defaults to Object.keys(keys)
67
- onDecryptError?: ((info: IDecryptErrorInfo) => any) | boolean | string // Per-field error hook, safe fallback marker, or true for '[⚠ Decryption Error]'
67
+ onDecryptError?: ((info: IDecryptErrorInfo) => unknown) | boolean | string // Per-field error hook, safe fallback marker, or true for '[⚠ Decryption Error]'
68
68
  searchIndex?: boolean // Enables HMAC-SHA256 blind index and trigram search index on encrypted fields
69
69
  preEncrypted?: boolean // Set to true if API endpoints return pre-encrypted ciphertext envelopes; enables in-memory index decryption
70
70
  hmacKey?: TKeyProvider // Optional dedicated HMAC key for search indexing (defaults to encryption key)
@@ -3,19 +3,19 @@
3
3
  | Interface / Enum | Purpose | Key Properties / Values |
4
4
  | --- | --- | --- |
5
5
  | `EDataFilterOperator` | Available filter operators | `Equal` (`==`), `NotEqual` (`!=`), `GreaterThan` (`>`), `LessThan` (`<`), `GreaterThanOrEqual` (`>=`), `LessThanOrEqual` (`<=`), `In`, `NotIn`, `And`, `Or`, `Nand`, `Nor` |
6
- | `IDataFilter` | Structured filter query | `{ operator: EDataFilterOperator, field: string \| IDataFilter[], active: boolean }` |
6
+ | `IDataFilter` | Structured filter query | `{ operator: EDataFilterOperator, field: string \| TDataRow \| IDataFilter \| IDataFilter[], active: boolean }` |
7
7
  | `IDataSort` | Sorting configuration | `{ field: string, direction: 'asc' \| 'desc' }` |
8
- | `IDataResult` | Standardized API response | `{ rowCount: number, rows: any[] }` |
8
+ | `IDataResult` | Standardized API response | `{ rowCount: number, rows: T[] }` |
9
9
  | `ECacheStrategy` | Caching persistence tiers | `Memory`, `ServerSession`, `BrowserSession`, `LocalStorage`, `IndexedDB`, `Cookie`, `Application` |
10
10
  | `IDataProviderOptions` | Constructor configuration | See table in §3.2 |
11
11
  | `IKDatatableAction` | Row/Bulk action config | `{ label: string, action: Function, icon?: string, iconOnly?: boolean, type?: string, visible?: Function }` |
12
- | `ITreeNode` | Tree node wrapper | `{ data: any, id: any, parentId: any, depth: number, hasChildren: boolean, isExpanded: boolean }` |
13
- | `ICompositeItem`| Composite input pair | `{ selection: any, value: any }` (e.g. `{ selection: 'en', value: 'Hello' }`) |
12
+ | `ITreeNode` | Tree node wrapper | `{ data: Record<string, unknown>, id: string \| number, parentId: string \| number \| null, depth: number, hasChildren: boolean, isExpanded: boolean }` |
13
+ | `ICompositeItem`| Composite input pair | `{ selection: string \| number \| null, value: unknown }` (e.g. `{ selection: 'en', value: 'Hello' }`) |
14
14
 
15
15
  ### Standard Data Structure (`IDataResult`)
16
16
  All Katlux DataProviders (and components consuming them, such as `KDatatable`, `KLineChart`, `KBarChart`, `KPieChart`, `KCombobox`, etc.) use `IDataResult` as the standard payload format:
17
17
  ```typescript
18
- interface IDataResult<T = any> {
18
+ interface IDataResult<T = unknown> {
19
19
  rowCount: number // Total record count (for pagination math)
20
20
  rows: T[] // Array of row item objects
21
21
  }
@@ -21,7 +21,7 @@ const {
21
21
  virtualRows, // ShallowRef<T[]> (full ordered array of visible rows for virtual scroll)
22
22
  rowCount, // Ref<number>
23
23
  loading, // Ref<boolean>
24
- error, // Ref<any>
24
+ error, // Ref<Error | unknown>
25
25
  currentPage, // Ref<number> (synced with Pinia)
26
26
  pageSize, // Ref<number> (synced with Pinia)
27
27
  filter, // Ref<IDataFilter | null> (synced with Pinia)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.141",
3
+ "version": "0.1.1-alpha.143",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "**/*.sass"
55
55
  ],
56
56
  "dependencies": {
57
- "@katlux/providers": "^0.1.1-alpha.129",
57
+ "@katlux/providers": "^0.1.1-alpha.131",
58
58
  "@nuxt/kit": "^3.12.0",
59
59
  "@nuxtjs/i18n": "^10.4.0",
60
60
  "pug": "^3.0.0",