@stackframe/stack-shared 2.8.54 → 2.8.55

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stackframe/stack-shared
2
2
 
3
+ ## 2.8.55
4
+
5
+ ### Patch Changes
6
+
7
+ - Various changes
8
+
3
9
  ## 2.8.54
4
10
 
5
11
  ### Patch Changes
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
2
3
  import { AppId } from './apps-config.mjs';
3
4
 
4
5
  declare const appSquareWidthExpression = "max(min(11vw,180px),80px)";
@@ -14,6 +15,13 @@ type AppIconProps = {
14
15
  */
15
16
  LogoComponent?: React.FunctionComponent<{}>;
16
17
  className?: string;
18
+ /**
19
+ * Whether this app is enabled/installed (shows green icon)
20
+ */
21
+ enabled?: boolean;
22
+ /**
23
+ * Whether this app is disabled (shows dashed border)
24
+ */
17
25
  disabled?: boolean;
18
26
  style?: React.CSSProperties;
19
27
  /**
@@ -21,6 +29,6 @@ type AppIconProps = {
21
29
  */
22
30
  cn: (...inputs: any[]) => string;
23
31
  };
24
- declare function AppIcon({ appId, IconComponent, LogoComponent, className, disabled, style, cn, }: AppIconProps): react_jsx_runtime.JSX.Element;
32
+ declare function AppIcon({ appId, IconComponent, LogoComponent, className, enabled, disabled, style, cn, }: AppIconProps): react_jsx_runtime.JSX.Element;
25
33
 
26
34
  export { AppIcon, type AppIconProps, appSquarePaddingExpression, appSquareWidthExpression };
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
2
3
  import { AppId } from './apps-config.js';
3
4
 
4
5
  declare const appSquareWidthExpression = "max(min(11vw,180px),80px)";
@@ -14,6 +15,13 @@ type AppIconProps = {
14
15
  */
15
16
  LogoComponent?: React.FunctionComponent<{}>;
16
17
  className?: string;
18
+ /**
19
+ * Whether this app is enabled/installed (shows green icon)
20
+ */
21
+ enabled?: boolean;
22
+ /**
23
+ * Whether this app is disabled (shows dashed border)
24
+ */
17
25
  disabled?: boolean;
18
26
  style?: React.CSSProperties;
19
27
  /**
@@ -21,6 +29,6 @@ type AppIconProps = {
21
29
  */
22
30
  cn: (...inputs: any[]) => string;
23
31
  };
24
- declare function AppIcon({ appId, IconComponent, LogoComponent, className, disabled, style, cn, }: AppIconProps): react_jsx_runtime.JSX.Element;
32
+ declare function AppIcon({ appId, IconComponent, LogoComponent, className, enabled, disabled, style, cn, }: AppIconProps): react_jsx_runtime.JSX.Element;
25
33
 
26
34
  export { AppIcon, type AppIconProps, appSquarePaddingExpression, appSquareWidthExpression };
@@ -25,8 +25,6 @@ __export(apps_ui_exports, {
25
25
  appSquareWidthExpression: () => appSquareWidthExpression
26
26
  });
27
27
  module.exports = __toCommonJS(apps_ui_exports);
28
- var import_arrays = require("../utils/arrays.js");
29
- var import_apps_config = require("./apps-config.js");
30
28
  var import_jsx_runtime = require("react/jsx-runtime");
31
29
  var appSquareWidthExpression = "max(min(11vw,180px),80px)";
32
30
  var appSquarePaddingExpression = "max(min(1vw,1.5rem),0.25rem)";
@@ -35,71 +33,67 @@ function AppIcon({
35
33
  IconComponent,
36
34
  LogoComponent,
37
35
  className,
36
+ enabled = false,
38
37
  disabled,
39
38
  style,
40
39
  cn
41
40
  }) {
42
- const svgGradients = (gradients) => {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "0", height: "0", children: Object.entries(gradients).map(([id, gradient]) => {
44
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("linearGradient", { id, x1: "100%", y1: "100%", x2: "0%", y2: "0%", children: gradient.map((color, index) => {
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { stopColor: color, offset: `${index * 100 / (gradient.length - 1)}%` }, index);
46
- }) }, id);
47
- }) });
48
- };
49
- const app = import_apps_config.ALL_APPS[appId];
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
51
- "div",
52
- {
53
- style,
54
- className: cn(
55
- "relative w-24 h-24 rounded-[24.154%] overflow-hidden select-none",
56
- !disabled && "bg-[linear-gradient(45deg,#dde,#fff)] dark:bg-[linear-gradient(45deg,#222,#666)]",
57
- disabled && "border-gray-400/70 border-dashed border-4",
58
- className
59
- ),
60
- children: [
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn("w-full h-full isolate relative"), children: LogoComponent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
41
+ const filterId = "glow-fx";
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { height: "0", width: "0", style: { position: "absolute", marginLeft: "-100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("filter", { id: filterId, colorInterpolationFilters: "sRGB", x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", { dx: "0", dy: "2", in: "SourceAlpha", result: "dropOffset" }),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "8", in: "dropOffset", result: "dropBlur" }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { floodColor: "#4271FF", floodOpacity: "0.8", result: "dropFlood" }),
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { operator: "in", in: "dropFlood", in2: "dropBlur", result: "dropShadow" }),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feOffset", { dx: "0", dy: "0", in: "SourceAlpha", result: "outerOffset" }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "4", in: "outerOffset", result: "outerBlur" }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feFlood", { floodColor: "#00BBFF", floodOpacity: "0.3", result: "outerFlood" }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { operator: "in", in: "outerFlood", in2: "outerBlur", result: "outerShadow" }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { operator: "over", in: "outerShadow", in2: "dropShadow", result: "combinedShadows" }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("feComposite", { operator: "over", in: "SourceGraphic", in2: "combinedShadows" })
54
+ ] }) }) }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
+ "div",
57
+ {
58
+ style,
59
+ className: cn(
60
+ "relative w-[72px] h-[72px] overflow-hidden select-none",
61
+ "rounded-[20%] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]",
62
+ // https://x.com/konstiwohlwend/status/1991221528206405685
63
+ "shadow-[0_4px_12px_0_rgba(0,0,0,0.08)] dark:!shadow-[0_10px_24px_0_rgba(10,69,151,0.28)]",
64
+ "before:absolute before:inset-0 before:bg-gradient-to-br before:from-slate-300 before:via-slate-400 before:to-slate-300 dark:before:from-[#4E7598] dark:before:via-[#0D233D] dark:before:to-[#4E7598] before:rounded-[inherit] before:supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] before:supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]",
65
+ // !disabled && "bg-gray-300 dark:bg-gray-900",
66
+ // disabled && 'bg-gray-300 dark:bg-gray-900',
67
+ className
68
+ ),
69
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn("absolute inset-[1px] isolate flex items-center justify-center rounded-[inherit] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]", !disabled && "bg-gradient-to-br from-slate-100 to-slate-200 dark:from-[#163050] dark:to-[#090C11]", disabled && "bg-gray-300 dark:bg-gray-900"), children: LogoComponent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
70
  "div",
63
71
  {
64
- className: "absolute inset-[20%] w-[60%] h-[60%] rounded-[24.154%] overflow-hidden flex items-center justify-center border",
65
- style: {
66
- opacity: disabled ? 0.6 : 1
67
- },
72
+ className: cn(
73
+ "w-[42%] h-[42%] flex items-center justify-center",
74
+ "[&_svg]:overflow-visible",
75
+ !enabled && "grayscale opacity-60"
76
+ ),
77
+ style: { filter: `url(#${filterId})` },
68
78
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogoComponent, {})
69
79
  }
70
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
71
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "0", height: "0", children: svgGradients({
72
- "app-icon-gradient-light": ["#c0f", "#66f", "#4af"],
73
- "app-icon-gradient-dark": ["#3ec", "#9af", "#a5f"],
74
- "app-icon-gradient-light-expert": ["#f0c", "#f66", "#fa4"],
75
- "app-icon-gradient-dark-expert": ["#f0c", "#f66", "#fa4"],
76
- "app-icon-gradient-light-integration": ["#E5AB00", "#FFBA00", "#F8DF80"],
77
- "app-icon-gradient-dark-integration": ["#E5AB00", "#FFBA00", "#F8DF80"]
78
- }) }),
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
- IconComponent,
81
- {
82
- opacity: disabled ? 0.75 : 1,
83
- className: cn(
84
- "inset-[20%] w-[60%] h-[60%] bg-clip-text text-transparent text-white absolute",
85
- (0, import_arrays.typedIncludes)(app.tags, "expert") ? "stroke-[url(#app-icon-gradient-light-expert)] dark:stroke-[url(#app-icon-gradient-dark-expert)]" : (0, import_arrays.typedIncludes)(app.tags, "integration") ? "stroke-[url(#app-icon-gradient-light-integration)] dark:stroke-[url(#app-icon-gradient-dark-integration)]" : "stroke-[url(#app-icon-gradient-light)] dark:stroke-[url(#app-icon-gradient-dark)]"
86
- )
87
- }
88
- )
89
- ] }) }),
90
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-0 left-[-100%] right-0 flex flex-col gap-1 [transform:_rotate(-45deg)_translateY(24px)] [transform-origin:top_center]", children: app.stage !== "stable" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
- "div",
80
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ IconComponent,
92
82
  {
93
83
  className: cn(
94
- "h-4 uppercase text-xs font-bold font-mono tracking-widest text-center",
95
- disabled ? "bg-gray-400/80 text-white" : app.stage === "alpha" ? "bg-red-500 text-white" : "bg-yellow-600 text-white"
84
+ "w-[42%] h-[42%]",
85
+ enabled ? "stroke-emerald-600 dark:stroke-emerald-400" : "stroke-slate-500 dark:stroke-gray-500"
96
86
  ),
97
- children: app.stage
87
+ style: {
88
+ opacity: disabled ? 0.5 : 1,
89
+ filter: `url(#${filterId})`
90
+ },
91
+ overflow: "visible"
98
92
  }
99
93
  ) })
100
- ]
101
- }
102
- );
94
+ }
95
+ )
96
+ ] });
103
97
  }
104
98
  // Annotate the CommonJS export names for ESM import in node:
105
99
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/apps/apps-ui.tsx"],"sourcesContent":["import { typedIncludes } from \"../utils/arrays\";\nimport { ALL_APPS, AppId } from \"./apps-config\";\n\nexport const appSquareWidthExpression = \"max(min(11vw,180px),80px)\";\nexport const appSquarePaddingExpression = \"max(min(1vw,1.5rem),0.25rem)\";\n\nexport type AppIconProps = {\n appId: AppId,\n /**\n * Icon component from the app frontend config\n */\n IconComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>,\n /**\n * Optional logo component from the app frontend config\n */\n LogoComponent?: React.FunctionComponent<{}>,\n className?: string,\n disabled?: boolean,\n style?: React.CSSProperties,\n /**\n * cn utility function for className merging (e.g., from stack-ui or tailwind-merge)\n */\n cn: (...inputs: any[]) => string,\n};\n\nexport function AppIcon({\n appId,\n IconComponent,\n LogoComponent,\n className,\n disabled,\n style,\n cn,\n}: AppIconProps) {\n const svgGradients = (gradients: Record<string, string[]>) => {\n return (\n <svg width=\"0\" height=\"0\">\n {Object.entries(gradients).map(([id, gradient]) => {\n return (\n <linearGradient key={id} id={id} x1=\"100%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n {gradient.map((color, index) => {\n return <stop key={index} stopColor={color} offset={`${index * 100 / (gradient.length - 1)}%`} />;\n })}\n </linearGradient>\n );\n })}\n </svg>\n );\n };\n\n const app = ALL_APPS[appId];\n\n return (\n <div\n style={style}\n className={cn(\n \"relative w-24 h-24 rounded-[24.154%] overflow-hidden select-none\",\n !disabled && \"bg-[linear-gradient(45deg,#dde,#fff)] dark:bg-[linear-gradient(45deg,#222,#666)]\",\n disabled && 'border-gray-400/70 border-dashed border-4',\n className,\n )}\n >\n <div className={cn(\"w-full h-full isolate relative\")}>\n {LogoComponent ? (\n <div\n className=\"absolute inset-[20%] w-[60%] h-[60%] rounded-[24.154%] overflow-hidden flex items-center justify-center border\"\n style={{\n opacity: disabled ? 0.6 : 1,\n }}\n >\n <LogoComponent />\n </div>\n ) : (\n <>\n <svg width=\"0\" height=\"0\">\n {svgGradients({\n \"app-icon-gradient-light\": [\"#c0f\", \"#66f\", \"#4af\"],\n \"app-icon-gradient-dark\": [\"#3ec\", \"#9af\", \"#a5f\"],\n \"app-icon-gradient-light-expert\": [\"#f0c\", \"#f66\", \"#fa4\"],\n \"app-icon-gradient-dark-expert\": [\"#f0c\", \"#f66\", \"#fa4\"],\n \"app-icon-gradient-light-integration\": [\"#E5AB00\", \"#FFBA00\", \"#F8DF80\"],\n \"app-icon-gradient-dark-integration\": [\"#E5AB00\", \"#FFBA00\", \"#F8DF80\"],\n })}\n </svg>\n <IconComponent\n opacity={disabled ? 0.75 : 1}\n className={cn(\n \"inset-[20%] w-[60%] h-[60%] bg-clip-text text-transparent text-white absolute\",\n (typedIncludes(app.tags, \"expert\")\n ? \"stroke-[url(#app-icon-gradient-light-expert)] dark:stroke-[url(#app-icon-gradient-dark-expert)]\"\n : typedIncludes(app.tags, \"integration\")\n ? \"stroke-[url(#app-icon-gradient-light-integration)] dark:stroke-[url(#app-icon-gradient-dark-integration)]\"\n : \"stroke-[url(#app-icon-gradient-light)] dark:stroke-[url(#app-icon-gradient-dark)]\"\n )\n )}\n />\n </>\n )}\n </div>\n <div className=\"absolute top-0 left-[-100%] right-0 flex flex-col gap-1 [transform:_rotate(-45deg)_translateY(24px)] [transform-origin:top_center]\">\n {app.stage !== \"stable\" && (\n <div className={cn(\n \"h-4 uppercase text-xs font-bold font-mono tracking-widest text-center\",\n disabled\n ? \"bg-gray-400/80 text-white\"\n : app.stage === \"alpha\"\n ? \"bg-red-500 text-white\"\n : \"bg-yellow-600 text-white\"\n )}\n >\n {app.stage}\n </div>\n )}\n </div>\n </div>\n );\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA8B;AAC9B,yBAAgC;AAwCT;AAtChB,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AAqBnC,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiB;AACf,QAAM,eAAe,CAAC,cAAwC;AAC5D,WACE,4CAAC,SAAI,OAAM,KAAI,QAAO,KACnB,iBAAO,QAAQ,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,QAAQ,MAAM;AACjD,aACE,4CAAC,oBAAwB,IAAQ,IAAG,QAAO,IAAG,QAAO,IAAG,MAAK,IAAG,MAC7D,mBAAS,IAAI,CAAC,OAAO,UAAU;AAC9B,eAAO,4CAAC,UAAiB,WAAW,OAAO,QAAQ,GAAG,QAAQ,OAAO,SAAS,SAAS,EAAE,OAAvE,KAA4E;AAAA,MAChG,CAAC,KAHkB,EAIrB;AAAA,IAEJ,CAAC,GACH;AAAA,EAEJ;AAEA,QAAM,MAAM,4BAAS,KAAK;AAE1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,CAAC,YAAY;AAAA,QACb,YAAY;AAAA,QACZ;AAAA,MACF;AAAA,MAEA;AAAA,oDAAC,SAAI,WAAW,GAAG,gCAAgC,GAChD,0BACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,SAAS,WAAW,MAAM;AAAA,YAC5B;AAAA,YAEA,sDAAC,iBAAc;AAAA;AAAA,QACjB,IAEA,4EACE;AAAA,sDAAC,SAAI,OAAM,KAAI,QAAO,KACnB,uBAAa;AAAA,YACZ,2BAA2B,CAAC,QAAQ,QAAQ,MAAM;AAAA,YAClD,0BAA0B,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACjD,kCAAkC,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACzD,iCAAiC,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACxD,uCAAuC,CAAC,WAAW,WAAW,SAAS;AAAA,YACvE,sCAAsC,CAAC,WAAW,WAAW,SAAS;AAAA,UACxE,CAAC,GACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,WAAW,OAAO;AAAA,cAC3B,WAAW;AAAA,gBACT;AAAA,oBACC,6BAAc,IAAI,MAAM,QAAQ,IAC7B,wGACA,6BAAc,IAAI,MAAM,aAAa,IACnC,8GACA;AAAA,cAER;AAAA;AAAA,UACF;AAAA,WACF,GAEJ;AAAA,QACA,4CAAC,SAAI,WAAU,sIACZ,cAAI,UAAU,YACb;AAAA,UAAC;AAAA;AAAA,YAAI,WAAW;AAAA,cACd;AAAA,cACA,WACI,8BACA,IAAI,UAAU,UACZ,0BACA;AAAA,YACN;AAAA,YAEC,cAAI;AAAA;AAAA,QACP,GAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/apps/apps-ui.tsx"],"sourcesContent":["import React from \"react\";\nimport { AppId } from \"./apps-config\";\n\nexport const appSquareWidthExpression = \"max(min(11vw,180px),80px)\";\nexport const appSquarePaddingExpression = \"max(min(1vw,1.5rem),0.25rem)\";\n\nexport type AppIconProps = {\n appId: AppId,\n /**\n * Icon component from the app frontend config\n */\n IconComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>,\n /**\n * Optional logo component from the app frontend config\n */\n LogoComponent?: React.FunctionComponent<{}>,\n className?: string,\n /**\n * Whether this app is enabled/installed (shows green icon)\n */\n enabled?: boolean,\n /**\n * Whether this app is disabled (shows dashed border)\n */\n disabled?: boolean,\n style?: React.CSSProperties,\n /**\n * cn utility function for className merging (e.g., from stack-ui or tailwind-merge)\n */\n cn: (...inputs: any[]) => string,\n};\n\nexport function AppIcon({\n appId,\n IconComponent,\n LogoComponent,\n className,\n enabled = false,\n disabled,\n style,\n cn,\n}: AppIconProps) {\n\n const filterId = \"glow-fx\";\n\n return (\n <>\n {/* theoretically, this only needs to be in the dom once: */}\n <svg height=\"0\" width=\"0\" style={{ position: \"absolute\", marginLeft: \"-100%\" }}>\n <defs>\n <filter id={filterId} colorInterpolationFilters=\"sRGB\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n {/* drop shadow */}\n <feOffset dx=\"0\" dy=\"2\" in=\"SourceAlpha\" result=\"dropOffset\" />\n <feGaussianBlur stdDeviation=\"8\" in=\"dropOffset\" result=\"dropBlur\" />\n <feFlood floodColor=\"#4271FF\" floodOpacity=\"0.8\" result=\"dropFlood\" />\n <feComposite operator=\"in\" in=\"dropFlood\" in2=\"dropBlur\" result=\"dropShadow\" />\n {/* outer shadow */}\n <feOffset dx=\"0\" dy=\"0\" in=\"SourceAlpha\" result=\"outerOffset\" />\n <feGaussianBlur stdDeviation=\"4\" in=\"outerOffset\" result=\"outerBlur\" />\n <feFlood floodColor=\"#00BBFF\" floodOpacity=\"0.3\" result=\"outerFlood\" />\n <feComposite operator=\"in\" in=\"outerFlood\" in2=\"outerBlur\" result=\"outerShadow\" />\n {/* Combine: drop shadow behind, then outer shadow, then source graphic on top */}\n <feComposite operator=\"over\" in=\"outerShadow\" in2=\"dropShadow\" result=\"combinedShadows\" />\n <feComposite operator=\"over\" in=\"SourceGraphic\" in2=\"combinedShadows\" />\n </filter>\n </defs>\n </svg>\n <div\n style={style}\n className={cn(\n \"relative w-[72px] h-[72px] overflow-hidden select-none\",\n \"rounded-[20%] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\", // https://x.com/konstiwohlwend/status/1991221528206405685\n \"shadow-[0_4px_12px_0_rgba(0,0,0,0.08)] dark:!shadow-[0_10px_24px_0_rgba(10,69,151,0.28)]\",\n \"before:absolute before:inset-0 before:bg-gradient-to-br before:from-slate-300 before:via-slate-400 before:to-slate-300 dark:before:from-[#4E7598] dark:before:via-[#0D233D] dark:before:to-[#4E7598] before:rounded-[inherit] before:supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] before:supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\",\n // !disabled && \"bg-gray-300 dark:bg-gray-900\",\n // disabled && 'bg-gray-300 dark:bg-gray-900',\n className,\n )}\n >\n <div className={cn(\"absolute inset-[1px] isolate flex items-center justify-center rounded-[inherit] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\", !disabled && \"bg-gradient-to-br from-slate-100 to-slate-200 dark:from-[#163050] dark:to-[#090C11]\", disabled && \"bg-gray-300 dark:bg-gray-900\")}>\n {LogoComponent ? (\n <div\n className={cn(\n \"w-[42%] h-[42%] flex items-center justify-center\",\n \"[&_svg]:overflow-visible\",\n !enabled && \"grayscale opacity-60\"\n )}\n style={{ filter: `url(#${filterId})` }}\n >\n <LogoComponent />\n </div>\n ) : (\n <IconComponent\n className={cn(\n \"w-[42%] h-[42%]\",\n enabled\n ? \"stroke-emerald-600 dark:stroke-emerald-400\"\n : \"stroke-slate-500 dark:stroke-gray-500\"\n )}\n style={{\n opacity: disabled ? 0.5 : 1,\n filter: `url(#${filterId})`,\n }}\n overflow=\"visible\"\n />\n )}\n </div>\n </div>\n </>\n );\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CI;AA3CG,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AA4BnC,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF,GAAiB;AAEf,QAAM,WAAW;AAEjB,SACE,4EAEE;AAAA,gDAAC,SAAI,QAAO,KAAI,OAAM,KAAI,OAAO,EAAE,UAAU,YAAY,YAAY,QAAQ,GAC3E,sDAAC,UACC,uDAAC,YAAO,IAAI,UAAU,2BAA0B,QAAO,GAAE,QAAO,GAAE,QAAO,OAAM,QAAO,QAAO,QAE3F;AAAA,kDAAC,cAAS,IAAG,KAAI,IAAG,KAAI,IAAG,eAAc,QAAO,cAAa;AAAA,MAC7D,4CAAC,oBAAe,cAAa,KAAI,IAAG,cAAa,QAAO,YAAW;AAAA,MACnE,4CAAC,aAAQ,YAAW,WAAU,cAAa,OAAM,QAAO,aAAY;AAAA,MACpE,4CAAC,iBAAY,UAAS,MAAK,IAAG,aAAY,KAAI,YAAW,QAAO,cAAa;AAAA,MAE7E,4CAAC,cAAS,IAAG,KAAI,IAAG,KAAI,IAAG,eAAc,QAAO,eAAc;AAAA,MAC9D,4CAAC,oBAAe,cAAa,KAAI,IAAG,eAAc,QAAO,aAAY;AAAA,MACrE,4CAAC,aAAQ,YAAW,WAAU,cAAa,OAAM,QAAO,cAAa;AAAA,MACrE,4CAAC,iBAAY,UAAS,MAAK,IAAG,cAAa,KAAI,aAAY,QAAO,eAAc;AAAA,MAEhF,4CAAC,iBAAY,UAAS,QAAO,IAAG,eAAc,KAAI,cAAa,QAAO,mBAAkB;AAAA,MACxF,4CAAC,iBAAY,UAAS,QAAO,IAAG,iBAAgB,KAAI,mBAAkB;AAAA,OACxE,GACF,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA;AAAA,UACA;AAAA,UACA;AAAA;AAAA;AAAA,UAGA;AAAA,QACF;AAAA,QAEA,sDAAC,SAAI,WAAW,GAAG,4NAA4N,CAAC,YAAY,uFAAuF,YAAY,8BAA8B,GAC1X,0BACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,CAAC,WAAW;AAAA,YACd;AAAA,YACA,OAAO,EAAE,QAAQ,QAAQ,QAAQ,IAAI;AAAA,YAErC,sDAAC,iBAAc;AAAA;AAAA,QACjB,IAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,UACI,+CACA;AAAA,YACN;AAAA,YACA,OAAO;AAAA,cACL,SAAS,WAAW,MAAM;AAAA,cAC1B,QAAQ,QAAQ,QAAQ;AAAA,YAC1B;AAAA,YACA,UAAS;AAAA;AAAA,QACX,GAEJ;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
@@ -1,6 +1,4 @@
1
1
  // src/apps/apps-ui.tsx
2
- import { typedIncludes } from "../utils/arrays.js";
3
- import { ALL_APPS } from "./apps-config.js";
4
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
3
  var appSquareWidthExpression = "max(min(11vw,180px),80px)";
6
4
  var appSquarePaddingExpression = "max(min(1vw,1.5rem),0.25rem)";
@@ -9,71 +7,67 @@ function AppIcon({
9
7
  IconComponent,
10
8
  LogoComponent,
11
9
  className,
10
+ enabled = false,
12
11
  disabled,
13
12
  style,
14
13
  cn
15
14
  }) {
16
- const svgGradients = (gradients) => {
17
- return /* @__PURE__ */ jsx("svg", { width: "0", height: "0", children: Object.entries(gradients).map(([id, gradient]) => {
18
- return /* @__PURE__ */ jsx("linearGradient", { id, x1: "100%", y1: "100%", x2: "0%", y2: "0%", children: gradient.map((color, index) => {
19
- return /* @__PURE__ */ jsx("stop", { stopColor: color, offset: `${index * 100 / (gradient.length - 1)}%` }, index);
20
- }) }, id);
21
- }) });
22
- };
23
- const app = ALL_APPS[appId];
24
- return /* @__PURE__ */ jsxs(
25
- "div",
26
- {
27
- style,
28
- className: cn(
29
- "relative w-24 h-24 rounded-[24.154%] overflow-hidden select-none",
30
- !disabled && "bg-[linear-gradient(45deg,#dde,#fff)] dark:bg-[linear-gradient(45deg,#222,#666)]",
31
- disabled && "border-gray-400/70 border-dashed border-4",
32
- className
33
- ),
34
- children: [
35
- /* @__PURE__ */ jsx("div", { className: cn("w-full h-full isolate relative"), children: LogoComponent ? /* @__PURE__ */ jsx(
15
+ const filterId = "glow-fx";
16
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
17
+ /* @__PURE__ */ jsx("svg", { height: "0", width: "0", style: { position: "absolute", marginLeft: "-100%" }, children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", { id: filterId, colorInterpolationFilters: "sRGB", x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
18
+ /* @__PURE__ */ jsx("feOffset", { dx: "0", dy: "2", in: "SourceAlpha", result: "dropOffset" }),
19
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "8", in: "dropOffset", result: "dropBlur" }),
20
+ /* @__PURE__ */ jsx("feFlood", { floodColor: "#4271FF", floodOpacity: "0.8", result: "dropFlood" }),
21
+ /* @__PURE__ */ jsx("feComposite", { operator: "in", in: "dropFlood", in2: "dropBlur", result: "dropShadow" }),
22
+ /* @__PURE__ */ jsx("feOffset", { dx: "0", dy: "0", in: "SourceAlpha", result: "outerOffset" }),
23
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "4", in: "outerOffset", result: "outerBlur" }),
24
+ /* @__PURE__ */ jsx("feFlood", { floodColor: "#00BBFF", floodOpacity: "0.3", result: "outerFlood" }),
25
+ /* @__PURE__ */ jsx("feComposite", { operator: "in", in: "outerFlood", in2: "outerBlur", result: "outerShadow" }),
26
+ /* @__PURE__ */ jsx("feComposite", { operator: "over", in: "outerShadow", in2: "dropShadow", result: "combinedShadows" }),
27
+ /* @__PURE__ */ jsx("feComposite", { operator: "over", in: "SourceGraphic", in2: "combinedShadows" })
28
+ ] }) }) }),
29
+ /* @__PURE__ */ jsx(
30
+ "div",
31
+ {
32
+ style,
33
+ className: cn(
34
+ "relative w-[72px] h-[72px] overflow-hidden select-none",
35
+ "rounded-[20%] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]",
36
+ // https://x.com/konstiwohlwend/status/1991221528206405685
37
+ "shadow-[0_4px_12px_0_rgba(0,0,0,0.08)] dark:!shadow-[0_10px_24px_0_rgba(10,69,151,0.28)]",
38
+ "before:absolute before:inset-0 before:bg-gradient-to-br before:from-slate-300 before:via-slate-400 before:to-slate-300 dark:before:from-[#4E7598] dark:before:via-[#0D233D] dark:before:to-[#4E7598] before:rounded-[inherit] before:supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] before:supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]",
39
+ // !disabled && "bg-gray-300 dark:bg-gray-900",
40
+ // disabled && 'bg-gray-300 dark:bg-gray-900',
41
+ className
42
+ ),
43
+ children: /* @__PURE__ */ jsx("div", { className: cn("absolute inset-[1px] isolate flex items-center justify-center rounded-[inherit] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]", !disabled && "bg-gradient-to-br from-slate-100 to-slate-200 dark:from-[#163050] dark:to-[#090C11]", disabled && "bg-gray-300 dark:bg-gray-900"), children: LogoComponent ? /* @__PURE__ */ jsx(
36
44
  "div",
37
45
  {
38
- className: "absolute inset-[20%] w-[60%] h-[60%] rounded-[24.154%] overflow-hidden flex items-center justify-center border",
39
- style: {
40
- opacity: disabled ? 0.6 : 1
41
- },
46
+ className: cn(
47
+ "w-[42%] h-[42%] flex items-center justify-center",
48
+ "[&_svg]:overflow-visible",
49
+ !enabled && "grayscale opacity-60"
50
+ ),
51
+ style: { filter: `url(#${filterId})` },
42
52
  children: /* @__PURE__ */ jsx(LogoComponent, {})
43
53
  }
44
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
45
- /* @__PURE__ */ jsx("svg", { width: "0", height: "0", children: svgGradients({
46
- "app-icon-gradient-light": ["#c0f", "#66f", "#4af"],
47
- "app-icon-gradient-dark": ["#3ec", "#9af", "#a5f"],
48
- "app-icon-gradient-light-expert": ["#f0c", "#f66", "#fa4"],
49
- "app-icon-gradient-dark-expert": ["#f0c", "#f66", "#fa4"],
50
- "app-icon-gradient-light-integration": ["#E5AB00", "#FFBA00", "#F8DF80"],
51
- "app-icon-gradient-dark-integration": ["#E5AB00", "#FFBA00", "#F8DF80"]
52
- }) }),
53
- /* @__PURE__ */ jsx(
54
- IconComponent,
55
- {
56
- opacity: disabled ? 0.75 : 1,
57
- className: cn(
58
- "inset-[20%] w-[60%] h-[60%] bg-clip-text text-transparent text-white absolute",
59
- typedIncludes(app.tags, "expert") ? "stroke-[url(#app-icon-gradient-light-expert)] dark:stroke-[url(#app-icon-gradient-dark-expert)]" : typedIncludes(app.tags, "integration") ? "stroke-[url(#app-icon-gradient-light-integration)] dark:stroke-[url(#app-icon-gradient-dark-integration)]" : "stroke-[url(#app-icon-gradient-light)] dark:stroke-[url(#app-icon-gradient-dark)]"
60
- )
61
- }
62
- )
63
- ] }) }),
64
- /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-[-100%] right-0 flex flex-col gap-1 [transform:_rotate(-45deg)_translateY(24px)] [transform-origin:top_center]", children: app.stage !== "stable" && /* @__PURE__ */ jsx(
65
- "div",
54
+ ) : /* @__PURE__ */ jsx(
55
+ IconComponent,
66
56
  {
67
57
  className: cn(
68
- "h-4 uppercase text-xs font-bold font-mono tracking-widest text-center",
69
- disabled ? "bg-gray-400/80 text-white" : app.stage === "alpha" ? "bg-red-500 text-white" : "bg-yellow-600 text-white"
58
+ "w-[42%] h-[42%]",
59
+ enabled ? "stroke-emerald-600 dark:stroke-emerald-400" : "stroke-slate-500 dark:stroke-gray-500"
70
60
  ),
71
- children: app.stage
61
+ style: {
62
+ opacity: disabled ? 0.5 : 1,
63
+ filter: `url(#${filterId})`
64
+ },
65
+ overflow: "visible"
72
66
  }
73
67
  ) })
74
- ]
75
- }
76
- );
68
+ }
69
+ )
70
+ ] });
77
71
  }
78
72
  export {
79
73
  AppIcon,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/apps/apps-ui.tsx"],"sourcesContent":["import { typedIncludes } from \"../utils/arrays\";\nimport { ALL_APPS, AppId } from \"./apps-config\";\n\nexport const appSquareWidthExpression = \"max(min(11vw,180px),80px)\";\nexport const appSquarePaddingExpression = \"max(min(1vw,1.5rem),0.25rem)\";\n\nexport type AppIconProps = {\n appId: AppId,\n /**\n * Icon component from the app frontend config\n */\n IconComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>,\n /**\n * Optional logo component from the app frontend config\n */\n LogoComponent?: React.FunctionComponent<{}>,\n className?: string,\n disabled?: boolean,\n style?: React.CSSProperties,\n /**\n * cn utility function for className merging (e.g., from stack-ui or tailwind-merge)\n */\n cn: (...inputs: any[]) => string,\n};\n\nexport function AppIcon({\n appId,\n IconComponent,\n LogoComponent,\n className,\n disabled,\n style,\n cn,\n}: AppIconProps) {\n const svgGradients = (gradients: Record<string, string[]>) => {\n return (\n <svg width=\"0\" height=\"0\">\n {Object.entries(gradients).map(([id, gradient]) => {\n return (\n <linearGradient key={id} id={id} x1=\"100%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n {gradient.map((color, index) => {\n return <stop key={index} stopColor={color} offset={`${index * 100 / (gradient.length - 1)}%`} />;\n })}\n </linearGradient>\n );\n })}\n </svg>\n );\n };\n\n const app = ALL_APPS[appId];\n\n return (\n <div\n style={style}\n className={cn(\n \"relative w-24 h-24 rounded-[24.154%] overflow-hidden select-none\",\n !disabled && \"bg-[linear-gradient(45deg,#dde,#fff)] dark:bg-[linear-gradient(45deg,#222,#666)]\",\n disabled && 'border-gray-400/70 border-dashed border-4',\n className,\n )}\n >\n <div className={cn(\"w-full h-full isolate relative\")}>\n {LogoComponent ? (\n <div\n className=\"absolute inset-[20%] w-[60%] h-[60%] rounded-[24.154%] overflow-hidden flex items-center justify-center border\"\n style={{\n opacity: disabled ? 0.6 : 1,\n }}\n >\n <LogoComponent />\n </div>\n ) : (\n <>\n <svg width=\"0\" height=\"0\">\n {svgGradients({\n \"app-icon-gradient-light\": [\"#c0f\", \"#66f\", \"#4af\"],\n \"app-icon-gradient-dark\": [\"#3ec\", \"#9af\", \"#a5f\"],\n \"app-icon-gradient-light-expert\": [\"#f0c\", \"#f66\", \"#fa4\"],\n \"app-icon-gradient-dark-expert\": [\"#f0c\", \"#f66\", \"#fa4\"],\n \"app-icon-gradient-light-integration\": [\"#E5AB00\", \"#FFBA00\", \"#F8DF80\"],\n \"app-icon-gradient-dark-integration\": [\"#E5AB00\", \"#FFBA00\", \"#F8DF80\"],\n })}\n </svg>\n <IconComponent\n opacity={disabled ? 0.75 : 1}\n className={cn(\n \"inset-[20%] w-[60%] h-[60%] bg-clip-text text-transparent text-white absolute\",\n (typedIncludes(app.tags, \"expert\")\n ? \"stroke-[url(#app-icon-gradient-light-expert)] dark:stroke-[url(#app-icon-gradient-dark-expert)]\"\n : typedIncludes(app.tags, \"integration\")\n ? \"stroke-[url(#app-icon-gradient-light-integration)] dark:stroke-[url(#app-icon-gradient-dark-integration)]\"\n : \"stroke-[url(#app-icon-gradient-light)] dark:stroke-[url(#app-icon-gradient-dark)]\"\n )\n )}\n />\n </>\n )}\n </div>\n <div className=\"absolute top-0 left-[-100%] right-0 flex flex-col gap-1 [transform:_rotate(-45deg)_translateY(24px)] [transform-origin:top_center]\">\n {app.stage !== \"stable\" && (\n <div className={cn(\n \"h-4 uppercase text-xs font-bold font-mono tracking-widest text-center\",\n disabled\n ? \"bg-gray-400/80 text-white\"\n : app.stage === \"alpha\"\n ? \"bg-red-500 text-white\"\n : \"bg-yellow-600 text-white\"\n )}\n >\n {app.stage}\n </div>\n )}\n </div>\n </div>\n );\n}\n\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,gBAAuB;AAwCT,SAgCb,UAhCa,KAgCb,YAhCa;AAtChB,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AAqBnC,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiB;AACf,QAAM,eAAe,CAAC,cAAwC;AAC5D,WACE,oBAAC,SAAI,OAAM,KAAI,QAAO,KACnB,iBAAO,QAAQ,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,QAAQ,MAAM;AACjD,aACE,oBAAC,oBAAwB,IAAQ,IAAG,QAAO,IAAG,QAAO,IAAG,MAAK,IAAG,MAC7D,mBAAS,IAAI,CAAC,OAAO,UAAU;AAC9B,eAAO,oBAAC,UAAiB,WAAW,OAAO,QAAQ,GAAG,QAAQ,OAAO,SAAS,SAAS,EAAE,OAAvE,KAA4E;AAAA,MAChG,CAAC,KAHkB,EAIrB;AAAA,IAEJ,CAAC,GACH;AAAA,EAEJ;AAEA,QAAM,MAAM,SAAS,KAAK;AAE1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,CAAC,YAAY;AAAA,QACb,YAAY;AAAA,QACZ;AAAA,MACF;AAAA,MAEA;AAAA,4BAAC,SAAI,WAAW,GAAG,gCAAgC,GAChD,0BACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,SAAS,WAAW,MAAM;AAAA,YAC5B;AAAA,YAEA,8BAAC,iBAAc;AAAA;AAAA,QACjB,IAEA,iCACE;AAAA,8BAAC,SAAI,OAAM,KAAI,QAAO,KACnB,uBAAa;AAAA,YACZ,2BAA2B,CAAC,QAAQ,QAAQ,MAAM;AAAA,YAClD,0BAA0B,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACjD,kCAAkC,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACzD,iCAAiC,CAAC,QAAQ,QAAQ,MAAM;AAAA,YACxD,uCAAuC,CAAC,WAAW,WAAW,SAAS;AAAA,YACvE,sCAAsC,CAAC,WAAW,WAAW,SAAS;AAAA,UACxE,CAAC,GACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,WAAW,OAAO;AAAA,cAC3B,WAAW;AAAA,gBACT;AAAA,gBACC,cAAc,IAAI,MAAM,QAAQ,IAC7B,oGACA,cAAc,IAAI,MAAM,aAAa,IACnC,8GACA;AAAA,cAER;AAAA;AAAA,UACF;AAAA,WACF,GAEJ;AAAA,QACA,oBAAC,SAAI,WAAU,sIACZ,cAAI,UAAU,YACb;AAAA,UAAC;AAAA;AAAA,YAAI,WAAW;AAAA,cACd;AAAA,cACA,WACI,8BACA,IAAI,UAAU,UACZ,0BACA;AAAA,YACN;AAAA,YAEC,cAAI;AAAA;AAAA,QACP,GAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/apps/apps-ui.tsx"],"sourcesContent":["import React from \"react\";\nimport { AppId } from \"./apps-config\";\n\nexport const appSquareWidthExpression = \"max(min(11vw,180px),80px)\";\nexport const appSquarePaddingExpression = \"max(min(1vw,1.5rem),0.25rem)\";\n\nexport type AppIconProps = {\n appId: AppId,\n /**\n * Icon component from the app frontend config\n */\n IconComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>,\n /**\n * Optional logo component from the app frontend config\n */\n LogoComponent?: React.FunctionComponent<{}>,\n className?: string,\n /**\n * Whether this app is enabled/installed (shows green icon)\n */\n enabled?: boolean,\n /**\n * Whether this app is disabled (shows dashed border)\n */\n disabled?: boolean,\n style?: React.CSSProperties,\n /**\n * cn utility function for className merging (e.g., from stack-ui or tailwind-merge)\n */\n cn: (...inputs: any[]) => string,\n};\n\nexport function AppIcon({\n appId,\n IconComponent,\n LogoComponent,\n className,\n enabled = false,\n disabled,\n style,\n cn,\n}: AppIconProps) {\n\n const filterId = \"glow-fx\";\n\n return (\n <>\n {/* theoretically, this only needs to be in the dom once: */}\n <svg height=\"0\" width=\"0\" style={{ position: \"absolute\", marginLeft: \"-100%\" }}>\n <defs>\n <filter id={filterId} colorInterpolationFilters=\"sRGB\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n {/* drop shadow */}\n <feOffset dx=\"0\" dy=\"2\" in=\"SourceAlpha\" result=\"dropOffset\" />\n <feGaussianBlur stdDeviation=\"8\" in=\"dropOffset\" result=\"dropBlur\" />\n <feFlood floodColor=\"#4271FF\" floodOpacity=\"0.8\" result=\"dropFlood\" />\n <feComposite operator=\"in\" in=\"dropFlood\" in2=\"dropBlur\" result=\"dropShadow\" />\n {/* outer shadow */}\n <feOffset dx=\"0\" dy=\"0\" in=\"SourceAlpha\" result=\"outerOffset\" />\n <feGaussianBlur stdDeviation=\"4\" in=\"outerOffset\" result=\"outerBlur\" />\n <feFlood floodColor=\"#00BBFF\" floodOpacity=\"0.3\" result=\"outerFlood\" />\n <feComposite operator=\"in\" in=\"outerFlood\" in2=\"outerBlur\" result=\"outerShadow\" />\n {/* Combine: drop shadow behind, then outer shadow, then source graphic on top */}\n <feComposite operator=\"over\" in=\"outerShadow\" in2=\"dropShadow\" result=\"combinedShadows\" />\n <feComposite operator=\"over\" in=\"SourceGraphic\" in2=\"combinedShadows\" />\n </filter>\n </defs>\n </svg>\n <div\n style={style}\n className={cn(\n \"relative w-[72px] h-[72px] overflow-hidden select-none\",\n \"rounded-[20%] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\", // https://x.com/konstiwohlwend/status/1991221528206405685\n \"shadow-[0_4px_12px_0_rgba(0,0,0,0.08)] dark:!shadow-[0_10px_24px_0_rgba(10,69,151,0.28)]\",\n \"before:absolute before:inset-0 before:bg-gradient-to-br before:from-slate-300 before:via-slate-400 before:to-slate-300 dark:before:from-[#4E7598] dark:before:via-[#0D233D] dark:before:to-[#4E7598] before:rounded-[inherit] before:supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] before:supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\",\n // !disabled && \"bg-gray-300 dark:bg-gray-900\",\n // disabled && 'bg-gray-300 dark:bg-gray-900',\n className,\n )}\n >\n <div className={cn(\"absolute inset-[1px] isolate flex items-center justify-center rounded-[inherit] supports-[corner-shape:superellipse(1.5)]:[border-radius:30%] supports-[corner-shape:superellipse(1.5)]:[corner-shape:superellipse(1.5)]\", !disabled && \"bg-gradient-to-br from-slate-100 to-slate-200 dark:from-[#163050] dark:to-[#090C11]\", disabled && \"bg-gray-300 dark:bg-gray-900\")}>\n {LogoComponent ? (\n <div\n className={cn(\n \"w-[42%] h-[42%] flex items-center justify-center\",\n \"[&_svg]:overflow-visible\",\n !enabled && \"grayscale opacity-60\"\n )}\n style={{ filter: `url(#${filterId})` }}\n >\n <LogoComponent />\n </div>\n ) : (\n <IconComponent\n className={cn(\n \"w-[42%] h-[42%]\",\n enabled\n ? \"stroke-emerald-600 dark:stroke-emerald-400\"\n : \"stroke-slate-500 dark:stroke-gray-500\"\n )}\n style={{\n opacity: disabled ? 0.5 : 1,\n filter: `url(#${filterId})`,\n }}\n overflow=\"visible\"\n />\n )}\n </div>\n </div>\n </>\n );\n}\n\n"],"mappings":";AA8CI,mBAMQ,KAFF,YAJN;AA3CG,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AA4BnC,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF,GAAiB;AAEf,QAAM,WAAW;AAEjB,SACE,iCAEE;AAAA,wBAAC,SAAI,QAAO,KAAI,OAAM,KAAI,OAAO,EAAE,UAAU,YAAY,YAAY,QAAQ,GAC3E,8BAAC,UACC,+BAAC,YAAO,IAAI,UAAU,2BAA0B,QAAO,GAAE,QAAO,GAAE,QAAO,OAAM,QAAO,QAAO,QAE3F;AAAA,0BAAC,cAAS,IAAG,KAAI,IAAG,KAAI,IAAG,eAAc,QAAO,cAAa;AAAA,MAC7D,oBAAC,oBAAe,cAAa,KAAI,IAAG,cAAa,QAAO,YAAW;AAAA,MACnE,oBAAC,aAAQ,YAAW,WAAU,cAAa,OAAM,QAAO,aAAY;AAAA,MACpE,oBAAC,iBAAY,UAAS,MAAK,IAAG,aAAY,KAAI,YAAW,QAAO,cAAa;AAAA,MAE7E,oBAAC,cAAS,IAAG,KAAI,IAAG,KAAI,IAAG,eAAc,QAAO,eAAc;AAAA,MAC9D,oBAAC,oBAAe,cAAa,KAAI,IAAG,eAAc,QAAO,aAAY;AAAA,MACrE,oBAAC,aAAQ,YAAW,WAAU,cAAa,OAAM,QAAO,cAAa;AAAA,MACrE,oBAAC,iBAAY,UAAS,MAAK,IAAG,cAAa,KAAI,aAAY,QAAO,eAAc;AAAA,MAEhF,oBAAC,iBAAY,UAAS,QAAO,IAAG,eAAc,KAAI,cAAa,QAAO,mBAAkB;AAAA,MACxF,oBAAC,iBAAY,UAAS,QAAO,IAAG,iBAAgB,KAAI,mBAAkB;AAAA,OACxE,GACF,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA;AAAA,UACA;AAAA,UACA;AAAA;AAAA;AAAA,UAGA;AAAA,QACF;AAAA,QAEA,8BAAC,SAAI,WAAW,GAAG,4NAA4N,CAAC,YAAY,uFAAuF,YAAY,8BAA8B,GAC1X,0BACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,CAAC,WAAW;AAAA,YACd;AAAA,YACA,OAAO,EAAE,QAAQ,QAAQ,QAAQ,IAAI;AAAA,YAErC,8BAAC,iBAAc;AAAA;AAAA,QACjB,IAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,UACI,+CACA;AAAA,YACN;AAAA,YACA,OAAO;AAAA,cACL,SAAS,WAAW,MAAM;AAAA,cAC1B,QAAQ,QAAQ,QAAQ;AAAA,YAC1B;AAAA,YACA,UAAS;AAAA;AAAA,QACX,GAEJ;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
@@ -10,8 +10,8 @@ declare class AccessToken {
10
10
  private constructor();
11
11
  get payload(): {
12
12
  exp?: number | undefined;
13
- sub: string;
14
13
  name: string | null;
14
+ sub: string;
15
15
  iss: string;
16
16
  aud: string;
17
17
  project_id: string;
@@ -10,8 +10,8 @@ declare class AccessToken {
10
10
  private constructor();
11
11
  get payload(): {
12
12
  exp?: number | undefined;
13
- sub: string;
14
13
  name: string | null;
14
+ sub: string;
15
15
  iss: string;
16
16
  aud: string;
17
17
  project_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-shared",
3
- "version": "2.8.54",
3
+ "version": "2.8.55",
4
4
  "files": [
5
5
  "README.md",
6
6
  "dist",
@@ -67,8 +67,8 @@
67
67
  "@types/elliptic": "^6.4.18",
68
68
  "@types/semver": "^7.5.8",
69
69
  "@types/uuid": "^9.0.8",
70
- "react": "^19.0.0",
71
- "react-dom": "^19.0.0",
70
+ "react": "^19.0.1",
71
+ "react-dom": "^19.0.1",
72
72
  "rimraf": "^5.0.5"
73
73
  },
74
74
  "scripts": {