data-navigator 2.2.3 → 2.3.0
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/chunk-FP25I6TN.js +1 -0
- package/dist/chunk-RGY6OTGO.js +1 -0
- package/dist/consts.cjs +1 -1
- package/dist/consts.js +1 -1
- package/dist/index.cjs +1823 -1364
- package/dist/index.js +603 -49
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/rendering.cjs +1 -1
- package/dist/rendering.js +1 -1
- package/dist/structure.cjs +1 -1
- package/dist/structure.js +1 -1
- package/dist/text-chat.cjs +21 -0
- package/dist/text-chat.js +21 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.js +1 -1
- package/package.json +5 -3
- package/text-chat.css +98 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as c,f as g}from"./chunk-MPFBSVCV.js";var v=r=>{let n={},u=c,l=g;return n.moveTo=e=>{let t=r.structure.nodes[e];if(t)return t},n.move=(e,t)=>{if(e){let o=r.structure.nodes[e];if(o.edges){let s=null,a=0,d=l[t];if(!d)return;let y=(f,i)=>{if(f!==t)return null;let p={target:typeof i.target=="string"?i.target:i.target(o,e),source:typeof i.source=="string"?i.source:i.source(o,e)};return p[d.direction]!==e?p[d.direction]:null};for(a=0;a<o.edges.length;a++){let f=r.structure.edges[o.edges[a]];if(f.navigationRules.forEach(i=>{s||(s=y(i,f))}),s)break}return s?n.moveTo(s):void 0}}},n.enter=()=>{if(r.entryPoint)return n.moveTo(r.entryPoint);console.error("No entry point was specified in InputOptions, returning undefined")},n.exit=()=>{if(r.exitPoint)return r.exitPoint;console.error("No exit point was specified in InputOptions, returning undefined")},n.keydownValidator=e=>{let t=u[e.code];if(t)return t},n.focus=e=>{let t=document.getElementById(e);t&&t.focus()},n.setNavigationKeyBindings=e=>{e?(u={},l=e,Object.keys(e).forEach(t=>{let o=e[t];u[o.key]=t})):(u=c,l=g)},n.setNavigationKeyBindings(r.navigationRules),n};export{v as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty,n=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var i=(c,b,a)=>b in c?m(c,b,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[b]=a,r=(c,b)=>{for(var a in b||(b={}))p.call(b,a)&&i(c,a,b[a]);if(h)for(var a of h(b))q.call(b,a)&&i(c,a,b[a]);return c},s=(c,b)=>n(c,o(b));var t=(c,b,a)=>new Promise((j,g)=>{var k=d=>{try{e(a.next(d))}catch(f){g(f)}},l=d=>{try{e(a.throw(d))}catch(f){g(f)}},e=d=>d.done?j(d.value):Promise.resolve(d.value).then(k,l);e((a=a.apply(c,b)).next())});export{r as a,s as b,t as c};
|
package/dist/consts.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var s=(r,e)=>{for(var i in e)o(r,i,{get:e[i],enumerable:!0})},l=(r,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of c(e))!d.call(r,t)&&t!==i&&o(r,t,{get:()=>e[t],enumerable:!(a=n(e,t))||a.enumerable});return r};var p=r=>l(o({},"__esModule",{value:!0}),r);var A={};s(A,{GenericFullNavigationDimensions:()=>h,GenericFullNavigationPairs:()=>x,GenericFullNavigationRules:()=>f,GenericLimitedNavigationRules:()=>m,NodeElementDefaults:()=>v,SemanticKeys:()=>u,TypicallyUnreservedKeyPairs:()=>k,TypicallyUnreservedKeys:()=>g,TypicallyUnreservedSoloKeys:()=>w,defaultKeyBindings:()=>y});module.exports=p(A);var u={Escape:!0,Enter:!0,Backspace:!0,ArrowLeft:!0,ArrowRight:!0,ArrowUp:!0,ArrowDown:!0},y={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down",Period:"forward",Comma:"backward",Escape:"parent",Enter:"child"},g=["KeyW","KeyJ","LeftBracket","RightBracket","Slash","Backslash"],w=["KeyW","KeyJ"],k=[["LeftBracket","RightBracket"],["Slash","Backslash"]],f={left:{key:"ArrowLeft",direction:"source"},right:{key:"ArrowRight",direction:"target"},up:{key:"ArrowUp",direction:"source"},down:{key:"ArrowDown",direction:"target"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},backward:{key:"Comma",direction:"source"},forward:{key:"Period",direction:"target"},previous:{key:"Semicolon",direction:"source"},next:{key:"Quote",direction:"target"},exit:{key:"Escape",direction:"target"},help:{key:"KeyY",direction:"target"},undo:{key:"KeyZ",direction:"target"}},h=[["left","right"],["up","down"],["backward","forward"],["previous","next"]],x={left:["left","right"],right:["left","right"],up:["up","down"],down:["up","down"],backward:["backward","forward"],forward:["backward","forward"],previous:["previous","next"],next:["previous","next"],parent:["parent","child"],child:["parent","child"],exit:["exit","undo"],undo:["undo","undo"]},m={right:{key:"ArrowRight",direction:"target"},left:{key:"ArrowLeft",direction:"source"},down:{key:"ArrowDown",direction:"target"},up:{key:"ArrowUp",direction:"source"},child:{key:"Enter",direction:"target"},parent:{key:"Backspace",direction:"source"},exit:{key:"Escape",direction:"target"},undo:{key:"Period",direction:"target"},legend:{key:"KeyL",direction:"target"}},v={cssClass:void 0,spatialProperties:{x:0,y:0,width:0,height:0,path:""},semantics:{label:"",elementType:"div",role:"image",attributes:void 0},parentSemantics:{label:"",elementType:"figure",role:"figure",attributes:void 0},existingElement:{useForSpatialProperties:!1,spatialProperties:void 0}};0&&(module.exports={GenericFullNavigationDimensions,GenericFullNavigationPairs,GenericFullNavigationRules,GenericLimitedNavigationRules,NodeElementDefaults,SemanticKeys,TypicallyUnreservedKeyPairs,TypicallyUnreservedKeys,TypicallyUnreservedSoloKeys,defaultKeyBindings});
|
package/dist/consts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-MPFBSVCV.js";export{g as GenericFullNavigationDimensions,h as GenericFullNavigationPairs,f as GenericFullNavigationRules,i as GenericLimitedNavigationRules,j as NodeElementDefaults,a as SemanticKeys,e as TypicallyUnreservedKeyPairs,c as TypicallyUnreservedKeys,d as TypicallyUnreservedSoloKeys,b as defaultKeyBindings};
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-MPFBSVCV.js";import"./chunk-RGY6OTGO.js";export{g as GenericFullNavigationDimensions,h as GenericFullNavigationPairs,f as GenericFullNavigationRules,i as GenericLimitedNavigationRules,j as NodeElementDefaults,a as SemanticKeys,e as TypicallyUnreservedKeyPairs,c as TypicallyUnreservedKeys,d as TypicallyUnreservedSoloKeys,b as defaultKeyBindings};
|