@knitify/vue 2.1.0 → 2.2.0

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 (36) hide show
  1. package/README.md +4 -1
  2. package/dist/index.es.js +5533 -4141
  3. package/dist/index.umd.js +1 -1
  4. package/dist/types/components/ArticleList/types.d.ts +9 -2
  5. package/dist/types/components/ButtonGroup/KButtonGroup.vue.d.ts +11 -0
  6. package/dist/types/components/ButtonGroup/types.d.ts +7 -0
  7. package/dist/types/components/Chat/KChatPrompt.vue.d.ts +2 -2
  8. package/dist/types/components/ChatDock/KChatDock.vue.d.ts +2 -2
  9. package/dist/types/components/DataTable/KDataTable.vue.d.ts +71 -0
  10. package/dist/types/components/DataTable/KDataTableLinkCell.vue.d.ts +21 -0
  11. package/dist/types/components/DataTable/KDataTableSettings.vue.d.ts +32 -0
  12. package/dist/types/components/DataTable/KDataTableSort.vue.d.ts +17 -0
  13. package/dist/types/components/DataTable/columnTypes.d.ts +19 -0
  14. package/dist/types/components/DataTable/keys.d.ts +9 -0
  15. package/dist/types/components/DataTable/types.d.ts +269 -0
  16. package/dist/types/components/Dialog/KDialogHost.vue.d.ts +3 -0
  17. package/dist/types/components/Dialog/KDialogItem.vue.d.ts +16 -0
  18. package/dist/types/components/Dialog/types.d.ts +61 -0
  19. package/dist/types/components/Dialog/useDialog.d.ts +41 -0
  20. package/dist/types/components/Dropzone/KDropzone.vue.d.ts +39 -0
  21. package/dist/types/components/Dropzone/types.d.ts +89 -0
  22. package/dist/types/components/FileTree/KFileTree.vue.d.ts +2 -2
  23. package/dist/types/components/Modal/types.d.ts +4 -0
  24. package/dist/types/components/Table/types.d.ts +4 -2
  25. package/dist/types/components/Tabs/KTabs.vue.d.ts +1 -1
  26. package/dist/types/components/Tabs/types.d.ts +17 -0
  27. package/dist/types/components/TagsInput/KTagsInput.vue.d.ts +2 -2
  28. package/dist/types/components/Toast/types.d.ts +22 -0
  29. package/dist/types/components/Toast/useToast.d.ts +14 -2
  30. package/dist/types/components/Workspace/KWorkspace.vue.d.ts +2 -2
  31. package/dist/types/components/index.d.ts +7 -0
  32. package/dist/types/components/types.d.ts +5 -0
  33. package/dist/types/index.d.ts +11 -2
  34. package/dist/types/utils/useTopmost.d.ts +3 -1
  35. package/dist/web-types.json +781 -40
  36. package/package.json +3 -3
@@ -0,0 +1,39 @@
1
+ import type { KDropzoneFile, KDropzoneProps, KDropzoneRejection, KDropzoneSlots } from './types';
2
+ type __VLS_Props = KDropzoneProps;
3
+ type __VLS_Slots = KDropzoneSlots;
4
+ declare function uploadAll(entry?: KDropzoneFile): Promise<void>;
5
+ declare function removeEntry(entry: KDropzoneFile): void;
6
+ declare function clear(): void;
7
+ declare function open(): void;
8
+ type __VLS_ModelProps = {
9
+ modelValue?: KDropzoneFile[];
10
+ };
11
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
13
+ open: typeof open;
14
+ upload: typeof uploadAll;
15
+ remove: typeof removeEntry;
16
+ clear: typeof clear;
17
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ error: (file: KDropzoneFile, error: unknown) => any;
19
+ success: (file: KDropzoneFile) => any;
20
+ add: (files: KDropzoneFile[]) => any;
21
+ remove: (file: KDropzoneFile) => any;
22
+ "update:modelValue": (value: KDropzoneFile[]) => any;
23
+ reject: (rejections: KDropzoneRejection[]) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ onError?: ((file: KDropzoneFile, error: unknown) => any) | undefined;
26
+ onSuccess?: ((file: KDropzoneFile) => any) | undefined;
27
+ onAdd?: ((files: KDropzoneFile[]) => any) | undefined;
28
+ onRemove?: ((file: KDropzoneFile) => any) | undefined;
29
+ "onUpdate:modelValue"?: ((value: KDropzoneFile[]) => any) | undefined;
30
+ onReject?: ((rejections: KDropzoneRejection[]) => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,89 @@
1
+ export type KDropzoneFileStatus = 'pending' | 'uploading' | 'done' | 'error';
2
+ /** One entry in the model: the file plus where its upload stands. */
3
+ export type KDropzoneFile = {
4
+ /** Stable key for the list; files carry no identity of their own. */
5
+ id: string;
6
+ file: File;
7
+ status: KDropzoneFileStatus;
8
+ /** 0–100, reported through `onProgress` while uploading. */
9
+ progress: number;
10
+ /** Why the upload failed. */
11
+ error?: string;
12
+ /** Whatever the `upload` handler resolved with. */
13
+ response?: unknown;
14
+ };
15
+ export type KDropzoneRejectReason = 'type' | 'size' | 'count';
16
+ export type KDropzoneRejection = {
17
+ file: File;
18
+ reason: KDropzoneRejectReason;
19
+ message: string;
20
+ };
21
+ export type KDropzoneUploadContext = {
22
+ /** Report progress as a 0–100 percentage. */
23
+ onProgress: (percent: number) => void;
24
+ /** Aborted when the file is removed mid-upload. */
25
+ signal: AbortSignal;
26
+ };
27
+ /**
28
+ * Sends one file. Resolve to mark it done (the value lands on `response`);
29
+ * reject to mark it failed (the error's message lands on `error`).
30
+ */
31
+ export type KDropzoneUploadHandler = (file: File, context: KDropzoneUploadContext) => Promise<unknown>;
32
+ export type KDropzoneProps = {
33
+ /** Same syntax as the native `accept`; drops are checked against it too. */
34
+ accept?: string;
35
+ /**
36
+ * Start `upload` as soon as a file is added. Defaults to `true`; turn it off
37
+ * to collect files first and send them with the exposed `upload()`.
38
+ */
39
+ autoUpload?: boolean;
40
+ disabled?: boolean;
41
+ /** Small print under the title, e.g. "PNG or JPG, up to 5 MB". */
42
+ hint?: string;
43
+ invalid?: boolean;
44
+ /** Upper limit on the number of files in the model. */
45
+ maxFiles?: number;
46
+ /** Upper limit per file, in bytes. */
47
+ maxSize?: number;
48
+ /** Allow more than one file. Without it, a new file replaces the old one. */
49
+ multiple?: boolean;
50
+ /** Replaces "Click to upload" — the underlined part of the title. */
51
+ title?: string;
52
+ /**
53
+ * Uploads each file as it is added. Without one, files simply collect in
54
+ * the model as `pending` for the parent to send.
55
+ */
56
+ upload?: KDropzoneUploadHandler;
57
+ };
58
+ export type KDropzoneEmits = {
59
+ /** Files that passed the checks, as they were added to the model. */
60
+ add: [files: KDropzoneFile[]];
61
+ /** Files turned away by `accept`, `maxSize` or `maxFiles`. */
62
+ reject: [rejections: KDropzoneRejection[]];
63
+ remove: [file: KDropzoneFile];
64
+ /** An upload resolved. */
65
+ success: [file: KDropzoneFile];
66
+ /** An upload rejected. */
67
+ error: [file: KDropzoneFile, error: unknown];
68
+ };
69
+ export type KDropzoneSlots = {
70
+ /** Replaces the whole inside of the drop area. */
71
+ default?(props: {
72
+ dragging: boolean;
73
+ open: () => void;
74
+ }): any;
75
+ /** Replaces the upload icon. */
76
+ icon?(): any;
77
+ /** Replaces the hint line. */
78
+ hint?(): any;
79
+ };
80
+ export type KDropzoneExpose = {
81
+ /** Opens the file picker. */
82
+ open: () => void;
83
+ /** Uploads every `pending` and `error` file, or just the one given. */
84
+ upload: (file?: KDropzoneFile) => Promise<void>;
85
+ /** Removes one file, aborting its upload if one is in flight. Ignored while disabled. */
86
+ remove: (file: KDropzoneFile) => void;
87
+ /** Empties the model, aborting uploads in flight. */
88
+ clear: () => void;
89
+ };
@@ -10,17 +10,17 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
10
10
  collapseAll: () => void | undefined;
11
11
  expandAll: () => void | undefined;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ load: (id: string) => any;
13
14
  select: (id: string) => any;
14
15
  collapse: (id: string) => any;
15
16
  expand: (id: string) => any;
16
- load: (id: string) => any;
17
17
  "update:expanded": (value: string[]) => any;
18
18
  "update:selected": (value: string | null) => any;
19
19
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
+ onLoad?: ((id: string) => any) | undefined;
20
21
  onSelect?: ((id: string) => any) | undefined;
21
22
  onCollapse?: ((id: string) => any) | undefined;
22
23
  onExpand?: ((id: string) => any) | undefined;
23
- onLoad?: ((id: string) => any) | undefined;
24
24
  "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
25
25
  "onUpdate:selected"?: ((value: string | null) => any) | undefined;
26
26
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -52,6 +52,10 @@ export type KModalEmits = {
52
52
  (event: 'shown'): void;
53
53
  };
54
54
  export type KModalSlots = {
55
+ /**
56
+ * The close button's content. The default is the sprite's `kt-cross`, so it
57
+ * needs core's icon sprite on the page — imported with `@knitify/core`.
58
+ */
55
59
  close?(): any;
56
60
  default?(): any;
57
61
  footer?(): any;
@@ -9,10 +9,10 @@ export type KTableProps = {
9
9
  hoverable?: boolean;
10
10
  /**
11
11
  * How many leading columns stay put while the table scrolls sideways, up to
12
- * 4. Wrap the table in an `overflow-x: auto` container.
12
+ * 5. Wrap the table in an `overflow-x: auto` container.
13
13
  */
14
14
  pinStart?: number;
15
- /** How many trailing columns stay put, up to 4 — e.g. an actions column. */
15
+ /** How many trailing columns stay put, up to 5 — e.g. an actions column. */
16
16
  pinEnd?: number;
17
17
  size?: KTableSize;
18
18
  /**
@@ -21,6 +21,8 @@ export type KTableProps = {
21
21
  * `--kt-table-sticky-top` CSS variable, e.g. below a fixed navbar.
22
22
  */
23
23
  stickyHeader?: boolean;
24
+ /** Tints every other body row. */
25
+ striped?: boolean;
24
26
  };
25
27
  export type KTableEmits = {
26
28
  /**
@@ -12,8 +12,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
12
12
  } & {
13
13
  shown: (name: string) => any;
14
14
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
16
15
  onShown?: ((name: string) => any) | undefined;
16
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
17
17
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
@@ -10,13 +10,30 @@ export type KTabsProps = {
10
10
  * still switch it.
11
11
  */
12
12
  disabled?: boolean;
13
+ /**
14
+ * Gives inactive tabs a surface background instead of a transparent one.
15
+ * Combines with any variant and with `merged`.
16
+ */
17
+ filled?: boolean;
13
18
  /** Classes for the tablist, where the variant class also goes. */
14
19
  listClass?: ClassValue;
20
+ /**
21
+ * Joins the tab buttons into one control: no gap between them, and only the
22
+ * outer corners rounded. Combines with the `pills` variant; not meant for
23
+ * `underline`.
24
+ */
25
+ merged?: boolean;
15
26
  /**
16
27
  * Renders the tablist alone, without the panels' wrapper — for tabs that
17
28
  * drive content elsewhere through `v-model`. The default slot is ignored.
18
29
  */
19
30
  noContent?: boolean;
31
+ /**
32
+ * A light active tab, matching `KButton`'s `secondary`: the subtler brand
33
+ * fill with base text. Combines with `pills`, `filled` and `merged`; has no
34
+ * effect on `underline`.
35
+ */
36
+ secondary?: boolean;
20
37
  variant?: KTabsVariant;
21
38
  };
22
39
  export type KTabProps = {
@@ -11,15 +11,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
11
11
  focus: () => void | undefined;
12
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
13
  invalid: (value: string, reason: string) => any;
14
+ add: (value: string) => any;
14
15
  remove: (value: string, index: number) => any;
15
16
  "update:modelValue": (value: string[]) => any;
16
- add: (value: string) => any;
17
17
  loadError: (error: unknown, query: string) => any;
18
18
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
19
  onInvalid?: ((value: string, reason: string) => any) | undefined;
20
+ onAdd?: ((value: string) => any) | undefined;
20
21
  onRemove?: ((value: string, index: number) => any) | undefined;
21
22
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
22
- onAdd?: ((value: string) => any) | undefined;
23
23
  onLoadError?: ((error: unknown, query: string) => any) | undefined;
24
24
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,17 @@
1
+ import { Intent } from '../../types';
1
2
  export type KToastPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3
+ export type KToastLink = {
4
+ label: string;
5
+ /** Without one, the link renders as a button and only runs `onClick`. */
6
+ href?: string;
7
+ target?: string;
8
+ /**
9
+ * Runs before the toast closes; return `false` to keep it open.
10
+ * `event.preventDefault()` stops an `href` navigating — use it to route
11
+ * client-side — and still closes the toast.
12
+ */
13
+ onClick?: (event: MouseEvent) => boolean | void;
14
+ };
2
15
  export type KToastOptions = {
3
16
  description?: string;
4
17
  /** Milliseconds before it closes itself. */
@@ -8,9 +21,18 @@ export type KToastOptions = {
8
21
  * not as a sprite href. Never pass user-supplied content here.
9
22
  */
10
23
  icon?: string;
24
+ /** Up to 3, shown under the description. Any more are dropped. */
25
+ links?: KToastLink[];
11
26
  position?: KToastPosition;
12
27
  title: string;
28
+ /** Semantic colour — the same intents as KAlert's `variant`. */
29
+ variant?: Intent;
13
30
  };
31
+ /**
32
+ * Options for `success`, `error`, `warning` and `info`, which set the variant
33
+ * and icon themselves and default to the top-centre position.
34
+ */
35
+ export type KToastShortcutOptions = Omit<KToastOptions, 'title' | 'variant' | 'icon'>;
14
36
  /** Defaults applied to every toast raised through the returned helper. */
15
37
  export type KToastDefaults = Omit<KToastOptions, 'title'>;
16
38
  export type KToastHandle = {
@@ -1,4 +1,4 @@
1
- import type { KToastDefaults, KToastHandle, KToastOptions, KToastPosition } from './types';
1
+ import type { KToastDefaults, KToastHandle, KToastOptions, KToastPosition, KToastShortcutOptions } from './types';
2
2
  /**
3
3
  * Toasts have no component because core's Toast has no markup to wrap:
4
4
  * `new Toast({ title })` builds its own element, mounts it into a container it
@@ -8,6 +8,10 @@ import type { KToastDefaults, KToastHandle, KToastOptions, KToastPosition } from
8
8
  * ```ts
9
9
  * const toast = useToast({ position: 'bottom-right' })
10
10
  * toast.show({ title: 'Saved', description: 'Your changes are live.' })
11
+ *
12
+ * // Semantic shortcuts preset the variant and icon.
13
+ * toast.success('Saved')
14
+ * toast.error('Upload failed', { description: 'The file is over 10 MB.' })
11
15
  * ```
12
16
  *
13
17
  * Nothing here is reactive or tied to a component instance, so it can be called
@@ -16,5 +20,13 @@ import type { KToastDefaults, KToastHandle, KToastOptions, KToastPosition } from
16
20
  export declare function useToast(defaults?: KToastDefaults): {
17
21
  /** Dismisses every toast, or only those in one corner. */
18
22
  closeAll(position?: KToastPosition): void;
19
- show(options: KToastOptions): KToastHandle;
23
+ show: (options: KToastOptions) => KToastHandle;
24
+ /** Green, with a check. */
25
+ success: (title: string, options?: KToastShortcutOptions) => KToastHandle;
26
+ /** Red, with a cross. Stays up for 8 seconds unless told otherwise. */
27
+ error: (title: string, options?: KToastShortcutOptions) => KToastHandle;
28
+ /** Amber, with a warning triangle. */
29
+ warning: (title: string, options?: KToastShortcutOptions) => KToastHandle;
30
+ /** Blue, with an info mark. */
31
+ info: (title: string, options?: KToastShortcutOptions) => KToastHandle;
20
32
  };
@@ -21,15 +21,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
21
21
  closeDrawer: typeof closeDrawer;
22
22
  toggleDrawer: typeof toggleDrawer;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
- "update:expanded": (value: boolean) => any;
25
24
  "update:open": (value: boolean) => any;
25
+ "update:expanded": (value: boolean) => any;
26
26
  "update:bodyOpen": (value: boolean) => any;
27
27
  } & {
28
28
  toggle: (value: boolean) => any;
29
29
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
30
30
  onToggle?: ((value: boolean) => any) | undefined;
31
- "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
32
31
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
32
+ "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
33
33
  "onUpdate:bodyOpen"?: ((value: boolean) => any) | undefined;
34
34
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -5,6 +5,8 @@ export { chatDockStoreKey, injectChatDock, provideChatDock, } from './ChatDock/s
5
5
  export { useChatDock } from './ChatDock/useChatDock';
6
6
  export { fieldKey } from './Field/keys';
7
7
  export { useFieldControl } from '../utils/useFieldControl';
8
+ export { registerColumnType } from './DataTable/columnTypes';
9
+ export { dataTableKey } from './DataTable/keys';
8
10
  export { default as KAccordion } from './Accordion/KAccordion.vue';
9
11
  export { default as KAccordionItem } from './Accordion/KAccordionItem.vue';
10
12
  export { default as KAlert } from './Alert/KAlert.vue';
@@ -16,6 +18,7 @@ export { default as KBadge } from './Badge/KBadge.vue';
16
18
  export { default as KBreadcrumb } from './Breadcrumb/KBreadcrumb.vue';
17
19
  export { default as KBreadcrumbItem } from './Breadcrumb/KBreadcrumbItem.vue';
18
20
  export { default as KButton } from './Button/KButton.vue';
21
+ export { default as KButtonGroup } from './ButtonGroup/KButtonGroup.vue';
19
22
  export { default as KCalendar } from './Calendar/KCalendar.vue';
20
23
  export { default as KCard } from './Card/KCard.vue';
21
24
  export { default as KChat } from './Chat/KChat.vue';
@@ -35,10 +38,13 @@ export { default as KChatNewWindow } from './ChatDock/KChatNewWindow.vue';
35
38
  export { default as KCheckbox } from './Checkbox/KCheckbox.vue';
36
39
  export { default as KCollapse } from './Collapse/KCollapse.vue';
37
40
  export { default as KContainer } from './Container/KContainer.vue';
41
+ export { default as KDataTable } from './DataTable/KDataTable.vue';
38
42
  export { default as KDateInput } from './DateInput/KDateInput.vue';
39
43
  export { default as KDateRangeInput } from './DateInput/KDateRangeInput.vue';
44
+ export { default as KDialogHost } from './Dialog/KDialogHost.vue';
40
45
  export { default as KDivider } from './Divider/KDivider.vue';
41
46
  export { default as KDrawer } from './Drawer/KDrawer.vue';
47
+ export { default as KDropzone } from './Dropzone/KDropzone.vue';
42
48
  export { default as KDropdown } from './Dropdown/KDropdown.vue';
43
49
  export { default as KDropdownItem } from './Dropdown/KDropdownItem.vue';
44
50
  export { default as KDropdownMenu } from './Dropdown/KDropdownMenu.vue';
@@ -82,3 +88,4 @@ export { default as KTooltip } from './Tooltip/KTooltip.vue';
82
88
  export { vTooltip } from './Tooltip/vTooltip';
83
89
  export { default as KWorkspace } from './Workspace/KWorkspace.vue';
84
90
  export { useToast } from './Toast/useToast';
91
+ export { useDialog } from './Dialog/useDialog';
@@ -5,7 +5,10 @@ export * from './Avatar/types';
5
5
  export * from './Badge/types';
6
6
  export * from './Breadcrumb/types';
7
7
  export * from './Button/types';
8
+ export * from './ButtonGroup/types';
8
9
  export * from './Calendar/types';
10
+ export * from './DataTable/types';
11
+ export type { DataTableContext } from './DataTable/keys';
9
12
  export * from './DateInput/types';
10
13
  export * from './Card/types';
11
14
  export * from './Chat/types';
@@ -21,6 +24,7 @@ export * from './Field/types';
21
24
  export type { FieldContext } from './Field/keys';
22
25
  export type { UseFieldControlOptions } from '../utils/useFieldControl';
23
26
  export * from './Dropdown/types';
27
+ export * from './Dropzone/types';
24
28
  export * from './FileTree/types';
25
29
  export * from './Flex/types';
26
30
  export * from './Grid/types';
@@ -39,6 +43,7 @@ export * from './SearchInput/types';
39
43
  export * from './SegmentedButtons/types';
40
44
  export * from './Select/types';
41
45
  export * from './Skeleton/types';
46
+ export * from './Dialog/types';
42
47
  export * from './Spinner/types';
43
48
  export * from './Table/types';
44
49
  export * from './Tabs/types';
@@ -1,8 +1,17 @@
1
- import { App } from 'vue';
1
+ import type { App, Component } from 'vue';
2
+ import type { KDataTableColumnType } from './components/DataTable/types';
3
+ export type KnitifyOptions = {
4
+ /**
5
+ * KDataTable column types to register, keyed by type name — the same as
6
+ * calling `registerColumnType` for each. Declare each name in
7
+ * `KDataTableColumnTypes` first.
8
+ */
9
+ columnTypes?: Partial<Record<KDataTableColumnType, Component>>;
10
+ };
2
11
  export * from './types';
3
12
  export * from './components/types';
4
13
  export * from './components';
5
14
  declare const _default: {
6
- install(app: App): void;
15
+ install(app: App, options?: KnitifyOptions): void;
7
16
  };
8
17
  export default _default;
@@ -14,4 +14,6 @@ import { type Ref } from 'vue';
14
14
  * regardless of which opened last, since the latter is a persistent panel
15
15
  * rather than something Escape should dismiss.
16
16
  */
17
- export declare function useTopmost(name: string, active: Ref<boolean>, priority?: () => number): () => boolean;
17
+ export declare function useTopmost(name: string, active: Ref<boolean>, priority?: () => number): (() => boolean) & {
18
+ depth: Readonly<Ref<number, number>>;
19
+ };