@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
|
@@ -41,35 +41,6 @@ const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslT
|
|
|
41
41
|
bounce: 0.25
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
function _isEnterToClickElement(element) {
|
|
45
|
-
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
46
|
-
}
|
|
47
|
-
function isHTMLElement(node) {
|
|
48
|
-
return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;
|
|
49
|
-
}
|
|
50
|
-
function isHTMLAnchorElement(element) {
|
|
51
|
-
return isHTMLElement(element) && element.nodeName === "A";
|
|
52
|
-
}
|
|
53
|
-
function isHTMLInputElement(element) {
|
|
54
|
-
return isHTMLElement(element) && element.nodeName === "INPUT";
|
|
55
|
-
}
|
|
56
|
-
function isHTMLButtonElement(element) {
|
|
57
|
-
return isHTMLElement(element) && element.nodeName === "BUTTON";
|
|
58
|
-
}
|
|
59
|
-
function isHTMLSelectElement(element) {
|
|
60
|
-
return isHTMLElement(element) && element.nodeName === "SELECT";
|
|
61
|
-
}
|
|
62
|
-
function isHTMLTextAreaElement(element) {
|
|
63
|
-
return isHTMLElement(element) && element.nodeName === "TEXTAREA";
|
|
64
|
-
}
|
|
65
|
-
function containsOrEqualsElement(element, node) {
|
|
66
|
-
return element.contains(node) || element === node;
|
|
67
|
-
}
|
|
68
|
-
function _isScrollable(el) {
|
|
69
|
-
if (!(el instanceof Element)) return !1;
|
|
70
|
-
const style = window.getComputedStyle(el);
|
|
71
|
-
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
72
|
-
}
|
|
73
44
|
function _fillCSSObject(keys, value) {
|
|
74
45
|
return keys.reduce((style, key2) => (style[key2] = value, style), {});
|
|
75
46
|
}
|
|
@@ -2431,6 +2402,35 @@ const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
|
2431
2402
|
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsxRuntime.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;
|
|
2432
2403
|
});
|
|
2433
2404
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
2405
|
+
function _isEnterToClickElement(element) {
|
|
2406
|
+
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
2407
|
+
}
|
|
2408
|
+
function isHTMLElement(node) {
|
|
2409
|
+
return node instanceof Node && node.nodeType === Node.ELEMENT_NODE;
|
|
2410
|
+
}
|
|
2411
|
+
function isHTMLAnchorElement(element) {
|
|
2412
|
+
return isHTMLElement(element) && element.nodeName === "A";
|
|
2413
|
+
}
|
|
2414
|
+
function isHTMLInputElement(element) {
|
|
2415
|
+
return isHTMLElement(element) && element.nodeName === "INPUT";
|
|
2416
|
+
}
|
|
2417
|
+
function isHTMLButtonElement(element) {
|
|
2418
|
+
return isHTMLElement(element) && element.nodeName === "BUTTON";
|
|
2419
|
+
}
|
|
2420
|
+
function isHTMLSelectElement(element) {
|
|
2421
|
+
return isHTMLElement(element) && element.nodeName === "SELECT";
|
|
2422
|
+
}
|
|
2423
|
+
function isHTMLTextAreaElement(element) {
|
|
2424
|
+
return isHTMLElement(element) && element.nodeName === "TEXTAREA";
|
|
2425
|
+
}
|
|
2426
|
+
function containsOrEqualsElement(element, node) {
|
|
2427
|
+
return element.contains(node) || element === node;
|
|
2428
|
+
}
|
|
2429
|
+
function _isScrollable(el) {
|
|
2430
|
+
if (!(el instanceof Element)) return !1;
|
|
2431
|
+
const style = window.getComputedStyle(el);
|
|
2432
|
+
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
2433
|
+
}
|
|
2434
2434
|
function getLayerContext(contextValue) {
|
|
2435
2435
|
if (!isRecord(contextValue) || contextValue.version !== 0)
|
|
2436
2436
|
throw new Error("the context value is not compatible");
|