@zag-js/editable
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1,3 +0,3 @@ | ||
import type { UserDefinedContext, MachineContext, MachineState } from "./editable.types"; | ||
import type { MachineContext, MachineState, UserDefinedContext } from "./editable.types"; | ||
export declare function machine(ctx?: UserDefinedContext): import("@zag-js/core").Machine<MachineContext, MachineState, import("@zag-js/core").StateMachine.AnyEventObject>; | ||
//# sourceMappingURL=editable.machine.d.ts.map |
@@ -51,13 +51,6 @@ var __defProp = Object.defineProperty; | ||
}; | ||
function nextTick(fn) { | ||
const set = /* @__PURE__ */ new Set(); | ||
function raf2(fn2) { | ||
const id = globalThis.requestAnimationFrame(fn2); | ||
set.add(() => globalThis.cancelAnimationFrame(id)); | ||
} | ||
raf2(() => raf2(fn)); | ||
function raf(fn) { | ||
const id = globalThis.requestAnimationFrame(fn); | ||
return function cleanup() { | ||
set.forEach(function(fn2) { | ||
fn2(); | ||
}); | ||
globalThis.cancelAnimationFrame(id); | ||
}; | ||
@@ -519,3 +512,3 @@ } | ||
focusEditButton(ctx2) { | ||
nextTick(() => { | ||
raf(() => { | ||
var _a; | ||
@@ -526,3 +519,3 @@ (_a = dom.getEditBtnEl(ctx2)) == null ? void 0 : _a.focus(); | ||
focusInput(ctx2) { | ||
nextTick(() => { | ||
raf(() => { | ||
const input = dom.getInputEl(ctx2); | ||
@@ -529,0 +522,0 @@ if (!input) |
{ | ||
"name": "@zag-js/editable", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Core logic for the editable widget implemented as a state machine", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/core": "0.1.1", | ||
"@zag-js/core": "0.1.2", | ||
"@zag-js/dom-utils": "0.1.0", | ||
@@ -35,0 +35,0 @@ "@zag-js/types": "0.1.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
201053
1288
+ Added@zag-js/core@0.1.2(transitive)
- Removed@zag-js/core@0.1.1(transitive)
Updated@zag-js/core@0.1.2