@zag-js/hover-card
Advanced tools
Comparing version 0.0.0-dev-20221103102301 to 0.0.0-dev-20221105113307
@@ -56,4 +56,4 @@ import { RequiredBy, DirectionProperty, CommonProperties, Context, PropTypes, NormalizeProps } from '@zag-js/types'; | ||
declare function machine(ctx: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>; | ||
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>; | ||
export { UserDefinedContext as Context, connect, machine }; |
@@ -182,4 +182,18 @@ "use strict"; | ||
var import_popper2 = require("@zag-js/popper"); | ||
// ../../utilities/core/dist/index.mjs | ||
var isArray = (v) => Array.isArray(v); | ||
var isObject = (v) => !(v == null || typeof v !== "object" || isArray(v)); | ||
function compact(obj) { | ||
if (obj === void 0) | ||
return obj; | ||
return Object.fromEntries( | ||
Object.entries(obj).filter(([, value]) => value !== void 0).map(([key, value]) => [key, isObject(value) ? compact(value) : value]) | ||
); | ||
} | ||
// src/hover-card.machine.ts | ||
var { not } = import_core.guards; | ||
function machine(ctx) { | ||
function machine(userContext) { | ||
const ctx = compact(userContext); | ||
return (0, import_core.createMachine)( | ||
@@ -186,0 +200,0 @@ { |
{ | ||
"name": "@zag-js/hover-card", | ||
"version": "0.0.0-dev-20221103102301", | ||
"version": "0.0.0-dev-20221105113307", | ||
"description": "Core logic for the hover-card widget implemented as a state machine", | ||
@@ -32,9 +32,10 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@zag-js/core": "0.0.0-dev-20221103102301", | ||
"@zag-js/dismissable": "0.0.0-dev-20221103102301", | ||
"@zag-js/popper": "0.0.0-dev-20221103102301", | ||
"@zag-js/types": "0.0.0-dev-20221103102301" | ||
"@zag-js/core": "0.2.0", | ||
"@zag-js/dismissable": "0.2.0", | ||
"@zag-js/popper": "0.2.0", | ||
"@zag-js/types": "0.3.0" | ||
}, | ||
"devDependencies": { | ||
"@zag-js/dom-utils": "0.0.0-dev-20221103102301" | ||
"@zag-js/dom-utils": "0.2.0", | ||
"@zag-js/utils": "0.0.0-dev-20221105113307" | ||
}, | ||
@@ -41,0 +42,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24311
684
2
+ Added@zag-js/core@0.2.0(transitive)
+ Added@zag-js/dismissable@0.2.0(transitive)
+ Added@zag-js/interact-outside@0.2.0(transitive)
+ Added@zag-js/popper@0.2.0(transitive)
+ Added@zag-js/store@0.2.0(transitive)
+ Added@zag-js/types@0.3.0(transitive)
- Removed@zag-js/core@0.0.0-dev-20221103102301(transitive)
- Removed@zag-js/dismissable@0.0.0-dev-20221103102301(transitive)
- Removed@zag-js/interact-outside@0.0.0-dev-20221103102301(transitive)
- Removed@zag-js/popper@0.0.0-dev-20221103102301(transitive)
- Removed@zag-js/store@0.0.0-dev-20221103102301(transitive)
- Removed@zag-js/types@0.0.0-dev-20221103102301(transitive)
Updated@zag-js/core@0.2.0
Updated@zag-js/dismissable@0.2.0
Updated@zag-js/popper@0.2.0
Updated@zag-js/types@0.3.0