@leaflink/stash 50.4.0 → 50.5.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.
- package/dist/Carousel.js +321 -324
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +4 -0
- package/dist/DatePicker.vue.d.ts +1 -1
- package/dist/Filters.vue.d.ts +9 -9
- package/dist/Image.js +6 -166
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue_vue_type_script_setup_true_lang-YUNunj71.js +169 -0
- package/dist/Image.vue_vue_type_script_setup_true_lang-YUNunj71.js.map +1 -0
- package/dist/InlineEdit.vue.d.ts +1 -1
- package/dist/ListView.vue.d.ts +9 -9
- package/dist/Module.vue.d.ts +1 -1
- package/dist/Thumbnail.js +91 -0
- package/dist/Thumbnail.js.map +1 -0
- package/dist/Thumbnail.vue.d.ts +63 -0
- package/dist/ThumbnailEmpty.js +33 -0
- package/dist/ThumbnailEmpty.js.map +1 -0
- package/dist/ThumbnailEmpty.vue.d.ts +9 -0
- package/dist/ThumbnailGroup.js +73 -0
- package/dist/ThumbnailGroup.js.map +1 -0
- package/dist/ThumbnailGroup.keys-D6WL5xQ5.js +16 -0
- package/dist/ThumbnailGroup.keys-D6WL5xQ5.js.map +1 -0
- package/dist/ThumbnailGroup.vue.d.ts +191 -0
- package/dist/Tooltip.js +6 -6
- package/dist/components.css +1 -1
- package/dist/{index-Ck3Dl09q.js → index-Bbc2pg2X.js} +3 -3
- package/dist/index-Bbc2pg2X.js.map +1 -0
- package/dist/locale.js +16 -12
- package/dist/locale.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/package.json +2 -1
- package/dist/index-Ck3Dl09q.js.map +0 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { ComponentCustomProps } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
5
|
+
import { Ref } from 'vue';
|
|
6
|
+
import { RendererElement } from 'vue';
|
|
7
|
+
import { RendererNode } from 'vue';
|
|
8
|
+
import { ShallowUnwrapRef } from 'vue';
|
|
9
|
+
import { VNode } from 'vue';
|
|
10
|
+
import { VNodeProps } from 'vue';
|
|
11
|
+
|
|
12
|
+
declare const _default: <Thumbnail extends ThumbnailDefinition>(__VLS_props: {
|
|
13
|
+
radius?: ThumbnailRadius | undefined;
|
|
14
|
+
draggable?: boolean | undefined;
|
|
15
|
+
removable?: boolean | undefined;
|
|
16
|
+
thumbnails?: Thumbnail[] | undefined;
|
|
17
|
+
activeThumbnail?: number | undefined;
|
|
18
|
+
readonly onDragStart?: ((event: SortableOnDragStartEvent) => any) | undefined;
|
|
19
|
+
readonly onDragEnd?: ((event: SortableDragEvent) => any) | undefined;
|
|
20
|
+
readonly "onUpdate:thumbnails"?: ((thumbnails: Thumbnail[]) => any) | undefined;
|
|
21
|
+
showEmpty?: boolean | undefined;
|
|
22
|
+
emptyOptions?: ThumbnailEmptyOptions | undefined;
|
|
23
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
default?(_: {
|
|
27
|
+
activeThumbnail: number;
|
|
28
|
+
isDragging: boolean;
|
|
29
|
+
}): any;
|
|
30
|
+
};
|
|
31
|
+
emit: ((evt: "dragStart", event: SortableOnDragStartEvent) => void) & ((evt: "dragEnd", event: SortableDragEvent) => void) & ((evt: "update:thumbnails", thumbnails: Thumbnail[]) => void);
|
|
32
|
+
} | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef< {}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
33
|
+
props: {
|
|
34
|
+
radius?: ThumbnailRadius | undefined;
|
|
35
|
+
draggable?: boolean | undefined;
|
|
36
|
+
removable?: boolean | undefined;
|
|
37
|
+
thumbnails?: Thumbnail[] | undefined;
|
|
38
|
+
activeThumbnail?: number | undefined;
|
|
39
|
+
readonly onDragStart?: ((event: SortableOnDragStartEvent) => any) | undefined;
|
|
40
|
+
readonly onDragEnd?: ((event: SortableDragEvent) => any) | undefined;
|
|
41
|
+
readonly "onUpdate:thumbnails"?: ((thumbnails: Thumbnail[]) => any) | undefined;
|
|
42
|
+
showEmpty?: boolean | undefined;
|
|
43
|
+
emptyOptions?: ThumbnailEmptyOptions | undefined;
|
|
44
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
45
|
+
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
46
|
+
attrs: any;
|
|
47
|
+
slots: {
|
|
48
|
+
default?(_: {
|
|
49
|
+
activeThumbnail: number;
|
|
50
|
+
isDragging: boolean;
|
|
51
|
+
}): any;
|
|
52
|
+
};
|
|
53
|
+
emit: ((evt: "dragStart", event: SortableOnDragStartEvent) => void) & ((evt: "dragEnd", event: SortableDragEvent) => void) & ((evt: "update:thumbnails", thumbnails: Thumbnail[]) => void);
|
|
54
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}> & {
|
|
57
|
+
__ctx?: {
|
|
58
|
+
props: {
|
|
59
|
+
radius?: ThumbnailRadius | undefined;
|
|
60
|
+
draggable?: boolean | undefined;
|
|
61
|
+
removable?: boolean | undefined;
|
|
62
|
+
thumbnails?: Thumbnail[] | undefined;
|
|
63
|
+
activeThumbnail?: number | undefined;
|
|
64
|
+
readonly onDragStart?: ((event: SortableOnDragStartEvent) => any) | undefined;
|
|
65
|
+
readonly onDragEnd?: ((event: SortableDragEvent) => any) | undefined;
|
|
66
|
+
readonly "onUpdate:thumbnails"?: ((thumbnails: Thumbnail[]) => any) | undefined;
|
|
67
|
+
showEmpty?: boolean | undefined;
|
|
68
|
+
emptyOptions?: ThumbnailEmptyOptions | undefined;
|
|
69
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
70
|
+
expose(exposed: ShallowUnwrapRef< {}>): void;
|
|
71
|
+
attrs: any;
|
|
72
|
+
slots: {
|
|
73
|
+
default?(_: {
|
|
74
|
+
activeThumbnail: number;
|
|
75
|
+
isDragging: boolean;
|
|
76
|
+
}): any;
|
|
77
|
+
};
|
|
78
|
+
emit: ((evt: "dragStart", event: SortableOnDragStartEvent) => void) & ((evt: "dragEnd", event: SortableDragEvent) => void) & ((evt: "update:thumbnails", thumbnails: Thumbnail[]) => void);
|
|
79
|
+
} | undefined;
|
|
80
|
+
};
|
|
81
|
+
export default _default;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Move sortable elements in the list
|
|
85
|
+
* @param list List of sortable elements
|
|
86
|
+
* @param from Original element position
|
|
87
|
+
* @param to New element position
|
|
88
|
+
*/
|
|
89
|
+
export declare function moveSortableElements<ListItem>({ list, from, to }: MoveSortableElementsOptions<ListItem>): void;
|
|
90
|
+
|
|
91
|
+
export declare interface MoveSortableElementsOptions<T> {
|
|
92
|
+
list: RefOrGetter<T[]>;
|
|
93
|
+
from: number;
|
|
94
|
+
to: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Like the MaybeRefOrGetter type from Vue, but without the Maybe. Can be used to ensure the most up-to-date value is available.
|
|
99
|
+
*/
|
|
100
|
+
declare type RefOrGetter<T> = Ref<T> | (() => T);
|
|
101
|
+
|
|
102
|
+
export declare interface SortableDragEvent extends DragEvent {
|
|
103
|
+
/**
|
|
104
|
+
* The old index of the dragged element
|
|
105
|
+
*/
|
|
106
|
+
oldIndex: number;
|
|
107
|
+
/**
|
|
108
|
+
* The new index of the dragged element
|
|
109
|
+
*/
|
|
110
|
+
newIndex: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare type SortableOnDragEndEvent = SortableDragEvent;
|
|
114
|
+
|
|
115
|
+
export declare type SortableOnDragStartEvent = Omit<SortableDragEvent, 'newIndex'>;
|
|
116
|
+
|
|
117
|
+
declare interface ThumbnailDefinition {
|
|
118
|
+
id: number | string;
|
|
119
|
+
imageUrl: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare interface ThumbnailEmptyOptions {
|
|
123
|
+
max: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare interface ThumbnailInjection<Thumbnail> {
|
|
127
|
+
isDragging: MaybeRefOrGetter<boolean>;
|
|
128
|
+
radius: ThumbnailRadius;
|
|
129
|
+
draggable: ComputedRef<boolean>;
|
|
130
|
+
removable: MaybeRefOrGetter<boolean>;
|
|
131
|
+
thumbnails: MaybeRefOrGetter<Thumbnail[]>;
|
|
132
|
+
activeThumbnail: Ref<number | undefined>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare type ThumbnailRadius = 'rounded' | 'circle';
|
|
136
|
+
|
|
137
|
+
export declare interface UseSortableOptions<SortableItem> {
|
|
138
|
+
/**
|
|
139
|
+
* The parent element of the sortable elements
|
|
140
|
+
*/
|
|
141
|
+
ref: Ref<HTMLElement | null>;
|
|
142
|
+
/**
|
|
143
|
+
* The list of sortable elements to be sorted
|
|
144
|
+
*/
|
|
145
|
+
list: Ref<SortableItem[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Enables/Disables drag and drop sorting
|
|
148
|
+
* @default true
|
|
149
|
+
*/
|
|
150
|
+
isEnabled?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Class name for the ghost element
|
|
153
|
+
* @default ''
|
|
154
|
+
*/
|
|
155
|
+
ghostClass?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Class name for the chosen element
|
|
158
|
+
* @default ''
|
|
159
|
+
*/
|
|
160
|
+
chosenClass?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Sort the list in place
|
|
163
|
+
* @default true
|
|
164
|
+
*/
|
|
165
|
+
sortInPlace?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Callback when the dragging starts
|
|
168
|
+
*/
|
|
169
|
+
onDragStart?: (e: SortableOnDragStartEvent) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Callback when the dragging ends
|
|
172
|
+
*/
|
|
173
|
+
onDragEnd?: (e: SortableOnDragEndEvent) => void;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export declare interface UseSortableReturn {
|
|
177
|
+
/**
|
|
178
|
+
* Whether the element is currently being dragged
|
|
179
|
+
*/
|
|
180
|
+
isDragging: Ref<boolean>;
|
|
181
|
+
/**
|
|
182
|
+
* The new position of the dragged element
|
|
183
|
+
*/
|
|
184
|
+
newIndex: Ref<number>;
|
|
185
|
+
/**
|
|
186
|
+
* The original position of the dragged element
|
|
187
|
+
*/
|
|
188
|
+
oldIndex: Ref<number>;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { }
|
package/dist/Tooltip.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as g, ref as n, computed as r, openBlock as d, createElementBlock as S, createElementVNode as i, renderSlot as l, createBlock as T, Teleport as E, normalizeStyle as
|
|
1
|
+
import { defineComponent as g, ref as n, computed as r, openBlock as d, createElementBlock as S, createElementVNode as i, renderSlot as l, createBlock as T, Teleport as E, normalizeStyle as f, unref as $, createTextVNode as k, toDisplayString as O } from "vue";
|
|
2
2
|
import { u as A, a as B, f as F, o as D, b as I } from "./floating-ui.vue-BmfQDqE-.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as P } from "./index-Bbc2pg2X.js";
|
|
4
4
|
const z = {
|
|
5
5
|
ref: "wrapper",
|
|
6
6
|
class: "stash-tooltip__wrapper tw-relative tw-inline-flex tw-h-fit tw-w-fit"
|
|
@@ -13,13 +13,13 @@ const z = {
|
|
|
13
13
|
teleportTo: { default: "#stash-menus-mount-node" },
|
|
14
14
|
text: { default: "" }
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
16
|
+
setup(u) {
|
|
17
17
|
const m = {
|
|
18
18
|
top: "bottom",
|
|
19
19
|
right: "left",
|
|
20
20
|
bottom: "top",
|
|
21
21
|
left: "right"
|
|
22
|
-
}, e =
|
|
22
|
+
}, e = u, a = n(null), p = n(null), c = n(null), { isOutside: h } = P(a), _ = r(() => !h.value || e.isOpen), y = r(() => e.side), { floatingStyles: x, middlewareData: o, placement: v } = A(a, c, {
|
|
23
23
|
whileElementsMounted: B,
|
|
24
24
|
placement: y,
|
|
25
25
|
middleware: [F(), D(N), I({ element: p })]
|
|
@@ -51,7 +51,7 @@ const z = {
|
|
|
51
51
|
"data-test": "stash-tooltip",
|
|
52
52
|
class: "stash-tooltip tw-pointer-events-none tw-z-screen tw-flex tw-w-[148px] tw-flex-col tw-items-center tw-whitespace-normal tw-rounded tw-bg-ice-900 tw-p-3 tw-text-center tw-text-xs tw-text-white tw-opacity-0 tw-shadow tw-transition-opacity",
|
|
53
53
|
role: "tooltip",
|
|
54
|
-
style:
|
|
54
|
+
style: f({
|
|
55
55
|
...$(x),
|
|
56
56
|
opacity: _.value ? 0.95 : 0
|
|
57
57
|
})
|
|
@@ -65,7 +65,7 @@ const z = {
|
|
|
65
65
|
ref_key: "floatingArrow",
|
|
66
66
|
ref: p,
|
|
67
67
|
class: "stash-tooltip__arrow tw-absolute tw-z-behind tw-h-[12px] tw-w-[12px] tw-rotate-45 tw-bg-ice-900",
|
|
68
|
-
style:
|
|
68
|
+
style: f(b.value)
|
|
69
69
|
}, null, 4)
|
|
70
70
|
], 4)
|
|
71
71
|
], 8, ["to", "disabled"]))
|