@zag-js/hover-card
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,29 +0,2 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
connect: () => connect, | ||
machine: () => machine | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// ../../utilities/dom/dist/index.mjs | ||
// ../../utilities/dom/dist/index.js | ||
var dataAttr = (guard) => { | ||
@@ -69,3 +42,3 @@ return guard ? "" : void 0; | ||
// src/hover-card.connect.ts | ||
var import_popper = require("@zag-js/popper"); | ||
import { getPlacementStyles } from "@zag-js/popper"; | ||
@@ -92,3 +65,3 @@ // src/hover-card.dom.ts | ||
const isOpen = state.hasTag("open"); | ||
const popperStyles = (0, import_popper.getPlacementStyles)({ | ||
const popperStyles = getPlacementStyles({ | ||
measured: !!state.context.isPlacementComplete, | ||
@@ -159,8 +132,8 @@ placement: state.context.currentPlacement | ||
// src/hover-card.machine.ts | ||
var import_core = require("@zag-js/core"); | ||
var import_dismissable = require("@zag-js/dismissable"); | ||
var import_popper2 = require("@zag-js/popper"); | ||
var { not } = import_core.guards; | ||
import { createMachine, guards } from "@zag-js/core"; | ||
import { trackDismissableElement } from "@zag-js/dismissable"; | ||
import { getPlacement } from "@zag-js/popper"; | ||
var { not } = guards; | ||
function machine(ctx) { | ||
return (0, import_core.createMachine)( | ||
return createMachine( | ||
{ | ||
@@ -244,3 +217,3 @@ id: "hover-card", | ||
raf(() => { | ||
cleanup = (0, import_popper2.getPlacement)(dom.getTriggerEl(ctx2), dom.getPositionerEl(ctx2), { | ||
cleanup = getPlacement(dom.getTriggerEl(ctx2), dom.getPositionerEl(ctx2), { | ||
...ctx2.positioning, | ||
@@ -262,3 +235,3 @@ onComplete(data) { | ||
raf(() => { | ||
cleanup = (0, import_dismissable.trackDismissableElement)(dom.getContentEl(ctx2), { | ||
cleanup = trackDismissableElement(dom.getContentEl(ctx2), { | ||
exclude: [dom.getTriggerEl(ctx2)], | ||
@@ -301,6 +274,5 @@ onDismiss: () => send({ type: "DISMISS" }), | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
connect, | ||
machine | ||
}); | ||
}; |
{ | ||
"type": "module", | ||
"name": "@zag-js/hover-card", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Core logic for the hover-card widget implemented as a state machine", | ||
@@ -19,3 +20,2 @@ "keywords": [ | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.mjs", | ||
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/hover-card", | ||
@@ -33,14 +33,14 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@zag-js/core": "0.1.10", | ||
"@zag-js/dismissable": "0.1.4", | ||
"@zag-js/popper": "0.1.11", | ||
"@zag-js/types": "0.2.5" | ||
"@zag-js/core": "0.1.11", | ||
"@zag-js/dismissable": "0.1.5", | ||
"@zag-js/popper": "0.1.12", | ||
"@zag-js/types": "0.2.6" | ||
}, | ||
"devDependencies": { | ||
"@zag-js/dom-utils": "0.1.11" | ||
"@zag-js/dom-utils": "0.1.12" | ||
}, | ||
"scripts": { | ||
"build-fast": "tsup src/index.ts --format=esm,cjs", | ||
"build-fast": "tsup src/index.ts --format=esm", | ||
"start": "pnpm build --watch", | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"build": "tsup src/index.ts --format=esm --dts", | ||
"test": "jest --config ../../../jest.config.js --rootDir . --passWithNoTests", | ||
@@ -47,0 +47,0 @@ "lint": "eslint src --ext .ts,.tsx", |
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
Yes
12701
5
322
+ Added@zag-js/core@0.1.11(transitive)
+ Added@zag-js/dismissable@0.1.5(transitive)
+ Added@zag-js/interact-outside@0.1.5(transitive)
+ Added@zag-js/popper@0.1.12(transitive)
+ Added@zag-js/store@0.1.3(transitive)
+ Added@zag-js/types@0.2.6(transitive)
- Removed@zag-js/core@0.1.10(transitive)
- Removed@zag-js/dismissable@0.1.4(transitive)
- Removed@zag-js/interact-outside@0.1.4(transitive)
- Removed@zag-js/popper@0.1.11(transitive)
- Removed@zag-js/store@0.1.2(transitive)
- Removed@zag-js/types@0.2.5(transitive)
Updated@zag-js/core@0.1.11
Updated@zag-js/dismissable@0.1.5
Updated@zag-js/popper@0.1.12
Updated@zag-js/types@0.2.6