@zag-js/tooltip 0.0.0-dev-20220709181637 → 0.0.0-dev-20220712092426
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/index.js +3 -8
- package/dist/index.mjs +3 -8
- package/dist/tooltip.dom.d.ts +3 -0
- package/package.json +8 -5
package/dist/index.js
CHANGED
|
@@ -136,7 +136,8 @@ function defineDomHelpers(domUtils) {
|
|
|
136
136
|
var _a;
|
|
137
137
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
138
138
|
},
|
|
139
|
-
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
139
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
|
|
140
|
+
getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
|
|
140
141
|
};
|
|
141
142
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
142
143
|
}
|
|
@@ -403,12 +404,6 @@ function connect(state, send, normalize) {
|
|
|
403
404
|
// src/tooltip.machine.ts
|
|
404
405
|
var import_core2 = require("@zag-js/core");
|
|
405
406
|
var import_popper2 = require("@zag-js/popper");
|
|
406
|
-
|
|
407
|
-
// ../../utilities/core/dist/index.mjs
|
|
408
|
-
var noop = () => {
|
|
409
|
-
};
|
|
410
|
-
|
|
411
|
-
// src/tooltip.machine.ts
|
|
412
407
|
function machine(ctx) {
|
|
413
408
|
return (0, import_core2.createMachine)({
|
|
414
409
|
id: "tooltip",
|
|
@@ -563,7 +558,7 @@ function machine(ctx) {
|
|
|
563
558
|
},
|
|
564
559
|
trackDisabledTriggerOnSafari(ctx2, _evt, { send }) {
|
|
565
560
|
if (!isSafari())
|
|
566
|
-
return
|
|
561
|
+
return;
|
|
567
562
|
const doc = dom.getDoc(ctx2);
|
|
568
563
|
return addPointerEvent(doc, "pointermove", (event) => {
|
|
569
564
|
const selector = "[data-part=trigger][data-expanded]";
|
package/dist/index.mjs
CHANGED
|
@@ -112,7 +112,8 @@ function defineDomHelpers(domUtils) {
|
|
|
112
112
|
var _a;
|
|
113
113
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
114
114
|
},
|
|
115
|
-
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
115
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement,
|
|
116
|
+
getById: (ctx, id) => roots.getRootNode(ctx).getElementById(id)
|
|
116
117
|
};
|
|
117
118
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
118
119
|
}
|
|
@@ -379,12 +380,6 @@ function connect(state, send, normalize) {
|
|
|
379
380
|
// src/tooltip.machine.ts
|
|
380
381
|
import { createMachine, ref, subscribe } from "@zag-js/core";
|
|
381
382
|
import { getPlacement } from "@zag-js/popper";
|
|
382
|
-
|
|
383
|
-
// ../../utilities/core/dist/index.mjs
|
|
384
|
-
var noop = () => {
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
// src/tooltip.machine.ts
|
|
388
383
|
function machine(ctx) {
|
|
389
384
|
return createMachine({
|
|
390
385
|
id: "tooltip",
|
|
@@ -539,7 +534,7 @@ function machine(ctx) {
|
|
|
539
534
|
},
|
|
540
535
|
trackDisabledTriggerOnSafari(ctx2, _evt, { send }) {
|
|
541
536
|
if (!isSafari())
|
|
542
|
-
return
|
|
537
|
+
return;
|
|
543
538
|
const doc = dom.getDoc(ctx2);
|
|
544
539
|
return addPointerEvent(doc, "pointermove", (event) => {
|
|
545
540
|
const selector = "[data-part=trigger][data-expanded]";
|
package/dist/tooltip.dom.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ export declare const dom: {
|
|
|
12
12
|
getActiveElement: (ctx: {
|
|
13
13
|
getRootNode?: () => Document | Node | ShadowRoot;
|
|
14
14
|
}) => HTMLElement;
|
|
15
|
+
getById: (ctx: {
|
|
16
|
+
getRootNode?: () => Document | Node | ShadowRoot;
|
|
17
|
+
}, id: string) => HTMLElement;
|
|
15
18
|
} & {
|
|
16
19
|
getTriggerId: (ctx: Ctx) => string;
|
|
17
20
|
getContentId: (ctx: Ctx) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tooltip",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220712092426",
|
|
4
4
|
"description": "Core logic for the tooltip widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,10 +29,13 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.
|
|
33
|
-
"@zag-js/
|
|
34
|
-
"@zag-js/
|
|
35
|
-
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20220712092426",
|
|
33
|
+
"@zag-js/popper": "0.0.0-dev-20220712092426",
|
|
34
|
+
"@zag-js/types": "0.0.0-dev-20220712092426"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220712092426",
|
|
38
|
+
"@zag-js/utils": "0.1.2"
|
|
36
39
|
},
|
|
37
40
|
"scripts": {
|
|
38
41
|
"build:fast": "zag build",
|