@nqlib/nqui 0.4.8 → 0.5.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.
Files changed (62) hide show
  1. package/dist/{button-CJHdCq9I.js → button-BrroJ39H.js} +35 -34
  2. package/dist/button-CrLihxcE.cjs +1 -0
  3. package/dist/calendar.cjs.js +1 -1
  4. package/dist/calendar.es.js +1 -1
  5. package/dist/{carousel-U7RZhYZj.js → carousel-C976t5jo.js} +1 -1
  6. package/dist/{carousel-D1FMVglR.cjs → carousel-VldrniuT.cjs} +1 -1
  7. package/dist/carousel.cjs.js +1 -1
  8. package/dist/carousel.es.js +1 -1
  9. package/dist/{command-palette-D_SFxXyQ.js → command-palette-2V1VSlOM.js} +1 -1
  10. package/dist/{command-palette-DSQYbRiH.cjs → command-palette-4Sv4QjZ2.cjs} +1 -1
  11. package/dist/command.cjs.js +1 -1
  12. package/dist/command.es.js +1 -1
  13. package/dist/components/custom/enhanced-tabs.d.ts +1 -0
  14. package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
  15. package/dist/components/ui/button.d.ts +4 -0
  16. package/dist/components/ui/button.d.ts.map +1 -1
  17. package/dist/components/ui/card.d.ts +1 -0
  18. package/dist/components/ui/card.d.ts.map +1 -1
  19. package/dist/components/ui/sonner.d.ts.map +1 -1
  20. package/dist/components/ui/tabs.d.ts +6 -4
  21. package/dist/components/ui/tabs.d.ts.map +1 -1
  22. package/dist/{debug-panel-CS_wuYVH.js → debug-panel-BnZDhlaR.js} +1621 -1749
  23. package/dist/{debug-panel-nDTrIh9s.cjs → debug-panel-R2ZLkucO.cjs} +10 -10
  24. package/dist/debug.cjs.js +1 -1
  25. package/dist/debug.es.js +1 -1
  26. package/dist/{enhanced-calendar-C7EQIr6i.cjs → enhanced-calendar-BEIfybRx.cjs} +1 -1
  27. package/dist/{enhanced-calendar-BGlsSYJd.js → enhanced-calendar-Cj-4xhqf.js} +1 -1
  28. package/dist/hooks/use-resolved-theme.d.ts +3 -4
  29. package/dist/hooks/use-resolved-theme.d.ts.map +1 -1
  30. package/dist/nqui.cjs.js +3 -23
  31. package/dist/nqui.es.js +605 -627
  32. package/dist/{sonner-nE9hIalJ.cjs → sonner-CEx2-yKh.cjs} +2 -2
  33. package/dist/{sonner-CpmECDBk.js → sonner-FXwPWWq8.js} +24 -24
  34. package/dist/sonner.cjs.js +1 -1
  35. package/dist/sonner.es.js +1 -1
  36. package/dist/styles.css +40 -80
  37. package/docs/components/README.md +11 -2
  38. package/docs/components/nqui-scroll-area.md +74 -0
  39. package/docs/components/nqui-tooltip.md +17 -2
  40. package/docs/nqui-skills/COMPONENTS_INDEX.md +48 -0
  41. package/docs/nqui-skills/HUMAN_GUIDE.md +21 -0
  42. package/docs/nqui-skills/README.md +20 -0
  43. package/docs/nqui-skills/SKILL.md +36 -89
  44. package/docs/nqui-skills/nqui-bundle-size-best-practices/SKILL.md +78 -0
  45. package/docs/nqui-skills/nqui-components/SKILL.md +101 -0
  46. package/docs/nqui-skills/{design-system.md → nqui-design-system/SKILL.md} +53 -25
  47. package/docs/nqui-skills/nqui-install/SKILL.md +65 -0
  48. package/docs/nqui-skills/nqui-local-published-toggle/SKILL.md +132 -0
  49. package/docs/nqui-skills/nqui-local-published-toggle/scripts/toggle-nqui.js +203 -0
  50. package/docs/nqui-skills/nqui-shadcn/SKILL.md +164 -0
  51. package/docs/nqui-skills/{rules → nqui-shadcn/rules}/forms.md +3 -3
  52. package/docs/nqui-skills/{rules → nqui-shadcn/rules}/styling.md +1 -1
  53. package/package.json +1 -1
  54. package/scripts/download-skills.js +28 -8
  55. package/scripts/examples/nextjs-layout-sidebar.tsx +3 -2
  56. package/scripts/examples/nextjs-layout.tsx +3 -2
  57. package/scripts/examples/vite-main.tsx +7 -1
  58. package/scripts/init-cursor.js +4 -3
  59. package/scripts/skill-templates.js +16 -6
  60. package/dist/button-R304rhsj.cjs +0 -1
  61. /package/docs/nqui-skills/{rules → nqui-shadcn/rules}/composition.md +0 -0
  62. /package/docs/nqui-skills/{rules → nqui-shadcn/rules}/icons.md +0 -0
@@ -114,9 +114,10 @@ If user hasn't run init-css, suggest: \`npx @nqlib/nqui init-css\` then add the
114
114
  ## Skills (load for install or component questions)
115
115
 
116
116
  - **Install/setup:** Load \`.cursor/skills/nqui-install/SKILL.md\` — commands to execute
117
- - **Components:** Load \`.cursor/skills/nqui-components/SKILL.md\` — points to \`node_modules/@nqlib/nqui/docs/components/\`
117
+ - **Components:** Load \`.cursor/skills/nqui-components/SKILL.md\` — routing for per-component docs
118
+ - **After \`init-skills\`:** \`.cursor/nqui-skills/COMPONENTS_INDEX.md\` then **one** file under \`.cursor/nqui-skills/components/nqui-<name>.md\`
118
119
 
119
- For any component question, read from \`node_modules/@nqlib/nqui/docs/components/README.md\` (index) then \`nqui-<name>.md\` (specific component).
120
+ Fallback (no init-skills): \`node_modules/@nqlib/nqui/docs/components/README.md\` (index, skim sections) then \`nqui-<name>.md\`.
120
121
  `;
121
122
  }
122
123
 
@@ -168,7 +169,7 @@ function main() {
168
169
  ${displayPath}/.cursor/nqui-skills/
169
170
  ${displayPath}/AGENTS.md
170
171
 
171
- Open this folder in Cursor for skills to work. Docs: node_modules/@nqlib/nqui/docs/components/
172
+ Open this folder in Cursor for skills to work. Per-component docs: .cursor/nqui-skills/components/ (after init-skills) or node_modules/@nqlib/nqui/docs/components/
172
173
  `);
173
174
  }
174
175
 
@@ -74,7 +74,16 @@ description: Component implementation for nqui. Use when building UI with @nqlib
74
74
 
75
75
  **Action:** Read from the docs path before implementing. Do not guess – the docs have exact import, props, and examples.
76
76
 
77
- ## Documentation path (always use this)
77
+ ## Prefer local copy (after \`npx @nqlib/nqui init-skills\`)
78
+
79
+ Token-efficient order:
80
+
81
+ 1. \`.cursor/nqui-skills/HUMAN_GUIDE.md\` — task → docs (forms, toolbar, empty state, …)
82
+ 2. \`.cursor/nqui-skills/COMPONENTS_INDEX.md\` — which single \`nqui-*.md\` to open
83
+ 3. \`.cursor/nqui-skills/components/nqui-<kebab>.md\` — **one** component at a time
84
+ 4. \`.cursor/nqui-skills/components/README.md\` — full index (large; use sections only)
85
+
86
+ ## Fallback (npm only, or before init-skills)
78
87
 
79
88
  \`\`\`
80
89
  ${DOCS_PATH}/
@@ -84,12 +93,13 @@ ${DOCS_PATH}/
84
93
 
85
94
  | User asks | File to read |
86
95
  |-----------|--------------|
87
- | Component index, use cases, which component for X | \`${DOCS_PATH}/README.md\` |
88
- | How to use Button | \`${DOCS_PATH}/nqui-button.md\` |
89
- | How to use ToggleGroup | \`${DOCS_PATH}/nqui-toggle-group.md\` |
90
- | Any component X | \`${DOCS_PATH}/nqui-<kebab-name>.md\` (e.g. nqui-data-table.md) |
96
+ | Which doc file for component X | \`.cursor/nqui-skills/COMPONENTS_INDEX.md\` (after init-skills) or \`${DOCS_PATH}/\` + \`nqui-<kebab>.md\` |
97
+ | Component index, use cases, which component for X | \`README.md\` in the paths above (skim sections) |
98
+ | How to use Button | \`nqui-button.md\` (same folder) |
99
+ | How to use ToggleGroup | \`nqui-toggle-group.md\` |
100
+ | Any component X | \`nqui-<kebab-name>.md\` (e.g. nqui-data-table.md) |
91
101
 
92
- **Rule:** For any component question, read the doc first. The docs have import, variants, props, and examples.
102
+ **Rule:** Open **one** per-component doc unless you need cross-component context. For any component question, read the doc first import, variants, props, and examples.
93
103
 
94
104
  ## Quick rules (details in README.md)
95
105
 
@@ -1 +0,0 @@
1
- "use strict";const i=require("react/jsx-runtime"),w=require("react"),l=require("@radix-ui/react-slot"),g=require("class-variance-authority"),f=require("./utils-IjLH3w2e.cjs");function _(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const o=_(w);function d(r){return o.Children.map(r,(e,t)=>{if(e===null||e===!1)return e;if(typeof e=="string"||typeof e=="number")return i.jsx("span",{className:"min-w-0 shrink truncate",children:e},`nqui-inline-lbl-${t}`);if(o.isValidElement(e)&&e.type===o.Fragment){const{children:n}=e.props;return i.jsx(o.Fragment,{children:d(n)},`nqui-inline-fr-${t}`)}return e})}const p=g.cva("inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 min-w-7 px-3",sm:"h-6 min-w-6 px-2 text-xs",lg:"h-8 min-w-8 px-4",icon:"h-7 w-7 p-0"}},defaultVariants:{variant:"default",size:"default"}}),u=o.forwardRef(({className:r,variant:e,size:t,asChild:n=!1,children:s,...a},c)=>{const b=n?l.Slot:"button";return i.jsx(b,{className:f.cn(p({variant:e,size:t,className:r})),ref:c,...a,children:d(s)})});u.displayName="Button";const v=g.cva("inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium leading-normal text-center cursor-pointer select-none touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-in-out focus:outline-0 focus-visible:outline-0 disabled:pointer-events-none disabled:opacity-65 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:["bg-primary text-primary-foreground border border-primary","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-primary/90 hover:border-primary/90","focus:bg-primary/80 focus:border-primary/80","active:bg-primary/75 active:border-primary/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],destructive:["bg-destructive text-destructive-foreground border border-destructive","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-destructive/90 hover:border-destructive/90","focus:bg-destructive/80 focus:border-destructive/80","active:bg-destructive/75 active:border-destructive/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],secondary:["bg-secondary text-secondary-foreground border border-border","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-secondary/90 hover:border-border","focus:bg-secondary/80 focus:border-border","active:bg-secondary/75 active:border-border active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],success:["bg-success text-success-foreground border border-success","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-success/90 hover:border-success/90","focus:bg-success/80 focus:border-success/80","active:bg-success/75 active:border-success/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],warning:["bg-warning text-warning-foreground border border-warning","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-warning/90 hover:border-warning/90","focus:bg-warning/80 focus:border-warning/80","active:bg-warning/75 active:border-warning/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],info:["bg-info text-info-foreground border border-info","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-info/90 hover:border-info/90","focus:bg-info/80 focus:border-info/80","active:bg-info/75 active:border-info/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 min-w-7 px-3",sm:"h-6 min-w-6 px-2 text-xs",lg:"h-8 min-w-8 px-4",icon:"h-7 w-7 p-0"}},defaultVariants:{variant:"default",size:"default"}}),h=o.forwardRef(({className:r,variant:e,size:t,asChild:n=!1,children:s,...a},c)=>{if(!(e&&["default","destructive","secondary","success","warning","info"].includes(e))&&e){const x=e==="outline"||e==="ghost"||e==="link"?e:"default";return i.jsx(u,{ref:c,variant:x,size:t,className:r,asChild:n,...a,children:s})}const y=n?l.Slot:"button",m=f.cn(v({variant:e,size:t,className:r}));return i.jsx(y,{className:m,style:a.style,ref:c,...a,children:d(s)})});h.displayName="EnhancedButton";exports.Button=u;exports.EnhancedButton=h;exports.buttonVariants=p;exports.enhancedButtonVariants=v;exports.wrapInlineLabelTextNodes=d;