@nadicodeai/ui 12.1.24 → 12.1.25

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;AAgBD,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,CAAC;AAC/B,YAAY,EAAE,YAAY,EAAE,CAAC"}
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.24",
3
+ "version": "12.1.25",
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.24",
75
+ "@nadicodeai/design-system": "12.1.25",
76
76
  "class-variance-authority": "^0.7.1",
77
77
  "clsx": "^2.1.1",
78
78
  "cmdk": "^1.1.1",