@leaflink/stash 53.4.6 → 53.4.8
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/AppSidebar.js +56 -52
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +1 -1
- package/dist/Copy.js +1 -1
- package/dist/DataViewFilters.js +1 -1
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewToolbar.js +139 -125
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +1114 -1113
- package/dist/DatePicker.js.map +1 -1
- package/dist/Modal.js +105 -89
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +30 -26
- package/dist/Modals.js.map +1 -1
- package/dist/MoreActions.js +294 -288
- package/dist/MoreActions.js.map +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/RadioGroup.js +69 -62
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchBar.js +27 -25
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +103 -101
- package/dist/Select.js.map +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js +131 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-DEopbeSY.js.map +1 -0
- package/dist/Thumbnail.js +42 -42
- package/dist/Thumbnail.js.map +1 -1
- package/dist/ThumbnailGroup.js +24 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +15 -13
- package/dist/Timeline.js.map +1 -1
- package/dist/Toast.vue.d.ts +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js} +2 -2
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js.map → Tooltip.vue_vue_type_script_setup_true_lang-UUjw5O1x.js.map} +1 -1
- package/dist/components.css +1 -1
- package/dist/getContrastingTextColor.d.ts +8 -0
- package/dist/index-t9tXBnql.js +469 -0
- package/dist/{index-DA70nQCT.js.map → index-t9tXBnql.js.map} +1 -1
- package/dist/templateRefNarrowing-CeANDylX.js +22 -0
- package/dist/templateRefNarrowing-CeANDylX.js.map +1 -0
- package/dist/useMediaQuery.d.ts +12 -10
- package/dist/useMediaQuery.js +7 -29
- package/dist/useMediaQuery.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/dist/useValidation.d.ts +11 -1
- package/dist/useValidation.js +240 -198
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/getContrastingTextColor.js +36 -24
- package/dist/utils/getContrastingTextColor.js.map +1 -1
- package/package.json +1 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js +0 -130
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3FBaVP5.js.map +0 -1
- package/dist/index-DA70nQCT.js +0 -424
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const o = typeof HTMLElement < "u";
|
|
2
|
+
function l(n) {
|
|
3
|
+
return o && n instanceof HTMLElement ? n : null;
|
|
4
|
+
}
|
|
5
|
+
function c(n) {
|
|
6
|
+
return !o || !n || typeof n != "object" || !("$el" in n) ? !1 : n.$el instanceof HTMLElement;
|
|
7
|
+
}
|
|
8
|
+
function r(n) {
|
|
9
|
+
return c(n) ? n.$el : null;
|
|
10
|
+
}
|
|
11
|
+
function i(n) {
|
|
12
|
+
if (!n || typeof n != "object" || !("calendarRef" in n)) return null;
|
|
13
|
+
const t = n.calendarRef, e = t == null ? void 0 : t.focusDate;
|
|
14
|
+
return typeof e != "function" ? null : (f) => e.call(t, f);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as a,
|
|
18
|
+
i as g,
|
|
19
|
+
c as i,
|
|
20
|
+
l as t
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=templateRefNarrowing-CeANDylX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateRefNarrowing-CeANDylX.js","sources":["../src/utils/templateRefNarrowing.ts"],"sourcesContent":["/**\n * Type-narrowing helpers for untyped template refs (useTemplateRef() without a type argument).\n * Use these instead of type assertions so types stay accurate and the code follows\n * \"prefer type narrowing over assertions\" (code-patterns.mdc).\n *\n * All helpers are SSR-safe: they return null / false when HTMLElement is not defined (e.g. Node during VitePress SSR).\n */\n\nconst hasHTMLElement = typeof HTMLElement !== 'undefined';\n\n/**\n * Returns the value as an HTMLElement if it is one, otherwise null.\n * Use when a template ref is bound to an HTML element.\n */\nexport function toElement(value: unknown): HTMLElement | null {\n return hasHTMLElement && value instanceof HTMLElement ? value : null;\n}\n\n/**\n * Type guard: true when value is an object with an $el property that is an HTMLElement.\n * Use for template refs bound to Vue component instances (Field, Dropdown, etc.).\n */\nexport function isComponentWithEl(value: unknown): value is { $el: HTMLElement } {\n if (!hasHTMLElement || !value || typeof value !== 'object' || !('$el' in value)) return false;\n\n // Intentional cast: we've confirmed '$el' in value; TypeScript needs this to narrow to { $el: HTMLElement }.\n const el = (value as { $el: unknown }).$el;\n\n return el instanceof HTMLElement;\n}\n\n/**\n * Returns the component's $el if value is a component-with-$el, otherwise null.\n */\nexport function toComponentEl(value: unknown): HTMLElement | null {\n return isComponentWithEl(value) ? value.$el : null;\n}\n\n/**\n * Returns a focusDate-like function if value has calendarRef.focusDate, otherwise null.\n * Use for v-calendar DatePicker refs when calling focusDate. The returned function\n * invokes focusDate with the correct `this` (the calendar ref object) so component\n * methods work when called.\n */\nexport function getCalendarFocusDate(value: unknown): ((date: Date) => void) | null {\n if (!value || typeof value !== 'object' || !('calendarRef' in value)) return null;\n\n const calendar = (value as { calendarRef?: { focusDate?: (d: Date) => void } }).calendarRef;\n const focusDate = calendar?.focusDate;\n\n if (typeof focusDate !== 'function') return null;\n\n return (date: Date) => focusDate.call(calendar, date);\n}\n"],"names":["hasHTMLElement","toElement","value","isComponentWithEl","toComponentEl","getCalendarFocusDate","calendar","focusDate","date"],"mappings":"AAQA,MAAMA,IAAiB,OAAO,cAAgB;AAMvC,SAASC,EAAUC,GAAoC;AAC5D,SAAOF,KAAkBE,aAAiB,cAAcA,IAAQ;AAClE;AAMO,SAASC,EAAkBD,GAA+C;AAC/E,SAAI,CAACF,KAAkB,CAACE,KAAS,OAAOA,KAAU,YAAY,EAAE,SAASA,KAAe,KAG5EA,EAA2B,eAElB;AACvB;AAKO,SAASE,EAAcF,GAAoC;AAChE,SAAOC,EAAkBD,CAAK,IAAIA,EAAM,MAAM;AAChD;AAQO,SAASG,EAAqBH,GAA+C;AAClF,MAAI,CAACA,KAAS,OAAOA,KAAU,YAAY,EAAE,iBAAiBA,GAAQ,QAAO;AAE7E,QAAMI,IAAYJ,EAA8D,aAC1EK,IAAYD,KAAA,gBAAAA,EAAU;AAE5B,SAAI,OAAOC,KAAc,aAAmB,OAErC,CAACC,MAAeD,EAAU,KAAKD,GAAUE,CAAI;AACtD;"}
|
package/dist/useMediaQuery.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare interface QueryCacheItem {
|
|
6
|
-
hasMatches: Ref<boolean>;
|
|
7
|
-
mediaQueryList: MediaQueryList;
|
|
8
|
-
}
|
|
1
|
+
import { provideSSRWidth } from '@vueuse/core';
|
|
2
|
+
import { useMediaQuery } from '@vueuse/core';
|
|
3
|
+
import { useSSRWidth } from '@vueuse/core';
|
|
9
4
|
|
|
10
5
|
/**
|
|
11
|
-
*
|
|
6
|
+
* No-op for backwards compatibility with test setup. VueUse's useMediaQuery does not
|
|
7
|
+
* use a shared cache, so there is nothing to clear.
|
|
12
8
|
*/
|
|
13
|
-
declare function
|
|
9
|
+
export declare function clearQueryCache(): void;
|
|
10
|
+
|
|
11
|
+
export { provideSSRWidth }
|
|
12
|
+
|
|
14
13
|
export default useMediaQuery;
|
|
14
|
+
export { useMediaQuery }
|
|
15
|
+
|
|
16
|
+
export { useSSRWidth }
|
|
15
17
|
|
|
16
18
|
export { }
|
package/dist/useMediaQuery.js
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function f(e) {
|
|
4
|
-
s.has(t(e)) || s.set(t(e), {
|
|
5
|
-
hasMatches: h(!1),
|
|
6
|
-
mediaQueryList: window.matchMedia(t(e))
|
|
7
|
-
});
|
|
8
|
-
const a = s.get(t(e));
|
|
9
|
-
function n(i) {
|
|
10
|
-
a.hasMatches.value = i.matches;
|
|
11
|
-
}
|
|
12
|
-
function c() {
|
|
13
|
-
var i;
|
|
14
|
-
typeof ((i = a.mediaQueryList) == null ? void 0 : i.removeEventListener) == "function" && a.mediaQueryList.removeEventListener("change", n);
|
|
15
|
-
}
|
|
16
|
-
const o = d(
|
|
17
|
-
() => t(e),
|
|
18
|
-
() => {
|
|
19
|
-
c(), a.mediaQueryList = window.matchMedia(t(e)), a.mediaQueryList.addEventListener("change", n), a.hasMatches.value = a.mediaQueryList.matches;
|
|
20
|
-
},
|
|
21
|
-
{ immediate: !0 }
|
|
22
|
-
);
|
|
23
|
-
return m(() => {
|
|
24
|
-
o(), c(), s.delete(t(e));
|
|
25
|
-
}), u(() => {
|
|
26
|
-
var i;
|
|
27
|
-
return !!((i = s.get(t(e))) != null && i.hasMatches.value);
|
|
28
|
-
});
|
|
1
|
+
import { a as s, p as t, a as u, b as d } from "./index-t9tXBnql.js";
|
|
2
|
+
function e() {
|
|
29
3
|
}
|
|
30
4
|
export {
|
|
31
|
-
|
|
5
|
+
e as clearQueryCache,
|
|
6
|
+
s as default,
|
|
7
|
+
t as provideSSRWidth,
|
|
8
|
+
u as useMediaQuery,
|
|
9
|
+
d as useSSRWidth
|
|
32
10
|
};
|
|
33
11
|
//# sourceMappingURL=useMediaQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.js","sources":["../src/composables/useMediaQuery/useMediaQuery.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useMediaQuery.js","sources":["../src/composables/useMediaQuery/useMediaQuery.ts"],"sourcesContent":["/**\n * Re-export useMediaQuery and SSR helpers from VueUse so we get maintained behavior\n * (SSR, ssrWidth, pxValue for units) without duplicating logic.\n * See https://vueuse.org/core/useMediaQuery/\n */\nexport { useMediaQuery as default, provideSSRWidth, useMediaQuery, useSSRWidth } from '@vueuse/core';\n\n/**\n * No-op for backwards compatibility with test setup. VueUse's useMediaQuery does not\n * use a shared cache, so there is nothing to clear.\n */\nexport function clearQueryCache(): void {}\n"],"names":["clearQueryCache"],"mappings":";AAWO,SAASA,IAAwB;AAAC;"}
|
package/dist/useSortable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import v from "@leaflink/snitch";
|
|
2
|
-
import {
|
|
2
|
+
import { c as I } from "./index-t9tXBnql.js";
|
|
3
3
|
import { isRef as w, toValue as D, nextTick as A, computed as i, ref as y, watch as S, onMounted as $, onBeforeUnmount as G } from "vue";
|
|
4
4
|
function O({ list: n, from: s, to: e }) {
|
|
5
5
|
if (s === e) return;
|
package/dist/useValidation.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export default useValidation;
|
|
|
92
92
|
* The inputs for useValidation
|
|
93
93
|
*/
|
|
94
94
|
export declare interface UseValidationArgs<Values extends object> {
|
|
95
|
-
rules: ValidationRules<Values>;
|
|
95
|
+
rules: MaybeRefOrGetter<ValidationRules<Values> | ValidationRulesDeep>;
|
|
96
96
|
values: MaybeRefOrGetter<{
|
|
97
97
|
[Property in keyof Values]: Values[Property];
|
|
98
98
|
}>;
|
|
@@ -236,6 +236,16 @@ export declare type ValidationRules<Values extends object> = {
|
|
|
236
236
|
[Property in keyof Values]: ValidationRule<Values[Property]>[];
|
|
237
237
|
};
|
|
238
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Nested rules tree: each leaf key maps to `ValidationRule[]`. Use for nested objects or arrays of
|
|
241
|
+
* per-row rule objects (e.g. `terpenes: [{ name: [...], amount: [...] }]`). Inline rule objects
|
|
242
|
+
* should use `validator(value: unknown)` (then narrow) so they match `ValidationRule<unknown>`;
|
|
243
|
+
* you do not need to import this type when `useValidation` can infer `values`.
|
|
244
|
+
*/
|
|
245
|
+
export declare interface ValidationRulesDeep {
|
|
246
|
+
[key: string]: ValidationRule<unknown>[] | ValidationRulesDeep | ValidationRulesDeep[];
|
|
247
|
+
}
|
|
248
|
+
|
|
239
249
|
/**
|
|
240
250
|
* A function that returns `true` if the received value is valid and `false` if invalid.
|
|
241
251
|
*/
|