@sanity/ui 2.16.24 → 2.16.25
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/_chunks-cjs/_visual-editing.js +29 -29
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +29 -29
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +12 -21
- package/dist/_visual-editing.d.ts +12 -21
- package/dist/index.d.mts +31 -57
- package/dist/index.d.ts +31 -57
- package/dist/index.js +46 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -47
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +12 -19
- package/dist/theme.d.ts +12 -19
- package/package.json +3 -3
|
@@ -47,35 +47,6 @@ const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = h
|
|
|
47
47
|
bounce: 0.25
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function _isEnterToClickElement(element) {
|
|
51
|
-
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
52
|
-
}
|
|
53
|
-
function isHTMLElement(node) {
|
|
54
|
-
return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;
|
|
55
|
-
}
|
|
56
|
-
function isHTMLAnchorElement(element) {
|
|
57
|
-
return isHTMLElement(element) && element.nodeName === "A";
|
|
58
|
-
}
|
|
59
|
-
function isHTMLInputElement(element) {
|
|
60
|
-
return isHTMLElement(element) && element.nodeName === "INPUT";
|
|
61
|
-
}
|
|
62
|
-
function isHTMLButtonElement(element) {
|
|
63
|
-
return isHTMLElement(element) && element.nodeName === "BUTTON";
|
|
64
|
-
}
|
|
65
|
-
function isHTMLSelectElement(element) {
|
|
66
|
-
return isHTMLElement(element) && element.nodeName === "SELECT";
|
|
67
|
-
}
|
|
68
|
-
function isHTMLTextAreaElement(element) {
|
|
69
|
-
return isHTMLElement(element) && element.nodeName === "TEXTAREA";
|
|
70
|
-
}
|
|
71
|
-
function containsOrEqualsElement(element, node) {
|
|
72
|
-
return element.contains(node) || element === node;
|
|
73
|
-
}
|
|
74
|
-
function _isScrollable(el) {
|
|
75
|
-
if (!(el instanceof Element)) return !1;
|
|
76
|
-
const style = window.getComputedStyle(el);
|
|
77
|
-
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
78
|
-
}
|
|
79
50
|
function _fillCSSObject(keys, value) {
|
|
80
51
|
return keys.reduce((style, key2) => (style[key2] = value, style), {});
|
|
81
52
|
}
|
|
@@ -2435,6 +2406,35 @@ const ElementQuery = forwardRef(function(props, forwardedRef) {
|
|
|
2435
2406
|
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t4) : t4 = $[17], t4;
|
|
2436
2407
|
});
|
|
2437
2408
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
2409
|
+
function _isEnterToClickElement(element) {
|
|
2410
|
+
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
2411
|
+
}
|
|
2412
|
+
function isHTMLElement(node) {
|
|
2413
|
+
return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;
|
|
2414
|
+
}
|
|
2415
|
+
function isHTMLAnchorElement(element) {
|
|
2416
|
+
return isHTMLElement(element) && element.nodeName === "A";
|
|
2417
|
+
}
|
|
2418
|
+
function isHTMLInputElement(element) {
|
|
2419
|
+
return isHTMLElement(element) && element.nodeName === "INPUT";
|
|
2420
|
+
}
|
|
2421
|
+
function isHTMLButtonElement(element) {
|
|
2422
|
+
return isHTMLElement(element) && element.nodeName === "BUTTON";
|
|
2423
|
+
}
|
|
2424
|
+
function isHTMLSelectElement(element) {
|
|
2425
|
+
return isHTMLElement(element) && element.nodeName === "SELECT";
|
|
2426
|
+
}
|
|
2427
|
+
function isHTMLTextAreaElement(element) {
|
|
2428
|
+
return isHTMLElement(element) && element.nodeName === "TEXTAREA";
|
|
2429
|
+
}
|
|
2430
|
+
function containsOrEqualsElement(element, node) {
|
|
2431
|
+
return element.contains(node) || element === node;
|
|
2432
|
+
}
|
|
2433
|
+
function _isScrollable(el) {
|
|
2434
|
+
if (!(el instanceof Element)) return !1;
|
|
2435
|
+
const style = window.getComputedStyle(el);
|
|
2436
|
+
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
2437
|
+
}
|
|
2438
2438
|
function getLayerContext(contextValue) {
|
|
2439
2439
|
if (!isRecord(contextValue) || contextValue.version !== 0)
|
|
2440
2440
|
throw new Error("the context value is not compatible");
|