@nadicodeai/ui 0.22.0 → 1.0.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 (76) hide show
  1. package/AGENTS.md +4 -4
  2. package/LICENSES/PAPER-SHADERS-APACHE-2.0.txt +186 -0
  3. package/NOTICE +12 -0
  4. package/dist/agents.d.ts.map +1 -1
  5. package/dist/agents.js +1 -0
  6. package/dist/components/agent-card.d.ts +13 -0
  7. package/dist/components/agent-card.d.ts.map +1 -0
  8. package/dist/components/agent-card.js +15 -0
  9. package/dist/components/agent-visual.d.ts +17 -0
  10. package/dist/components/agent-visual.d.ts.map +1 -0
  11. package/dist/components/agent-visual.js +63 -0
  12. package/dist/components/alert-dialog.js +1 -1
  13. package/dist/components/badge.d.ts +1 -1
  14. package/dist/components/badge.d.ts.map +1 -1
  15. package/dist/components/badge.js +9 -0
  16. package/dist/components/card.d.ts +5 -3
  17. package/dist/components/card.d.ts.map +1 -1
  18. package/dist/components/card.js +7 -7
  19. package/dist/components/chart.js +1 -1
  20. package/dist/components/combobox.js +1 -1
  21. package/dist/components/context-menu.js +1 -1
  22. package/dist/components/dialog.js +1 -1
  23. package/dist/components/drawer.js +1 -1
  24. package/dist/components/dropdown-menu.js +1 -1
  25. package/dist/components/empty.d.ts +5 -2
  26. package/dist/components/empty.d.ts.map +1 -1
  27. package/dist/components/empty.js +3 -3
  28. package/dist/components/feedback-state.js +1 -1
  29. package/dist/components/glass-control.d.ts +7 -0
  30. package/dist/components/glass-control.d.ts.map +1 -0
  31. package/dist/components/glass-control.js +14 -0
  32. package/dist/components/hover-card.js +1 -1
  33. package/dist/components/label-system.d.ts +1 -10
  34. package/dist/components/label-system.d.ts.map +1 -1
  35. package/dist/components/label-system.js +1 -7
  36. package/dist/components/live-demo.js +1 -1
  37. package/dist/components/menubar.js +1 -1
  38. package/dist/components/nav-bar.d.ts +6 -8
  39. package/dist/components/nav-bar.d.ts.map +1 -1
  40. package/dist/components/nav-bar.js +8 -9
  41. package/dist/components/navigation-menu.js +2 -2
  42. package/dist/components/popover.js +1 -1
  43. package/dist/components/select.js +1 -1
  44. package/dist/components/sheet.js +1 -1
  45. package/dist/components/sidebar.js +1 -1
  46. package/dist/components/sonner.js +2 -2
  47. package/dist/components/testimonials.d.ts +1 -1
  48. package/dist/components/testimonials.js +2 -2
  49. package/dist/components/tooltip.js +1 -1
  50. package/dist/index.d.ts +3 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +3 -0
  53. package/dist/internal/agent-visual/color.d.ts +4 -0
  54. package/dist/internal/agent-visual/color.d.ts.map +1 -0
  55. package/dist/internal/agent-visual/color.js +72 -0
  56. package/dist/internal/agent-visual/poster.d.ts +6 -0
  57. package/dist/internal/agent-visual/poster.d.ts.map +1 -0
  58. package/dist/internal/agent-visual/poster.js +35 -0
  59. package/dist/internal/agent-visual/recipes.d.ts +15 -0
  60. package/dist/internal/agent-visual/recipes.d.ts.map +1 -0
  61. package/dist/internal/agent-visual/recipes.js +72 -0
  62. package/dist/internal/agent-visual/renderer.d.ts +10 -0
  63. package/dist/internal/agent-visual/renderer.d.ts.map +1 -0
  64. package/dist/internal/agent-visual/renderer.js +112 -0
  65. package/dist/internal/agent-visual/shader.d.ts +2 -0
  66. package/dist/internal/agent-visual/shader.d.ts.map +1 -0
  67. package/dist/internal/agent-visual/shader.js +158 -0
  68. package/dist/internal/assistant-ui/thread.js +3 -3
  69. package/dist/styles/globals.css +21 -0
  70. package/docs/agents/nadicodeai-ui.md +4 -2
  71. package/docs/consuming-cross-repo.md +3 -1
  72. package/docs/contract.md +80 -2
  73. package/docs/migration/1.0.0.md +75 -0
  74. package/llms.txt +2 -0
  75. package/package.json +10 -4
  76. package/skills/nadicodeai-ui/SKILL.md +7 -1
package/AGENTS.md CHANGED
@@ -4,15 +4,15 @@ The `@nadicodeai/ui` npm workspace: the shared NadicodeAI React UI package on br
4
4
 
5
5
  ## Commands
6
6
 
7
+ Proof escalates by the ladder in the root `AGENTS.md` "Commands": `npm run check -w @nadicodeai/ui` and `npm run test -w @nadicodeai/ui` before pushing. `test` builds `dist` first, then runs the workspace guards and the browser-free jsdom + axe-core tier-1 accessibility checks.
8
+
7
9
  | Command | When |
8
10
  | --- | --- |
9
11
  | `npm run dev -w @nadicodeai/ui` | Watch `src/` and incrementally refresh `dist/` for local website or app iteration |
10
- | `npm run build:fast -w @nadicodeai/ui` | One-shot incremental `dist/` refresh after a prior full build |
11
- | `npm run generate:brand-icons -w @nadicodeai/ui` | Re-emit `src/components/brand-icons/` after editing the allow-list in `scripts/build-brand-icons.mjs`; never part of the build |
12
+ | `npm run build:dev -w @nadicodeai/ui` | One-shot incremental `dist/` refresh after a prior full build |
12
13
  | `npm run build -w @nadicodeai/ui` | Emit the consumable `dist/` surface before packing or app builds |
14
+ | `npm run generate:brand-icons -w @nadicodeai/ui` | Re-emit `src/components/brand-icons/` after editing the allow-list in `scripts/build-brand-icons.mjs`; never part of the build |
13
15
  | `npm pack --dry-run -w @nadicodeai/ui` | Verify exactly what npm consumers receive after surface, export, CSS, docs, or skill changes |
14
- | `npm run lint -w @nadicodeai/ui` / `npm run typecheck -w @nadicodeai/ui` | ESLint / `tsc --noEmit` |
15
- | `npm run test -w @nadicodeai/ui` | Builds `dist`, then runs the workspace guards and browser-free jsdom + axe-core tier-1 accessibility checks (also inside the root gate) |
16
16
 
17
17
  ## Routing
18
18
 
@@ -0,0 +1,186 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or merely
44
+ link (or bind by name) to the interfaces of, the Work and Derivative Works
45
+ thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the purposes
52
+ of this definition, "submitted" means any form of electronic, verbal, or
53
+ written communication sent to the Licensor or its representatives, including
54
+ but not limited to communication on electronic mailing lists, source code
55
+ control systems, and issue tracking systems that are managed by, or on behalf
56
+ of, the Licensor for the purpose of discussing and improving the Work, but
57
+ excluding communication that is conspicuously marked or otherwise designated
58
+ in writing by the copyright owner as "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
61
+ behalf of whom a Contribution has been received by Licensor and subsequently
62
+ incorporated within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
65
+ License, each Contributor hereby grants to You a perpetual, worldwide,
66
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
67
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
68
+ sublicense, and distribute the Work and such Derivative Works in Source or
69
+ Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of this
72
+ License, each Contributor hereby grants to You a perpetual, worldwide,
73
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
74
+ section) patent license to make, have made, use, offer to sell, sell, import,
75
+ and otherwise transfer the Work, where such license applies only to those
76
+ patent claims licensable by such Contributor that are necessarily infringed by
77
+ their Contribution(s) alone or by combination of their Contribution(s) with
78
+ the Work to which such Contribution(s) was submitted. If You institute patent
79
+ litigation against any entity (including a cross-claim or counterclaim in a
80
+ lawsuit) alleging that the Work or a Contribution incorporated within the Work
81
+ constitutes direct or contributory patent infringement, then any patent
82
+ licenses granted to You under this License for that Work shall terminate as of
83
+ the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
86
+ Derivative Works thereof in any medium, with or without modifications, and in
87
+ Source or Object form, provided that You meet the following conditions:
88
+
89
+ (a) You must give any other recipients of the Work or Derivative Works a copy
90
+ of this License; and
91
+
92
+ (b) You must cause any modified files to carry prominent notices stating that
93
+ You changed the files; and
94
+
95
+ (c) You must retain, in the Source form of any Derivative Works that You
96
+ distribute, all copyright, patent, trademark, and attribution notices from the
97
+ Source form of the Work, excluding those notices that do not pertain to any
98
+ part of the Derivative Works; and
99
+
100
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
101
+ then any Derivative Works that You distribute must include a readable copy of
102
+ the attribution notices contained within such NOTICE file, excluding those
103
+ notices that do not pertain to any part of the Derivative Works, in at least
104
+ one of the following places: within a NOTICE text file distributed as part of
105
+ the Derivative Works; within the Source form or documentation, if provided
106
+ along with the Derivative Works; or, within a display generated by the
107
+ Derivative Works, if and wherever such third-party notices normally appear.
108
+ The contents of the NOTICE file are for informational purposes only and do not
109
+ modify the License. You may add Your own attribution notices within Derivative
110
+ Works that You distribute, alongside or as an addendum to the NOTICE text from
111
+ the Work, provided that such additional attribution notices cannot be
112
+ construed as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and may provide
115
+ additional or different license terms and conditions for use, reproduction,
116
+ or distribution of Your modifications, or for any such Derivative Works as a
117
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
118
+ complies with the conditions stated in this License.
119
+
120
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
121
+ Contribution intentionally submitted for inclusion in the Work by You to the
122
+ Licensor shall be under the terms and conditions of this License, without any
123
+ additional terms or conditions. Notwithstanding the above, nothing herein
124
+ shall supersede or modify the terms of any separate license agreement you may
125
+ have executed with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade names,
128
+ trademarks, service marks, or product names of the Licensor, except as required
129
+ for reasonable and customary use in describing the origin of the Work and
130
+ reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
133
+ writing, Licensor provides the Work (and each Contributor provides its
134
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
135
+ KIND, either express or implied, including, without limitation, any warranties
136
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any risks
139
+ associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
142
+ tort (including negligence), contract, or otherwise, unless required by
143
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
144
+ writing, shall any Contributor be liable to You for damages, including any
145
+ direct, indirect, special, incidental, or consequential damages of any
146
+ character arising as a result of this License or out of the use or inability to
147
+ use the Work (including but not limited to damages for loss of goodwill, work
148
+ stoppage, computer failure or malfunction, or any and all other commercial
149
+ damages or losses), even if such Contributor has been advised of the
150
+ possibility of such damages.
151
+
152
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work
153
+ or Derivative Works thereof, You may choose to offer, and charge a fee for,
154
+ acceptance of support, warranty, indemnity, or other liability obligations
155
+ and/or rights consistent with this License. However, in accepting such
156
+ obligations, You may act only on Your own behalf and on Your sole
157
+ responsibility, not on behalf of any other Contributor, and only if You agree
158
+ to indemnify, defend, and hold each Contributor harmless for any liability
159
+ incurred by, or claims asserted against, such Contributor by reason of your
160
+ accepting any such warranty or additional liability.
161
+
162
+ END OF TERMS AND CONDITIONS
163
+
164
+ APPENDIX: How to apply the Apache License to your work.
165
+
166
+ To apply the Apache License to your work, attach the following boilerplate
167
+ notice, with the fields enclosed by brackets "[]" replaced with your own
168
+ identifying information. (Don't include the brackets!) The text should be
169
+ enclosed in the appropriate comment syntax for the file format. We also
170
+ recommend that a file or class name and description of purpose be included on
171
+ the same "printed page" as the copyright notice for easier identification
172
+ within third-party archives.
173
+
174
+ Copyright [yyyy] [name of copyright owner]
175
+
176
+ Licensed under the Apache License, Version 2.0 (the "License");
177
+ you may not use this file except in compliance with the License.
178
+ You may obtain a copy of the License at
179
+
180
+ http://www.apache.org/licenses/LICENSE-2.0
181
+
182
+ Unless required by applicable law or agreed to in writing, software
183
+ distributed under the License is distributed on an "AS IS" BASIS,
184
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
185
+ See the License for the specific language governing permissions and
186
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,12 @@
1
+ @nadicodeai/ui includes a modified derivative of Paper Shaders 0.0.78.
2
+
3
+ Paper Shaders
4
+ Copyright 2026 Paper
5
+
6
+ Powered by Paper Shaders:
7
+ https://shaders.paper.design
8
+
9
+ The modified shader preserves Paper's Metaballs field, motion, colour blending,
10
+ and edge calculation while adding NadicodeAI's four approved clipped surface
11
+ materials. The modified source is
12
+ src/internal/agent-visual/shader.ts.
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC"}
package/dist/agents.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  export * from "@assistant-ui/react";
2
3
  export * from "./internal/assistant-ui/attachment.js";
3
4
  export * from "./internal/assistant-ui/follow-up-suggestions.js";
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ import { Card } from "./card";
3
+ type AgentCardProps = Omit<React.ComponentProps<typeof Card>, "children"> & {
4
+ action?: ReactNode;
5
+ job: ReactNode;
6
+ meta?: ReactNode;
7
+ name: ReactNode;
8
+ status?: ReactNode;
9
+ visual: ReactNode;
10
+ };
11
+ declare function AgentCard({ action, className, job, meta, name, status, visual, ...props }: AgentCardProps): import("react").JSX.Element;
12
+ export { AgentCard, type AgentCardProps };
13
+ //# sourceMappingURL=agent-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/components/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAuD,MAAM,mBAAmB,CAAC;AAI9F,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,SAAS,EACT,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,+BAsChB;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./card.js";
3
+ import { Separator } from "./separator.js";
4
+ import { cn } from "../lib/utils.js";
5
+ function hasSlotContent(value) {
6
+ return value !== null && value !== undefined && value !== false;
7
+ }
8
+ function AgentCard({ action, className, job, meta, name, status, visual, ...props }) {
9
+ const hasStatus = hasSlotContent(status);
10
+ const hasMeta = hasSlotContent(meta);
11
+ const hasAction = hasSlotContent(action);
12
+ const hasFooter = hasStatus || hasMeta || hasAction;
13
+ return (_jsxs(Card, { className: cn("h-full", className), ...props, children: [_jsxs(CardHeader, { className: "relative min-h-40 pr-32", children: [_jsx(CardTitle, { className: "text-lg", children: name }), _jsx(CardDescription, { className: "max-w-sm leading-6", children: job }), _jsx("div", { className: "absolute top-5 right-5 size-24 overflow-hidden rounded-xl", "data-slot": "agent-card-visual", children: visual })] }), hasFooter ? (_jsxs(CardContent, { className: "mt-auto grid gap-5", children: [_jsx(Separator, {}), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [hasStatus ? _jsx("div", { "data-slot": "agent-card-status", children: status }) : null, hasMeta ? (_jsx("div", { className: "min-w-0 flex-1", "data-slot": "agent-card-meta", children: meta })) : null, hasAction ? (_jsx("div", { className: "ml-auto", "data-slot": "agent-card-action", children: action })) : null] })] })) : null] }));
14
+ }
15
+ export { AgentCard };
@@ -0,0 +1,17 @@
1
+ import type { AgentVisualRecipe } from "../internal/agent-visual/recipes";
2
+ type AgentVisualPresentation = "registry" | "card" | "detail";
3
+ type AgentVisualAccessibility = {
4
+ decorative?: true;
5
+ label?: never;
6
+ } | {
7
+ decorative: false;
8
+ label: string;
9
+ };
10
+ type AgentVisualProps = AgentVisualAccessibility & {
11
+ className?: string;
12
+ presentation?: AgentVisualPresentation;
13
+ recipe: AgentVisualRecipe;
14
+ };
15
+ declare function AgentVisual({ className, decorative, label, presentation, recipe, }: AgentVisualProps): import("react").JSX.Element;
16
+ export { AgentVisual, type AgentVisualPresentation, type AgentVisualProps, type AgentVisualRecipe };
17
+ //# sourceMappingURL=agent-visual.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-visual.d.ts","sourceRoot":"","sources":["../../src/components/agent-visual.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKzE,KAAK,uBAAuB,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9D,KAAK,wBAAwB,GACzB;IAAE,UAAU,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACpC;IAAE,UAAU,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,KAAK,gBAAgB,GAAG,wBAAwB,GAAG;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAuBF,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,UAAiB,EACjB,KAAK,EACL,YAAqB,EACrB,MAAM,GACP,EAAE,gBAAgB,+BAoFlB;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,uBAAuB,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Component, lazy, Suspense, useCallback, useEffect, useRef, useState, } from "react";
4
+ import { AgentVisualPoster } from "../internal/agent-visual/poster.js";
5
+ import { cn } from "../lib/utils.js";
6
+ const LazyAgentVisualRenderer = lazy(() => import("../internal/agent-visual/renderer.js"));
7
+ class AgentVisualErrorBoundary extends Component {
8
+ state = { failed: false };
9
+ static getDerivedStateFromError() {
10
+ return { failed: true };
11
+ }
12
+ componentDidCatch(_error, _info) {
13
+ this.props.onUnavailable();
14
+ }
15
+ render() {
16
+ return this.state.failed ? null : this.props.children;
17
+ }
18
+ }
19
+ function AgentVisual({ className, decorative = true, label, presentation = "card", recipe, }) {
20
+ const hostRef = useRef(null);
21
+ const [canAnimate, setCanAnimate] = useState(false);
22
+ const [isInViewport, setIsInViewport] = useState(false);
23
+ const [rendererReady, setRendererReady] = useState(false);
24
+ const handleReady = useCallback(() => setRendererReady(true), []);
25
+ const handleUnavailable = useCallback(() => {
26
+ setRendererReady(false);
27
+ setCanAnimate(false);
28
+ }, []);
29
+ useEffect(() => {
30
+ setCanAnimate(false);
31
+ setRendererReady(false);
32
+ if (typeof window.matchMedia !== "function")
33
+ return;
34
+ const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
35
+ const update = () => {
36
+ setRendererReady(false);
37
+ setCanAnimate(!reducedMotion.matches);
38
+ };
39
+ update();
40
+ reducedMotion.addEventListener("change", update);
41
+ return () => reducedMotion.removeEventListener("change", update);
42
+ }, [recipe]);
43
+ useEffect(() => {
44
+ const host = hostRef.current;
45
+ if (!host)
46
+ return;
47
+ if (typeof IntersectionObserver !== "function") {
48
+ setIsInViewport(true);
49
+ return;
50
+ }
51
+ const observer = new IntersectionObserver(([entry]) => {
52
+ const isIntersecting = entry?.isIntersecting ?? false;
53
+ setIsInViewport(isIntersecting);
54
+ if (!isIntersecting)
55
+ setRendererReady(false);
56
+ });
57
+ observer.observe(host);
58
+ return () => observer.disconnect();
59
+ }, []);
60
+ const hasAmbientRenderer = canAnimate && isInViewport;
61
+ return (_jsxs("div", { "aria-hidden": decorative || undefined, "aria-label": decorative ? undefined : label, className: cn("relative isolate size-full overflow-hidden rounded-xl bg-nc-campo-inchiostro", presentation === "card" && "min-h-20", presentation === "detail" && "min-h-48", className), "data-agent-visual-motion": hasAmbientRenderer ? "ambient" : "static", "data-agent-visual-presentation": presentation, "data-agent-visual-recipe": recipe, ref: hostRef, role: decorative ? undefined : "img", children: [_jsx(AgentVisualPoster, { recipe: recipe }), hasAmbientRenderer && hostRef.current ? (_jsx("div", { "aria-hidden": "true", className: cn("absolute inset-0 opacity-0 transition-opacity duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)]", rendererReady && "opacity-100"), "data-agent-visual-renderer": "paper-metaballs", children: _jsx(AgentVisualErrorBoundary, { onUnavailable: handleUnavailable, children: _jsx(Suspense, { fallback: null, children: _jsx(LazyAgentVisualRenderer, { host: hostRef.current, onReady: handleReady, onUnavailable: handleUnavailable, recipe: recipe }) }) }) })) : null] }));
62
+ }
63
+ export { AgentVisual };
@@ -17,7 +17,7 @@ function AlertDialogOverlay({ className, ...props }) {
17
17
  return (_jsx(AlertDialogPrimitive.Backdrop, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-scrim/scrim", overlayBackdropMotion, className), ...props }));
18
18
  }
19
19
  function AlertDialogContent({ className, size = "default", ...props }) {
20
- return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-nadicode-md rounded-2xl border border-border bg-popover p-nadicode-lg text-popover-foreground shadow-dialog outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm", modalOverlayMotion, className), ...props })] }));
20
+ return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-nadicode-md rounded-3xl border-0 bg-popover p-nadicode-lg text-popover-foreground smooth-shadow-ring-2xl outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm", modalOverlayMotion, className), ...props })] }));
21
21
  }
22
22
  function AlertDialogHeader({ className, ...props }) {
23
23
  return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  import { useRender } from "@base-ui/react/use-render";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
4
+ variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | "blue" | "gray" | "green" | "red" | "amber" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
7
7
  export { Badge, badgeVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAkBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,8FAevE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EA2BlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,8FAevE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -11,6 +11,15 @@ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-cent
11
11
  outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
12
12
  ghost: "hover:bg-muted hover:text-muted-foreground",
13
13
  link: "text-primary underline-offset-4 hover:underline",
14
+ // The five semantic tones. Each is one soft/deep role pair — a tinted
15
+ // ground with its own deep label — so a status reads as one unit at
16
+ // AA in both modes. They are variants, not call-site classes, because
17
+ // repainting a primitive where it is used is forbidden.
18
+ gray: "bg-[var(--nc-canvas-soft-2)] text-[var(--nc-body)]",
19
+ green: "bg-[var(--nc-link-bg-soft)] text-[var(--nc-link-deep)]",
20
+ red: "bg-[var(--nc-error-soft)] text-[var(--nc-error-deep)]",
21
+ amber: "bg-[var(--nc-warning-soft)] text-[var(--nc-warning-deep)]",
22
+ blue: "bg-[var(--nc-info-soft)] text-[var(--nc-info-deep)]",
14
23
  },
15
24
  },
16
25
  defaultVariants: {
@@ -1,8 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { useRender } from "@base-ui/react/use-render";
3
- type CardVariant = "default" | "interactive" | "link" | "borderless";
4
- declare function Card({ className, render, size, variant, ...props }: useRender.ComponentProps<"div"> & {
3
+ type CardSurface = "plain" | "resting" | "raised";
4
+ type CardVariant = "default" | "interactive" | "link";
5
+ declare function Card({ className, render, size, surface, variant, ...props }: useRender.ComponentProps<"div"> & {
5
6
  size?: "default" | "sm";
7
+ surface?: CardSurface;
6
8
  variant?: CardVariant;
7
9
  }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
8
10
  declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -13,5 +15,5 @@ declare function CardDescription({ className, ...props }: React.ComponentProps<"
13
15
  declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
16
  declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
15
17
  declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
16
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
18
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, type CardSurface, type CardVariant, };
17
19
  //# sourceMappingURL=card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,KAAK,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC;AAErE,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,MAAM,EACN,IAAgB,EAChB,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACnC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,0EAmBA;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,qBAczD;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAClD,KAAK,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC;AAEtD,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,MAAM,EACN,IAAgB,EAChB,OAAmB,EACnB,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACnC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,0EAoBA;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,qBAczD;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,CAAC"}
@@ -2,23 +2,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { mergeProps } from "@base-ui/react/merge-props";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
4
  import { cn } from "../lib/utils.js";
5
- function Card({ className, render, size = "default", variant = "default", ...props }) {
5
+ function Card({ className, render, size = "default", surface = "resting", variant = "default", ...props }) {
6
6
  return useRender({
7
7
  defaultTagName: "div",
8
8
  props: mergeProps({
9
- className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-md border border-border bg-card py-(--card-spacing) text-sm text-card-foreground [--card-spacing:var(--spacing-nadicode-lg)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:var(--spacing-nadicode-md)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-md *:[img:last-child]:rounded-b-md", variant === "interactive" && "transition-colors group-hover:bg-accent", variant === "link" &&
10
- "nc-transition-paint hover:border-ring focus-visible:outline-none focus-visible:ring-[length:var(--ring-width-focus)] focus-visible:ring-ring", variant === "borderless" && "border-0", className),
9
+ className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-3xl border-0 bg-card py-(--card-spacing) text-sm text-card-foreground [--card-spacing:var(--spacing-nadicode-lg)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:var(--spacing-nadicode-md)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-3xl *:[img:last-child]:rounded-b-3xl", surface === "resting" && "smooth-shadow-ring-md", surface === "raised" && "smooth-shadow-ring-lg", variant === "interactive" && "cursor-pointer", variant === "link" &&
10
+ "nc-transition-paint focus-visible:outline focus-visible:outline-[length:var(--ring-width-focus)] focus-visible:outline-ring", className),
11
11
  }, props),
12
12
  render,
13
- state: { size, slot: "card", variant },
13
+ state: { size, slot: "card", surface, variant },
14
14
  });
15
15
  }
16
16
  function CardHeader({ className, ...props }) {
17
- return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-md px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
17
+ return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-3xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
18
18
  }
19
19
  function CardTitle({ className, focusTarget = false, ...props }) {
20
20
  return (_jsx("div", { "data-slot": "card-title", "data-focus-target": focusTarget || undefined, className: cn("text-base font-medium group-data-[size=sm]/card:text-sm", focusTarget &&
21
- "rounded-sm outline-none focus-visible:ring-[length:var(--ring-width-focus)] focus-visible:ring-ring", className), ...props }));
21
+ "rounded-sm outline-none focus-visible:outline focus-visible:outline-[length:var(--ring-width-focus)] focus-visible:outline-ring", className), ...props }));
22
22
  }
23
23
  function CardDescription({ className, ...props }) {
24
24
  return (_jsx("div", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props }));
@@ -32,4 +32,4 @@ function CardContent({ className, ...props }) {
32
32
  function CardFooter({ className, ...props }) {
33
33
  return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center p-(--card-spacing)", className), ...props }));
34
34
  }
35
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
35
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -83,7 +83,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
83
83
  return null;
84
84
  }
85
85
  const nestLabel = payload.length === 1 && indicator !== "dot";
86
- return (_jsxs("div", { className: cn("grid min-w-32 items-start gap-1.5 rounded-md border border-border bg-popover px-nadicode-sm py-nadicode-filter-chip-gap text-xs text-popover-foreground shadow-tooltip", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
86
+ return (_jsxs("div", { className: cn("grid min-w-32 items-start gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-nadicode-filter-chip-gap text-xs text-popover-foreground smooth-shadow-ring-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
87
87
  .filter((item) => item.type !== "none")
88
88
  .map((item, index) => {
89
89
  const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
@@ -20,7 +20,7 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
20
20
  return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, {}), "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
21
21
  }
22
22
  function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
23
- return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] overflow-hidden rounded-2xl border border-border bg-popover text-popover-foreground shadow-menu data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-control-height *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none", anchoredOverlayMotion, className), ...props }) }) }));
23
+ return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] overflow-hidden rounded-2xl border-0 bg-popover text-popover-foreground smooth-shadow-ring-xl data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-control-height *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none", anchoredOverlayMotion, className), ...props }) }) }));
24
24
  }
25
25
  function ComboboxList({ className, ...props }) {
26
26
  return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-nadicode-xxs data-empty:p-0", className), ...props }));
@@ -14,7 +14,7 @@ function ContextMenuTrigger({ className, ...props }) {
14
14
  return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...props }));
15
15
  }
16
16
  function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
17
- return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--available-height) min-w-36 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover p-nadicode-xxs text-popover-foreground shadow-menu outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
17
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--available-height) min-w-36 overflow-x-hidden overflow-y-auto rounded-2xl border-0 bg-popover p-nadicode-xxs text-popover-foreground smooth-shadow-ring-xl outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
18
18
  }
19
19
  function ContextMenuGroup({ ...props }) {
20
20
  return _jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
@@ -20,7 +20,7 @@ function DialogOverlay({ className, motion = "default", ...props }) {
20
20
  return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-scrim/scrim", motion === "instant" ? instantOverlayBackdropMotion : overlayBackdropMotion, className), ...props }));
21
21
  }
22
22
  function DialogContent({ className, children, showCloseButton = true, closeLabel = "Close", motion = "default", ...props }) {
23
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { motion: motion }), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-var(--nc-xl))] -translate-x-1/2 -translate-y-1/2 gap-nadicode-md rounded-2xl border border-border bg-popover p-nadicode-lg text-sm text-popover-foreground shadow-dialog outline-none sm:max-w-sm", motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
23
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { motion: motion }), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-var(--nc-xl))] -translate-x-1/2 -translate-y-1/2 gap-nadicode-md rounded-3xl border-0 bg-popover p-nadicode-lg text-sm text-popover-foreground smooth-shadow-ring-2xl outline-none sm:max-w-sm", motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
24
24
  }
25
25
  function DialogHeader({ className, ...props }) {
26
26
  return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
@@ -36,7 +36,7 @@ function DrawerContent({ className, children, ...props }) {
36
36
  const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
37
37
  return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && _jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined }), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto", children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-swipe-axis": swipeAxis, "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
38
38
  // Base.
39
- "group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground shadow-dialog transition-[transform,opacity] duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] outline-none select-none data-[swipe-direction=down]:rounded-t-3xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-3xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-3xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-3xl data-[swipe-direction=up]:border-b motion-reduce:transition-none",
39
+ "group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col border-0 bg-popover text-sm text-popover-foreground smooth-shadow-ring-2xl transition-[transform,opacity] duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] outline-none select-none data-[swipe-direction=down]:rounded-t-3xl data-[swipe-direction=left]:rounded-r-3xl data-[swipe-direction=right]:rounded-l-3xl data-[swipe-direction=up]:rounded-b-3xl motion-reduce:transition-none",
40
40
  // Nested.
41
41
  "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
42
42
  // Bleed.
@@ -13,7 +13,7 @@ function DropdownMenuTrigger({ ...props }) {
13
13
  return _jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
14
14
  }
15
15
  function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
16
- return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover p-nadicode-xxs text-popover-foreground shadow-menu outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
16
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 overflow-x-hidden overflow-y-auto rounded-2xl border-0 bg-popover p-nadicode-xxs text-popover-foreground smooth-shadow-ring-xl outline-none data-closed:overflow-hidden", anchoredOverlayMotion, className), ...props }) }) }));
17
17
  }
18
18
  function DropdownMenuGroup({ ...props }) {
19
19
  return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
@@ -1,5 +1,8 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
- declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
2
+ type EmptyScope = "page" | "region" | "card";
3
+ declare function Empty({ className, scope, ...props }: React.ComponentProps<"div"> & {
4
+ scope?: EmptyScope;
5
+ }): import("react").JSX.Element;
3
6
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
4
7
  declare const emptyMediaVariants: (props?: ({
5
8
  variant?: "default" | "icon" | null | undefined;
@@ -8,5 +11,5 @@ declare function EmptyMedia({ className, variant, ...props }: React.ComponentPro
8
11
  declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
9
12
  declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
10
13
  declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
11
- export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
14
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, type EmptyScope, };
12
15
  //# sourceMappingURL=empty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/components/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWlE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,QAAA,MAAM,kBAAkB;;8EAavB,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,+BASvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,+BAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWzE;AAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/components/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,+BActD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,QAAA,MAAM,kBAAkB;;8EAavB,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,+BASvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,+BAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,KAAK,UAAU,GAChB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../lib/utils.js";
4
- function Empty({ className, ...props }) {
5
- return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-md border-dashed p-nadicode-lg text-center text-balance", className), ...props }));
4
+ function Empty({ className, scope = "region", ...props }) {
5
+ return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-md p-nadicode-lg text-center text-balance", scope !== "card" && "border border-dashed bg-card", scope === "card" && "border-0 bg-transparent", className), ...props, "data-scope": scope }));
6
6
  }
7
7
  function EmptyHeader({ className, ...props }) {
8
8
  return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2", className), ...props }));
@@ -30,4 +30,4 @@ function EmptyDescription({ className, ...props }) {
30
30
  function EmptyContent({ className, ...props }) {
31
31
  return (_jsx("div", { "data-slot": "empty-content", className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className), ...props }));
32
32
  }
33
- export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
33
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
@@ -63,6 +63,6 @@ function FeedbackState({ status, title, description, icon, actions, children, co
63
63
  className: cn("size-5", (status === "loading" || status === "saving") &&
64
64
  "motion-safe:animate-spin motion-reduce:animate-pulse"),
65
65
  });
66
- return (_jsxs(Empty, { "data-slot": "feedback-state", "data-status": status, role: stateRole, "aria-live": stateRole === "alert" ? "assertive" : "polite", className: cn("border border-dashed bg-muted/30", compact && "gap-4 p-4 md:p-6", className), ...props, children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: stateIcon }), _jsx(EmptyTitle, { children: title ?? fallback.title }), (description ?? fallback.description) && (_jsx(EmptyDescription, { children: description ?? fallback.description }))] }), (actions || children) && (_jsxs(EmptyContent, { "data-slot": "feedback-state-content", children: [children, actions && (_jsx("div", { "data-slot": "feedback-state-actions", className: "flex flex-wrap items-center justify-center gap-2", children: actions }))] }))] }));
66
+ return (_jsxs(Empty, { "data-slot": "feedback-state", "data-status": status, role: stateRole, "aria-live": stateRole === "alert" ? "assertive" : "polite", className: cn(compact && "gap-4 p-4 md:p-6", className), ...props, children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: stateIcon }), _jsx(EmptyTitle, { children: title ?? fallback.title }), (description ?? fallback.description) && (_jsx(EmptyDescription, { children: description ?? fallback.description }))] }), (actions || children) && (_jsxs(EmptyContent, { "data-slot": "feedback-state-content", children: [children, actions && (_jsx("div", { "data-slot": "feedback-state-actions", className: "flex flex-wrap items-center justify-center gap-2", children: actions }))] }))] }));
67
67
  }
68
68
  export { FeedbackState };