@nadicodeai/ui 12.1.24 → 12.1.26
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.
|
@@ -6,6 +6,8 @@ type BrandMark = React.ComponentType<BrandIconProps>;
|
|
|
6
6
|
* `undefined` when the set has none.
|
|
7
7
|
*/
|
|
8
8
|
declare function appMarkFor(app: string): BrandMark | undefined;
|
|
9
|
+
/** The letter an app outside the set is drawn with: its first letter or digit, or a question mark. */
|
|
10
|
+
declare function appInitial(app: string): string;
|
|
9
11
|
type AppMarkProps = Omit<React.ComponentProps<"span">, "children"> & {
|
|
10
12
|
/** The connector's slug, id or display name, e.g. `"google-calendar"`. */
|
|
11
13
|
app: string;
|
|
@@ -23,6 +25,6 @@ type AppMarkProps = Omit<React.ComponentProps<"span">, "children"> & {
|
|
|
23
25
|
* has no mark for it. Never an invented logo and never a fetched favicon.
|
|
24
26
|
*/
|
|
25
27
|
declare function AppMark({ app, size, label, className, style, ...props }: AppMarkProps): React.JSX.Element;
|
|
26
|
-
export { AppMark, appMarkFor };
|
|
28
|
+
export { AppMark, appInitial, appMarkFor };
|
|
27
29
|
export type { AppMarkProps };
|
|
28
30
|
//# sourceMappingURL=app-mark.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mark.d.ts","sourceRoot":"","sources":["../../src/components/app-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EA0CL,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAElC,KAAK,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAoDrD;;;GAGG;AACH,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGtD;
|
|
1
|
+
{"version":3,"file":"app-mark.d.ts","sourceRoot":"","sources":["../../src/components/app-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EA0CL,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAElC,KAAK,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAoDrD;;;GAGG;AACH,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGtD;AAED,sGAAsG;AACtG,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOvC;AAOD,KAAK,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACnE,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,iBAAS,OAAO,CAAC,EAAE,GAAG,EAAE,IAAoB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,qBAuC9F;AAED,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -59,6 +59,7 @@ function appMarkFor(app) {
|
|
|
59
59
|
const slug = appMarkSlug(app);
|
|
60
60
|
return slug ? MARKS_BY_SLUG[slug] : undefined;
|
|
61
61
|
}
|
|
62
|
+
/** The letter an app outside the set is drawn with: its first letter or digit, or a question mark. */
|
|
62
63
|
function appInitial(app) {
|
|
63
64
|
return (app
|
|
64
65
|
.trim()
|
|
@@ -84,4 +85,4 @@ function AppMark({ app, size = APP_MARK_SIZE, label, className, style, ...props
|
|
|
84
85
|
: {};
|
|
85
86
|
return (_jsx("span", { "data-slot": "app-mark", "data-app": app, "data-mark": Mark ? "brand" : "monogram", className: cn("inline-flex shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground", className), style: { width: size, height: size, ...style }, ...props, ...labelling, children: Mark ? (_jsx(Mark, { size: Math.round(size * APP_MARK_GLYPH_RATIO) })) : (_jsx("span", { "aria-hidden": "true", className: "font-semibold leading-none text-muted-foreground", "data-slot": "app-mark-monogram", style: { fontSize: Math.max(8, Math.round(size * 0.4)) }, children: appInitial(app) })) }));
|
|
86
87
|
}
|
|
87
|
-
export { AppMark, appMarkFor };
|
|
88
|
+
export { AppMark, appInitial, appMarkFor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-orb.d.ts","sourceRoot":"","sources":["../../src/internal/agent-orb.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAId,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,QAAA,MAAM,aAAa;;;;;;;;CAQ0B,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,aAAa,CAAC;AACtD,kEAAkE;AAClE,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AAE7D,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,cAAc,CAAC;AACxD,+FAA+F;AAC/F,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AA+BlD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAuDpF;AA4FD,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,YAAY,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AG;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAClD,CAAC;IAAE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAExF,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB;;sBAIzC,OAAO;qBAAuB,aAAa;EAqLvF"}
|
|
@@ -275,6 +275,17 @@ export function mountAgentOrb(canvas, options) {
|
|
|
275
275
|
refresh();
|
|
276
276
|
});
|
|
277
277
|
box.observe(canvas);
|
|
278
|
+
// A colour transition on the canvas or on an element it inherits from hands
|
|
279
|
+
// the observer the colour the transition starts from, so the orb reads its
|
|
280
|
+
// colour again when that transition ends. The event bubbles up from where it
|
|
281
|
+
// ran, never down to the canvas, so it is heard on the document.
|
|
282
|
+
function settle(event) {
|
|
283
|
+
if (event.propertyName === "color" &&
|
|
284
|
+
event.target instanceof Node &&
|
|
285
|
+
event.target.contains(canvas))
|
|
286
|
+
refresh();
|
|
287
|
+
}
|
|
288
|
+
document.addEventListener("transitionend", settle, true);
|
|
278
289
|
motion.addEventListener("change", play);
|
|
279
290
|
document.addEventListener("visibilitychange", play);
|
|
280
291
|
window.addEventListener("resize", refresh);
|
|
@@ -296,6 +307,7 @@ export function mountAgentOrb(canvas, options) {
|
|
|
296
307
|
visibility.disconnect();
|
|
297
308
|
appearance.disconnect();
|
|
298
309
|
box.disconnect();
|
|
310
|
+
document.removeEventListener("transitionend", settle, true);
|
|
299
311
|
motion.removeEventListener("change", play);
|
|
300
312
|
document.removeEventListener("visibilitychange", play);
|
|
301
313
|
window.removeEventListener("resize", refresh);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@assistant-ui/react": "0.15.21",
|
|
73
73
|
"@assistant-ui/react-markdown": "0.14.16",
|
|
74
74
|
"@base-ui/react": "^1.8.0",
|
|
75
|
-
"@nadicodeai/design-system": "12.1.
|
|
75
|
+
"@nadicodeai/design-system": "12.1.26",
|
|
76
76
|
"class-variance-authority": "^0.7.1",
|
|
77
77
|
"clsx": "^2.1.1",
|
|
78
78
|
"cmdk": "^1.1.1",
|