Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@diceui/shared

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@diceui/shared - npm Package Compare versions

Comparing version
0.9.0
to
0.10.0
+25
-25
dist/index.mjs

@@ -41,3 +41,3 @@ import * as React32 from 'react';

var VAR_AVAILABLE_HEIGHT = "--dice-available-height";
var DirectionContext = React32.createContext(undefined);
var DirectionContext = React32.createContext(void 0);
function useDirection(dirProp) {

@@ -115,3 +115,3 @@ const contextDir = React32.useContext(DirectionContext);

padding: collisionPadding,
limiter: sticky === "partial" ? limitShift() : undefined
limiter: sticky === "partial" ? limitShift() : void 0
})

@@ -201,3 +201,3 @@ ] : [],

middleware,
whileElementsMounted: forceMount ? undefined : (...args) => autoUpdate(...args, autoUpdateOptions),
whileElementsMounted: forceMount ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
strategy

@@ -222,3 +222,3 @@ });

}
return undefined;
return void 0;
}, [forceMount, open, elements, update, autoUpdateOptions]);

@@ -383,3 +383,3 @@ const [placementSide = "bottom", placementAlign = "start"] = floatingPlacement.split("-");

});
const isControlled = prop !== undefined;
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;

@@ -616,3 +616,3 @@ const handleChange = useCallbackRef(onChange);

const value = this.cache.get(key);
if (value !== undefined) {
if (value !== void 0) {
const index = this.keyOrder.indexOf(key);

@@ -636,3 +636,3 @@ if (index > -1) {

const lruKey = this.keyOrder.shift();
if (lruKey !== undefined) {
if (lruKey !== void 0) {
this.cache.delete(lruKey);

@@ -661,3 +661,3 @@ }

const cached = normalizedCache.get(str);
if (cached !== undefined) return cached;
if (cached !== void 0) return cached;
let normalized;

@@ -803,3 +803,3 @@ try {

items: /* @__PURE__ */ new Map(),
groups: groupMap ? /* @__PURE__ */ new Map() : undefined
groups: groupMap ? /* @__PURE__ */ new Map() : void 0
}).current;

@@ -918,3 +918,3 @@ const filter = useFilter({ sensitivity: "base", gapMatch: true });

function onFormReset() {
if (defaultValue !== undefined) {
if (defaultValue !== void 0) {
onResetCallback?.(defaultValue);

@@ -931,7 +931,7 @@ }

// src/hooks/use-id.ts
var useReactId = React32[" useId ".trim().toString()] || (() => undefined);
var useReactId = React32[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
const [id, setId] = React32.useState(
typeof useReactId === "function" ? useReactId() : undefined
typeof useReactId === "function" ? useReactId() : void 0
);

@@ -1078,3 +1078,3 @@ useLayoutEffect4(() => {

"data-state": state,
"data-value": value ?? undefined,
"data-value": value ?? void 0,
"data-max": max

@@ -1121,6 +1121,6 @@ }),

function getPlatform() {
return typeof window !== "undefined" && window.navigator != null ? window.navigator.platform : undefined;
return typeof window !== "undefined" && window.navigator != null ? window.navigator.platform : void 0;
}
function testPlatform(re) {
return typeof window !== "undefined" && window.navigator != null ? re.test(window.navigator.platform) : undefined;
return typeof window !== "undefined" && window.navigator != null ? re.test(window.navigator.platform) : void 0;
}

@@ -1380,3 +1380,3 @@

function useSize(element) {
const [size2, setSize] = React32.useState(undefined);
const [size2, setSize] = React32.useState(void 0);
useLayoutEffect4(() => {

@@ -1405,3 +1405,3 @@ if (element) {

}
setSize(undefined);
setSize(void 0);
}, [element]);

@@ -1427,3 +1427,3 @@ return size2;

function findNextItem(items, search, currentItem) {
if (!search) return undefined;
if (!search) return void 0;
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);

@@ -1441,3 +1441,3 @@ const normalizedSearch = isRepeated ? search[0] ?? "" : search;

});
return nextItem !== currentItem ? nextItem : undefined;
return nextItem !== currentItem ? nextItem : void 0;
}

@@ -1501,3 +1501,3 @@ function useTypeahead({

ref(value);
} else if (ref !== null && ref !== undefined) {
} else if (ref !== null && ref !== void 0) {
ref.current = value;

@@ -1622,3 +1622,3 @@ }

tabIndex: -1,
defaultChecked: isCheckInput ? checked : undefined,
defaultChecked: isCheckInput ? checked : void 0,
style: {

@@ -1652,4 +1652,4 @@ ...props.style,

if (context) return context;
if (defaultValue !== undefined) return defaultValue;
return undefined;
if (defaultValue !== void 0) return defaultValue;
return void 0;
}

@@ -1659,3 +1659,3 @@ return [Provider, useContext3];

function getElementRef(element) {
if (!React32.isValidElement(element)) return undefined;
if (!React32.isValidElement(element)) return void 0;
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;

@@ -1750,3 +1750,3 @@ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;

});
return /* @__PURE__ */ React32.createElement(SlotClone, { ...slotProps, ref: forwardedRef }, React32.isValidElement(newElement) ? React32.cloneElement(newElement, undefined, newChildren) : null);
return /* @__PURE__ */ React32.createElement(SlotClone, { ...slotProps, ref: forwardedRef }, React32.isValidElement(newElement) ? React32.cloneElement(newElement, void 0, newChildren) : null);
});

@@ -1753,0 +1753,0 @@ Slot.displayName = "Slot";

{
"name": "@diceui/shared",
"version": "0.9.0",
"version": "0.10.0",
"publishConfig": {

@@ -23,7 +23,7 @@ "access": "public"

"peerDependencies": {
"@floating-ui/react": "^0.27.4",
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"@floating-ui/react": "^0.27.2"
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},

@@ -39,4 +39,4 @@ "peerDependenciesMeta": {

"devDependencies": {
"tsup": "^8.3.5",
"typescript": "^5.7.2"
"tsup": "^8.3.6",
"typescript": "^5.7.3"
},

@@ -43,0 +43,0 @@ "scripts": {

Sorry, the diff of this file is too big to display