@zag-js/editable
Advanced tools
Comparing version 0.1.3 to 0.1.4
import type { MachineContext as Ctx } from "./editable.types"; | ||
export declare const dom: { | ||
getDoc: (ctx: Ctx) => Document; | ||
getRootNode: (ctx: Ctx) => Document | ShadowRoot; | ||
getRootId: (ctx: Ctx) => string; | ||
@@ -5,0 +6,0 @@ getAreaId: (ctx: Ctx) => string; |
@@ -49,3 +49,3 @@ var __defProp = Object.defineProperty; | ||
var ariaAttr = (guard) => { | ||
return guard ? true : void 0; | ||
return guard ? "true" : void 0; | ||
}; | ||
@@ -210,2 +210,6 @@ function raf(fn) { | ||
}, | ||
getRootNode: (ctx) => { | ||
var _a; | ||
return (_a = ctx.rootNode) != null ? _a : dom.getDoc(ctx); | ||
}, | ||
getRootId: (ctx) => { | ||
@@ -247,7 +251,7 @@ var _a, _b; | ||
}, | ||
getInputEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getInputId(ctx)), | ||
getPreviewEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getPreviewId(ctx)), | ||
getSubmitBtnEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getSubmitBtnId(ctx)), | ||
getCancelBtnEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getCancelBtnId(ctx)), | ||
getEditBtnEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getEditBtnId(ctx)) | ||
getInputEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getInputId(ctx)), | ||
getPreviewEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getPreviewId(ctx)), | ||
getSubmitBtnEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getSubmitBtnId(ctx)), | ||
getCancelBtnEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getCancelBtnId(ctx)), | ||
getEditBtnEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getEditBtnId(ctx)) | ||
}; | ||
@@ -563,2 +567,4 @@ | ||
ctx2.doc = (0, import_core.ref)(evt.doc); | ||
if (evt.root) | ||
ctx2.rootNode = (0, import_core.ref)(evt.root); | ||
ctx2.uid = evt.id; | ||
@@ -565,0 +571,0 @@ }, |
{ | ||
"name": "@zag-js/editable", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Core logic for the editable widget implemented as a state machine", | ||
@@ -32,5 +32,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/core": "0.1.3", | ||
"@zag-js/core": "0.1.4", | ||
"@zag-js/dom-utils": "0.1.1", | ||
"@zag-js/types": "0.1.0" | ||
"@zag-js/types": "0.1.1" | ||
}, | ||
@@ -37,0 +37,0 @@ "scripts": { |
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
Sorry, the diff of this file is not supported yet
211668
1405
+ Added@zag-js/core@0.1.4(transitive)
+ Added@zag-js/types@0.1.1(transitive)
- Removed@zag-js/core@0.1.3(transitive)
- Removed@zag-js/types@0.1.0(transitive)
Updated@zag-js/core@0.1.4
Updated@zag-js/types@0.1.1