sv5ui-plus 5.0.4 → 5.0.6
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 +6 -6
- package/dist/adapters/notify.d.ts +1 -1
- package/dist/adapters/notify.js +18 -18
- package/dist/compat.d.ts +2 -2
- package/dist/compat.js +2 -2
- package/dist/components/BentoGrid/BentoCard.svelte +33 -33
- package/dist/components/BentoGrid/BentoCard.svelte.d.ts +1 -1
- package/dist/components/BentoGrid/BentoGrid.svelte +1 -1
- package/dist/components/BentoGrid/BentoGrid.svelte.d.ts +1 -1
- package/dist/components/BentoGrid/bento-grid.types.d.ts +2 -2
- package/dist/components/BentoGrid/bento-grid.variants.d.ts +1 -1
- package/dist/components/BentoGrid/bento-grid.variants.js +10 -10
- package/dist/components/BentoGrid/index.d.ts +4 -4
- package/dist/components/BentoGrid/index.js +4 -4
- package/dist/components/Chart/Chart.svelte +1 -1
- package/dist/components/Chart/Chart.svelte.d.ts +1 -1
- package/dist/components/Chart/chart.types.d.ts +3 -3
- package/dist/components/Chart/index.d.ts +2 -2
- package/dist/components/Chart/index.js +2 -2
- package/dist/components/Chat/ChatBubble.svelte +19 -19
- package/dist/components/Chat/ChatBubble.svelte.d.ts +1 -1
- package/dist/components/Chat/ChatInput.svelte +26 -27
- package/dist/components/Chat/ChatInput.svelte.d.ts +1 -1
- package/dist/components/Chat/ChatMessage.svelte +1 -1
- package/dist/components/Chat/ChatMessage.svelte.d.ts +1 -1
- package/dist/components/Chat/chat.types.d.ts +6 -6
- package/dist/components/Chat/chat.variants.d.ts +1 -1
- package/dist/components/Chat/chat.variants.js +29 -29
- package/dist/components/Chat/index.d.ts +5 -5
- package/dist/components/Chat/index.js +5 -5
- package/dist/components/CodeBlock/CodeBlock.svelte +15 -15
- package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +1 -1
- package/dist/components/CodeBlock/code-block.types.d.ts +5 -5
- package/dist/components/CodeBlock/code-block.variants.d.ts +1 -1
- package/dist/components/CodeBlock/code-block.variants.js +40 -40
- package/dist/components/CodeBlock/index.d.ts +2 -2
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.svelte +93 -97
- package/dist/components/ConfirmDialog/ConfirmDialog.svelte.d.ts +1 -1
- package/dist/components/ConfirmDialog/confirm.d.ts +1 -1
- package/dist/components/ConfirmDialog/confirm.js +9 -9
- package/dist/components/ConfirmDialog/confirm.types.d.ts +4 -4
- package/dist/components/ConfirmDialog/index.d.ts +4 -4
- package/dist/components/ConfirmDialog/index.js +2 -2
- package/dist/components/DatePickerField/DatePickerField.svelte +11 -11
- package/dist/components/DatePickerField/DatePickerField.svelte.d.ts +2 -2
- package/dist/components/DatePickerField/date-picker-field.types.d.ts +1 -1
- package/dist/components/DatePickerField/index.d.ts +2 -2
- package/dist/components/DatePickerField/index.js +1 -1
- package/dist/components/DateRangePickerField/DateRangePickerField.svelte +26 -26
- package/dist/components/DateRangePickerField/DateRangePickerField.svelte.d.ts +2 -2
- package/dist/components/DateRangePickerField/date-range-picker-field.types.d.ts +1 -1
- package/dist/components/DateRangePickerField/index.d.ts +2 -2
- package/dist/components/DateRangePickerField/index.js +1 -1
- package/dist/components/Fonts/Fonts.svelte +12 -12
- package/dist/components/Fonts/Fonts.svelte.d.ts +1 -1
- package/dist/components/Fonts/fonts.d.ts +1 -1
- package/dist/components/Fonts/fonts.js +42 -42
- package/dist/components/Fonts/fonts.types.d.ts +6 -6
- package/dist/components/Fonts/index.d.ts +3 -3
- package/dist/components/Fonts/index.js +2 -2
- package/dist/components/FormSelect/FormSelect.svelte +4 -4
- package/dist/components/FormSelect/FormSelect.svelte.d.ts +2 -2
- package/dist/components/FormSelect/form-select.types.d.ts +3 -3
- package/dist/components/FormSelect/index.d.ts +2 -2
- package/dist/components/FormSelect/index.js +1 -1
- package/dist/components/List/List.svelte +1 -1
- package/dist/components/List/List.svelte.d.ts +1 -1
- package/dist/components/List/ListItem.svelte +31 -39
- package/dist/components/List/ListItem.svelte.d.ts +1 -1
- package/dist/components/List/index.d.ts +4 -4
- package/dist/components/List/index.js +4 -4
- package/dist/components/List/list.types.d.ts +4 -4
- package/dist/components/List/list.variants.d.ts +1 -1
- package/dist/components/List/list.variants.js +22 -22
- package/dist/components/LocaleButton/LocaleButton.svelte +104 -108
- package/dist/components/LocaleButton/LocaleButton.svelte.d.ts +1 -1
- package/dist/components/LocaleButton/index.d.ts +2 -2
- package/dist/components/LocaleButton/index.js +1 -1
- package/dist/components/LocaleButton/locale-button.types.d.ts +12 -12
- package/dist/components/LocaleButton/locale-button.variants.d.ts +2 -2
- package/dist/components/LocaleButton/locale-button.variants.js +68 -68
- package/dist/components/Marquee/Marquee.svelte +34 -34
- package/dist/components/Marquee/Marquee.svelte.d.ts +1 -1
- package/dist/components/Marquee/index.d.ts +3 -3
- package/dist/components/Marquee/index.js +3 -3
- package/dist/components/Marquee/marquee.types.d.ts +4 -4
- package/dist/components/Marquee/marquee.variants.d.ts +1 -1
- package/dist/components/Marquee/marquee.variants.js +15 -15
- package/dist/components/NavigationMenu/NavigationMenu.svelte +366 -379
- package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +1 -1
- package/dist/components/NavigationMenu/index.d.ts +2 -2
- package/dist/components/NavigationMenu/index.js +1 -1
- package/dist/components/NavigationMenu/navigation-menu.types.d.ts +17 -17
- package/dist/components/NavigationMenu/navigation-menu.variants.d.ts +1 -1
- package/dist/components/NavigationMenu/navigation-menu.variants.js +177 -177
- package/dist/components/NumberTicker/NumberTicker.svelte +1 -5
- package/dist/components/NumberTicker/NumberTicker.svelte.d.ts +1 -1
- package/dist/components/NumberTicker/index.d.ts +3 -3
- package/dist/components/NumberTicker/index.js +3 -3
- package/dist/components/NumberTicker/number-ticker.types.d.ts +1 -1
- package/dist/components/NumberTicker/number-ticker.variants.d.ts +1 -1
- package/dist/components/NumberTicker/number-ticker.variants.js +3 -3
- package/dist/components/PasswordInput/PasswordInput.svelte +58 -58
- package/dist/components/PasswordInput/PasswordInput.svelte.d.ts +1 -1
- package/dist/components/PasswordInput/index.d.ts +2 -2
- package/dist/components/PasswordInput/index.js +1 -1
- package/dist/components/PasswordInput/password-input.types.d.ts +9 -9
- package/dist/components/PasswordInput/password-input.variants.d.ts +2 -2
- package/dist/components/PasswordInput/password-input.variants.js +62 -62
- package/dist/components/Prose/Prose.svelte +5 -5
- package/dist/components/Prose/Prose.svelte.d.ts +1 -1
- package/dist/components/Prose/index.d.ts +3 -3
- package/dist/components/Prose/index.js +3 -3
- package/dist/components/Prose/prose.types.d.ts +4 -4
- package/dist/components/Prose/prose.variants.d.ts +1 -1
- package/dist/components/Prose/prose.variants.js +27 -27
- package/dist/components/{Resizable/Resizable.svelte → ResizeContainer/ResizeContainer.svelte} +3 -3
- package/dist/components/ResizeContainer/ResizeContainer.svelte.d.ts +4 -0
- package/dist/components/ResizeContainer/index.d.ts +4 -0
- package/dist/components/ResizeContainer/index.js +4 -0
- package/dist/components/ResizeContainer/resize-container.types.d.ts +18 -0
- package/dist/components/ResizeContainer/resize-container.variants.d.ts +30 -0
- package/dist/components/ResizeContainer/resize-container.variants.js +17 -0
- package/dist/components/SafeTable/SafeTable.svelte +74 -74
- package/dist/components/SafeTable/SafeTable.svelte.d.ts +2 -2
- package/dist/components/SafeTable/index.d.ts +2 -2
- package/dist/components/SafeTable/index.js +1 -1
- package/dist/components/SafeTable/safe-table.types.d.ts +1 -1
- package/dist/components/Search/Search.svelte +63 -63
- package/dist/components/Search/Search.svelte.d.ts +1 -1
- package/dist/components/Search/index.d.ts +2 -2
- package/dist/components/Search/index.js +1 -1
- package/dist/components/Search/search.types.d.ts +5 -5
- package/dist/components/SortableGroup/SortableGroup.svelte +16 -10
- package/dist/components/SortableGroup/SortableGroup.svelte.d.ts +3 -3
- package/dist/components/SortableGroup/index.d.ts +1 -1
- package/dist/components/SortableGroup/index.js +1 -1
- package/dist/components/SortableList/SortableList.svelte +49 -46
- package/dist/components/SortableList/SortableList.svelte.d.ts +2 -2
- package/dist/components/SortableList/index.d.ts +2 -2
- package/dist/components/SortableList/index.js +1 -1
- package/dist/components/SortableList/sortable-list.types.d.ts +3 -3
- package/dist/components/Spotlight/Spotlight.svelte +13 -13
- package/dist/components/Spotlight/Spotlight.svelte.d.ts +1 -1
- package/dist/components/Spotlight/index.d.ts +3 -3
- package/dist/components/Spotlight/index.js +3 -3
- package/dist/components/Spotlight/spotlight.types.d.ts +2 -2
- package/dist/components/Spotlight/spotlight.variants.d.ts +1 -1
- package/dist/components/Spotlight/spotlight.variants.js +5 -5
- package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte +23 -23
- package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte.d.ts +1 -1
- package/dist/components/TableBulkActionBar/index.d.ts +2 -2
- package/dist/components/TableBulkActionBar/index.js +1 -1
- package/dist/components/TableBulkActionBar/table-bulk-action-bar.types.d.ts +3 -3
- package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.d.ts +1 -1
- package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.js +7 -7
- package/dist/components/TreeView/TreeView.svelte +59 -59
- package/dist/components/TreeView/TreeView.svelte.d.ts +1 -1
- package/dist/components/TreeView/index.d.ts +3 -3
- package/dist/components/TreeView/index.js +2 -2
- package/dist/components/TreeView/tree-view.types.d.ts +4 -4
- package/dist/components/TreeView/tree-view.variants.d.ts +1 -1
- package/dist/components/TreeView/tree-view.variants.js +19 -19
- package/dist/config.d.ts +1 -1
- package/dist/config.js +28 -28
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +1 -1
- package/dist/form/resolve-form-field-name.js +1 -1
- package/dist/hooks/internal/DragDropProviderScope.svelte +1 -1
- package/dist/hooks/internal/DragDropProviderScope.svelte.d.ts +1 -1
- package/dist/hooks/internal/SortableProvider.svelte +16 -11
- package/dist/hooks/internal/SortableProvider.svelte.d.ts +1 -1
- package/dist/hooks/internal/drag-drop-context.d.ts +1 -1
- package/dist/hooks/internal/drag-drop-context.js +1 -1
- package/dist/hooks/internal/sortable-context.d.ts +6 -6
- package/dist/hooks/internal/sortable-context.js +2 -2
- package/dist/hooks/useDragDrop/index.d.ts +1 -1
- package/dist/hooks/useDragDrop/index.js +1 -1
- package/dist/hooks/useDragDrop/useDragDrop.svelte.d.ts +3 -3
- package/dist/hooks/useDragDrop/useDragDrop.svelte.js +15 -15
- package/dist/hooks/useSortable/index.d.ts +2 -2
- package/dist/hooks/useSortable/index.js +2 -2
- package/dist/hooks/useSortable/useSortable.svelte.d.ts +4 -4
- package/dist/hooks/useSortable/useSortable.svelte.js +23 -23
- package/dist/hooks/utils.js +1 -1
- package/dist/index.d.ts +29 -31
- package/dist/index.js +28 -30
- package/dist/mcp/install-template.mjs +44 -44
- package/dist/mcp/server.mjs +262 -263
- package/dist/mcp/sv5ui-plus-docs.data.json +4 -10
- package/package.json +17 -14
- package/dist/components/ColorPicker/ColorPicker.svelte +0 -109
- package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +0 -4
- package/dist/components/ColorPicker/color-picker.types.d.ts +0 -26
- package/dist/components/ColorPicker/color-picker.variants.d.ts +0 -69
- package/dist/components/ColorPicker/color-picker.variants.js +0 -13
- package/dist/components/ColorPicker/index.d.ts +0 -4
- package/dist/components/ColorPicker/index.js +0 -4
- package/dist/components/Resizable/Resizable.svelte.d.ts +0 -4
- package/dist/components/Resizable/index.d.ts +0 -4
- package/dist/components/Resizable/index.js +0 -4
- package/dist/components/Resizable/resizable.types.d.ts +0 -18
- package/dist/components/Resizable/resizable.types.js +0 -1
- package/dist/components/Resizable/resizable.variants.d.ts +0 -48
- package/dist/components/Resizable/resizable.variants.js +0 -17
- package/dist/components/ScrollArea/ScrollArea.svelte +0 -54
- package/dist/components/ScrollArea/ScrollArea.svelte.d.ts +0 -4
- package/dist/components/ScrollArea/index.d.ts +0 -4
- package/dist/components/ScrollArea/index.js +0 -4
- package/dist/components/ScrollArea/scroll-area.types.d.ts +0 -27
- package/dist/components/ScrollArea/scroll-area.types.js +0 -1
- package/dist/components/ScrollArea/scroll-area.variants.d.ts +0 -45
- package/dist/components/ScrollArea/scroll-area.variants.js +0 -27
- /package/dist/components/{ColorPicker/color-picker.types.js → ResizeContainer/resize-container.types.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { setContext } from
|
|
2
|
-
import { createDraggable, createDroppable } from
|
|
3
|
-
import DragDropProviderScope from
|
|
4
|
-
import { DRAG_DROP_CONTEXT_KEY } from
|
|
1
|
+
import { setContext } from "svelte";
|
|
2
|
+
import { createDraggable, createDroppable } from "@dnd-kit/svelte";
|
|
3
|
+
import DragDropProviderScope from "../internal/DragDropProviderScope.svelte";
|
|
4
|
+
import { DRAG_DROP_CONTEXT_KEY } from "../internal/drag-drop-context.js";
|
|
5
5
|
/**
|
|
6
6
|
* Cross-container drag and drop powered by [@dnd-kit/svelte](https://clauderic-dnd-kit.mintlify.app/frameworks/svelte).
|
|
7
7
|
*
|
|
@@ -26,15 +26,15 @@ export function useDragDrop() {
|
|
|
26
26
|
toPayload(source) {
|
|
27
27
|
return {
|
|
28
28
|
id: String(source.id),
|
|
29
|
-
data: source.data
|
|
29
|
+
data: source.data,
|
|
30
30
|
};
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
32
|
};
|
|
33
33
|
setContext(DRAG_DROP_CONTEXT_KEY, context);
|
|
34
34
|
const draggableAction = (node, initialOptions) => {
|
|
35
35
|
let currentOptions = initialOptions;
|
|
36
36
|
function isDisabled() {
|
|
37
|
-
return typeof currentOptions.disabled ===
|
|
37
|
+
return typeof currentOptions.disabled === "function"
|
|
38
38
|
? currentOptions.disabled()
|
|
39
39
|
: (currentOptions.disabled ?? false);
|
|
40
40
|
}
|
|
@@ -42,7 +42,7 @@ export function useDragDrop() {
|
|
|
42
42
|
id: currentOptions.id,
|
|
43
43
|
type: currentOptions.container,
|
|
44
44
|
data: (currentOptions.data ?? {}),
|
|
45
|
-
disabled: isDisabled()
|
|
45
|
+
disabled: isDisabled(),
|
|
46
46
|
});
|
|
47
47
|
const detach = drag.attach(node);
|
|
48
48
|
let detachHandle;
|
|
@@ -75,17 +75,17 @@ export function useDragDrop() {
|
|
|
75
75
|
destroy() {
|
|
76
76
|
detach();
|
|
77
77
|
detachHandle?.();
|
|
78
|
-
node.removeAttribute(
|
|
78
|
+
node.removeAttribute("data-dragging");
|
|
79
79
|
if (draggingId === currentOptions.id) {
|
|
80
80
|
draggingId = null;
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
},
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
const droppableAction = (node, initialOptions) => {
|
|
86
86
|
let currentOptions = initialOptions;
|
|
87
87
|
function isDisabled() {
|
|
88
|
-
return typeof currentOptions.disabled ===
|
|
88
|
+
return typeof currentOptions.disabled === "function"
|
|
89
89
|
? currentOptions.disabled()
|
|
90
90
|
: (currentOptions.disabled ?? false);
|
|
91
91
|
}
|
|
@@ -99,7 +99,7 @@ export function useDragDrop() {
|
|
|
99
99
|
return currentOptions.accept(payload);
|
|
100
100
|
}
|
|
101
101
|
return true;
|
|
102
|
-
}
|
|
102
|
+
},
|
|
103
103
|
});
|
|
104
104
|
const detach = drop.attach(node);
|
|
105
105
|
return {
|
|
@@ -113,8 +113,8 @@ export function useDragDrop() {
|
|
|
113
113
|
destroy() {
|
|
114
114
|
detach();
|
|
115
115
|
context.unregisterDroppable(currentOptions.id);
|
|
116
|
-
node.removeAttribute(
|
|
117
|
-
}
|
|
116
|
+
node.removeAttribute("data-droppable-active");
|
|
117
|
+
},
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
return {
|
|
@@ -123,6 +123,6 @@ export function useDragDrop() {
|
|
|
123
123
|
},
|
|
124
124
|
Provider: DragDropProviderScope,
|
|
125
125
|
draggable: draggableAction,
|
|
126
|
-
droppable: droppableAction
|
|
126
|
+
droppable: droppableAction,
|
|
127
127
|
};
|
|
128
128
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { moveArrayItem } from
|
|
1
|
+
export * from "./useSortable.svelte.js";
|
|
2
|
+
export { moveArrayItem } from "./sortable-utils.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { moveArrayItem } from
|
|
1
|
+
export * from "./useSortable.svelte.js";
|
|
2
|
+
export { moveArrayItem } from "./sortable-utils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Action } from
|
|
2
|
-
import type { Component } from
|
|
3
|
-
import { type Snippet } from
|
|
1
|
+
import type { Action } from "svelte/action";
|
|
2
|
+
import type { Component } from "svelte";
|
|
3
|
+
import { type Snippet } from "svelte";
|
|
4
4
|
export interface UseSortableItemParams<T> {
|
|
5
5
|
index: number;
|
|
6
6
|
item: T;
|
|
@@ -16,7 +16,7 @@ export interface UseSortableOptions<T> {
|
|
|
16
16
|
* Drag axis.
|
|
17
17
|
* @default 'vertical'
|
|
18
18
|
*/
|
|
19
|
-
axis?:
|
|
19
|
+
axis?: "vertical" | "horizontal" | "grid" | (() => "vertical" | "horizontal" | "grid");
|
|
20
20
|
/**
|
|
21
21
|
* CSS selector for the drag handle, relative to each item.
|
|
22
22
|
* When omitted, the whole item is draggable.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { setContext } from
|
|
2
|
-
import { CollisionPriority } from
|
|
3
|
-
import { createDroppable } from
|
|
4
|
-
import { createSortable } from
|
|
5
|
-
import SortableProvider from
|
|
6
|
-
import { SORTABLE_CONTEXT_KEY, SORTABLE_GROUP_CONTEXT_KEY } from
|
|
7
|
-
import { getContext } from
|
|
1
|
+
import { setContext } from "svelte";
|
|
2
|
+
import { CollisionPriority } from "@dnd-kit/abstract";
|
|
3
|
+
import { createDroppable } from "@dnd-kit/svelte";
|
|
4
|
+
import { createSortable } from "@dnd-kit/svelte/sortable";
|
|
5
|
+
import SortableProvider from "../internal/SortableProvider.svelte";
|
|
6
|
+
import { SORTABLE_CONTEXT_KEY, SORTABLE_GROUP_CONTEXT_KEY, } from "../internal/sortable-context.js";
|
|
7
|
+
import { getContext } from "svelte";
|
|
8
8
|
let sortableGroupCounter = 0;
|
|
9
9
|
/**
|
|
10
10
|
* Sortable list hook powered by [@dnd-kit/svelte](https://clauderic-dnd-kit.mintlify.app/frameworks/svelte).
|
|
@@ -15,7 +15,7 @@ export function useSortable(options) {
|
|
|
15
15
|
const { getItems, getId, onReorder } = options;
|
|
16
16
|
function getGroup() {
|
|
17
17
|
const group = options.group;
|
|
18
|
-
return ((typeof group ===
|
|
18
|
+
return ((typeof group === "function" ? group() : group) ??
|
|
19
19
|
`sv5ui-plus-sortable-${++sortableGroupCounter}`);
|
|
20
20
|
}
|
|
21
21
|
const groupId = getGroup();
|
|
@@ -26,14 +26,14 @@ export function useSortable(options) {
|
|
|
26
26
|
const draggingId = $derived(groupCtx ? groupCtx.draggingId : localDraggingId);
|
|
27
27
|
function getAxis() {
|
|
28
28
|
const axis = options.axis;
|
|
29
|
-
return typeof axis ===
|
|
29
|
+
return typeof axis === "function" ? axis() : (axis ?? "vertical");
|
|
30
30
|
}
|
|
31
31
|
function getHandle() {
|
|
32
32
|
const handle = options.handle;
|
|
33
|
-
return typeof handle ===
|
|
33
|
+
return typeof handle === "function" ? handle() : handle;
|
|
34
34
|
}
|
|
35
35
|
function isDisabled() {
|
|
36
|
-
return typeof options.disabled ===
|
|
36
|
+
return typeof options.disabled === "function"
|
|
37
37
|
? options.disabled()
|
|
38
38
|
: (options.disabled ?? false);
|
|
39
39
|
}
|
|
@@ -48,7 +48,7 @@ export function useSortable(options) {
|
|
|
48
48
|
setDraggingId(id) {
|
|
49
49
|
localDraggingId = id;
|
|
50
50
|
},
|
|
51
|
-
getDraggingId: () => localDraggingId
|
|
51
|
+
getDraggingId: () => localDraggingId,
|
|
52
52
|
};
|
|
53
53
|
setContext(SORTABLE_CONTEXT_KEY, context);
|
|
54
54
|
$effect(() => {
|
|
@@ -56,10 +56,10 @@ export function useSortable(options) {
|
|
|
56
56
|
if (!node)
|
|
57
57
|
return;
|
|
58
58
|
if (draggingId != null) {
|
|
59
|
-
node.setAttribute(
|
|
59
|
+
node.setAttribute("data-sortable-active", "true");
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
node.removeAttribute(
|
|
62
|
+
node.removeAttribute("data-sortable-active");
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const container = (node) => {
|
|
@@ -68,8 +68,8 @@ export function useSortable(options) {
|
|
|
68
68
|
get id() {
|
|
69
69
|
return getGroup();
|
|
70
70
|
},
|
|
71
|
-
type:
|
|
72
|
-
collisionPriority: CollisionPriority.Low
|
|
71
|
+
type: "sortable-group",
|
|
72
|
+
collisionPriority: CollisionPriority.Low,
|
|
73
73
|
});
|
|
74
74
|
const detach = droppable.attach(node);
|
|
75
75
|
return {
|
|
@@ -78,8 +78,8 @@ export function useSortable(options) {
|
|
|
78
78
|
if (listNode === node) {
|
|
79
79
|
listNode = null;
|
|
80
80
|
}
|
|
81
|
-
node.removeAttribute(
|
|
82
|
-
}
|
|
81
|
+
node.removeAttribute("data-sortable-active");
|
|
82
|
+
},
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
const item = (node, params) => {
|
|
@@ -99,7 +99,7 @@ export function useSortable(options) {
|
|
|
99
99
|
},
|
|
100
100
|
get disabled() {
|
|
101
101
|
return isDisabled();
|
|
102
|
-
}
|
|
102
|
+
},
|
|
103
103
|
});
|
|
104
104
|
const detach = sortable.attach(node);
|
|
105
105
|
let detachHandle;
|
|
@@ -120,7 +120,7 @@ export function useSortable(options) {
|
|
|
120
120
|
detachHandle = sortable.attachHandle(handle);
|
|
121
121
|
}
|
|
122
122
|
bindHandle();
|
|
123
|
-
node.setAttribute(
|
|
123
|
+
node.setAttribute("data-sortable-item", "");
|
|
124
124
|
node.dataset.sortableId = String(getId(current.item));
|
|
125
125
|
return {
|
|
126
126
|
update(nextParams) {
|
|
@@ -135,9 +135,9 @@ export function useSortable(options) {
|
|
|
135
135
|
destroy() {
|
|
136
136
|
detach();
|
|
137
137
|
detachHandle?.();
|
|
138
|
-
node.removeAttribute(
|
|
138
|
+
node.removeAttribute("data-sortable-item");
|
|
139
139
|
delete node.dataset.sortableId;
|
|
140
|
-
}
|
|
140
|
+
},
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
return {
|
|
@@ -146,6 +146,6 @@ export function useSortable(options) {
|
|
|
146
146
|
item,
|
|
147
147
|
get draggingId() {
|
|
148
148
|
return draggingId;
|
|
149
|
-
}
|
|
149
|
+
},
|
|
150
150
|
};
|
|
151
151
|
}
|
package/dist/hooks/utils.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export { defineConfig as defineSV5UIPlusConfig, getConfig as getSV5UIPlusConfig, resetConfig as resetSV5UIPlusConfig } from './config.js';
|
|
31
|
-
export type { UIConfig as SV5UIPlusConfig } from './config.js';
|
|
1
|
+
export * from "./components/BentoGrid/index.js";
|
|
2
|
+
export * from "./components/Chart/index.js";
|
|
3
|
+
export * from "./components/Chat/index.js";
|
|
4
|
+
export * from "./components/CodeBlock/index.js";
|
|
5
|
+
export * from "./components/ConfirmDialog/index.js";
|
|
6
|
+
export * from "./components/DatePickerField/index.js";
|
|
7
|
+
export * from "./components/DateRangePickerField/index.js";
|
|
8
|
+
export * from "./components/Fonts/index.js";
|
|
9
|
+
export * from "./components/FormSelect/index.js";
|
|
10
|
+
export * from "./components/List/index.js";
|
|
11
|
+
export * from "./components/LocaleButton/index.js";
|
|
12
|
+
export * from "./components/Marquee/index.js";
|
|
13
|
+
export * from "./components/NavigationMenu/index.js";
|
|
14
|
+
export * from "./components/NumberTicker/index.js";
|
|
15
|
+
export * from "./components/PasswordInput/index.js";
|
|
16
|
+
export * from "./components/Prose/index.js";
|
|
17
|
+
export * from "./components/ResizeContainer/index.js";
|
|
18
|
+
export * from "./components/Search/index.js";
|
|
19
|
+
export * from "./components/SortableGroup/index.js";
|
|
20
|
+
export * from "./components/SortableList/index.js";
|
|
21
|
+
export * from "./components/Spotlight/index.js";
|
|
22
|
+
export * from "./components/SafeTable/index.js";
|
|
23
|
+
export * from "./components/TableBulkActionBar/index.js";
|
|
24
|
+
export * from "./components/TreeView/index.js";
|
|
25
|
+
export * from "./hooks/useSortable/index.js";
|
|
26
|
+
export * from "./hooks/useDragDrop/index.js";
|
|
27
|
+
export * from "./adapters/notify.js";
|
|
28
|
+
export { defineConfig as defineSV5UIPlusConfig, getConfig as getSV5UIPlusConfig, resetConfig as resetSV5UIPlusConfig, } from "./config.js";
|
|
29
|
+
export type { UIConfig as SV5UIPlusConfig } from "./config.js";
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
// SV5UI Plus-exclusive components
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from './components/TableBulkActionBar/index.js';
|
|
27
|
-
export * from './components/TreeView/index.js';
|
|
2
|
+
export * from "./components/BentoGrid/index.js";
|
|
3
|
+
export * from "./components/Chart/index.js";
|
|
4
|
+
export * from "./components/Chat/index.js";
|
|
5
|
+
export * from "./components/CodeBlock/index.js";
|
|
6
|
+
export * from "./components/ConfirmDialog/index.js";
|
|
7
|
+
export * from "./components/DatePickerField/index.js";
|
|
8
|
+
export * from "./components/DateRangePickerField/index.js";
|
|
9
|
+
export * from "./components/Fonts/index.js";
|
|
10
|
+
export * from "./components/FormSelect/index.js";
|
|
11
|
+
export * from "./components/List/index.js";
|
|
12
|
+
export * from "./components/LocaleButton/index.js";
|
|
13
|
+
export * from "./components/Marquee/index.js";
|
|
14
|
+
export * from "./components/NavigationMenu/index.js";
|
|
15
|
+
export * from "./components/NumberTicker/index.js";
|
|
16
|
+
export * from "./components/PasswordInput/index.js";
|
|
17
|
+
export * from "./components/Prose/index.js";
|
|
18
|
+
export * from "./components/ResizeContainer/index.js";
|
|
19
|
+
export * from "./components/Search/index.js";
|
|
20
|
+
export * from "./components/SortableGroup/index.js";
|
|
21
|
+
export * from "./components/SortableList/index.js";
|
|
22
|
+
export * from "./components/Spotlight/index.js";
|
|
23
|
+
export * from "./components/SafeTable/index.js";
|
|
24
|
+
export * from "./components/TableBulkActionBar/index.js";
|
|
25
|
+
export * from "./components/TreeView/index.js";
|
|
28
26
|
// SV5UI Plus-exclusive hooks
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
27
|
+
export * from "./hooks/useSortable/index.js";
|
|
28
|
+
export * from "./hooks/useDragDrop/index.js";
|
|
31
29
|
// Adapters
|
|
32
|
-
export * from
|
|
30
|
+
export * from "./adapters/notify.js";
|
|
33
31
|
// Addon configuration. Core SV5UI configuration remains `defineConfig` from `sv5ui`.
|
|
34
|
-
export { defineConfig as defineSV5UIPlusConfig, getConfig as getSV5UIPlusConfig, resetConfig as resetSV5UIPlusConfig } from
|
|
32
|
+
export { defineConfig as defineSV5UIPlusConfig, getConfig as getSV5UIPlusConfig, resetConfig as resetSV5UIPlusConfig, } from "./config.js";
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { access, copyFile, mkdir } from
|
|
4
|
-
import path from
|
|
5
|
-
import { fileURLToPath } from
|
|
3
|
+
import { access, copyFile, mkdir } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
6
|
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
-
const __dirname = path.dirname(__filename)
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
9
|
|
|
10
|
-
const args = new Set(process.argv.slice(2))
|
|
11
|
-
const force = args.has(
|
|
12
|
-
const cwd = process.cwd()
|
|
13
|
-
const targetDir = path.join(cwd,
|
|
14
|
-
const targetPath = path.join(targetDir,
|
|
10
|
+
const args = new Set(process.argv.slice(2));
|
|
11
|
+
const force = args.has("--force");
|
|
12
|
+
const cwd = process.cwd();
|
|
13
|
+
const targetDir = path.join(cwd, ".cursor");
|
|
14
|
+
const targetPath = path.join(targetDir, "mcp.json");
|
|
15
15
|
|
|
16
16
|
async function resolveTemplatePath() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
const candidates = [
|
|
18
|
+
path.join(__dirname, "cursor.mcp.json"),
|
|
19
|
+
path.resolve(__dirname, "../../dist/mcp/cursor.mcp.json"),
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
for (const candidate of candidates) {
|
|
23
|
+
try {
|
|
24
|
+
await access(candidate);
|
|
25
|
+
return candidate;
|
|
26
|
+
} catch {
|
|
27
|
+
// Try next candidate.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
throw new Error("Could not find cursor.mcp.json template for SV5UI Plus MCP.");
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async function main() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
const templatePath = await resolveTemplatePath();
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
await access(targetPath);
|
|
39
|
+
if (!force) {
|
|
40
|
+
console.error(`Refusing to overwrite existing file: ${targetPath}`);
|
|
41
|
+
console.error("Run again with --force if you want to replace it.");
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
// Continue and attempt to create the file.
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
await mkdir(targetDir, { recursive: true });
|
|
50
|
+
await copyFile(templatePath, targetPath);
|
|
51
|
+
|
|
52
|
+
console.log(`Installed SV5UI Plus MCP template at ${targetPath}`);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
await main()
|
|
55
|
+
await main();
|