@nqlib/nqui 0.6.0 → 0.6.1

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.
Files changed (32) hide show
  1. package/dist/{command-palette-DhoWGyk_.js → command-palette-CHUiGh5m.js} +2 -2
  2. package/dist/{command-palette-D24rOeE6.cjs → command-palette-DsvP2QNP.cjs} +2 -2
  3. package/dist/command.cjs.js +1 -1
  4. package/dist/command.es.js +1 -1
  5. package/dist/components/custom/table-of-contents.d.ts +2 -2
  6. package/dist/components/custom/table-of-contents.d.ts.map +1 -1
  7. package/dist/components/ui/combobox.d.ts +5 -3
  8. package/dist/components/ui/combobox.d.ts.map +1 -1
  9. package/dist/{debug-panel-BjfW-YVo.js → debug-panel-BcYzsTp2.js} +1 -1
  10. package/dist/{debug-panel-CpqsKuxd.cjs → debug-panel-mwtujy5J.cjs} +1 -1
  11. package/dist/debug.cjs.js +1 -1
  12. package/dist/debug.es.js +1 -1
  13. package/dist/{input-shared-CDgy_NdJ.cjs → input-shared-C9Try5fg.cjs} +1 -1
  14. package/dist/{input-shared-NnOiyHpu.js → input-shared-DXf3Edqt.js} +1 -1
  15. package/dist/lib/floating-surface.d.ts +6 -2
  16. package/dist/lib/floating-surface.d.ts.map +1 -1
  17. package/dist/nqui.cjs.js +10 -10
  18. package/dist/nqui.es.js +17 -16
  19. package/dist/styles.css +9 -9
  20. package/docs/components/README.md +2 -0
  21. package/docs/components/nqui-combobox.md +15 -2
  22. package/docs/components/nqui-command-palette.md +7 -0
  23. package/docs/components/nqui-command.md +41 -0
  24. package/docs/nqui-skills/ELEVATION.md +33 -6
  25. package/docs/nqui-skills/RECIPES.md +85 -0
  26. package/docs/nqui-skills/_claude-commands/README.md +50 -0
  27. package/docs/nqui-skills/_claude-commands/design/SKILL.md +111 -0
  28. package/docs/nqui-skills/_claude-commands/edit/SKILL.md +97 -0
  29. package/docs/nqui-skills/nqui-components/SKILL.md +1 -0
  30. package/package.json +1 -1
  31. package/scripts/build-styles.js +4 -3
  32. package/scripts/install-claude-skills.js +46 -7
package/dist/debug.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug-panel-CpqsKuxd.cjs");exports.Crosshair=e.Crosshair;exports.DebugPanel=e.DebugPanel;exports.Magnifier=e.Magnifier;exports.UITester=e.UITester;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug-panel-mwtujy5J.cjs");exports.Crosshair=e.Crosshair;exports.DebugPanel=e.DebugPanel;exports.Magnifier=e.Magnifier;exports.UITester=e.UITester;
package/dist/debug.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e, D as r, M as i, U as o } from "./debug-panel-BjfW-YVo.js";
1
+ import { C as e, D as r, M as i, U as o } from "./debug-panel-BcYzsTp2.js";
2
2
  export {
3
3
  e as Crosshair,
4
4
  r as DebugPanel,
@@ -38,4 +38,4 @@
38
38
  `)},me=function(){var e=parseInt(document.body.getAttribute(D)||"0",10);return isFinite(e)?e:0},Bt=function(){a.useEffect(function(){return document.body.setAttribute(D,(me()+1).toString()),function(){var e=me()-1;e<=0?document.body.removeAttribute(D):document.body.setAttribute(D,e.toString())}},[])},Ut=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Bt();var i=a.useMemo(function(){return Ft(o)},[o]);return a.createElement(Wt,{styles:_t(i,!t,o,n?"":"!important")})},re=!1;if(typeof window<"u")try{var j=Object.defineProperty({},"passive",{get:function(){return re=!0,!0}});window.addEventListener("test",j,j),window.removeEventListener("test",j,j)}catch{re=!1}var L=re?{passive:!1}:!1,jt=function(e){return e.tagName==="TEXTAREA"},Ie=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jt(e)&&n[t]==="visible")},Ht=function(e){return Ie(e,"overflowY")},$t=function(e){return Ie(e,"overflowX")},he=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ke(e,r);if(o){var i=Fe(e,r),u=i[1],c=i[2];if(u>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Kt=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Vt=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ke=function(e,t){return e==="v"?Ht(t):$t(t)},Fe=function(e,t){return e==="v"?Kt(t):Vt(t)},Xt=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yt=function(e,t,n,r,o){var i=Xt(e,window.getComputedStyle(t).direction),u=i*r,c=n.target,v=t.contains(c),l=!1,d=u>0,f=0,m=0;do{if(!c)break;var p=Fe(e,c),w=p[0],s=p[1],h=p[2],g=s-h-i*w;(w||g)&&ke(e,c)&&(f+=g,m+=w);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!v&&c!==document.body||v&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(l=!0),l},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pe=function(e){return[e.deltaX,e.deltaY]},ge=function(e){return e&&"current"in e?e.current:e},zt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qt=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Gt=0,x=[];function Zt(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Gt++)[0],i=a.useState(De)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var s=yt([e.lockRef.current],(e.shards||[]).map(ge),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(s,h){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!u.current.allowPinchZoom;var g=H(s),E=n.current,b="deltaX"in s?s.deltaX:E[0]-g[0],S="deltaY"in s?s.deltaY:E[1]-g[1],C,P=s.target,y=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in s&&y==="h"&&P.type==="range")return!1;var N=window.getSelection(),A=N&&N.anchorNode,F=A?A===P||A.contains(P):!1;if(F)return!1;var B=he(y,P);if(!B)return!0;if(B?C=y:(C=y==="v"?"h":"v",B=he(y,P)),!B)return!1;if(!r.current&&"changedTouches"in s&&(b||S)&&(r.current=C),!C)return!0;var oe=r.current||C;return Yt(oe,h,s,oe==="h"?b:S)},[]),v=a.useCallback(function(s){var h=s;if(!(!x.length||x[x.length-1]!==i)){var g="deltaY"in h?pe(h):H(h),E=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&zt(C.delta,g)})[0];if(E&&E.should){h.cancelable&&h.preventDefault();return}if(!E){var b=(u.current.shards||[]).map(ge).filter(Boolean).filter(function(C){return C.contains(h.target)}),S=b.length>0?c(h,b[0]):!u.current.noIsolation;S&&h.cancelable&&h.preventDefault()}}},[]),l=a.useCallback(function(s,h,g,E){var b={name:s,delta:h,target:g,should:E,shadowParent:Qt(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=a.useCallback(function(s){n.current=H(s),r.current=void 0},[]),f=a.useCallback(function(s){l(s.type,pe(s),s.target,c(s,e.lockRef.current))},[]),m=a.useCallback(function(s){l(s.type,H(s),s.target,c(s,e.lockRef.current))},[]);a.useEffect(function(){return x.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",v,L),document.addEventListener("touchmove",v,L),document.addEventListener("touchstart",d,L),function(){x=x.filter(function(s){return s!==i}),document.removeEventListener("wheel",v,L),document.removeEventListener("touchmove",v,L),document.removeEventListener("touchstart",d,L)}},[]);var p=e.removeScrollBar,w=e.inert;return a.createElement(a.Fragment,null,w?a.createElement(i,{styles:qt(o)}):null,p?a.createElement(Ut,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jt=Nt(Me,Zt);var We=a.forwardRef(function(e,t){return a.createElement(z,R({},e,{ref:t,sideCar:Jt}))});We.classNames=z.classNames;var en=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,$=new WeakMap,K={},te=0,_e=function(e){return e&&(e.host||_e(e.parentNode))},tn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=_e(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nn=function(e,t,n,r){var o=tn(t,Array.isArray(e)?e:[e]);K[n]||(K[n]=new WeakMap);var i=K[n],u=[],c=new Set,v=new Set(o),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||v.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))d(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",s=(M.get(m)||0)+1,h=(i.get(m)||0)+1;M.set(m,s),i.set(m,h),u.push(m),s===1&&w&&$.set(m,!0),h===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),c.clear(),te++,function(){u.forEach(function(f){var m=M.get(f)-1,p=i.get(f)-1;M.set(f,m),i.set(f,p),m||($.has(f)||f.removeAttribute(r),$.delete(f)),p||f.removeAttribute(n)}),te--,te||(M=new WeakMap,M=new WeakMap,$=new WeakMap,K={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=en(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),nn(r,o,n,"aria-hidden")):function(){return null}};const on="rounded-lg border border-border bg-popover text-popover-foreground shadow-sm",an="rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-selected:bg-accent data-selected:text-accent-foreground data-selected:*:[svg]:text-accent-foreground",cn="w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]",sn="h-7";exports.DismissableLayer=Re;exports.FocusScope=Ne;exports.Portal=Ae;exports.Presence=Ce;exports.Primitive=W;exports.ReactRemoveScroll=We;exports.composeEventHandlers=V;exports.composeRefs=we;exports.createContext2=He;exports.createContextScope=$e;exports.dispatchDiscreteCustomEvent=Se;exports.floatingListItemInteractive=an;exports.floatingSurface=on;exports.hideOthers=rn;exports.inputFieldShellBase=cn;exports.inputFieldSingleRowHeight=sn;exports.useCallbackRef=k;exports.useComposedRefs=_;exports.useControllableState=Xe;exports.useFocusGuards=gt;exports.useId=et;exports.useLayoutEffect2=I;
41
+ `)},Gt=0,x=[];function Zt(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Gt++)[0],i=a.useState(De)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var s=yt([e.lockRef.current],(e.shards||[]).map(ge),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(s,h){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!u.current.allowPinchZoom;var g=H(s),E=n.current,b="deltaX"in s?s.deltaX:E[0]-g[0],S="deltaY"in s?s.deltaY:E[1]-g[1],C,P=s.target,y=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in s&&y==="h"&&P.type==="range")return!1;var N=window.getSelection(),A=N&&N.anchorNode,F=A?A===P||A.contains(P):!1;if(F)return!1;var B=he(y,P);if(!B)return!0;if(B?C=y:(C=y==="v"?"h":"v",B=he(y,P)),!B)return!1;if(!r.current&&"changedTouches"in s&&(b||S)&&(r.current=C),!C)return!0;var oe=r.current||C;return Yt(oe,h,s,oe==="h"?b:S)},[]),v=a.useCallback(function(s){var h=s;if(!(!x.length||x[x.length-1]!==i)){var g="deltaY"in h?pe(h):H(h),E=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&zt(C.delta,g)})[0];if(E&&E.should){h.cancelable&&h.preventDefault();return}if(!E){var b=(u.current.shards||[]).map(ge).filter(Boolean).filter(function(C){return C.contains(h.target)}),S=b.length>0?c(h,b[0]):!u.current.noIsolation;S&&h.cancelable&&h.preventDefault()}}},[]),l=a.useCallback(function(s,h,g,E){var b={name:s,delta:h,target:g,should:E,shadowParent:Qt(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=a.useCallback(function(s){n.current=H(s),r.current=void 0},[]),f=a.useCallback(function(s){l(s.type,pe(s),s.target,c(s,e.lockRef.current))},[]),m=a.useCallback(function(s){l(s.type,H(s),s.target,c(s,e.lockRef.current))},[]);a.useEffect(function(){return x.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",v,L),document.addEventListener("touchmove",v,L),document.addEventListener("touchstart",d,L),function(){x=x.filter(function(s){return s!==i}),document.removeEventListener("wheel",v,L),document.removeEventListener("touchmove",v,L),document.removeEventListener("touchstart",d,L)}},[]);var p=e.removeScrollBar,w=e.inert;return a.createElement(a.Fragment,null,w?a.createElement(i,{styles:qt(o)}):null,p?a.createElement(Ut,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jt=Nt(Me,Zt);var We=a.forwardRef(function(e,t){return a.createElement(z,R({},e,{ref:t,sideCar:Jt}))});We.classNames=z.classNames;var en=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,$=new WeakMap,K={},te=0,_e=function(e){return e&&(e.host||_e(e.parentNode))},tn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=_e(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nn=function(e,t,n,r){var o=tn(t,Array.isArray(e)?e:[e]);K[n]||(K[n]=new WeakMap);var i=K[n],u=[],c=new Set,v=new Set(o),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||v.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))d(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",s=(M.get(m)||0)+1,h=(i.get(m)||0)+1;M.set(m,s),i.set(m,h),u.push(m),s===1&&w&&$.set(m,!0),h===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),c.clear(),te++,function(){u.forEach(function(f){var m=M.get(f)-1,p=i.get(f)-1;M.set(f,m),i.set(f,p),m||($.has(f)||f.removeAttribute(r),$.delete(f)),p||f.removeAttribute(n)}),te--,te||(M=new WeakMap,M=new WeakMap,$=new WeakMap,K={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=en(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),nn(r,o,n,"aria-hidden")):function(){return null}};const on="rounded-lg border border-border bg-popover text-popover-foreground shadow-sm",an="rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground",cn="w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]",sn="h-7";exports.DismissableLayer=Re;exports.FocusScope=Ne;exports.Portal=Ae;exports.Presence=Ce;exports.Primitive=W;exports.ReactRemoveScroll=We;exports.composeEventHandlers=V;exports.composeRefs=we;exports.createContext2=He;exports.createContextScope=$e;exports.dispatchDiscreteCustomEvent=Se;exports.floatingListItemInteractive=an;exports.floatingSurface=on;exports.hideOthers=rn;exports.inputFieldShellBase=cn;exports.inputFieldSingleRowHeight=sn;exports.useCallbackRef=k;exports.useComposedRefs=_;exports.useControllableState=Xe;exports.useFocusGuards=gt;exports.useId=et;exports.useLayoutEffect2=I;
@@ -1047,7 +1047,7 @@ var zt = function(e) {
1047
1047
  return null;
1048
1048
  };
1049
1049
  };
1050
- const sn = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm", un = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-selected:bg-accent data-selected:text-accent-foreground data-selected:*:[svg]:text-accent-foreground", ln = "w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]", dn = "h-7";
1050
+ const sn = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm", un = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground", ln = "w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]", dn = "h-7";
1051
1051
  export {
1052
1052
  Ze as D,
1053
1053
  nt as F,
@@ -3,8 +3,12 @@
3
3
  */
4
4
  export declare const floatingSurface = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm";
5
5
  /**
6
- * List row: keyboard focus, pointer highlight (Radix), and cmdk `data-selected` on [cmdk-item].
6
+ * List row: keyboard focus, pointer highlight (Radix), and cmdk selection on [cmdk-item].
7
7
  * Muted is reserved for labels, shortcuts, empty copy — not selected rows.
8
+ *
9
+ * Use aria-selected (not data-selected) for cmdk highlight: React 19 renders
10
+ * data-selected="false" on unselected rows, and data-selected:bg-accent compiles
11
+ * to [data-selected], which matches every row.
8
12
  */
9
- export declare const floatingListItemInteractive = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-selected:bg-accent data-selected:text-accent-foreground data-selected:*:[svg]:text-accent-foreground";
13
+ export declare const floatingListItemInteractive = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground";
10
14
  //# sourceMappingURL=floating-surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"floating-surface.d.ts","sourceRoot":"","sources":["../../src/lib/floating-surface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,iFACoD,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,0PACiN,CAAA"}
1
+ {"version":3,"file":"floating-surface.d.ts","sourceRoot":"","sources":["../../src/lib/floating-surface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,iFACoD,CAAA;AAEhF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,0PACiN,CAAA"}